уторак, 31. јануар 2012.

The New Emperors Clothes - Abuse of Web Technology

Unedited contributionCSSHTMLCEOArchitectAjaxDesignjQueryCloudWeb Why Javascript/JQuery/HTML/CSS/DOM is creating an awful mess Part of The HTML5 / CSS3 ZoneSee AlsoMore like thisMore by this author

View the Original article

Birthright Campaign Manager

31 Jan 2012 DevIntermediateAll-TopicsLightSwitch is an open source role playing computer aid for Birthright, a campaign setting for Dungeons & Dragons.  See AlsoMore like thisMore by this author

View the Original article

уторак, 10. јануар 2012.

A Coder Interview With Henric Edwards

11 Jan 2012 All-Topics Welcome to our continuing series of Code Project interviews in which we talk to developers about their backgrounds, projects, interests and pet peeves. In this installment we meet Swedish .NET developer Henric Edwards. See AlsoMore like thisMore by this author

View the Original article

Exporting Stored Procedure Results into Tables Dynamically with T-SQL

Unedited contributionSQL2000SQL2005SQL-ServerSQL2008 T-SQL Code for Converting Stored Procedure results to Tables Dynamically Part of The SQL Zonesponsored by

View the Original article

недеља, 8. јануар 2012.

WP7 Tips: How to Pin an Application to the Start Screen?

Today in this blog post, I am going to start up few Windows Phone 7 tips which will be handy for you if you are a beginner and just started exploring your device.

In this first tips & tricks, I will show you how to pin an application from your application list to the start screen of your Windows Phone 7 device. As I mentioned, this post is absolutely for the beginners.

How to Pin an Application to the Start Screen?

In your Windows Phone 7 device, you will see two screens named

View the Original article

Chaos Based Encryption

Unedited contributionC#Windows.NETIntermediateEncryptionDecryption Generating Encryption Keys using Cellular Automata See AlsoMore like thisMore by this author

View the Original article

субота, 7. јануар 2012.

.NET Code Conversion

Technical BlogAll-Topics IntroductionThis post explains how to convert the code in .NET. BackgroundIn lot of programming forums, you can find some questions related to code conversion. For example an enquirer asking a question in VB.NET & answerer(s) posting solution(s) but unfortunately its in C#(instead of VB.NET). After  See AlsoMore like thisMore by this author

View the Original article

Selenium automates browsers: ComboBox fix using C#

See more:C#WindowsQAFirefoxAPIAutomation Selenium ComboBoxProblem

I've been in the situation where I had to automate some entries to Forms. Selenium is an excellent tool but it has its flows. One of them is ComboBoxes, this also depends on how the ComboBox is implemented inside the HTML. The problem is that even though the text is written in the ComboBox (where we choose the item that we want), when you change the focus to another component then the text is erased. This problem seems to be related with how the COM is created.

Solution

The solution is to combine Win32 API calls and Selenium. We want to emulate a user entering data to the Form.

First we need to link the Win32 API calls with our class.



View the Original article

петак, 6. јануар 2012.

Configuring ASP.NET 2.0 To Properly Recognize and Identify the Google Chrome Browser

Unedited contributionASP.NETBrowserchromeRecognition The purpose of this article is to explain how you can update your ASP.NET 2.0 site to properly recognize and identify Chrome. See AlsoMore like thisMore by this author

View the Original article

Configuring ASP.NET 2.0 To Properly Recognize and Identify the Google Chrome Browser

Unedited contributionASP.NETBrowserchromeRecognition The purpose of this article is to explain how you can update your ASP.NET 2.0 site to properly recognize and identify Chrome. See AlsoMore like thisMore by this author

View the Original article

C# Simple Search Class

Introduction

This article introduces some simple code which allows easy addition of search functionality which can be used to search any object (files, .NET classes) and display the search results together in a single view.

Background

This demo is presented in ASP.NET MVC so basic MVC knowledge would be useful, although this solution could be applied to other .NET environments.

Using the Code

The main work is done in the implementations of the abstract base class Searcher. In this example, some dummy data is created in the constructor, this is then queried for matching items in the Search method and projected into a SearchResult. Note how RouteInformation is populated. The entries in the RouteInformation dictionary will be used to create an ActionLink in the MVC view.

public class ProductSearcher : Searcher

View the Original article

Debugging C and C++ with Visual Studio 2005/2008, Part 2: Setting up the IDE

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Constructors and Destructors in C++

is not a trivial task.Every time an instance of a class is createdthe constructor method is called. The constructor has the same name as theclass and it doesn't return any type, while the destructor's name it's definedin the same way, but with a '

View the Original article

Ask an Expert

Click here to talk to anexpert through Liveperson!

Interested in becoming an expert featured through Cprogramming.com? Email the webmaster for moreinformation.

Popular pages Exactly how to get started with C

View the Original article

Debugging C++ Using Visual Studio 2005/2008, Part 3: Using Breakpoints Effectively

by Patrick Mancier

If you go to the Breakpoints window you will see that there is are columns displayed called 'Condition' and 'Hit Counts'. These can be very powerful mechanisms for debugging tricky code. There are a series of mechanisms here that can be used to debug the code. To see these choices, select the breakpoint box and right click to see the menu.





Location

This is an obvious one and usually is set by clicking on the far left line of the code that the programmer wants to break on.

Condition

This checks to see if a specific expression is true or has changed. It does not check specific values other than as a Boolean.



View the Original article

Debugging C and C++ with Visual Studio 2005/2008, Part 4: Setting up Code for the Debugger

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Debugging with Visual Studio, Part 5: Using Trace and Log Messages

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Debugging with Visual Studio, Part 6: Remote Debugging

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

5 Awesome (and time saving) Features of the Visual Studio Debugger

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

How can Cprogramming.com Better Help You?

cprogramming.com with yourthoughts. I may not be able to respond to every email, but I will certainlyread them all.

To get the discussion started, here are a few areas you might like to comment on:

Posting frequency -- are there too few new articles posted per week, or too many?

Topics -- are there specific topics you'd like to see less coverage of, or more coverage of? Are there topics that just haven't been covered at all that you'd be interested in?

Article length -- do you find that articles are too short, just right, or too long?

Article audience -- are you looking for beginner articles, or more in-depth, detailed articles for professional programmers, or something in between? Would you like to see articles tagged by the expected audience?

Site Design -- does the current layout and formatting work for you? Are there specific ways it could be better?

Layout -- are you able to find what you are looking for?

Other ideas -- any feedback you have on other topics would be much appreciated Popular pages Exactly how to get started with C

View the Original article

The 5 Most Common Problems New Programmers Face--And How You Can Solve Them

By Alex Allain

When you're just starting out with programming, it's easy to run into problemsthat make you wonder how anyone has ever managed to write a computer program.But the fact is, just about everyone else who's learned to code has had thatexperience and wondered the same thing, when they were starting out. I've helped teach several introductory programming classes, and there are someproblems that trip up nearly every student--everything from getting started todealing with program design.

I'll prepare you to get past these challenges--none of them are insurmountable.



Getting set upLearning to program is hard enough, but it's easy to get tripped up before you even begin. First you need to chose a programming language (I recommend C

View the Original article

5 Ways You can Learn Programming Faster

By Alex Allain

Learning to program isn't something you can do in an afternoon, but it doesn'thave to be a life's work, either. There arelots of things you can do to make it easier on yourself when you are learningto program. You already know about The 5 Most Common Problems New Programmers Face--And How You Can SolveThem. Now, discover how to get the most out of your learning.

One common theme across many of these tips is:

don't go toofast; get it right before moving on.

When I was teaching C, there were always a few students who came into the classknowing a bit about programming. Inevitably, some of these students did greatin the first few weeks only to fall further and further behind as the coursewent on. Why? They went too fast through the introductory part of the course,thinking they knew it all--but they rarely did. They knew some of thematerial, but not enough to have a strong grasp of the fundamentals.

At the same time, you must not stop making progress--you can go too slow aswell as too fast. Don't avoid a topic after you've mastered everything leadingup to it. By facing more challenging ideas, you'll help cement your grasp ofthe basics.1. Look at the Example CodeReading is usually about the words on the page, but learning to program isabout code. When you're first learning to program, you should make sure tolook at, and try to understand, every example. When I first learned toprogram, I would sometimes read the code examples before the text, and try tofigure out what they did. It doesn't always work, but it did force me to lookat the example very carefully, and it often helped make the writeups clearer.

If you want to see what sample code looks like, you can read this site's introductory programming tutorial. This tutorial spends a great deal of timetalking about the sample code to help you work through exactly what the codedoes.2. Don't Just Read Example Code--Run ItBut when you're reading a programming tutorial (or book), it's easy to look at thesample code and say "I get it, I get it, that makes sense". Of course, youmight get it, but you might not get it, and you just don't know it. There'sonly one way to find out--do something with that code.

If you haven't already, get a compiler like Code::Blocks set up.

Then type the sample code into a compiler--if you type it, instead ofcopying and pasting it, you will really force yourself to go through everythingthat is there. Typing the code will force you to pay attention to the detailsof the syntax of the language--things like those funny semicolons that seem to go after every line.

Then compile it and run it. Make sure it does what you think it does.

Then change it. Software is the most easilychanged machinery on the planet. You can experiment easily, try new things,see what happens; the changes will happen almost immediately, and there is norisk of death or mayhem. The easiest way to learn new language features is totake some code that works one way, and change it.3. Write your Own Code as Soon as PossibleOnce you understand something about the language--or even if you're stillgetting your head around it--start writing sample programs that use it. Sometimes it's hard to find good ideas for what programs to write. That's OK, you don't have to come up with every idea at the beginning.

Youcan find some programmingchallenges on this site.

You can also reimplement the examples from the book or tutorial you arereading. Try to do so without looking back at the sample code; it won't be aseasy as it seems. This technique can work especially well if you tweak the sample code.

If you can't think of a small program to write, but you have in mind a largerprogram you want to implement, like a game, you could start building smallpieces that you can later use for a game. Whether you use them later or not,you will get the same useful experience.4. Learn to Use a DebuggerI already talked about the importance of debugging in The 5 MostCommon Problems New Programmers Face--And How You Can Solve Them. But itbears repeating; the sooner you learn good debugging techniques, easier it willbe to learn to program.

The first step in doing so is to learn how to use atool called a debugger,which allows you to step through your code.

A debugger will allow youto step line by line through a piece of code. It will let you see the valuesof variables, and whether the code inside an if statement is executed.

A debugger can help you quickly answer questions about what your code is doing.int main()

View the Original article

Programming Practice Problem - Computing File Size

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Ebook survey

Which choice best describes your level of programming experience or education?   I am learning to program primarily through classes in high school

View the Original article

Programming Practice Problem - Temperature Conversion

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

The Secret to Learning Anything

By Alex Allain

Some of the most important lessons I learned in college came from one professor, Michael Mitzenmacher. Now,this was a guy with a lot of papers to his name, tenured at Harvard,working on some pretty darn complicated computer science theory (I took hisalgorithms class). So you'd expect that I'd learn something important. But asit turned out, the biggest lessons I learned from him weren't on the topics hetaught. I learned a secret that helped me learn much more effectively.

At one point when describing the problem sets in the class, he gave some advice that stuck with me:

Don't suffer from Math Major syndrome

So, what you ask, is Math Major syndrome? Well, think of it thisway--if you are studying a hard problem, what's your first tendency? To getlost in thought? To start at it, mulling over ideas in your head, waiting fora flash of insight? If so, that's math major syndrome. It's the idea that youcan (or have to) solve problems entirely through a brilliant flash of insight,without doing any actual work.





The alternative is quite simple:

Hard problems become easier by working through them with diagrams, effort and patience

In other words, don't just wait for answers to come to you--go out and findthem. Don't just use what's in your head--use paper, or the computer, or awhiteboard, to draw out the ideas, try experiments, make the patternsvisible rather than waiting for a flash of insight.

I remember really learning this lesson during the first problem set--I'dstarted it when it was handed out, but the night before it was due I still hadone problem left. I spent hours on that problem, but I spent it drawing outequations, working through possibilities. Each one ended in failure, until Ihad a flash of insight in the middle of writing out an equation. If I hadn'tworked through (and discarded) all those possibilities, I'd have had no hope ofsolving that problem.

So how do you apply this principle in practice?Program Program ProgramIf you're learning to program, you should be programming. Work practice problems while youread tutorials--in fact,you're probably better off in most cases working practice problems thanyou are reading about programming. (You will need to read, but withoutpractice, that reading means nothing.)

In fact, if you're just learning to program, then I suggest that you stopreading this article right now and go write some code (or get yourselfset up with a compiler andthen go write some code). But not something you know how to solve--try towrite a program that is just a little bit scary or hard. You should feel justa bit scared that you won't be able to do it.Draw it OutA second corollary to the principle is that you're better off using paper thantrying to imagine everything. In fact, I can't say enough about the importanceof drawing diagrams. A lot of things in programming sound very abstract ordifficult to describe in words, but they can be quickly shown with a picture.Computer memory, for example, can be thought of as a long block of cells(almost like in an Excel spreadsheet). Drawing out each piece of memory inyour program (when dealing with pointers or data structures) can really helpvisualize what is going on. You can also write out recursion manually byshowing each recursive call with its arguments and return value.

But even simpler concepts become clear when you draw them or work through themstep by step--having trouble understanding a complex piece of code? Write outthe different variables and how they are modified. For example, the booleanexpression ! a

View the Original article

How to Avoid, Find (and fix) Memory Errors in Your C/C++ Code

By Naveen Gv

Naveen Gv is a Technical Consulting Engineer in the Performance Library Labat Intel Corporation.

Memory errors occur very commonly in C and C

View the Original article

Setting up Apple XCode

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

"The Same Game": A Simple Game from Start to Finish, Part 1 of 5

Foreword to Same Game

In this five part series, we'll be creating a version of a game called SameGame usingthe Microsoft Foundation Class library from start to finish. We'll includefeatures beyond the simple removing of blocks in the game. We'll implement anundo/redo subsystem and some user configuration dialogs. We'll show you stepby step with not only source code but screenshots how to build a fun game fromstart to finish and how to use Microsoft's MFC classes. Every article comes with complete source code, so you can build and run the game yourself.

The rules to the SameGame are quite simple, you try to remove all of the colored blocks from the playing field. In order to remove a block the player must click on any block that is next to, vertically or horizontally, another with the same color. When this happens all of the blocks of that color that are adjacent to the clicked block are removed. All of the blocks above the ones removed then fall down to take their place. When an entire column is removed, all columns to the right are shifted to the left to fill that space. The blocks aren't shifted individually but as a column. The game is over when there are no more valid moves remaining. The goal is to end with an empty board in as little time as possible. Some versions of the SameGame use a scoring algorithm that can be implemented as an additional exercise for the user.

Prerequisites

You'll need to have a basic C

View the Original article

Same Game, Part 2 - Creating a Playable Game

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

четвртак, 5. јануар 2012.

Same Game, Part 3 - Adding Difficulty Levels

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Same Game, Part 4 - Adjusting the Board Size and Block Count

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Same Game, Part 5 - Implementing an Undo/Redo Stack and Keyboard Accelerators

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Why AppUp? A Quick Review of the AppUp Model

This article is sponsored by Intel AppUpSM developer program

Intel launched a beta version of the AppUp Center in January of 2010. We've since come out of beta and added many new features. Here's a look back and forward to help you know what to expect with AppUp. Before you read on, though, we'd like to invite you to enroll in our developer program

View the Original article

Dixons Challenge

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

An Object Oriented Approach to Animation

By Yatin S. ShelkeIntroduction to Object Oriented Animation

In the past 20 years, the video game industry which has seen rapid growth from simple 2D monochromatic games to full blown high resolution, full color and fast 3D games that are so popular today, and even modern films are full of computer-generated images. At the same time, object-oriented programming has made it easier to conquer the complexity involved in creating high quality computer animation. Creating an animation can be conveniently thought of as drawing objects currently in view on the computer screen. For example, a monster in the game DOOM is an object instance of the class for that kind of monster.

Simply put, an Object Oriented Animation application defines various classes, creates the instances of these classes and performs operations on the object instances. Below, we'll explain some of the essential abstractions that you can use to create your own computer animations.

This article assumes that you have basic familiarity with the principles of object-oriented programming in C

View the Original article

Getting your app on Intel AppUp (SM): Porting "Ancient Frog"

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Frames, Layers and Layer Folders in Animation

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

5 New Year's Resolutions for Programmers in 2011

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

New Incentives and a Whole New Platform From The Intel AppUp (SM) developer program

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

An Object Oriented Animation Engine

By Yatin S. ShelkeIntroduction to Animation Engines

So far, we've covered many of the core elements of an animation, including the Graphic Object, Animation Object, Camera, Frustum, Layers and Layer Folders. This article (and the next) will bring them all together to design .

Video games and Flash are examples of animation engines. An animation engine is the code in the animation application that drives the animation. The animation engine has many responsibilities:

Taking drawing data (animation objects, layer arrangements) and events as input Delegating the rendering tasks to animation objects Making sure that drawing is done in the order specified by layers and layer folders Scene graph management Collision detection (in games) Satisfying real time drawing requirements ( if any) Managing memory for animation objects, layers and layer folders.

A good animation engine should be able to handle all kinds of drawing and animation implementations without knowing how they are implemented. A good animation engine will not know whether the rendering is done with OpenGL or Direct3D. It will not know which platform-specific functions are used for keeping time; it shouldn't even know how memory is allocated. It must deal only with abstractions that are not platform or library dependent. It can then cater to a wide variety of animation applications on a variety of platforms. Animation engine design therefore is one of the ultimate challenges for an Object Oriented designer/programmer.

Animation Object examples

Let us build some animation objects based on the discussions thus far. The objects discussed in this article are:

An animation object that will move the camera (AnimCamera). An animation object that will draw a Graphic Object (class AnimFace), built on a simple Graphic Object, namely a rectangular GraphicFace. An animation object for moving a Graphic Object (class AnimTranslate). It will cause the Graphic Object in AnimFace to move.Camera based on OpenGL API

Before discussing the class AnimCamera, let's see how the camera works in a graphics API such as OpenGL (this discussion is based on the C API for OpenGL). Imagine a scene that contains several objects. Each object is drawn at a specific location in the virtual world. Let's call the virtual world coordinates "world coordinates" and use the prefix "world_". These world coordinates are mapped onto the screen to "screen coordinates" using prefix "screen_". When I use a triplet (x,y,z) for coordinates, that means world coordinates (since the real world has 3 dimensions). If the coordinates are described as a pair (x,y), these are screen coordinates, since screens are flat.

By default, the scene is drawn with the viewer at the origin of the virtual world's 3D Cartesian coordinate system, i.e. at (world_x,world_y,world_z)

View the Original article

Functors: Function Objects in C++

support functionpointers, which provide a way to pass around instructions on how toperform an operation. But function pointers are limited becausefunctions must be fully specified at compile time. What do I mean? Let's saythat you're writing a mail program to view an inbox, and you'd like to givethe user the ability to sort the inbox on different fields--to, from, date,etc. You might try using a sort routine that takes a function pointer capableof comparing the messages, but there's one problem--there are a lot ofdifferent ways you might want to compare messages. You could create differentfunctions that differ only by the field of the message on which the comparisonoccurs, but that limits you to sorting on the fields that have been hard-codedinto the program. It's also going to lead to a lot of if-then-else blocksthat differ only by the function passed into the sort routine.



What you'd really like is the ability to pass in a third argument to yourcomparison function, telling it which field to look at. But to make thiswork, you'd have to write your own sort routine that knows about the thirdargument; you can't use a generic routine like the STL's sort function becauseyou can't tell it to pass in a third argument to the comparator. Instead, yousomehow need the ability to "embed" what field to sort on inside the function.

It turns out that you can get this behavior in C

View the Original article

What's the difference between declaring and defining in C and C++

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Learn more about MeeGo

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Printf format strings - Cprogramming.com

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

What is C++0x?

11 includes a wide range of features: major new features like lambda support and "move semantics", usability improvements like type inference through the auto keyword, simplified looping over containers, and many improvements that will make templates easier to write and easier to use. This series on C

View the Original article

C++11 - auto, decltype, and the new function declaration syntax

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Lambda Functions in C++11 - the Definitive Guide

11 is ability to create lambdafunctions (sometimes referred to as closures). What does this mean? A lambdafunction is a function that you can write inline in your source code (usually to pass in to another function, similar to the idea of a functor or function pointer). With lambda, creating quick functions has become mucheasier, and this means that not only can you start using lambda when you'dpreviously have needed to write a separate named function, but you can startwriting more code that relies on the ability to create quick-and-easyfunctions. In this article, I'll first explain why lambda is great--with someexamples--and then I'll walk through all of the details of what you can do withlambda.

Why Lambdas Rock

Imagine that you had an address book class, and you want to be able toprovide a search function. You might provide a simple search function, taking astring and returning all addresses that match the string. Sometimes that's whatusers of the class will want. But what if they want to search only in thedomain name or, more likely, only in the username and ignore results in thedomain name? Or maybe they want to search for all email addresses that alsoshow up in another list. There are a lot of potentially interesting things tosearch for. Instead of building all of these options into the class, wouldn'tit be nice to provide a generic "find" method that takes a procedure fordeciding if an email address is interesting? Let's call the methodfindMatchingAddresses, and have it take a "function" or "function-like" object.

#include #include class AddressBook

View the Original article

GDB by Example

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Range-Based For Loops in C++11

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Constexpr - Generalized Constant Expressions in C++11

11 to run faster than ever before. One of those improvements,generalized constant expressions, allows programs to take advantage ofcompile-time computation. If you're familiar with templatemetaprogramming, constexpr will seem like a way of making your life mucheasier. If you're not familiar with template metaprogramming, that'sok--constexpr makes the benefits of compile-time programming much more widelyaccessible.

The basic idea of constant expressions is to allow certain computations to takeplace at compile time--literally while your code compiles--rather than when theprogram itself is run. This has an obvious performance benefit: if something canbe done at compile time, it will be done once, rather than every time theprogram runs. Need to compute the value of a known constant like the sine orcosine of a specific, known-at-compile number? Sure, you could use the librarysin or cos function, but you'll pay the price of a function call at runtime.With constexpr, you can create a function that, at compile time, computes thevalue for you. Your user's CPU will never need to do any work at all forit!

Now, it's certainly true that if the operation can be computed at compile time, you could hard-code a constant. But doing that means that you lose flexibility if you later want to change the constant value--you have to recompute it, rather than just change an argument to a function.

Constexpr in action

In order to get compile time processing, you need to use theconstext keyword on the function that you want to be able to compute at compiletime.

constexpr int multiply (int x, int y)

View the Original article

A Gentle Introduction to C++ IO Streams

Programming Language", "Designing and implementing a general input/output facility for a programming language is notoriously difficult". He did an excellent job, and the C

View the Original article

C and C++ for Java Programmers

), and you already know Java--good for you! Once you've learned one programming language, the next one will be easier; you've already gotten past challenges like how to think about programming, how to design basic programs and algorithms and how to debug. With C (or C

View the Original article

Write Faster Code using Rvalue References and Move Semantics in C++11

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

среда, 4. јануар 2012.

What's the difference between static and extern?

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

What is a hash table?

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Programming practice problem - convert integer to English text

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

Better type safety in C++11 - nullptr and strongly typed enums

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

How to create a shared library on Linux using GCC

Tutorial
Game Programming
Graphics Programming
Algorithms & Data Structures
Debugging
All Tutorials




View the Original article

A Restaurant and Waiter helper app in WPF and Windows Mobile

  0.00 (0 votes)Sponsored Links Pro

Download Restaurant-Source - 541.07 KBDownload Waiter-Source - 4.24 MBDownload DatabaseFiles_WithSampleData - 619.65 KB Introduction  

In 2009 when I was a student in Southern Cross University of Australia (SCU), I was supposed to do a project as my final project. It was quite a while that I was heard about Windows Presentation Foundation (WPF) and I was in love with that. So I thought it would be great if I create a WPF application as my final project. So I decided to write an application to learn WPF in action and this project came to existence. After that, when I graduated from SCU I decided to make a video demo of the app in action and put that on the Youtube. 

 

After putting this video on Youtube, I received many feedback and requests from students in academia to share the code with them. They were interested in how I had created this app using WPF technology. I hadn't decided to share the code in public mostly because it was my first try on WPF and I knew that it is not well developed to be considered a guide for new learners. In fact, I was a newbie in WPF and I didn't want to put others in a wrong direction. Therefore, when I was receiving such requests I was forwarding them to the open source Family.Show application from Verrtigo and Pro WPF in C# book by Matthew MacDonald that were among my best resources in learning WPF.

It's almost 3 years passed now from when I did this project but I still receive such requests and feedback from academia students. To be honest, I am tired of replying such insistent student who ask for the code even though I reveal this fact with them. Therefore I've decided to share the source code of the app with everyone who is interested by the subject as is.

But I highly emphasize that this is a project that was done by a WPF newbie, hence you should consider that there might be better ways to do the things that were done in this application in terms of coding, designing and etc. In fact, If I'd wanted to create this application now, I would do that differently and in a more standard way.

Anyway, here is the whole thing you need to know about this project.




View the Original article

The Big Bang Transcripts Viewer

Unedited contributionC#IntermediateSilverlightWindows-Phone-7 Learn how to download your favorite TV transcripts and format it in your smartphone Part of The Mobile ZoneSee AlsoMore like thisMore by this author

View the Original article