Search Results

Search found 13889 results on 556 pages for 'results'.

Page 110/556 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • Zend database query result converts column values to null

    - by David Zapata
    Hi again. I am using the next instructions to get some registers from my Database. Create the needed models (from the params module): $obj_paramtype_model = new Params_Model_DbTable_Paramtype(); $obj_param_model = new Params_Model_DbTable_Param(); Getting the available locales from the database // This returns a Zend_Db_Table_Row_Abstract class object $obj_paramtype = $obj_paramtype_model->getParamtypeByValue('available_locales'); // This is a query used to add conditions to the next sentence. This is executed from the Params_Model_DbTable_Param instance class, that depends from Params_Model_DbTable_Paramtype class (reference map and dependentTables arrays are fine in both classes) $obj_select = $this->select()->where('deleted_at IS NULL')->order('name'); // Execute the next query, applying the select restrictions. This returns a Zend_Db_Table_Rowset_Abstract class object. This means "Find Params by Paramtype" $obj_params_rowset = $obj_paramtype->findDependentRowset('Params_Model_DbTable_Param', 'Paramtype', $obj_paramtype); // Here the firebug log displays the queries.... Zend_Registry::get('log')->debug($obj_params_rowset); I have a profiler for all my DB executions from Zend. At this point the log and profiler objects (that includes Firebug writers), shows the executed SQL Queries, and the last line displays the resulting Zend_Db_Table_Rowset_Abstract class object. If I execute the SQL Queries in some MySQL Client, the results are as expected. But the Zend Firebug log writer displays as NULL the column values with latin characters (ñ). In other words, the external SQL client shows es_CO | Español de Colombia and en_US | English of United States but the Query results from Zend displays (and returns) es_CO | null and en_US | English of United States. I've deleted the ñ character from Español de Colombia and the query results are just fine in my Zend Log Firebug screen, and in the final Zend Form element. The MySQL database, tables and columns are in UTF-8 - utf8_unicode_ci collation. All my zend framework pages are in UTF-8 charset. I'm using XAMPP 1.7.1 (PHP 5.2.9, Apache at port 90 and MySQL 5.1.33-community) running on Windows 7 Ultimate; Zend Framework 1.10.1. I'm sorry if there is so much information, but I don't really know why could that happen, so I tryed to provide as much related information as I could to help to find some answer.

    Read the article

  • PredicateBuilder "And" Method not working

    - by mikemurf22
    I have downloaded the predicate builder and am having a difficult time getting it to work with the entity framework. Here is my code: v_OrderDetail is the entity var context = new OrdersEntities(); Expression<Func<v_OrderDetail,bool>> whereClause = w => true; var predicate = PredicateBuilder.True<v_OrderDetail>(); predicate.And(w => w.Status == "Work"); var results = context.v_OrderDetail.AsExpandable().Where(predicate); When I look at the results I get back every order. The And predicate doesn't seem to take. When I look at the predicate.parameters.count it only shows 1. I'm not sure, but I would expect it to show 2 after I add the second one. Any help is greatly appreciated.

    Read the article

  • Random noise in Solr score

    - by Andrea Campi
    I am looking for a way of introducing random noise into my scoring function, and I'm at a loss on how to best proceed. Some background: We use Solr for a web application that manages large-ish sets of photos for agencies. One customer has an interesting requirement for scoring: 'quality' field, maintained by editors, from 1 (highest) to 3 (lowest); 'date' field, boosting more recent photos; I would probably use a logarithmic function; However, due to how the stock photo market works, this will likely result in many similar photos appearing together. Their request is to give 'quality' a large boost, but introduce some randomness so that photos will not appear in a strict date order. Any idea? EDITED: a key requirement is to have "stable" query results: if I search twice for "tropical island" I can get a slightly different result set, but if I ask for the first page, then the second, then the first, I'd better get the same results :)

    Read the article

  • Problem with truncation of floating point values in DBSlayer.

    - by chrisdew
    When I run a query through DBslayer http://code.nytimes.com/projects/dbslayer the floating point results are truncated to a total of six digits (plus decimal point and negative sign when needed). { ... "lat":52.2228,"lng":-2.19906, ... } When I run the same query in MySQL, the results are as expected. | 52.22280884 | -2.19906425 | Firstly, am I correct in identifying DBSlayer as the cause of this effect? (Or the JSON library it uses, etc.) Secondly, is this floating point precision configurable within DBSlayer? Thanks, Chris. P.S. Ubuntu 9.10, x86_64 Path: . URL: http://dbslayer.googlecode.com/svn/trunk Repository Root: http://dbslayer.googlecode.com/svn Repository UUID: 5df2be84-4748-0410-afd4-f777a056bd0c Revision: 65 Node Kind: directory Schedule: normal Last Changed Author: dgottfrid Last Changed Rev: 65 Last Changed Date: 2008-03-28 22:52:46 +0000 (Fri, 28 Mar 2008)

    Read the article

  • Logging with log4j on tomcat jruby-rack for a Rails 3 application

    - by John
    I just spent the better part of 3 hours trying to get my Rails application logging with Log4j. I've finally got it working, but I'm not sure if what I did is correct. I tried various methods to no avail until my various last attempt. So I'm really looking for some validation here, perhaps some pointers and tips as well -- anything would be appreciated to be honest. I've summarized all my feeble methods into three attempts below. I'm hoping for some enlightenment on where I went wrong with each attempt -- even if it means I get ripped up. Thanks for the help in advance! System Specs Rails 3.0 Windows Server 2008 Log4j 1.2 Tomact 6.0.29 Java 6 Attempt 1 - Configured Tomcat to Use Log4J I basically followed the guide on the Apache Tomcat website here. The steps are: Create a log4j.properties file in $CATALINA_HOME/lib Download and copy the log4j-x.y.z.jar into $CATALINA_HOME/lib Replace $CATALINA_HOME/bin/tomcat-juli.jar with the tomcat-juli.jar from the Apache Tomcat Extras folder Copy tomcat-juli-adapters.jar from the Apache Tomcat Extras folder into $CATALINA_HOME/lib Delete $CATALINA_BASE/conf/logging.properties Start Tomcat (as a service) Expected Results According to the Guide I should have seen a tomcat.log file in my $CATALINA_BASE/logs folder. Actual Results No tomcat.log Saw three of the standard logs instead jakarta_service_20101231.log stderr_20101231.log stdout_20101231.log Question Shouldn't I have at least seen a tomcat.log file? Attempt 2 - Use default Tomcat logging (commons-logging) Reverted all the changes from the previous setup Modified $CATALINA_BASE/conf/logging.properties by doing the following: Adding a setting for my application in the handlers line: 5rails3.org.apache.juli.FileHandler Adding Handler specific properties 5rails3.org.apache.juli.FileHandler.level = FINE 5rails3.org.apache.juli.FileHandler.directory = ${catalina.base}/logs 5rails3.org.apache.juli.FileHandler.prefix = rails3. Adding Facility specific properties org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rails3].level = INFO org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/rails3].handlers = 4host-manager.org.apache.juli.FileHandler Modified my web.xml by adding the following context parameter as per the Logging section of the jruby-rack readme (I also modified my warbler.rb accordingly, but I did opted to change the web.xml directly to test things faster). <context-param> <param-name>jruby.rack.logging</param-name> <param-value>commons_logging</param-value> </context-param> Restarted Tomcat Results A log file was created (rails3.log), however there was no log information in the file. Attempt 2A - Use Log4j with existing set up I decided to go Log4j another whirl with this new web.xml setting. Copied the log4j.jar into my WEB-INF/lib folder Created a log4j.properties file and put it into WEB-INF/classes log4j.rootLogger=INFO, R log4j.logger.javax.servlet=DEBUG log4j.appender.R=org.apache.log4j.RollingFileAppender log4j.appender.R.File=${catalina.base}/logs/rails3.log log4j.appender.R.MaxFileSize=5036KB log4j.appender.R.MaxBackupIndex=4 log4j.appender.R.layout=org.apache.log4j.PatternLayout log4j.appender.R.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss} [%t] %-5p %c %x - %m%n Restarted Tomcat Results Same as Attempt 2 NOTE: I used log4j.logger.javax.servlet=DEBUG because I read in the jruby-rack README that all logging output is automatically redirected to the javax.servlet.ServletContext#log method. So I though this would capture it. I was obviously wrong. Question Why didn't this work? Isn't Log4J using the commons_logging API? Attempt 3 - Tried out slf4j (WORKED) A bit uncertain as to why Attempt 2A didn't work, I thought to myself, maybe I can't use commons_logging for the jruby.rack.logging parameter because it's probably not using commons_logging API... (but I was still not sure). I saw slf4j as an option. I have never heard of it and by stroke of luck, I decided to look up what it is. After reading briefly about what it does, I thought it was good of a shot as any and decided to try it out following the instructions here. Continuing from the setup of Attempt 2A: Copied slf4j-api-1.6.1.jar and slf4j-simple-1.6.1.jar into my WEB-INF/lib folder I also copied slf4j-log4j12-1.6.1.jar into my WEB-INF/lib folder Restarted Tomcat And VIOLA! I now have logging information going into my rails3.log file. So the big question is: WTF? Even though logging seems to be working now, I'm really not sure if I did this right. So like I said earlier, I'm really looking for some validation more or less. I'd also appreciate any pointers/tips/advice if you have any. Thanks!

    Read the article

  • Can't set default value of string property to "" in the Xcode CoreData model designer

    - by glenc
    I have an entity in my datamodel with a string property that is currently optional, and I'd like to convert this property to a required property with a default value of the empty string. As others have discovered, leaving the default value blank results in validation errors (since the designer interprets this as NULL), but trying '', "", or @"" as the default value results in those literal characters being interpreted as the default, rather than the empty zero-length string, as desired. I did find this thread on Google, however, apart from the solution being really ugly (model definition split between the .xcdatamodel and objc source), it also doesn't work for lightweight migrations because those migrations are done solely based on the .xcdatamodel files and the objc logic from your entity implementations isn't loaded. Is there any way to achieve this in the data model designer?

    Read the article

  • Resizing JPopupMenu and avoiding a "flicker" issue

    - by Avrom
    Hi, I am trying to implement a search results popup list similar to the style found here: http://www.inquisitorx.com/ (I'm not trying to implement a Google search, I'm just using this as a rough example of the style I'm working on.) In any event, I am implementing this by using a JList contained within a JPopupMenu which is popped up underneath a JTextField. When a user enters search terms, the list changes to reflect different matching results. I then call pack on the JPopupMenu to resize it. This works, however, it creates a slight flicker effect since it is actually hiding the popup and showing a popup. (See the private method getPopup in JPopupMenu where it explicitly does this.) Is there any way to just get it to just resize itself (aside from using a JWindow)?

    Read the article

  • break dataframe into subsets by factor values, send to function that returns glm class, how to recom

    - by Alex Holcombe
    Thanks to Hadley's plyr package ddply function we can take a dataframe, break it down into subdataframes by factors, send each to a function, and then combine the function results for each subdataframe into a new dataframe. But what if the function returns an object of a class like glm or in my case, a c("glm", "lm"). Then, these can't be combined into a dataframe can they? I get this error instead Error in as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : cannot coerce class 'c("glm", "lm")' into a data.frame Is there some more flexible data structure that will accommodate all the complex glm class results of my function calls, preserving the information regarding the dataframe subsets? Or should this be done in an entirely different way?

    Read the article

  • Jquery Text Variable

    - by Batfan
    I am trying to get jquery to pick up variable that I am defining and I'm having issues doing it. $.ajax({ url: "sitemap.php", cache: false, success: function(html){ $("#results").append(html); var $seriestitle = $("#define-title").text(); $('#results a:contains("$seriestitle")').addClass('current-series'); $('a:not(".current-series")').hide(); } }); This is the code I am using. You can view the page at the following URL: http://benjammindesigns.com/XML/details/1231.html There is a span on the page, with the ID 'define-title', that contains text. I am trying to pull the text from that span and use it as my variable. Any info is greatly appreciated.

    Read the article

  • XSLT: Display unique rows of filtered XML recordset

    - by Chris G.
    I've got a recordset that I'm filtering on a particular field (i.e. Manager ="Frannklin"). Now I'd like to group the results of that filtered recordset based on another field (Client). I can't seem to get Muenchian grouping to work right. Any thoughts? TIA! CG My filter looks like this: <xsl:key name="k1" match="Row" use="@Manager"/> <xsl:param name="dvt_filterval">Frannklin</xsl:param> <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" /> <xsl:variable name="FilteredRowsAttr" select="$Rows[normalize-space(@*[name()=$FieldNameNoAtSign])=$dvt_filterval ]" /> Templates <xsl:apply-templates select="$FilteredRowsAttr[generate-id() = generate-id(key('k1',@Manager))]" mode="g1000a"> </xsl:apply-templates> <xsl:template match="Row" mode="g1000a"> Client: <xsl:value-of select="@Client"/> </xsl:template> Results I'm getting Client: Beta Client: Beta Client: Beta Client: Gamma Client: Delta Results I want Client: Beta Client: Gamma Client: Delta Sample recordset <dsQueryResponse> <Rows> <Row Manager="Smith" Client="Alpha " Project_x0020_Name="Annapolis" PM_x0023_="00123" /> <Row Manager="Ford" Client="Alpha " Project_x0020_Name="Brown" PM_x0023_="00124" /> <Row Manager="Cronkite" Client="Beta " Project_x0020_Name="Gannon" PM_x0023_="00129" /> <Row Manager="Clinton, Bill" Client="Beta " Project_x0020_Name="Harvard" PM_x0023_="00130" /> <Row Manager="Frannklin" Client="Beta " Project_x0020_Name="Irving" PM_x0023_="00131" /> <Row Manager="Frannklin" Client="Beta " Project_x0020_Name="Jakarta" PM_x0023_="00132" /> <Row Manager="Frannklin" Client="Beta " Project_x0020_Name="Vassar" PM_x0023_="00135" /> <Row Manager="Jefferson" Client="Gamma " Project_x0020_Name="Stamford" PM_x0023_="00141" /> <Row Manager="Cronkite" Client="Gamma " Project_x0020_Name="Tufts" PM_x0023_="00142" /> <Row Manager="Frannklin" Client="Gamma " Project_x0020_Name="UCLA" PM_x0023_="00143" /> <Row Manager="Jefferson" Client="Gamma " Project_x0020_Name="Villanova" PM_x0023_="00144" /> <Row Manager="Carter" Client="Delta " Project_x0020_Name="Drexel" PM_x0023_="00150" /> <Row Manager="Clinton" Client="Delta " Project_x0020_Name="Iona" PM_x0023_="00151" /> <Row Manager="Frannklin" Client="Delta " Project_x0020_Name="Temple" PM_x0023_="00152" /> <Row Manager="Ford" Client="Epsilon " Project_x0020_Name="UNC" PM_x0023_="00157" /> <Row Manager="Clinton" Client="Epsilon " Project_x0020_Name="Berkley" PM_x0023_="00158" /> </Rows> </dsQueryResponse>

    Read the article

  • Declarative JDOQL vs Single-String JDOQL : performance

    - by DrDro
    When querying with JDOQL is there a performance difference between using the declarative version and the Single-String version: Example from the JDOQL doc: //Declarative JDOQL : Query q = pm.newQuery(org.jpox.Person.class, "lastName == \"Jones\" && age < age_limit"); q.declareParameters("double age_limit"); List results = (List)q.execute(20.0); //Single-String JDOQL : Query q = pm.newQuery("SELECT FROM org.jpox.Person WHERE lastName == \"Jones\"" + " && age < :age_limit PARAMETERS double age_limit"); List results = (List)q.execute(20.0); Other then performance, are there any reasons for which one is better to use then the other or is it just about the one with which we feel more comfortable.

    Read the article

  • NHibernate Query object collection issue

    - by Mahesh
    Hi, I am new to NHibernate and need some information regarding the internal working of the engine: I have a table called Student and the design is as follows: RollNo Name City Postcode and there are 5 more columns like this. I have School class and mappings associated with it. I am querying RollNo and Name using session as given below: IQuery query = session.CreateQuery("SELECT RollNo,Name FROM Student); Executing query.List resulting in error because the query is returning object[][]. Now, I changed the query as given below: IQuery query = session.CreateQuery("FROM Student); Executing query.List on this query yeilds the desired results. But, the results contain more data than I want. Could you please let me know the query to which I can get RollNo and Name from Student and castable as Student collection. Thanks, Mahesh

    Read the article

  • SQL Server Full Text Search Leading Wildcard

    - by aherrick
    After taking a look at this SO question and doing my own research, it appears that you cannot have a leading wildcard while using full text search. So in the most simple example, if I have a Table with 1 column like below: TABLE1 coin coinage undercoin select COLUMN1 from TABLE1 where COLUMN1 LIKE '%coin%' Would get me the results I want. How can I get the exact same results with FULL TEXT SEARCH enabled on the column? The following two queries return the exact same data, which is not exactly what I want. SELECT COLUMN1 FROM TABLE1 WHERE CONTAINS(COLUMN1, '"coin*"') SELECT COLUMN1 FROM TABLE1 WHERE CONTAINS(COLUMN1, '"*coin*"')

    Read the article

  • Counting multiple entries in a MySQL database?

    - by Aaron
    Hi all, I'm trying to count multiple entries in a MySQL database, I know how to use COUNT(), but the exact syntax I want to get the results I need eludes me. The problem: Table structure: ID, CODE, AUTHOR, COUNTRY, TIMESTAMP. Code, Author and Country overlap many times in the table. I am trying to discover if there is one simple query that can be ran to return (using WHERE clause on COUNTRY) the author field, the code field, and then a final field that counts the number of times the CODE was present in the query result. So, theoretically I could end up with an array like: array('author', 'code', 'codeAppearsNTimes'); Authors also have varying codes associated with them, so I don't want the results merged. I suppose the end result would be: 'This author is associated with this code this many times'. Is this possible with MySQL? Thanks in advance.

    Read the article

  • google search as an rss feed

    - by Jonathan
    Hi guys, Is there a way to have treat google serach results as an rss feed? For example say I worked for stackoverflow and wanted to montior how if the results from the following search url: http://www.google.com/search?hl=en&q=stackoverflow changes from day today. It would be cool if I could append &output=rss to the url and get back a feed like with google news. But that does not seem to be supported. Anyone have ideas? (Note I am programing with Ruby and Rails, if that matters) Thanks! Jonathan

    Read the article

  • How to stream XML data using XOM?

    - by Jonik
    Say I want to output a huge set of search results, as XML, into a PrintWriter or an OutputStream, using XOM. The resulting XML would look like this: <?xml version="1.0" encoding="UTF-8"?> <resultset> <result> [child elements and data] </result> ... ... [1000s of result elements more] </resultset> Because the resulting XML document could be big (tens or hundreds of megabytes, perhaps), I want to output it in a streaming fashion (instead of creating the whole Document in memory and then writing that). The granularity of outputting one <result> at a time is fine, so I want to generate one <result> after another, and write it into the stream. Assume there's already a method that helps with iterating the results and generating Element objects: public nu.xom.Element getNextResult(); So I'd simply like to do something like this pseudocode (automatic flushing enabled, so don't worry about that) : open stream/writer write declaration write start tag for <resultset> while more results: write next <result> element write end tag for <resultset> close stream/writer I've been looking at Serializer, but the necessary methods, writeStartTag(Element), writeEndTag(Element), write(DocType) are protected, not public! Is there no other way than to subclass Serializer to be able to use those methods, or to manually write the start and end tags directly into the stream as Strings, bypassing XOM altogether? (The latter wouldn't be too bad in this simple example, but in the general case it would get quite ugly.) Am I missing something or is XOM just not made for this? With dom4j I could do this easily using XMLWriter - it has constructors that take a Writer or OutputStream, and methods writeOpen(Element), writeClose(Element), writeDocType(DocumentType) etc. Compare to XOM's Serializer where the only public write method is the one that takes a whole Document. Please refrain from answering if you're not familiar with XOM! I specifically want to know if and how you can do this kind of streaming with that library. (This is related to my question about the best dom4j replacement where XOM is a strong contender.)

    Read the article

  • Query a range of date

    - by juniorSE
    Hello Guys, Im trying to query a sort of from - to date. e.g. 20-01-2010 to 20-02-2010. this should include the mentioned dates. i've tried the following queries but none works. select * from [tableName] where date = '20-01-2010' AND date <= '20-02-2010' the date where date is equal to 20-02-2010 does not show. i don't know why. select * from [tableName] where date between '20-01-2010' AND '20-02-2010' the mentioned dates is not included in the results. i want it to be included in the results. please help. thanks in advance! :)

    Read the article

  • How to remove duplication from RSpec

    - by Asa
    context "answer is correct" do before(:each) do @answer = stub_model(Answer, :correct => true).as_new_record assigns[:answer] = @answer render "answers/summarize" end it "should display flashcard context properly" do response.should contain("Quiz") end it "should summarize results" do response.should contain("is correct") end end context "answer is incorrect" do before(:each) do @answer = stub_model(Answer, :correct => false).as_new_record assigns[:answer] = @answer render "answers/summarize" end it "should display flashcard context properly" do response.should contain("Quiz") end it "should summarize results" do response.should contain("is incorrect") end end How do I avoid repeating the following block within both of the above contexts? it "should display flashcard context properly" do response.should contain("Quiz") end

    Read the article

  • iPhone, JQTouch and HTML5 audio tags

    - by Moo
    I am having an issue with JQTouch (latest beta) and html5 audio tags on 'sub pages' - the audio tag works before any page transitions are done, and cease to work afterward. For example: http://richardprice.dyndns.ws/test.html and http://richardprice.dyndns.ws/test2.html are identical other than I swap the "current" class between the two divs - all the audio tags play the same mp3. On test.html the audio tag on the initial page works, but when you switch to Page 2 the audio tag on that page does not (and sometimes results in a browser crash). Switch back to Page 1 and the audio tag on that page has ceased to work. test2.html is the same test but with the initial pages reversed, and the same thing happens - Page 2 (now the initial page) plays the audio, Page 1 does not, and switching back to Page 2 results in the audio no longer working. Thoughts?

    Read the article

  • Writing a search engine

    - by wvd
    Hello all, The title might be a bit misleading, but I couldn't figure out a better title. I'm writing a simple search engine which will search on several sites for the specific domain. To be concrete: I'm writing a search engine for hardstyle livesets/aftermovies/tracks. To do I will search on the sites who provide livesets, tracks, and such. The problem here is speed, I need to pass the search query to 5-7 sites, get the results and then use my own algorithm to display the results in a sorted order. I could just "multithread" it, but it's easier said then done so I have a few questions. What would be the best solution to this problem? Should I just multithread/process this application, so I'm going to get a bit of speed-up? Are there any other solutions or I am doing something really wrong? Thanks, William van Doorn

    Read the article

  • Having trouble scraping an ASP .NET web page

    - by Seth
    I am trying to scrape an ASP.NET website but am having trouble getting the results from a post. I have the following python code and am using httplib2 and BeautifulSoup: conn = Http() # do a get first to retrieve important values page = conn.request(u"http://somepage.com/Search.aspx", "GET") #event_validation and viewstate variables retrieved from GET here... body = {"__EVENTARGUMENT" : "", "__EVENTTARGET" : "" , "__EVENTVALIDATION": event_validation, "__VIEWSTATE" : viewstate, "ctl00_ContentPlaceHolder1_GovernmentCheckBox" : "On", "ctl00_ContentPlaceHolder1_NonGovernmentCheckBox" : "On", "ctl00_ContentPlaceHolder1_SchoolKeyValue" : "", "ctl00_ContentPlaceHolder1_SchoolNameTextBox" : "", "ctl00_ContentPlaceHolder1_ScriptManager1" : "ctl00_ContentPlaceHolder1_UpdatePanel1|cct100_ContentPlaceHolder1_SearchImageButton", "ct100_ContentPlaceHolder1_SearchImageButton.x" : "375", "ct100_ContentPlaceHolder1_SearchImageButton.y" : "11", "ctl00_ContentPlaceHolder1_SuburbTownTextBox" : "Adelaide,SA,5000", "hiddenInputToUpdateATBuffer_CommonToolkitScripts" : 1} headers = {"Content-type": "application/x-www-form-urlencoded"} resp, content = conn.request(url,"POST", headers=headers, body=urlencode(body)) When I print content I still seem to be getting the same results as the "GET" or is there a fundamental concept I'm missing to retrieve the result values of an ASP .NET post?

    Read the article

  • multiple visual effects on one event

    - by ZX12R
    I have a code that looks like this. <%= link_to_remote "View results", { :update=>"uxUpdateDiv" , :url=>{:controller=>"exam", :action=>"results"} , :loading=>visual_effect(:appear, "uxcLoader", :duration=> 0.1), :before =>visual_effect(:fade, "uxUpdateDiv", :duration => 0.1), :complete => visual_effect(:appear, "uxUpdateDiv", :duration => 1.5 ), :success=>visual_effect(:fade, "uxcLoader", :duration=> 1) } %> what happens here is not good enough for me. I want to add multiple effects for one event. Like the following: :complete=>(:fade, "uxLoader", :duration=>1 AND :fade, "uxTheOtherDiv", :duration=>1) How do i achieve this.? I am using jrails

    Read the article

  • What Python based Dashboard options exist?

    - by stuartcw
    I want to create a Dashboard on each server to show it's health and the results of some daily processing. I plan to hook up shell scripts and Python programs to collect the data. Instead of writing a web-based interface, I thought it would be good to use a python based web dashboard that could render the results in various business user and manager friendly formats. What are my options to do this? I am primarily interested in Python RedHat Linux, but other platforms are interesting too. I'm also open to Perl and Ruby based solutions especially if the plugins can be language neutral.

    Read the article

  • Performance issue when querying a large xml file through php/ajax on Apache Server

    - by Niall
    Hey, I have a simple "live search" (results displayed while typing) web site. This make up is Ajax to PHP querying a pretty large XML document (10,000+ lines). This is all been hosted on a local Apache server (xamp). The scale of the xml document seems to be causing huge performance issue with results taking 10ish seconds to give the results. I'm very new to PHP (this actually being my first play about) so there below is a snippet of code in case there is something obvious for($i=0; $i<($foodListXML->length); $i++){ $type=$foodListXML->item($i)->getElementsByTagName('type'); $foodnote=$foodListXML->item($i)->getElementsByTagName('foodnote'); $style=$foodListXML->item($i)->getElementsByTagName('style'); if ($type->item(0)->nodeType==1) { //find a link matching the search text if (stristr($type->item(0)->childNodes->item(0)->nodeValue,$q)){ $currentFoodName = $type->item(0)->childNodes->item(0)->nodeValue; $currentFoodStyle = $style->item(0)->childNodes->item(0)->nodeValue; $currentFoodNote = $foodnote->item(0)->childNodes->item(0)->nodeValue; if ($hint==""){ $hint= $currentFoodName . " , " . $currentFoodNote . " , <b>" . $currentFoodStyle. "</b>" . "<br>" ; } else{ $hint=$hint . $currentFoodName . " , " . $currentFoodNote . " , <b>" . $currentFoodStyle. "</b>" . "<br>" ; } } } } } Also if having the data in a DB and accessing that is faster, then I'm open to that.. All ideas really!! Thanks.

    Read the article

  • Newbie's problems with MySQL and php

    - by Mirage81
    I'm a real newbie with php and MySQL. Now I'm working on the following code which should search the database for eg. all the Lennons living in Liverpool. 1) How should I modify "get.php" to get the text "no results" to appear if there are no search results. 2) How should I modify "index.php" to get the option values (city and lastname) straight from the database instead of having to type them one by one? 3) Am I using mysql_real_escape_string the right way? 4) Any other mistakes in the code? index.php: <form action="get.php" method="post"> <p> <select name="city"> <option value="Birmingham">Birmingham</option> <option value="Liverpool">Liverpool</option> <option value="London">London</option> </select> </p> <p> <select name="lastname"> <option value="Lennon">Lennon</option> <option value="McCartney">McCartney</option> <option value="Osbourne">Osbourne</option> </select> </p> <p> <input value="Search" type="submit"> </p> </form> get.php: <?php $city = $_POST['city']; $lastname = $_POST['lastname']; $conn = mysql_connect('localhost', 'user', 'password'); mysql_select_db("database", $conn) or die("connection failed"); $query = "SELECT * FROM users WHERE city = '$city' AND lastname = '$lastname'"; $result = mysql_query($query, $conn); $city = mysql_real_escape_string($_POST['city']); $lastname = mysql_real_escape_string($_POST['lastname']); echo $rowcount; while ($row = mysql_fetch_row($result)) { if ($rowcount == '0') echo 'no results'; else { echo '<b>City: </b>'.htmlspecialchars($row[0]).'<br />'; echo '<b>Last name: </b>'.htmlspecialchars($row[1]).'<br />'; echo '<b>Information: </b>'.htmlspecialchars($row[2]); } } mysql_close($conn);

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >