Search Results

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

Page 60/1024 | < Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >

  • Java, Massive message processing with queue manager (trading)

    - by Ronny
    Hello, I would like to design a simple application (without j2ee and jms) that can process massive amount of messages (like in trading systems) I have created a service that can receive messages and place them in a queue to so that the system won't stuck when overloaded. Then I created a service (QueueService) that wraps the queue and has a pop method that pops out a message from the queue and if there is no messages returns null, this method is marked as "synchronized" for the next step. I have created a class that knows how process the message (MessageHandler) and another class that can "listen" for messages in a new thread (MessageListener). The thread has a "while(true)" and all the time tries to pop a message. If a message was returned, the thread calls the MessageHandler class and when it's done, he will ask for another message. Now, I have configured the application to open 10 MessageListener to allow multi message processing. I have now 10 threads that all time are in a loop. Is that a good design?? Can anyone reference me to some books or sites how to handle such scenario?? Thanks, Ronny

    Read the article

  • using .append to build a complex menu

    - by gneandr
    To build a menu block which should be switchable with hide/unhide of the menu items, I'm using .append html. The code idea is this: navigat += '<h3 class="infoH3"> <a id="' + menuID +'"' + ' href="javascript:slideMenu(\'' + menuSlider + '\');">' + menuName + '</a></h3>'; navigat += '<div id="' + menuSlider + '" style="display:none">'; navigat += ' <ul>'; navigat += ' <li>aMenu1</li>' navigat += ' <li>aMenu2</li>' navigat += ' <li>aMenu3</li>' navigat += ' </ul>'; navigat += '<!-- menuName Slider --></div>'; $("#someElement").append (navigat); This is doing well .. so far. But the point is:: I use JS to read the required menu items (eg. 'aMenu1' together with title and/or link info) from a file to build all that, eg. for 'aMenu1' a complex is composed and $("#someElement").append(someString) is used to add that the 'someElement'. At the moment I build those html elements line by line. Also OK .. as far as the resulting string has the opening and closing tag, eg. "<li>aMenu2</li>". As can be seen from above posted code there is a line "<div id="' + menuSlider + '" style="display:none">". Appending that -- AFAIS -- the .append is automatically (????) adding "</div>" which closes the statement. That breaks my idea of the whole concept! The menu part isn't included in the 'menuSlider '. QQ: How to change it -- NOT to have that "</div" added to it?? Günter

    Read the article

  • Complex Quary on cassandra

    - by Sadiqur Rahman
    I have heard on cassandra database engine few days ago and searching for a good documentation on it. after studying on cassandra I got cassandra is more scalable than other data engine. I also read on Amazon SimpleDB but as SimpleDB has a limitation 10GB/table and Google Datastore is slower than Amazon SimpleDB, I prefer not to use them (Google Datastore, Amazon SimpleDB). So for making our site scaled specially high write rates with massive data, I like to use Cassandra as out Data Engine. But before starting using cassandra I am confused on "How to handle complex data using casssandra". I am giving you the MySQL database structure below, Please read this and give me a good suggestion. Users Table hasColum ID Primary hasColum email Unique hasColum FirstName hasColum LastName Category Table hasColum ID Primary hasColum Parent hasColum Category Posts Table hasColum ID Primary hasColum UID Index foreign key linked to users-ID hasColum CID Index foreign key linked to Category-ID hasColum Title hasColum Post Index hasColum PunDate Comments hasColum ID primary hasColum UID Index foreign key linked to users-ID hasColum PID Index foreign key linked to Posts-ID hasColum Comment User Group hasColum ID primary hasColum Name UserToGroup Table (for many to many relation only) hasColum UID foreign key linked to Users-ID hasColum GID foreign key linked to Group-ID Finally for your information, I like to use SimpleCassie PHP Class http://code.google.com/p/simpletools-php/ So, it will be very helpful if you can give me example using SimpleCassie

    Read the article

  • Drupal module for complex hours of operation / office hours

    - by Eronarn
    Background: I am building a website in Drupal that links together a wide variety of social service providers for the purposes of discovery, collaboration, and all that good stuff. The goal is to make a website that is simple to browse for consumers of these services and simple to update for providers of these services. The beta has been very well received, but I want to switch to a different information schema before the site goes live. Specific question: I am looking for a module (or other solution) that... Stores this data in Drupal (i.e., no GCal) Supports a wide variety of repeats Is intuitive for people editing the node (no Cron-style interfaces, please!) I have looked into several modules on drupal.org and none seem to meet all of these criteria. I've also searched here, and while this question is similar: http://stackoverflow.com/questions/2794149/drupal-create-a-node-with-employee-working-hours my needs are too complex for the offered solution. Some of these providers have "hours" such as "the third Wednesday of every month", or "open during Winter months", or separate hotline & office hours. Likewise, the Date Repeat module doesn't cut it as stands currently. I'm comfortable hacking what I need into an existing module - I just don't want to duplicate effort! If you have a suggestion on what module might be a good starting point, I'd appreciate that input, too. Thanks. <3

    Read the article

  • Processing forms that generate many rows in DB

    - by Zack
    I'm wondering what the best approach to take here is. I've got a form that people use to register for a class and a lot of times the manager of a company will register multiple people for the class at the same time. Presently, they'd have to go through the registration process multiple times and resubmit the form once for every person they want to register. What I want to do is give the user a form that has a single <input/> for one person to register with, along with all the other fields they'll need to fill out (Email, phone number, etc); if they want to add more people, they'll be able to press a button and a new <input/> will be generated. This part I know how to do, but I'm including it to best describe what I'm aiming to do. The part I don't know how to approach is processing that data the form submits, I need some way of making a new row in the Registrant table for every <input/> that's added and include the same contact information (phone, email, etc) as the first row with that row. For the record, I'm using the Django framework for my back-end code. What's the best approach here? Should it just POST the form x times for x people, or is there a less "brute force" way of handling this?

    Read the article

  • Forcing size of a complex Flash object.

    - by John
    As I've found recently, setting width/height properties on a Sprite only forces the Sprite to fit the given dimensions by scaling the actual size, which is calculated by Flash based on the rendered content. This leaves me confused. If I have a custom Sprite subclass which draws using Graphics, how can I do layout before an initial render - the size will be zero until it is first drawn? For a more complex issue, let's say I have a 2D game world with objects spread over a wide area with world coordinates from (0,0) to (5000,5000), where each object has a size of maybe up to 100x100. I want to have a Flash component which is the "game window", and has a fixed size like 400x300, rendering part of the game world. So how do I force the game window size to 400x300 pixels? I can draw a 400x300 rectangle to get the size correct but then if I draw any objects which are partly in-view, they can screw this up. Is the right approach to provide a custom setSize(w,h) method which is used rather than width & height setters? But even so, is there no way to make a Sprite force to the size I want? Do you really have to catch it every render and re-scale it?

    Read the article

  • QProcess, QEventLoop - of any use for parallel-processing

    - by dlib
    I wonder whether I could use QEventLoop (QProcess?) to parallelize multiple calls to same function with Qt. What is precisely the difference with QtConcurrent or QThread? What is a process and an event loop more precisely? I read that QCoreApplication must exec() as early as possible in main() method, so that I wonder why it is different from main Thread. could you point as some efficient reference to processes and thread with Qt? I came through the official doc and those things remain unclear. Thanks and regards.

    Read the article

  • Direct flow depending on incoming dynamic type

    - by Improfane
    I have a listener class that accepts GUI change events in one method. The incoming event objects have a superclass of a type of GUI Event, the behaviour should depend on the dynamic type of the incoming variable. I wanted to do do lots of methods like: handleGUIEvent(EventChangedX event) handleGUIEvent(EventChangedY event) I am using a single event listener and receiving objects of various types but the behaviour should be different for each. What would you do? I do not want to use a switch statement as this would get unmaintainable.

    Read the article

  • Any way to add an observer to the head of the queue using Element#observe?

    - by Josh
    This might not be possible but before I rewrite part of my application I wanted to ask... I have a JavaScript app which creates a submit <input> and observes that input's click event using Prototype's Element#observe function. For a few particular pages on one particular site which uses this app, I need to apply some additional business logic before the code which executes normally when the button is clicked. Is there any way I can use Elemen#observe to add my new event handler before the existing event handler, so I can stop the event if these new conditions aren't met? If not I'll probably solve this the "proper" way by having the application fire a specific beforeTakingAction event and add a listener for that which prevents the application from taking it's action, but that's more complicated than this simple problem requires, and requires rewriting part of a shared application for just one user...

    Read the article

  • How can I use multithreading in a Windows Forms application to update a progress bar?

    - by Steve Syfuhs
    There are two objects. The Windows Form with a button and a progress bar, and another object that handles an algorithm. In the algorithm object there is an event, and a property. The event is ProgressChanged, and the property is Progress (which is an int). In the calling window, the button starts off a set of steps in the algorithm object. As each step (or substeps) occurs, the ProgressChanged event fires, and in the window there is an event handler that essentially increments the progress bar relative to the Progress property. The problem I am running into is that because the algorithm has a possibility (and high liklihood) of running a relatively long time, I need to move it into it's own background thread and push the event back up to the window. My issue is that I'm not completely sure what I'm doing when it comes to multi-threading. I've looked at Control.Invoke and I'm a little lost. Can someone point me in the right direction?

    Read the article

  • how to make complex selectors with 'this' jquery

    - by Stomped
    I have an event handler that needs to do something to one of its children, based on some saved data. So what I'm currently doing is something like this: // Get the ID of 'this' item_id = $(this).attr('id'); // building a selector like $('#item1 .child_3') $('#' + item_id + ' .child_' + spVal).addClass('blah'); But this seems a little cumbersome. I've tried: $(this + ' .child_' + spVal).addClass('blah'); and it doesn't work, which doesn't really surprise me. Is there a better way to do this then the successful way I've outlined above?

    Read the article

  • Spreading dynamic with community structure

    - by YogurtFruit
    I have a data set which I hope to simulate the spreading dynamic with community structure. The steps I follow is import the data to a complex network with Networkx partition the network into some modules which are known as communities simulate the SIS model and draw plots with and without communities. Something confused me between step 2 and step 3. After partitioning, I get some communities which contains nodes number. The community numbers and nodes numbers are the only input to step 3, and how I simulate SIS with and without communities?

    Read the article

  • MySQL Privileges required to GRANT EVENT, EXECUTE, LOCK TABLES, and TRIGGER

    - by Brad
    I have an account, user_a, and I would like to grant all available permissions on some_db to user_b. I have tried the following query: GRANT ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE VIEW, DELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, LOCK TABLES, REFERENCES, SELECT, SHOW VIEW, TRIGGER, UPDATE ON `some_db`.* TO 'user_b'@'%' WITH GRANT OPTION The result: Access denied for user 'user_a'@'%' to database 'some_db' Some experimentation has shown me that the only permissions my account (user_a) is unable to grant are EVENT, EXECUTE, LOCK TABLES, and TRIGGER. What privileges are required for my account to GRANT these privileges to another user? If I run SHOW GRANTS, I get this output: "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, SHOW DATABASES, SUPER, CREATE TEMPORARY TABLES, REPLICATION SLAVE, REPLICATION CLIENT, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, CREATE USER ON *.* TO 'user_a'@'%' IDENTIFIED BY PASSWORD '1234567890abcdef' WITH GRANT OPTION" "GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE ON `some_other_unrelated_db`.* TO 'user_a'@'%'" "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE ROUTINE, ALTER ROUTINE ON `another_unrelated_db`.* TO 'user_a'@'%' WITH GRANT OPTION"

    Read the article

  • How do I enable a disabled Event Notification.

    - by Derick Mayberry
    I have a scenerio where I am using external notification to process documents being sent in from the entire navy fleet, normally I have no problems, but just a few days ago an administrator changed passwords and I my queue processing failed and I rolled back the transaction with this C# code: catch (Exception) { TransporterService.WriteEventToWindowsLog(AppName, "Rolling Back Transaction:", ERROR); broker.Tran.Rollback(); break; } after which my target queue would continue to fill up but nothing to the external activation queue. Does the Event Notification get disabled once a transaction is rolled back? Should I have done a broker.EndDialog here when catching my exception? Also, after my event notification is disabled(if that is actually whats happening) how do I re engage it? Do I have to drop it and recreate it? Thank in advance for any help, I love Service Broker and its workign wonderfully except for this bug that I hope to fix soon.

    Read the article

  • Windows Event Viewer - XML Custom Filter

    - by Frank
    <QueryList> <Query Id="0" Path="Application"> <Select Path="Application"> *[EventData[Data and (Data="Error")]] </Select> </Query> </QueryList> I believe the above XML custom filter would work if I wanted to check for Events where "Data" equals the word "Error". However, what I want to express is that I want the Events where Data CONTAINS the word "Error" . . . how do I express that? I've Goggled around, but I can find no references to Regular Expression like pattern matching in the Event Viewer. XPath has "contains", but if Event Viewer will support it, I cannot seem to figure out the syntax for invoking it.

    Read the article

  • Security Audit Failures in Event Viewer Windows Server 2008R2

    - by Jacob
    When I am looking at the security tab of my event viewer on a Windows Server 2008 R2, I am showing a ton of Audit Failures with Event ID 4776. The computer attempted to validate the credentials for an account. Authentication Package: MICROSOFT_AUTHENTICATION_PACKAGE_V1_0 Logon Account: randy Source Workstation: HPDB1 Error Code: 0xc0000064 I verified the account "randy" exist in my Active Directory. From my understanding, there has not been any recent password changes. Is there any way to get detailed information on this error? I am wondering what program is requesting this information. Also, is there any way to clear this error up? I was thinking about resetting the password and changing it back to the original.

    Read the article

  • Window 2003 Server - Logon Failure error message in Event Viewer

    - by user45192
    Hi guys, I received alot of event logged in the event viewer with this message. I notice is always the same user id which encounters this error. The user id is use by an application to access the database. However, this account does not exits on this server. How do I trace the services/program use by this user id which causes these error messages? Reason=Unknown user name or bad password&&User Name=&&Domain=&&Logon Type=3&&Logon Process=NtLmSsp&&Authentication Package=NTLM&&Workstation Name=&&Caller User Name=-&&Caller Domain=-&&Caller Logon ID=-&&Caller Process ID=-&&Transited Services=-&&Source Network Address=-&&Source Port=-&&User=SYSTEM&&ComputerName=

    Read the article

  • SBS Report displaying critical error events but nothing in Event Viewer

    - by evesirim
    We have a Windows Server server set up running SBS 2008 on a 64-bit architecture. When I run my daily SBS Console reports I am being told there is a critical error on the server with Event ID 56 & Source "TermDD". This is all fairly regular behaviour and I have plenty of sites I would normally troubleshoot errors on but the strange thing is there are no errors appearing in the Windows Event Viewer & I can find no help on why this might be... Has anyone experienced this before / know what might be the cause? Many thanks

    Read the article

  • Server service fails to start, event 7023, error 1079

    - by toffitomek
    Hello, Environment: Windows Server 2008 R2 fully patched, working as Domain Controller in Win 2003 native domain. Users started to report problems with share, it turned out that server service won't start. I've scrambled google but can't find a thing. Any ideas will be appreciated. Thanks in advance :) Service fails to start, then when starting service I get: Windows could not start the Server service on SERVERNAME. Error 1079: The account specified for this service is different from the account specified for other services running in the same process. In System Event Log: Event 7023 The Server service terminated with the following error: The account used is a server trust account. Use your global user account or local user account to access this server.

    Read the article

  • Eclipselink read complex object model in an ordered way

    - by Raven
    Hi, I need to read a complex model in an ordered way with eclipselink. The order is mandantory because it is a huge database and I want to have an output of a small portion of the database in a jface tableview. Trying to reorder it in the loading/quering thread takes too long and ordering it in the LabelProvider blocks the UI thread too much time, so I thought if Eclipselink could be used that way, that the database will order it, it might give me the performance I need. Unfortunately the object model can not be changed :-( The model is something like: @SuppressWarnings("serial") @Entity public class Thing implements Serializable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private int id; private String name; @OneToMany(cascade=CascadeType.ALL) @PrivateOwned private List<Property> properties = new ArrayList<Property>(); ... // getter and setter following here } public class Property implements Serializable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private int id; @OneToOne private Item item; private String value; ... // getter and setter following here } public class Item implements Serializable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private int id; private String name; .... // getter and setter following here } // Code end In the table view the y-axis is more or less created with the query Query q = em.createQuery("SELECT m FROM Thing m ORDER BY m.name ASC"); using the "name" attribute from the Thing objects as label. In the table view the x-axis is more or less created with the query Query q = em.createQuery("SELECT m FROM Item m ORDER BY m.name ASC"); using the "name" attribute from the Item objects as label. Each cell has the value Things.getProperties().get[x].getValue() Unfortunately the list "properties" is not ordered, so the combination of cell value and x-axis column number (x) is not necessarily correct. Therefore I need to order the list "properties" in the same way as I ordered the labeling of the x-axis. And exactly this is the thing I dont know how it is done. So querying for the Thing objects should return the list "properties" "ORDER BY name ASC" but of the "Item"s objects. My ideas are something like having a query with two JOINs. Joing Things with Property and with Item but somehow I was unable to get it to work yet. Thank you for your help and your ideas to solve this riddle.

    Read the article

  • Eclipselink read complex oject model in an ordered way

    - by Raven
    Hi, I need to read a complex model in an ordered way with eclipselink. The order is mandantory because it is a huge database and I want to have an output of a small portion of the database in a jface tableview. Trying to reorder it in the loading/quering thread takes too long and ordering it in the LabelProvider blocks the UI thread too much time, so I thought if Eclipselink could be used that way, that the database will order it, it might give me the performance I need. Unfortunately the object model can not be changed :-( The model is something like: @SuppressWarnings("serial") @Entity public class Thing implements Serializable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private int id; private String name; @OneToMany(cascade=CascadeType.ALL) @PrivateOwned private List<Property> properties = new ArrayList<Property>(); ... // getter and setter following here } public class Property implements Serializable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private int id; @OneToOne private Item item; private String value; ... // getter and setter following here } public class Item implements Serializable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private int id; private String name; .... // getter and setter following here } // Code end In the table view the y-axis is more or less created with the query Query q = em.createQuery("SELECT m FROM Thing m ORDER BY m.name ASC"); using the "name" attribute from the Thing objects as label. In the table view the x-axis is more or less created with the query Query q = em.createQuery("SELECT m FROM Item m ORDER BY m.name ASC"); using the "name" attribute from the Item objects as label. Each cell has the value Things.getProperties().get[x].getValue() Unfortunately the list "properties" is not ordered, so the combination of cell value and x-axis column number (x) is not necessarily correct. Therefore I need to order the list "properties" in the same way as I ordered the labeling of the x-axis. And exactly this is the thing I dont know how it is done. So querying for the Thing objects should return the list "properties" "ORDER BY name ASC" but of the "Item"s objects. My ideas are something like having a query with two JOINs. Joing Things with Property and with Item but somehow I was unable to get it to work yet. Thank you for your help and your ideas to solve this riddle.

    Read the article

  • Complex HashMap has different hashCode after serialization

    - by woezelmann
    I am parsing a xml file into a complex HashMap looking like this: Map<String, Map<String, EcmObject> EcmObject: public class EcmObject implements Comparable, Serializable { private final EcmObjectType type; private final String name; private final List<EcmField> fields; private final boolean pages; // getter, equals, hashCode } EcmObjectType: public enum EcmObjectType implements Serializable { FOLDER, REGISTER, DOCUMENT } EcmField public class EcmField implements Comparable, Serializable { private final EcmFieldDataType dataType; private final EcmFieldControlType controlType; private final String name; private final String dbname; private final String internalname; private final Integer length; // getter, equals, hashCode } EcmFieldDataType public enum EcmFieldDataType implements Serializable { TEXT, DATE, NUMBER, GROUP, DEC; } and EcmFieldControlType public enum EcmFieldControlType implements Serializable{ DEFAULT, CHECKBOX, LIST, DBLIST, TEXTAREA, HIERARCHY, TREE, GRID, RADIO, PAGECONTROL, STATIC; } I have overwritten all hashCode and equal methods by usind commons lang's EqualsBuilder and HashCodeBuilder. Now when I copy a A HashMap this way: Map<String, Map<String, EcmObject>> m = EcmUtil.convertXmlObjectDefsToEcmEntries(new File("e:\\objdef.xml")); Map<String, Map<String, EcmObject>> m2; System.out.println(m.hashCode()); ByteArrayOutputStream baos = new ByteArrayOutputStream(8 * 4096); ObjectOutputStream oos = new ObjectOutputStream(baos); oos.writeObject(m); ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray()); ObjectInputStream ois = new ObjectInputStream(bais); m2 = (Map<String, Map<String, EcmObject>>) ois.readObject(); System.out.println(m.hashCode()); System.out.println(m2.hashCode()); m.hashCode() is not equal to m2.hashCode() here is my output: -1639352210 -2071553208 1679930154 Another strange thing is, that eg. 10 times m has the same hashcode and suddenly on the 11th time the hashcode is different... Any ideas what this is about?

    Read the article

  • Problem serializing complex data using WCF

    - by Gustavo Paulillo
    Scenario: WCF client app, calling a web-service (JAVA) operation, wich requires a complex object as parameter. Already got the metadata. Problem: The operation has some required fields. One of them is a enum. In the SOAP sent, isnt the field above (generated metadata) - Im using WCF diagnostics and Windows Service Trace Viewer: [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3082")] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute("code")] [System.Xml.Serialization.XmlTypeAttribute(TypeName="Consult-Filter", Namespace="http://webserviceX.org/")] public partial class ConsFilter : object, System.ComponentModel.INotifyPropertyChanged { private PersonType customerTypeField; Property: [System.Xml.Serialization.XmlElementAttribute("customer-type", Form=System.Xml.Schema.XmlSchemaForm.Unqualified, Order=1)] public PersonType customerType { get { return this.customerTypeField; } set { this.customerTypeField = value; this.RaisePropertyChanged("customerType"); } } The enum: [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "2.0.50727.3082")] [System.SerializableAttribute()] [System.Xml.Serialization.XmlTypeAttribute(TypeName="Person-Type", Namespace="http://webserviceX.org/")] public enum PersonType { /// <remarks/> F, /// <remarks/> J, } The trace log: <MessageLogTraceRecord> <HttpRequest xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace"> <Method>POST</Method> <QueryString></QueryString> <WebHeaders> <VsDebuggerCausalityData>data</VsDebuggerCausalityData> </WebHeaders> </HttpRequest> <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"> <s:Header> <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none"></Action> <ActivityId CorrelationId="correlationId" xmlns="http://schemas.microsoft.com/2004/09/ServiceModel/Diagnostics">activityId</ActivityId> </s:Header> <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <filter xmlns="http://webserviceX.org/"> <product-code xmlns="">116</product-code> <customer-doc xmlns="">777777777</customer-doc> </filter> </s:Body> </s:Envelope> </MessageLogTraceRecord>

    Read the article

  • Error processing Spree sample images - file not recognized by identify command in paperclip geometry.rb:29

    - by purpletonic
    I'm getting an error when I run the Spree sample data. It occurs when Spree tries to load in the product data, specifically the product images. Here's the error I'm getting: * Execute db:load_file loading ruby <GEM DIR>/sample/lib/tasks/../../db/sample/spree/products.rb -- Processing image: ror_tote.jpeg rake aborted! /var/folders/91/63kgbtds2czgp0skw3f8190r0000gn/T/ror_tote.jpeg20121007-21549-2rktq1 is not recognized by the 'identify' command. <GEM DIR>/paperclip-2.7.1/lib/paperclip/geometry.rb:31:in `from_file' <GEM DIR>/spree/core/app/models/spree/image.rb:35:in `find_dimensions' I've made sure ImageMagick is installed correctly, as previously I was having problems with it. Here's the output I'm getting when running the identify command directly. $ identify Version: ImageMagick 6.7.7-6 2012-10-06 Q16 http://www.imagemagick.org Copyright: Copyright (C) 1999-2012 ImageMagick Studio LLC Features: OpenCL ... other usage info omitted ... I also used pry with the pry-debugger and put a breakpoint in geometry.rb inside of Paperclip. Here's what that section of geometry.rb looks like: # Uses ImageMagick to determing the dimensions of a file, passed in as either a # File or path. # NOTE: (race cond) Do not reassign the 'file' variable inside this method as it is likely to be # a Tempfile object, which would be eligible for file deletion when no longer referenced. def self.from_file file file_path = file.respond_to?(:path) ? file.path : file raise(Errors::NotIdentifiedByImageMagickError.new("Cannot find the geometry of a file with a blank name")) if file_path.blank? geometry = begin silence_stream(STDERR) do binding.pry Paperclip.run("identify", "-format %wx%h :file", :file => "#{file_path}[0]") end rescue Cocaine::ExitStatusError "" rescue Cocaine::CommandNotFoundError => e raise Errors::CommandNotFoundError.new("Could not run the `identify` command. Please install ImageMagick.") end parse(geometry) || raise(Errors::NotIdentifiedByImageMagickError.new("#{file_path} is not recognized by the 'identify' command.")) end At the point of my binding.pry statement, the file_path variable is set to the following: file_path => "/var/folders/91/63kgbtds2czgp0skw3f8190r0000gn/T/ror_tote.jpeg20121007-22732-1ctl1g1" I've also double checked that this exists, by opening my finder in this directory, and opened it with preview app; and also that the program can run identify by running %x{identify} in pry, and I receive the same version Version: ImageMagick 6.7.7-6 2012-10-06 Q16 as before. Removing the additional digits (is this a timestamp?) after the file extension and running the Paperclip.run command manually in Pry gives me a different error: Cocaine::ExitStatusError: Command 'identify -format %wx%h :file' returned 1. Expected 0 I've also tried manually updating the Paperclip gem in Spree to 3.0.2 and still get the same error. So, I'm not really sure what else to try. Is there still something incorrect with my ImageMagick setup?

    Read the article

  • What is the "opposite" of request serialization called?

    - by Adam Lindberg
    For example, if a request is made to a resource and another identical request is made before the first has returned a result, the server returns the result of the first request for the second request as well. This to avoid unnecessary processing on the resource. This is not the same thing as caching/memoization since it only concerns identical requests ongoing in parallel. Is there a term for the reuse of results for currently ongoing requests to a resource for the purpose of minimizing processing?

    Read the article

< Previous Page | 56 57 58 59 60 61 62 63 64 65 66 67  | Next Page >