Search Results

Search found 180 results on 8 pages for 'chester boo'.

Page 1/8 | 1 2 3 4 5 6 7 8  | Next Page >

  • Python3 function annotations for type hinting versus Boo

    - by b0lt
    I've started on a medium-sized project in python, and I decided to use python 3 because I'm not using any large external libraries and py3k has some nice new syntactic sugar and more importantly function annotations. However, it seems like none of WingIDE, Pydev, or pycharm actually have any support for type hinting using function annotations. If I want something resembling static typing in python, is switching to boo a reasonable option?

    Read the article

  • How to create nested macro in BOO

    - by Neo
    Hi, I am creating nested macros in BOO, I wrote this program: macro text: macro subMacro: text["Text"] = "Hello World" return [| block: System.Console.WriteLine( "Hello World" ); |] But I am getting the error "Unknown Identifer: 'text'" in the 3rd line of the code.

    Read the article

  • Boo: Explicitly specifying the type of a hash

    - by Kiv
    I am new to Boo, and trying to figure out how to declare the type of a hash. When I do: myHash = {} myHash[key] = value (later) myHash[key].method() the compiler complains that "method is not a member of object". I gather that it doesn't know what type the value in the hash is. Is there any way I can declare to the compiler what type the keys and values of the hash are so that it won't complain?

    Read the article

  • Type problem with Observable.Create from Boo

    - by Tristan
    I'm trying to use Reactive Extensions from Boo and am running into type problems. Here's the basic example: def OnSubscribe(observer as IObservable[of string]) as callable: print "subscribing" def Dispose(): print "disposing" return Dispose observable = System.Linq.Observable.Create[of string](OnSubscribe) observer = System.Linq.Observer.Create[of string]({x as string | print x}) observable.Subscribe(observer) The Subscribe here gives a System.InvalidCastException: Cannot cast from source type to destination type. The issue appears to be with how I'm creating the observable, but I've struggled to see where the type problem arises from. Ideas?

    Read the article

  • How can I import the System.Linq namespace to Boo?

    - by OmiD Rezaei
    When I try to import the System.Linq namespace to Boo compiler, I get this error: Boo.Lang.Compiler.CompilerError: Namespace 'System.Linq' not found, maybe you forgot to add an assembly reference? I use "Rhino.DSL.dll" and my DSL engine code is here: public class MyDslEngine : DslEngine { protected override void CustomizeCompiler(BooCompiler compiler, CompilerPipeline pipeline, string[] urls) { pipeline.Insert(1, new AnonymousBaseClassCompilerStep(typeof(DslBase), "Prepare", "System.Linq", "Azarakhsh.Framework.Repository" //it's my repository framework )); pipeline.Insert(2, new UseSymbolsStep()); pipeline.Insert(3, new RunScriptCompilerStep()); } }

    Read the article

  • How to make a text box in a command line window?

    - by The.Anti.9
    I'm working with .NET (specifically Boo, but answers would work in C# too) and I want to know how I could create an editable box inside the command line, such that I could display a section of output in the top part of the command line, and have a one line box at the bottom for input, much like the program irssi (the IRC client) does. I assume this is possible with .NET, how would I approach this?

    Read the article

  • Can a Domain Specific Language (DSL) be localized?

    - by michielvoo
    I have never written a DSL, but I am considering it as a feature for a new project (hypothetical). It would be for end users to be able to express in natural language concepts such as weekdays between 10 and 11 except on the first monday of the month. Dutch users might write weekdagen tussen 10 en 11 behalve op de eerste maandag van de maand. In this case the position of the words seems to match, but there may be expressions where the position of verbs/nouns etc. could be different between languages. I realise the obvious answer (it depends). I am a .NET developer and I consider using Boo but I'm open to suggestions. I need to understand wether each translation requires rewriting a part of the implementation (which part) or if there is a way to do actual translations, maybe in some sort of preprocessor. Thanks!

    Read the article

  • Chester Devs Presentation and source code – ‘Event Store - an introduction to a DSD for event sourcing and notifications’

    - by Liam Westley
    Originally posted on: http://geekswithblogs.net/twickers/archive/2013/11/11/chester-devs-presentation-and-source-code-ndash-lsquoevent-store.aspxThank you everyone at Chester Devs Thanks to Fran Hoey and all the people from Chester Devs. It was a hard drive up and back but the enthusiasm of the audience, with some great questions does make it worthwhile. Presentation and source code My presentation, source code, Event Store runners and text files containing the various command line parameters used for curl is now available on GitHub; https://github.com/westleyl/ChesterDevs-EventStore. Don’t worry if you don’t have a GitHub account, you don’t need one, you can just click on the Download Zip button on the right hand menu to download all the files as a single ZIP file.  If all you want is the PowerPoint presentation, go to https://github.com/westleyl/ChesterDevs-EventStore/blob/master/Powerpoint/Huddle-EventStore.pptx, and click on the View Raw button. Downloading and installing Event Store and Tools Download Event Store http://download.geteventstore.com – I unzipped these files into C:\EventStore\v2.0.1 Download Curl from http://curl.haxx.se/download.html – I downloaded Win64 Generic (with SSL) and unzipped these files into C:\curl version 7.31.0 Running the tools I used in my presentation Demonstration 1 (running Event Store) You can use one of my Event Store runner command files to run the single node version of Event Store, using default ports of 2213 for HTTP and 1113  for TCP, and with a wildcard HTTP pattern.  Both take a single command line parameter to specify the location of the data and log files.  The runners assume the single node executable is located in C:\EventStore\v2.0.1, and will placed data files and logs beneath C:\EventStore\Data, i.e. RunEventStore.cmd TestData1 This will create data files in C:\EventStore\Data\TestData1\Data and log files in C:\EventStore\Data\TestData1\logs. If, when running Event Store you may see the following message, [03288,15,06:23:00.622] Failed to start http server Access is denied You will either need to run Event Store in an administrator console window, or you can use the netsh command to create a firewall permission to allow HTTP listening (this will need to be run, once, in an administrator console window), netsh http add urlacl url=http://*:2213/ user=liam You can always delete this later by running the delete; netsh http delete urlacl url=http://*:2213/ If you want to confirm that everything is running OK, open the management console in a browser by navigating to http://127.0.0.1:2213. If at any point you are asked for a user name and password use the default of ‘admin’/‘changeit’. Demonstration 2 (reading and adding data, curl) In my second demonstration I used curl directly from the console to read streams, write events and then read back those events. On GitHub I have included is a set of curl commands, CurlCommandLine.txt, and a sample data file, SampleData.json, to load an event into a DDDNorth3 stream. As there is not much data in the Event Store at this point I used the $stats-127.0.0.1:2113 which is a stream containing performance statistics for Event Store and is updated every 30 seconds (default). Demonstration 3 (projections) On GitHub I have included a sample projection, Projection-ByRoom.txt, which will create streams based on the room on which a session was held on the DDDNorth3 agenda. Browse to the management console, http://127.0.0.1:2213.  Click on Projections, New Projection, give it a name, Sessions-ByRoom, and copy in the JavaScript in the Projection-ByRoom.txt file.  Select Continuous, tick Emit Enabled and then click on Post. It should run immediately. You may by challenged for the administration login for the management console, if so use the default user name and password; 'admin'/'changeit'. Demonstration 4 (C# client) The final demonstration was the Visual Studio 2012 project using the Event Store client – referenced directly as C:\EventStore\v2.0.1\EventStore.ClientAPI.dll, although you can switch this to the latest Event Store client NuGet package. The source code provides a console app for viewing projections with the projection manager (HTTP connection), as well as containing a full set of data for the entire DDDNorth3 agenda.  It also deals with the strategy for reading newest events backwards to older events and ignoring older events that have been superseded. Resources Event Store home page: http://www.geteventstore.com/ Event Store source code on GitHub: https://github.com/eventstore/eventstore Event Store documentation on GitHub: https://github.com/eventstore/eventstore/wiki (includes index to @RobAshton’s blog series on Event Store at https://github.com/eventstore/eventstore/wiki#rob-ashton---projections-series) Event Store forum in Google Groups: https://groups.google.com/forum/?fromgroups#!forum/event-store TopShelf Windows service wrapper is available on github: https://gist.github.com/trbngr/5083266

    Read the article

  • How do I manage application configuration in ASP.NET?

    - by GlennS
    I am having difficulty with managing configuration of an ASP.Net application to deploy for different clients. The sheer volume of different settings which need twiddling takes up large amounts of time, and the current configuration methods are too complicated to enable us to push this responsibility out to support partners. Any suggestions for better methods to handle this or good sources of information to research? How we do things at present: Various xml configuration files which are referenced in Web.Config, for example an AppSettings.xml. Configurations for specific sites are kept in duplicate configuration files. Text files containing lists of data specific to the site In some cases, manual one-off changes to the database C# configuration for Windsor IOC. The specific issues we are having: Different sites with different features enabled, different external services we have to talk to and different business rules. Different deployment types (live, test, training) Configuration keys change across versions (get added, remove), meaning we have to update all the duplicate files We still need to be able to alter keys while the application is running Our current thoughts on how we might approach this are: Move the configuration into dynamically compiled code (possibly Boo, Binsor or JavaScript) Have some form of diffing/merging configuration: combine a default config with a live/test/training config and a site-specific config

    Read the article

  • How to initialise an array inside a struct without doing each element separately? (C++)

    - by Janet
    My questions are in the code, but basically i want to know how/if I can do the two commented out lines? I know I can do it in a constructor but I don't want to! struct foo { int b[4]; } boo; //boo.b[] = {7, 6, 5, 4}; // <- why doesn't this work? (syntax error : ']') //boo.b = {7, 6, 5, 4}; // <- or else this? (syntax error : '{') boo.b[0] = 7; // <- doing it this way is annoying boo.b[1] = 6; // : boo.b[2] = 5; // : boo.b[3] = 4; // <- doing it this way is annoying boo.b[4] = 3; // <- why does this work! (Using: C++, Visual Studio 2005.)

    Read the article

  • SQL Self Join Query Help

    - by hdoe123
    Hi All, I'm trying to work out a query that self join itself on a table using the eventnumber. I've never done a self join before. What i'm trying to query is when a client has started off in a city which is chester to see what city they moved to. But I dont want to be able to see if they started off in another city. I would also like be only see the move once (So i'd only like to see if they went from chester to london rather then chester to london to wales) The StartTimeDate is the same EndDateTime if they moved to another city. Data example as follows if they started off in the city chester :- clientid EventNumber City StartDateTime EndDateTime 1 1 Chester 10/03/2009 11/04/2010 13:00 1 1 Liverpool 11/04/2010 13:00 30/06/2010 16:00 1 1 Wales 30/07/2010 16:00 the result I would like to see is on the 2nd row - so it only shows me liverpool. Could anyone point in the right direcetion please?

    Read the article

  • Testing warnings with doctest

    - by Eli Courtwright
    I'd like to use doctests to test the presence of certain warnings. For example, suppose I have the following module: from warnings import warn class Foo(object): """ Instantiating Foo always gives a warning: >>> foo = Foo() testdocs.py:14: UserWarning: Boo! warn("Boo!", UserWarning) >>> """ def __init__(self): warn("Boo!", UserWarning) If I run python -m doctest testdocs.py to run the doctest in my class and make sure that the warning is printed, I get: testdocs.py:14: UserWarning: Boo! warn("Boo!", UserWarning) ********************************************************************** File "testdocs.py", line 7, in testdocs.Foo Failed example: foo = Foo() Expected: testdocs.py:14: UserWarning: Boo! warn("Boo!", UserWarning) Got nothing ********************************************************************** 1 items had failures: 1 of 1 in testdocs.Foo ***Test Failed*** 1 failures. It looks like the warning is getting printed but not captured or noticed by doctest. I'm guessing that this is because warnings are printed to sys.stderr instead of sys.stdout. But this happens even when I say sys.stderr = sys.stdout at the end of my module. So is there any way to use doctests to test for warnings? I can find no mention of this one way or the other in the documentation or in my Google searching.

    Read the article

  • Firefox 3.6.x no longer fires off my onload event boo hoo!

    - by Cheesle
    Hi, I have a Firefox 3.6.2 problem (3.5.x works just fine). This is the code: ... var newImage = new Image(); newImage.onload=function() {swapMapImg(newImage);}; newImage.src = newBackground; ... function swapMapImg(newImage) { alert('bingo'); } Firefox 3.6.2 no longer fires off my onload event, any ideas? Thank you!

    Read the article

  • How to get node without children in xQuery?

    - by mbrevoort
    So I have two nodes of elements that I'm essentially trying to join. I want the top level node to stay the same but the child nodes to be replaced by those cross referenced. Given: <stuff> <item foo="foo" boo="1"/> <item foo="bar" boo="2" /> <item foo="baz" boo="3"/> <item foo="blah boo="4""/> </stuff> <list a="1" b="2"> <foo>bar</foo> <foo>baz</foo> </list> I want to loop through "list" and cross reference elements in "stuff" for this result: <list a="1" b="2"> <item foo="bar" boo="2" /> <item foo="baz" boo="3"/> </list> I want to do this without having to know about what attributes might be on "list". In other words I don't want to have to explicitly call them out like attribute a { $list/@a }, attribute b { $list/@b }

    Read the article

  • How to recursively delete some xml elements using XSLT

    - by Monomachus
    Hi, So I got this situation which sucks. I have an XML like this <table border="1" cols="200 100pt 200"> <tr> <td>isbn</td> <td>title</td> <td>price</td> </tr> <tr> <td /> <td /> <td> <span type="champsimple" id="9b297fb5-d12b-46b1-8899-487a2df0104e" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f"> [prénom] </span> <span type="champsimple" id="e103a6a5-d1be-4c34-8a54-d234179fb4ea" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f">[nom]</span> <span></span> </td> </tr> <tr></tr> <tr> <td></td> <td>Phill It in</td> </tr> <tr> <table id="cas1"> <tr> <td ></td> <td >foo</td> </tr> <tr> <td >bar</td> <td >boo</td> </tr> </table> </tr> <tr> <table id="cas2"> <tr> <td ></td> <td >foo</td> </tr> <tr> <td ></td> <td >boo</td> </tr> </table> </tr> <tr> <table id="cas3"> <tr> <td >bar</td> <td ></td> </tr> <tr> <td >foo</td> <td >boo</td> </tr> </table> </tr> <tr> <table id="cas4"> <tr> <td /> <td /> </tr> <tr> <td>foo</td> <td>boo</td> </tr> </table> </tr> <table id="cas4"> <tr> <td /> <td /> </tr> <tr> <td>foo</td> <td>boo</td> </tr> </table> <tr> <td /> <td /> </tr> </table> Now the question is how would I recursively delete all empty td, tr and table elements? Now I use this XSLT <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output omit-xml-declaration="yes" indent="yes"/> <xsl:strip-space elements="*" /> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="td[not(node())]" /> <xsl:template match="tr[not(node())]" /> <xsl:template match="table[not(node())]" /> </xsl:stylesheet> But it doesn't do very well. After I delete td, a tr becomes empty but it doesn't handle that. Too bad. See the table element with "cas4". <table border="1" cols="200 100pt 200"> <tr> <td>isbn</td> <td>title</td> <td>price</td> </tr> <tr> <td> <span type="champsimple" id="9b297fb5-d12b-46b1-8899-487a2df0104e" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f"> [prénom] </span> <span type="champsimple" id="e103a6a5-d1be-4c34-8a54-d234179fb4ea" categorieid="a1c70692-0427-425b-983c-1a08b6585364" champcoderef="01f12b93-b4c5-401b-9da1-c9385d77e43f">[nom]</span> <span /> </td> </tr> <tr> <td>Phill It in</td> </tr> <tr> <table id="cas1"> <tr> <td>foo</td> </tr> <tr> <td>bar</td> <td>boo</td> </tr> </table> </tr> <tr> <table id="cas2"> <tr> <td>foo</td> </tr> <tr> <td>boo</td> </tr> </table> </tr> <tr> <table id="cas3"> <tr> <td>bar</td> </tr> <tr> <td>foo</td> <td>boo</td> </tr> </table> </tr> <tr> <table id="cas4"> <tr /> <tr> <td>foo</td> <td>boo</td> </tr> </table> </tr> <table id="cas4"> <tr /> <tr> <td>foo</td> <td>boo</td> </tr> </table> <tr /> </table> How would you solve this problem?

    Read the article

  • Grouping a query with php

    - by Tom Hoad
    Basic question! I have 2 tables FRUIT id | fruit_name ------------------- 1 | Apple 2 | Banana 3 | Carrot VARIETIES id | fk_fruit_id | variety_name --------------------------------------- 1 1 Cox 2 1 Braeburn 3 2 Chester 4 3 Kotaka 5 3 Imperial 6 3 Oneal I'd like to output a list of varieties per fruit e.g. APPLE - Cox, Braeburn BANANA - Chester CARROT - Kotaka, Imperial, Oneal My current code is $query = "SELECT * FROM produce, varieties WHERE produce.id = varieties.fk_fruit_id"; $result = mysql_query($query) or die('Error : ' . mysql_error()); while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) { $produce_fruit_code = $row['fruit_code']; $variety_name = $row['variety_name']; echo $produce_fruit_code.' - '.$variety_name.'<br/>'; } which outputs: Apple - Cox Apple - Braeburn Banana - Chester Carrot - Kotaka Carrot - Imperial Carrot - Oneal Not a million miles away, but still not there. Any help is much appreciated, thanks!

    Read the article

  • How to implement == or >= operators for generic type

    - by momsd
    I have a generic type Foo which has a internal generic class Boo. Boo class a property Value of type K. In a method inside Foo i want to do a boo.Value >= value Note that second operand value is of type T. while compiling i am getting following error: Operator '=' cannot be applied to operands of type 'T' and 'T' Can anyone please tell me whats the problem here?

    Read the article

  • binding an object to the global scope

    - by elduderino
    I have the following code: var myVar = (function (window) { myobj = {}; myobj.boo = function() { alert('hi'); }; window.myVar = myobj; })(window); myVar.boo(); Why don't I get back the alert when I call myVar.boo() ? I've created an anonymous self-executing function and fed in the window object. Inside that I have another object with a method assigned to it. I then assign the global myVar variable to this obj. This should provide an alias to the my myobj object. However when I call the function I get an Cannot call method 'boo' of undefined error

    Read the article

1 2 3 4 5 6 7 8  | Next Page >