Search Results

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

Page 56/1024 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Django complex queries

    - by Josh K
    I need to craft a filter for an object that checks date ranges. Right now I'm performing a very inefficient loop which checks all the objects. I would like to simplify this to a database call. The logic is you have a start and an end date objects. I need to check if the start OR the end is within the range of an appointment. if (start >= appointment.start && start < appointment.end) || (end > appointment.start && end <= appointment.end) I could do this in SQL, but I'm not as familiar with the Django model structure for more complex queries.

    Read the article

  • SQL Syntax for Complex Scenario (Deals)

    - by Yisman
    hello everyone i have a complex query to be written but cannot figure it out here are my tables Sales --one row for each sale made in the system SaleProducts --one row for each line in the invoice (similar to OrderDetails in NW) Deals --a list of possible deals/offers that a sale may be entitled to DealProducts --a list of quantities of products that must be purchased in order to get a deal now im trying to make a query which will tell me for each sale which deals he may get the relevant fields are: Sales: SaleID (PK) SaleProducts: SaleID (FK), ProductID (FK) Deals: DealID (PK) DealProducts: DealID(FK), ProductID(FK), Mandatories (int) for required qty i believe that i should be able to use some sort of cross join or outer join, but it aint working here is one sample (of about 30 things i tried) SELECT DealProducts.DealID, DealProducts.ProductID, DealProducts.Mandatories, viwSaleProductCount.SaleID, viwSaleProductCount.ProductCount FROM DealProducts LEFT OUTER JOIN viwSaleProductCount ON DealProducts.ProductID = viwSaleProductCount.ProductID GROUP BY DealProducts.DealID, DealProducts.ProductID, DealProducts.Mandatories, viwSaleProductCount.SaleID, viwSaleProductCount.ProductCount the problem is that it doesnt show any product deals that r not fullfiled (probably because of the productid join). i need that also sales that dont have the requiremnets show up, then i can filter out any saleid that exists in this query "where AmountBought thank you for your help

    Read the article

  • Searching for a complex and well-designed PHP OOP application to learn from

    - by Raveren
    Basically, I am diving ever deeper into complex programming practices. I've almost no friends that are experienced (or more experienced than me) programmers to learn from, so I am looking for the next best thing - learning from the work of strangers. Can anyone recommend a real world finished and working application written well and OOP-centered. I'd like to take and analyze its source. Bonus if it's based on Zend Framework. What I am interested most in is objects that unlike desktop applications, have only one real operation done to them (or to their representation in DB or session) during their lifetime (or pageload), like user-logIn(). I'm interested in optimal and reusable design patterns and their real life implementations.

    Read the article

  • Thread processing in EMS connection

    - by aladine
    I am setting up a client and exchange project and both are connecting to a remote server. Exchange will connect to the server by EMS connection. While client will connect by FIX. For the aim of building of black box testing, both client and exchange engine will be given some predefined testcases to send and receive to the server. I design the client engine with multithread processing to manipulate many testcases. Actually it is able to run succesfully. For exchange engine, I wonder that multi thread is applicable in the context that the exchange engine just need to publish a message when it received msg from subscribed topic on server. Flow of messages transmission: Client--SERVER--Exchange FIX EMS Exchange--SERVER--Client EMS FIX Thanks if you can help me on this issue.

    Read the article

  • Complex nib is slow to load

    - by Dan Ray
    I'm looking for advice about a nib that's very slow to load. It's big and complex, with lots of subviews and doodads. When I fire my UINavController to push it, it's noticeably laggy (maybe almost a second) on my 3G. It sits there with the table cell selected and nothing else happening for long enough to make you wonder if it's broken. I wonder about pre-loading it in another thread while the user is on the previous view. I could probably fire the selector in the background with a delay in the previous view's viewDidAppear, and then keep it in a property until push time comes. Thoughts?

    Read the article

  • Entering Complex Data into Access

    - by DataMakesMeCrazy
    Fairly new to Access and trying to do something that seems simple, but may be very complex. I want to create a database of projects, each project has several phases (ie proposal, marketing, etc) and that will allow for multiple employees to work on a single project. Ie Bob and John are working on project number 102. From here, i would like to enter the forecasted start and end dates for each phase of the project, and enter the forecasted number our hours each employee will be allowed to work on that phase of that project ie. Project - Employee - Phase - Start - End - (list weeks) 102 - Bob - Marketing - 12-May-10 - 21-May-10 - 3 - 5 (3 hours first week, 5 hours the second) and so on Basically would all this data be on one table, or several? And can access dynamically show the weeks between the start and end date so that i can input the hours? I feel this database will become severely complicated :S Thanks, J

    Read the article

  • processing a file full of unix time strings to human readble

    - by skymook
    I am processing a file full of unix time strings. I want to convert them all to human readable. The file looks like so: 1153335401 1153448586 1153476729 1153494310 1153603662 1153640211 Here is the script: #! /bin/bash FILE="test.txt" cat $FILE | while read line; do perl -e 'print scalar(gmtime($line)), "\n"' done This is not working. The output I get is Thu Jan 1 00:00:00 1970 for every line. I think the line breaks are being picked up and that is why it is not working. Any ideas? I'm using Mac OSX is that makes any difference.

    Read the article

  • How to insert complex strings into Actionscript?

    - by Ole Jak
    How to insert complex strings into Actionscript? So I have a string -vvv -I rc w:// v dv s="60x40" --ut="#scode{vcode=FV1,acode=p3,ab=128,ch=2,rate=4400}:dup{dt=st{ac=http{mime=v/x-flv},mux=mpeg{v},dt=:80/sm.fv}}" How to insert it into code like public var SuperPuperComplexString:String = new String(); SuperPuperComplexString = TO_THAT_COMPLEX_STRING; That string has so many problems like some cart of it can happen to be like regexp BUTI DO NOT want it to be parsed as any kind of reg exp - I need It AS IT IS!) How to put that strange string into variable (put it not inputing it thru UI - hardcode it into AS code)?

    Read the article

  • Processing SMTP bounces with .net

    - by justSteve
    Am looking for examples specific to .net/mvc and servers native WinServer08 where problem being addressed is processing a bounced smtp msg so as to bind to an estore transaction and updating account/profile properties. Reading the related questions i find an interesting reference to [VERP]2. Under the heading 'Software that supports VERP i find that IIS is not on the list. Does that mean i need to find a library to integrate into my store's assembly? What resources do I have to pull together to make sure that the webapp is informed when mail bounces? fwiw - i'm working with a very low volume site.

    Read the article

  • Realtime processing and callbacks with Python and C++

    - by Doughy
    I need to write code to do some realtime processing that is fairly computationally complex. I would like to create some Python classes to manage all my scripting, and leave the intensive parts of the algorithm coded in C++ so that they can run as fast as possible. I would like to instantiate the objects in Python, and have the C++ algorithms chime back into the script with callbacks in python. Something like: myObject = MyObject() myObject.setCallback(myCallback) myObject.run() def myCallback(val): """Do something with the value passed back to the python script.""" pass Will this be possible? How can I run a callback in python from a loop that is running in a C++ module? Anyone have a link or a tutorial to help me do this correctly?

    Read the article

  • Python text file processing speed issues

    - by Anonymouslemming
    Hi all, I'm having a problem with processing a largeish file in Python. All I'm doing is f = gzip.open(pathToLog, 'r') for line in f: counter = counter + 1 if (counter % 1000000 == 0): print counter f.close This takes around 10m25s just to open the file, read the lines and increment this counter. In perl, dealing with the same file and doing quite a bit more (some regular expression stuff), the whole process takes around 1m17s. Perl Code: open(LOG, "/bin/zcat $logfile |") or die "Cannot read $logfile: $!\n"; while (<LOG>) { if (m/.*\[svc-\w+\].*login result: Successful\.$/) { $_ =~ s/some regex here/$1,$2,$3,$4/; push @an_array, $_ } } close LOG; Can anyone advise what I can do to make the Python solution run at a similar speed to the Perl solution? I've tried just uncompressing the file and dealing with it using open instead of gzip.open, but that made a very small difference to the overall time.

    Read the article

  • Writing complex records to file

    - by DrSobhani
    Hi I have defined some records in my project which may be consisted of other records and also dynamic arrays of normal data types and other records , it is n example of a record type Type1=record x:integer; end; Type2=record Y:array of X; str:string; end; When I tried to save one of variables of these records type to file with blockwrite function like this : var Temp1:Type2; begin setlength(temp1.y,100); blockwrite(MyFile,Temp1,sizeOf(Temp1); it just wrote as much as the size of pure record is ,but temp1 has a dynmic arrays which is resized , Could someone please tell me how I can write a complex record to a file , I mean something like what is used in VB6 . Thanks

    Read the article

  • Dynamically generate Triangle Lists for a Complex 3D Mesh

    - by Vulcan Eager
    In my application, I have the shape and dimensions of a complex 3D solid (say a Cylinder Block) taken from user input. I need to construct vertex and index buffers for it. Since the dimensions are taken from user input, I cannot user Blender or 3D Max to manually create my model. What is the textbook method to dynamically generate such a mesh? Edit: I am looking for something that will generate the triangles given the vertices, edges and holes. Something like TetGen. As for TetGen itself, I have no way of excluding the triangles which fall on the interior of the solid/mesh.

    Read the article

  • Access: Expression too complex to be evaluated

    - by user2502964
    I'm trying to sort out values from a database by the weekending date. The script I'm using functions on 6 of my 7 databases (they are all constructed identically). The 7th database doesn't function. I get the expression too complex error. any help figuring out why?? Here is my code: SELECT UPC_Test.Type, UPC_Test.[Model No], UPC_Test.[Model Desc], UPC_Test.[Serial No], Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy") AS [Test Date], UPC_Test.Parameter, UPC_Test.[Failure Symptom], UPC_Test.[Repair Action], UPC_Test.[Factory Select], UPC_Test.[Test Station] FROM UPC_Test GROUP BY UPC_Test.Type, UPC_Test.[Model No], UPC_Test.[Model Desc], UPC_Test.[Serial No], Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy"), UPC_Test.Parameter, UPC_Test.[Failure Symptom], UPC_Test.[Repair Action], UPC_Test.[Factory Select], UPC_Test.[Test Station] HAVING (((UPC_Test.Type)="Production") AND ((Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy"))=[Enter]) AND ((UPC_Test.[Failure Symptom])<>"") AND ((UPC_Test.[Repair Action])<>"") AND ((UPC_Test.[Test Station])="UPC RF Test")) ORDER BY Format(DateValue([UPC_Test].[Test Date]+7-Weekday([UPC_Test].[Test Date],0)),"m/d/yyyy");

    Read the article

  • Complex class using PHP soapserver mapclass

    - by user559343
    Hi all, I need to create a server for processing SOAP requests. I have the wsdl and xml specifications, but I have a doubt: the xml elements are pretty complex, they are not simple type, but they have parent/child relationships (e.g. I have a Book class with an author subclass). How can I map this to PHP classes? In this example, should I create an author class i.e.: class Author { public $name; public $surname; } and then class Book { public $author; } will $author be a class of type Author? Or a typed array? Any help will be appreciated Thanks and happy new year!

    Read the article

  • Rails controller processing as HTML instead of XML

    - by Andy
    I've recently upgraded from Ruby 1.8.6 and Rails 2.3.4 to Ruby 1.9 and Rails 3.0.3. I have the following controller: class ChartController < ApplicationController before_filter :login_required respond_to :html, :xml def load_progress chart.add( :series, "Memorized", y_memorized ) chart.add( :series, "Learning", y_learning ) chart.add( :series, "Mins / Day", y_time ) chart.add( :user_data, :secondary_y_interval, time_axis_interval ) respond_to do |fmt| fmt.xml { render :xml => chart.to_xml } end # Also tried # respond_with chart end end However, when I call the 'load_progress method' I get the following: Started GET "/load_progress.xml" for 127.0.0. Processing by ChartController#load_progress as HTML Completed 406 Not Acceptable in 251ms I have also tried changing the respond_to block to respond_with chart But I get the same response. I've read all the new Rails documentation on the new respond_with format but I can't seem to elicit an XML response. Am desperately hoping someone has some ideas.

    Read the article

  • Need help with some complex SQL query

    - by Psyche
    Hello guys, I need some help with a complex SQL query. Here's my setup: there are two tables, one with authors, and another with books. The books table contains a field named "author" which holds author's id. If a book has more than one author, then the "author" field will contain all the authors ids separated by ";" (something like 2;34;234). On the website I have to list all the books written by an author. If there's only one author, its simple, but how can I get those books where the author I'm interested in is the second or third author? Many thanks.

    Read the article

  • Securing database keys for client-side processing

    - by danp
    I have a tree of information which is sent to the client in a JSON object. In that object, I don't want to have raw IDs which are coming from the database. I thought of making a hash of the id and a field in the object (title, for example) or a salt, but I'm worried that this might have a serious effect on processing overhead. SELECT * FROM `things` where md5(concat(id,'some salt')) = md5('1some salt'); Is there a standard practice for obscuring IDs in this kind of situation?

    Read the article

  • How to modify complex argument strings in Perl

    - by mmccoo
    I have a cmdline that I'm trying to modify to remove some of the arguments. What makes this complex is that I can have nested arguments. Say that I have this: $cmdline = "-a -xyz -a- -b -xyz -b- -a -xyz -a-" I have three different -xyz flags that are to be interpreted in two different contexts. One is the -a context and the other is the -b context. I want to remove the "a" -xyz's but leave the ones in the "b" -xyz. How can I most effectively do this in Perl?

    Read the article

  • MessageBox not shown when opened processing WM_CLOSE from taskbar thumbnail close button

    - by Katana
    Trying to put up a "Do you want to save"-dialog when trying to close window with close-button in taskbar thumbnail in windows 7(with aero peek active). Using MessageBox() when processing WM_CLOSE does not work. MessageBox won't show until you move mouse cursor outside thumbnail so aero peek is disabled. Lots of applications have this buggy behaviour so it's probably a design flaw in Windows 7, but for some programs it works (Word, Notepad, Visual Studio, ...), so I'm wondering what trick they are using(or what it takes to "exit" aero peek-mode programmatically). The small "Sound Recorder" application that comes with Windows 7 has the same problem (if you have recorded something without saving and try to close it using thumbnail close-button)...

    Read the article

  • Need an efficient algorithm solve this kind of complex structure

    - by Rizvan
    Problem Statement is : Given 2 Dimensional array, print output for example If 4 rows and 6 columns, output would be: 1 2 3 4 5 6 16 17 18 19 20 7 15 24 23 22 21 8 14 13 12 11 10 9 I tried it is looking like square within square but when I attempted this problem, I put so many while and if loops but didn't got exact answer. If row and columns increases how to handle it? This is not homework. I was learning solving complex structure so I need to understand it by some guidance.

    Read the article

  • Complex SQL queries (DELETE)?

    - by Joe
    Hello all, I'm working with three tables, and for simplicity's sake let's call them table A, B, and C. Both tables A and B have a column called id, as well as one other column, Aattribute and Battribute, respectively. Column c also has an id column, and two other columns which hold values for A.id and B.id. Now, in my code, I have easy access to values for both Aattribute and Battribute, and want to delete the row at C, so effectively I want to do something like this: DELETE FROM C WHERE aid=(SELECT id FROM A WHERE Aattribute='myvalue') AND bid=(SELECT id FROM B WHERE Battribute='myothervalue') But this obviously doesn't work. Is there any way to make a single complex query, or do I have to run three queries, where I first get the value of A.id using a SELECT with 'myvalue', then the same for B.id, then use those in the final query? [Edit: it's not letting me comment, so in response to the first comment on this: I tried the above query and it did not work, I figured it just wasn't syntactically correct. Using MS Access, for what it's worth. ]

    Read the article

  • Send mail on event log error trigger safe check frequency

    - by Zeb Rawnsley
    I want to use powershell to alert me when an error occurs in the event viewer on my new Win2k12 Standard Server, I was thinking I could have the script execute every 10mins but don't want to put any strain on the server just for event log checking, here is the powershell script I want to use: $SystemErrors = Get-EventLog System | Where-Object { $_.EntryType -eq "Error" } If ($SystemErrors.Length -gt 0) { Send-MailMessage -To "[email protected]" -From $env:COMPUTERNAME + @company.co.nz" -Subject $env:COMPUTERNAME + " System Errors" -SmtpServer "smtp.company.co.nz" -Priority High } What is a safe frequency I can run this script at without hurting my server? Hardware: Intel Xeon E5410 @ 2.33GHz x2 32GB RAM 3x 7200RPM S-ATA 1TB (2x RAID1) Edit: With the help of Mathias R. Jessen's answer, I ended up attaching an event to the application & system log with the following script: Param( [string]$LogName ) $ComputerName = $env:COMPUTERNAME; $To = "[email protected]" $From = $ComputerName + "@company.co.nz"; $Subject = $ComputerName + " " + $LogName + " Error"; $SmtpServer = "smtp.company.co.nz"; $AppErrorEvent = Get-EventLog $LogName -Newest 1 | Where-Object { $_.EntryType -eq "Error" }; If ($AppErrorEvent.Length -eq 1) { $AppErrorEventString = $AppErrorEvent | Format-List | Out-String; Send-MailMessage -To $To -From $From -Subject $Subject -Body $AppErrorEventString -SmtpServer $SmtpServer -Priority High; };

    Read the article

  • Complex Event Processing with C#

    - by Soham
    Hi All, Can you suggest me a possible way to get started with CEP in C# ? By what I mean when I say, get started: A good book talking about CEP and C# A library which deals event clouds Some sample codes using the library Some good quality codes in general to get a possible feel of the problems Good blogs Anything else you might feel necessary to add for someone getting started in CEP and C# will be helpful. Thanks Soham

    Read the article

  • Intercepting touch events on activity and button on Android

    - by hgpc
    I have an Android activity with an ImageButton. I would like to execute some logic when the button is clicked and show a different image for the pressed state, but also receive the touch event on the activity. By default only the button receives the touch event. If I set the clickable attribute of the button to false then only the activity receives the touch event. What's the best way to receive the touch event in both the activity and the button?

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >