I have a source object that looks like this:
private class SourceObject {
public Enum1 EnumProp1 { get; set; }
public Enum2 EnumProp2 { get; set; }
}
The enums are decorated with a custom [Description] attribute that provides a string representation, and I have an extension method .GetDescription() that returns it. How do I map these…
Hi I am building an internal app for my company using jQuery's autocomplete and am finding it tends to start off very slow. My assumption is that the bottle neck is perhaps adding its elements to the DOM since after the first query it seems to be substantially speedier. Does anyone know of a way to pre-load these elements on page load instead…
I am trying to create a simple WebSocket connection in JavaScript against my Rails app. I get the following:
WebSocket connection to 'ws://localhost:4000/' failed: Error during WebSocket handshake: 'Sec-WebSocket-Accept' header is missing
What am I doing wrong? Here is my code:
JavaScript:
var socket = new…
Hi all.
I hope everybody is doing fine.
I try to delete a virtual directory using WMi (Server Manager Class) and recreate with different values. The problem i am facing is that the virtual directory is not getting deleted. Please help. Here is my code.
Try
Using mgr As New ServerManager()
Dim site As Site…
I am working on an application that displays surface winds. Wind speed and direction will be displayed using "wind barb" symbols, as described here: Plotted Winds
My question: Are there any standards for the angles and lengths of the "flags" in relation to the the wind-barb "pole"?
Eyeballing the diagrams I've…
I need to programmatically generate an RTF document with a table that has a column vertically merged., e.x.
______________________________
| merged | foo | hello |
| cell | | |
| right |--------|----------|
| here | bar | world |
|_________|________|__________|
I looked up…
I am trying to deploy my little Catalyst web app using Plack/Starman. All the documentation seems to suggest I want to use this in combination with nginx. What are the benefits of this? Why not use Starman straight up on port 80?
What glBlendFunc should I use to ensure that the opacity of my drawing is always the same? When I use glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) and multiple images are drawn on top of each other, the result is more and more opaque until it's completely opaque after a certain number of imgaes.
The…
I was writing a program in C++ to find all solutions of a^b = c (a to the power of b), where a, b and c together use all the digits 0-9 exactly once. The program looped over values of a and b, and ran a digit-counting routine each time on a, b and a^b to check if the digits condition was satisfied.
…
All, I have a series of domain objects (project is NHibernate based). Currently as per 'good practice' they define only the business objects, comprising properties and methods specific to each objects function within the domain. However one of the objects has a requirement to send an SMTP message.…
I asked this question in the Ext JS forums, but I received no responses, so I am asking here.
I have a TreePanel (code below) that uses a TreeLoader and an AsyncTreeNode. In my API method specified by the TreeLoader's dataUrl, I return a JSON array to populate the tree.
This works great, of…
I am a software developer with devlopment experience in C#, C++ .Net alongwith SQL Server 2005/08, Oracle and mysql. But somehow i dont get jBASE to work at Windows XP SP3 machine.
My goal is setup user accounts, create database on a JBASE ainstallation, authenticate and backup/restore few…
Hi all,
I need to read a website's folders using WMI and C# in IIS 6.0. I am able to read the Virtual directories and applications using the "IISWebVirtualDirSetting" class. However the physical folders located inside a website cannot be read using this class.
And for my case i need to…
I'm attempting to use wget with the -p option to download specific documents and the images linked in the HTML.
The problem is, the site that is hosting the HTML has some non-html information preceding the HTML. This is causing wget to not interpret the document as HTML and doesn't…
I need to read a website's folders using WMI and C# in IIS 6.0. I am able to read the Virtual directories and applications using the "IISWebVirtualDirSetting" class. However the physical folders located inside a website cannot be read using this class.
And for my case i need to read…
hi all,
hope that everybody here is OK.
We are using VS 2008 as development tool, TFS 2008 as version control as well as build automation. Some of our developer use dbpro for databases changes and some use SQL Server management studio.
I am trying to automate build for Web…
Hi all
I am converting an ASP.Net 2.0 Project to compile for .Net Framework 3.5 and facing the following compiler error for assembly reference...
InternalXmlHelper.vb(9,0): error BC30560: 'ExtensionAttribute' is ambiguous in the namespace 'System.Runtime.CompilerServices'.…
I am writing an application which uses the Microsoft.Office.Interop.Excel assembly to export/import data from Excel spreadsheets. Everything was going fine (except for 1 based indexing and all those optional parameters!), until I tried to use conditional formatting. When I…
I'm developing a set of services using WCF. The application is doing dependency injection with Castle Windsor. I've added an IErrorHandler implementation that is added to services via an attribute. Everything is working thus far. The IErrorHandler object (of a class called…
I want to do something like this in a stored procedure:
IF case_sensitive = FALSE THEN
SET search_collation = "utf8_unicode_ci";
ELSE
SET search_collation = "utf8_bin";
END IF;
INSERT INTO TABLE1 (field1, field2)
SELECT * FROM TABLE 2 WHERE some_field LIKE '%rarf%'…
I am trying to display the 3 select fields that are rendered out using Django SelectDateWidget on one line. When I use crispy forms, they are all on separate rows. Is there a way to use the Layout helper to achieve this?
Thank you!
class WineAddForm(forms.ModelForm):…
I'm trying to perform a usort on an array inside an instance of a class. But the sort is dependent on the properties of said instance.
Code (which doesn't work):
class foo {
private $array;
private $key;
private $dir;
function sort() {
…