Search Results

Search found 23 results on 1 pages for 'dagda1'.

Page 1/1 | 1 

  • Programmatically assigning an existing ssl cert to a website in iis6 via powershell or vbscript

    - by dagda1
    Hi, I have the following powershell script that creates a new website in IIS6: https://github.com/dagda1/iis6/blob/master/create-site.ps1 Does anyone know how I can assign an existing ssl cert to the website? I know I can set the port number using adsutil.vbs like this: cscript adsutil.vbs set w3svc/xxx/securebindings ":443:somewhere.com" But I am drawing a big blank when it comes to assigning an existing ssl certificate. Thanks Paul

    Read the article

  • Programmatically assigning an existing ssl cert to a website in iis6 via powershell or vbscript

    - by dagda1
    Hi, I have the following powershell script that creates a new website in IIS6: https://github.com/dagda1/iis6/blob/master/create-site.ps1 Does anyone know how I can assign an existing ssl cert to the website? I know I can set the port number using adsutil.vbs like this: cscript adsutil.vbs set w3svc/xxx/securebindings ":443:somewhere.com" But I am drawing a big blank when it comes to assigning an existing ssl certificate. Thanks Paul

    Read the article

  • Multiple urls to 1 website with a wild card ssl.

    - by dagda1
    Hi, At the moment, we have 27 single sites in IIS6, all with their own urls, all with the same subdomain, e.g. https://company1.mycompany.com https://company2.mycompany.com etc., etc. To further complicate things, there is 1 wild card certificate which deals with the subdomain *.mycompany.com and is assigned to each website. All these websites run under the same codebase. We want to consolidate all these websites into 1 website. Are there any issues with having a large number of host headers running under 1 IIS6 site or is there a better way of configuring the site? Thanks Paul

    Read the article

  • Html.DropDownListFor<> and complex object in ASP.NET MVC2

    - by dagda1
    Hi, I am looking at ASP.NET MVC2 and trying to post a complex object using the new EditorFor syntax. I have a FraudDto object that has a FraudCategory child object and I want to set this object from the values that are posted from the form. Posting a simple object is not a problem but I am struggling with how to handle complex objects with child objects. I have the following parent FraudDto object whcih I am binding to on the form: public class FraudDto { public FraudCategoryDto FraudCategory { get; set; } public List<FraudCategoryDto> FraudCategories { get; private set; } public IEnumerable<SelectListItem> FraudCategoryList { get { return FraudCategories.Select(t => new SelectListItem { Text = t.Name, Value = t.Id.ToString() }); } The child FraudCategoryDto object looks like this: public class FraudCategoryDto { public int Id { get; set; } public string Name { get; set; } } On the form, I have the following code where I want to bind the FraudCategoryDto to the dropdown. The view is of type ViewPage: <td class="tac"> <strong>Category:</strong> </td> <td> <%= Html.DropDownListFor(x => x.FraudCategory, Model.FraudTypeList)%> </td> I then have the following controller code: [HttpPost] public virtual ViewResult SaveOrUpdate(FraudDto fraudDto) { return View(fraudDto); } When the form is posted to the server, the FraudCategory property of the Fraud object is null. Are there any additional steps I need to hook up this complex object? Cheers Paul

    Read the article

  • Tail recursion in Erlang

    - by dagda1
    Hi, I am really struggling to understand tail recursion in Erlang. I have the following eunit test: db_write_many_test() -> Db = db:new(), Db1 = db:write(francesco, london, Db), Db2 = db:write(lelle, stockholm, Db1), ?assertEqual([{lelle, stockholm},{francesco, london}], Db2). And here is my implementation: -module(db) . -include_lib("eunit/include/eunit.hrl"). -export([new/0,write/3]). new() -> []. write(Key, Value, Database) -> Record = {Key, Value}, [Record|append(Database)]. append([H|T]) -> [H|append(T)]; append([]) -> []. Is my implementation tail recursive and if not, how can I make it so? Thanks in advance

    Read the article

  • Nested Model binding in ASP.NET MVC2. fields_for from rails equivalent

    - by dagda1
    Hi, I am looking for some examples of how to do model binding in ASP.NET MVC2 for COMPLEX objects. All the exmples I can find are of simple objects with no child collections or child objects. If I have an Expense object with a child ExpensePayment object. In rails, child objects are rendered with the HTML name attributes like this: expense[expense_payment][net] Rails uses fields_for to render child objects. How can I accomplish something similar in ASP.NET MVC2? Cheers Paul

    Read the article

  • Creating an AST node in Erlang

    - by dagda1
    Hi, I am playing about with Erlang and I am trying to write a simple arithmetic parser. I want to try and parse the following expression: ((12+3)-4) I want to parse the expression into a stack of AST nodes. When parsing this expression, I would first of all create a binary expression for the (12+3) expression which would look something like this in C#: var binaryStructure = new BinaryStructure(); binaryStructure.Left = IntegerLiteralExpression(12); binaryStructure.Right = IntegerLiteralExpression(4); binaryStructure.Operator = binaryExpression.Operator != BinaryOperatorType.Addition; I am quite new to Erlang and I am wondering how I would go about creating a structure like this in Erlang that I can place on a List that I would use as the stack of expressions. Can anyone suggest how to create such a tree like structure? Would a function be a good fit? Thanks Paul

    Read the article

  • Erlang code explained

    - by dagda1
    Hi, I am having a bit of trouble getting my head around the following erlang code -module(threesix). -export([quicksort/1]). quicksort(Pivot, Left, Right, []=_Src) -> {Left, Pivot, Right}; quicksort(Pivot, Left, Right, [H|T]=_Src) when H < Pivot -> quicksort(Pivot, [H|Left], Right, T); quicksort(Pivot, Left, Right, [H|T]=_Src) -> quicksort(Pivot, Left, [H|Right], T). quicksort([]) -> []; quicksort([H|T]=_List) -> {Left, Pivot, Right} = quicksort(H, [], [], T), quicksort(Left) ++ [Pivot] ++ quicksort(Right). I am specifically talking about the use of _Src and _List in the parameters. Are these simply for documentation as I cannot see why they are used? Thanks Paul

    Read the article

  • Erlang code critique

    - by dagda1
    Hi, I am trying to get my head round some basic erlang functionality and I could do with some comments on the following. I have the following erlang code that takes a list of tuples and returns a list minus an element if a key is found: delete(Key, Database) -> remove(Database, Key, []). remove([], Key, Acc) -> Acc; remove([H|T], Key, Acc) -> if element(1, H) /= Key -> [H| remove(T, Key, Acc)]; true -> remove(T, Key, Acc) end. Is this a good way of doing this? The if statement seems incorrect. Also is my use of the accumulator Acc making this tail recursive? Cheers Paul

    Read the article

  • Overuse of guards in Erlang?

    - by dagda1
    Hi, I have the following function that takes a number like 5 and creates a list of all the numbers from 1 to that number so create(5). returns [1,2,3,4,5]. I have over used guards I think and was wondering if there is a better way to write the following: create(N) -> create(1, N). create(N,M) when N =:= M -> [N]; create(N,M) when N < M -> [N] ++ create(N + 1, M). Thanks, Paul

    Read the article

  • How to set up my belongs_to and has_many reference

    - by dagda1
    Hi, I have an ExpenseType object that I have created with the following migration: class CreateExpenseTypes < ActiveRecord::Migration def self.up create_table :expense_types do |t| t.column :name, :string, :null => false t.timestamps end end I can see the table name is the pluralised expense_types. My question is, how do I reference this type in a belongs_to relationship? Is it: belongs_to :expensetype or is it belongs_to :expense_type I do not seem able to set it up correctly. Cheers

    Read the article

  • Signing an unsigned assembly

    - by dagda1
    The recent upgrade of NHibernate 2.1 has brought a mega headache situation to the surface. It seems most of the projects build by default as signed assemblies. For example fluentnhibernate references the keyfile fluent.snk. Nhibernate.search builds unsigned from what I can gather and will not build signed that is if you reference a generated keyfile, you get the error: Referenced assembly 'Lucene.Net' does not have a strong name This means projects like castle.activerecord that have nhibernate.search as a dependency will not build as you get the horrendous error referenced assembly nhibernate.search does not have a strong name: Quite a few projects use caslte.activerecord so it is quite important that this builds. Has anyone any idea what to do here as I am totally out of ideas? This is complete madness.

    Read the article

  • REXML Formatting issues

    - by dagda1
    Hi, I am using REXML to edit an xml file but have ran into difficulties with formatting. My original code looked like this: file = File.new( destination) doc = REXML::Document.new file doc.elements.each("configuration/continuity2") do |element| element.attributes["islive"] = "true" element.attributes["pagetitle"] = "#{@client.page_title}" element.attributes["clientname"] = "#{@client.name}" end doc.elements.each("configuration/continuity2/plans") do |element| element.attributes["storebasedir"] = "#{@client.store_dir}" end I first of all had to add the following code as REXML was adding single quotes instead of double quotes. I found the following via google: REXML::Attribute.class_eval( %q^ def to_string %Q[#@expanded_name="#{to_s().gsub(/"/, '&quot;')}"] end ^ ) I also have a problem in that REXML is reformatting the document. are there ways to stop this? Cheers Paul

    Read the article

  • Eunit Expected Exception

    - by dagda1
    Hi, Is there a way in Eunit to test whether an exception has been thrown under certain cicumstances? Say I have a function sum like this: sum(N, M) when N > M -> throw({"start is bigger than end", N, M}); sum(N, M) when N =:= M -> N; sum(N, M) when N =< M -> N + sum(N + 1, M). Can I test that if N is bigger than M then an exception is thrown? Cheers Paul

    Read the article

  • Is F# a poor choice for a functional language

    - by dagda1
    Hi, To me, I think F# is a bad choice due to the fact that it uses threads behind the scenes. To me, threads are too "heavy" due to things like context switching. I can see why Erlang is a good choice because it uses light weight processes. Am I wrong? Cheers Paul

    Read the article

  • Nokogiri changing custom elements

    - by dagda1
    Hi, I have sample html that I have marked up with some special tags that will be used by a different program, an example of the html is below. You should note the <START:organization>..<END> elements. <html> <head/> <body> <ul> <li> <START:organization> Advanced Integrated Pest Management <END> </li> <li> <START:organization> American Bakers Association <END> </li> </ul> </body> </html> I wanted to use nokogiri to preprocess the html to easily remove irrelevant tags like <script>. I created the following extension to the nokogiri document class: module Nokogiri module HTML class Document def prepare_html xpath("//script").remove to_html.remove_new_lines end end end end The problem is that nokogiri is changing the <START:organization> element to <organization>. Is there anyway that I can preserve the htnl to maintain my custom markup tags? Thanks Paul

    Read the article

  • lists:keyfind problems

    - by dagda1
    Hi, I cannot for the life of me get lists:keyfind to work as I expect in Erlang. I have the following eunit test: should_find_key_test() -> NewList = lists:keystore("key", 1, [], {"key", "value"}), Value = case lists:keyfind("key", 1, NewList) of false -> notfound; {_key, _value} -> _value end, ?debugVal(Value). Whenever I run this test I get the following error message: indextests:should_find_key_test (module 'indextests')...failed ::error:undef in function lists:keyfind/3 called as keyfind("key",1,[{"key","value"}]) in call from indextests:should_find_key_test/0 Can anyone see what I am doing wrong? Is it saying that lists:keyfind no longer exists? Cheers Paul

    Read the article

  • Using FlexMock in a rails functional test.

    - by dagda1
    Hi, I have the following index action: class ExpensesController < ApplicationController def index() @expenses = Expense.all end end I want to mock the call to all in a functional test. I am using flexmock and have written the following test: require 'test_helper' require 'flexmock' require 'flexmock/test_unit' class ExpensesControllerTest < ActionController::TestCase test "should render index" do flexmock(Expense).should_receive(:all).and_return([]) get :index assert_response :success assert_template :index assert_equal [], assigns(:presentations) end end The problem is the the last assertion fais with the following error message: <[] expected but was nil I am confused what I am doing wrong. Should this not work? Cheers Paul

    Read the article

  • Best solution for a windows service with constant running threads in C# 4.0

    - by dagda1
    Hi, I want to create a windows service that will create x number of threads that wake up every x number of minutes and do some work. I think the task scheduling or parallel framework is a bad fit for this type of work as it is best suited for work that starts, completes and finishes rather than is constant. Should I look at utilising a thread pool for this approach or does anyone have any advice for a good solution? Thanks Paul

    Read the article

  • Convert Json date string to JavaScript date object

    - by dagda1
    Hi, I have the following JSON object which has a date field in the following format: { "AlertDate": "\/Date(1277334000000+0100)\/", "Progress": 1, "ReviewPeriod": 12 } I want to write a regular expression or a function to convert it to a javascript object so that it is in the form: { "AlertDate": "AlertDate":new Date(1277334000000), "Progress": 1, "ReviewPeriod": 12 } The above date format fails validation in the JQuery parseJSON method. I would like to convert the 1277334000000+0100 into the correct number of milliseconds to create the correct date when eval is called after validation. Can anyone help me out with a good approach to solving this? Cheers Paul

    Read the article

  • Ember - ConnectOutlet - when does view change from preRender to inDom

    - by dagda1
    I am trying to get my head round the connectOutlet method and when a view that is returned from connectOutet is actually inserted into the DOM. The view that is created in connectOutlet leaves connectOutlet in the preRender state. connectOutlet: function(name, context) { // method body view = this.createOutletView(outletName, viewClass); if (controller) { set(view, 'controller', controller); } set(this, outletName, view); return view; } I've not tracked down where or when the view is inserted into the Dom and the view transitions to the inDom state. I suspect the runloop is at play and it transitions after the current runloop has finished. Can anyone shed any light on this?

    Read the article

1