Search Results

Search found 3028 results on 122 pages for 'urls'.

Page 34/122 | < Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >

  • iPhone colorize UILabel substrings

    - by Janosch R
    Hey, I’m parsing a twitter rss feed, and I just need to show tweets, so I don't need MGTwitterEngine. I have already set it up so I can see the complete tweet, the only thing I want it to colorize hashtags and urls. So I would need to slice up the string in different substrings, colorize the hashtags and urls and glue it together in various UILabels Is there an easier way to accomplish this? In short I need some parts of a string colored differently than others.

    Read the article

  • ID + Slug name in URL in Rails (like in StackOverflow)

    - by Vitaly
    Hey, I'm trying to achieve URLs like this in Rails: http://localhost/posts/1234/post-slug-name with both ID and slug name instead of either http://localhost/posts/1234 or http://localhost/posts/post-slug-name (right now I have just slug name in URL, so this part is over). How can I do this? UPD I found an article on this: http://augustl.heroku.com/blog/styling-rails-urls, instead of /id/slug it suggests to use /id-slug which works perfectly for me, so I'll go with this.

    Read the article

  • url rewriting index.php

    - by bean
    i have urls like http://mysite.com/index.php?p=resources http://mysite.com/index.php?p=resources&s=view&id=938 but i want urls like http://mysite.com/resources http://mysite.com/resources/view/938 instead of making hundreds of rewrite rules i wonder if it would be possible to just have one? Ive head this is possible by "getting the uri and splitting it into parts" and then just add a rewrite rule for index.php but how? could someone give an example or link a tutorial

    Read the article

  • ASP.NET MVC Action with ApplicationPath

    - by Leandro
    Hi, i'm creating a mvc application and i'll use under subdomain like _http://myapp.mycompany.com, this subdomain is pointing to app subdirectory, but my actions are generated with applicationPath (subdirectory) always: _http://myapp.mycompany.com/myapp/Home/About. i want _http://myapp.mycompany.com/Home/About only, without applicationPath prefix. Exists any configuration for this?? I'm using the correct methods: <%= Html.ActionLink("About", "About", "Home") % Actions rendered without ApplicationPath prefix, is possible in asp.net routing? * Please, ignore undescore prefix in urls, but i'm novice in stackoverflow and i can't post valid urls =/

    Read the article

  • RegEx for Dynamic URL Goals settings in Google Analytics

    - by gaaustralia
    Hi, I have tried to work this regex to set up a goal in GA for 2 days, but I cannot get my head around it... The url format is like this: /purchase.php?cDd=1&transaction_id=xxxxxxx&verify=xxxxxxxxxxxxxxxx=&method=creditcard&type=purchase transaction_id= is populated with a sept of numbers verify= is populated by a string of numbers, letters in both caps and lower case Basically I would like to only match URLs which finish by "&method=creditcard&type=purchase" I have tried to just put &method=creditcard&type=purchase but it does retrieve other URLs too Would anyone has any ideas

    Read the article

  • What's the regex to solve this problem?

    - by Yeti
    I have an array in PHP with URLs like below: http://example.com/apps/1235554/ http://example.com/apps/apple/ http://example.com/apps/126734 http://example.com/images/a.jpg http://example.com/images/b.jpg http://example.com/apps/2331234/ http://example.com/apps/orange/ How can I separate out these urls and push them to another array using Regex: http://example.com/apps/1235554/ http://example.com/apps/126734 http://example.com/apps/2331234/ Only url with apps/{number}/ and apps/{number} should be selected.

    Read the article

  • Parallel Task Library WaitAny Design

    - by colithium
    I've just begun to explore the PTL and have a design question. My Scenario: I have a list of URLs that each refer to an image. I want each image to be downloaded in parallel. As soon as at least one image is downloaded, I want to execute a method that does something with the downloaded image. That method should NOT be parallelized -- it should be serial. I think the following will work but I'm not sure if this is the right way to do it. Because I have separate classes for collecting the images and for doing "something" with the collected images, I end up passing around an array of Tasks which seems wrong since it exposes the inner workings of how images are retrieved. But I don't know a way around it. In reality there is more to both of these methods but that's not important for this. Just know that they really shouldn't be lumped into one large method that both retrieves and does something with the image. Task<Image>[] downloadTasks = collector.RetrieveImages(listOfURLs); for (int i = 0; i < listOfURLs.Count; i++) { //Wait for any of the remaining downloads to complete int completedIndex = Task<Image>.WaitAny(downloadTasks); Image completedImage = downloadTasks[completedIndex].Result; //Now do something with the image (this "something" must happen serially) } /////////////////////////////////////////////////// public Task<Image>[] RetrieveImages(List<string> urls) { Task<Image>[] tasks = new Task<Image>[urls.Count]; int index = 0; foreach (string url in urls) { string lambdaVar = url; //Required... Bleh tasks[index] = Task<Image>.Factory.StartNew(() => { using (WebClient client = new WebClient()) { //TODO: Replace with live image locations string fileName = String.Format("{0}.png", i); client.DownloadFile(lambdaVar, Path.Combine(Application.StartupPath, fileName)); } return Image.FromFile(Path.Combine(Application.StartupPath, fileName)); }, TaskCreationOptions.LongRunning | TaskCreationOptions.AttachedToParent); index++; } return tasks; }

    Read the article

  • Show context menu when link is long pressed in TextView

    - by Al
    I have a TextView with its MovementMethod set to LinkMovementMethod. Text added to the TextView is a combination of normal text and URLs. For URLs, I would like to offer a context menu when the URL is long pressed for doing things such as copying the address. I've had a look at the source for LinkMovementMethod but it doesn't seem to have any long pressed related code I could override. Any ideas on how to go around achieving this?

    Read the article

  • htaccess: Redirect a Dynamic URL - Show only Static URL - Double Content

    - by elmaso
    Hi, I have a rewrite rule to get clean urls.. the only problem is, google shows some dynamic url and i dont want to serve dynamic urls. What I want: if a user types in the dynamic url, he gets redirected to the clean url.. example: http://www.example.com/?index=bananas (if someone types that in, he gets redirect to the url above) http://www.examplcom/bananas/ this is my htacces: Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond $1 !apple\+banana RewriteRule ^(.*)\+apple\+banana/$ ?q=$1 [L] thank you!!

    Read the article

  • Question regarding php Regular expression filenames

    - by jason
    I am very bad at regular expressions, but I have a regular expression that is working okay, except for one issue: /\/(.*?).php/ I only need this regular expression to find things like: /this-a-valid-page.php {some words here} /anotherpage.php { some words here} http://www.google.com but do not find URLs the problem i am having is that it find this parts of full URLS i want it to avoid these all together. http://www.google.com/page.php because i have another function that does something different than the filename reg exp.

    Read the article

  • java web application best practices

    - by Bruce
    Hi all I'm trying to figure out the optimum way to develop and release a fairly simple web application, and I'm running into several problems. I'll outline the decisions I've made, because somewhere I've clearly gone off the rails.. Hugely grateful for any help! I have what I think is a fairly simple web application. It contains a couple of jsps that reference a couple of java beans, and the usual static html, js, css and images. Decision 1) I wanted to have a clear and clean release procedure, such that I could develop on my local machine and then release reliably to a production machine. I therefore made the decision to package the application into a war file (including all the static resources), to minimize the separate bits and pieces I would need to release. So far so good? Decision 2) I wanted things on my local machine to be as similar as possible to the production environment. So in my html, for example, I may have a reference to a static file such as http://static.foo.com/file . To keep this code working seamlessly on dev and prod, I decided to put static.foo.com in my /etc/hosts when developing locally, so that all the urls work correctly without changing anything. Decision 3) I decided to use eclipse and maven to give me a best practice environment for administering and building my project. So I have a nice tight set up now, except that: Every time I want to change anything in development, like one line in an html file, I have to rebuild the entire project and then wait for tomcat to load the war before I can see if it's what I wanted. So my questions are: 1) Is there a way to connect up eclipse and tomcat so that I don't have to rebuild the war each time? ie tomcat is looking straight at my actual workspace to serve up the static files? 2)I think I'm maybe making things harder by using /etc/hosts to reflect production urls - is there a better way that doesn't involve manually changing over urls (relative urls are fine of course, but where you have many subdomains, say one for static files and one for dynamic, you have to write out the full path, surely?) 3) Is this really best practice?? How do people set things up so that they balance the requirement for an automated, all-encompassing build process on the one hand, and the speed and flexibility to be able to develop javascript and html and css quickly, as quickly as if one just pointed apache at the directory and developed live? What do people find works? Many thanks!

    Read the article

  • WordPress - moving from one host to another

    - by Maor
    I am trying to move a WordPress installation from one server to another one, including all of the SQL data, and the file-system data (photos,template files). I just have a problem changing the URLs in the database, since I need to replace the new URL with the old one. I would love to have some suggestions about how can I replace the URLs (maybe there's a rplace statement in SQL?) Thanks in advance.

    Read the article

  • Could someone explain hash tag usage for deeplinking ajax applications?

    - by Sergio
    Hi There, I am currently trying to full appreciate how and when to use hash tags in urls when building an ajax powered website. There seems to be a distinct lack of reading material on the web regarding this technique and as such I don't feel like I've got a good handle on it. Could someone explain in the simplest terms how the hash tag can be used in urls to enable things like loading pages via ajax. Thanks

    Read the article

  • Old query String hard coded 301 url redirection using htaccess

    - by Nilesh Toshniwal
    I have recently changed CMS of my website and now looking to redirect old urls like: oldpage.php?key=7cdb93c26 to some new urls but I want all of them in hard coded way and it should be a 301 redirect I tried the following rules but none of them work for me redirect 301 /oldpage.php?key=7cdb93c26 http://www.mynewsite.com/my-new-page.html redirect 301 "/oldpage.php?key=7cdb93c26" http://www.mynewsite.com/my-new-page.html RewriteRule ^oldpage.php?key=7cdb93c26$ http://www.mynewsite.com/my-new-page.html [L,R=301] RewriteRule ^oldpage.php?key=7cdb93c26$ /my-new-page.html [L,R=301]

    Read the article

  • Rewrite URL to index.php but avoid index.php in the URL

    - by Tom
    I'm trying to internally redirect all requests to index.php and externally redirect all requests that contain index.php using a .htaccess file. So URLs like http://host/test should be processed by index.php and URLs like http://host/index.php/test should be redirected to http://host/test and then processed by index.php (without redirecting the browser to index.php) I tried the following but always get a message "Too many redirects...": RewriteRule ^index\.php/?(.*)$ /$1 [R,L] RewriteRule .* index.php/$0 [L]

    Read the article

  • htaccess redirect to subfolder with same path attached?

    - by Josh
    How can I go about redirecting my old URLs which would have been: http:// blah.com/some/post/name to the new URLs which would be: http:// blah.com/new/some/post/name Is this even possible? I don't want to simply redirect any requests for the blah.com domain to blah.com/new I want to make sure the subpath is still attached to the redirect

    Read the article

  • How to test custom handler500?

    - by Gr1N
    I write my handler for server errors and define it at root urls.py: handler500 = 'myhandler' And I want to write unittest for testing how it works. For testing I write view with error and define it in test URLs configuration, when I make request to this view in browser I see my handler and receive status code 500, but when I launch test that make request to this view I see stack trace and my test failed. Have you some ideas for testing handler500 by unittests?

    Read the article

  • Java - Regex problem

    - by Yatendra Goel
    I have list of urls of types: http://www.abc.com/pk/etc http://www.abc.com/pk/etc/ http://www.abc.com/pk/etc/etc where etc can be anything. So I want to search only those urls that contains www.abc.com/pk/etc or www.abc.com/pk/etc/

    Read the article

  • Java - Regex problem

    - by Yatendra Goel
    I have a list of urls of type http://www.abc.com/pk/ca and http://www.abc.com/pk Now, I want to find out only those urls that ends with /pk or /pk/ and don't have anything in between .com and /pk

    Read the article

< Previous Page | 30 31 32 33 34 35 36 37 38 39 40 41  | Next Page >