Skip to content

Instantly share code, notes, and snippets.

View PilotBob's full-sized avatar

Bob Archer PilotBob

View GitHub Profile
@PilotBob
PilotBob / gist:400100
Created May 13, 2010 17:22
Create Silverlight tabItems and add user controls to it dynamically.
void PopulateDashBoard(object sender, EventArgs e)
{
LoadOperation<UserSnapin> op = sender as LoadOperation<UserSnapin>;
_entities = op.Entities;
string currentPage = String.Empty;
TabItem tabItem;
Canvas tabCanvas = null;
foreach (var UserSnapin in _entities)
{
Theme.SetApplicationThemeUri(Application.Current, new Uri(@"System.Windows.Controls.Theming.ShinyBlue.xaml"));
also tried:
Theme.SetApplicationThemeUri(Application.Current, new Uri(@"AmsiSL;System.Windows.Controls.Theming.ShinyBlue.xaml"));
@PilotBob
PilotBob / gist:959677
Created May 6, 2011 20:02
Looking for cleaner LINQ to XML solution
public System.Xml.XmlDocument BuildMenu(System.Xml.XmlDocument xdoc)
{
ApplicationLog.WriteTrace("AmsiWebMenuProvider::BuildMenu -- start");
var context = new Amsi.Model.Config.ConfigEntities();
Guid currentDatabase = Guid.Parse(UserState.DefaultDatabase);
var databaseRecords = (from database in context.Databases.Include("EvolutionModule")
where database.ID_DatabaseSet == currentDatabase
select database).ToList<Amsi.Model.Config.Database>();
@PilotBob
PilotBob / gist:1420498
Created December 1, 2011 22:54
Razor parsing error
@if (Model.Property.AddressBookMain != null) {
@Html.Partial("_address", Model.Property.AddressBookMain)
}
@if (Model.Property.AddressBookMail != null) {
@Html.Partial("_address", Model.Property.AddressBookMail)
}
@if (Model.Property.AddressBookBill != null) {
@Html.Partial("_address", Model.Property.AddressBookBill)
}
$("[id$=eFinBudget]").autocomplete({
source: function (request, response) {
$.ajax({
url: baseUrl + 'eFinancials/Lookup/BudgetVersionsForEntity',
data: {
term: request.term,
entity: $("#EntityKey").val(),
fiscalYear: $(this).closest("tr").find("input[id$=FiscalYear]").val()
},
success: function (data, status, xhr) { response(data); }
ProFTPD Version 1.3.3a
bob1:/etc/proftpd# proftpd -l
Compiled-in modules:
mod_core.c
mod_xfer.c
mod_auth_unix.c
mod_auth_file.c
mod_auth.c
mod_ls.c
mod_log.c
RailsAutoDetect off
<VirtualHost *>
ServerAdmin webmaster@localhost
ServerName bob.archer.net
DocumentRoot /var/www/drupal
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
[Sun Apr 01 22:30:42 2012] [error] [client 173.65.62.184] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://bob.archer.net/neal
GLEntity
KeyGuid Guid
EntityID String
ConsolHeader
KeyGUID Guid
TableID string
function AutoCompleteGetIdValue(elem) {
var testValue = $(elem).val();
var id;
$(elem).data().autocomplete.widget().children(".ui-menu-item").each(function () {
var item = $(this).data("item.autocomplete")
if (item.value == testValue) {
alert(item.id);
id = item.id;
}
});