How to design extensible software (plugin architecture)? [closed]

IF we’re talking .NET, try Scripting .NET applications with VBScript over on CodeProject. Lots of concrete examples there. Below are sites implementing various application extension techniques ClearScript – Makes V8, VBScript and JScript available to .NET apps CS-Script – The C# Script Engine Plugin Architecture using C# Opinio plugin architecture Notes on the Eclipse Plug-in … Read more

How to use relative paths without including the context root name?

If your actual concern is the dynamicness of the webapp context (the “AppName” part), then just retrieve it dynamically by HttpServletRequest#getContextPath(). <head> <link rel=”stylesheet” href=”https://stackoverflow.com/questions/4764405/${pageContext.request.contextPath}/templates/style/main.css” /> <script src=”${pageContext.request.contextPath}/templates/js/main.js”></script> <script>var base = “${pageContext.request.contextPath}”;</script> </head> <body> <a href=”${pageContext.request.contextPath}/pages/foo.jsp”>link</a> </body> If you want to set a base path for all relative links so that you don’t need to … Read more

How to combine imported and local resources in WPF user control

I figured it out. The solution involves MergedDictionaries, but the specifics must be just right, like this: <UserControl.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source=”ViewResources.xaml” /> </ResourceDictionary.MergedDictionaries> <!– This works: –> <ControlTemplate x:Key=”validationTemplate”> … </ControlTemplate> <style x:key=”textBoxWithError” TargetType=”{x:Type TextBox}”> … </style> … </ResourceDictionary> </UserControl.Resources> That is, the local resources must be nested within the ResourceDictionary tag. So the … Read more

What are some good resources for writing a chess engine? [closed]

From my archives: This is a useful chess programming wiki. This is a simple introduction to chess programming. This is a (free) book on chess algorithms. This contains several easy step-by-step YouTube tutorial series’ ranging from beginner to advanced level. This is a more advanced introduction. This is Adam Berent’s interesting computer chess blog. This … Read more

Getting a list of files in the Resources folder – iOS

You can get the path to the Resources directory like this, NSString * resourcePath = [[NSBundle mainBundle] resourcePath]; Then append the Documents to the path, NSString * documentsPath = [resourcePath stringByAppendingPathComponent:@”Documents”]; Then you can use any of the directory listing APIs of NSFileManager. NSError * error; NSArray * directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:documentsPath error:&error]; Note … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)