Search Results

Search found 1461 results on 59 pages for 'equipment recommendation'.

Page 51/59 | < Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >

  • jQuery Clone and add row to last row

    - by user198880
    I want to add a row whenever the user click on the new button.I want to clone the row "tRow0" and add it to the last row of the table "tblEquipment tbody".I wrote a JavaScript function for adding the row(AddEquipment).The problem is that the row is not getting added in the last row. clone row : tRow0 last row : tRow1 Actually the new row must added after the "tRow1" row.But the new row get added below "trActivity1_2" row.Please provide me the solution. my javascript function: function AddEquipment() { var row = jQuery('#tRow0').clone(true).show().insertAfter('#tblEquipment tbody>tr:last'); var index = document.getElementById("hdnMaxEqpId").value; jQuery("#tblEquipment tbody>tr:last").attr("id", "tRow" + index) jQuery("td:eq(0) input", row).attr("id", "chkEqp" + index); jQuery("td:eq(1) div:eq(0)", row).attr("id", "divEqpName" + index); jQuery("td:eq(1) input:eq(0)", row).attr("id", "hdnWODefEqpId" + index).attr("name", "hdnWODefEqpId" + index); jQuery("td:eq(1) input:eq(1)", row).attr("id", "hdnEquipmentId" + index).attr("name", "hdnEquipmentId" + index).attr("onpropertychange",""); jQuery("td:eq(1) input:eq(2)", row).attr("id", "txtEquipment" + index).attr("name", "txtEquipment" + index); jQuery("td:eq(1) img", row).attr("id", "imgshowEquipmentTree" + index).attr("onclick", ""); jQuery("td:eq(1) div:eq(1)", row).attr("id", "divEqpImage" + index); jQuery("td:eq(2) div", row).attr("id", "divEqpHierarchy" + index); jQuery("td:eq(3) textarea", row).attr("id", "txtEqRemarks" + index); jQuery("td:eq(4) img", row).attr("id", "imgEqAttachment" + index); } my aspx page: <table id="tblEquipment"> <thead> <tr> <th> </th> <th> Equipment</th> <th> Hierarchy</th> <th> Remarks</th> <th> Attachment</th> <th> Total Cost</th> </tr> </thead> <tbody id="tbEquipment"> <tr id="tRow0" class="trChildItem"> <td> <input id="chkEqp0" name="chkEqp0" type="checkbox" /> </td> <td> <div id="divEqpName0"> <input id="hdnWODefEqpId0" name="hdnWODefEqpId0" type="hidden" value="0" /> <input id="hdnEquipmentId0" name="hdnEquipmentId0" onpropertychange="AutoSaveEquipment(0);" type="hidden" value="0" /> <input id="txtEquipment0" class="clsSpText" name="txtEquipment0" readonly /> </div> <div id="divEqpImage0"> </div> </td> <td> <div id="divEqpHierarchy0"> &nbsp;</div> </td> <td> <textarea id="txtEqRemarks0" class="clsSpTextArea" cols="20" name="txtEqRemarks0" rows="1"></textarea> </td> <td> </td> </tr> <tr id="tActMaster0" class="trInnerChildItem"> <td> </td> <td colspan="5"> <div id="divActivitiesdetails0"> </div> </td> </tr> <tr id="tRow1" class="trChildItem"> <td> <input id="chkEqp1" runat="server" type="checkbox" /> <div id="divEqpEdit1"> </div> </td> <td> <div id="divEqpName1"> <input id="hdnWODefEqpId1" runat="server" type="hidden" value="7" /> <input id="hdnEquipmentId1" runat="server" type="hidden" value="4" /> <div id="divEqp1"> e2</div> <div id="divEqpImage1"> <a id="activiy1" onclick="HideActivities(1)"> </div> </td> <td> <div id="divEqpHierarchy1"> Equipment--&gt;e2</div> </td> <td> <div id="divEqpRemarks1"> Remarks</div> </td> <td> <div> </div> </td> <td> <div> $0.00</div> </td> </tr> <tr id="tActMaster1" class="trInnerChildItem" jquery1275984958765="3"> <td> </td> <td colspan="5"> <div id="divActivitiesdetails1"> <div id="divActivityMaster"> <table> <thead> <tr> <th> <a onclick="ActivityPopUp(0,1)"> </a></th> <th> Activity</th> <th> Description</th> <th> Duration</th> </tr> </thead> <tbody id="tbActivity"> <tr id="trActivity1_1" class="trChildItem" ondblclick="ActivityPopUp(3,1)" onmouseleave="HideActEditDiv('1_1')" onmouseover="ShowActEditDiv('1_1',7,1)"> <td> <div id="divActEdit1_1"> </div> </td> <td> <input id="hdnDefActivityId1_1" runat="server" type="hidden" value="33333" /> <div id="divActivityName1_1"> Act1</div> </td> <td> <div id="divActivityDesc1_1"> Ac1</div> </td> <td> <div id="divActivityDuration1_1"> 1&nbsp;Day</div> </td> </tr> <tr id="trActivity1_2" class="trChildItem" ondblclick="ActivityPopUp(3,1)" onmouseleave="HideActEditDiv('1_2')" onmouseover="ShowActEditDiv('1_2',7,1)"> <td> <div id="divActEdit1_2"> </div> </td> <td> <input id="hdnDefActivityId1_2" runat="server" type="hidden" value="4" /> <div id="divActivityName1_2"> Act2</div> </td> <td> <div id="divActivityDesc1_2"> Act2Desc</div> </td> <td> <div id="divActivityDuration1_2"> 1&nbsp;Day</div> </td> </tr> </tbody> </table> </div> </div> </td> </tr> </tbody> </table>

    Read the article

  • What is optimal hardware configuration for heavy load LAMP application

    - by Piotr Kochanski
    I need to run Linux-Apache-PHP-MySQL application (Moodle e-learning platform) for a large number of concurrent users - I am aiming 5000 users. By concurrent I mean that 5000 people should be able to work with the application at the same time. "Work" means not only do database reads but writes as well. The application is not very typical, since it is doing a lot of inserts/updates on the database, so caching techniques are not helping to much. We are using InnoDB storage engine. In addition application is not written with performance in mind. For instance one Apache thread usually occupies about 30-50 MB of RAM. I would be greatful for information what hardware is needed to build scalable configuration that is able to handle this kind of load. We are using right now two HP DLG 380 with two 4 core processors which are able to handle much lower load (typically 300-500 concurrent users). Is it reasonable to invest in this kind of boxes and build cluster using them or is it better to go with some more high-end hardware? I am particularly curious how many and how powerful servers are needed (number of processors/cores, size of RAM) what network equipment should be used (what kind of switches, network cards) any other hardware, like particular disc storage solutions, etc, that are needed Another thing is how to put together everything, that is what is the most optimal architecture. Clustering with MySQL is rather hard (people are complaining about MySQL Cluster, even here on Stackoverflow).

    Read the article

  • populate FusionCharts with XML data AJAX

    - by Mick
    Hi I have a js file that uses ajax to get a XML doc from a php script . The XML file forms the data to draw a Fusion Chart. I know I am getting the XML data ok but FusionCharts will not draw it . I would really appreciate any help , thanks (FusionCharts.js is included earlier in my script) if(XMLHttpRequestObject) { XMLHttpRequestObject.open("GET", "chart.php?job="+job, true); XMLHttpRequestObject.onreadystatechange = function() { if (XMLHttpRequestObject.readyState == 4 && XMLHttpRequestObject.status == 200) { var xdoc = XMLHttpRequestObject.responseXML; var chart1 = new FusionCharts("Pie3D.swf", "chart1Id", "400", "300", "0", "1"); chart1.setDataXML(xdoc); chart1.render("chart1div"); chart.php produces this XML data <chart caption='ADI Chart Test ' > <set label='Driver' value='12.25' /> <set label='Other Staff' value='223.21' /> <set label='Equipment' value='0.00' /> <set label='Additional Items' value='0.00' /> <set label='Vehicle Fuel' value='0.00' /> <set label='Accomodation' value='0.00' /> <set label='Generator Fuel' value='0.00' /> </chart>

    Read the article

  • What java web application framework to use?

    - by frohiky
    One of the main products of my company is an Oracle Forms (and Reports) based application, that "needs" to be re-written in another technology. Why? Users want a more rich interface experience, and we want, preferably, to reduce costs with an open source application server. For this (HUGE) project, we intend to use a java web application framework, keep these points in mind: We have: hundreds of tables on our database (the ORM must be as flexible as possible); some logic which is (and will still be) based on PL/SQL procedures/functions/packages; a lot of CRUDs (the application itself is of an considerable size); a demand to work with/generate documents and workflows; an intranet based user environment; We want: to offer a RIA interface experience; use (if possible) an open source app server; a rapid (as possible) development framework; a somewhat mature framework with a "wise" roadmap (and a considerable community support); a MVC approach combined with JS or GWT widgets (e.g. Vaadin or SmartGWT); Well, in the past weeks I've read a lot of posts, Q&As on stackoverflow, and much more: Wicket, JSF, Tapestry, Grails, GWT, Struts2, Play, Spring, Seam, Echo, .... the list goes on! I've even researched about Alfresco..! The obvious question: Which one to use? At this time, any insight, recommendation, shared experience, advice will be more then welcome!

    Read the article

  • How to estimate tomcat server requirements?

    - by Daniil
    We have a brand new webapp written that runs on Tomcat. So far, only one client is using it through the day. They run about 180 unique logins a day. Not really a lot IMO. Now, we managed to sell it to a brand new client who likes and wants to roll it out to 50,000 clients. How many of them will login at the same time - no idea. But I need to do the whole thing - allocate, create, config and maintain. OK - last is simple(errrr). The application runs off of Tomcat 5.5 on Gentoo (I'm thinking to upgrade to Tomcat 6) with MSSQL & mySQL behind. I do realize that a more enterprise ready application would be a better fit, but that's not an option at the moment. Since I've never done this before, I'm a bit lost. Can someone advice on how to go about estimating the equipment requirements for this client? Tomcat does have clustering, so that I can do. MS SQL - I'm sure they have something too. I'm thinking to stick it behind LVS (which we do use at the moment for something else too). Any help from people who deal with these details is greatly appreciated!

    Read the article

  • sql-server performance optimization by removing print statements

    - by AG
    We're going through a round of sql-server stored procedure optimizations. The one recommendation we've found that clearly applies for us is 'SET NOCOUNT ON' at the top of each procedure. (Yes, I've seen the posts that point out issues with this depending on what client objects you run the stored procedures from but these are not issues for us.) So now I'm just trying to add in a bit of common sense. If the benefit of SET NOCOUNT ON is simply to reduce network traffic by some small amount every time, wouldn't it also make sense to turn off all the PRINT statements we have in the stored procedures that we only use for debugging? I can't see how it can hurt performance. OTOH, it's a bit of a hassle to implement due to the fact that some of the print statements are the only thing within else clauses, so you can't just always comment out the one line and be done. The change carries some amount of risk so I don't want to do it if it isn't going to actually help. But I don't see eliminating print statements mentioned anywhere in articles on optimization. Is that because it is so obvious no one bothers to mention it?

    Read the article

  • Recommend me an architecture for this Facebook application

    - by andybaird
    Firstly, this question is subjective. There is not a right answer for this question and it really depends on what works for you. I'm hoping to use this thread as a breeding ground for ideas. I hope this is acceptable in this medium. I'm working on building a Facebook app that will be replacing an already popular app that gets ~50k hits a day. The original app is using a very typical LAMP setup with help from some Zend libraries for database layer extraction. For the most part the app worked well, except to solve a lot of issues I ended up fragmenting tables to speed things up. As a result, I couldn't do a lot of things with the app that I wanted to (namely any processing using aggregate data that needed to be returned quickly) So I'm starting to design plans for the next version of this application, and I have a whole bunch of new and cool features that I know would choke my current setup. I'm looking for technological recommendations of data storage methods that scale well. The database does not necessarily need to be relational, simple key/value storage would suffice (although at present time I know little to nothing about KV stores) What's your recommendation? How would you tackle this? I'd like to take a completely free approach to this -- although I am most familiar and comfortable using PHP, I want to leave all technical options open.

    Read the article

  • Adding Mysql Columns in Rails Rake

    - by Gigg
    I have a rake file that does a series of calculations on a database. Basically it adds usage on equipment regularly. At the end of the day it needs to add that days total to a monthly total table and update that same table. i use the following simple concepts: To get data from the database is pretty simple: @usages = Usage.find(:all) time = Time.new for usage in @usages sql = ActiveRecord::Base.connection To insert it into the database: sql.execute "INSERT (or UPDATE) into usages ## add values and options as per MySQL But how do I: take a column from a database, add all of its values together that have a common value in another column, (i.e. if column x == value y) and then insert it into another column in another table, say dailyusages? I have tried these options: task (:monthly => :environment) do @dailyusages = Dailyusage.find(:all) for dailyusage in @dailyusages sql = ActiveRecord::Base.connection time = Time.new device = monthlyusages.device month = time.month if device == dailyusages.device ##&& month == dailyusages.month total = (dailyusage.total.sum.to_i) @monthlyusages = Monthlyusage.find(:all) for monthlyusage in @monthlyusages sql = ActiveRecord::Base.connection old_total = monthlyusage.total.to_i new_total = (old_total + total) sql.execute "UPDATE monthlyusages ( year, month, total, device ) values('#{time.year}', '#{time.month}', '#{total}', '#{dailyusage.device}' )" end I obviously have uncommented options and tried all sorts of things. Any help would really save me a load of trouble. Thanks in advance. (** BTW - I am new to rails, so go easy on me **)

    Read the article

  • Implement user authentication against remote DB with a Web Service

    - by Juan González
    I'm just starting reasearch about the best way to implement user authentication within my soon-to-be app. This is what I have so far: A desktop (Windows) application on a remote server. That application is accessed locally with a browser (it has a web console and MS SQL Server to store everything). The application is used with local credendials stored in the DB. This is what I'd like to accompllish: Provide access to some information on that SQL Server DB from my app. That access of course must be granted once a user has id himself with valid credentials. This is what I know so far: How to create my PHP web service and query info from a DB using JSON. How to work with AFNetworking libraries to retrieve information. How to display that info on the app. What I don't know is which could be the best method to implement user authentication from iOS. Should I send username and password? Should I send some hash? Is there a way to secure the handshake? I'd for sure appreciate any advise, tip, or recommendation you have from previous experience. I don't want to just implement it but instead I want to do it as good as possible.

    Read the article

  • Building a ctypes-"based" C library with distutils

    - by Robie Basak
    Following this recommendation, I have written a native C extension library to optimise part of a Python module via ctypes. I chose ctypes over writing a CPython-native library because it was quicker and easier (just a few functions with all tight loops inside). I've now hit a snag. If I want my work to be easily installable using distutils using python setup.py install, then distutils needs to be able to build my shared library and install it (presumably into /usr/lib/myproject). However, this not a Python extension module, and so as far as I can tell, distutils cannot do this. I've found a few references to people other people with this problem: Someone on numpy-discussion with a hack back in 2006. Somebody asking on distutils-sig and not getting an answer. Somebody asking on the main python list and being pointed to the innards of an existing project. I am aware that I can do something native and not use distutils for the shared library, or indeed use my distribution's packaging system. My concern is that this will limit usability as not everyone will be able to install it easily. So my question is: what is the current best way of distributing a shared library with distutils that will be used by ctypes but otherwise is OS-native and not a Python extension module? Feel free to answer with one of the hacks linked to above if you can expand on it and justify why that is the best way. If there is nothing better, at least all the information will be in one place.

    Read the article

  • Ways to gain a deeper understanding of programming concepts?

    - by MrPlow
    I'm a marketer and have been messing around in PHP/MySQL for years. Recently (the last several months) I've been making my own scripts/programs in Python and I've really enjoyed the whole problem solving process. I've read(skimmed) some books and understand the basics of OOP, polymorphism, etc.. I have a general interest in AI and Natural Language in particular but it seems these things require a masters in Computer Science. My knowledge of math is poor. The last class I took was calculus, and I've forgotten the majority of it. Basically I'm looking for things to learn that will help me think in a more analytic way, and maybe see solutions where I didn't before. Improving my ability to program in Python would be nice too. I don't need to learn a specific language or something for employment, just enjoyment. Although my work often involves web development so some utility would be nice. I don't like learning concepts by just reading them. I need to apply them, even if the examples are contrived. A recommendation of a couple good books or other resources would be nice. :) Apologies if this is too vague/misplaced...

    Read the article

  • XML/RDF to Java Objects with XSD

    - by bmucklow
    So here's the scenario...I have an XSD file describing all the objects that I need. I can create the objects in Java using JAXB no problem. I have an XML/RDF file that I need to parse into those objects. What is the EASIEST way to do this? I have been looking into Jena and have played around with it, but can't see how to easily map the XML/RDF file to the XSD objects that were generated. Here is a snippet of the XSD file as well as the XML/RDF file: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:a="http://langdale.com.au/2005/Message#" xmlns:sawsdl="http://www.w3.org/ns/sawsdl" targetNamespace="http://iec.ch/TC57/2007/profile#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns="http://langdale.com.au/2005/Message#" xmlns:m="http://iec.ch/TC57/2007/profile#"> <xs:annotation/> <xs:element name="Profile" type="m:Profile"/> <xs:complexType name="Profile"> <xs:sequence> <xs:element name="Breaker" type="m:Breaker" minOccurs="0" maxOccurs="unbounded"/> And the XML/RDF: <!-- CIM XML Output For switch783:(295854688) --> <cim:Switch rdf:ID="Switch_295854688"> <cim:IdentifiedObject.mRID>Switch_295854688</cim:IdentifiedObject.mRID> <cim:IdentifiedObject.aliasName>Switch_295854688</cim:IdentifiedObject.aliasName> <cim:ConductingEquipment.phases rdf:resource="http://iec.ch/TC57/2009/CIM-schema-cim14#PhaseCode.ABC" /> <cim:Switch.circuit2>0001406</cim:Switch.circuit2> <cim:Equipment.Line rdf:resource="#Line_0001406" />

    Read the article

  • Why does Microsoft advise against readonly fields with mutable values?

    - by Weeble
    In the Design Guidelines for Developing Class Libraries, Microsoft say: Do not assign instances of mutable types to read-only fields. The objects created using a mutable type can be modified after they are created. For example, arrays and most collections are mutable types while Int32, Uri, and String are immutable types. For fields that hold a mutable reference type, the read-only modifier prevents the field value from being overwritten but does not protect the mutable type from modification. This simply restates the behaviour of readonly without explaining why it's bad to use readonly. The implication appears to be that many people do not understand what "readonly" does and will wrongly expect readonly fields to be deeply immutable. In effect it advises using "readonly" as code documentation indicating deep immutability - despite the fact that the compiler has no way to enforce this - and disallows its use for its normal function: to ensure that the value of the field doesn't change after the object has been constructed. I feel uneasy with this recommendation to use "readonly" to indicate something other than its normal meaning understood by the compiler. I feel that it encourages people to misunderstand the meaning of "readonly", and furthermore to expect it to mean something that the author of the code might not intend. I feel that it precludes using it in places it could be useful - e.g. to show that some relationship between two mutable objects remains unchanged for the lifetime of one of those objects. The notion of assuming that readers do not understand the meaning of "readonly" also appears to be in contradiction to other advice from Microsoft, such as FxCop's "Do not initialize unnecessarily" rule, which assumes readers of your code to be experts in the language and should know that (for example) bool fields are automatically initialised to false, and stops you from providing the redundancy that shows "yes, this has been consciously set to false; I didn't just forget to initialize it". So, first and foremost, why do Microsoft advise against use of readonly for references to mutable types? I'd also be interested to know: Do you follow this Design Guideline in all your code? What do you expect when you see "readonly" in a piece of code you didn't write?

    Read the article

  • How to receive Email in JEE application

    - by Hank
    Obviously it's not so difficult to send out emails from a JEE application via JavaMail. What I am interested in is the best pattern to receive emails (notification bounces, mostly)? I am not interested in IMAP/POP3-based approaches (polling the inbox) - my application shall react to inbound emails. One approach I could think of would be Keep existing MTA (postfix on linux in my case) - ops team already knows how to configure / operate it For every mail that arrives, spawn a Java app that receives the data and sends it off via JMS. I could do this via an entry in /etc/aliases like myuser: "|/path/to/javahelper" with javahelper calling the Java app, passing STDIN along. MDB (part of JEE application) receives JMS message, parses it, detects bounce message and acts accordingly. Another approach could be Open a listening network socket on port 25 on the JEE application container. Associate a SessionBean with the socket. Bean is part of JEE application and can parse/detect bounces/handle the messages directly. Keep existing MTA as inbound relay, do all its security/spam filtering, but forward emails to myuser (that pass the filter) to the JEE application container, port 25. The first approach I have done before (albeit in a different language/setup). From a performance and (perceived) cleanliness point of view, I think the second approach is better, but it would require me to provide a proper SMTP transport implementation. Also, I don't know if it's at all possible to connect a network socket with a bean... What is your recommendation? Do you have details about the second approach?

    Read the article

  • [C++] Multiple inclusion in multiple files

    - by Amumu
    Hi everyone, I am making a small game. In BattleRecord.h: #ifndef _CHARACTER_H_ #define _CHARACTER_H_ #include "Character.h" #endif class BattleRecord { public: Character Attacker; Character Defender; Status status; int DamageDealt; int GoldEarned; int ExpGained; }; In Character.h: #ifndef _EQUIPMENT_H_ #define _EQUIPMENT_H_ #include "Equipment.h" #endif class BattleRecord; class Character { BattleRecord AttackEnemy(Character &Enemy); } In BattleRecord.h: #ifndef _CHARACTER_H_ #define _CHARACTEr_H_ #include "Character.h" #endif #ifndef _BATLE_RECORD_H_ #define _BATLE_RECORD_H_ #include "BattleRecord.h" #endif class GUI { public: //GUI Methods, and two of these: void ViewStats(Character &Player); void Report(BattleRecord Record) } The problem here is, my Character.h and BattleRecord.h need to include each other, and this definitely will cause multiple redefinition problem. Therefore, I used forward declaration in Character.h by adding: class BattleRecord; The problem is sovled. But then, the GUI.h needs BattleRecord.h again for reporting the battle, so I have to include BattleRecord.h into the GUI.h. I also have to include the Character.h in order to pass into the ViewStat function. I got error and stuck with this up to this piont.

    Read the article

  • Pros and cons of each JEE server for developing within Eclipse

    - by Thorbjørn Ravn Andersen
    Eclipse JEE has a lot of server adapters allowing development against many different application servers like JBoss, Glassfish and WebSphere. Frequently you can benefit from using another server for developing new features than for production, simply because it may be able to deploy changes much faster and when the functionality is in place, you can iron out bugs for the production platform. Unfortunately finding that server is a time consuming process, where others experience is invaluable. If you have experience with any server with an Eclipse Server Adapter, please add your findings and your recommendation. I believe that the following is of interest: Does saving a file trigger an update in the server, giving save edit+reload browser functionality? How fast is a deployment? (Saved a JSP? Java class? Static file?) Can the actual server be downloaded by the Server Adapter Wizard allowing for easy installation? Are there known bugs and issues with suitable work-arounds? Is debugging fully supported? Is profiling? Would you recommend this server? Note: Eclipse can also work with Tomcat but that is a web container, which cannot deploy EAR files.

    Read the article

  • WPF/MVVM - keep ViewModels in application component or separate?

    - by Anders Juul
    Hi all, I have a WPF application where I'm using the MVVM pattern. I get the VM activated for actions that require user input and thus need to activate views from the VM. I've started out separating the VMs into a separate component/assembly, partly because I see them as the unit testable part, partly because views should rely on VM, not the other way round. But when I then need to bring up a window, the window is not known by the VM. All introductions I find place the VM in the WPF/App component, thus eliminating the problem. This article recommends keeping them in separate layers : http://waf.codeplex.com/wikipage?title=Architecture%20-%20Get%20The%20Big%20Picture&referringTitle=Home As I see it, I have the following choices Move VMs to the WPF/App assembly to allow VMs to access the windows directly. Place interfaces of views in VM-assembly, implement views in WPF/App assembly and register the connection through IOC or alternative ways. File a 'request' from the VM into some mechanism/bus that routes the request (but which mechanism!? E.g something in Prism?!) What's the recommendation? Thanks for any comments, Anders, Denmark

    Read the article

  • Good tools for keeping the content in test/staging/live environments synchronized

    - by David Stratton
    I'm looking for recommendations on automated folder synchronization tools to keep the content in our three environments synchronized automatically. Specifically, we have several applications where a user can upload content (via a File Upload page or a similar mechanism), such as images, pdf files, word documents, etc. In the past, we had the user doing this to our live server, and as a result, our test and staging servers had to be manually synchronized. Going forward, we will have them upload content to the staging server, and we would like some software to automatically copy the files off to the test and live servers EITHER on a scheduled basis OR as the files get uploaded. I was planning on writing my own component, and either set it up as a scheduled task, or use a FileSystemWatcher, but it occurred to me that this has probably already been done, and I might be better off with some sort of synchronization tool that already exists. On our web site, there are a limited number of folders that we want to keep synchronized. In these folders, it is an all or nothing - we want to make sure the folders are EXACT duplicates. This should make it fairly straightforward, and I would think that any software that can synchronize folders would be OK, except that we also would like the software to log changes. (This rules out simple BATCH files.) So I'm curious, if you have a similar environment, how did you solve the challenge of keeping everything synchronized. Are you aware of a tool that is reliable, and will meet our needs? If not, do you have a recommendation for something that will come close, or better yet, an open source solution where we can get the code and modify it as needed? (preferably .NET). Added Also, I DID google this first, but there are so many options, I am interested mostly in knowing what actually works well vs what they SAY works, which is why I'm asking here.

    Read the article

  • Real time embeddable http server library required

    - by Howard May
    Having looked at several available http server libraries I have not yet found what I am looking for and am sure I can't be the first to have this set of requirements. I need a library which presents an API which is 'pipelined'. Pipelining is used to describe an HTTP feature where multiple HTTP requests can be sent across a TCP link at a time without waiting for a response. I want a similar feature on the library API where my application can receive all of those request without having to send a response (I will respond but want the ability to process multiple requests at a time to reduce the impact of internal latency). So the web server library will need to support the following flow 1) HTTP Client transmits http request 1 2) HTTP Client transmits http request 2 ... 3) Web Server Library receives request 1 and passes it to My Web Server App 4) My Web Server App receives request 1 and dispatches it to My System 5) Web Server receives request 2 and passes it to My Web Server App 6) My Web Server App receives request 2 and dispatches it to My System 7) My Web Server App receives response to request 1 from My System and passes it to Web Server 8) Web Server transmits HTTP response 1 to HTTP Client 9) My Web Server App receives response to request 2 from My System and passes it to Web Server 10) Web Server transmits HTTP response 2 to HTTP Client Hopefully this illustrates my requirement. There are two key points to recognise. Responses to the Web Server Library are asynchronous and there may be several HTTP requests passed to My Web Server App with responses outstanding. Additional requirements are Embeddable into an existing 'C' application Small footprint; I don't need all the functionality available in Apache etc. Efficient; will need to support thousands of requests a second Allows asynchronous responses to requests; their is a small latency to responses and given the required request throughput a synchronous architecture is not going to work for me. Support persistent TCP connections Support use with Server-Push Comet connections Open Source / GPL support for HTTPS Portable across linux, windows; preferably more. I will be very grateful for any recommendation Best Regards

    Read the article

  • Database design - table relationship question

    - by iama
    I am designing schema for a simple quiz application. It has 2 tables - "Question" and "Answer Choices". Question table has 'question ID', 'question text' and 'answer id' columns. "Answer Choices" table has 'question ID', 'answer ID' and 'answer text' columns. With this simple schema it is obvious that a question can have multiple answer choices & hence the need for the answer choices table. However, a question can have only one correct answer and hence the need for the 'answer ID' in the question table. However, this 'answer ID' column in the question table provides a illusion as though there can be multiple questions for a single answer which is not correct. The other alternative to eliminate this illusion is to have another table just for correct answer that will have just 2 columns namely the question ID and the answer ID with a 1-1 relationship between the two tables. However, I think this is redundant. Any recommendation on how best to design this thereby enforcing the rules that a question can have multiple answer choices but only one correct answer? Many Thanks.

    Read the article

  • How do you search a document for a string in c++?

    - by Jeff
    Here's my code so far: #include<iostream> #include<string> #include<fstream> using namespace std; int main() { int count = 0; string fileName; string keyWord; string word; cout << "Please make sure the document is in the same file as the program, thank you!" << endl << "Please input document name: " ; getline(cin, fileName); cout << endl; cout << "Please input the word you'd like to search for: " << endl; cin >> keyWord; cout << endl; ifstream infile(fileName.c_str()); while(infile.is_open()) { getline(cin,word); if(word == keyWord) { cout << word << endl; count++; } if(infile.eof()) { infile.close(); } } cout << count; } I'm not sure how to go to the next word, currently this infinite loops...any recommendation? Also...how do I tell it to print out the line that that word was on? Thanks in advance!

    Read the article

  • How to use Java on Google App Engine without exceeding minute quotas?

    - by Geo
    A very simple java code inside a doGet() servlet is getting more than a second of cpu time on GAE. I have read some quota related documentation and apparently I am not doing anything wrong. //Request the user Agent info String userAgent = req.getHeader("User-Agent"); I wanted to know what was using the CPU the most, I use a google help recommendation. //The two lines below will get the CPU before requesting User-Agent Information QuotaService qs = QuotaServiceFactory.getQuotaService(); long start = qs.getCpuTimeInMegaCycles(); //Request the user Agent info String userAgent = req.getHeader("User-Agent"); //The three lines below will get the CPU after requesting User-Agent Information // and informed it to the application log. long end = qs.getCpuTimeInMegaCycles(); double cpuSeconds = qs.convertMegacyclesToCpuSeconds(end - start); log.warning("CPU Seconds on geting User Agent: " + cpuSeconds); The only thing that the code above tells me is that inspecting the header will use more than a second (1000ms) of cpu time, which for Google is a warning on the log panel. That seems to be a very simple request and still is using more than a second of cpu. What I am missing?

    Read the article

  • Events still not showing up despite the many tries...sigh

    - by sheng88
    I have tried the recommendation from this forum and through the many google searches...but i still can't get the events to show up on my calendar via jsp....i tried with php and it worked...sigh...i wonder where is the error....sigh.... The processRequest method is fine but when it dispatches to the JSP page...nothing appears from the browser.... protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String email=request.getParameter("email"); try { ArrayList<CalendarEvt> calc=CalendarDAO.retrieveEvent(email); for (CalendarEvt calendarEvt : calc) { System.out.println(calendarEvt.getEventId()); } request.setAttribute("calendar", calc); request.getRequestDispatcher("calendar.jsp").forward(request, response); } catch (Exception e) { } } Here is the JSP section that's giving me headaches...(Without the loop...the Google link does appear...)...I have tried putting quotations and leaving them out....still no luck: <%--Load user's calendar--%> <script type='text/javascript'> $(document).ready(function() { var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); $('#calendar').fullCalendar({ editable: false, events: [ <c:forEach items="calendar" var="calc"> { title: '${calc.eventName}', start: ${calc.eventStart} }, </c:forEach> { title: 'Click for Google', start: new Date(y, m, 1), end: new Date(y, m, 1), url: 'http://google.com/' } ]//end of events }); }); </script> <%--Load user's calendar--%> ...any kind of help would be greatly appreciated...thx!!

    Read the article

  • http authentication fails in cucumber when adding @javascript tag

    - by JESii
    I have a feature in my Rials app that works just fine with the message "Responds to browser_basic_authorize" from the Background Given step. However, if I add a @javascript tag before the scenario, then my Background Given fails with "I don't know how to login". What's going wrong and how do I go about testing javascrpt interactions on my app? Background: Given I perform HTTP authentication as "<id>/<password>" When I go to the homepage Then I should see "Text-that-you-should-see-on-your-home-page" Scenario: Displaying injury causative factors Given I am on the new_incident_report page When I choose "incident_report_employee_following_procedures_true" Then I should see "Equipment failure?" Then I should not see "Lack of training" When /^I perform HTTP authentication as "([^\"]*)\/([^\"]*)"$/ do |username, password| puts "id/pswd: #{username}/#{password}" ### Following works ONLY if performed first before even going to a page!!! if page.driver.respond_to?(:basic_auth) puts 'Responds to basic_auth' page.driver.basic_auth(username, password) elsif page.driver.respond_to?(:basic_authorize) puts 'Responds to basic_authorize' page.driver.basic_authorize(username, password) elsif page.driver.respond_to?(:browser) && page.driver.browser.respond_to?(:basic_authorize) puts 'Responds to browser_basic_authorize' page.driver.browser.basic_authorize(username, password) else raise "I don't know how to log in!" end end Rails 3.0.9, current gems, other tests passing.

    Read the article

  • What's a good way to provide additional decoration/metadata for Python function parameters?

    - by Will Dean
    We're considering using Python (IronPython, but I don't think that's relevant) to provide a sort of 'macro' support for another application, which controls a piece of equipment. We'd like to write fairly simple functions in Python, which take a few arguments - these would be things like times and temperatures and positions. Different functions would take different arguments, and the main application would contain user interface (something like a property grid) which allows the users to provide values for the Python function arguments. So, for example function1 might take a time and a temperature, and function2 might take a position and a couple of times. We'd like to be able to dynamically build the user interface from the Python code. Things which are easy to do are to find a list of functions in a module, and (using inspect.getargspec) to get a list of arguments to each function. However, just a list of argument names is not really enough - ideally we'd like to be able to include some more information about each argument - for instance, it's 'type' (high-level type - time, temperature, etc, not language-level type), and perhaps a 'friendly name' or description. So, the question is, what are good 'pythonic' ways of adding this sort of information to a function. The two possibilities I have thought of are: Use a strict naming convention for arguments, and then infer stuff about them from their names (fetched using getargspec) Invent our own docstring meta-language (could be little more than CSV) and use the docstring for our metadata. Because Python seems pretty popular for building scripting into large apps, I imagine this is a solved problem with some common conventions, but I haven't been able to find them.

    Read the article

< Previous Page | 47 48 49 50 51 52 53 54 55 56 57 58  | Next Page >