Search Results

Search found 3646 results on 146 pages for 'escape sequence'.

Page 14/146 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • subprocess.Popen doesn't work when args is sequence

    - by pero
    I'm having a problem with subprocess.Popen when args parameter is given as sequence. For example: import subprocess maildir = "/home/support/Maildir" This works (it prints the correct size of /home/support/Maildir dir): size = subprocess.Popen(["du -s -b " + maildir], shell=True, stdout=subprocess.PIPE).communicate()[0].split()[0] print size But, this doesn't work (try it): size = subprocess.Popen(["du", "-s -b", maildir], shell=True, stdout=subprocess.PIPE).communicate()[0].split()[0] print size What's wrong?

    Read the article

  • Bind a Java Collection to xQuery sequence from xQuery

    - by jtzero
    declare function Error:toString($this as javaObject) as xs:string external; the previous binds a return String() to xs:string. is it possible to return a collection and bind it to an xQuery Sequence, say the following declare function Error:toList($this as javaObject) as squenceType external; so that it can be run through a flwr?

    Read the article

  • XAML C# WPF Best efficient way to do an ordered sequence of animations

    - by toni
    Hi everybody! I would like to do a sequence of animations on a label, for example, first do opacity animations from values 0 to 1 and vice versa and just at the end of opacity animation and not before a foreground animation. I would like to do it in XAML code and then start and finish de animation from C# code. Which is the best and efficient way to do it? All replies are welcome! Thanks in advance.

    Read the article

  • Factory Girl sequence fails under autospec

    - by John
    I have this Factory: Factory.define :email_address do |e| e.sequence(:address) { |n| "factory_#{n}@example.com" } e.validated true end When I run my specs with rake spec, it works fine. When I run autospec, it fails right away, claiming that the email address is being used twice in two different objects (there is a validation which restricts this). Why is it behaving differently under autospec? Thanks, John

    Read the article

  • sequence and merge jpeg images using python ?

    - by DILi
    im doing a project as part of academic programme.Im doing this in linux platform.I have converted a few pdf files in to html and jpeg images using pdftohtml.now i need to sequence the jpeg images depending on some conditions and to merge them .how can i do this using python?.if anyone can provide any such python script which have done any functions similar to this then it will be very helpful.

    Read the article

  • DShow : Enumeration sequence of IEnumMoniker

    - by KenC
    Hello, This is a question about DirectShow IEnumMoniker. Out of some reason, I have to know "what kind of order" IEnumMoniker enumerates items. (I mean, it's alphabetically or...?) The following pages are documents about IEnumMoniker, however, it doesn't mention about this : http://msdn.microsoft.com/en-us/library/ms692852(v=VS.85).aspx http://msdn.microsoft.com/en-us/library/dd407292%28VS.85%29.aspx If anybody has the idea about the enumeration sequence, please let me know. Thanks a lot.

    Read the article

  • Rearranging a sequence

    - by sarah
    I'm have trouble rearranging sequences so the amount of letters in the given original sequence are the same in the random generated sequences. For example: If i have a string 'AAAC' I need that string rearranged randomly so the amount of A's and C's are the same.

    Read the article

  • Undefined control sequence at first line of a document

    - by Jayomat
    \documentclass{book} \usepackage{amsmath} \usepackage[german]{babel} \usepackage{amssymb} \usepackage{amsxtra} \usepackage[dvips]{epsfig,psfrag} \usepackage{listings} .... this is how my file starts. I didn't even edit it, I received it like this. However, if I want to make a pdf, it gives me the undefined control sequence error at the first line... What is wrong??

    Read the article

  • Loading an image sequence in InterfaceBuilder -ObjectiveC

    - by eco_bach
    Hi Using Actionscript and or in the Flash IDE you can either instantiate bitmaps from the library, or simply import bitmaps into the timeline of a MovieClip to create an image sequence. How would you do the same thing in InterfaceBuilder and-or using ObjectiveC? Do I need to create a new view for each and every image?

    Read the article

  • Minimize the sequence by putting appropriate operations ' DP'

    - by Vikas
    Given a sequence,say, 222 We have to put a '+' or '* ' between each adjacent pair. '* ' has higher precedence over '+' We have to o/p the string whose evaluation leads to minimum value. O/p must be lexicographically smallest if there are more than one. inp:222 o/p: 2*2+2 Explaination: 2+2+2=6 2+2*2=6 2*2+2=6 of this 3rd is lexicographically smallest. I was wondering how to construct a DP solution for this.

    Read the article

  • C# Check for missing number in sequence

    - by Jon
    I have an List<int> which contains 1,2,4,7,9 for example. I have a range from 0 to 10. Is there a way to determine what numbers are missing in that sequence? I thought LINQ might provide an option but I can't see one In the real world my List could contain 100,000 items so performance is key

    Read the article

  • Trouble with backslash characters and rsyslog writing to postgres

    - by Flimzy
    I have rsyslog 4.6.4 configured to write mail logs to a PostgreSQL database. It all works fine, until the log message contains a backslash, as in this example: Jun 12 11:37:46 dc5 postfix/smtp[26475]: Vk0nYDKdH3sI: to=<[email protected], relay=----.---[---.---.---.---]:25, delay=1.5, delays=0.77/0.07/0.3/0.35, dsn=4.3.0, status=deferred (host ----.---[199.85.216.241] said: 451 4.3.0 Error writing to file d:\pmta\spool\B\00000414, status = ERROR_DISK_FULL in "DATA" (in reply to end of DATA command)) The above is the log entry, as written to /var/log/mail.log. It is correct. The trouble is that the backslash characters in the file name are interpreted as escapes when sent to the following SQL recipe: $template dcdb, "SELECT rsyslog_insert(('%timereported:::date-rfc3339%'::TIMESTAMPTZ)::TIMESTAMP,'%msg:::escape-cc%'::TEXT,'%syslogtag%'::VARCHAR)",STDSQL :syslogtag, startswith, "postfix" :ompgsql:/var/run/postgresql,dc,root,;dcdb As a result, the rsyslog_insert() stored procedure gets the following value for as msg: Vk0nYDKdH3sI: to=<[email protected], relay=----.---[---.---.---.---]:25, delay=1.5, delays=0.77/0.07/0.3/0.35, dsn=4.3.0, status=deferred (host ----.---[199.85.216.241] said: 451 4.3.0 Error writing to file d:pmtaspoolB The \p, \s, \B and \0 in the file name are interpreted by PostgreSQL as literal p, s, and B followed by a NULL character, thus early-terminating the string. This behavior can be easiily confirmed with: dc=# SELECT 'd:\pmta\spool\B\00000414'; ?column? -------------- d:pmtaspoolB (1 row) dc=# Is there a way to correct this problem? Is there a way I'm not finding in the rsyslog docs to turn \ into \\?

    Read the article

  • Why do the Escape and Enter keys not always do the right thing in dialog boxes?

    - by Michael Goldshteyn
    Why is it that when a dialog pops up, the Escape key doesn't always cancel it and the Enter key doesn't always press the default button? Shouldn't this be a standard across all dialog boxes in all applications? I have gotten into the habit of pressing Escape to cancel a dialog and Enter to confirm it, but applications (and especially KDE, GNOME and Unity in many many cases) seem to ignore my wishes. What is the problem? Is consitency too much to ask?

    Read the article

  • Mixed surrogate composite key insert in JPA 2.0, PostgreSQL and Hibernate 3.5

    - by Gerald
    First off, we are using JPA 2.0 and Hibernate 3.5 as persistence provider on a PostgreSQL database. We successfully use the sequence of the database via the JPA 2.0 annotations as an auto-generated value for single-field-surrogate-keys and all works fine. Now we are implementing a bi-temporal database-scheme that requires a mixed key in the following manner: Table 1: id (pk, integer, auto-generated-sequence) validTimeBegin (pk, dateTime) validTimeEnd (dateTime) firstName (varChar) Now we have a problem. You see, if we INSERT a new element, the field id is auto-generated and that's fine. Only, if we want to UPDATE the field within this scheme, then we have to change the validTimeBegin column WITHOUT changing the id-field and insert it as a new row like so: BEFORE THE UPDATE OF THE ROW: |---|-------------------------|-------------------------|-------------------| | id| validTimeBegin | validTimeEnd | firstName | |---|-------------------------|-------------------------|-------------------| | 1| 2010-05-01-10:00:00.000 | NULL | Gerald | |---|-------------------------|-------------------------|-------------------| AFTER THE UPDATE OF THE ROW happening at exactly 2010-05-01-10:35:01.788 server-time: (we update the person with the id:1 to reflect his new first name...) |---|-------------------------|-------------------------|-------------------| | id| validTimeBegin | validTimeEnd | firstName | |---|-------------------------|-------------------------|-------------------| | 1| 2010-05-01-10:00:00.000 | 2010-05-01-10:35:01.788 | Gerald | |---|-------------------------|-------------------------|-------------------| | 1| 2010-05-01-10:35:01.788 | NULL | Jerry | |---|-------------------------|-------------------------|-------------------| So our problem is, that this doesn't work at all using an auto-generated-sequence for the field id because when inserting a new row then the id ALWAYS is auto-generated although it really is part of a composite key which should sometimes behave differently. So my question is: Is there a way to tell hibernate via JPA to stop auto-generating the id-field in the case I want to generate a new variety of the same person and go on as usual in every other case or do I have to take over the whole id-generation with custom code? Thanks in advance, Gerald

    Read the article

  • How to escape % in roxygen literate programming?

    - by Karsten W.
    The default value of a parameter of my function contains a "%". This seems to be a problem for roxygen, it produces a lot of warnings and R CMD check fails when trying to build latex documentation. How can I make this function (and its documentation) work? Using %% or \% instead of % does not help. #' Test escape \% from in-source documentation (roxygen). #' #' What happens when parameters contain special latex characters? #' #' @param x unsuspicious parameter #' @param format sprintf format string (default "\%5.0f") #' #' @return formatted string #' @export #' @author Karsten Weinert testroxy <- function(x, format = "%5.0f") { sprintf(format,x) }

    Read the article

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