Quantcast
Channel: Rob Bamforth's Blog
Browsing all 35 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

SQL – How to get the status of an SQL job (sp_help_job)

  Here is a simple script using sp_help_job to display information about jobs that are used by SQL Server Agent: USE msdb EXEC dbo.sp_help_job @JOB_NAME = ‘JOB_NAME’, @job_aspect=‘JOB’ Look for...

View Article


Image may be NSFW.
Clik here to view.

SQL – Check If A Table Exists

Check if a table exists in a database: IF OBJECT_ID(‘database.dbo.table’) > 0 BEGIN    //Code to run if table exists. e.g. delete table.    //drop table database.dbo.table END    

View Article


Image may be NSFW.
Clik here to view.

Where does DisplayRecorder save the videos in your iPhone?

SFTP: /private/var/mobile/Library/Keyboard/DisplayRecorder

View Article

Image may be NSFW.
Clik here to view.

SFTP iPhone photo location

/private/var/mobile/Media/DCIM/100APPLE

View Article

Image may be NSFW.
Clik here to view.

Mac OSX – How to switch between windows of same application

You can switch between different applications by using the keyboard shortcut [ Apple + tab ]. Switching between Safari and XCode for example. This is an invaluable time saving shortcut. But what about...

View Article


Image may be NSFW.
Clik here to view.

SQL – How to strip out all non-alphabetic characters from string

Create the following function to strip out non-alphabetic characters from a string in a SQL statement: CREATE Function [dbo].[RemoveNonAlphaCharacters](@Temp VarChar(1000)) Returns VarChar(1000) AS...

View Article

Image may be NSFW.
Clik here to view.

SQL – How to round a float to 2 (or any) decimal places

You can use the str() function to trim a float value to X number of places: STR ( float_expression [ , length [ , decimal ] ] ) Example for a Total of 7 characters with 2 to the right of the decimal...

View Article

Image may be NSFW.
Clik here to view.

iPhone – The ultimate and best iPhone theme for jailbroken iPhone (Cydia...

  So here is my ultimate theme for iPhone. I use it on my iPhone 4 running iOS 5.0.1. If you’re running an older version of iOS or a different device feel free to give it a go a let me know how it...

View Article


Image may be NSFW.
Clik here to view.

iOS – How long do Apple take to review your iPhone app?

  LAST UPDATED: 04/01/2013   This is a difficult question to answer considering the varied range of complexities involved in testing an iPhone application. I can however share my experience using...

View Article


Image may be NSFW.
Clik here to view.

Mac OSX (Snow Leopard) – How to sync iCal with iCloud calendar

  If you’re running MAC OS 10.6 Snow Leopard you can still sync iCal with your iCloud calendar by adding a CalDAV account in iCal preferences. • Start iCal and open preferences ( ⌘, ) • Select the...

View Article

Image may be NSFW.
Clik here to view.

Java – How to scroll to a particular component in jScrollPane and gain focus

Pragmatically scrolling to a particular point in jScrollPane can be tricky, particularly if you have nested panels or layered panes. Here’s a piece of code I find myself using time and time again to...

View Article

Image may be NSFW.
Clik here to view.

SQL – How to Update and Select in the same query

The OUTPUT clause Returns information on each row affected by an INSERT, UPDATE, DELETE, or MERGE statement. These results can be returned to the processing application for further use. The following...

View Article

Image may be NSFW.
Clik here to view.

SQL Server SSMS Saving changes is not permitted

You may receive this dialogue if you’re using a fresh install of SSMS, or after an upgrade. It simply means your environment hasn’t been configured to allow certain changes which require the dropping,...

View Article


Image may be NSFW.
Clik here to view.

JAVA – How To Bundle A Java App As An Windows Executable EXE (.jar to .exe)

This question comes up time and time again and there are two programs that I frequently use to build my compiled Java apps into a Windows Executable files. This, of course, limits the environments in...

View Article

Image may be NSFW.
Clik here to view.

SQL – The EXECUTE permission was denied on Stored Procedure

The EXECUTE permission was denied on the object ‘STORED_PROC’, database ‘MYDB’, schema ‘dbo’ This massage is received when the SQL Server account under which you make the request doesn’t have...

View Article


Image may be NSFW.
Clik here to view.

SQL – View SQL Server Database Mail Log (All / Successful / Failed)

SQL Server keeps a log of mail sent via Database Mail and the sp_send_dbmail Stored Procedure. I find these code snippets useful to view mail history including sent and failed items. You can view...

View Article

Image may be NSFW.
Clik here to view.

Mac OSX – How to switch between windows of same application

You can switch between applications by using the keyboard shortcut [ Apple + tab ]. Switching between Safari and XCode for example. This is an invaluable time saving shortcut. But what about switching...

View Article


Image may be NSFW.
Clik here to view.

SQL – How To Return Ref of Inserted Row

It is extremely useful to return the URN, or any other field, of a newly inserted row for a given table in a single query. The OUTPUT clause makes this possible. insert into MY_TABLE (Field_1, Field_2,...

View Article

Image may be NSFW.
Clik here to view.

Mac OSX – How To Connect To A Remote Mac Using Apple Screen Sharing, For Free!

This article describes how to remote view another Mac using Apple Screen Sharing. There is no need to run any third party software as it can all be done using apple’s built in Screen Sharing services,...

View Article

Image may be NSFW.
Clik here to view.

Java – Round Double To Two Decimal Places

Round a double value to a given number of decimal places. double longNumber = 25.3713789; // TWO DECIMAL PLACES DecimalFormat df = new DecimalFormat(“0.0#”); String roundedNumber =...

View Article
Browsing all 35 articles
Browse latest View live