Search Results

Search found 2372 results on 95 pages for 'significant whitespace'.

Page 8/95 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • White bar at the bottom of root view!

    - by Sam
    Hi, I have two view controllers in the app. When the app starts, the layout of the root view controller's view is just fine. When a button is clicked, the view controller switches to the other one - which shows fine too. However, when the view is switched back to the root view, the contents are shifted UP by about 20 pixels, leaving a white bar at the bottom! - and it was not there when the app had started. Has anyone seen this? Any idea what's going on there? Thanks, Sam.

    Read the article

  • Bash script to replace spaces in file names

    - by armandino
    Can anyone recommend a safe solution to recursively replace spaces with underscores in file and directory names starting from a given root directory? For example, $ tree . |-- a dir | `-- file with spaces.txt `-- b dir |-- another file with spaces.txt `-- yet another file with spaces.pdf becomes $ tree . |-- a_dir | `-- file_with_spaces.txt `-- b_dir |-- another_file_with_spaces.txt `-- yet_another_file_with_spaces.pdf

    Read the article

  • Count white spaces to the left of a line in a text file using C++

    - by insertable
    Hi all, I am just trying to count the number of white spaces to the LEFT of a line from a text file. I have been using count( line.begin(), line.end(), ' ' ); but obviously that includes ALL white spaces to the left, in between words and to the right. So basically what I'm wanting it to do is once it hits a non-space character stop it from counting the white spaces. Thanks everyone.

    Read the article

  • How do I seperate Punctuations in a sentence with a space between each phrase and punctuation in C++

    - by Yadollah
    I want to write a program in c++ that get a sentence and insert a space between each word and punctuation in it! in perl this is done with this expression: sed -e "s/,\([^0-9]\)/ , \1/g" -e "s/\.\([^0-9]\)/ . \1/g" -e 's/\.[ ]*$/ ./g' -e "s/\'/ \' /g" -e 's/?/ ?/g' -e 's/\`\`/ `` /g' -e "s/\' \'/''/g" -e 's/(/ ( /g' -e 's/)/ ) /g' -e 's/ \. \([^$]\)/. \1/g' -e "s/\' s/\'s/g" -e "s/\"\([^\"]*\)\"/\" \1 \"/g" $1 | sed -e "s/\"\([^\"]*\)\"/\`\`\1''/g" But I don't khow how i should do this in c++! for example: should convert a "The question now: Can he act more like hard-charging Teddy Roosevelt." must be converted to "The question now : Can he act more like hard-charging Teddy Roosevelt ." So a punctuation such as '-' or for example a '.' in "No." should not spacing in a sentence, but other punctuation that don't rely on a word or a phrase should be spaced.

    Read the article

  • Replace whitespaces using PHP preg_replace function ignoring quoted strings

    - by Saiful
    Look at the following string: SELECT column1 , column2, column3 FROM table1 WHERE column1 = 'text, "FROM" \'from\\\' x' AND column2 = "sample text 'where' \"where\\\" " AND ( column3 = 5 ) I need to escape unnecessary white space characters from the string like: removing white space from beginning and ending position of , ( ) etc removing newline (\r\n) and tabs (\t) But one thing. The remove process could not remove white spaces from the quoted string like: 'text, "FROM" \'from\\' x' "sample text 'where' \"where\\" " etc. i need to use the PHP function: preg_replace($pattern, $replacement, $string); So what will be the value of $pattern and $replacement where the value of $string is the given SQL.

    Read the article

  • Code indentation helper for gedit (python).

    - by aviraldg
    See the little vertical lines? They're damn helpful when writing Python code. Any chance I could get something similar for gedit? I wouldn't mind having to write my own plugin, as long as it's in Python... So: Is there a plugin for this in gedit? If not, would it be possible to write one in Python.

    Read the article

  • IE 8 remove line break between nodes with JavaScript

    - by Tokimon
    Ok i have a list of HTML nodes which should be inline with no spacing between them. The problem is, that the nodes are written from a CMS and therefore will come with all sorts of linebreaks and spaces. Therefore I'm removing the spaces with JS using the method descibed in this question. The problem is, however, that in IE (not 9) the white spaces isn't part of the childrens list of the parent node, rendering the method useless in IE. However IE 7 (or at least IE 9 emulating IE 7) ignores the linebreaks, so that one is in the clear. That leaves IE 8 as the troublemaker. I discovered that the line break is actually a part of the outerHTML and that a simple reset of the outerHTML did the trick - like so: node.outerHTML = node.outerHTML However this will reset the node intirely and therefore removing all events and other settings on the node, which isn't really any good. So my question is now: Is there a way to remove that linebreak from the nodes outerHTML whitout resetting the node? I've tried with zoom: 1, but to no avail. Hope anyone has any experience with this.

    Read the article

  • include a .tex file with spaces in the filename

    - by NomeN
    I am including chapters in my latex file one by one by using the \include{} statement, up till now I've had no problem with that. But I've recently written a chapter which I've saved under a name including spaces...because you can. Now the include{} statement apparently doesn't like spaces, and prints just the filename in my document in stead of the chapter. It is probably a pretty easy fix (apart from removing the spaces in the filename, ;-) ), but I can't find it.

    Read the article

  • (Django) Trim whitespaces from charField

    - by zardon
    How do I strip whitespaces (trim) from the end of a charField in Django? Here is my Model, as you can see I've tried putting in clean methods but these never get run. I've also tried doing name.strip(), models.charField().strip() but these do not work either. Is there a way to force the charField to trim automatically for me? Thanks. class Employee(models.Model): """(Workers, Staff, etc)""" name = models.CharField(blank=True, null=True, max_length=100) # This never gets run def clean_variable(self): data = self.cleaned_data['variable'].strip() return data def __unicode__(self): return self.name class Meta: verbose_name_plural = 'Employees' # This never gets run either class EmployeesForm(forms.ModelForm): class Meta: model = Employee def clean_description(self): #if not self.cleaned_data['description'].strip(): # raise forms.ValidationError('Your error message here') self.cleaned_data['name'].strip()

    Read the article

  • Span with white-space style in IE (7) applied _past_ end of span

    - by WaldenL
    We've got an application where users can enter "notes" into a rich edit control (Telerik's RedEditor, but that doesn't matter here). We had a user enter notes from w/in Safari that had a <span></span> in the middle of the note, and that span had a style on it specifying white-space:pre The HTML of the note was in the form of: <div> This is a note <span class="Apple-tab-span" style="white-space: pre; "> </span> and here's more of the note. </div> Simple enough, the style should apply to the span, and the span had 4 spaces in it. There should have been 4 spaces in the resulting output. Here's the problem. IE seems to apply that white-space: pre; style not only to the span, but to the enclosing div! Therefore, this long line that should have wrapped since it's not in the span, now pushed the document out until the line fits on the page. What am I missing. I know IE has problems, but this doesn't seem right, even for IE. So, the question(s): 1) Am I correct that the white-space attribute should only have applied to the span? 2) Can this be resolved somehow? Remember, I'm not in control of the content being entered. And it's entered from a mac w/Safari and being viewed in IE. Edit: The doctype on the page in question is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Read the article

  • How to get rid of bogus changes in git?

    - by zaza
    I'm a happy user of PortableGit 1.7.0.2. Today I wanted to pull a project changes from GitHub.com repository, so I did git pull. It failed with the following message: error: Your local changes to 'main.rb' would be overwritten by merge. Aborting.. I didn't care about the local changes so I typed git reset --hard HEAD (git clean from here didn't help neither), but it didn't work. When asked for git status I was still able to see the file as modified. git diff showed me that each line of the file has been modified, while git diff -b showed no differences at all, so I guess this is a line ending issue. Which is strange because the code is only pushed from Windows machines. Anyway, the question is: how can I ignore the local, bogus changes and merge with the latest changes from the remote repository?

    Read the article

  • Gedit adds line at end of page

    - by Sam
    The answer to this must be somewhere but I'm not finding it -- can anyone help me understand why in Gedit, if I have a page of code there is no extra trailing blank line, but then when I do a file comparison for my svn commit it shows an extra line being added at the end of the file? I have a feeling that Gedit is automatically adding an ending line break. But why, I have no idea...

    Read the article

  • Rails: find_by, conserving leading whitespaces

    - by peppermonkey
    Hi, when I do the following def somefunction @texts = A.find_all_by_someid(someid) respond_to do |format| format.xml { render :xml => @texts } end end it gets the string from the db correctly, except if the string has leading whitespaces, it seems they are trimmed. Note: the whitespaces are there in the db correctly What can I do to conserve those whitespaces? Thanks

    Read the article

  • ASP.NET MVC returning ContentResult using Ajax form - how to preserve whitespace?

    - by Ben
    In my application users can enter commands that are executed on the server. The results are added to a session object. I then stuff the session object into ViewData and add it to a textarea. When done with a standard HTML form whitespace is preserved. However, when I swap this out for an ajax form (Ajax.BeginForm) and return the result as ContentResult, the whitespace is removed. Controller Action: [HttpPost] public ActionResult Execute(string submitButton, string command) { if (submitButton == "Clear") { this.CurrentConsole = string.Empty; } if (submitButton == "Execute" && !string.IsNullOrEmpty(command)) { var script = new PSScript() { Name = "Ad hoc script", CommandText = command }; this.CurrentConsole += _scriptService.ExecuteScript(script); } if (Request.IsAjaxRequest()) { return Content(this.CurrentConsole, "text/plain"); } return RedirectToAction("Index"); } View: <fieldset> <legend>Shell</legend> <%=Html.TextArea("console", ViewData["console"].ToString(), new {@class = "console", @readonly = "readonly"})%> <% using (Ajax.BeginForm("Execute", new AjaxOptions { UpdateTargetId = "console", OnBegin = "console_begin", OnComplete = "console_complete"})) { %> <input type="text" id="command" name="command" class="commandtext" /> <input type="submit" value="Execute" class="runbutton" name="submitButton" /> <input type="submit" value="Clear" class="runbutton" name="submitButton" /> <%} %> </fieldset> How can I ensure that whitespace is preserved? When I inspect the response in FireBug it looks like the whitespace is transmitted, so can only assume it has something to do with the way in which the javascript handles the response data.

    Read the article

  • django - where to clean extra whitespace from form field inputs?

    - by Westerley
    I've just discovered that Django doesn't automatically strip out extra whitespace from form field inputs, and I think I understand the rationale ('frameworks shouldn't be altering user input'). I think I know how to remove the excess whitespace using python's re: #data = re.sub('\A\s+|\s+\Z', '', data) data = data.strip() data = re.sub('\s+', ' ', data) The question is where should I do this? Presumably this should happen in one of the form's clean stages, but which one? Ideally, I would like to clean all my fields of extra whitespace. If it should be done in the clean_field() method, that would mean I would have to have a lot of clean_field() methods that basically do the same thing, which seems like a lot of repetition. If not the form's cleaning stages, then perhaps in the model that the form is based on? Thanks for your help! W.

    Read the article

  • Event ID 17890 (A significant part... paged out.) with SQL Server 2008

    - by Godeke
    I have a machine that has SQL Server 2008 Standard installed. Periodically (about once an hour) I am getting Event ID 17890 several times in a row. An example: 6:28:54 "A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 0 seconds. Working set (KB): 10652, committed (KB): 628428, memory utilization: 1%%. 6:34:27 "A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 332 seconds. Working set (KB): 169780, committed (KB): 546124, memory utilization: 31%%." 6:38:55 "A significant part of sql server process memory has been paged out. This may result in a performance degradation. Duration: 600 seconds. Working set (KB): 245068, committed (KB): 546124, memory utilization: 44%%." This pattern repeated at 7:26 - 7:37, 8:26 - 8:36, 9:24 - 9:35 and so with the same increasing working set and memory utilization pattern. I don't have any (known) background tasks running at this time. Backups run at 2:00 This subsided from 11:00 at night until it resumed at 4:00 in the morning and has been continuing the intermittent 10 minute glitch periods. As this server has plenty of RAM (the commit charge has peaked at 2,871,564 of 4,194,012 physical) I disabled the paging files after reading several items I dug up searching Google and not finding any of them changing the situation. This pattern I am documented is after removing the paging files, so I'm not even sure where we are paging the SQL process could be going. I also changed the SQL process memory to have a minimum of 500MB and a maximum of 2GB of RAM (as this is a light duty database server serving only a small workgroup). Has anyone encountered this? Prior to disabling the page files this error would cause 5 minutes of disk thrashing that disabled access to the databases, files, IIS webs and so on. Since disabling the page files it just logs strange things, but I'm not seeing a performance drop at least. Any suggestions would be welcome.

    Read the article

  • Is there a way to know when fscanf reads a whitespace or a new line?

    - by user1493813
    I want to know if there is a way to know when fscanf reads a whitespace or a new line. Example: formatting asking words italic links returns As fscanf read a string till it meets a newline or a whitespace(using %s), it'll read formatting and the space after it and before a. The thing is, is there a way to know that it read a space? And after it entered the second line is there is a way to know that it read a carriage return?

    Read the article

  • Try and catch error trapping. why is it so significant

    - by oded
    sorry if it sounds dumb ' as i am i a process of learnning java i try to understand , why on earth i should "try" a method to catch errors. it looks to me like the concept is:- ' letting a process run assuming its not properly developed. should i always assume that a program based on classes and inheritance is bound for unexpected errors, which i should handle with such a heavy tools like try catch throw throws ? should all java programs be included withing try catch framework? Thanks Oded.

    Read the article

  • Is there a significant hit to a non .com TLDs exact match domain (EMD) names after Google's Panda update?

    - by ElHaix
    In this article, there is a good overview of exact match domain names and how they affect SEO after Google's Panda update. The last graph shows the Non-com EMD Influence, where it is suggested that a .com tld will perform better than a non-.com one. However, let's consider local search. In the US, .com's work great. However, let's say you're in Canada, and you have a .ca EMD, all with local, Canadian results. Would the expectation be that the .com equivalent still perform better? As a user I would expect the .ca results to be more relevant, and I'm wondering if anyone else has experience with this?

    Read the article

  • As the current draft stands, what is the most significant change the "National Strategy for Trusted Identities in Cyberspace" will provoke?

    - by mfg
    A current draft of the "National Strategy for Trusted Identities in Cyberspace" has been posted by the Department of Homeland Security. This question is not asking about privacy or constitutionality, but about how this act will impact developers' business models and development strategies. When the post was made I was reminded of Jeff's November blog post regarding an internet driver's license. Whether that is a perfect model or not, both approaches are attempting to handle a shared problem (of both developers and end users): How do we establish an online identity? The question I ask here is, with respect to the various burdens that would be imposed on developers and users, what are some of the major, foreseeable implementation issues that will arise from the current U.S. Government's proposed solution? For a quick primer on the setup, jump to page 12 for infrastructure components, here are two stand-outs: An Identity Provider (IDP) is responsible for the processes associated with enrolling a subject, and establishing and maintaining the digital identity associated with an individual or NPE. These processes include identity vetting and proofing, as well as revocation, suspension, and recovery of the digital identity. The IDP is responsible for issuing a credential, the information object or device used during a transaction to provide evidence of the subject’s identity; it may also provide linkage to authority, roles, rights, privileges, and other attributes. The credential can be stored on an identity medium, which is a device or object (physical or virtual) used for storing one or more credentials, claims, or attributes related to a subject. Identity media are widely available in many formats, such as smart cards, security chips embedded in PCs, cell phones, software based certificates, and USB devices. Selection of the appropriate credential is implementation specific and dependent on the risk tolerance of the participating entities. Here are the first considered actionable components of the draft: Action 1: Designate a Federal Agency to Lead the Public/Private Sector Efforts Associated with Achieving the Goals of the Strategy Action 2: Develop a Shared, Comprehensive Public/Private Sector Implementation Plan Action 3:Accelerate the Expansion of Federal Services, Pilots, and Policies that Align with the Identity Ecosystem Action 4:Work Among the Public/Private Sectors to Implement Enhanced Privacy Protections Action 5:Coordinate the Development and Refinement of Risk Models and Interoperability Standards Action 6: Address the Liability Concerns of Service Providers and Individuals Action 7: Perform Outreach and Awareness Across all Stakeholders Action 8: Continue Collaborating in International Efforts Action 9: Identify Other Means to Drive Adoption of the Identity Ecosystem across the Nation

    Read the article

  • What significant progress have we made in Rapid Application Development?

    - by Frank Computer
    Since the introduction of OOPL's and event-driven programming, I feel like developing an application has become harder and more tedious, when it should have been the other way around! We should have development tools which can generate prototype apps which can be quickly and easily customized into sophisticated applications, even by novice users! We really need new ideas in this area of software development and I would like to know of any good ideas. If we can't really find them, then we should ask "Where did we miss the boat?.. Why?.. and What should we be doing?"

    Read the article

  • No Significant Fragmentation? Look Closer…

    If you are relying on using 'best-practice' percentage-based thresholds when you are creating an index maintenance plan for a SQL Server that checks the fragmentation in your pages, you may miss occasional 'edge' conditions on larger tables that will cause severe degradation in performance. It is worth being aware of patterns of data access in particular tables when judging the best threshold figure to use.

    Read the article

  • No Significant Fragmentation? Look Closer…

    If you are relying on using 'best-practice' percentage-based thresholds when you are creating an index maintenance plan for a SQL Server that checks the fragmentation in your pages, you may miss occasional 'edge' conditions on larger tables that will cause severe degradation in performance. It is worth being aware of patterns of data access in particular tables when judging the best threshold figure to use.

    Read the article

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