Hi,
I have written a very simple control. C# Visual Studio 2008. Its output should be, and is a dll. I have added a reference to the dll within the project that I intend to use it with. The msdn article about how to write a control states that it should appear in the 'Add reference / projects' list, which it doesn't but I simply navigated to…
I have map.resources :posts and I want to be able to serve post bodies in markdown format. So I set up my respond_to block:
respond_to do |format|
format.markdown {
render :text => @post.body.to_s
}
end
But when I try to access /posts/1234.markdown, I get this error:
NameError (uninitialized constant Mime::MARKDOWN):
…
So I found this countdown at http://davidwalsh.name/jquery-countdown-plugin, I altered it a little bit:
jQuery.fn.countDown = function(settings,to) {
settings = jQuery.extend({
duration: 1000,
startNumber: $(this).text(),
endNumber: 0,
callBack: function() { }
}, settings);
return…
Why does the DataTemplate line break the WPF designer in Visual Studio 2008?
The program compiles and runs properly. The DataTemplate is applied as it should. However the entire DataTemplate block of code is underlined in red, and when I simply "build" the program without running, I get the error "Type reference cannot find…
Classes that implement IEnumerable and provide a public void Add(/* args */) function can be initialized like in the following example:
List<int> numbers = new List<int>{ 1, 2, 3 };
which calls the Add(int) function 3x after initializing the List<int>.
Is there a way to define this behavior explicitly…
I added a new query to a table adapter in a DataSet. This query adds another field to the query whcih is a sum from another table.
Here is the full query:
SELECT (SELECT COUNT(donationID) AS Expr1 FROM Donations AS da WHERE (dn.donorID = donorID)) AS Count, Solicitor, address1, address2, city, companyName, country,…
I have a class that contains two sets. They both contain the same key type but have different compare operations.
I would like to provide an iterator for the class that iterates through the elements of both sets. I want to start with one set, then when I increment an iterator pointing to the last element of the…
Hello i am using a resized version of this marker( http://www.clker.com/clipart-orange-pin-4.html ) for showing markers in google maps on android.
The problem is i don't know how to make the marker point match the coordinates.
The arrow point is at about 1/5 of the Width coordinates and MAX of the Height.
here…
how can i deny access to call method. something like this
[HandleError]
[Authorize(Roles = "role1, role2")]
public class AdminController : Controller
{
[Deny(Roles = "role2")]
public ActionResult ResultPage(string message)
{
ViewData["message"] =…
I had a crazy thought about writing my own MSSQL driver to make it work something like non-blocking http client, so it won't be thread thirsty and could handle lots of db queries within one thread.
I tried to look over google for some guidelines about implementing MSSQL client protocol, but found none really,…
Hi Gurus,
i am downloading tiff images from WAMP server using our Flex AIR client.
Using the following code for that.
public static function requestDownload(id:int, defaultName:String):void {
//POST params
var urlVars:URLVariables = new URLVariables();
urlVars.action =…
I have a Django Form that looks like this:
class ServiceForm(forms.Form):
option = forms.ModelChoiceField(queryset=ServiceOption.objects.none())
rate = forms.DecimalField(widget=custom_widgets.SmallField())
units = forms.IntegerField(min_value=1, widget=custom_widgets.SmallField())
def…
Hello
I want to change default post search order to order:
sample cat 1
sample post from cat 1
sample post from cat 1
sample cat 2
sample post from cat 2
sample post from cat 3
sample cat 3
etc..
So... I want to define category order and in search results will be sorted for this order and in…
Hello i wish to be able to deploy a PHP web application along with a local installation of PEAR.
To be more specific, i am trying to find a way to do a 'per-application' or local installation of PEAR if this is possible.
For example:
The application 'MyApplication' is located in:…
Here is an example of what i want to do
The Url will be as follow
http://www.example.com/en/us/directory/companies/view/4433225.html
Where is
en: is the lang
us: is the country
directory: is the module
companies: is the controller
view: is the action
4433225.html: is sort of…
For all those ligthning fast shop users. I'm trying to implement my own first page view that will list all products from shop ( under '/' address). So I have a template :
{% extends "lfs/shop/shop_base.html" %}
{% block content %}
<div id="najnowsze_produkty">
…
Hello there. I have an existing class that has methods to deserialise from XML in my code. Now I need to create correct CoreData model from that class. It's objects will be created not only from CoreData storage but also by deserializing XML (somehow like
…
So the method below in class_eval dynamically creates accessors for attributes defined at runtime. It can be used, for example, to create configuration objects with attributes read from a config file (and unknown until runtime). I understanding all of it…
Is there a service (Yahoo Pipes?) that I can set this up quickly with?
basically I want to post pushes into Kiln (Mercurial) into a Campfire chat room.
I am writing a gem which provides helpers for views. The HTML I want to insert via the helper is complex enough that I'd rather write it in a _partial.html.erb file. How do I get the gem's view path include in the application's load_path?
Note: the only…
Hi. I'm having trouble deserializing a ruby class that I wrote to YAML.
Where I want to be
I want to be able to pass one object around as a full 'question' which includes the question text, some possible answers (For multi. choice) and the correct…
I want to use a color picker in my wpf application and I saw a nice looking one on this codeproject page. The control works fine until I want to connect the control to a viewmodel.
I created a small test program with this viewmodel:
public class…
I see with the Castle validators I can use a length validation attribute.
[ValidateLength(6, 30, "some error message")]
public string SomeProperty { get; set; }
I am trying to find a MinLength only attribute is there a way to do this…