Search Results

Search found 25579 results on 1024 pages for 'complex event processing'.

Page 66/1024 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • Logging Virus Definition Updates for MS Security Essentials in The Security Event Log

    - by Steve
    I would like to log a security in event in Windows 7 whenever the Microsoft Security Essentials 2 virus definition files are updates, deleted, or changed. I was expecting to do this with an Audit setting on one of the MS Security Essentials folders but I wasn't sure which one and how to avoid getting swamped with messages. What folder or files should I audit to track definition updates (or corruption) in the security events or is there a better approach?

    Read the article

  • Hotfix entries in event log

    - by Marco Shaw
    Server 2008/2008 R2 I'm trying to remotely monitor these servers to watch the progress of hotfixes being installed. I was able to find this in Server 2003/2003 R2: -Log: System -Source: NtServicePack It seems the above event is written when every hotfix is installed. I can't seem to find a comparable entry in Server 2008/2008 R2 though. Is there anything similar that I can easily monitor for remotely?

    Read the article

  • Opsview Notifications, how to report event duration

    - by dotwaffle
    At present, Opsview reports recoveries in the following format: RECOVERY: Internal Alarm is OK on host Ellie: SNMP OK - 0 Service: Internal Alarm Host: Ellie Alias: Ellie Address: 1.2.3.4 State: OK Comment: () Date/Time: Mon Oct 5 14:57:53 BST 2009 Additional Info: SNMP OK - 0 What I would ideally like to do is add a "duration" field, so that you can tell without scrolling back on a Blackberry how long the event has been at fault for. Is there an easy solution to this?

    Read the article

  • Online Event management

    - by cKK
    Hi looking for an events management solution. Admins would be able to create new event pages with information and booking forms that connect to a payment gateway. Most of what I've seen is outdated and hard to use and back office intergration is zero or minimal. the front end pages are dull and use frames!! Looking for upto date online software similar to what they are doing with Email marketing solutions (interspire, mailchimp) these application are easy to use and look the business. Thanks

    Read the article

  • Opsview Notifications, how to report event duration

    - by dotwaffle
    At present, Opsview reports recoveries in the following format: RECOVERY: Internal Alarm is OK on host Ellie: SNMP OK - 0 Service: Internal Alarm Host: Ellie Alias: Ellie Address: 1.2.3.4 State: OK Comment: () Date/Time: Mon Oct 5 14:57:53 BST 2009 Additional Info: SNMP OK - 0 What I would ideally like to do is add a "duration" field, so that you can tell without scrolling back on a Blackberry how long the event has been at fault for. Is there an easy solution to this?

    Read the article

  • Remote Server: Please wait for the System Event Notification Service

    - by Jeff Handley
    I was rebooting a remote server (Windows Server 2008 R2 Standard) over remote desktop and the session now shows the blue screen during the shutdown sequence, and the message "Please wait for the System Event Notification Service..." It seems that everything is still running on the server (for instance, http://jeffhandley.com is still responding), but I need to get the machine to finish the reboot sequence. How can I force the machine past this point? It's been stuck there for about 30 minutes.

    Read the article

  • Form Search Onkeyup event

    - by Aryan
    I Have a Form In which the form should automatically search when i complete entering the 10th character in the text field but the below code is searching for each n every character i enter in the text field . . . I just want the result after completing the 10th character not for each n every character . . i have used onkeyup event and i set that value to 10 but still it is searching for each n every character... please do help me <body OnKeyPress="return disableKeyPress(event)"> <section id="content" class="container_12 clearfix" data-sort=true> <center><table class='dynamic styled with-prev-next' data-table-tools='{'display':true}' align=center> <script> function disableEnterKey(e) { var key; if(window.event) key = window.event.keyCode; //IE else key = e.which; //firefox return (key != 13); } function showUser(str) { if (str=="") { document.getElementById("txtHint").innerHTML=""; return; } if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4 && xmlhttp.status==200) { document.getElementById("txtHint").innerHTML=xmlhttp.responseText; } } xmlhttp.open("GET","resdb.php?id="+str,true); xmlhttp.send(); } </script> <script type='text/javascript'> //<![CDATA[ $(window).load(function(){ $('#id').keyup(function(){ if(this.value.length ==10) }); });//]]> </script> <form id="form" method="post" name="form" > <tr><td><p align="center"><font size="3"><b>JNTUH - B.Tech IV Year II Semester (R07) Advance Supplementary Results - July 2012</b></font></p></td></tr> <td><p align="center"><b>Last Date for RC/RV : 8th August 2012</b></p></td> <tr><td><p align="center"></b> <input type="text" onkeyup="showUser(this.value)" onKeyPress="return disableEnterKey(event)" data-type="autocomplete" data-source="extras/autocomplete1.php" name="id" id="id" maxlength="10" placeholder=" Hall-Ticket Number">&emsp;</p></td></tr> </table> </center> </form> <center> <div id="txtHint"><b>Results will be displayed here</b></div> </center> </body>

    Read the article

  • WCF GZip Compression Request/Response Processing

    - by IanT8
    How do I get a WCF client to process server responses which have been GZipped or Deflated by IIS? On IIS, I've followed the instructions here on how to make IIS 6 gzip all responses (where the request contained "Accept-Encoding: gzip, deflate") emitted by .svc wcf services. On the client, I've followed the instructions here and here on how to inject this header into the web request: "Accept-Encoding: gzip, deflate". Fiddler2 shows the response is binary and not plain old Xml. The client crashes with an exception which basically says there's no Xml header, which ofcourse is true. In my IClientMessageInspector, the app crashes before AfterReceiveReply is called. Some further notes: (1) I can't change the WCF service or client as they are supplied by a 3rd party. I can however attach behaviors and/or message inspectors via configuration if this is the right direction to take. (2) I don't want to compress/uncompress just the soap body, but the entire message. Any ideas/solutions? * SOLVED * It was not possible to write a WCF extension to achieve these goals. Instead I followed this CodeProject article which advocate a helper class: public class CompressibleHttpRequestCreator : IWebRequestCreate { public CompressibleHttpRequestCreator() { } WebRequest IWebRequestCreate.Create(Uri uri) { HttpWebRequest httpWebRequest = Activator.CreateInstance(typeof(HttpWebRequest), BindingFlags.CreateInstance | BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { uri, null }, null) as HttpWebRequest; if (httpWebRequest == null) { return null; } httpWebRequest.AutomaticDecompression =DecompressionMethods.GZip | DecompressionMethods.Deflate; return httpWebRequest; } } and also, an addition to the application configuration file: <configuration> <system.net> <webRequestModules> <remove prefix="http:"/> <add prefix="http:" type="Pajocomo.Net.CompressibleHttpRequestCreator, Pajocomo" /> </webRequestModules> </system.net> </configuration> What seems to be happening is that WCF eventually asks some factory or other deep down in system.net to provide an HttpWebRequest instance, and we provide the helper that will be asked to create the required instance. In the WCF client configuration file, a simple basicHttpBinding is all that is required, without the need for any custom extensions. When the application runs, the client Http request contains the header "Accept-Encoding: gzip, deflate", the server returns a gzipped web response, and the client transparently decompresses the http response before handing it over to WCF. When I tried to apply this technique to Web Services I found that it did NOT work. Although the helper class was executed in the same was as when used by the WCF client, the http request did not contain the "Accept-Encoding: ..." header. To make this work for Web Services, I had to edit the Web Proxy class, and add this method: protected override System.Net.WebRequest GetWebRequest(Uri uri) { System.Net.HttpWebRequest rq = (System.Net.HttpWebRequest)base.GetWebRequest(uri); rq.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate; return rq; } Note that it did not matter whether the CompressibleHttpRequestCreator and block from the application config file were present or not. For web services, only overriding GetWebRequest in the Web Service Proxy worked.

    Read the article

  • Fluent NHibernate: mapping complex many-to-many (with additional columns) and setting fetch

    - by HackedByChinese
    I need a Fluent NHibernate mapping that will fulfill the following (if nothing else, I'll also take the appropriate NHibernate XML mapping and reverse engineer it). DETAILS I have a many-to-many relationship between two entities: Parent and Child. That is accomplished by an additional table to store the identities of the Parent and Child. However, I also need to define two additional columns on that mapping that provide more information about the relationship. This is roughly how I've defined my types, at least the relevant parts (where Entity is some base type that provides an Id property and checks for equivalence based on that Id): public class Parent : Entity { public virtual IList<ParentChildRelationship> Children { get; protected set; } public virtual void AddChildRelationship(Child child, int customerId) { var relationship = new ParentChildRelationship { CustomerId = customerId, Parent = this, Child = child }; if (Children == null) Children = new List<ParentChildRelationship>(); if (Children.Contains(relationship)) return; relationship.Sequence = Children.Count; Children.Add(relationship); } } public class Child : Entity { // child doesn't care about its relationships } public class ParentChildRelationship { public int CustomerId { get; set; } public Parent Parent { get; set; } public Child Child { get; set; } public int Sequence { get; set; } public override bool Equals(object obj) { if (ReferenceEquals(null, obj)) return false; if (ReferenceEquals(this, obj)) return true; var other = obj as ParentChildRelationship; if (return other == null) return false; return (CustomerId == other.CustomerId && Parent == other.Parent && Child == other.Child); } public override int GetHashCode() { unchecked { int result = CustomerId; result = Parent == null ? 0 : (result*397) ^ Parent.GetHashCode(); result = Child == null ? 0 : (result*397) ^ Child.GetHashCode(); return result; } } } The tables in the database look approximately like (assume primary/foreign keys and forgive syntax): create table Parent ( id int identity(1,1) not null ) create table Child ( id int identity(1,1) not null ) create table ParentChildRelationship ( customerId int not null, parent_id int not null, child_id int not null, sequence int not null ) I'm OK with Parent.Children being a lazy loaded property. However, the ParentChildRelationship should eager load ParentChildRelationship.Child. Furthermore, I want to use a Join when I eager load. The SQL, when accessing Parent.Children, NHibernate should generate an equivalent query to: SELECT * FROM ParentChildRelationship rel LEFT OUTER JOIN Child ch ON rel.child_id = ch.id WHERE parent_id = ? OK, so to do that I have mappings that look like this: ParentMap : ClassMap<Parent> { public ParentMap() { Table("Parent"); Id(c => c.Id).GeneratedBy.Identity(); HasMany(c => c.Children).KeyColumn("parent_id"); } } ChildMap : ClassMap<Child> { public ChildMap() { Table("Child"); Id(c => c.Id).GeneratedBy.Identity(); } } ParentChildRelationshipMap : ClassMap<ParentChildRelationship> { public ParentChildRelationshipMap() { Table("ParentChildRelationship"); CompositeId() .KeyProperty(c => c.CustomerId, "customerId") .KeyReference(c => c.Parent, "parent_id") .KeyReference(c => c.Child, "child_id"); Map(c => c.Sequence).Not.Nullable(); } } So, in my test if i try to get myParentRepo.Get(1).Children, it does in fact get me all the relationships and, as I access them from the relationship, the Child objects (for example, I can grab them all by doing parent.Children.Select(r => r.Child).ToList()). However, the SQL that NHibernate is generating is inefficient. When I access parent.Children, NHIbernate does a SELECT * FROM ParentChildRelationship WHERE parent_id = 1 and then a SELECT * FROM Child WHERE id = ? for each child in each relationship. I understand why NHibernate is doing this, but I can't figure out how to set up the mapping to make NHibernate query the way I mentioned above.

    Read the article

  • Sage 50 Accounts 2010 wont run on windows 7

    - by admintech
    I have sucessfuly installed Sage 50 Accounts 2010 onto my 32 bit Windows 7 machine, yet whenever i try to run it i encounter - Log Name: Application Source: Application Error Date: 24/05/2010 17:14:13 Event ID: 1000 Task Category: (100) Level: Error Keywords: Classic User: N/A Computer: LukeThomas-PC.domain.co.uk Description: Faulting application name: Sage.SBD.Platform.Installation.SoftwareUpdates.UI.exe, version: 2.0.0.91, time stamp: 0x4a8c22fe Faulting module name: igdumd32.dll, version: 8.15.10.1872, time stamp: 0x4a848a05 Exception code: 0xc0000409 Fault offset: 0x00012f96 Faulting process id: 0x1778 Faulting application start time: 0x01cafb5c2493b609 Faulting application path: C:\Program Files\Common Files\Sage SBD\Sage.SBD.Platform.Installation.SoftwareUpdates.UI.exe Faulting module path: C:\Windows\system32\igdumd32.dll Report Id: 63e2246b-674f-11df-96ba-002564c97988 Event Xml: 1000 2 100 0x80000000000000 5062 Application LukeThomas-PC.domain.co.uk Sage.SBD.Platform.Installation.SoftwareUpdates.UI.exe 2.0.0.91 4a8c22fe igdumd32.dll 8.15.10.1872 4a848a05 c0000409 00012f96 1778 01cafb5c2493b609 C:\Program Files\Common Files\Sage SBD\Sage.SBD.Platform.Installation.SoftwareUpdates.UI.exe C:\Windows\system32\igdumd32.dll 63e2246b-674f-11df-96ba-002564c97988 Any help would be appreciated as i cant find anything about this error

    Read the article

  • UISplitViewController and complex view heirarchy

    - by Jasconius
    I'm doing an iPad tech demo and I'm running into a serious technical problem. I have an app concept that leverages UISplitViewController, but NOT as the primary controller for the entire app. The app flow could be described roughly as this: Home screen (UIViewController) List-Detail "Catalog" (UISplitViewController) Super Detail Screen (UIViewController but could conceivable also be a child of SplitView). The problem is in the flow between Home and Catalog. Once a UISplitViewController view is added to the UIWindow, it starts to throw hissy fits. The problem can be summarized at this: When a UISplitView generates a popover view, it appears to then be latched to its parent view. Upon removing the UISplitView from the UIWindow subviews, you will get a CoreGraphics exception and the view will fail to be removed. When adding other views (presumably in this case, the home screen to which you are returning), they do not autorotate, instead, the UISplitView, which has failed to be removed due to a CG exception, continues to respond to the rotation instead, causing horrible rendering bugs that can't be just "dealt with". At this point, adding any views, even re-adding the SplitView, causes a cascade of render bugs. I then tried simply to leave the SplitView ever present as the "bottom" view, and keeping adding and removing the Home Screen from on top of it, but this fails as SplitView dominates the Orientation change calls, and Home Screen will not rotate, even if you call [homeScreen becomeFirstResponder] You can't put SplitView into a hierarchy like UINavigationController, you will get an outright runtime error, so that option is off the table. Modals just look bad and are discourages anyway. My presumption at this moment is that the only proper way to deal with this problem is so somehow "disarm" UISplitViewController so that it can be removed from its parent view without throwing an unhandled exception, but I have no idea how. If you want to see an app that does exactly what I need to do, check out GILT Groupe in the iPad app store. They pulled it off, but they seem to have programmed an entire custom view transition set. Help would be greatly appreciated.

    Read the article

  • FB.Event.subscribe + comments.add don't work !?

    - by user366292
    I'm trying to catch event when comment is sent. What am I doing wrong? I just want to update every user comment also to facebook group wall and that's why I need to catch the event. <fb:comments numposts="10" ></fb:comments> FB.init and event catcher: <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({ appId : 'sensored-app-id', status : true, // check login status cookie : true, // enable cookies to allow the server to access the session xfbml : true // parse XFBML }); /* All the events registered */ FB.Event.subscribe('comments.add', function (response) { // do something with response alert("comment added"); }); }; (function() { var e = document.createElement('script'); e.src = document.location.protocol + '//connect.facebook.net/fi_FI/all.js'; e.async = true; document.getElementById('fb-root').appendChild(e); }()); </script>

    Read the article

  • Actionscript 3: Force program to wait until event handler is called

    - by Jeremy Swinarton
    I have an AS 3.0 class that loads a JSON file in using a URLRequest. package { import flash.display.MovieClip; import flash.display.Loader; import flash.net.URLRequest; import flash.net.URLLoader; import flash.events.Event; public class Tiles extends MovieClip { private var mapWidth:int,mapHeight:int; private var mapFile:String; private var mapLoaded:Boolean=false; public function Tiles(m:String) { init(m); } private function init(m:String):void { // Initiates the map arrays for later use. mapFile=m; // Load the map file in. var loader:URLLoader = new URLLoader(); loader.addEventListener(Event.COMPLETE, mapHandler); loader.load(new URLRequest("maps/" + mapFile)); } private function mapHandler(e:Event):void { mapLoaded=true; mapWidth=3000; } public function getMapWidth():int { if (mapLoaded) { return (mapWidth); } else { getMapWidth(); return(-1); } } } } When the file is finished loading, the mapHandler event makes changes to the class properties, which in turn are accessed using the getMapWidth function. However, if the getMapwidth function gets called before it finishes loading, the program will fail. How can I make the class wait to accept function calls until after the file is loaded?

    Read the article

  • Visual C# GUI Designer - Recommended way of removing generated event handler-code & basic tutorial

    - by cusack
    Hi, I'm new to the Visual C# designer so these are general and pretty basic question on how to work with the designer. When we for instance add a label to a form and then double-click on it in the Visual C# designer (I'm using Microsoft Visual C# 2008 Express Edition), the following things happen: The designer generates code within Form1.Designer.cs (assume default names for simplicity) to add the label, then with the double-click it will add the event handler label1_Click to the label within Form1.Designer.cs, using the following code this.label1.Click += new System.EventHandler(this.label1_Click); and it adds the event handler method to Form1.cs private void label1_Click(object sender, EventArgs e) { } If I now remove the label only the code within Form1.Designer.cs will be removed but the label1_Click method will stay within Form1.cs even if it isn't used by anything else. But if I'm using reset within Properties-Events for the Click-event from within the designer even the label1_Click method in Form1.cs will be removed. 1.) Isn't that a little inconsistent behavior? 2.) What is the recommended way of removing such generated event handler-code? 3.) What is the best "mental approach"/best practice for using the designer? I would approach it by mental separation in the way that Form1.cs is 100% my responsibility and that on the other hand I'm not touching the code in Form1.Designer.cs at all. Does that make sense or not? Since sometimes the designer removes sth. from Form1.cs I'm not sure about this. 4.) Can you recommend a simple designer tutorial that assumes no Visual C# designer knowledge but expects/doesn't explain C#. The following one is an example of what I would not want it explains what a c#-comment is and I'd prefer text over video as well: http://msdn.microsoft.com/en-us/beginner/bb964631.aspx

    Read the article

  • Complex(?) regex: Is expression, but not another

    - by Kieron
    (If you can make a better title, please do) Hi, I need to make sure a string matches the following regex: ^[0-9a-zA-Z]{1}[0-9a-zA-Z\.\-_]*$ (Starts with a letter or number, then any number of letters, numbers, dots, dashes or underscores) But given that, I need to make sure it doesn't match a Guid, my Guid matching reg-ex looks like this (obviously, this needs to be negated in the merged result): ^([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}$ The last requirement here is that they must (if it's possible) be merged into a single expression.

    Read the article

  • jQuery DataTables server side processing and ASP.Net

    - by Chad
    I'm trying to use the server side functionality of the jQuery Datatables plugin with ASP.Net. The ajax request is returning valid JSON, but nothing is showing up in the table. I originally had problems with the data I was sending in the ajax request. I was getting a "Invalid JSON primative" error. I discovered that the data needs to be in a string instead of JSON serialized, as described in this post: http://encosia.com/2008/06/05/3-mistakes-to-avoid-when-using-jquery-with-aspnet-ajax/. I wasn't quite sure how to fix that, so I tried adding this in the ajax request: "data": "{'sEcho': '" + aoData.sEcho + "'}" If the aboves eventually works I'll add the other parameters later. Right now I'm just trying to get something to show up in my table. The returning JSON looks ok and validates, but the sEcho in the post is undefined, and I think thats why no data is being loaded into the table. So, what am I doing wrong? Am I even on the right track or am I being stupid? Does anyone ran into this before or have any suggestions? Here's my jQuery: $(document).ready(function() { $("#grid").dataTable({ "bJQueryUI": true, "sPaginationType": "full_numbers", "bServerSide":true, "sAjaxSource": "GridTest.asmx/ServerSideTest", "fnServerData": function(sSource, aoData, fnCallback) { $.ajax({ "type": "POST", "dataType": 'json', "contentType": "application/json; charset=utf-8", "url": sSource, "data": "{'sEcho': '" + aoData.sEcho + "'}", "success": fnCallback }); } }); }); HTML: <table id="grid"> <thead> <tr> <th>Last Name</th> <th>First Name</th> <th>UserID</th> </tr> </thead> <tbody> <tr> <td colspan="5" class="dataTables_empty">Loading data from server</td> </tr> </tbody> </table> Webmethod: <WebMethod()> _ Public Function ServerSideTest() As Data Dim list As New List(Of String) list.Add("testing") list.Add("chad") list.Add("testing") Dim container As New List(Of List(Of String)) container.Add(list) list = New List(Of String) list.Add("testing2") list.Add("chad") list.Add("testing") container.Add(list) HttpContext.Current.Response.ContentType = "application/json" Return New Data(HttpContext.Current.Request("sEcho"), 2, 2, container) End Function Public Class Data Private _iTotalRecords As Integer Private _iTotalDisplayRecords As Integer Private _sEcho As Integer Private _sColumns As String Private _aaData As List(Of List(Of String)) Public Property sEcho() As Integer Get Return _sEcho End Get Set(ByVal value As Integer) _sEcho = value End Set End Property Public Property iTotalRecords() As Integer Get Return _iTotalRecords End Get Set(ByVal value As Integer) _iTotalRecords = value End Set End Property Public Property iTotalDisplayRecords() As Integer Get Return _iTotalDisplayRecords End Get Set(ByVal value As Integer) _iTotalDisplayRecords = value End Set End Property Public Property aaData() As List(Of List(Of String)) Get Return _aaData End Get Set(ByVal value As List(Of List(Of String))) _aaData = value End Set End Property Public Sub New(ByVal sEcho As Integer, ByVal iTotalRecords As Integer, ByVal iTotalDisplayRecords As Integer, ByVal aaData As List(Of List(Of String))) If sEcho <> 0 Then Me.sEcho = sEcho Me.iTotalRecords = iTotalRecords Me.iTotalDisplayRecords = iTotalDisplayRecords Me.aaData = aaData End Sub Returned JSON: {"__type":"Data","sEcho":0,"iTotalRecords":2,"iTotalDisplayRecords":2,"aaData":[["testing","chad","testing"],["testing2","chad","testing"]]}

    Read the article

  • Drupal vs ExpressionEngine for any kind of project from simple commercial site to complex ecommerce

    - by artmania
    Hi friends... So far I've been using custom cms. lately I developed own cms with CodeIgniter, and I'm actually happy. But recently I take more design and front-end development works than deep development projects. I actually also prefer so... I have many things to do with custom cms, also some security issues, etc. I'm kind of tired of doing everyhing custom, also I want to give more time to my family... Recently I'm seriously considering to go for a ready cms, and develop custom plugins when project need sth specific. This cms should be very flexible to implement any layout. also secured (since i had some hack problems with my custom cms!) I googled so much about this. As a result 2 options: Drupal Expression Engine opensource or licensed matter is not an issue for me at all. I just consider to go for a cms that I can use for any kind of project from simple 4-5 pages company sites to complicated projects like hotels directory, ecommerce portals, etc... As I found out; EE is more userfriendly and doesnt hassle about implementing custom layout as much as Drupal does. Also EE use CodeIgniter that I'm familiar. on the other hand I found out that Drupal is 10000% flexible, we can do anything with that (requires good php knowledge), extremely powerful and has many plugins... So I can't decide!! I want to go for a cms that I will use for looooong years from now on with no problems to implement any kind of project. So which one do you recommend? Appreciate your helps! thanks a lot... Edited: http://expressionengine.com/ee2_sneak_preview/#cost this Commercial License $299.95 is for 1 setup? So I need to purchase new licence for each project? Nothing like I pay once, and use the cms for as many project as I want?

    Read the article

  • Complex query in nHibernate using DetachedCriteria

    - by paszczi
    Hello! I'm currently trying to move from hand-crafted hql to queries constructed via DetachedCriteria. I have and HQL: from GenericObject genericObject left join fetch genericObject.Positions positions where (positions.Key.TrackedSourceID, positions.Key.PositionTimestamp) in (select gp.Key.TrackedSourceID, max(gp.Key.PositionTimestamp) from GenericPosition gp group by gp.Key.TrackedSourceID) Now using DetachedCriteria: var subquery = DetachedCriteria .For (typeof (GenericPosition), "gp") .SetProjection (Projections.ProjectionList () .Add (Projections.Property ("gp.Key.TrackedSourceID")) .Add (Projections.Max ("gp.Key.PositionTimestamp")) .Add (Projections.GroupProperty ("gp.Key.TrackedSourceID")) ); var criteriaQuery = DetachedCriteria .For (typeof (GenericObject), "genericObject") .CreateAlias ("genericObject.Positions", "positions") .SetFetchMode ("genericObject.Positions", FetchMode.Eager) .Add (Subqueries.In (??, subquery)) I don't know what to type instead of ?? to create expression like (positions.Key.TrackedSourceID, positions.Key.PositionTimestamp)

    Read the article

  • URGENT : Consuming apachesoap:Map complex datatype in webservice using .net with webservice methods

    - by aaaaaa
    web service methods written in java & a method return type is map how can i get value from map type? when i call getDetails then it return result properly but when i call getCit method it return a nothing in response because of map type. i .net there is no data type like map type Dim objweb As New WebRef.FetchService Dim oht As WebRef.Pat Dim ohtm As New WebRef.Map oht = objweb.getDetails("17") ohtm = objweb.getCit(New String() {"21"}, aa, 1) thx

    Read the article

  • iPhone Image Processing--matrix convolution

    - by James
    I am implementing a matrix convolution blur on the iPhone. The following code converts the UIImage supplied as an argument of the blur function into a CGImageRef, and then stores the RGBA values in a standard C char array. CGImageRef imageRef = imgRef.CGImage; int width = imgRef.size.width; int height = imgRef.size.height; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); unsigned char *pixels = malloc((height) * (width) * 4); NSUInteger bytesPerPixel = 4; NSUInteger bytesPerRow = bytesPerPixel * (width); NSUInteger bitsPerComponent = 8; CGContextRef context = CGBitmapContextCreate(pixels, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef); CGContextRelease(context); Then the pixels values stored in the pixels array are convolved, and stored in another array. unsigned char *results = malloc((height) * (width) * 4); Finally, these augmented pixel values are changed back into a CGImageRef, converted to a UIImage, and the returned at the end of the function with the following code. context = CGBitmapContextCreate(results, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGImageRef finalImage = CGBitmapContextCreateImage(context); UIImage *newImage = [UIImage imageWithCGImage:CGBitmapContextCreateImage(context)]; CGImageRelease(finalImage); NSLog(@"edges found"); free(results); free(pixels); CGColorSpaceRelease(colorSpace); return newImage; This works perfectly, once. Then, once the image is put through the filter again, very odd, unprecedented pixel values representing input pixel values that don't exist, are returned. Is there any reason why this should work the first time, but then not afterward? Beneath is the entirety of the function. -(UIImage*) blur:(UIImage*)imgRef { CGImageRef imageRef = imgRef.CGImage; int width = imgRef.size.width; int height = imgRef.size.height; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); unsigned char *pixels = malloc((height) * (width) * 4); NSUInteger bytesPerPixel = 4; NSUInteger bytesPerRow = bytesPerPixel * (width); NSUInteger bitsPerComponent = 8; CGContextRef context = CGBitmapContextCreate(pixels, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef); CGContextRelease(context); height = imgRef.size.height; width = imgRef.size.width; float matrix[] = {0,0,0,0,1,0,0,0,0}; float divisor = 1; float shift = 0; unsigned char *results = malloc((height) * (width) * 4); for(int y = 1; y < height; y++){ for(int x = 1; x < width; x++){ float red = 0; float green = 0; float blue = 0; int multiplier=1; if(y>0 && x>0){ int index = (y-1)*width + x; red = matrix[0]*multiplier*(float)pixels[4*(index-1)] + matrix[1]*multiplier*(float)pixels[4*(index)] + matrix[2]*multiplier*(float)pixels[4*(index+1)]; green = matrix[0]*multiplier*(float)pixels[4*(index-1)+1] + matrix[1]*multiplier*(float)pixels[4*(index)+1] + matrix[2]*multiplier*(float)pixels[4*(index+1)+1]; blue = matrix[0]*multiplier*(float)pixels[4*(index-1)+2] + matrix[1]*multiplier*(float)pixels[4*(index)+2] + matrix[2]*multiplier*(float)pixels[4*(index+1)+2]; index = (y)*width + x; red = red+ matrix[3]*multiplier*(float)pixels[4*(index-1)] + matrix[4]*multiplier*(float)pixels[4*(index)] + matrix[5]*multiplier*(float)pixels[4*(index+1)]; green = green + matrix[3]*multiplier*(float)pixels[4*(index-1)+1] + matrix[4]*multiplier*(float)pixels[4*(index)+1] + matrix[5]*multiplier*(float)pixels[4*(index+1)+1]; blue = blue + matrix[3]*multiplier*(float)pixels[4*(index-1)+2] + matrix[4]*multiplier*(float)pixels[4*(index)+2] + matrix[5]*multiplier*(float)pixels[4*(index+1)+2]; index = (y+1)*width + x; red = red+ matrix[6]*multiplier*(float)pixels[4*(index-1)] + matrix[7]*multiplier*(float)pixels[4*(index)] + matrix[8]*multiplier*(float)pixels[4*(index+1)]; green = green + matrix[6]*multiplier*(float)pixels[4*(index-1)+1] + matrix[7]*multiplier*(float)pixels[4*(index)+1] + matrix[8]*multiplier*(float)pixels[4*(index+1)+1]; blue = blue + matrix[6]*multiplier*(float)pixels[4*(index-1)+2] + matrix[7]*multiplier*(float)pixels[4*(index)+2] + matrix[8]*multiplier*(float)pixels[4*(index+1)+2]; red = red/divisor+shift; green = green/divisor+shift; blue = blue/divisor+shift; if(red<0){ red=0; } if(green<0){ green=0; } if(blue<0){ blue=0; } if(red>255){ red=255; } if(green>255){ green=255; } if(blue>255){ blue=255; } int realPos = 4*(y*imgRef.size.width + x); results[realPos] = red; results[realPos + 1] = green; results[realPos + 2] = blue; results[realPos + 3] = 1; }else { int realPos = 4*((y)*(imgRef.size.width) + (x)); results[realPos] = 0; results[realPos + 1] = 0; results[realPos + 2] = 0; results[realPos + 3] = 1; } } } context = CGBitmapContextCreate(results, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); CGImageRef finalImage = CGBitmapContextCreateImage(context); UIImage *newImage = [UIImage imageWithCGImage:CGBitmapContextCreateImage(context)]; CGImageRelease(finalImage); free(results); free(pixels); CGColorSpaceRelease(colorSpace); return newImage;} THANKS!!!

    Read the article

  • How to return a complex object from an axis web service

    - by jani
    Hi all, I am writing a simple web service to return an object with 2 properties. I am embedding the service into an existing web application. My wsdd looks like this. <globalConfiguration> <parameter name="adminPassword" value="admin"/> <parameter name="sendXsiTypes" value="true"/> <parameter name="sendMultiRefs" value="true"/> <parameter name="sendXMLDeclaration" value="true"/> <parameter name="axis.sendMinimizedElements" value="true"/> <requestFlow> <handler type="java:org.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="session"/> </handler> <handler type="java:org.apache.axis.handlers.JWSHandler"> <parameter name="scope" value="request"/> <parameter name="extension" value=".jwr"/> </handler> </requestFlow> </globalConfiguration> <handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/> <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/> <handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/> <transport name="http"> <requestFlow> <handler type="URLMapper"/> <handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/> </requestFlow> </transport> <transport name="local"> <responseFlow> <handler type="LocalResponder"/> </responseFlow> </transport> <service name="helloService" provider="java:RPC" style="document" use="literal"> <parameter name="className" value="ws.example.HelloService"/> <parameter name="allowedMethods" value="*"/> <parameter name="scope" value="application"/> </service> I am able to deploy it successfully. If I try to invoke the method which returns a String, it is successfully returning the String. But when I invoke the method which returns an object, I am getting the following error. AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXParseException: Premature end of file. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(SAXParser.java:395) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:424) at org.apache.axis.transport.http.HTTPSender.readFromSocket(HTTPSender.java:796) at org.apache.axis.transport.http.HTTPSender.invoke(HTTPSender.java:144) at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32) at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118) at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:165) at org.apache.axis.client.Call.invokeEngine(Call.java:2765) at org.apache.axis.client.Call.invoke(Call.java:2748) at org.apache.axis.client.Call.invoke(Call.java:2424) at org.apache.axis.client.Call.invoke(Call.java:2347) at org.apache.axis.client.Call.invoke(Call.java:1804) at ws.example.ws.HelloServiceSoapBindingStub.getAwardById(HelloServiceSoapBindingStub.java:202) at Test.main(Test.java:21) Can any body help?

    Read the article

  • OperationalError "unable to open database file" processing query results with SQLAlchemy and SQLite3

    - by Peter
    I'm running into this little problem that I hope is just a dumb user error. It looks like some sort of a size limit with a query to a SQLite database. I managed to reproduce the issue with an in-memory DB and a simple script shown below. I can make it work by either reducing the number of records in the DB; or by reducing the size of each record; or by dropping the order_by() call. I am using Python 2.5.5 and SQLAlchemy 0.6.0 in a Cygwin environment. Thanks! #!/usr/bin/python from sqlalchemy.orm import sessionmaker import sqlalchemy import sqlalchemy.orm class Person(object): def __init__(self, name): self.name = name engine = sqlalchemy.create_engine('sqlite:///:memory:') Session = sessionmaker(bind=engine) metadata = sqlalchemy.schema.MetaData(bind=engine) person_table = sqlalchemy.Table('person', metadata, sqlalchemy.Column('id', sqlalchemy.types.Integer, primary_key=True), sqlalchemy.Column('name', sqlalchemy.types.String)) metadata.create_all(engine) sqlalchemy.orm.mapper(Person, person_table) session = Session() session.add_all([Person("012345678901234567890123456789012") for i in range(5000)]) session.commit() persons = session.query(Person).order_by(Person.name).all() print "count =", len(persons) session.close() The all() call to the query result fails with the OperationalError exception: Traceback (most recent call last): File "./stress.py", line 27, in <module> persons = session.query(Person).order_by(Person.name).all() File "/usr/lib/python2.5/site-packages/sqlalchemy/orm/query.py", line 1343, in all return list(self) File "/usr/lib/python2.5/site-packages/sqlalchemy/orm/query.py", line 1451, in __iter__ return self._execute_and_instances(context) File "/usr/lib/python2.5/site-packages/sqlalchemy/orm/query.py", line 1456, in _execute_and_instances mapper=self._mapper_zero_or_none()) File "/usr/lib/python2.5/site-packages/sqlalchemy/orm/session.py", line 737, in execute clause, params or {}) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 1109, in execute return Connection.executors[c](self, object, multiparams, params) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 1186, in _execute_clauseelement return self.__execute_context(context) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 1215, in __execute_context context.parameters[0], context=context) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 1284, in _cursor_execute self._handle_dbapi_exception(e, statement, parameters, cursor, context) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/base.py", line 1282, in _cursor_execute self.dialect.do_execute(cursor, statement, parameters, context=context) File "/usr/lib/python2.5/site-packages/sqlalchemy/engine/default.py", line 277, in do_execute cursor.execute(statement, parameters) sqlalchemy.exc.OperationalError: (OperationalError) unable to open database file u'SELECT person.id AS person_id, person.name AS person_name \nFROM person ORDER BY person.name' ()

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >