Daily Archives

Articles indexed Saturday March 20 2010

Page 26/89 | < Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >

  • Parsing data without HTML tags

    - by user296507
    Hi, I need to extract the actual phone number form the html listed below, but I'm not really sure how to do it using Nokogiri CSS since there are no html tags around it. When an at_css(.phonetitle) it only parse Phone and not the number. <div class="detail"> <span class="address">Corner of Toorak Road and Chapel Street, South Yarra</span><br> <span class="phonetitle">Phone</span> 95435 34341 <br><br> </div>

    Read the article

  • how to use web api with javascript/php?

    - by fayer
    geonames.org got a web api you can use to get all the hierarchy for a city. you just enter the id and you will get the data back in xml. http://ws.geonames.org/hierarchy?geonameId=2657896 i wonder how you fetch the url with php and javascript, and which one should i use. cause the id's are in the mysql database. i will get them with php. should i use file_get_contents, curl or fopen? and what function in javascript? jquery $.post? heard that it can only access localhost. would be great with some guidance here and even better with some code examples. thanks!

    Read the article

  • Can I mix declarative and programmatic layout in GWT 2.0?

    - by stuff22
    I'm trying to redo an existing panel that I made before GWT 2.0 was released. The panel has a few text fields and a scrollable panel below in a VerticalPanel. What I'd like to do is to make the scrollable panel with UIBinder and then add that to a VerticalPanel Below is an example I created to illustrate this: public class ScrollTablePanel extends ResizeComposite{ interface Binder extends UiBinder<Widget, ScrollTablePanel > { } private static Binder uiBinder = GWT.create(Binder.class); @UiField FlexTable table1; @UiField FlexTable table2; public Test2() { initWidget(uiBinder.createAndBindUi(this)); table1.setText(0, 0, "testing 1"); table1.setText(0, 1, "testing 2"); table1.setText(0, 2, "testing 3"); table2.setText(0, 0, "testing 1"); table2.setText(0, 1, "testing 2"); table2.setText(0, 2, "testing 3"); table2.setText(1, 0, "testing 4"); table2.setText(1, 1, "testing 5"); table2.setText(1, 2, "testing 6"); } } then the xml: <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder' xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:mail='urn:import:com.test.scrollpaneltest'> <g:DockLayoutPanel unit='EM'> <g:north size="2"> <g:FlexTable ui:field="table1"></g:FlexTable> </g:north> <g:center> <g:ScrollPanel> <g:FlexTable ui:field="table2"></g:FlexTable> </g:ScrollPanel> </g:center> </g:DockLayoutPanel> </ui:UiBinder> Then do something like this in the EntryPoint: public void onModuleLoad() { VerticalPanel vp = new VerticalPanel(); vp.add(new ScrollTablePanel()); vp.add(new Label("dummy label text")); vp.setWidth("100%"); RootLayoutPanel.get().add(vp); } But when I add the ScrollTablePanel to the VerticalPanel, only the first FlexTable (test1) is visible on the page, not the whole ScrollTablePanel. Is there a way to make this work where it is possible to mix declarative and programmatic layout in GWT 2.0?

    Read the article

  • php script gets two ajax requests, only returns one?

    - by Dan.StackOverflow
    I'll start from the beginning. I'm building a wordpress plugin that does double duty, in that it can be inserted in to a post via a shortcode, or added as a sidebar widget. All it does is output some js to make jquery.post requests to a local php file. The local php file makes a request to a webservice for some data. (I had to do it this way instead of directly querying the web service with jquery.ajax because the url contains a license key that would be public if put in the js). Anyway, When I am viewing a page in the wordpress blog that has both the sidebar widget and the plugin output via shortcode only one of the requests work. I mean it works in that it gets a response back from the php script. Once the page is loaded they both work normally when manually told to. Webpage view - send 2 post requests to my php script - both elements should be filed in, but only one is. My php script is just: <?php if(isset($_POST["zip"])) { // build a curl object, execute the request, // and basically just echo what the curl request returns. } ?> Pretty basic. here is some js some people wanted to see: function widget_getActivities( zip ){ jQuery("#widget_active_list").text(""); jQuery.post("http://localhost/wordpress/wp-content/ActiveAjax.php", { zip: zip}, function(text) { jQuery(text).find("asset").each(function(j, aval){ var html = ""; html += "<a href='" + jQuery(aval).find("trackback").text() + "' target='new'> " + jQuery(aval).find("assetName").text() + "</a><b> at </b>"; jQuery("location", aval).each(function(i, val){ html += jQuery("locationName", val).text() + " <b> on </b>"; }); jQuery("date", aval).each(function(){ html += jQuery("startDate", aval).text(); <!--jQuery("#widget_active_list").append("<div id='ActivityEntry'>" + html + " </div>");--> jQuery("#widget_active_list") .append(jQuery("<div>") .addClass("widget_ActivityEntry") .html(html) .bind("mouseenter", function(){ jQuery(this).animate({ fontSize: "20px", lineHeight: "1.2em" }, 50); }) .bind("mouseleave", function(){ jQuery(this).animate({ fontSize: "10px", lineHeight: "1.2em" }, 50); }) ); }); }); }); } Now imagine there is another function identical to this one except everything that is prepended with 'widget_' isn't prepended. These two functions get called separately via: jQuery(document).ready(function(){ w_zip = jQuery("#widget_zip").val(); widget_getActivities( w_zip ); jQuery("#widget_updateZipLink").click(function() { //start function when any update link is clicked widget_c_zip = jQuery("#widget_zip").val(); if (undefined == widget_c_zip || widget_c_zip == "" || widget_c_zip.length != 5) jQuery("#widget_zipError").text("Bad zip code"); else widget_getActivities( widget_c_zip ); }); }) I can see in my apache logs that both requests are being made. I'm guessing it is some sort of race condition but that doesn't make ANY sense. I'm new to all this, any ideas? EDIT: I've come up with a sub-optimal solution. I have my widget detect if the plugin is also being used on the page, and if so it waits for 3 seconds before performing the request. But I have a feeling this same thing is going to happen if multiple clients perform a page request at the same time that triggers one of the requests to my php script, because I believe the problem is in the php script, which is scary.

    Read the article

  • MySQL Update Statement + File Upload

    - by Jason Sweet
    Greetings! Been staring at this all day and can't seem to figure out why my update statement fails to update the field 'image_filename': $fileName = $_FILES['image_filename']; if($fileName["name"] <> ""){ $imageFile = $fileName['name']; $destination = "../../../../assets/resources/images/".$fileName['name']; move_uploaded_file($fileName['name'], $destination); } $updateSQL = sprintf("UPDATE content SET image_filename='$imageFile' WHERE id=%s", GetSQLValueString($_POST['resource_id'], "int")); mysql_select_db($database_conn_talent, $conn_talent); $Result1 = mysql_query($updateSQL, $conn_talent) or die(mysql_error()); Can a SQL pro tell me what I"m missing? Much thanks in advance for your feedback!

    Read the article

  • Date and timezone using j2me

    - by joynes
    Hi everyone! I have a date string as input from an rss like: Wed, 23 Dec 2009 13:30:14 GMT I want to fetch only the time-part, but it should be correct according to the my timezone. Ie, in Sweden the output should be: 14:30:14 What is the best way? I want it to work with other RSS date formats as well if possible. Im using regexp right now but that is not very general. Im having a hard time finding any library or support for dates and timezones in j2me? /Br Johannes

    Read the article

  • How do i make divs go into another row when full?

    - by acidzombie24
    My code is something like the below. When theres 3 images everything is fine once theres 4 it gets full and moves the entire div.top into another row. How do i make the div inside top just start a new row instead? I tried writing .top width=500px but once it hits or passes it instead the images inside are squeeze together instead of each being 150x150. I tried max-width on top instead and in opera and chrome i see the border of top as 500width but the images continue to render pass it. (i have a firefox problem with my div so the width looks fixed to something else). So how do i make these divs go into another row? and not try to squeeze together <div class="top"> <div><a href><img/></a></div> <div><a href><img/></a></div> <div><a href><img/></a></div> </div>

    Read the article

  • Escaping Hyphens with pkg-config through qmake

    - by Nexus
    I am trying to compile an application using qmake that is using pkg-config to bring in yaml-cpp. Unlike using pkg-config through the terminal qmake which is formatted like: pkg-config --libs --cflags yaml-cpp qmake actually spits out the include paths inside the make command like this: -I/usr/local/include/yaml-cpp This include path breaks subsequent includes which I've set in my qmake file. It's not possible for me to rearrange these includes due the order in which qmake parses its variables. Is it possible using qmake to escape the quote somehow or to make it use the first quoted configuration?

    Read the article

  • Playing from iPod music library

    - by japs
    Hello, I want to play particular selected song from my ipod music library.How can i do that? My idea is to save the title name from MPMediaQuery and then play later on when app starts so any one can have idea to do this? Thank You.

    Read the article

  • How to create a tree with filtered nodes from drupal taxonomy.

    - by sprugman
    I'm trying to create a menu tree in drupal like this: - term 1 node 1 node 2 - sub-term 1 node 3 node 4 + sub-term 2 - sub-term 3 node 5 - sub-sub-term 1 node 6 + term 2 etc. (Sub-term 2 and term 2 are toggled closed.) Some requirements: Output this using something like JQuery Menu to get an interactive tree Filter the nodes by cck type Filter the nodes by cck field Only have terms with nodes or other active terms in them show up Mark the current node as such, and automatically open the tree to that point Do I have to write this myself, or are there a combination of modules that can do it? I've got Advanced Taxonomy Blocks, which is pretty close, but it doesn't list the nodes.

    Read the article

  • VMWare web UI intermittent access on CentOS

    - by PeteWilliams
    Hiya, I've got a CentOS 5.2 server that I'm trying to get set up as a development environment. As part of this, I planned to install VMWare Server 2 and set up several virtual development servers. I've got as far as installing VMWare Server 2 but access to the remote control panel is only working intermittently. If I access it through Firefox at https://127.0.0.1:8333/ui/# it usually says either: "Connection intterupted: connection was reset before the page loaded" Or "Firefox can't establish a connection to the server at 127.0.0.1" But every now and then it lets me in and I'll manage a few clicks in the web UI before it kicks me out with the following error: "The server could not complete a request (HTTP 0 ). The server encountered an unexpected condition that prevented it from fulfilling the request. If this problem persists, please contact your system administrator." I've done all the updates available in CentOS except one OpenOffice one that is causing a conflict, and I re-ran wmware-config.pl after updating the kernel. Though I went with all the defaults as I don't really know what I'm doing! I've since rebooted and nothing changed. I've also tried accessing the control panel remotely from another machine in the network and the results are the same. Does anyone have any ideas what might be causing this and how I can resolve it? I'm afraid I'm a developer playing at sys-admin, so I may be missing something obvious! Many thanks Pete Update I have now reinstalled both the operating system and VMWare and I'm still getting the same issue. I wonder if it's a result of the settings I'm putting in on the config.pl script..?

    Read the article

  • Record must end with an empty line - missing changetype (LDIF)

    - by user21463
    I tried putting the following LDIF file in Apache Directory Studio, but it complained that the record must end with an empty line. Do you know why? dn: CN=mitoken-SerialNumber,CN=Schema,CN=Configuration,DC=myorg,DC=com changetype: ntdsSchemaAdd lDAPDisplayName: mitokenSerialNumber adminDisplayName: mitoken-SerialNumber description: Token serial number attributeSyntax: 2.5.5.12 oMSyntax: 64 isMemberOfPartialAttributeSet: FALSE isSingleValued: TRUE searchFlags: 0 objectClass: attributeSchema attributeID: 1.2.840.113556.1.8000.2554.56278.0.46625.19000.45599.15687267.6686356.2.1 schemaIDGUID:: 3U7SiIq9SByhs/i1Z6fEsw==

    Read the article

  • Alternative to K9 spam handler?

    - by overtherainbow
    I've been using the free K9 spam handler for a couple of years now, but it hasn't been updated since 2004 and has a couple of bugs that bother me: The Find feature stops at the first e-mail found, and doesn't go further I'd like to copy the list of e-mails marked as either real or SPAM, but K9 only copies the first item in the clipboard For those of you who have researched desktop anti-SPAM handlers under Windows, what do you suggest as an alternative, either free or moderately priced?

    Read the article

  • How do I reset/update my BIOS for Optiplex GX280?

    - by Sam Langlhey
    So far this has been a nightmare for me, which has been frustrating me constantly. I am using Dell Optiplex GX280 with Windows XP home edition, which is running a BIOS version A04. Recently, i've rebooted the pc to find out that its not booting. It will get to the Windows boot up screen with the progress bar but only to restart to the same process again, over and over. Frustrated that I am, i've inserted the Windows recovery CD to at least either repair of reinstall the operating system to find out that was not possible. I hit F8 to have the boot options, each of the boot option that I've selected gave me an error saying: "Selected boot device is not available." Right after that, I went to the BIOS setting and did a diagnostic test, which recognized all the Boot devices onboard. Now, I cannot even repair of reinstall Windows XP, because the system is not booting from none of the boot devices. The surprise is when I removed the hard-drive from the computer and loaded it on into another computer successfully; that's right, there is nothing wrong with the hard drive. After that I was totally puzzled. I found a few pointers online saying that the BIOS start-up block might be corrupted itself and I might need to flash/update the BIOS. I found the detailed instruction on how to create a Boot up disk by downloading the BIOS firmware from the manufacture's website. I did exactly as instructed below: Download the latest version or your choose version of BIOS file for your computer or motherboard from the manufacturer’s support site. Rename the downloaded file to AMIBOOT.ROM. Copy the file to a floppy disk. Insert the floppy disk to the floppy drive. Turn on the system. After I did that and powered on the PC to boot from the floppy drive, it gave me this error message: "Non-System Disk or Disk Error. Replace and Strike any key when ready." I did all that, and I kept on pressing [Ctrl]+[Home] to force it, but it did not did any satisfying result. Desperate as I am, my next attempt is to try the instruction below. Since I want to be ready, in the event it does not work, do you have any solution that you can provide? Please keep in mind that I cannot boot from any of the devices at this moment. My only hope now is to come on with a solution that will work through the Floppy drive, since that's the only drive that affected. Thank you very much for your advice and support in advance. To create a Windows startup disk, insert a floppy disk into the drive of a similarly configured, working Windows XP system, launch My Computer, right-click the floppy disk icon, and select the Format command from the context menu. When you see the Format dialog box, leave all the default settings as they are and click the Start button. Once the format operation is complete, close the Format dialog box to return to My Computer, double-click the drive C icon to access the root directory, and copy the following three files to the floppy disk: Boot.ini NTLDR Ntdetect.com

    Read the article

  • Multiple rows update trigger

    - by sony
    If I have a statement that updates multiple rows, only the trigger will fire only on the first or last row that is being updated (not sure which one). I need to make a trigger that fires for ALL the records that are being updated into a particular table

    Read the article

  • help using pcap library to sniff packets

    - by scatman
    i am using pcap sample codes to create my own sniffer. i downloaded their sample sniffer and its working on windows but not on linux. i am using gcc compiler on both machines, and i have only pcap.h included. the error is : dereferencing pointer to incomplete type. the netmask is causing the error. the netmask is the mask of the first address of the interface. u_int netmask=netmask((structsockaddr_in*)d->addresses->netmask))->sin_addr.S_un.S_addr; any solutions?

    Read the article

< Previous Page | 22 23 24 25 26 27 28 29 30 31 32 33  | Next Page >