Search Results

Search found 3728 results on 150 pages for 'christian david straub'.

Page 17/150 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • T-SQL - how to get around the order by restriction in CTEs

    - by David
    Hi all I have the following CTE. Its purpose is to provide unique Month/Year pairs. Later code will use the CTE to produce a concatenated string list of the Month/Year pairs. ;WITH tblStoredWillsInPeriod AS ( SELECT DISTINCT Kctc.GetMonthAndYearString(DateWillReceived) Month FROM Kctc.StoredWills WHERE DateWillReceived BETWEEN '2010/01/01' AND '2010/03/31' ORDER BY DateWillReceived ) I have omitted the implmementation of the GetMonthAndYearString function as it is trivial. Sadly, it seems T-SQL is always one step ahead. When I run this code, it tells me I'm not allowed to use ORDER BY in a CTE unless I also use TOP (or FOR XML, whatever that is.) If I use TOP, it tells me I can't use it with DISTINCT. Yup, T-SQL has all the answers. Can anyone think of a solution to this problem which is quicker than simply slashing my wrists? I understand that death from blood loss can be surprisingly lingering, and I have deadlines to meet. Thanks for your help. David

    Read the article

  • Multiple NSURLDownloads with Progress

    - by David Schiefer
    Hello, I'm trying to build a small app which allows downloading of multiple files at the same time while displaying them in a custom NSTableView. This works, i've done this by using an NSEnumerator, but I struggle at getting the progress right. It's calculated correctly, but it's not done individually for every download, instead they're added up. The way I've tried to set the subtitles containing the progress is by loading them into a separate array and then inserting/replacing objects containing the progress, but here I run into another problem - I don't know how to get the index of the object that's being downloaded, so I can't differentiate between the progresses. I hope you understand what I mean :P I've uploaded the source code to my server, I'd be really grateful if someone could have a look and help me out: http://web.me.com/david.schiefer/MyController.m

    Read the article

  • C#: Put member variables into a list.

    - by David
    Hi all Assuming I have a method which accepts an IList or similar thing as a parameter: public void JiggleMyList(IList<string> list)... Is there an easy way that I can pass in string members of a list of objects? I mean, if for example, I have a list of Person objects which expose a string property called FullName, is there a quick way to stuff the FullNames of all the Person objects into the method parameter, or do I have to create a new List and iterate through the Person objects: List<string> fullNames = new List<string>; foreach (Person person in people) { fullNames.Add(person.FullName); } JiggleMyList(fullNames); I come across this all the time, and it would be nice if there was a shortcut. Many thanks David

    Read the article

  • Showing the ProgressDialog while opening the Website

    - by david
    I have to open a website say Facebook page, twitter page and You Tube page in order to share my post there. Now when I click to the item Facebook , it gets redirected to FB to share and same for Twitter and YouTube. I have to show them in my WebView and all this is done perfectly. What I want is to show the Progress Dialog after clicking on the Item till it gets redirected to the FB , Twitter or YouTube. I don know how to show the Progress Bar for redirecting to the Main Website. Can anyone Please help me put Here. Thanks, David Brown

    Read the article

  • Full Width Divs using ScrollTo.js

    - by David Haigh
    This is my first ever post. I am using the ScrollTo jQuery plugin and i have stumbled across a problem... I have 6 rows, each with 6 child divs , I would like each of these child divs to be full width. The plugin works great but I cannot seem to get the child div to be full width (then use ScrollTo to 'slide' to the next div, or to a div on the next row. ) Here is my code: http://jsfiddle.net/RZjrV/ Is it even possible? I have set body - Overflow:hidden to avoid any initial confusion. Thank you all who read this post and even take a minute to think about it. David

    Read the article

  • GET syntax in xpath

    - by David Doria
    I am trying to use a parameter that I pass to the page in an xpath query. This works properly (hard coded): <?php $xml = simplexml_load_file("bookstore.xml"); $res = $xml->xpath("/bookstore/book[title = 'Everyday Italian']"); echo $res[0]->author ?> but I pass the parameter with: bookdetails.php?title="Everyday Italian" and then do: <?php $xml = simplexml_load_file("bookstore.xml"); $res = $xml->xpath("/bookstore/book[title = $_GET['title']]"); echo $res[0]->author ?> I get a 500 error. Any thoughts? Thanks, David

    Read the article

  • ArchBeat Link-o-Rama for 2012-09-27

    - by Bob Rhubart
    Understanding Oracle BI 11g Security vs Legacy Oracle BI 10g | Christian Screen "After conducting a large amount of Oracle BI 10g to Oracle BI 11g upgrades and after writing the Oracle BI 11g book," says Oracle ACE Christian Screen, "I still continually get asked one of the most basic questions regarding security in Oracle BI 11g; How does it compare to Oracle BI 10g? The trail of questions typically goes on to what are the differences? And, how do we leverage our current Oracle BI 10g security table schema in Oracle BI 11g?" Process Oracle OER Events using a simple Web Service | Bob Webster Bob Webster's post "provides an example of a simple web service that processes Oracle Enterprise Repository (OER) Events. The service receives events from OER and utilizes the OER REX API to implement simple OER automations for selected event types." Oracle Fusion Middleware Security: Attaching OWSM policies to JRF-based web services clients | Andre Correa "OWSM (Oracle Web Services Manager) is Oracle's recommended method for securing SOAP web services," says Oracle Fusion Middleware A-Team member Andre Correa. "It provides agents that encapsulate the necessary logic to interact with the underlying software stack on both service and client sides. Such agents have their behavior driven by policies. OWSM ships with a bunch of policies that are adequate to most common real world scenarios." His detailed post shows how to make it happen. WebCenter Content (WCC) Trace Sections | ECM Architect ECM Architect Kevin Smith shares a detailed technical post covering WebCenter Content (WCC) Trace sections. Thought for the Day "A complex system that works is invariably found to have evolved from a simple system that worked." — John Gall Source: SoftwareQuotes.com

    Read the article

  • Pushing a variable onto a vector, value at that point in vector changes when the variable does.

    - by David Andrews
    I have a programming problem =) std::vector<char*> Names; if(MyPacket.ID == 3) {Names.push_back(MyPacket.Buffer);} I push the recieved buffer onto a vector like so, but when the buffer changes so does the value of the variable at that point in the vector. So say I sent and pushed a buffer containing 'Simon' onto the vector that would be fine so at point [0] on the vector would be the word Simon. but then when I recieve a new buffer it overwrites position [0] even though the packets ID is different, a breakpoint within the if statement is not reached with this new buffer. I really hope i'm explaining this well enough, I tried asking a friends advice and he pointed me towards this site. Any help appreciated David Andrews

    Read the article

  • python lxml problem

    - by David ???
    I'm trying to print/save a certain element's HTML from a web-page. I've retrieved the requested element's XPath from firebug. All I wish is to save this element to a file. I don't seem to succeed in doing so. (tried the XPath with and without a /text() at the end) I would appreciate any help, or past experience. 10x, David import urllib2,StringIO from lxml import etree url='http://www.tutiempo.net/en/Climate/Londres_Heathrow_Airport/12-2009/37720.htm' seite = urllib2.urlopen(url) html = seite.read() seite.close() parser = etree.HTMLParser() tree = etree.parse(StringIO.StringIO(html), parser) xpath = "/html/body/table/tbody/tr/td[2]/div/table/tbody/tr[6]/td/table/tbody/tr/td[3]/table/tbody/tr[3]/td/table/tbody/tr/td/table/tbody/tr/td/table/tbody/text()" elem = tree.xpath(xpath) print elem[0].strip().encode("utf-8")

    Read the article

  • C#: Hook up all events from object in single statement.

    - by David
    In my domain layer all domain objects emit events (of type InvalidDomainObjectEventHandler) to indicate invalid state when the IsValid property is called. On an aspx codebehind, I have to manually wire up the events for the domain object like this: _purchaseOrder.AmountIsNull += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); _purchaseOrder.NoReason += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); _purchaseOrder.NoSupplier += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); _purchaseOrder.BothNewAndExistingSupplier += new DomainObject.InvalidDomainObjectEventHandler(HandleDomainObjectEvent); Note that the same method is called in each case since the InvalidDomainobjectEventArgs class contains the message to display. Is there any way I can write a single statement to wire up all events of type InvalidDomainObjectEventHandler in one go? Thanks David

    Read the article

  • Summing the results of Case queries in SQL

    - by David Stelfox
    I think this is a relatively straightforward question but I have spent the afternoon looking for an answer and cannot yet find it. So... I have a view with a country column and a number column. I want to make any number less than 10 'other' and then sum the 'other's into one value. For example, AR 10 AT 7 AU 11 BB 2 BE 23 BY 1 CL 2 I used CASE as follows: select country = case when number < 10 then 'Other' else country end, number from ... This replaces the countries values with less than 10 in the number column to other but I can't work out how to sum them. I want to end up with a table/view which looks like this: AR 10 AU 11 BE 23 Other 12 Any help is greatly appreciated. Cheers, David

    Read the article

  • ArchBeat Link-o-Rama for 2012-09-06

    - by Bob Rhubart
    Oracle Technology Network Architect Day - Boston, MA - 9/12/2012 Sure, you could ask a voodoo priestess for help in improving your solution architecture skills. But there's the whole snake thing, and the zombie thing, and other complications. So why not keep it simple and register for Oracle Technology Network Architect Day in Boston, MA. There's no magic, just a full day of technical sessions covering Cloud, SOA, Engineered Systems, and more. Registration is free, but seating is limited. You'll curse yourself if you miss this one. Register now. Adding a runtime LOV for a taskflow parameter in WebCenter | Yannick Ongena Oracle ACE Yannick Ongena illustrates how to customize the parameters tab for a taskflow in WebCenter. Tips on Migrating from AquaLogic .NET Accelerator to WebCenter WSRP Producer for .NET | Scott Nelson "It has been a very winding path and this blog entry is intended to share both the lessons learned and relevant approaches that led to those learnings," says Scott Nelson. "Like most journeys of discovery, it was not a direct path, and there are notes to let you know when it is practical to skip a section if you are in a hurry to get from here to there." Using FMAP and AnalyticsRes in a Oracle BI High Availability Implementation | Christian Screen "The fmap syntax has been used for a long time in Oracle BI / Siebel Analytics when referencing images inherent in the application as well as custom images," says Oracle ACE Christian Screen. "This syntax is used on Analysis requests an dashboards." More on Embedded Business Intelligence | David Haimes David Haimes give an example of Timeliness as "one of the three key attributes required for BI to be considered embedded BI." Thought for the Day "Architect: Someone who knows the difference between that which could be done and that which should be done. " — Larry McVoy Source: Quotes for Software Engineers

    Read the article

  • CodePlex Daily Summary for Friday, May 30, 2014

    CodePlex Daily Summary for Friday, May 30, 2014Popular ReleasesSEToolbox: 01.032.014 Release 2: Fixed flaw in startup if second Toolbox was started. Added thumbnail zooming in load dialog. Added mirror for new ConveyorTubeCurvedMedium. Added dedicated server support :- Repair will not add missing player to dedicated server. Distances measured to origin (0,0,0) when no player exists. Dedicated Service Server game denied write access unless SEToolbox is run as Admin. Additional information in Load dialog. Installation of this version will replace older version.Vi-AIO SearchBar: Vi – AIO Search Bar: Version 1.0Composite Iconote: Composite Iconote: This is a composite has been made by Microsoft Visual Studio 2013. Requirement: To develop this composite or use this component in your application, your computer must have .NET framework 4.5 or newer.HigLabo: HigLabo_20140529: Fixed HttpClient ContentLength bug.Magick.NET: Magick.NET 6.8.9.101: Magick.NET linked with ImageMagick 6.8.9.1. Breaking changes: - Int/short Set methods of WritablePixelCollection are now unsigned. - The Q16 build no longer uses HDRI, switch to the new Q16-HDRI build if you need HDRI.StudioShell: StudioShell 1.6.6: placeholder release for WIX issue work artifactsMath.NET Numerics: Math.NET Numerics v3.0.0-beta02: Full History Linear Algebra: optimized sparse-sparse and sparse-diagonal matrix products. ~Christian Woltering transpose at storage level, optimized sparse transpose. ~Christian Woltering optimized inplace-map, indexed submatrix-map. optimized clearing a set of rows or columns. matrix FoldRows/FoldColumns. matrix column/row norms, normalization. prefer enums over boolean parameters (e.g. `Zeros.AllowSkip`). IsSymmetric is now a method, add IsConjugateSymmetric. breaking Eigen...QuickMon: Version 3.13: 1. Adding an Audio/sound notifier that can be used to simply draw attention to the application of a warning pr error state is returned by a collector. 2. Adding a property for Notifiers so it can be set to 'Attended', 'Unattended' or 'Both' modes. 3. Adding a WCF method to remote agent host so the version can be checked remotely. 4. Adding some 'Sample' monitor packs to installer. Note: this release and the next release (3.14 aka Pie release) will have some breaking changes and will be incom...fnr.exe - Find And Replace Tool: 1.7: Bug fixes Refactored logic for encoding text values to command line to handle common edge cases where find/replace operation works in GUI but not in command line Fix for bug where selection in Encoding drop down was different when generating command line in some cases. It was reported in: https://findandreplace.codeplex.com/workitem/34 Fix for "Backslash inserted before dot in replacement text" reported here: https://findandreplace.codeplex.com/discussions/541024 Fix for finding replacing...VG-Ripper & PG-Ripper: VG-Ripper 2.9.59: changes NEW: Added Support for 'GokoImage.com' links NEW: Added Support for 'ViperII.com' links NEW: Added Support for 'PixxxView.com' links NEW: Added Support for 'ImgRex.com' links NEW: Added Support for 'PixLiv.com' links NEW: Added Support for 'imgsee.me' links NEW: Added Support for 'ImgS.it' linksXsemmel - XML Editor and Viewer: 29-MAY-2014: WINDOWS XP IS NO LONGER SUPPORTED If you need support for WinXP, download release 15-MAR-2014 instead. FIX: Some minor issues NEW: Better visualisation of validation issues NEW: Printing CHG: Disabled Jumplist CHG: updated to .net 4.5, WinXP NO LONGER SUPPORTEDPerformance Analyzer for Microsoft Dynamics: DynamicsPerf 1.20: Version 1.20 Improved performance in PERFHOURLYROWDATA_VW Fixed error handling encrypted triggers Added logic ACTIVITYMONITORVW to handle Context_Info for Dynamics AX 2012 and above with this flag set on AOS Added logic to optional blocking to handle Context_Info for Dynamics AX 2012 and above with this flag set on AOS Added additional queries for investigating blocking Added logic to collect Baseline capture data (NOTE: QUERY_STATS table has entire procedure cache for that db during...Toolbox for Dynamics CRM 2011/2013: XrmToolBox (v1.2014.5.28): XrmToolbox improvement XrmToolBox updates (v1.2014.5.28)Fix connecting to a connection with custom authentication without saved password Tools improvement New tool!Solution Components Mover (v1.2014.5.22) Transfer solution components from one solution to another one Import/Export NN relationships (v1.2014.3.7) Allows you to import and export many to many relationships Tools updatesAttribute Bulk Updater (v1.2014.5.28) Audit Center (v1.2014.5.28) View Layout Replicator (v1.2014.5.28) Scrip...Microsoft Ajax Minifier: Microsoft Ajax Minifier 5.10: Fix for Issue #20875 - echo switch doesn't work for CSS CSS should honor the SASS source-file comments JS should allow multi-line comment directivesClosedXML - The easy way to OpenXML: ClosedXML 0.71.1: More performance improvements. It's faster and consumes less memory.Kartris E-commerce: Kartris v2.6002: Minor release: Double check that Logins_GetList sproc is present, sometimes seems to get missed earlier if upgrading which can give error when viewing logins page Added CSV and TXT export option; this is not Google Products compatible, but can give a good base for creating a file for some other systems such as Amazon Fixed some minor combination and options issues to improve interface back and front Turn bitcoin and some other gateways off by default Minor CSS changes Fixed currenc...SimCityPak: SimCityPak 0.3.1.0: Main New Features: Fixed Importing of Instance Names (get rid of the Dutch translations) Added advanced editor for Decal Dictionaries Added possibility to import .PNG to generate new decals Added advanced editor for Path display entriesTiny Deduplicator: Tiny Deduplicator 1.0.1.0: Increased version number to 1.0.1.0 Moved all options to a separate 'Options' dialog window. Allows the user to specify a selection strategy which will help when dealing with large numbers of duplicate files. Available options are "None," "Keep First," and "Keep Last"Player Framework by Microsoft: Player Framework for Windows and WP v2.0: Support for new Universal and Windows Phone 8.1 projects for both Xaml and JavaScript projects. See a detailed list of improvements, breaking changes and a general overview of version 2 ADDITIONAL DOWNLOADSSmooth Streaming Client SDK for Windows 8 Applications Smooth Streaming Client SDK for Windows 8.1 Applications Smooth Streaming Client SDK for Windows Phone 8.1 Applications Microsoft PlayReady Client SDK for Windows 8 Applications Microsoft PlayReady Client SDK for Windows 8.1 Applicat...TerraMap (Terraria World Map Viewer): TerraMap 1.0.6: Added support for the new Terraria v1.2.4 update. New items, walls, and tiles Added the ability to select multiple highlighted block types. Added a dynamic, interactive highlight opacity slider, making it easier to find highlighted tiles with dark colors (and fixed blurriness from 1.0.5 alpha). Added ability to find Enchanted Swords (in the stone) and Water Bolt books Fixed Issue 35206: Hightlight/Find doesn't work for Demon Altars Fixed finding Demon Hearts/Shadow Orbs Fixed inst...New ProjectsBooki-Framework: A very super simple framework for develop application on .net (University assignment)C# Datalayer Using Stored Procedures for CRUD Operations: A C# .net data layer that uses stored procedures for crud operations working on any database, while still utilizing object orientated design practices.CoMaSy: Contact Management InfoComposite Iconote: Composite Iconote is a .NET composite. This is a Final Project of Component-Oriented Programming subject in Duta Wacana Christian University YogyakartaCredit Component: CreditComponent give you more attractive view to present who is the developer from any desktop software, many animation can introduce whom the developer isDaQiu: ?????????,??????????????????Database Helper: Rapid Development of CRUD Operationdi_academy_test: Test projectEasy Rent - Car rental software: Easy Rent software is an open source vehicle rental software.Excel Trader: Current project aims to provide an Excel(TM) interface through ExcelDNA for the IBRx, QFIXRx and SusicoTrader API.FXJ Learning Project: This is a learning project with TFS serviceImage View Slider: This is a .NET component. We create this using VB.NET. Here you can use an Image Viewer with several properties to your application form. Try this out!Indonesian Red-Letter Day Calendar: This is an Indonesian version of Red Letter Day Calendar, a final project for Component Oriented Programming course in Duta Wacana Christian University.jquery learning: jquery learningMakePanoForGoogle: Converts Panorama created by Microsoft ICE to format compatible to Google ViewsPWA_AppWeb: This page and all its content were developed by José Brazeta, Luis Carta and João Martins as an assignment for Advanced Web Programing (AEP).SoccerEvaluator: Proyecto para realizar evaluaciones de marcadores de futbolTooltip Web Preview: WebPreview is a component which was made to preview a web page before the link is clicked.Traditional Calendar Component: Hello this is a component which will help you to convert BC calendar to Javanese Calendar and Chinese Calendar. Hope this can help you on developing aps :)Typed YetiBowl The Game: Typescript Version of Yetibowl, intended for comparing Yetibowl in Javascript vs Typescript

    Read the article

  • Google is not treating two Australian schools as separate sites when both are subdomains of qld.edu.au

    - by LuckySpoon
    My question relates to two websites, each of which is a "Calvary Christian College", however in two totally different locations and unrelated to each other entirely (except by name, and thus domain). All schools in the state are issued a <school-name>.qld.edu.au subdomain, in this case calvary.qld.edu.au and calvarycc.qld.edu.au. Now what's interesting is that these domains are crossing each other in sitelinks for searches such as calvary christian college townsville. The green data here is for one school (the Townsville school, as per search term), and the red data is for the other school. I've put a demotion in for this 6 months ago (we control calvary.qld.edu.au), however we're seeing no change on the results page. I have been able to get the owners of calvarycc.qld.edu.au to submit demotions for our domain, which should go in sometime in the next few days. What can we do to tell Google that these websites are not interchangeable, despite both appearing as "subdomains" of qld.edu.au? We can possibly open channels of communication with the administrators of qld.edu.au but will need to tell them what we need to change, and at this point I'm out of ideas.

    Read the article

  • Configuring Cisco 877W router from scratch for DHCP, WiFi, ADSL2+, NAT

    - by David M Williams
    Hi all, I apologise if this is a BIG question but I am quite lost with the Cisco IOS. I know what I want to achieve just not how to do it :( I have a Cisco 877W router with 4 FastEthernet interfaces, 1 ATM interface and 1 802.11 Radio. I want to set it up for a small network and am trying to construct a configuration below. I was using Google to try and flesh it out but I think I need help and guidance from actual experts! If it helps, output from show ver says Cisco IOS software, C870 software (C870-ADVSECURITYK9-M), version 12.4(4)T7, release software (fc1) ROM: System bootstrap, version 12.3(8r)YI4, release software Here's what I have so far, which hopefully outlines clearly enough what I am wanting to do. The bits in angle brackets are placeholders (eg the secret password). ! ! Set router hostname ! hostname Shazam ! ! Set usernames and passwords ! username david privilege 15 secret 0 <PASSWORD> enable secret <SECRETPASSWORD> ! ! Configure SSH and telnet access ! line vty 0 4 privilege level 15 login local transport input telnet ssh ! ! Local logging ! logging buffered 51200 warning ! ! Set date and time for NSW, Australia (GMT +10h) ! ! ! Set router IP address to 192.168.1.1 on FastEthernet0 port ! interface FastEthernet0 ip address 192.168.1.1 255.255.255.0 no shut ip nat inside ! ! Forward any unknown DNS requests to Google ! ip dns server ip name-server 8.8.8.8 ip name-server 8.8.4.4 ! ! Set up DHCP ! DHCP pool covers 192.168.1.100 - .199 ! Set gateway and DNS server to be the router, ie 192.168.1.1 ! service dhcp ip routing ip dhcp excluded-address 192.168.1.1 192.168.1.99 ip dhcp excluded-address 192.168.1.200 192.168.1.255 ip dhcp pool <DHCPPOOLNAME> network 192.168.1.0 255.255.255.0 default-router 192.168.1.1 dns-server 192.168.1.1 lease 7 ! ! DHCP reservations ! ! Assign IP address 192.168.1.105 to MAC address 00-21-5D-2F-58-04 ! ! Configure ADSL2 connection details ! interface atm dsl operating-mode adsl2+ ! ! Set up NAT rules ! ! Forward port 35394 to 192.168.1.105 ! ! Set up WiFi ! ! SSID visible, WPA2 security, Pre-shared key I'm hoping most of this is boiler-plate stuff to you guys. I'm keen to not just get a working script but to actually understand it also. Unfortunately, I'm finding the Cisco reference material online very complex. Thank you!

    Read the article

  • Retrive unchanged data

    - by cnkt
    How can i get the Doctrine_Record's unchanged version of field data. For example; echo $user->username; // Prints 'David' $user->username = 'John'; echo $user->username; // Prints 'John' How to get the pre-changed value (David)?

    Read the article

  • Mysql: how to extract multiple text files from my mysql table

    - by Patrick
    hi, I need to extract data from my mysql database into multiple text files. I have a table with 4 columns: UserID, UserName, Tag, Score. I need to create a text file for each Tag, with the userID, the userName and score (ordered by score) i.e. Tag1.txt 234922 John 35 234294 David 205 392423 Patrick 21 Tag2.txt 234922 John 35 234294 David 205 392423 Patrick 21 and so on... Edited: Sample: http://dl.dropbox.com/u/72686/expertsTable.png thanks

    Read the article

  • Sorting tree with other column in SQL Server 2008

    - by bodziec
    Hi, I have a table which implements a tree using hierarchyid column Sample data: People \ Girls \1\ Zoey \1\1\ Kate \1\2\ Monica \1\3\ Boys \2\ Mark \2\1\ David \2\2\ This is the order using hierarchyid column as sort column I would like to sort data using hierarchyid but also using name so it would look like this: People \ Boys \2\ David \2\2\ Mark \2\1\ Girls \1\ Kate \1\2\ Monica \1\3\ Zoey \1\1\ Is there a simple solution to do this? Czy da sie to zrobic w jednym zapytaniu sql ?

    Read the article

  • Thread resource sharing

    - by David
    I'm struggling with multi-threaded programming... I have an application that talks to an external device via a CAN to USB module. I've got the application talking on the CAN bus just fine, but there is a requirement for the application to transmit a "heartbeat" message every second. This sounds like a perfect time to use threads, so I created a thread that wakes up every second and sends the heartbeat. The problem I'm having is sharing the CAN bus interface. The heartbeat must only be sent when the bus is idle. How do I share the resource? Here is pseudo code showing what I have so far: TMainThread { Init: CanBusApi =new TCanBusApi; MutexMain =CreateMutex( "CanBusApiMutexName" ); HeartbeatThread =new THeartbeatThread( CanBusApi ); Execution: WaitForSingleObject( MutexMain ); CanBusApi->DoSomething(); ReleaseMutex( MutexMain ); } THeartbeatThread( CanBusApi ) { Init: MutexHeart =CreateMutex( "CanBusApiMutexName" ); Execution: Sleep( 1000 ); WaitForSingleObject( MutexHeart ); CanBusApi->DoHeartBeat(); ReleaseMutex( MutexHeart ); } The problem I'm seeing is that when DoHeartBeat is called, it causes the main thread to block while waiting for MutexMain as expected, but DoHeartBeat also stops. DoHeartBeat doesn't complete until after WaitForSingleObject(MutexMain) times out in failure. Does DoHeartBeat execute in the context of the MainThread or HeartBeatThread? It seems to be executing in MainThread. What am I doing wrong? Is there a better way? Thanks, David

    Read the article

  • Array of ArrayList Java

    - by David Bobo
    Hi, I am creating an PriorityQueue with multiple queues. I am using an Array to store the multiple ArrayLists that make up my different PriorityQueues. Here is what I have for my constructor so far: ArrayList<ProcessRecord> pq; ArrayList[] arrayQ; MultiList(){ arrayQ = new ArrayList[9]; pq = new ArrayList<ProcessRecord>(); } The problem comes when I am trying to get the size of the entire array, that is the sum of the sizes of each ArrayList in the array. public int getSize(){ int size = 0; for(int i = 1; i <=9; i++){ size = size + this.arrayQ[i].size(); } return size; } is not seeming to work. Am I declaring the Array of ArrayList correctly? I keep getting an error saying that this.arrayQ[i].size() is not a method. (the .size() being the problem) Thanks for any help! David

    Read the article

  • Visual Studio template not showing

    - by David
    Hi all I've followed this tutorial to try to add a template to Visual Studio: http://www.switchonthecode.com/tutorials/visual-studio-how-to-create-item-templates The template I have created is designed to add one predefined .aspx and one predefined .aspx.cs file to the project. The folder contains the following files: MoosePage.aspx MoosePage.aspx.cs MoosePage.vstemplate MoosePageItemTemplateIcon.ico The .vstemplate file looks like this: <VSTemplate Type="Item" Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005"> <TemplateData> <Name>MoosePage</Name> <Description>MoosePage Template</Description> <DefaultName>NewMoosePage</DefaultName> <ProjectType>CSharp</ProjectType> <Icon>MoosePageItemTemplateIcon.ico</Icon> </TemplateData> <TemplateContent> <ProjectItem TargetFileName="$fileinputname$.aspx" ReplaceParameters="true"> MoosePage.aspx </ProjectItem> <ProjectItem TargetFileName="$fileinputname$.aspx.cs" ReplaceParameters="true"> MoosePage.aspx.cs </ProjectItem> </TemplateContent> </VSTemplate> I have zipped the files up (.zip not .zipx) and placed the zip folder in My Documents\Visual Studio 2008\Templates\ItemTemplates\VisualWebDeveloper. I have restarted Visual Studio. When I go into my website project and choose Add New Item, I don't see my new template. Can anyone suggest what might have gone wrong? Thanks David

    Read the article

  • Need advice on OOP philosophy

    - by David Jenings
    I'm trying to get the wheels turning on a large project in C#. My previous experience is in Delphi, where by default every form was created at applicaton startup and form references where held in (gasp) global variables. So I'm trying to adapt my thinking to a 100% object oriented environment, and my head is spinning just a little. My app will have a large collection of classes Most of these classes will only really need one instance. So I was thinking: static classes. I'm not really sure why, but much of what I've read here says that if my class is going to hold a state, which I take to mean any property values at all, I should use a singleton structure instead. Okay. But there are people out there who for reasons that escape me, think that singletons are evil too. None of these classes is in danger of being used anywhere except in this program. So they could certainly work fine as regular objects (vs singletons or static classes) Then there's the issue of interaction between objects. I'm tempted to create a Global class full of public static properties referencing the single instances of many of these classes. I've also considered just making them properties (static or instance, not sure which) of the MainForm. Then I'd have each of my classes be aware of the MainForm as Owner. Then the various objects could refer to each other as Owner.Object1, Owner.Object2, etc. I fear I'm running out of electronic ink, or at least taxing the patience of anyone kind enough to have stuck with me this long. I hope I have clearly explained my state of utter confusion. I'm just looking for some advice on best practices in my situation. All input is welcome and appreciated. Thanks in advance, David Jennings

    Read the article

  • Is there a GUI that I can use to create XML documents based on my schema?

    - by David Conlisk
    Hi all, I want to create a simple graphical user interface to allow non-technical users to create an XML file without having to manually edit the XML source. Ideally I'd like a drag and drop interface, but failing that, anything really. The contents of the XML file are similar to an encoded flow chart of a binary tree, so maybe something like Visio, with a save as xml option? Here's a quick sample of the XML output that is required: <?xml version="1.0" encoding="utf-8"?> <steps> <step id="1" type="prompt"> <prompt> Welcome. </prompt> <next>1.1</next> </step> <step id="1.1" type="question"> <prompt> Do you have what you need? </prompt> <yes>1.2</yes> <no>1.1.1</no> </step> ... </steps> Are there any existing tools out there that you can recommend for this purpose? Ideally open-source or with a free personal license, but I'm interested in hearing about all options. Thanks, David

    Read the article

  • Checkstyle: cannot summarise issues per author ?

    - by David Michel
    Hi all, I'm trying to use checkstyle for a java project but I can't seem to get it working properly: While it apparently runs smoothly, the html report doesn't give any info per authors as it should, i.e. the authors table is empty. The thing is I don't know how checkstyle identify an author. Does it look at the java doc tag @author ? at the class level or at the method level ? The ant task I used is below: <taskdef resource="checkstyletask.properties" classpath="${libs.dir}/checkstyle-all-5.0.jar"/> <target name="checkstyle" description="Generates a report of code convention violations."> <mkdir dir="${checkstyle.dir}"/> <checkstyle config="${util.dir}/checkstyle/sun_checks.xml" failureProperty="checkstyle.failure" failOnViolation="false"> <formatter type="xml" tofile="${checkstyle.dir}/checkstyle_report.xml"/> <fileset dir="${src.dir}" includes="**/*.java"/> </checkstyle> <xslt in="${checkstyle.dir}/checkstyle_report.xml" out="${checkstyle.dir}/checkstyle_report.html" style="${util.dir}/checkstyle/checkstyle-author.xsl"/> </target> Many thanks for your help David

    Read the article

  • Run a .java file using ProcessBuilder

    - by David K
    I'm a novice programmer working in Eclipse, and I need to get multiple processes running (this is going to be a simulation of a multi-computer system). My initial hackup used multiple threads to multiple classes, but now I'm trying to replace the threads with processes. From my reading, I've gleaned that ProcessBuilder is the way to go. I have tried many many versions of the input you see below, but cannot for the life of me figure out how to properly use it. I am trying to run the .java files I previously created as classes (which I have modified). I eventually just made a dummy test.java to make sure my process is working properly - its only function is to print that it ran. My code for the two files are below. Am I using ProcessBuilder correctly? Is this the correct way to read the output of my subprocess? Any help would be much appreciated. David primary process package Control; import java.io.*; import java.lang.*; public class runSPARmatch { /** * @param args */ public static void main(String args[]) { try { ProcessBuilder broker = new ProcessBuilder("javac.exe","test.java","src\\Broker\\"); Process runBroker = broker.start(); Reader reader = new InputStreamReader(runBroker.getInputStream()); int ch; while((ch = reader.read())!= -1) System.out.println((char)ch); reader.close(); runBroker.waitFor(); System.out.println("Program complete"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } } subprocess package Broker; public class test { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub System.out.println("This works"); } }

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >