Archive for January, 2012:
filed in Programming, SQL on Jan.11, 2012
Method 1: Using a cursor declare cursor1 cursor local for select * from tablename open cursor1 fetch next from cursor1 into #temptable while @@fetch_status = 0 begin if exists (select column from tablename where id = (select id from #temptable)) begin /* do stuff here */ end else begin /* do other stuff here */ [...]
Tags: cursor, database, dbms, iterate, Programming, result set, SQL, table, temp, temporary
filed in Programming, SQL on Jan.11, 2012
Method 1: Using a cursor declare cursor1 cursor local for select * from tablename open cursor1 fetch next from cursor1 into #temptable while @@fetch_status = 0 begin if exists (select column from tablename where id = (select id from #temptable)) begin /* do stuff here */ end else begin /* do other stuff here */ [...]
Tags: cursor, cursors, database, dbms, iterate, Programming, result set, rows, SQL, table, temp, temporary
filed in Javascript, Programming on Jan.11, 2012
“JavaScript is an object oriented (OO) language, with its roots in the Self programming language, although it’s (sadly) designed to look like Java. This makes the language’s really powerful and sweet features stay covered by some pretty ugly and counter-intuitive work-arounds. One such affected feature is the implementation of prototypical inheritance. The concepts are simple [...]
Tags: javascript, object oriented, oop, Programming, tutorial, tutorials
filed in C/C++, Programming on Jan.08, 2012
“The C programming language was devised in the early 1970s as a system implementation language for the nascent Unix operating system. Derived from the typeless language BCPL, it evolved a type structure; created on a tiny machine as a tool to improve a meager programming environment, it has become one of the dominant languages of [...]
Tags: C#, history, language, Programming
filed in Tips on Jan.06, 2012
If you are logged into your machine with a username that doesn’t have access to a certain SQL Server database you can launch SQL Server Management Studio with different credentials. This allows you to use Windows Authentication with a different username when connecting to the database server. runas /user:DOMAIN\USERNAME “C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\Ssms.exe”
Tags: microsoft, sql server, tips
filed in Miscellaneous on Jan.04, 2012
“Go analog. (e.g. cooking, hiking, astronomy, etc.) Stay healthy. (e.g. weight loss, RSI, etc.) Embrace the uncomfortable. (e.g. stop using a mouse, use Dvorak, try a different OS, etc.) Learn a new programming language. (e.g. scala, erlang, haskell, OCaml, Prolog, etc.) Automate. (build a robot, lego mindstorms, arduino boards, shell scripting, etc.) Learn more mathematics. Focus [...]
Tags: new year, new year's, resolutions
filed in Hardware, Linux, Programming on Jan.04, 2012
“In the early days computers were much simpler. The various components of a system, such as the CPU, memory, mass storage, and network interfaces, were developed together and, as a result, were quite balanced in their performance. For example, the memory and network interfaces were not (much) faster than the CPU at providing data. This [...]
Tags: cache, linux, memory, Programming
filed in Miscellaneous on Jan.03, 2012
“As most software and creative professionals know, coffee is an important technology for boosting mental acuity and maintaining peak on-the-job performance. But did you also know that coffee can be a damn tasty beverage? It’s true. All you need is the appropriate amount of disrespect for the mainstream coffee industry and a desire to enjoy [...]
Tags: caffeine, coffee, productivity