Search Results

Search found 464 results on 19 pages for 'segments'.

Page 12/19 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • 301 htaccess redirect: add segment to old URL's

    - by Rick
    I'm trying to make sure old url's aren't broken after the site's URL structure has changed from this: http://www.domain.com/section/entry_name to this: http://www.domain.com/section/event_name/entry_name But to make it a bit more complex, I'm using the segments to sort entries, for example: http://www.domain.com/news/amazing_event/date/asc http://www.domain.com/videos/my_event/title/desc The new structure only effects one particular event (amazing_event) and should leave the other URL's alone. Where do I even begin to tackle this? My current .htaccess looks like: RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php/$1 [L] Thanks - appreciate any tips.

    Read the article

  • How to set image to the UISegmentedControl in iphone?

    - by Warrior
    I am new to iphone development.I have created UISegmentedControl having 2 segments. I want to to display images for each segment instead of title.Here is my code NSArray *itemArray = [NSArray arrayWithObjects: @"segment1", @"segment2", nil]; UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:itemArray]; segmentedControl.frame = CGRectMake(5,100,300,40); segmentedControl.segmentedControlStyle = UISegmentedControlStyleBar; segmentedControl.selectedSegmentIndex = 1; [self.view addSubview:segmentedControl]; [segmentedControl release]; But instead of displaying the title ,segment1 and segment2 it should be replaced with the images i have.Please help me out.Thanks.

    Read the article

  • Selecting Users For A/B (Champion/Challenger) Testing

    - by Gordon Guthrie
    We have a framework that offers A/B split testing. You have a 'champion' version of a page and you develop a 'challenger' version of it. Then you run the website and allocate some of your users the champion and some the challenger and measure their different responses. If the challenger is better than the champion at achieving your metrics then you dethrone the champion and develop a new challenger... My question is what mechanisms should I consider to allocate the versions? A number of options spring to mind: odd or even IP address (or sub-segments) ****.****.****.123 gets champion but .124 gets challenger cookie push - check for a champion/challenger cookie, if it doesn't exist randomly allocate the user to one and push the cookie Best practice? suggestions? comments? experience?

    Read the article

  • Using Solr and Zends Lucene port together...

    - by thebluefox
    Afternoon chaps, After my adventures with Zend-Lucene-Search, and discovering it isn't all its cracked up to be when indexing large datasets, I've turned to Solr (thanks to Bill Karwin for that :) ) I've got Solr indexing the db far far quicker now, taking just over 8 minutes to index a table of just over 1.7million rows - which I'm very pleased with. However, when I come to try and search the index with the Zend port, I run into the following error; Fatal error: Uncaught exception 'Zend_Search_Lucene_Exception' with message 'Unsupported segments file format' in /var/www/Zend/Search/Lucene.php:407 Stack trace: #0 /var/www/Zend/Search/Lucene.php(555): Zend_Search_Lucene-_readSegmentsFile() #1 /var/www/z_search.php(12): Zend_Search_Lucene-__construct('tmp/feeds_index') #2 {main} thrown in /var/www/Zend/Search/Lucene.php on line 407 I've tried to have a search around but can't seem to find anything about this problem, everyone just seems to be able to get them to work? Any help as always much appreciated :) Thanks, Tom

    Read the article

  • Compute average distance from point to line segment and line segment to line segment

    - by Fred
    Hi everyone, I'm searching for an algorithm to calculate the average distance between a point and a line segment in 3D. So given two points A(x1, y1, z1) and B(x2, y2, z2) that represent line segment AB, and a third point C(x3, y3, z3), what is the average distance between each point on AB to point C? I'm also interested in the average distance between two line segments. So given segment AB and CD, what is the average distance from each point on AB to the closest point on CD? I haven't had any luck with the web searches I've tried, so any suggestions would be appreciated. Thanks.

    Read the article

  • Intersections of 3D polygons in python

    - by Andrew Walker
    Are there any open source tools or libraries (ideally in python) that are available for performing lots of intersections with 3D geometry read from an ESRI shapefile? Most of the tests will be simple line segments vs polygons. I've looked into OGR 1.7.1 / GEOS 3.2.0, and whilst it loads the data correctly, the resulting intersections aren't correct, and most of the other tools available seem to build on this work. Whilst CGAL would have been an alternative, it's license isn't suitable. The Boost generic geometry library looks fantastic, but the api is huge, and doesn't seem to support wkt or wkb readers out of the box.

    Read the article

  • UISegmentedControl register taps on selected segment

    - by Jongsma
    Hi, I have a segmented control where the user can select how to order a list. Works fine. However, I would like that when an already selected segment is tapped, the order gets inverted. I have all the code in place, but I don't know how to register the taps on those segments. It seems the only control event you can use is UIControlEventValueChanged, but that isn't working (since the selected segment isn't actually changing). Is there a solution for this? And if so, what is it? Thanks in advance!

    Read the article

  • Is release without prior retain dangerous?

    - by BankStrong
    I have some code which I think has extra release statements. Is the code incorrect? What is the end result? I don't understand memory management well yet - even after reading lots of articles and stackoverflow answers. Thanks for straightening me out. NSMutableArray *points = [NSMutableArray new]; for (Segment *s in currentWorkout.segments) { [points addObjectsFromArray:[s.track locationPoints]]; } [routeMap update:points]; [points release];

    Read the article

  • GEdit/Python execution plugin?

    - by Simon Woods
    Hi I'm just starting out learning python with GEdit plus various plugins as my IDE. Visual Studio/F# has a feature which permits the highlighting on a piece of text in the code window which then, on a keypress, gets executed in the F# console. Is there a similar facility/plugin which would enable this sort of behaviour for GEdit/Python? I do have various execution type plugins (Run In Python,Better Python Console) but they don't give me this particular behaviour - or at least I'm not sure how to configure them to give me this. I find it useful because in learning python, I have some test code I want to execute particular individual lines or small segments of code (rather then a complete file) to try and understand what they are doing (and the copy/paste can get a bit tiresome) ... or perhaps there is a better way to do code exploration? Many thx Simon

    Read the article

  • Windows disassembler: looking for a tool...

    - by SigTerm
    Hello. I'm looking for a (preferably free) tool that can produce "proper" disassembly listing from a (non-.NET) windows PE file (*.exe or *.dll). Important requirement: it should be possible to run the listing through a windows assembler (nasm, masm or whatever) and get working exe again (not necessarily identical to original one, but it should behave in the same way). Intended usage is adding new subroutines into existing code, when source is not available. Ideally, tool should be able to detect function/segment boundaries, API calls, and generate proper labels for jumps (I can live without labels for loops/jumps, though, but function boundary detection would be nice), and keep program resources/segments in place. I'm already aware of IdaPRO(not free), OllyDBG (useful for in-place hacking, doesn't generate disassembly listing, AFAIK), ndisasm (output isn't suitable for assembler), dumpbin (useful, but AFAIK, output isn't suitable for assembler) and "proxy dll" technique. Ideas? Or maybe there is a book/tutorial that explains some kind of alternative approach?

    Read the article

  • Cure for puzzle piece programming habits?

    - by Recursion
    Even though I went to a decent CS school, I was still taught with the mentality of programming with puzzle pieces. By puzzle pieces I mean, looking up code segments at each step of the development process and adding them together as needed. Eventually gathering all of the pieces and having a properly working program. So as an example, if in my program the next step is to tokenize a string, I go to google and search "how do I tokenize a string in language". All instead of critically thinking about its implementation. I personally don't think its a very good way to program and I always seem to forget everything that I have searched for. So how can I get out of this puzzle piece mode of programmer that I was taught.

    Read the article

  • How to determine the pat of the current web site

    - by Velika2
    I wanted to create a function which would return the path of the current web site. This is what I thought was working while running in the IDE: Public Shared Function WebsiteAbsoluteBaseUrl() As String Dim RequestObject As System.Web.HttpRequest = HttpContext.Current.Request Return "http://" & RequestObject.Url.Host & ":" & _ RequestObject.Url.Port & "/" & _ RequestObject.Url.Segments(1) End Function Does this seem like it should work? Is there a more straight forward way?

    Read the article

  • PHP - preg_match_all - iCalendar - REGEX

    - by aSeptik
    Hi All guys! ;-) i need help with creating a regex for putting all values into an array! assuming we have a huge file full of theese: Classic iCalendar style: so we know that each segment start with BEGIN:VEVENT and end with END:VEVENT ... END:VEVENT BEGIN:VEVENT UID:e3cafdf3-c5c7-427e-b8c3-653015e9321a SUMMARY:Some Text Here DESCRIPTION:Some Text Here\n555-555-555 ORGANIZER;CN=Some/Text/Here DTSTART;TZID="Some/Text/Here":20100802T190000 DTEND;TZID="Some/Text/Here":20100802T193000 STATUS:CONFIRMED CLASS:PUBLIC X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY TRANSP:OPAQUE X-MICROSOFT-DISALLOW-COUNTER:TRUE DTSTAMP:20100423T021222Z SEQUENCE:1 END:VEVENT BEGIN:VEVENT ... by using preg_match_all that i think is the best choice for doing this, what's the regex that can hold all theese values into array!? PS: between segments there are no line break this is just for example! thank's to All for the time! Regards Luca Filosfi

    Read the article

  • Adding subview, gets delayed?

    - by user289510
    Hi, i didn't really know how to title this question, but here's a thing that really kills me: In my app i have a UITableView, UISegmentedControl and UINavigationBar. Once UISegmentedControl gets one of its segments selected i want to show a UIActivityIndicatorView on the UINavigationBar and then parse an xml file and present the results in a table. Everything works almost as i want it to, except one thing, the activity indicator view gets added to the uinavigationbar after the parser finishes, even though the method showLoading that adds UIIndicatorView to UINavigationBar gets before parser is initialised. Can anyone explain it? is there something i might be missing? maybe the ui needs to get redrawn? thanks peter

    Read the article

  • PHP Thumbnail image generator works, but consistently awaits 90% of its loadtime! Why?

    - by Sam
    Hi folks, This is the follow-up question from this general page load speed question. This question which will focus only, entirely and specifically on the thumbnail generator PHP code with the question: What's causing the 97% delays on these tiny thumbnails? Measuring only 3 ~ 5 kb each, this is strange indeed! Even after 7 orso bounty-rounds and 100 upvotes, the images are still doing nothing for over 97% of the time. It works allright, but it could be so much faster! ZAM, my pet robot, was so annoyed by not knowing why, he just pulled out some cords! Silly metal box... (I have asked permission from the original author, to put temporarily segments of the code online that I think could be the problem, after which I will remove all code, except the several lines that were the direct cause of this issue here to match the answer. This will be the free opportunity to perfect/speedup his otherwise already to my opinion vert versatile and userfriendly thumbnail generator.)

    Read the article

  • C++ defines for a 'better' Release mode build in VS

    - by darid
    I currently use the following preprocessor defines, and various optimization settings: WIN32_LEAN_AND_MEAN VC_EXTRALEAN NOMINMAX _CRT_SECURE_NO_WARNINGS _SCL_SECURE_NO_WARNINGS _SECURE_SCL=0 _HAS_ITERATOR_DEBUGGING=0 My question is what other things do fellow SOers use, add, define, in order to get a Release Mode build from VS C++ (2008,2010) to be as performant as possible? btw, I've tried PGO etc, it does help a bit but nothing that comes to parity, also I'm not using streams, the C++ i'm talking about its more like C but making use of templates and STL algorithms. As it stands now very simple code segments flop when compared to what GCC produces on say an equivalent x86 machine running linux (2.6+ kernel) using 02. Side-Note: I believe a lot of the issues relate directly to the STL version (Dinkum) provided by MS. Could people please elaborate on experiences using STLPort etc with VS C++.

    Read the article

  • I'm implement http live streaming video from my webserver to iPhone. Will I get rejected for bandwi

    - by yujean
    Apache webserver setup added: AddType application/x-mpegURL .m3u8 AddType video/MP2T .ts to "httpd.conf" file. Movie file preparation I have 3 movie files (9mb - 25mb each). Used QuickTime to convert movies into iPhone format. Used mediafilesegmenter to convert .m4v into 10-second segments of .ts files, with an accompanying .m3u8 file. Placed these in a folder on webserver. iPhone App implementation Created UIWebView whose URL points to http://71.191.59.68/~yujean/stream.html Simulator accesses the site and streams the movie-files just fine. Question Will I still get rejected by apple for bandwidth issues over the 3G and/or Edge network? Do I need to somehow check which network the end-user is on first? And then provide a different movie accordingly? If so, how do I do that ...? Thank you in advance, Eugene

    Read the article

  • Code Review "ToDo" Follow Up Items

    - by Blake Blackwell
    I am trying to institute code reviews at my company, and recently we had our first code review meeting. During the meeting, several positive suggestions were made and I added TODO comments in my code for following up. After reading suggestions on here on best practices for code reviews, I would like to follow up on all the items I corrected at the start of the next meeting. Is there a way to add a similar type of comment to the code such as FOLLOWUP so that I can quickly highlight through those code segments in the next meeting?

    Read the article

  • How to determine the path of the current web site

    - by Velika2
    I wanted to create a function which would return the path of the current web site. This is what I thought was working while running in the IDE: Public Shared Function WebsiteAbsoluteBaseUrl() As String Dim RequestObject As System.Web.HttpRequest = HttpContext.Current.Request Return "http://" & RequestObject.Url.Host & ":" & _ RequestObject.Url.Port & "/" & _ RequestObject.Url.Segments(1) End Function Does this seem like it should work? Is there a more straight forward way?

    Read the article

  • url encoded forward slashes breaking my codeigniter app

    - by Ian Cook
    i’m trying to create a url string that works like this: /app/process/example.com/index.html so in other words, /app/process/$URL i then retrieve the url with $this->uri->segment(3); the forward slashes in the URL will of course be a problem accessing uri segments, so i’ll go ahead and url encode the URL portion: /app/process/example.com%2Findex.html .. but now I just get a 404 saying ... Not Found The requested URL /app/process/example.com/index.html was not found on this server. it appears that my url encoding of forward slashes breaks CI’s URI parser. what can i do to get around this problem?

    Read the article

  • preg_match Vs preg_match_all browser error not php?

    - by Phil Jackson
    Hi all i have the following: $str = base64_encode(preg_replace("#\s|\r|\t|\n#", " ", file_get_contents("../www.cms.actwebdesigns.co.uk2/logged.php"))); if(preg_replace("#(PD9waHAg)((?!(Pz4g)).)*#is", $str, )) { #print_r($matches); echo "<xmp>".base64_decode($matches[0]."Pz4g")."</xmp>"; } now this works but i want to be able to use it for all occurrences on page. (finds php segments in page) So i used preg_match_all but returns a browser error (page has been moved or no longer exists) Anyone know why?

    Read the article

  • CGAL replacement for iOS

    - by Aleks N.
    I have a set of nodes that define streets. Each node has latitude and longitude. Also I have user location with latitude and longitude. My intention is to build Voronoi diagram for segments defined by each pair of nodes, and then find which node user location is closest to. Looks like this task can be accomplished with CGAL library. While I'm in the process of compiling it for iOS environment, probably you guys will be able to give links to libs that are already compiled against iOS, or were intended to be used in Objective C environment from the very beginning... Because I'm afraid that even if CGAL compiles for me, I might get into trouble when using it. Thanks!

    Read the article

  • Is the method addSubview of NSView inherently slow? (Cocoa OSX)

    - by Michael Minerva
    I am trying to speed my gui that loads very slow slow when I am loading a large project (the gui is a representation of groups and sub groups and is made up of many views). During this process I was looking at how long certain code segments take to execute and I have found that a call to addsubview is taking between 10 and 20 milliseconds most of the time. The subview I was looking at is a disclosure button. I am wondering if this method is just inherently slow or is their some other factor at work here? Is the time it takes to add the subview dependent on the complexity of the subview or is that not a factor? Also, is there some other method that can be used to add a subview that might be faster?

    Read the article

  • UISegemnted COntrol - selecting 3rd segment activates second segment

    - by diggers25
    I have a segmented control with 3 defined segments. i am looking to capture the segment index so I can use it in an if statement to update variables accordingly as such: -(IBAction)numPlayers:(id)sender; { numPlayersSegment = [(UISegmentedControl *)sender retain]; if (numPlayersSegment.selectedSegmentIndex == 0) { numOfPlayers = 2; } else if (numPlayersSegment.selectedSegmentIndex = 1) { numOfPlayers = 3; } else if (numPlayersSegment.selectedSegmentIndex = 2) { numOfPlayers = 4; } else if (numPlayersSegment.selectedSegmentIndex = -1) { numOfPlayers = 0; } NSLog(@"Players selected = %d", numPlayersSegment.selectedSegmentIndex); However whenever I press the third segment (index 2) it returns the value of the second segment (index 1) and also highlights the 2nd segment. I can see nothing untoward in IB. Has anybody seen this and have any suggestions. I am using xcode 3.2.1 on snow leopard thanks

    Read the article

  • I'm mplement http live streaming video from my webserver to iPhone. Will I get rejected for bandwid

    - by yujean
    Apache webserver setup added: AddType application/x-mpegURL .m3u8 AddType video/MP2T .ts to "httpd.conf" file. Movie file preparation I have 3 movie files (9mb - 25mb each). Used QuickTime to convert movies into iPhone format. Used mediafilesegmenter to convert .m4v into 10-second segments of .ts files, with an accompanying .m3u8 file. Placed these in a folder on webserver. iPhone App implementation Created UIWebView whose URL points to http://71.191.59.68/~yujean/stream.html Simulator accesses the site and streams the movie-files just fine. Question Will I still get rejected by apple for bandwidth issues over the 3G and/or Edge network? Do I need to somehow check which network the end-user is on first? And then provide a different movie accordingly? If so, how do I do that ...? Thank you in advance, Eugene

    Read the article

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