Search Results

Search found 300 results on 12 pages for 'bcit jd'.

Page 6/12 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Web serivce time out errors in delphi

    - by JD
    Hi, I have a client application that makes SOAP requests. I have set the timeout to 20 minutes. However, sometimes I see the timeout error occurring after 10 seconds. I have the following in code: RIO.HTTPWebNode.ReceiveTimeout := 1200000 Do I need to set the ConnectTimeout and SendTimeOut? Currently they are set to the default values of 0. What difference would setting these make? I am using Delphi 2007. Looking further at the error message I see I get "The operation timed out....". So should I be setting my ReceiveTimeOut to zero since I really do not want any timeout at all?

    Read the article

  • Should an event-sourced aggregate root have query access to the event sourcing repository?

    - by JD Courtoy
    I'm working on an event-sourced CQRS implementation, using DDD in the application / domain layer. I have an object model that looks like this: public class Person : AggregateRootBase { private Guid? _bookingId; public Person(Identification identification) { Apply(new PersonCreatedEvent(identification)); } public Booking CreateBooking() { // Enforce Person invariants var booking = new Booking(); Apply(new PersonBookedEvent(booking.Id)); return booking; } public void Release() { // Enforce Person invariants // Should we load the booking here from the aggregate repository? // We need to ensure that booking is released as well. var booking = BookingRepository.Load(_bookingId); booking.Release(); Apply(new PersonReleasedEvent(_bookingId)); } [EventHandler] public void Handle(PersonBookedEvent @event) { _bookingId = @event.BookingId; } [EventHandler] public void Handle(PersonReleasedEvent @event) { _bookingId = null; } } public class Booking : AggregateRootBase { private DateTime _bookingDate; private DateTime? _releaseDate; public Booking() { //Enforce invariants Apply(new BookingCreatedEvent()); } public void Release() { //Enforce invariants Apply(new BookingReleasedEvent()); } [EventHandler] public void Handle(BookingCreatedEvent @event) { _bookingDate = SystemTime.Now(); } [EventHandler] public void Handle(BookingReleasedEvent @event) { _releaseDate = SystemTime.Now(); } // Some other business activities unrelated to a person } With my understanding of DDD so far, both Person and Booking are seperate aggregate roots for two reasons: There are times when business components will pull Booking objects separately from the database. (ie, a person that has been released has a previous booking modified due to incorrect information). There should not be locking contention between Person and Booking whenever a Booking needs to be updated. One other business requirement is that a Booking can never occur for a Person more than once at a time. Due to this, I'm concerned about querying the query database on the read side as there could potentially be some inconsistency there (due to using CQRS and having an eventually consistent read database). Should the aggregate roots be allowed to query the event-sourced backing store for objects (lazy-loading them as needed)? Are there any other avenues of implementation that would make more sense?

    Read the article

  • MFC SDI Application without a default "New Document" on Startup

    - by Jd
    My application is an SDI with multiple views. By default, it creates a new document when the application starts. I want to modify this behavior so that a new document is created only when user explicitly clicks on "New". Or at least mimic this behavior. Any ideas? I am using Visual Studio 2008 with MFC feature pack. I googled and found some solution to this problem in an old MS Journal article. But unfortunately it doesn't seem to work now. Any workarounds or solutions? In short, I need to differentiate between framework call to OnFileNew() and User Click on New.

    Read the article

  • Numpy: Sorting a multidimensional array by a multidimensional array

    - by JD Long
    Forgive me if this is redundant or super basic. I'm coming to Python/Numpy from R and having a hard time flipping things around in my head. I have a n dimensional array which I want to sort using another n dimensional array of index values. I know I could wrap this in a loop but it seems like there should be a really concise Numpyonic way of beating this into submission. Here's my example code to set up the problem where n=2: a1 = random.standard_normal(size=[2,5]) index = array([[0,1,2,4,3] , [0,1,2,3,4] ]) so now I have a 2 x 5 array of random numbers and a 2 x 5 index. I've read the help for take() about 10 times now but my brain is not groking it, obviously. I thought this might get me there: take(a1, index) array([[ 0.29589188, -0.71279375, -0.18154864, -1.12184984, 0.25698875], [ 0.29589188, -0.71279375, -0.18154864, 0.25698875, -1.12184984]]) but that's clearly reordering only the first element (I presume because of flattening). Any tips on how I get from where I am to a solution that sorts element 0 of a1 by element 0 of the index ... element n?

    Read the article

  • how to get cartesian products between database and local sequences in linq?

    - by JD
    I saw this similar question here but can't figure out how to use Contains in Cartesian product desired result situation: http://stackoverflow.com/questions/1712105/linq-to-sql-exception-local-sequence-cannot-be-used-in-linq-to-sql-implementatio Let's say I have following: var a = new [] { 1, 4, 7 }; var b = new [] { 2, 5, 8 }; var test = from i in a from j in b select new { A = i, B = j, AB = string.Format("{0:00}a{1:00}b", i, j), }; foreach (var t in test) Console.Write("{0}, ", t.AB); This works great and I get a dump like so (note, I want the cartesian product): 01a02b, 01a05b, 01a08b, 04a02b, 04a05b, 04a08b, 07a02b, 07a05b, 07a08b, Now what I really want is to take this and cartesian product it again against an ID from a database table I have. But, as soon as I add in one more from clause that instead of referencing objects, references SQL table, I get an error. So, altering above to something like so where db is defined as a new DataContext (i.e., class deriving from System.Data.Linq.DataContext): var a = new [] { 1, 4, 7 }; var b = new [] { 2, 5, 8 }; var test = from symbol in db.Symbols from i in a from j in b select new { A = i, B = j, AB = string.Format("{0}{1:00}a{2:00}b", symbol.ID, i, j), }; foreach (var t in test) Console.Write("{0}, ", t.AB); The error I get is following: Local sequence cannot be used in LINQ to SQL implementations of query operators except the Contains operator Its related to not using Contains apparently but I'm unsure how Contains would be used when I don't really want to constrict the results - I want the Cartesian product for my situation. Any ideas of how to use Contains above and still yield the Cartesian product when joining database and local sequences?

    Read the article

  • Translating itunes affiliate rss via xslt

    - by jd
    I can't get this working for the life of me. Here is a snippet of the xml I get from an RSS feed from itunes affiliate. I want top print the values within tags but I cannot for some reason: <?xml version="1.0" encoding="utf-8"?> <feed xmlns:im="http://itunes.apple.com/rss" xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <id>http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/sf=143441/limit=100/genre=6014/xml</id><title>iTunes Store: Top Paid Applications</title><updated>2010-03-24T15:36:42-07:00</updated><link rel="alternate" type="text/html" href="http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewTop?id=25180&amp;popId=30"/><link rel="self" href="http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/toppaidapplications/sf=143441/limit=100/genre=6014/xml"/><icon>http://phobos.apple.com/favicon.ico</icon><author><name>iTunes Store</name><uri>http://www.apple.com/itunes/</uri></author><rights>Copyright 2008 Apple Inc.</rights> <entry> <updated>date</updated> <id>someID</id> <title>a</title> <im:name>b</im:name> </entry> <entry> <updated>date2/updated> <id>someID2</id> <title>a2</title> <im:name>b2</im:name> </entry> </feed> If I try <xsl:apply-templates match="entry"/> it spits out the entire contents of file. If I use <xsl:call-template name="entry"> it will show only one entry and I have to use <xsl:value-of select="//*[local-name(.)='name']"/> to get name but that's a hack. I've used xslt before for xml without namespaces and xml that has proper parent child relationships but not like this RSS feed. Notice entry is not wrapped in entries or anything. Any help is appreciated. I want to use xslt because I want to alter the itunes link to go through my affiliate account - so something automated wouldn't work for me.

    Read the article

  • WinForms GDI+ Polygon Events and custom shaped panels

    - by JD
    I have converted postcode boundary polygons to point data (point[] for each polygon) from GIS Shape Files. I am wanting to show this in a c# windows forms application. I have managed to show this using the System.Drawing (GDI+) DrawPolygon() method. Graphics g = this.CreateGraphics(); Pen pen = new Pen(Color.Black); Brush brush = new SolidBrush(Color.FromArgb(255,255,o)); PointF[] ptr = { point data here }; g.FillPolygon(brush, ptr); g.DrawPolygon(pen, ptr); Is it possible to add events to a drawn polygon? If so how do I do this for individual polygons. For example, click on a postcode polygon and a messagebox shows information about the postcode. Secondly, would it be easier to make a custom control inheriting the winforms panel. Is there a way to shape the border of a winforms panel control using a set of points? Postcode objects are serialised and stored in the filesystem.

    Read the article

  • C# Regex stops after first line matched

    - by JD Guzman
    Ok so I have a regex and I need it to find matches in a multiline string. This is the string I am using: Device Identifier: disk0 Device Node: /dev/disk0 Part of Whole: disk0 Device / Media Name: OCZ-VERTEX2 Media Volume Name: Not applicable (no file system) Mounted: Not applicable (no file system) File System: None Content (IOContent): GUID_partition_scheme OS Can Be Installed: No Media Type: Generic Protocol: SATA SMART Status: Verified Total Size: 240.1 GB (240057409536 Bytes) (exactly 468862128 512-Byte-Blocks) Volume Free Space: Not applicable (no file system) Device Block Size: 512 Bytes Read-Only Media: No Read-Only Volume: Not applicable (no file system) Ejectable: No Whole: Yes Internal: Yes Solid State: Yes OS 9 Drivers: No Low Level Format: Not supported Basically I need to separate each line into two groups with the colon as the separator. The regex I am using is: @"([A-Za-z0-9\(\) \-\/]+):([A-Za-z0-9\(\) \-\/]+).*" It does work but only picks up the first line and separates it into the two groups like I want but it stops at that point. I have tried the Multiline option but it doesn't make any difference. I must admit I am new to the regex world. Any help is appreciated.

    Read the article

  • Invoke modal view controller from UIWebView weblink

    - by JD
    Hey folks I was wondering if anyone can tip me on a painless way of invoking a modal view controller from a web link in a UIWebView. Is it possible to do this? I want the modal view controller to still be a part of the app as opposed to closing the main app and using a helper application instead. Any help would be greatly appreciated.

    Read the article

  • How do I display the validation which failed in my Rails unit test?

    - by JD
    Summary: Failed unit tests tell me which assert (file:line) failed, but not which validation resulted in the failure. More info: I have 11 validations in one of my models. Unit testing is great, whether I run `rake test:units --trace' or 'ruby -Itest test/unit/mymodel_test.rb'. However, despite the fact that it tells me exactly which assert() failed me, I am not told which validation failed. I must be missing something obvious, because I can't ask Google this question well enough to get an answer. Thanks :)

    Read the article

  • JQuery XML option node

    - by JD
    hi, I am having an issue with parsing XML with JQuery when there is a node with an option node <preferences><dashboard> <report id="si_pg_vw" order="0"> <header> <data> <option type="reportname" value="Page View"/> </data> </header> </report> the following code in firebug returns no children $reportElement.find("data")[0] however if I change option to any other value ("option2", "test" etc) then the line above returns one child which is correct. Am I mising something or is there a bug? Thanks John

    Read the article

  • XML RSS Feed Parse PHP

    - by JD
    With an XML feed like so: <w:current temperature="22.2" dewPoint="12.9" humidity="56" windSpeed="5.6" windGusts="9.3" windDirection="ESE" pressure="1017.8" rain="0.0" /> and <w:forecast day="Thursday" description="Mostly Sunny. Warm." min="17" max="29" icon="2" iconUri="http://www.weather.com.au/images/icons/2.gif" iconAlt="Mostly Sunny" /> How do I parse it in PHP using the dom? $doc = new DOMDocument(); $doc->load('http://rss.weather.com.au/sa/adelaide'); $arrFeeds = array(); foreach ($doc->getElementsByTagName('item') as $node) { $itemRSS = array ( 'title' => $node->getElementsByTagName('title')->item(0)->nodeValue, 'description' => $node->getElementsByTagName('w')->item(0)->nodeValue, ); array_push($arrFeeds, $itemRSS); } Returns error :Notice: Trying to get property of non-object in /var/www/index.php on line 123

    Read the article

  • XML validation in Java - why does this fail?

    - by jd
    hi, first time dealing with xml, so please be patient. the code below is probably evil in a million ways (I'd be very happy to hear about all of them), but the main problem is of course that it doesn't work :-) public class Test { private static final String JSDL_SCHEMA_URL = "http://schemas.ggf.org/jsdl/2005/11/jsdl"; private static final String JSDL_POSIX_APPLICATION_SCHEMA_URL = "http://schemas.ggf.org/jsdl/2005/11/jsdl-posix"; public static void main(String[] args) { System.out.println(Test.createJSDLDescription("/bin/echo", "hello world")); } private static String createJSDLDescription(String execName, String args) { Document jsdlJobDefinitionDocument = getJSDLJobDefinitionDocument(); String xmlString = null; // create the elements Element jobDescription = jsdlJobDefinitionDocument.createElement("JobDescription"); Element application = jsdlJobDefinitionDocument.createElement("Application"); Element posixApplication = jsdlJobDefinitionDocument.createElementNS(JSDL_POSIX_APPLICATION_SCHEMA_URL, "POSIXApplication"); Element executable = jsdlJobDefinitionDocument.createElement("Executable"); executable.setTextContent(execName); Element argument = jsdlJobDefinitionDocument.createElement("Argument"); argument.setTextContent(args); //join them into a tree posixApplication.appendChild(executable); posixApplication.appendChild(argument); application.appendChild(posixApplication); jobDescription.appendChild(application); jsdlJobDefinitionDocument.getDocumentElement().appendChild(jobDescription); DOMSource source = new DOMSource(jsdlJobDefinitionDocument); validateXML(source); try { Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.setOutputProperty(OutputKeys.INDENT, "yes"); StreamResult result = new StreamResult(new StringWriter()); transformer.transform(source, result); xmlString = result.getWriter().toString(); } catch (Exception e) { e.printStackTrace(); } return xmlString; } private static Document getJSDLJobDefinitionDocument() { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = null; try { builder = factory.newDocumentBuilder(); } catch (Exception e) { e.printStackTrace(); } DOMImplementation domImpl = builder.getDOMImplementation(); Document theDocument = domImpl.createDocument(JSDL_SCHEMA_URL, "JobDefinition", null); return theDocument; } private static void validateXML(DOMSource source) { try { URL schemaFile = new URL(JSDL_SCHEMA_URL); Sche maFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI); Schema schema = schemaFactory.newSchema(schemaFile); Validator validator = schema.newValidator(); DOMResult result = new DOMResult(); validator.validate(source, result); System.out.println("is valid"); } catch (Exception e) { e.printStackTrace(); } } } it spits out a somewhat odd message: org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'JobDescription'. One of '{"http://schemas.ggf.org/jsdl/2005/11/jsdl":JobDescription}' is expected. Where am I going wrong here? Thanks a lot

    Read the article

  • In SQL Server changing column varchar(255) nvarchar

    - by JD
    Hi, I am using SQL server 2008 express and some of our columns are defined as varchar(255). Should I convert these columns to NvarChar(255) or nvarchar(max)? The reason I ask is I read that nvarchar(255) for unicode characters would actually store 1/2 the number of characters (since unicode characters are 2 bytes) whereas 255 with varchar() would allow me to store 255 characters (or is it 255 - 2 for the offset). Would there be any performance hits using nvarchar(max)? JDs

    Read the article

  • Microsoft Training in .NET

    - by JD
    Hey guys, A quick question about training. My company are offering to put me through a 5 day course in .NET programming with C#, on the proviso that I work for them for a minimum 12 month period immediately after the training has been completed. IF I don't work for them for 12months I will be expected to pay them back teh cost of the training, minus the amount of months which I have stayed at the company (e.g. stay 6 months and only pay back half). The course will be $3,300 AUD - and will have no qualifications. I have been programming in C# for about 6 months, and in PHP for about 10 years - so I am getting the hang of .NET slowly but surely. Is it worth doing this? Or would I be best advised to learn from reading the MS books from Amazon for $40 and then sitting the 2 exams to get MS certified off my own back? The company are not willing to pay for my certification as well as 'they are not training me to get certified' and hence more employable... Thoughts? How do other companies deal with training? And stop people from taking off after becoming certified?

    Read the article

  • Should an event-sourced aggregate root have access to the event sourcing repository?

    - by JD Courtoy
    I'm working on an event-sourced CQRS implementation, using DDD in the application / domain layer. I have an object model that looks like this: public class Person : AggregateRootBase { private Guid? _bookingId; public Person(Identification identification) { Apply(new PersonCreatedEvent(identification)); } public Booking CreateBooking() { // Enforce Person invariants var booking = new Booking(); Apply(new PersonBookedEvent(booking.Id)); return booking; } public void Release() { // Enforce Person invariants // Should we load the booking here from the aggregate repository? // We need to ensure that booking is released as well. var booking = BookingRepository.Load(_bookingId); booking.Release(); Apply(new PersonReleasedEvent(_bookingId)); } [EventHandler] public void Handle(PersonBookedEvent @event) { _bookingId = @event.BookingId; } [EventHandler] public void Handle(PersonReleasedEvent @event) { _bookingId = null; } } public class Booking : AggregateRootBase { private DateTime _bookingDate; private DateTime? _releaseDate; public Booking() { //Enforce invariants Apply(new BookingCreatedEvent()); } public void Release() { //Enforce invariants Apply(new BookingReleasedEvent()); } [EventHandler] public void Handle(BookingCreatedEvent @event) { _bookingDate = SystemTime.Now(); } [EventHandler] public void Handle(BookingReleasedEvent @event) { _releaseDate = SystemTime.Now(); } // Some other business activities unrelated to a person } With my understanding of DDD so far, both Person and Booking are seperate aggregate roots for two reasons: There are times when business components will pull Booking objects separately from the database. (ie, a person that has been released has a previous booking modified due to incorrect information). There should not be locking contention between Person and Booking whenever a Booking needs to be updated. One other business requirement is that a Booking can never occur for a Person more than once at a time. Due to this, I'm concerned about querying the query database on the read side as there could potentially be some inconsistency there (due to using CQRS and having an eventually consistent read database). Should the aggregate roots be allowed to query the event-sourced backing store by id for objects (lazy-loading them as needed)? Are there any other avenues of implementation that would make more sense?

    Read the article

  • CSS float column extending over footer

    - by JD
    Hi, I am having a problem with my CSS whereby the right hand column in a 2 column layout is extending beyond the footer. I have tried playing with the clear: both; property but I cannot get it to work.. the second column has the id column2 both columns use the class column. The footer html has the id footerWrapper Both columns and footer are div tags. My CSS (abridged): .column { width: 49%; } #column2 { width: 50%; position: absolute; top: 0px; margin-left: 50%; float: left; } #footerWrapper { background-color: #333333; border-top: 2px #FF6600 solid; color: #666; }

    Read the article

  • SetParent() on a VB6 application from a C# app

    - by JD
    Aloha all! I am trying to use the win32 API to set the parent of an application to a panel in my C# application. I can get most applications to work... However I have one application which was written in VB6 which I am having problems with... When I inspect it using spy++ the application loads in 2 main forms 'ThunderRT6Main' and 'ThunderRT6MDIForm' both with the same title. I have found the handle of both of these and tried to call SetParent on them both but the window does nothing and does not move anywhere... Is there something funky I need to do when invoking SetParent() on a VB6 app?

    Read the article

  • prototype findElements querySelectorAll error

    - by JD
    i'm call the "down" function but am getting an invalid argument using 1.6.1_rc2 here's the html snippet: <TR id=000000214A class="activeRow searchResultsDisplayOver" conceptID="0000001KIU"> <TD> <DIV class=gridRowWrapper> <SPAN class=SynDesc>Asymmetric breasts</SPAN> <DIV class=buttonWrapper> <SPAN class=btnAddFav title="Add to Favorites">&nbsp;</SPAN> </DIV> </DIV> </TD> </TR> here's the code: var description = row.down('span.SynDesc').innerHTML; row is a dom reference to the element. prototype is appending a # then the id of the element: findElements: function(root) { root = root || document; var e = this.expression, results; switch (this.mode) { case 'selectorsAPI': if (root !== document) { var oldId = root.id, id = $(root).identify(); id = id.replace(/[\.:]/g, "\\$0"); e = "#" + id + " " + e; } results = $A(root.querySelectorAll(e)).map(Element.extend); <-- e = "#000000214A span.SynDesc" root.id = oldId; return results; case 'xpath': return document._getElementsByXPath(this.xpath, root); default: return this.matcher(root); } i get an "invalid argument" error? if i put a breakpoint before the offending line and change e to be equal to "span.SynDesc" it works fine. help. :)

    Read the article

  • How to handle set based consistency validation in CQRS?

    - by JD Courtoy
    I have a fairly simple domain model involving a list of Facility aggregate roots. Given that I'm using CQRS and an event-bus to handle events raised from the domain, how could you handle validation on sets? For example, say I have the following requirement: Facility's must have a unique name. Since I'm using an eventually consistent database on the query side, the data in it is not guaranteed to be accurate at the time the event processesor processes the event. For example, a FacilityCreatedEvent is in the query database event processing queue waiting to be processed and written into the database. A new CreateFacilityCommand is sent to the domain to be processed. The domain services query the read database to see if there are any other Facility's registered already with that name, but returns false because the CreateNewFacilityEvent has not yet been processed and written to the store. The new CreateFacilityCommand will now succeed and throw up another FacilityCreatedEvent which would blow up when the event processor tries to write it into the database and finds that another Facility already exists with that name.

    Read the article

  • R: Converting a list of data frames into one data frame

    - by JD Long
    I have code that at one place ends up with a list of data frames which I really want to convert to a single big data frame. I got some pointers from an earlier question which was trying to do something similar but more complex. Here's an example of what I am starting with (this is grossly simplified for illustration): listOfDataFrames <- NULL for (i in 1:100) { listOfDataFrames[[i]] <- data.frame(a=sample(letters, 500, rep=T), b=rnorm(500), c=rnorm(500)) } I am currently using this: df <- do.call("rbind", listOfDataFrames) *EDIT* whoops. In my haste to implement what I had "learned" in a previous question I totally screwed up. Yes, the unlist() is just plain wrong. I'm editing that out of the question above.

    Read the article

  • Long To XMLGregorianCalendar and back to Long

    - by JD.
    I am trying to convert from millisecond time stamp to XMLGregorianCalendar and back, but I seem to be getting wrong results. Am I doing something wrong? It seems I am gaining days. // Time stamp 01-Jan-0001 00:00:00.000 Long ts = -62135740800000L; System.out.println(ts); System.out.println(new Date(ts)); // Sat Jan 01 00:00:00 PST 1 .. Cool! // to Gregorian Calendar GregorianCalendar gc = new GregorianCalendar(); gc.setTimeInMillis(ts); // to XML Gregorian Calendar XMLGregorianCalendar xc = DatatypeFactory.newInstance().newXMLGregorianCalendar(gc); // back to GC GregorianCalendar gc2 = xc.toGregorianCalendar(); // to Timestamp Long newTs = gc2.getTimeInMillis(); System.out.println(newTs); // -62135568000000 .. uh? System.out.println(new Date(newTs)); // Mon Jan 03 00:00:00 PST 1 .. where did the extra days come from?

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12  | Next Page >