Search Results

Search found 4305 results on 173 pages for 'seth white'.

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

  • Removing white space inside quotes in XSLT

    - by fudgey
    I'm trying to format a table from XML. Lets say I have this line in the XML <country>Dominican Republic</country> I would like to get my table to look like this <td class="country DominicanRepublic">Dominican Republic</td> I've tried this: <td class="country {country}"><xsl:value-of select="country"/></td> then this: <xsl:element name="td"> <xsl:attribute name="class"> <xsl:text>country </xsl:text> <xsl:value-of select="normalize-space(country)"/> </xsl:attribute> <xsl:value-of select="country"/> </xsl:element> The normalize-space() doesn't remove the space between the two parts of the name and I can't use <xsl:strip-space elements="country"/> because I need the space when I display the name inside the table cell. How can I strip the space from the value inside the class, but not the text in the cell?

    Read the article

  • how to escape white space in bash loop list

    - by MCS
    I have a bash shell script that loops through all child directories (but not files) of a certain directory. The problem is that some of the directory names contain spaces. Here are the contents of my test directory: $ls -F test Baltimore/ Cherry Hill/ Edison/ New York City/ Philadelphia/ cities.txt And the code that loops through the directories: for f in `find test/* -type d`; do echo $f done Here's the output: test/Baltimore test/Cherry Hill test/Edison test/New York City test/Philadelphia Cherry Hill and New York City are treated as 2 or 3 separate entries. I tried quoting the filenames, like so: for f in `find test/* -type d | sed -e 's/^/\"/' | sed -e 's/$/\"/'`; do echo $f done but to no avail. There's got to be a simple way to do this. Any ideas? The answers below are great. But to make this more complicated - I don't always want to use the directories listed in my test directory. Sometimes I want to pass in the directory names as command-line parameters instead. I took Charles' suggestion of setting the IFS and came up with the following: dirlist="${@}" ( [[ -z "$dirlist" ]] && dirlist=`find test -mindepth 1 -type d` && IFS=$'\n' for d in $dirlist; do echo $d done ) and this works just fine unless there are spaces in the command line arguments (even if those arguments are quoted). For example, calling the script like this: test.sh "Cherry Hill" "New York City" produces the following output: Cherry Hill New York City Again, I know there must be a way to do this - I just don't know what it is...

    Read the article

  • Regex to Match White Space or End of String

    - by Kirk
    I'm trying to find every instance of @username in comment text and replace it with a link. Here's my PHP so far: $comment = preg_replace('/@(.+?)\s/', '<a href="/users/${1}/">@${1}</a> ', $comment); The only problem is the regex is dependent upon there being whitespace after the @username reference. Can anyone help me tweak this so it will also match if it is at the end of the string?

    Read the article

  • [Architecture] Roles for white-label service access.

    - by saurabhj
    Okay, I know I'm doing something wrong - but can't figure out a better way. I am developing a website which is going to allow users to setup their own mini-websites. Something like Ning. Also, I have only 1 basic login and access to each mini website is provided (right now) via roles. So the way I am doing this right now is: Everytime a new mini website is created - say blah, I create 2 roles in my application. blah_users and blah_admin The user creating the mini website is given the role - blah_admin and every other user wanting to join this mini website (or network) is given the role - blah_user. Anyone can view data from any website. However to add data, one must be a member of that mini site (must have the blah_user role assigned) The problem that I am facing is that by doing a role based system, I'm having to do loads of stuff manually. Asp.Net 2 controls which work on the User.IsAunthenticated property are basically useless to me now because along with the IsAuthenticated property, I must also check if the user has the proper role. I'm guessing there is a better way to architect the system but I am not sure how. Any ideas? This website is being developed in ASP.Net 2 on IIS 6. Thanks a tonne!

    Read the article

  • Splitting an image in GWT results in unwanted white space

    - by rancidfishbreath
    I am using GWT 2.03 and am have an image that I want to place partially in an area with a background and partially above a background. I am using a FlexTable to try to accomplish this and have used GIMP to cut the image into two sections. I am trying to load the top part of the image into row 0 and the bottom part of the image into row 1. I set the alignment of the top image to ALIGN_BOTTOM but there is a bit of space at the bottom of cell and so the two parts of the picture don't touch. Here is an image showing what I am talking about. I set the background of the cell to be yellow show where the cell boundaries are. The bottom image and background are rendering correctly. Here is the relevant code snippet: FlexTable table = new FlexTable(); table.setCellSpacing(0); table.setCellPadding(0); table.setBorderWidth(0); FlexCellFormatter formatter = table.getFlexCellFormatter(); table.setWidget(0, 0, topImage); formatter.setStyleName(0, 0, "topImageStyle"); formatter.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_BOTTOM); table.setWidget(1, 0, bottomImage); formatter.setStyleName(1, 0, "bottomImageStyle"); How can I get rid of that space between my image and the cell boundary?

    Read the article

  • How can I create a transparent tableview with each cells being transparent instead of showing white

    - by wolverine
    I tried all this inside - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 1.tableView.backgroundColor = [UIColor clearColor]; 2.cell.backgroundColor = [UIColor clearColor]; 3.cell.contentView.backgroundColor = [UIColor clearColor]; It only responds to the 1st line and makes the background a translucent kind of black. What should I do to get 100% transparency?

    Read the article

  • java xml pretty printing - preserve empty elements and white pace

    - by javamonkey79
    Basically, I am looking for a java library that will take this: <foo><bar> </bar><baz>yadda</baz></foo> And pretty print it to this: <?xml version="1.0" encoding="UTF-8"?> <foo> <bar> </bar> <baz>yadda</baz> </foo> e.g. preserving whitespace AND blank elements The closest I have got was with dom4j like so: OutputFormat format = OutputFormat.createPrettyPrint(); format.setTrimText( false ); However, this does not honor the whitespace unless the element contains other character data. I'm not opposed to writing something on my own, but I would think this has already been done, why reinvent the wheel?

    Read the article

  • JSF trimming white spaces

    - by msharma
    HI, I have an input field in which I want to trim any leading/trailing whitespaces. We are using JSF and binding the input field to a backing bean in the jsp using: <h:inputText id="inputSN" value="#{regBean.inputSN}" maxlength="10"/> My question is that besides validation can this be done in the jsp? I know we can also do this using the trim() java function in the Handler, but just wondering if there is a more elegant way to achieve this in JSF. Thanks.

    Read the article

  • White space problem while using php proxy

    - by KCC
    Hi, I'm using a php web proxy with my URL already encoded and keep having getting a malformed request error once I have any text after a %20. Any idea why this would be happening? The web proxy code I'm using is just a sample that I took from yahoo services: <?php // PHP Proxy example for Yahoo! Web services. // Responds to both HTTP GET and POST requests // // Author: Jason Levitt // December 7th, 2005 // // Allowed hostname (api.local and api.travel are also possible here) define ('HOSTNAME', 'http://search.yahooapis.com/'); // Get the REST call path from the AJAX application // Is it a POST or a GET? $path = ($_POST['yws_path']) ? $_POST['yws_path'] : $_GET['yws_path']; $url = HOSTNAME.$path; // Open the Curl session $session = curl_init($url); // If it's a POST, put the POST data in the body if ($_POST['yws_path']) { $postvars = ''; while ($element = current($_POST)) { $postvars .= urlencode(key($_POST)).'='.urlencode($element).'&'; next($_POST); } curl_setopt ($session, CURLOPT_POST, true); curl_setopt ($session, CURLOPT_POSTFIELDS, $postvars); } // Don't return HTTP headers. Do return the contents of the call curl_setopt($session, CURLOPT_HEADER, false); curl_setopt($session, CURLOPT_RETURNTRANSFER, true); // Make the call $xml = curl_exec($session); // The web service returns XML. Set the Content-Type appropriately //header("Content-Type: text/xml"); echo $xml; curl_close($session); ?>

    Read the article

  • MPMoviePlayerController switching movies causes white flash

    - by bennythemink
    Hi guys, I have a small UIView that displays a repeated movie. When the user taps a button another movie is loaded and displayed in the same UIView. The problem is that there is a half second "flash" between the removing of the first movie and the displaying of the second. Is there any to remove this? <code> - (void) setUpMovie:(NSString*)title { NSString *url = [[NSBundle mainBundle] pathForResource:title ofType:@"mp4"]; MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:url]]; [[player view] setFrame:self.movieView.bounds]; [self.movieView addSubview:player.view]; if ([title isEqualToString:@"Bo_idle_02"]) { [player setRepeatMode:MPMovieRepeatModeOne]; } else { [player setRepeatMode:MPMovieRepeatModeNone]; } [player setControlStyle:MPMovieControlStyleNone]; [player play]; } - (void) startDanceAnimation { [self setUpMovie:@"Bo_dance_02"]; return; } </code>

    Read the article

  • Writing white space to CSV fields in Python?

    - by matt
    When I try to write a field that includes whitespace in it, it gets split into multiple fields on the space. What's causing this? It's driving me insane. Thanks data = open("file.csv", "wb") w = csv.writer(data) w.writerow(['word1', 'word2']) w.writerow(['word 1', 'word2']) data.close() I'll get 2 fields(word1,word2) for first example and 3(word,1,word2) for the second.

    Read the article

  • Empty white space between the 2 images

    - by Shivanand
    I have placed 2 images side by side in a div besides input box "Search by Contact". In the browser I find there is a gap between the 2nd image(Button T) and the one on its left. I am unable to remove the gap. Any help is highly appreciated. Here is the link to the html page: Space between button T and the one on its left.

    Read the article

  • How can I create an fscanf format string to accept white space and comma (,) tokenization

    - by Jamie
    I've got some analysis code (myprog) that sucks in data using the following: if(5 == fscanf(in, "%s%lf%f%f%f", tag, & sec, & tgt, & s1, & s2)) which works just fine. But in the situation where I've got data files that are separated by commas, I'm currently doing something like: sed 's/,/ /g' data | myprog Can I modify the format string in the fscanf() function to accept both delimitation formats?

    Read the article

  • Split string in C every white space

    - by redsolja
    I want to write a program in C that displays each word of a whole sentence (taken as input) at a seperate line. This is what i have done so far: void manipulate(char *buffer); int get_words(char *buffer); int main(){ char buff[100]; printf("sizeof %d\nstrlen %d\n", sizeof(buff), strlen(buff)); // Debugging reasons bzero(buff, sizeof(buff)); printf("Give me the text:\n"); fgets(buff, sizeof(buff), stdin); manipulate(buff); return 0; } int get_words(char *buffer){ // Function that gets the word count, by counting the spaces. int count; int wordcount = 0; char ch; for (count = 0; count < strlen(buffer); count ++){ ch = buffer[count]; if((isblank(ch)) || (buffer[count] == '\0')){ // if the character is blank, or null byte add 1 to the wordcounter wordcount += 1; } } printf("%d\n\n", wordcount); return wordcount; } void manipulate(char *buffer){ int words = get_words(buffer); char *newbuff[words]; char *ptr; int count = 0; int count2 = 0; char ch = '\n'; ptr = buffer; bzero(newbuff, sizeof(newbuff)); for (count = 0; count < 100; count ++){ ch = buffer[count]; if (isblank(ch) || buffer[count] == '\0'){ buffer[count] = '\0'; if((newbuff[count2] = (char *)malloc(strlen(buffer))) == NULL) { printf("MALLOC ERROR!\n"); exit(-1); } strcpy(newbuff[count2], ptr); printf("\n%s\n",newbuff[count2]); ptr = &buffer[count + 1]; count2 ++; } } } Although the output is what i want, i have really many black spaces after the final word displayed, and the malloc() returns NULL so the MALLOC ERROR! is displayed in the end. I can understand that there is a mistake at my malloc() implementation but i do not know what it is. Is there another more elegant - generally better way to do it? Thanks in advance.

    Read the article

  • You do not need a separate SQL Server license for a Standby or Passive server - this Microsoft White Paper explains all

    - by tonyrogerson
    If you were in any doubt at all that you need to license Standby / Passive Failover servers then the White Paper “Do Not Pay Too Much for Your Database Licensing” will settle those doubts. I’ve had debate before people thinking you can only have a single instance as a standby machine, that’s just wrong; it would mean you could have a scenario where you had a 2 node active/passive cluster with database mirroring and log shipping (a total of 4 SQL Server instances) – in that set up you only need to buy one physical license so long as the standby nodes have the same or less physical processors (cores are irrelevant). So next time your supplier suggests you need a license for your standby box tell them you don’t and educate them by pointing them to the white paper. For clarity I’ve copied the extract below from the White Paper. Extract from “Do Not Pay Too Much for Your Database Licensing” Standby Server Customers often implement standby server to make sure the application continues to function in case primary server fails. Standby server continuously receives updates from the primary server and will take over the role of primary server in case of failure in the primary server. Following are comparisons of how each vendor supports standby server licensing. SQL Server Customers does not need to license standby (or passive) server provided that the number of processors in the standby server is equal or less than those in the active server. Oracle DB Oracle requires customer to fully license both active and standby servers even though the standby server is essentially idle most of the time. IBM DB2 IBM licensing on standby server is quite complicated and is different for every editions of DB2. For Enterprise Edition, a minimum of 100 PVUs or 25 Authorized User is needed to license standby server.   The following graph compares prices based on a database application with two processors (dual-core) and 25 users with one standby server. [chart snipped]  Note   All prices are based on newest Intel Xeon Nehalem processor database pricing for purchases within the United States and are in United States dollars. Pricing is based on information available on vendor Web sites for Enterprise Edition. Microsoft SQL Server Enterprise Edition 25 users (CALs) x $164 / CAL + $8,592 / Server = $12,692 (no need to license standby server) Oracle Enterprise Edition (base license without options) Named User Plus minimum (25 Named Users Plus per Core) = 25 x 2 = 50 Named Users Plus x $950 / Named Users Plus x 2 servers = $95,000 IBM DB2 Enterprise Edition (base license without feature pack) Need to purchase 125 Authorized User (400 PVUs/100 PVUs = 4 X 25 = 100 Authorized User + 25 Authorized Users for standby server) = 125 Authorized Users x $1,040 / Authorized Users = $130,000  

    Read the article

  • How can I fade something to clear instead of white?

    - by Raven Dreamer
    I've got an XNA game which essentially has "floating combat text": short-lived messages that display for a fraction of a second and then disappear. I've recently added a gradual "fade-away" effect, like so: public void Update() { color.A -= 10; position.X += 3; if (color.A <= 10) isDead = true; } Where color is the Color int the message displays as. This works as expected, however, it fades the messages to white, which is very noticeable on my indigo background. Is there some way to fade it to transparent, rather than white? Lerp-ing towards the background color isn't an option, as there's a possibility there will be something between the text and the background, which would simply be the inverse of the current problem.

    Read the article

  • How can I force the Nautilus sidebar text color to stay white in my Ambiance modification?

    - by WarriorIng64
    This is related to How can I change the color of this part of Nautilus for my Ambiance theme modification?, which has just been solved. Now I have a new issue. As shown below, the text color for the sidebar does not want to stay white unless it is selected. It did earlier, but now it's not and I'm not sure why. How can I force that text to stay white in the theme files? (See the linked question above for a reference as to what changes I made; everything else is the same as regular Ambiance.)

    Read the article

  • Errors caught by WBT, but not BBT and vice versa

    - by David Relihan
    Hi Folks, Can you think of one type of error that might be found using White-Box testing, and one type using Black-Box testing. i.e. an error that would be found by one and not the other. For WBT there would null else statements, but what would you catch with BBT and not WBT??? BTW this question is just based on my own personal study - I'm not getting free marks out of this!!!! Thanks,

    Read the article

  • Silverlight tests not working unless RDP connection open

    - by Duncan Bayne
    I have a few Silverlight UI tests that I'm automating with White. These tests are subsequently run by a TFS build agent, which is running interactively so it can access the desktop. The build passes if I have a Remote Desktop connection open to the build agent as the tests are run; I can see the mouse pointer moving around. When the test clicks on a HyperlinkButton navigation takes place, and is subsequently verified by assertions within the test. The build fails if I do not have a Remote Desktop connection open to the build agent as the tests are run. The Internet Explorer window is created and the Silverlight app loads, but no clicks happen; the application remains on the initial page and test assertions subsequently fail. Has anyone out there found a solution to this problem?

    Read the article

  • Multiple Condition Coverage Testing

    - by David Relihan
    Hi Folks, When using the White Box method of testing called Multiple Condition Coverage, do we take all conditional statements or just the ones with multiple conditions? Now maybe the clues in the name but I'm not sure. So if I have the following method void someMethod() { if(a && b && (c || (d && e)) ) //Conditional A { } if(z && q) // Conditional B { } } Do I generate the truth table for just "Conditional A", or do I also do Conditional B? Thanks,

    Read the article

  • Why does my terrain turn white when I get close to it?

    - by Starkers
    When I zoom in on my terrain it goes white: The further in I zoom, the greater the whiteness becomes. Is this normal? Is this to speed up rendering or something? Can I turn it off? I'm also getting these error messages in the console over and over again: rc.right != m_GfxWindow-GetWidth() || rc.bottom != m_GfxWindow-GetHeight() and GUI Window tries to begin rendering while something else has not finished rendering! Either you have a recursive OnGUI rendering, or previous OnGUI did not clean up properly. Does this bear any correlation on the issue? Update I create virtual desktops to flit between using the program Deskpot. Turning this program off and restarting has stopped the above errors appearing in the console. However, I still get white terrain when I zoom in. Not a single error message. I've restarted my computer to no avail. I have an Asus NVidia GeForce GTX 760 2GB DDR5 Direct CU II OC Edition Graphics Card. Any known issues? Update I don't think it's fog...

    Read the article

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