Search Results

Search found 7 results on 1 pages for 'retrocoder'.

Page 1/1 | 1 

  • Event Viewer shows service name as a truncated 8 character name

    - by Retrocoder
    I have written a service which logs to the Windows Event Log when it has any problems. This works fine and the service name is shown correctly in the Source column of the Event Viewer. The problem I am seeing is when my service hits some major problems like the networking layer has died etc. When this happens the event log shows errors about my service but the service name is shown as a truncated 8 character name. This name looks to be that of the executable and not the service name. Is this normal behaviour for a truncated name to be show ?

    Read the article

  • Which service should I make mine dependant on ?

    - by Retrocoder
    I want to add a dependency to my service so that it only tries to start after most of the Windows services have started. Can anyone recommend such a service that is unlikely to have been disabled for security reasons on corporate sites. As my service needs the networking services up and running I want to make sure mine starts after these. This service may also be deployed in non-corporate environments so I’m looking for a suitable service that is unlikely to have been disabled by the end user.

    Read the article

  • slow SQL command

    - by Retrocoder
    I need to take some data from one table (and expand some XML on the way) and put it in another table. As the source table can have thousands or records which caused a timeout I decided to do it in batches of 100 records. The code is run on a schedule so doing it in batches works ok for the customer. If I have say 200 records in the source database the sproc runs very fast but if there are thousands it takes several minutes. I'm guessing that the "TOP 100" only takes the top 100 after it has gone through all the records. I need to change the whole code and sproc at some point as it doesn't scale but for now is there a quick fix to make this run quicker ? INSERT INTO [deviceManager].[TransactionLogStores] SELECT TOP 100 [EventId], [message].value('(/interface/mac)[1]', 'nvarchar(100)') AS mac, [message].value('(/interface/device) [1]', 'nvarchar(100)') AS device_type, [message].value('(/interface/id) [1]', 'nvarchar(100)') AS device_id, [message].value('substring(string((/interface/id)[1]), 1, 6)', 'nvarchar(100)') AS store_id, [message].value('(/interface/terminal/unit)[1]', 'nvarchar(100)') AS unit, [message].value('(/interface/terminal/trans/event)[1]', 'nvarchar(100)') AS event_id, [message].value('(/interface/terminal/trans/data)[1]', 'nvarchar(100)') AS event_data, [message].value('substring(string((/interface/terminal/trans/data)[1]), 9, 11)', 'nvarchar(100)') AS badge, [message].value('(/interface/terminal/trans/time)[1]', 'nvarchar(100)') AS terminal_time, MessageRecievedAt_UTC AS db_time FROM [deviceManager].[TransactionLog] WHERE EventId > @EventId --WHERE MessageRecievedAt_UTC > @StartTime AND MessageRecievedAt_UTC < @EndTime ORDER BY terminal_time DESC

    Read the article

  • Walking a hierarchy table with Linq

    - by Retrocoder
    I have a table with two columns, GroupId and ParentId (both are GUIDS). The table forms a hierarchy so I can look for a value in the “GroupId” filed, when I have found it I can look at its ParentId. This ParentId will also appear in the GroupId of a different record. I can use this to walk up the hierarchy tree from any point to the root (root is an empty GUID). What I’d like to do is get a list of records when I know a GroupId. This would be the record with the GroupId and all the parents back to the root record. Is this possible with Linq and if so, can anyone provide a code snippet?

    Read the article

  • how to show a UTC time as local time in a webpage

    - by Retrocoder
    I have a database that holds a time as UTC. This time can be shown in a webpage, so I’ve been asked to show it as local time in the page as it can be viewed from any country. A colleague mentioned something about getting the country settings from the current thread but I couldn’t find any details on this. Is what I want to do possible?

    Read the article

  • Help needed to align controls in a webpage

    - by Retrocoder
    I’m not too familiar with webpage design and am having a problem. I have the following datalist which is displayed ok but it is the section near the bottom that I am having with. I want the Hyperlink image to be on the same line as the “Details” text. Unfortunately the text appears below the Hyperlink control. Is there an easy fix to get what I want ? Should I be using the “div” mark-up instead of and ? <asp:DataList ID="dgDownloads" Width="100%" runat="server" EnableViewState="false" > <ItemTemplate> <tr> <td> <h3 class="mast3"><%# DataBinder.Eval (Container.DataItem, "Alias", "Reported by : {0}")%></h3> </td> <td> <h3 class="mast3"><%# DataBinder.Eval(Container.DataItem, "CreationDate", "Reported on : {0:dd/MM/yyyy}")%></h3> </td> </tr> <tr> <td colspan="2"> <h3 class="mast6"><%# ((System.Data.IDataRecord) Container.DataItem)["Heading"] %></h3> </td> </tr> <tr> <td colspan="2"> <asp:HyperLink CssClass="buttonStyle" ImageUrl="../images/bg/download.png" runat="server" NavigateUrl='<%#((System.Data.IDataRecord) Container.DataItem)["FileURL"] %>' /> <%# ((System.Data.IDataRecord) Container.DataItem)["Details"] %><ln/><br/><br/> </td> </tr> </ItemTemplate> </asp:DataList>

    Read the article

  • jQuery select by two name roots and perform one of two function depending on which root was selected

    - by RetroCoder
    I'm trying to get this code to work in jQuery and I'm trying to make sure that for each iteration of each root element, its alternate root element for that same iteration doesn't contain anything. Otherwise it sets the .val("") property to an empty string. Looking for a simple solution if possible using search, find, or swap. Each matching number is on the same row level and the same iteration count. I have two input types of input text elements with two different root names like so: 1st Root is "rootA" <input type="text" name="rootA1" /> <input type="text" name="rootA2 /> <input type="text" name="rootA3" /> 2nd Root is "rootB" <input type="text" name="rootB1" /> <input type="text" name="rootB2 /> <input type="text" name="rootB3" /> On blur if any of rootA is called call function fnRootA();. On blur if any of rootB is called call function fnRootB();. Again, I'm trying to make sure that for each iteration like 1 that the alternate root doesn't contain anything, else it sets the .val("") property to an empty string of the root being blurred. My current code works for a single element but wanted to use find or search but not sure how to construct it.. $("input[name='rootA1']").blur(function(e) { fnRootA(1); // this code just removes rootA1's value val("") //if rootB1 has something in it value property // the (1) in parenthesis is the iteration number });

    Read the article

1