Uploaded October 2012 | Updated September 2026, 2 weeks ago
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By jayanth.kurup@techytube, for more from this author visit:
techytube.com/author/jayanth.kurup
In this video we explore how to create a server side trace using the inbuilt stored procedures available within MS SQL Server. We explore how to make this job easy by creating a trace template using the profiler tool and then implementing this within SQL Server. We will also explore how to get the details on which traces are running on a server as well as how to query data from within a trace file. A server side trace is a great tool for DBAs who do not want to implement profiler because of the huge resource requirements it has on the network especially when collecting large volumes of data. Stored procedures give a more fine grained control over when the trace starts and stops especially when scheduled via SQL Server agent. These and many other advantages make server side trace the preferred option for most DBAs.
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By jayanth.kurup@techytube, for more from this author visit:
techytube.com/author/jayanth.kurup
In this video we explore how to create a server side trace using the inbuilt stored procedures available within MS SQL Server. We explore how to make this job easy by creating a trace template using the profiler tool and then implementing this within SQL Server. We will also explore how to get the details on which traces are running on a server as well as how to query data from within a trace file. A server side trace is a great tool for DBAs who do not want to implement profiler because of the huge resource requirements it has on the network especially when collecting large volumes of data. Stored procedures give a more fine grained control over when the trace starts and stops especially when scheduled via SQL Server agent. These and many other advantages make server side trace the preferred option for most DBAs.










![How to create a custom cell programmatically in iOS
Subscribe to our channel here for notifications on new video trainings. For more videos on technology, visit our website at http://www.techytube.com.
By pavel@techytube, for more from this author visit:
http://www.techytube.com/author/pavel
A cell in a UITableView is an object of UITableViewCell class, and can have one of four styles, which are:
UITableViewCellStyleDefault, UITableViewCellStyleSubtitle, UITableViewCellStyleValue1, and UITableViewCellStyleValue2, and you can use those according to your apps specifications, or you can create your custom cells.
In this video tutorial we will create a custom cell programmatically. For that we have to do most of our work in the tableView:cellForRowAtIndexPath: method. First we need a dataSource to populate the cell with info, so declare a private property for that, in the VieController.m file, just after the #import statement:
@interface ViewController ()
@property (nonatomic, retain) NSMutableArray *dataSource;
@end
Then, in the viewDidLoad method allocate and initialise that:
self.dataSource = [NSMutableArray array];
[self.dataSource addObject:[NSArray arrayWithObjects:@20, @JUN, @7:00PM, @Toyota Center, @Houston, TX, @FROM, @$200, nil]];
[self.dataSource addObject:[NSArray arrayWithObjects:@6, @JUL, @8PM, @Frank Erwin Center, @Austin, TX, @FROM, @$350, nil]];
In the tableView:numberOfRowsInSection: method return self.dataSource.count.
In the tableView:cellForRowAtIndexPath: method write:
// Each subview in the cell will be identified by a unique tag
static NSUInteger const kDayLabelTag = 2;
static NSUInteger const kMonthLabelTag = 3;
// ... and so on
static NSString *CellIdentifier = @Cell;
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
UILabel *dayLabel;
UILabel *monthLabel;
// ... and so on
if (cell nil)
{
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIdentifier];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
// Define the frames for each component of the Cell
CGRect dayFrame = CGRectMake(5, 7, 64, 30);
CGRect monthFrame = CGRectMake(5, 35, 64, 16);
// ... and so on
// Adjust all the controls correspondingly
dayLabel = [[UILabel alloc] initWithFrame:dayFrame];
dayLabel.tag = kDayLabelTag;
dayLabel.font = [UIFont boldSystemFontOfSize:30.0f];
dayLabel.backgroundColor = [UIColor clearColor];
dayLabel.textColor = [UIColor darkGrayColor];
dayLabel.textAlignment = NSTextAlignmentCenter;
monthLabel = [[UILabel alloc] initWithFrame:monthFrame];
monthLabel.tag = kMonthLabelTag;
monthLabel.font = [UIFont boldSystemFontOfSize:16.0f];
monthLabel.backgroundColor = [UIColor clearColor];
monthLabel.textColor = [UIColor colorWithRed:0.0f/255.0f
green:140.0f/255.0f
blue:220.0f/255.0f
alpha:1.0f];
monthLabel.textAlignment = NSTextAlignmentCenter;
// ... and so on
// Add all created components to the new Cell
[cell.contentView addSubview:dayLabel];
[cell.contentView addSubview:monthLabel];
// ... and so on
}
else
{
// A reusable cell was available, so we just need to get
// a reference to the subviews using their tags
dayLabel = (UILabel *) [cell.contentView viewWithTag:kDayLabelTag];
monthLabel = (UILabel *) [cell.contentView viewWithTag:kMonthLabelTag];
}
NSArray *cellInfoArray = [self.dataSource objectAtIndex:indexPath.row];
dayLabel.text = [cellInfoArray objectAtIndex:0];
monthLabel.text = [cellInfoArray objectAtIndex:1];
return cell; How to create a custom cell programmatically in iOS](https://i.ytimg.com/vi/FTt7doXcYjc/mqdefault.jpg)