Daily Archives

Articles indexed Tuesday May 11 2010

Page 10/123 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Ajax: Load XML from different domain?

    - by John Isaacks
    I have signed up(paid) for Google site search. They have me a url of a sort of web service where I can send a query to it, it searches my site, and it returns XML of the search results. Well I am trying to load this XML via Ajax from a page on my site but I cannot. I can load from any of my pages on my domain so I am assuming it is because of the XML being on Google's domain. So there has got to be a way to load it though, I don't think they would have given me the URL if I couldn't do anything with it lol. Does anyone know how to do this? Thanks! UPDATE: this is what the page says on google that gave me the XML: How to get XML You can get XML results for your search engine by replacing query+terms with your search query in this URL: http://www.google.com/cse?cx=MY_UNIQUE_KEY&client=google-csbe&output=xml_no_dtd&q=query+terms Where MY_UNIQUE_KEY = my unique key.

    Read the article

  • Can I void all JavaScript calls to $

    - by alex
    I need some scripts inside an existing site's scripts.js. This site has been online for ages, and I can not touch the scripts file. I am including it standardly in another page. There are numerous jQuery calls in the scripts file. The place I include it does not have jQuery. I want to void all $() type things. I tried this... $ = function() { }; before I included scripts.js and it didn't seem to work. I am still getting errors like $(document) is undefined Is there a way to void all these jQuery calls? Thanks

    Read the article

  • Copying a mysql database from localhost to remote server using mysqldump.exe

    - by Ankur
    I want to copy a mysql database from my local computer to a remote server. I am trying to use the mysql dump command. All the examples on the internet suggest doing something like The initial mysql> is just the prompt I get after logging in. mysql> mysqldump -u user -p pass myDBName | NewDBName.out; But when I do this I get You have an error in your SQL syntax; check the manual that corresponds ... to use near 'mysqldump -u user -p pass myDBName | NewDBName.out' Since I have already logged in do I need to use -u and -p? Not doing so gives me the same error. Can you see what is wrong?

    Read the article

  • 'abstract class' versus 'normal class' for a reusable library

    - by Greg
    I'm developing a reusable library and have been creating abstract classes, so the client can then extend from these. QUESTION: Is there any reason in fact I should use an abstract class here as opposed to just a normal class? Note - Have already decided I do not want to use interfaces as I want to include actual default methods in my library so the client using it doesn't have to write the code.

    Read the article

  • What is the delegate method that is called when an MKPinAnnotationView is touched?

    - by Jake Schwartz
    I have been searching for this all night and I have just so frustrated. When a MKPinAnnotationView is clicked, the name and the subtitle comes up. I also want to center that point on the view. I figured there was some method I had to override because the information that pops up happened without me having to code it. Hopefully this was clear enough for you all. And in the mean time, I feel like there is some hidden guide on this use of MKMaps and other classes. Either that or it is terribly documented because I am having a lot of trouble finding information. Thanks.

    Read the article

  • How does overlayViewTouched notification work in the MoviePlayer sample code

    - by Jonathan
    Hi, I have a question regarding the MoviePlayer sample code provided by apple. I don't understand how the overlayViewTouch notification works. The NSlog message I added to it does not get sent when I touch the view (not button). // post the "overlayViewTouch" notification and will send // the overlayViewTouches: message - (void)overlayViewTouches:(NSNotification *)notification { NSLog(@"overlay view touched"); // Handle touches to the overlay view (MyOverlayView) here... } I can, however, get the NSlog notification if I place it in -(void)touchesBegan in "MyOverlayView.m". Which makes me think it is recognizing touches but not sending a notification. // Handle any touches to the overlay view - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch* touch = [touches anyObject]; if (touch.phase == UITouchPhaseBegan) { NSLog(@"overlay touched(from touchesBegan") // IMPORTANT: // Touches to the overlay view are being handled using // two different techniques as described here: // // 1. Touches to the overlay view (not in the button) // // On touches to the view we will post a notification // "overlayViewTouch". MyMovieViewController is registered // as an observer for this notification, and the // overlayViewTouches: method in MyMovieViewController // will be called. // // 2. Touches to the button // // Touches to the button in this same view will // trigger the MyMovieViewController overlayViewButtonPress: // action method instead. NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc postNotificationName:OverlayViewTouchNotification object:nil]; } } Can anyone shed light on what I am missing or doing wrong? Thank you.

    Read the article

  • Does <httpRedirect> in web.config work in a mono setup? Or is it IIS7 specific?

    - by Crystal
    We had some content restructure recently and I'd like to put in some redirect rules into web.config so bookmarks to the old pages can get routed to their new locations/pages. I tried using this approach: <location path="~/product/productA.aspx"> <system.webServer> <httpRedirect enabled="true" destination="~/product/category/productA.aspx" exactDestination="false" childOnly="true" httpResponseStatus="Permanent" /> </system.webServer> </location> But all I'm getting when I go to "http://www.oursite.com/product/productA.aspx" is our http 404 page. Am I doing something wrong, or is the httpRedirect tag in web.config not supported in mono? worked, but not ideal for what we want to achieve. Thank you :)

    Read the article

  • Installing meld on OS X

    - by Dave
    After I got MacPorts installed and did a 'sudo port -v selfupdate', I try to install meld. The installation just starts to Fetching all kinds of stuff gnome-comoon perl5.8 perl5 pkgconfig ..... this goes on and on. Is that normal?

    Read the article

  • Can any linux API or tool watch for any change in any folder below e.g. /SharedRoot or do I have to

    - by Simon B.
    I have a folder with ~10 000 subfolders. Can any linux API or tool watch for any change in any folder below e.g. /SharedRoot or do I have to setup inotify for each folder? (i.e. I loose if I want to do this for 10k+ folders). I guess yes, since I've already seen examples of this inefficient method, for instance http://twistedmatrix.com/trac/browser/trunk/twisted/internet/inotify.py?rev=28866#L345 My problem: I need to keep folders time-sorted with most recently active "project" up top. When a file changes, each folder above that file should update its last-modified timestamp to match the file. Delays are ok. Opening a file (typically MS Excel) and closing again, its file date can jump up and then down again. For this reason I need to wait until after a file is closed, then queue the folder of that file for checking, and only a while later do I go and look for the newest file in its folder, since the filedate of the triggering file could already be back-dated to its original timestamp by Excel or similar programs. Also in case several files from same folder are used/created, it makes sense to buffer timestamping of that folders' parents to at least get a bunch of updates collapsed into one delayed update. I'm looking for a linux solution. I have some code that can be run on a windows server, most of the queing functionality is here: http://github.com/sesam/FolderdateFollowsFiles/blob/master/FolderdateFollowsFiles/Follower.vb Available API:s The relative of inotify on windows, ReadDirectoryChangesW, can watch a folder and its whole subtree; see bWatchSubtree on http://msdn.microsoft.com/en-us/library/aa365465(VS.85).aspx Samba? Patching samba source is a possibility, but perhaps there are already hooks available? Other possibilities, like client side (various windows versions) and spying on file activities in order to update folders recursively?

    Read the article

  • javascript string exec strange behavior

    - by Michael
    have funciton in my object which is called regularly. parse : function(html) { var regexp = /...some pattern.../ var match = regexp.exec(html); while (match != null) { ... match = regexp.exec(html); } ... var r = /...pattern.../g; var m = r.exec(html); } with unchanged html the m returns null each other call. let's say parse(html);// ok parse(html);// m is null!!! parse(html);// ok parse(html);// m is null!!! // ...and so on... is there any index or somrthing that has to be reset on html ... I'm really confused. Why match always returns proper result?

    Read the article

  • Javascript - How to index html code into variables

    - by Fernando SBS
    The webpage has the following source (only copied the important part): <h1>Relatórios</h1> <div id="textmenu"> <a href="berichte.php" class="selected ">Tudo</a> | <a href="berichte.php?t=2">Comércio</a> | <a href="berichte.php?t=1">Reforços</a> | <a href="berichte.php?t=3">Ataques</a> | <a href="berichte.php?t=4">Outros</a> </div> <form method="post" action="berichte.php" name="msg"> <table cellpadding="1" cellspacing="1" id="overview" class="row_table_data"> <thead> <tr> <th colspan="2">Assunto:</th> <th class="sent"> enviada</th> </tr> </thead><tfoot> <tr> <th>&nbsp;</th> <th class=buttons><input name=del value=apagar alt=apagar type=image id=btn_delete class=dynamic_img src=img/x.gif /></th> <th class=navi>&laquo;<a href="berichte.php?s=10&amp;o=0">&raquo;</a></th> </tr> </tfoot> <tbody> <tr> <td class="sel"><input class="check" type="checkbox" name="n1" value="15737030" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15737030">Rio Grande Do Leste ataca lcsanchez da aldeia</a> </div> </td> <td class="dat">hoje 21:33</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n2" value="15736877" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15736877">Rio Grande Do Leste ataca Thabiti da aldeia</a> </div> </td> <td class="dat">hoje 21:32</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n3" value="15736759" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15736759">Rio Grande Do Leste ataca Dionisio</a> </div> </td> <td class="dat">hoje 21:31</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n4" value="15736513" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15736513">Rio Grande Do Leste ataca Aldeia de troakris</a> (nova)</div> </td> <td class="dat">hoje 21:30</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n5" value="15736275" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15736275">Rio Grande Do Leste ataca Thabiti da aldeia</a> </div> </td> <td class="dat">hoje 21:28</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n6" value="15736220" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15736220">Rio Grande Do Leste ataca Aldeia de troakris</a> (nova)</div> </td> <td class="dat">hoje 21:28</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n7" value="15734824" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15734824">Rio Grande Do Leste ataca Austrália</a> </div> </td> <td class="dat">hoje 21:18</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n8" value="15734440" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15734440">Rio Grande Do Leste ataca andrômeda</a> (nova)</div> </td> <td class="dat">hoje 21:15</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n9" value="15730612" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15730612">Rio Grande Do Leste ataca wLG02 KING OF POP</a> (nova)</div> </td> <td class="dat">hoje 20:49</td> </tr> <tr> <td class="sel"><input class="check" type="checkbox" name="n10" value="15730304" /></td> <td class="sub"><img src="img/x.gif" class="iReport iReport1" alt="Ganhou como atacante sem perdas" title="Ganhou como atacante sem perdas" /> <div><a href="berichte.php?id=15730304">Rio Grande Do Leste ataca wLG02 KING OF POP</a> (nova)</div> </td> <td class="dat">hoje 20:47</td> </tr> </tbody> </table> </form> </div> I want to read from the source and assign to a variable the values like: relatorio[0] = berichte.php?id=15730304; relatorio[1] = berichte.php?id=15730612; ... relatorio[9] = berichte.php?id=15737030; How to do that? thanks

    Read the article

  • Asynchronous callback for network in Objective-C Iphone

    - by vodkhang
    I am working with network request - response in Objective-C. There is something with asynchronous model that I don't understand. In summary, I have a view that will show my statuses from 2 social networks: Twitter and Facebook. When I clicked refresh, it will call a model manager. That model manager will call 2 service helpers to request for latest items. When 2 service helpers receive data, it will pass back to model manager and this model will add all data into a sorted array. What I don't understand here is that : when response from social networks come back, how many threads will handle the response. From my understanding about multithreading and networking (in Java), there must have 2 threads handle 2 responses and those 2 threads will execute the code to add the responses to the array. So, it can have race condition and the program can go wrong right? Is it the correct working model of iphone objective-C? Or they do it in a different way that it will never have race condition and we don't have to care about locking, synchronize? Here is my example code: ModelManager.m - (void)updateMyItems:(NSArray *)items { self.helpers = [self authenticatedHelpersForAction:NCHelperActionGetMyItems]; for (id<NCHelper> helper in self.helpers) { [helper updateMyItems:items]; // NETWORK request here } } - (void)helper:(id <NCHelper>)helper didReturnItems:(NSArray *)items { [self helperDidFinishGettingMyItems:items callback:@selector(model:didGetMyItems:)]; break; } } // some private attributes int *_currentSocialNetworkItemsCount = 0; // to count the number of items of a social network - (void)helperDidFinishGettingMyItems:(NSArray *)items { for (Item *item in items) { _currentSocialNetworkItemsCount ++; } NSLog(@"count: %d", _currentSocialNetworkItemsCount); _currentSocialNetworkItemsCount = 0; } I want to ask if there is a case that the method helperDidFinishGettingMyItems is called concurrently. That means, for example, faceboook returns 10 items, twitter returns 10 items, will the output of count will ever be larger than 10? And if there is only one single thread, how can the thread finishes parsing 1 response and jump to the other response because, IMO, thread is only executed sequently, block of code by block of code

    Read the article

  • smartctl -t long isn't finishing

    - by xenoterracide
    I been running smartctl -t long on a drive for about 2 days now and it seems to be stalled at 10%. short and conveyance both passed. I have to send 1 of 2 drives purchased back I found badblocks with badblocks (none on this drive and I'ts made over a pass already). I'm just wondering if I should be concerned about this. smartctl 5.39.1 2010-01-28 r3054 [x86_64-unknown-linux-gnu] (local build) Copyright (C) 2002-10 by Bruce Allen, http://smartmontools.sourceforge.net === START OF INFORMATION SECTION === Device Model: WDC WD10EARS-00Y5B1 Serial Number: WD-WMAV51582123 Firmware Version: 80.00A80 User Capacity: 1,000,204,886,016 bytes Device is: Not in smartctl database [for details use: -P showall] ATA Version is: 8 ATA Standard is: Exact ATA specification draft version not indicated Local Time is: Mon May 10 22:19:52 2010 EDT SMART support is: Available - device has SMART capability. SMART support is: Enabled === START OF READ SMART DATA SECTION === SMART overall-health self-assessment test result: PASSED General SMART Values: Offline data collection status: (0x82) Offline data collection activity was completed without error. Auto Offline Data Collection: Enabled. Self-test execution status: ( 241) Self-test routine in progress... 10% of test remaining. Total time to complete Offline data collection: (20100) seconds. Offline data collection capabilities: (0x7b) SMART execute Offline immediate. Auto Offline data collection on/off support. Suspend Offline collection upon new command. Offline surface scan supported. Self-test supported. Conveyance Self-test supported. Selective Self-test supported. SMART capabilities: (0x0003) Saves SMART data before entering power-saving mode. Supports SMART auto save timer. Error logging capability: (0x01) Error logging supported. General Purpose Logging supported. Short self-test routine recommended polling time: ( 2) minutes. Extended self-test routine recommended polling time: ( 231) minutes. Conveyance self-test routine recommended polling time: ( 5) minutes. SCT capabilities: (0x3031) SCT Status supported. SCT Feature Control supported. SCT Data Table supported. SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE 1 Raw_Read_Error_Rate 0x002f 200 200 051 Pre-fail Always - 2 3 Spin_Up_Time 0x0027 131 131 021 Pre-fail Always - 6408 4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 12 5 Reallocated_Sector_Ct 0x0033 200 200 140 Pre-fail Always - 0 7 Seek_Error_Rate 0x002e 200 200 000 Old_age Always - 0 9 Power_On_Hours 0x0032 100 100 000 Old_age Always - 148 10 Spin_Retry_Count 0x0032 100 253 000 Old_age Always - 0 11 Calibration_Retry_Count 0x0032 100 253 000 Old_age Always - 0 12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 10 192 Power-Off_Retract_Count 0x0032 200 200 000 Old_age Always - 7 193 Load_Cycle_Count 0x0032 200 200 000 Old_age Always - 174 194 Temperature_Celsius 0x0022 106 102 000 Old_age Always - 41 196 Reallocated_Event_Count 0x0032 200 200 000 Old_age Always - 0 197 Current_Pending_Sector 0x0032 200 200 000 Old_age Always - 0 198 Offline_Uncorrectable 0x0030 200 200 000 Old_age Offline - 0 199 UDMA_CRC_Error_Count 0x0032 200 200 000 Old_age Always - 0 200 Multi_Zone_Error_Rate 0x0008 200 200 000 Old_age Offline - 0 SMART Error Log Version: 1 No Errors Logged SMART Self-test log structure revision number 1 Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error # 1 Conveyance offline Completed without error 00% 99 - # 2 Extended offline Interrupted (host reset) 10% 30 - # 3 Short offline Completed without error 00% 0 - SMART Selective self-test log data structure revision number 1 SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS 1 0 0 Not_testing 2 0 0 Not_testing 3 0 0 Not_testing 4 0 0 Not_testing 5 0 0 Not_testing Selective self-test flags (0x0): After scanning selected spans, do NOT read-scan remainder of disk. If Selective self-test is pending on power-up, resume after 0 minute delay.

    Read the article

  • Free Time Tracking Web Application

    - by cwius
    Are you aware of any good time tracking web application (hosted, download) that is free or open source? I am looking for something to track the time I spend on projects and bug fixes. I am already looking at ASP .NET 2.0 Time Tracker Starter Kit but wanted to see if there is anything else out there or should I write my own application.

    Read the article

  • Override An Existing Property as a Child form of its return type

    - by Jason
    I apologize if that title is confusing. This question may be a result of lack of coffee and/or sleep, but my mind is not working correctly right now. Anyways, I have an inheritance tree like such (I know the architecture isn't ideal): BaseClass GeneralForm : Inherits BaseClass SpecificForm : Inherits GeneralForm And an object like so: MyItem MySpecificItem : Inherits MyItem I have Items As List (Of MyItem) as a property in BaseClass. I would like for SpecificForm to somehow override Items to return type List (Of MySpecificItem). I feel like this is easy to do, but again, my head is spinning and I can't think straight at the moment. Thank you so much in advance.

    Read the article

  • C# Application Becomes Slow and Unresponsive as String in Multiline Textbox Grows

    - by Jim Fell
    Hello. I have a C# application in which a LOT of information is being added to a Textbox for display to the user. Upon processing of the data, almost immediately, the application becomes very slow and unresponsive. This is how I am currently attempting to handle this: var saLines = textBox1.Lines; var saNewLines = saLines.Skip(50); textBox1.Lines = saNewLines.ToArray(); This code is run from a timer every 100mS. Is there a better way to handle this? I am using Microsoft Visual C# 2008 Express Edition. Thanks.

    Read the article

  • Stack overflow in OCaml and F# but not in Haskell

    - by Fernand Pajot
    I've been comparing for fun different languages for speed in execution of the following program: for i from 1 to 1000000 sum the product i*(sqrt i) One of my implementations (not the only one) is constructing a list [1..1000000] and then folding with a specific funtion. The program works fine and fast in Haskell (even when using foldl and not foldl') but stack overflows in OCaml and F#. Here is the Haskell code: test = foldl (\ a b -> a + b * (sqrt b)) 0 create 0 = [] create n = n:(create (n-1)) main = print (test (create 1000000)) And here is the OCaml one: let test = List.fold_left (fun a b -> a +. (float_of_int b) *. (sqrt (float_of_int b))) 0. ;; let rec create = function | 0 -> [] | n -> n::(create (n-1)) ;; print_float (test (create 1000000));; Why does the OCaml/F# implementation stack overflows?

    Read the article

  • Codesign returns exit code of 11 for xcode iphone project -- can't find documentation on exit code 1

    - by Larry Freeman
    Hi Everyone, I'm new to iPhone development. I am trying to get Xcode to run an application on a phone. The app works fine in the simulator. Initially I hit the error: The executable was signed with invalid entitlements I followed the steps here: http://stackoverflow.com/questions/1074546/the-executable-was-signed-with-invalid-entitlements But now I am getting an exit code of 11. I checked the documentation on codesign but I can't find any mention of an exit code 11 (http://gemma.apple.com/mac/library/documentation/Darwin/Reference/ManPages/man1/codesign.1.html) Below is the log I am getting. Any help is greatly appreciated. I am using iPhone OS 3.1.3. Build HubPages of project HubPages with configuration Debug CodeSign build/Debug-iphoneos/HubPages.app cd /Users/larryfreeman/src/hub/mobile/HubPages/build/iphone setenv IGNORE_CODESIGN_ALLOCATE_RADAR_7181968 /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate setenv PATH "/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin" /usr/bin/codesign -f -s "iPhone Developer: Larry Freeman (LT6G4W62Z2)" --resource-rules=/Users/larryfreeman/src/hub/mobile/HubPages/build/iphone/build/Debug-iphoneos/HubPages.app/Entitlements.plist --entitlements /Users/larryfreeman/src/hub/mobile/HubPages/build/iphone/build/HubPages.build/Debug-iphoneos/HubPages.build/HubPages.xcent /Users/larryfreeman/src/hub/mobile/HubPages/build/iphone/build/Debug-iphoneos/HubPages.app Command /usr/bin/codesign failed with exit code 11 Thanks! -Larry

    Read the article

  • Can Internet Explorer bind events to absolute positioned elements ?

    - by mark
    Can Internet Explorer bind events to absolute positioned elements ? I can't bind a "click" to an element that is overlapping another. Have tried loads of different ways, here a few tests that don't work in IE: //version 1: $(".classHolder").click(function(){ alert( $(this).html() ); }); //version 2: $(".classHolder").each(function(){ $(this).click(function(){ alert( $(this).html() ); }); }); //version 3: $("#id3").click(function(){ alert( $(this).html() ); }); //version 4: $("#id3").click(function(){ alert( $(this).html() ); }); $("#id3").trigger("click"); // in all trials I tested with and without: // $("img").unbind(); // $("div").unbind(); // just to make sure no "ghost" events were bind into the elements but no success. // replace all [ for < , and all ] for [html] [head] [script src="http://code.jquery.com/jquery-latest.js"][/script] [script type="application/javascript"] $(document).ready(function(){ $("#id3").click(function(){ alert( $(this).html() ); }); $("#id3").trigger("click"); }); [/script] [/head] [body] [div id="id1" style="position:relative;"] [img id="id2" src="http://www.google.co.uk/intl/en_com/images/srpr/logo1w.png" style=";z-index:-1;"/] [div id="id3" class="classHolder" style="position:absolute;border:2px solid red;left:0px;top:0px;width:70px;height:70px;z-index:1002;"]G[/div] [div id="id4" class="classHolder" style="position:absolute;border:2px solid red;left:210px;top:0px;width:25px;height:70px;z-index:1001;"]L[/div] asd asdf asdfg [/div] [/body] [/html]

    Read the article

  • NSString to NSURL objects

    - by user337844
    Hello, I have an array that I populated with my plist file, which looks something like this: <array> <string>http://www.apple.com</string> <string>http://www.google.com</string> <string>http://www.amazon.com</string> </array> So, I'm looking to convert these NSString objects to NSURL objects when I call them in my didSelectRowAtIndexPath method. Any ideas? This is what I have right now: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSInteger row = [indexPath row]; if (self.viewController == nil) { TemplateViewController *details = [[TemplateViewController alloc] initWithNibName:@"TemplateViewController" bundle:nil]; self.viewController = details; [details release]; } NSString *tempURLString = [tieroneurlArray objectAtIndex:row]; NSURL *loadingUrl = [NSURL URLWithString:tempURLString]; [tieroneurlArray addObject:loadingUrl]; viewController.title = [NSString stringWithFormat:@"%@", [tieroneArray objectAtIndex:row]]; [self.viewController setTableURL:[tieroneurlArray objectAtIndex:row]]; TemplateAppAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.templateNavController pushViewController:viewController animated:YES]; } And this is how I load the array with the plist: - (void)viewDidLoad { [super viewDidLoad]; NSString *path = [[NSBundle mainBundle] pathForResource:@"tier1Names" ofType:@"plist"]; tieroneArray = [[NSMutableArray alloc] initWithContentsOfFile:path]; NSString *tableURL = [[NSBundle mainBundle] pathForResource:@"tier1URL" ofType:@"plist"]; tieroneurlArray = [[NSMutableArray alloc] initWithContentsOfFile:tableURL]; }

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >