Thomas Sampson

Programming, Graphics and Games :)

  • Home
  • About
  • Portfolio
  • Contact

Tag Archives: tips

Shorthand IF statement in C++

Dec7

Here is a nice little tip for using a shorthand if function, best used when the true and false actions are small one liners such as assigning or outputing a value.

Syntax

(boolean condition) ? ifTrueDoThis : ifFalseDoThis ;

Example….

int a( 5);

int b (9);

(a>b) ? cout << a : cout <<b;

Output

9

3 Comments Posted in C#, General Tagged C#, if statement, shorthand, tips

Drag enabled DIV tags

Nov9

Make any div tag on the page “draggable”

http://www.dynamicdrive.com/dynamicindex11/genericdrag.htm

1 Comment Posted in General, Javascript Tagged DOM, tips, tutorial, web

Writing dynamically to an ASP.NET page

Aug30

first create a new panel object and name it, set its width to 100% and clearout any text

then use..

Panelname.Controls.Add(new LiteralControl(“string”));

to add to it :)

1 Comment Posted in ASP.NET, C#, General Tagged .net, asp.net, C#, tips, web
I am currently studying MComp Games Software Development at Sheffield Hallam University, focusing primarily on application development in C++, with experience in graphics programming, scripting languages, VCS and web technology Read More

Current Projects

MyEnv
 
Perlin Noise Tool
 
Android Game Engine
 


Twitter Updates

  • Cine: cinemagr.am cinemagr.am/show/8451402 #cinemagraph #gif 6 days ago
  • Cine: cinemagr.am cinemagr.am/show/8261029 #cinemagraph #gif 1 week ago
  • RT @BGS_Devs: Alduin's Wall Arrives in our lounge bit.ly/L3pQMy 1 week ago
  • Tired of reading/hearing that "Programmers are lazy". Good programmers are efficient as a means to becoming more productive...and never lazy 1 week ago
  • Cine: cinemagr.am cinemagr.am/show/7742705 #cinemagraph #gif 2 weeks ago
  • Cine: cinemagr.am cinemagr.am/show/7740623 #cinemagraph #gif 2 weeks ago
  • Cine: cinemagr.am cinemagr.am/show/7742038 #cinemagraph #gif 2 weeks ago
  • RT @mike_acton: #ProgrammerConfession I have spent more total time deciding variable names than I did my daughter's name. /cc @mysteryco ... 2 weeks ago
  • Just bumped into this fella on the front lawn campl.us/jpkW 2 weeks ago
Follow @drummertom999

Cool People / Places


Recent Comments

Haraprasad Ghosh on De Morgan’s Law
Andrew Wiley on Debugging DirectX applications…
Catherine on C++ Pound Sign
Paul on C++ Pound Sign
pat on Detecting first page load in…
Thomas on C++ Pound Sign
tomtech999 on Flash to ASP.NET
electricians swansea on Which RAM?
Duncan on C++ Pound Sign
andrew on Flash to ASP.NET

Tags

.net 3D Actionscript ajax apple asp.net C# cool CSS database DirectX firefox flash games graphics gui html Javascript linux memory allocation microsoft multi touch mySQL Nostalgia OOP Open source programming ps3 Python scripting SQL string manipulation strings technology tips tools tutorial Ubuntu visual studio web web 2.0 web apps web services Windows xml
Blog at WordPress.com. | Theme: Quintus by Automattic.
Follow

Get every new post delivered to your Inbox.

Join 61 other followers

Powered by WordPress.com