Search Results

Search found 85 results on 4 pages for 'floyd'.

Page 1/4 | 1 2 3 4  | Next Page >

  • Problem on a Floyd-Warshall implementation using c++

    - by Henrique
    I've got a assignment for my college, already implemented Dijkstra and Bellman-Ford sucessfully, but i'm on trouble on this one. Everything looks fine, but it's not giving me the correct answer. Here's the code: void FloydWarshall() { //Also assume that n is the number of vertices and edgeCost(i,i) = 0 int path[500][500]; /* A 2-dimensional matrix. At each step in the algorithm, path[i][j] is the shortest path from i to j using intermediate vertices (1..k-1). Each path[i][j] is initialized to edgeCost(i,j) or infinity if there is no edge between i and j. */ for(int i = 0 ; i <= nvertices ; i++) for(int j = 0 ; j <= nvertices ; j++) path[i][j] = INFINITY; for(int j = 0 ; j < narestas ; j++) //narestas = number of edges { path[arestas[j]->v1][arestas[j]->v2] = arestas[j]->peso; //peso = weight of the edge (aresta = edge) path[arestas[j]->v2][arestas[j]->v1] = arestas[j]->peso; } for(int i = 0 ; i <= nvertices ; i++) //path(i, i) = 0 path[i][i] = 0; //test print, it's working fine //printf("\n\n\nResultado FloydWarshall:\n"); //for(int i = 1 ; i <= nvertices ; i++) // printf("distancia ao vertice %d: %d\n", i, path[1][i]); //heres the problem, it messes up, and even a edge who costs 4, and the minimum is 4, it prints 2. //for k = 1 to n for(int k = 1 ; k <= nvertices ; k++) //for i = 1 to n for(int i = 1 ; i <= nvertices ; i++) //for j := 1 to n for(int j = 1 ; j <= nvertices ; j++) if(path[i][j] > path[i][k] + path[k][j]) path[i][j] = path[i][k] + path[k][j]; printf("\n\n\nResultado FloydWarshall:\n"); for(int i = 1 ; i <= nvertices ; i++) printf("distancia ao vertice %d: %d\n", i, path[1][i]); } im using this graph example i've made: 6 7 1 2 4 1 5 1 2 3 1 2 5 2 5 6 3 6 4 6 3 4 2 means we have 6 vertices (1 to 6), and 7 edges (1,2) with weight 4... etc.. If anyone need more info, i'm up to giving it, just tired of looking at this code and not finding an error.

    Read the article

  • Am I right about the differences between Floyd-Warshall, Dijkstra's and Bellman-Ford algorithms?

    - by Programming Noob
    I've been studying the three and I'm stating my inferences from them below. Could someone tell me if I have understood them accurately enough or not? Thank you. Dijkstra's algorithm is used only when you have a single source and you want to know the smallest path from one node to another, but fails in cases like this Floyd-Warshall's algorithm is used when any of all the nodes can be a source, so you want the shortest distance to reach any destination node from any source node. This only fails when there are negative cycles (this is the most important one. I mean, this is the one I'm least sure about:) 3.Bellman-Ford is used like Dijkstra's, when there is only one source. This can handle negative weights and its working is the same as Floyd-Warshall's except for one source, right? If you need to have a look, the corresponding algorithms are (courtesy Wikipedia): Bellman-Ford: procedure BellmanFord(list vertices, list edges, vertex source) // This implementation takes in a graph, represented as lists of vertices // and edges, and modifies the vertices so that their distance and // predecessor attributes store the shortest paths. // Step 1: initialize graph for each vertex v in vertices: if v is source then v.distance := 0 else v.distance := infinity v.predecessor := null // Step 2: relax edges repeatedly for i from 1 to size(vertices)-1: for each edge uv in edges: // uv is the edge from u to v u := uv.source v := uv.destination if u.distance + uv.weight < v.distance: v.distance := u.distance + uv.weight v.predecessor := u // Step 3: check for negative-weight cycles for each edge uv in edges: u := uv.source v := uv.destination if u.distance + uv.weight < v.distance: error "Graph contains a negative-weight cycle" Dijkstra: 1 function Dijkstra(Graph, source): 2 for each vertex v in Graph: // Initializations 3 dist[v] := infinity ; // Unknown distance function from 4 // source to v 5 previous[v] := undefined ; // Previous node in optimal path 6 // from source 7 8 dist[source] := 0 ; // Distance from source to source 9 Q := the set of all nodes in Graph ; // All nodes in the graph are 10 // unoptimized - thus are in Q 11 while Q is not empty: // The main loop 12 u := vertex in Q with smallest distance in dist[] ; // Start node in first case 13 if dist[u] = infinity: 14 break ; // all remaining vertices are 15 // inaccessible from source 16 17 remove u from Q ; 18 for each neighbor v of u: // where v has not yet been 19 removed from Q. 20 alt := dist[u] + dist_between(u, v) ; 21 if alt < dist[v]: // Relax (u,v,a) 22 dist[v] := alt ; 23 previous[v] := u ; 24 decrease-key v in Q; // Reorder v in the Queue 25 return dist; Floyd-Warshall: 1 /* Assume a function edgeCost(i,j) which returns the cost of the edge from i to j 2 (infinity if there is none). 3 Also assume that n is the number of vertices and edgeCost(i,i) = 0 4 */ 5 6 int path[][]; 7 /* A 2-dimensional matrix. At each step in the algorithm, path[i][j] is the shortest path 8 from i to j using intermediate vertices (1..k-1). Each path[i][j] is initialized to 9 edgeCost(i,j). 10 */ 11 12 procedure FloydWarshall () 13 for k := 1 to n 14 for i := 1 to n 15 for j := 1 to n 16 path[i][j] = min ( path[i][j], path[i][k]+path[k][j] );

    Read the article

  • Podcast Show Notes: Collaborate 10 Wrap-Up - Part 1

    - by Bob Rhubart
    OK, I know last week I promised you a program featuring Oracle ACE Directors Mike van Alst (IT-Eye) and Jordan Braunstein (TUSC) and The Definitive Guide to SOA: Oracle Service Bus author Jeff Davies. But things happen. In this case, what happened was Collaborate 10 in Las Vegas. Prior to the event I asked Oracle ACE Director and OAUG board member Floyd Teter to see if he could round up a couple of people at the event for an impromtu interview over Skype (I was here in Cleveland) to get their impressions of the event. Listen to Part 1 Floyd, armed with his brand new iPad, went above and beyond the call of duty. At the appointed hour, which turned out to be about hour after the close of Collaborate 10,  Floyd had gathered nine other people to join him in a meeting room somewhere in the Mandalay Bay Convention Center. Here’s the entire roster: Floyd Teter - Project Manager at Jet Propulsion Lab, OAUG Board Blog | Twitter | LinkedIn | Oracle Mix | Oracle ACE Profile Mark Rittman - EMEA Technical Director and Co-Founder, Rittman Mead,  ODTUG Board Blog | Twitter | LinkedIn | Oracle Mix | Oracle ACE Profile Chet Justice - OBI Consultant at BI Wizards Blog | Twitter | LinkedIn | Oracle Mix | Oracle ACE Profile Elke Phelps - Oracle Applications DBA at Humana, OAUG SIG Chair Blog | LinkedIn | Oracle Mix | Book | Oracle ACE Profile Paul Jackson - Oracle Applications DBA at Humana Blog | LinkedIn | Oracle Mix | Book Srini Chavali - Enterprise Database & Tools Leader at Cummins, Inc Blog | LinkedIn | Oracle Mix Dave Ferguson – President, Oracle Applications Users Group LinkedIn | OAUG Profile John King - Owner, King Training Resources Website | LinkedIn | Oracle Mix Gavyn Whyte - Project Portfolio Manager at iFactory Consulting Blog | Twitter | LinkedIn | Oracle Mix John Nicholson - Channels & Alliances at Greenlight Technologies Website | LinkedIn Big thanks to Floyd for assembling the panelists and handling the on-scene MC/hosting duties.  Listen to Part 1 On a technical note, this discussion was conducted over Skype, using Floyd’s iPad, placed in the middle of the table.  During the call the audio was fantastic – the iPad did a remarkable job. Sadly, the Technology Gods were not smiling on me that day. The audio set-up that I tested successfully before the call failed to deliver when we first connected – I could hear the folks in Vegas, but they couldn’t hear me. A frantic, last-minute adjustment appeared to have fixed that problem, and the audio in my headphones from both sides of the conversation was loud and clear.  It wasn’t until I listened to the playback that I realized that something was wrong. So the audio for Vegas side of the discussion has about the same fidelity as a cell phone. It’s listenable, but disappointing when compared to what it sounded like during the discussion. Still, this was a one shot deal, and the roster of panelists and the resulting conversation was too good and too much fun to scrap just because of an unfortunate technical glitch.   Part 2 of this Collaborate 10 Wrap-Up will run next week. After that, it’s back on track with the previously scheduled program. So stay tuned: RSS del.icio.us Tags: oracle,otn,collborate 10,c10,oracle ace program,archbeat,arch2arch,oaug,odtug,las vegas Technorati Tags: oracle,otn,collborate 10,c10,oracle ace program,archbeat,arch2arch,oaug,odtug,las vegas

    Read the article

  • jQuery - color cycle animation with hsv colorspace?

    - by Sgt. Floyd Pepper
    Hi there, I am working on a project, which I need a special body-background for. The background-color should cycle through the color spectrum like a mood light. So I found this: http://buildinternet.com/2009/09/its-a-rainbow-color-changing-text-and-backgrounds/ "But" this snippet is working with the RGB colorspace which has some very light and dark colors in it. Getting just bright colors will only work with the HSV colorspace (e.g. having S and V static at 100 and letting H cycle). I don’t know how to convert and in fact how to pimp this snippet for my needs. Does anyone has an idea?? Thanks in advance. Best, Floyd

    Read the article

  • /users/tags should contain scores

    - by Sean Patrick Floyd
    I am implementing some simple JavaScript/bookmarklet based apps that show some reputation info, including the score in the User's top tags (roughly based on this previous bookmarklet of mine). Now I can get a user's top tags (using the API), and I can also get the per-tag score if the user is logged in, by dynamically parsing the tag's top users page. But it costs me one AJAX request per tag and I have to download 10+k to extract a single numeric value. It would save a lot of traffic if the tags in <api>/users/<userid>/tags had a score field. The data seems to be there, after all the top users pages use it, so it would just be a question of exposing the data. Suggested structure: "tags": [ { "name": { "description": "name of the tag", "values": "string", "optional": false, "suggested_buffer_size": 25 }, "score": { "description": "tag score, sum of up votes for answers on non-wiki questions", "values": "32-bit signed integer", "optional": false }, "count": { "description": "tag count, exact meaning depends on context", "values": "32-bit signed integer", "optional": false }, "restricted_to": { "description": "user types that can make use of this tag, lack of this field indicates it is useable by all", "values": "one of anonymous, unregistered, registered, or moderator", "optional": true }, "fulfills_required": { "description": "indicates whether this tag is one of those that is required to be on a post", "values": "boolean", "optional": false }, "user_id": { "description": "user associated with this tag, depends on context", "values": "32-bit signed integer", "optional": true } } ]

    Read the article

  • System Account Logon Failures ever 30 seconds

    - by floyd
    We have two Windows 2008 R2 SP1 servers running in a SQL failover cluster. On one of them we are getting the following events in the security log every 30 seconds. The parts that are blank are actually blank. Has anyone seen similar issues, or assist in tracking down the cause of these events? No other event logs show anything relevant that I can tell. Log Name: Security Source: Microsoft-Windows-Security-Auditing Date: 10/17/2012 10:02:04 PM Event ID: 4625 Task Category: Logon Level: Information Keywords: Audit Failure User: N/A Computer: SERVERNAME.domainname.local Description: An account failed to log on. Subject: Security ID: SYSTEM Account Name: SERVERNAME$ Account Domain: DOMAINNAME Logon ID: 0x3e7 Logon Type: 3 Account For Which Logon Failed: Security ID: NULL SID Account Name: Account Domain: Failure Information: Failure Reason: Unknown user name or bad password. Status: 0xc000006d Sub Status: 0xc0000064 Process Information: Caller Process ID: 0x238 Caller Process Name: C:\Windows\System32\lsass.exe Network Information: Workstation Name: SERVERNAME Source Network Address: - Source Port: - Detailed Authentication Information: Logon Process: Schannel Authentication Package: Kerberos Transited Services: - Package Name (NTLM only): - Key Length: 0 Second event which follows every one of the above events Log Name: Security Source: Microsoft-Windows-Security-Auditing Date: 10/17/2012 10:02:04 PM Event ID: 4625 Task Category: Logon Level: Information Keywords: Audit Failure User: N/A Computer: SERVERNAME.domainname.local Description: An account failed to log on. Subject: Security ID: NULL SID Account Name: - Account Domain: - Logon ID: 0x0 Logon Type: 3 Account For Which Logon Failed: Security ID: NULL SID Account Name: Account Domain: Failure Information: Failure Reason: An Error occured during Logon. Status: 0xc000006d Sub Status: 0x80090325 Process Information: Caller Process ID: 0x0 Caller Process Name: - Network Information: Workstation Name: - Source Network Address: - Source Port: - Detailed Authentication Information: Logon Process: Schannel Authentication Package: Microsoft Unified Security Protocol Provider Transited Services: - Package Name (NTLM only): - Key Length: 0 EDIT UPDATE: I have a bit more information to add. I installed Network Monitor on this machine and did a filter for Kerberos traffic and found the following which corresponds to the timestamps in the security audit log. A Kerberos AS_Request Cname: CN=SQLInstanceName Realm:domain.local Sname krbtgt/domain.local Reply from DC: KRB_ERROR: KDC_ERR_C_PRINCIPAL_UNKOWN I then checked the security audit logs of the DC which responded and found the following: A Kerberos authentication ticket (TGT) was requested. Account Information: Account Name: X509N:<S>CN=SQLInstanceName Supplied Realm Name: domain.local User ID: NULL SID Service Information: Service Name: krbtgt/domain.local Service ID: NULL SID Network Information: Client Address: ::ffff:10.240.42.101 Client Port: 58207 Additional Information: Ticket Options: 0x40810010 Result Code: 0x6 Ticket Encryption Type: 0xffffffff Pre-Authentication Type: - Certificate Information: Certificate Issuer Name: Certificate Serial Number: Certificate Thumbprint: So appears to be related to a certificate installed on the SQL machine, still dont have any clue why or whats wrong with said certificate. It's not expired etc.

    Read the article

  • MDT 2012 Image Capture

    - by floyd
    I am using MDT 2012 Update 1. Attempting to Deploy 2012 DC to a VM, run windows updates, and then sysprep/capture that image. This is the same task sequence process I have used for Windows 7 / 2008 R2 and it works fine. However, for 2012 DC it deploys the image, starts running/installing updates and then on reboot it goes to a "Choose an option" screen if I choose "Exit and continue to Windows Server 2012" it reboots and goes back to same screen. Any ideas?

    Read the article

  • Office 2010 Professionl Plus Trial - Product Activation Fails

    - by Think Floyd
    I have installed Office 2010 Professional Plus Beta trial (x64 version) from MSFT site. Every thing worked fine initially. But after I rebooted machine (Win7 x64), and started Outlook 2010, i see an error dialog that I am not in a "corporate network" and the product could not be activated. I am not in a corporate network. I would like to use Office 2010 on my home network. How do I get around the Product Activation issue?

    Read the article

  • Open FDF document on Mac

    - by Corey Floyd
    I'm having the issue documented here: http://forums.adobe.com/thread/445594 When I try to open a FDF, I just get a pop up over and over again which asks me if I want to open the form. One possible solution is downgrading to Safari 3, but that is not proven to work. I thought maybe I could get the FDF to open in FireFox, but changing the default browser does not affect Reader, it still attempts to open the FDF in Safari (strange). So, does anyone know of a way to open this form? Thanks -Corey

    Read the article

  • How to print TIFF files using MSFT Office Document imaging?

    - by Think Floyd
    OS: Vista and Windows7 I have Microsoft Office Document Imaging installed. .tif and .tiff files association is set to " Microsoft Office Document Imaging" When I open a TIFF file, it opens in " Microsoft Office Document Imaging". Good so far. However, when I right-click on the TIFF file and invoke print, I see a "Print Pictures" dialog, ("How do you want to print your pictures?") I have some applications installed on my machine that print incoming TIFF files on the printer. They work fine on XP. However, on Vista and Windows7, I get this "Print pictures" prompt requiring an user intervention (i.e, click on Print button). How do I get rid of this "Print Pictures" prompt?

    Read the article

  • CUPS Web Admin Error 500 Unknown

    - by Floyd Resler
    I keep getting a 500 Unknown error whenever I navigate off the home page of my CUPS web admin. I'm sure I have something misconfigured but I'm not sure what. Here's my configuration: # # "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $" # # Sample configuration file for the CUPS scheduler. See "man cupsd.conf" for a # complete description of this file. # # Log general information in error_log - change "warn" to "debug" # for troubleshooting... LogLevel warn # Administrator user group... SystemGroup lpadmin sys root # Only listen for connections from the local machine. Listen 192.168.6.101:631 Listen /var/run/cups/cups.sock ServerName 192.168.6.101 # Show shared printers on the local network. Browsing On BrowseOrder allow,deny BrowseAllow all BrowseLocalProtocols CUPS BrowseAddress 192.168.6.255 # Default authentication type, when authentication is required... DefaultAuthType Basic # Restrict access to the server... Order allow,deny Allow From All Allow From 127.0.0.1 # Restrict access to the admin pages... AuthType Default Require user @SYSTEM Order allow,deny Allow From All Allow From 127.0.0.1 # Restrict access to configuration files... AuthType Default Require user @SYSTEM Order allow,deny Allow From All Allow From 127.0.0.1 # Set the default printer/job policies... # Job-related operations must be done by the owner or an administrator... Require user @OWNER @SYSTEM Order deny,allow # All administration operations require an administrator to authenticate... AuthType Default Require user @SYSTEM Order deny,allow # All printer operations require a printer operator to authenticate... AuthType Default Require user @SYSTEM Order deny,allow # Only the owner or an administrator can cancel or authenticate a job... Require user @OWNER @SYSTEM Order deny,allow Order deny,allow # Set the authenticated printer/job policies... # Job-related operations must be done by the owner or an administrator... AuthType Default Order deny,allow AuthType Default Require user @OWNER @SYSTEM Order deny,allow # All administration operations require an administrator to authenticate... AuthType Default Require user @SYSTEM Order deny,allow # All printer operations require a printer operator to authenticate... AuthType Default Require user @SYSTEM Order deny,allow # Only the owner or an administrator can cancel or authenticate a job... AuthType Default Require user @OWNER @SYSTEM Order deny,allow Order deny,allow # # End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $". #

    Read the article

  • Replicating EFS encrypted files

    - by floyd
    Recently I attempted to configure Microsoft's DFSR on Windows 2008 R2 to replicate a folder which was encrypted with EFS. The setup gave no errors or warnings, but later I read that DFSR does not support EFS in any way. There were also event logs in the DFSR event log indicating an encrypted file was found and wont be replicated. http://technet.microsoft.com/en-us/library/cc773238(v=ws.10).aspx#BKMK_052 My question is, are there any tools that would allow this to occur? Software based preferably.This would be replicating over LAN to destination node for two servers on the same domain.

    Read the article

  • Windows 2003 and 2008 AD integrated DNS zones

    - by floyd
    We have a Windows 2003 server DC1 which is our primary DC holding all FSMO roles. It also is a DNS server for our domain domain.local which is an active directory integrated zone. We also have a Windows 2008 DC name DC2 All servers have the correct DNS entries etc. However on all dns servers there are event id 4515 indicating there are duplicate zones in separate directory partitions and only one will be used until the other is removed. And I see these, there is a zone for domain.local under the default naming partition CN=System, CN=MicrosoftDNS, DC=domain.local. As well as the DomainDNSZones partition DC=DomainDNSZones, DC=DOMAIN, DC=local, CN=MicrosoftDNS It seems that the partition in the Default Naming partition is the one which is being used currently. Which one should be in use? How do I make the EventID 4515's go away? EventID 4515: http://support.microsoft.com/kb/867464 Thanks

    Read the article

  • Scheduled task based on Microsoft patch release cycle

    - by floyd
    I have a simple powershell script which unapproves all patches based on computer group name in WSUS which works great. All of our servers patch on a specific Day/Week/Time starting on Week0-Wednesday which would be the Wednesday after Microsoft Patch Tuesday (2nd Tuesday of every month) all the way to Week3-Sunday. This obviously causes problems as sometimes not all patches get applied in one reboot cycle, and then will install patches the following week during their group policy scheduled patching day/time which is what I'm trying to prevent. My question is I'm trying to schedule my script to run based on this schedule and I am finding it next to impossible using Windows Task Scheduler. For instance if I wanted something to always run on the 4th Monday after Microsoft Patch Tuesday, I cant always use the task scheduler option "4th Monday of the Month" Has anyone run into a similar situation, or know of any task scheduling tools which give you more flexibility than Windows Task Scheduler?

    Read the article

  • How to print TIFF files using MSFT Office Document imaging?

    - by Think Floyd
    OS: Vista and Windows7 I have Microsoft Office Document Imaging installed. .tif and .tiff files association is set to " Microsoft Office Document Imaging" When I open a TIFF file, it opens in " Microsoft Office Document Imaging". Good so far. However, when I right-click on the TIFF file and invoke print, I see a "Print Pictures" dialog, ("How do you want to print your pictures?") I have some applications installed on my machine that print incoming TIFF files on the printer. They work fine on XP. However, on Vista and Windows7, I get this "Print pictures" prompt requiring an user intervention (i.e, click on Print button). How do I get rid of this "Print Pictures" prompt?

    Read the article

  • Today's Links (6/30/2011)

    - by Bob Rhubart
    James Gosling Says He Doesn't Care About Java But here's the rest of the story: "What I really care about is the Java Virtual Machine as a concept," says Gosling, "because that is the thing that ties it all together; it's the thing that makes Java the language possible; it's the thing that makes things work on all kinds of different platforms; and it makes all kinds of languages able to coexist." Virtual Developer Day: SOA Accelerate Your Development with Oracle SOA Suite. Learn how in this FREE on-line workshop with Hands-on labs July 12th 9 am to 1:30 PM PST" July 12th 9 am to 1:30 PM PST Podcast: Toronto Architect Day Panel Discussion Part 3 (of 4) is now available, in which the panel (including Oracle ACE Director Cary Millsap and InfoQ editor and co-founder Floyd Marinescu) discusses public vs private cloud as the best strategy for small businesses and start-ups. WebLogic Weekly for June 27th, 2011 | James Bayer Bayer shares the latest resources for those with WebLogic on the brain. Griffiths Waite at Oracle Open World | Mark Simpson Oracle ACE Director Mark Simpson share information on the presentations he's scheduled to give at Oracle OpenWorld San Francisco 2011. Kscope Solid Service Bus Implementations Peter Paul van de Beek's Kscope11 presentation "is aimed at supporting architects and especially developers to choose the right integration infrastructure for a job." Migration To Java EE 6 With Spring 3 - ...Could Become "Interesting" | Adam Bien "Put simply, big data implies datasets so large they can't normally be processed using a standard transactional database," says David Dorf. "The term 'noSQL' is often used in this context as well." Book Review: "Designing With the Mind In Mind" | Abhinav Agarwal According to Abhinav Agarwal, Jeff Johnson's new book is about "the theory of how the mind perceives information, of how humans understand what they read, and how our eyes are attuned to paying attention to not just what's happening in front of us but also at the periphery of our vision." BPM 11g Advanced Workshop | Martien van den Akker Martien van den Akker shares his thoughts on both the workshop he recently attended and on the Oracle BPM 11g product. Fusion Applications - What You Need To Know: Product Families | Floyd Teter "Fusion Applications are organized into seven groups of related products called Product Families," observes Oracle ACE Director Floyd Teter. "While the product features are organized according to the Business Process Model and can cross the boundaries of product families, the product family groupings are an easy way to wrap your mind around Fusion Apps." Grid Control: Refreshing Weblogic Domains | Dave Best Dave Best shares tips for avoiding problems when using grid control to centrally manage/monitor your environment. Webcast: Oracle to Announce Datanomic Integration Plans The combination of Datanomic technology and the previous acquisition of Silver Creek Systems will deliver a complete, integrated and best-of-breed solution for Data Quality. Learn about Oracle’s strategy and product plans and how the new products acquired from Datanomic will impact your organization. July 19, 2011, 8:00am PT / 11:00am ET. Speakers include Michael Weingartner (Vice President, Product Development, Oracle), Martin Boyd (Senior Director, Product Strategy, Oracle), and Dain Hansen (Director, Product Marketing, Fusion Middleware, Oracle).

    Read the article

  • Integrate Google Maps API into an iPhone app

    - by Corey Floyd
    Update: iPhone SDk 3.0 now addresses the question here, however the NDA prevents any in depth discussion. Log in to the iPhone Dev Center if you need more info. Ok, I have to admit I'm a little lost here. I am fairly comfortable with Cocoa, but am having trouble picking up the bit of javascript needed to solve this problem. I am trying to send a request to Google for a reverse geo code. I have looked over the Google documentation I have viewed here: http://code.google.com/apis/maps/documentation/index.html http://code.google.com/apis/maps/documentation/geocoding/ Even after a rough reading, I am missing a basic concept: How do I talk to google? In some examples, they show a url being sent to google (which seems easy enough), but in others they show javascript. It seems for reverse geocoding, the request might be be harder than sending the url with some parameters (but I hope I am wrong). Can someone point me to the correct way to make a request? (In objective-C, so I can wrap my head around it)

    Read the article

  • iPhone image distortion

    - by Corey Floyd
    Are there any reasons why the simulator will display UIImageViews properly, but incorrectly on the iPhone? My Process: An image in a PNG file Start a UIGraphicsBeginImageContext() Draw the PNG in a CGrect Draw text in the CGRect Create an UIImage from the context Set the image of a UIImaveView to the UIImage Set the frame of the UIImageView to the size of the PNG Add as a subview Outcome: The image does not display correctly. The rightmost 1-3 pixels of the image is just a vertical white line. This occurs only on the device and not on the simulator. I can fix the problem, but only by increasing the size of the UIImageView. If I increase the size.height of the UIImageView by 1 pixel, it displays the UIImage correctly. Of course, these leaves the iPhone to scale my image before drawing it on screen which is not desirable. Any ideas why this occurs or any fixes for it? (I will post my code if needed)

    Read the article

  • UIViewController rotate methods

    - by Corey Floyd
    What object is responsible for dipatching the UIViewController rotation method calls, i.e: – shouldAutorotateToInterfaceOrientation: – willRotateToInterfaceOrientation:duration: – willAnimateFirstHalfOfRotationToInterfaceOrientation:duration: – willAnimateSecondHalfOfRotationFromInterfaceOrientation:duration: – didRotateFromInterfaceOrientation: I imagine it is UIApplication (but maybe the AppDelegate or UIWindow). The next question, is how does the object know which UIViewController to talk to? How does it know which UIViewController has its view as the subview of the window? Is there a message you can send or a property you can set (of some object) that sets the "Active" UIViewController for the app?

    Read the article

  • DOM memory issue with IE8 (inserting lots of JSON data)

    - by okie.floyd
    i am developing a small web-utility that displays some data from some database tables. i have the utility running fine on FF, Safari, Chrome..., but the memory management on IE8 is horrendous. the largest JSON request I do will return information to create around 5,000 or so rows in a table within the browser (3 columns in the table). i'm using jquery to get the data (via getJSON). to remove the old/existing table, i'm just doing a $('#my_table_tbody').empty(). to add the new info to the table, within the getJSON callback, i am just appending each table row that i am creating to a variable, and then once i have them all, i am using $('#my_table_tbody').append(myVar) to add it to the existing tbody. i don't add the table rows as they are created because that seems to be a lot slower than just adding them all at once. does anyone have any recommendation on what someone should do who is trying to add thousands of rows of data to the DOM? i would like to stay away from pagination, but i'm wondering if i don't have a choice. Update 1 So here is the code I was trying after the innerHTML suggestion: /* Assuming a div called 'main_area' holds the table */ document.getElementById('main_area').innerHTML = ''; $.getJSON("my_server", {my: JSON, args: are, in: here}, function(j) { var mylength = j.length; var k =0; var tmpText = ''; tmpText += /* Add the table, thead stuff, and tbody tags here */; for (k = mylength - 1; k = 0; k--) { /* stack overflow wont let me type greater than & less than signs here, so just assume that they are there. */ tmpText += 'tr class="' + j[k].row_class . '" td class="col1_class" ' + j[k].col1 + ' /td td class="col2_class" ' + j[k].col2 + ' /td td class="col3_class" ' + j[k].col3 + ' /td /tr'; } document.getElementById('main_area').innerHTML = tmpText; } That is the gist of it. I've also tried using just a $.get request, and having the server send the formatted HTML, and just setting that in the innerHTML (i.e. document.getElementById('main_area').innerHTML = j;). thanks for all of the replies. i'm floored with the fact that you all are willing to help.

    Read the article

  • MySQL configuration that allows for locking many tables?

    - by Floyd Bonne
    I need to do a MySQLDump on a DB with ~700 tables and when I try with my current configuration, I get an error: mysqldump: Got error: 1016: Can't open file: './my_db/content_node_field_instance.frm' (errno: 24) when using LOCK TABLES Searching around I've found that this happens because it tries to lock all tables and fails because they are "too many". I know I can try lock-tables=no and get a dump, but this way my DB might be in an inconsistent state. So, does anyone know what is the MySQL configuration setting I need to change in order to be able to do the locking I need? I'm running 5.1.37-1ubuntu5.1 with MyISAM. Thanks!

    Read the article

1 2 3 4  | Next Page >