Search Results

Search found 2907 results on 117 pages for 'ad lds'.

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

  • Difficulty screen scraping http://www.momondo.com using nokogiri

    - by Khai Kiong
    I have some difficulty to extract the total price (css selector = '.total') from the flight result. http://www.momondo.com/multicity/?Search=true&TripType=oneway&SegNo=1&SO0=KUL&SD0=KBR&SDP0=31-12-2012&AD=2&CA=0,0&DO=false&NA=false#Search=true&TripType=oneway&SegNo=1&SO0=KUL&SD0=KBR&SDP0=31-12-2012&AD=2&CA=0,0&DO=false&NA=false I get the error "undefined method `text' for nil:NilClass nokogiri ". My code desc "Fetch product prices" task :fetch_details => :environment do require 'nokogiri' require 'open-uri' include ERB::Util OneWayFlight.find_all_by_money(nil).each do |flight| url = "http://www.momondo.com/multicity/Search=true&TripType=oneway&SegNo=1&SO0=KUL&SD0=KBR&SDP0=31-12-2012&AD=2&CA=0,0&DO=false&NA=false#Search=true&TripType=oneway&SegNo=1&SO0=KUL&SD0=KBR&SDP0=31-12-2012&AD=2&CA=0,0&DO=false&NA=false" doc = Nokogiri::HTML(open(url)) price = doc.at_css(".total").text[/[0-9\.]+/] flight.update_attribute(:price, price) end end

    Read the article

  • Why is my html getting mal-formed?

    - by alkaloids
    I have the following table in a form that's embedded in a formtastic form (semantic_form_for). Everything I ask to be generated by ruby shows up, but the table gets badly mangled (essentially, the tags NEVER get formed. The table headers get drawn correctly There are 14 available_date objects that get passed, and they alternate between having a time value of 1 or 2, so this is just terribly boggling, but probably simple to fix... <table class="availability_table"> <tr> <th>Date</th> <th>Early</th> <th>Late</th> </tr> <% f.fields_for :available_dates do |ad| %> <% if ad.object.time == 1 #if this is an early shift, then start the new row %> <tr><td><%= ad.object.date.strftime('%a, %b %d, %Y') %></td> <td><%= ad.collection_select(:availability , LookupAvailability.all.collect, :id, :name) %></td> <% else #otherwise end the row with just a box%> <td><%= ad.collection_select(:availability , LookupAvailability.all.collect, :id, :name) %></td></tr> <% end %> <% end %> </table> So like I said, the form functions properly, and the objects all get updated and displayed correctly and all that, it's just that the HTML isn't getting echo'd out properly so my table is all mangled. Help!

    Read the article

  • awk or perl file editing & manipulation

    - by paul44
    I have a standard passwd file & a usermap file - which maps unix name (eg jbloggs) with AD account name (eg bloggsjoe) in the format: jbloggs bloggsjoe jsmith smithjohn ... etc. How can I edit the passwd file to swap the original unix name with the AD account name so each line of the passwd file has the AD account name instead. Appreciate any help for a perl learner.

    Read the article

  • admob orientation problem in android

    - by Aswan
    Hi folks my application integrated with admob ads.when i change the orientation it should fit the screen depends on orientation.portrait mode it is working fine when i changed to landscape mode what ad size i am getting in portrait mode same size of ad displayed in landscape mode the following i am adding in layout page <com.admob.android.ads.AdView android:id="@+id/ad" android:layout_width="fill_parent" android:layout_height="wrap_content" myapp:backgroundColor="#000000" myapp:primaryTextColor="#FFFFFF" myapp:secondaryTextColor="#CCCCCC" />

    Read the article

  • passing in javascript values into iframe tag

    - by Cedar Jensen
    What's the best way to pass in the value held in a javascript variable into an iframe call on the same html page? I'm trying to improve my site's page response times by moving ad serving javascript code (the typical document.write('<script type="text/javascript" src="..") into a separate iframe. (Based on this posting) The request to the ad server typically require a seed variable declared once per site and incremented each time page is loaded by the client. What I want to do is pass in the seed variable into the document invoked by my iframe section. The seed variable is initialized in the 'head' tag of my main html document: <head> <script type="text/javascript"> <!-- custom_seed=1; //--> </script> </head> Later in the html document, I make the request through an iframe which returns the html necessary to invoke the ad server. <body> <!-- a bunch of html to display the page --> <iframe src="somepage.html" width="100%" height="100%"> <p>No support for iframe</p> </iframe> </body> The html returned in the 'somepage.html' has a script used to call the ad server and needs to use the earlier declared seed variable as a parameter: <script type="text/javascript"> document.write('<script type="text/javascript" src="http://ad.server.net/...seed='+ custom_seed +'?"></script>'); custom_seed++; </script> What's a good way to achieve this?

    Read the article

  • How to replace "(" with "\(" in the regexp, Emacs/elisp flavor?

    - by polyglot
    Question as title. More specifically, I'm rather tired of having to type \(, etc. every time I want a parenthesis in Emacs's (interactive) regexp functions (not to mention the \\( in code). So I wrote something like (defadvice query-replace-regexp (before my-query-replace-regexp activate) (ad-set-arg 0 (replace-regexp-in-string "(" "\\\\(" (ad-get-arg 0))) (ad-set-arg 0 (replace-regexp-in-string ")" "\\\\)" (ad-get-arg 0))))) in hope that I can conveniently forget about emacs's idiosyncrasy in regexp during "interaction mode". Except I cannot get the regexp right... (replace-regexp-in-string "(" "\\\\(" "(abc") gives \\(abc instead of the wanted \(abc. Other variations on the number of slashes just gives errors. Thoughts? Since I started questioning, might as well ask another one: since lisp code is not supposed to use interactive functions, advicing query-replace-regexp should be okay, am I correct?

    Read the article

  • Transform any JavaScript function into a page event

    - by Laith
    I need to be able to achieve the following (one way or another): function ShowContent() {} document.onShowContent = function () { // anything I want to happen.... } What I'm trying to do is to add a kind of listener to me Advertisement code on the page that will auto refresh the ad slot when a specific function is called. Instead of having that function "ShowContent()" directly refresh the ad code, I want the ad code to refresh if it detects that "ShowContent()" has been called. Thanks.

    Read the article

  • CKEDITOR, is return some strange characters

    - by nobosh
    With CKEDITOR, when I use JS to get the contents of the Text Editor, I'm getting back: <p>\u000a\u0009&nbsp;ad adad ad asd</p>\u000a When I should have gotten: <p>ad adad ad asd</p> Any idea what's going on here? The only difference that could be the cause is that I'm dynamically created textareas on load, and using a class to find the editor: $('.guideItem-textarea').each(function(index, value){ // ID of the textarea var targeteditor = $(this).attr('id'); var targeteditorID = $(this).attr('id').replace('noteguide',''); // Contents in the editor textareacontents = CKEDITOR.instances[targeteditor].getData(); }); Any ideas?

    Read the article

  • Back button causes iFrame to delay window.onLoad event

    - by JoJo
    I serve ads through an iFrame. The ad network's servers are much slower than mine, so I asyncronously load the iFrame after the window.onLoad event. Event.observe( window, 'load', function() { $('ad').writeAttribute('ad.html'); } ); A problem occurs when you enter the site via the browser's back button. Unexpectedly, the ad iFrame attempts to load immediately, delaying window.onLoad for a few seconds. During these few seconds, the site is unusable because I do a bunch of initialization after window.onLoad. As far as I know, this only happens in Firefox. How do I prevent this blocking load?

    Read the article

  • Trace Routing for a Certain port

    - by Mubashar Ahmad
    Dear Network Gurus Before saying anything let me tell you that i am not well educated int networks related subjects. I am a software developer and I have written and exposed a Service on HTTPS at port 8000. Now i want to know that if there is any kind of software that can help me to trace if there is any kind of port blocking from one site to my service location with information of blocker host. I have tried couple of Tracerout software like wintrace but all these uses ICMP protocols and there is no option to provide port number in them. And moreover i like to ad an exception in Firewall for incoming ICMP protocal in windows server 2003 windows firewall but i can't see anyoption to ad protocol in exception instead there are only options to ad a program or ad a port of udp or tcp. Please help Regards

    Read the article

  • Order by is not working

    - by coure06
    With Results as ( SELECT Top(100) percent ROW_NUMBER() over (Order by (select 1)) as RowNumber, Ad.Date, Title FROM Ad inner join Job on Ad.Id = Job.AdId Order by case When @sortCol='Date' and @sortDir='ASC' Then Date End ASC, case When @sortCol='Date' and @sortDir='DESC' Then Date End DESC ) Select * from Results Where RowNumber BETWEEN @FirstRow AND @LastRow END Whatever is passed in @sortDir and @sortCol it does not work.What am I doing wrong?

    Read the article

  • RewriteRule help

    - by Camran
    I have successfully setup htaccess to do this: domain.com/ad.php?ad_id=bmw_m3_2498224 INTO: domain.com/ads/bmw_m3_2498224 However, I have a link on the page which makes the page submit to itself... The link saves the ad inside a cookie: domain.com/ad.php?ad_id=bmw_m3_2498224&save=1 // Note the 'save' variable I need to make this work on the rewritten rule also, so this link: domain.com/ads/bmw_m3_2498224/save will save the cookie... I have this so far which DOES NOT work for the save part: RewriteRule ^annons/([a-zA-Z0-9_]+)$ ad.php?ad_id=$1 [NC,L] How can I include another rule to accomplish what I want? Thanks

    Read the article

  • Django - partially validating form

    - by aeter
    I'm new to Django, trying to process some forms. I have this form for entering information (creating a new ad) in one template: class Ad(models.Model): ... category = models.CharField("Category",max_length=30, choices=CATEGORIES) sub_category = models.CharField("Subcategory",max_length=4, choices=SUBCATEGORIES) location = models.CharField("Location",max_length=30, blank=True) title = models.CharField("Title",max_length=50) ... I validate it with "is_valid()" just fine. Basically for the second validation (another template) I want to validate only against "category" and "sub_category": In another template, I want to use 2 fields from the same form ("category" and "sub_category") for filtering information - and now the "is_valid()" method would not work correctly, cause it validates the entire form, and I need to validate only 2 fields. I have tried with the following: ... if request.method == 'POST': # If a filter for data has been submitted: form = AdForm(request.POST) try: form = form.clean() category = form.category sub_category = form.sub_category latest_ads_list = Ad.objects.filter(category=category) except ValidationError: latest_ads_list = Ad.objects.all().order_by('pub_date') else: latest_ads_list = Ad.objects.all().order_by('pub_date') form = AdForm() ... but it doesn't work. How can I validate only the 2 fields category and sub_category?

    Read the article

  • How do I create a user history?

    - by ggfan
    I want to create a user history function that allows shows users what they done. ex: commented on an ad, posted an ad, voted on an ad, etc. How exactly do I do this? I was thinking about... in my site, when they log in it stores their user_id ($_SESSION['user_id']) so I guess whenever an user posts an ad(postad.php), comments(comment.php), I would just store in a database table "userhistory" what they did based on whenever or not their user_id was activate. When they comment, I store the user_id in the comment dbc table, so I'll also store it in the "userhistory" table. And then I would just queries all the rows in the dbc for the user to show it Any steps/improvements I can make? :)

    Read the article

  • R matrix handling expressions aren't evaluated in a function or a "for" loop - Column extract doesn't seem to work

    - by Sal Leggio
    I have an R matrix named ddd. When I enter this, everything works fine: i <- 1 shapiro.test(ddd[,y]) ad.test(ddd[,y]) stem(ddd[,y]) print(y) The calls to Shapiro Wilk, Anderson Darling, and stem all work, and extract the same column. If I put this code in a "for" loop, the calls to Shapiro Wilk, and Anderson Darling stop working, while the the stem & leaf call and the print call continue to work. for (y in 7:10) { shapiro.test(ddd[,y]) ad.test(ddd[,y]) stem(ddd[,y]) print(y) } The decimal point is 1 digit(s) to the right of the | 0 | 0 0 | 899999 1 | 0 [1] 7 The same thing happens if I try and write a function. SW & AD do not work. The other calls do. D <- function (y) { + shapiro.test(ddd[,y]) + ad.test(ddd[,y]) + stem(ddd[,y]) + print(y) } D(9) The decimal point is at the | 9 | 000 9 | 10 | 00000 [1] 9 Why don't all the calls behave the same way?

    Read the article

  • How can several different datatypes be saved in one table

    - by poseidon
    This is my situation: I am constructing an ad-like application in Django and Mysql. I am using a flexible-ad approach where we have: a table with ad categories (several categories such as home, furniture, cars, etc.) id_category name a table with details for the ad categories (home: area, squared meters. car: seats, color.) id_detail id_category (the categ the detail describes) name type (boolean, char, int, long, etc.) the ad table (i am selling a house. i am selling a car.) id_ad id_category text date a table where i plan to consolidate the details of the ads (home: A-area, 500 sq-meters. car: 5 seats, red.) id_detail_ad id_ad id_detail value Is this possible? Can I have a table of details for all the ads, even if details include numbers, texts, booleans, etc? Or would I have to save them all as text and then interpret them via code accordingly? Please express your opinions. Thank you.

    Read the article

  • Recommend a local LDAP store for development

    - by Paul Stovell
    Our project uses an LDAP repository for storing users. In production this will be Active Directory. For development, we seem to have a couple of options: Install an AD LDS instance that everyone uses Install an AD LDS instance on every developer machine We're trying to keep the 'F5' experience as lightweight as possible, so installing things or relying on a central AD store aren't my favorite ideas. There are other LDAP servers, like Open LDAP. I was hoping there might be an LDAP server that simply talks to an XML file. This would allow us to store the XML file in source control and have something that is fast and works. Our nightly builds would still use AD to pick up any differences, but the hope is since we're using LDAP it should Just Work. Can you recommend an LDAP implementation that works well for zero-config shared-nothing development?

    Read the article

  • How can I select all records between two dates without using date fields?

    - by Hayden Bech
    Hi, I have a MySQL DB and I need to be able to store dates earlier then 1970 - in my case, as early as 0 AD and earlier too, so I need a custom way to store dates. I have thought to use this format: Year - int(6) | Month -int(2) | day - int (2) | time - time | AD tinyint (1) | mya - int (11) But when it comes to actually using data in this format it becomes difficult. For example, if I want to get all records between two dates it would be like (pseudocode not SQL): get all where year between minYear and maxYear if year == minYear, month = minMonth if year == maxYear, month <= maxMonth if month == minMonth, day = minDay if month == maxMonth, day <= maxDay if day == minDay, time = minTime if day == maxDay, time <= maxTime or something, which seems like a right pain. I could store seconds before/after 0 AD, but that would take up way too much data! 2010 (EDIT: 2011) = 6.4 billion seconds since 0 AD. Does anybody have any ideas for this problem?

    Read the article

  • Adding validations without knowing the fields

    - by Frexuz
    My example form <% form_for @ad do |f| %> <%= f.error_messages %> <p> <%= f.label :ad_type_id %><br /> <%= f.collection_select(:ad_type_id, AdType.all, :id, :name) %> </p> <p> <% @ad.ad_properties.each do |property| %> <%= property.name %>: <% f.fields_for :ad_values do |value_field| %> <%= value_field.text_field :ad_id, :value => @ad.id %> <%= value_field.text_field :ad_property_id, :value => property.id %> <%= value_field.text_field :value %> <% end %><br /><br /> <% end %> </p> <p> <%= f.label :description %><br /> <%= f.text_area :description %> </p> <p><%= f.submit %></p> <% end %> Explanation: Ad has many properties. I can add new properties at any time (it's a normal model). Lets say the Ad is of the type 'hotel'. Then I would add properties like 'stars' and 'breakfast_included' Then I store each of these properties' values in a separate model. And all this works fine with my form above. My problem: These fields are not validated because I can't know what their names are. I need to add validations dynamically somehow. My thought: #Before the normal validations kick in def add_validations self.properties.each do |property| property.add_validation :whatever #somehow :) end end How could I do this?

    Read the article

  • How to edit Google Adsense?

    - by mtokoly
    I am trying to find out if one can still edit their google ads. I would like mine to appear how i have it below. Two Ads (and no more), Pure text (no arrows), and the "Ads by Google" on top. Is there something i am missing?? do i have to be a premium member?? Please help. Ads by Google Title to Ad The description of the ad on this line. www.examplead.com Title to Ad The description of the ad on this line. www.examplead.com

    Read the article

  • Getting maximum value from table using LINQ

    - by Tena
    I have a table in my database. I want to get the maximum value of a column named NumOfView. I used this code: var advert=(from ad in storedb.Ads where ad.AdScope == "1" select ad.NumOfView).Max(); It works but when there are two or more same maximum values it doesn't work and this message appears: Sequence contains more than one element What should I do now? Your answers will be very helpfull. Thanks

    Read the article

  • One email user keeps disconnecting from our exchange server

    - by Funky Si
    I have one user who keeps reporting that Outlook keeps disconnecting from our email server. All other users are fine. Our email server is running Exchange 2010 and the client is running Outlook 2003. The disconnection only lasts a moment. I have checked for logs on the client and Exchange server and can not see any reason for the disconnect, On the Client I get EventId 26 telling me Outlook has disconnected and reconnected but no reason why. Can anyone give me some suggestions of things to try and track down where the problem could be? --Update-- I have found the following log file C:\Program Files\Microsoft\Exchange Server\V14\Logging\RPC Client Access which suggests that it is a problem with RPC sessions. Excerpt is below 2013-01-31T15:21:24.015Z,6413,15,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,,0,00:00:00,"BS=Conn:24,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/2%,AB:$null/$null/0%,RPC:$null/$null/1%,FC:$null/0,Policy:ClientThrottlingPolicy2,Norm[Resources:(Mdb)Mailbox Database 0765959540(Health:-1%,HistLoad:0),(Mdb)Public Folder Database 1945427388(Health:-1%,HistLoad:0),];GC:6/1/0;", 2013-01-31T15:21:24.015Z,6413,16,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,PublicLogoff,0,00:00:00,LogonId: 1, 2013-01-31T15:21:24.015Z,6413,16,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,,,00:00:00,"BS=Conn:24,HangingConn:0,AD:$null/$null/0%,CAS:$null/$null/2%,AB:$null/$null/0%,RPC:$null/$null/1%,FC:$null/0,Policy:ClientThrottlingPolicy2,Norm[Resources:(Mdb)Mailbox Database 0765959540(Health:-1%,HistLoad:0),(Mdb)Public Folder Database 1945427388(Health:-1%,HistLoad:0),];GC:6/1/0;", 2013-01-31T15:21:24.015Z,6417,5,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,OwnerLogoff,0,00:00:00,LogonId: 0, 2013-01-31T15:21:24.015Z,6417,5,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,,0x6BA (rpc::Exception),00:02:54.7668000,Budget Highs [AD = 0][CAS = 3][RPC = 1] Session Throttled Count = 0; SessionDropped,"RpcEndPoint: [ServerUnavailableException] Connection must be re-established - [SessionDeadException] Connection doesn't have any open logons, but has client activity. This may be masking synchronization stalls. Dropping a connection." 2013-01-31T15:21:24.015Z,6420,7,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,DelegateLogoff,0,00:00:00,LogonId: 0, 2013-01-31T15:21:24.031Z,6420,7,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,,,00:00:00.0156000,Budget Highs [AD = 0][CAS = 3][RPC = 1] Session Throttled Count = 0, 2013-01-31T15:21:24.031Z,6420,7,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,Disconnect,0,00:02:54.2364000,, 2013-01-31T15:21:24.031Z,6419,5,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,OwnerLogoff,0,00:00:00,LogonId: 0, 2013-01-31T15:21:24.031Z,6419,5,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,,,00:00:00,Budget Highs [AD = 0][CAS = 3][RPC = 1] Session Throttled Count = 0, 2013-01-31T15:21:24.031Z,6419,5,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,Disconnect,0,00:02:54.4392000,, 2013-01-31T15:21:24.031Z,6416,7,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,DelegateLogoff,0,00:00:00,LogonId: 0, 2013-01-31T15:21:24.031Z,6416,7,/o=EUROSAFEUK/ou=first administrative group/cn=Recipients/cn=andy,,OUTLOOK.EXE,11.0.8303.0,Classic,,,ncacn_ip_tcp,,,,00:00:00,Budget Highs [AD = 0][CAS = 3][RPC = 1] Session Throttled Count = 0, Can anyone help point me in the right direction for a solution?

    Read the article

  • Displaying topics/categories related ads

    - by Frank
    Is there any advertising company that allow webmasters to decide on general ad topics (such as "Entertainment", "Autos and vehicles", "Arts", etc.) to be displayed for a user visiting on a website? I know you can choose specific ad campaigns to show to users, or let the advertising company decide for you which ads to show. But I am looking for an option to ask for the advertsing company to show me ads based on categories/topics. Thanks. Frank

    Read the article

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