ASP.NET C#: Check to see if Session variable exists
Test to see if it DOES exist if(Session["Name"]!=null){ // It does exist, so do stuff! } OR test if it DOESN’T exist if(Session["Name"]==null){ // It doesn’t exist! }
Test to see if it DOES exist if(Session["Name"]!=null){ // It does exist, so do stuff! } OR test if it DOESN’T exist if(Session["Name"]==null){ // It doesn’t exist! }
There is a way to install multiple versions of Ruby on Windows, just like the famed RVM for Linux. It is called Pik. A fantastic piece of software, yet I got some “There was an error. Error: can’t dup NilClass” messages while trying to use it at first. To avoid that, and fix it if [...]
Version control. It is like the depends of code, so your code doesn’t go leaking on every fire hydrant and tree from here to work. Every code monkey who hacks like a motha needs some sort of backup plan, a system of code change recovery. Git is the ticket. Subversion is way more confusing and [...]
If you’ve been WEBrick-rolled by Ruby’s WEBrick server, it is stuck and you can’t CTRL+C out of it, here is what you do — on a Linux system (I’m using Ubuntu): 1 ps aux | grep ruby You’ll get back a response like this: 2 3 # Never gunna give you up…haha, I got you. [...]
If you are trying to run ruby, and you get some wacked out error saying something about “No such file to load” here is what you do: Open up a terminal window (usually in Accessories, then Terminal on Ubuntu systems) Then type this, hitting enter after each line and waiting for it to return with [...]