Search Results

Search found 390 results on 16 pages for 'escaping'.

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

  • Can I do filename pattern matching in a bash script?

    - by Bob Bowden
    Can I do filename pattern matching in a bash script? "test" is a directory with the following files ... bob@bob-laptop:~/test$ ls exclude exclude1 exclude2 include1 include2 from the command line, if I want to exclude some of the files, I can do ... bob@bob-laptop:~/test$ echo !(exclude*) include1 include2 but, if I put that command in a script (named exclude) ... bob@bob-laptop:~/test$ cat exclude echo !(exclude*) when I execute it, I get an error ... bob@bob-laptop:~/test$ ./exclude ./exclude: line 1: syntax error near unexpected token (' ./exclude: line 1:echo !(exclude*)' I've tried every (I think) variation of escaping some, all or none of the special characters and I still get an error. What am I missing here? If I can't do this, would someone please be so kind as to explain why?

    Read the article

  • Why do we keep using CSV?

    - by Stephen
    Why do we keep using CSV? I recently made a shift to working the health domain and despite the wonderful work in data transfer standards, all data transfer is in CSV, both for reporting to external organisations, and for data migrations when implementing new systems. Unfortunately the use of CSV is the cause of the endless repetition of the same stupid errors, with the same waste of developer time. (bad escaping, failing to handle null fields etc.) I know we can do better, and anything between JSON and XML (depending on the instance) would be fine. (Most of the time this is data going from one MS SQLserver 2005 to another!) I feel as if each time I see this happening I am literally watching one developer waste anothers time. So why do we keep shafting each other? When will we stop?

    Read the article

  • SSIS - The expression cannot be parsed because it contains invalid elements at the location specifie

    - by simonsabin
    If you get the following error when trying to write an expression there is an easy solution Attempt to parse the expression "@[User::FilePath] + "\" + @[User::FileName] + ".raw"" failed.  The token "." at line number "1", character number "<some position>" was not recognized. The expression cannot be parsed because it contains invalid elements at the location specified. The SSIS expression language is a C based language and the \ is a token, this means you have to escape it with another one. i.e "\" becomes "\\", unlike C# you can't prefix the string with a @, you have to use the escaping route. In summary when ever you want to use \ you need to use two \\

    Read the article

  • Apache Commons PropertiesConfiguration escapes characters on Save [migrated]

    - by Anuvrat
    I am using the commons-configuration from apache commons library. I have a properties file which has properties like: blog_loc=http://my.blog.com blog_name="my blog name" I open the properties file, change the blog_name property and save the file. The following are the lines of code I use: PropertiesConfiguration propertyFile = new PropertiesConfiguration(propertyFileName); propertyFile.setProperty(blog_name, "blog name"); propertyFile.save(propertyFileName + ".out"); Unfortunately, in the output file certain characters get escaped as follows: blog_loc=http:\/\/my.blog.com blog_name=\"blog name\" Is there any way of preventing escaping of the above characters?

    Read the article

  • Why do we keep using CSV?

    - by Stephen
    Why do we keep using CSV? I recently made a shift to working the health domain and despite the wonderful work in data transfer standards, all data transfer is in CSV, both for reporting to external organisations, and for data migrations when implementing new systems. Unfortunately the use of CSV is the cause of the endless repetition of the same stupid errors, with the same waste of developer time. (bad escaping, failing to handle null fields etc.) I know we can do better, and anything between JSON and XML (depending on the instance) would be fine. (Most of the time this is data going from one MS SQLserver 2005 to another!) I feel as if each time I see this happening I am literally watching one developer waste anothers time. So why do we keep shafting each other? When will we stop?

    Read the article

  • ffmpeg: cut multiple input files with seeking to one output file

    - by Josef Kufner
    I have list of video files (loaded from database), each with start and end time of requested interval: # file begin end v1.mp4 1:01 2:01 v2.mp4 3:02 3:32 v3.mp4 2:03 5:23 And I need to create single video file containing these intervals: [0:00]---v1---[2:00]---v2---[2:30]---v3---[5:50] I preffer usig ffmpeg, since it is installed on server. Caller program is written in PHP. It is easy to cut one input to one output (argument escaping removed for clarity): exec("ffmpeg -ss $begin -i $input_file -ss $begin -c copy $output_file"); I there any easier way than executing ffmpeg for each interval and then execute it once more to concatenate prepared clips together? I really do not like to have a lot of temporary files or dealing with complex process handling.

    Read the article

  • From the Coalface - 2 - Work as hard as you can to be as lazy as you can

    - by TATWORTH
    On one project, the standard build involved building the database from scratch producing a build log that was about 100,000 lines long.  Manually paging throught this log took hours and it was very easy to miss any errors. The solution was to write a filter that read the log file and output a summary file with each output line pepended with the line number in the original file. Sucessive iterations eliminated more noise lines. Diagnostic displays required escaping. The final output was just a few hundred lines long and the errors were easy to spot. The filter program took less time to to write than one manual pass reading the log file.  The utility digested the log file in about 1 second. Now database build errors could be identified quickly instead of after hours of manual examination or lengthy system testing. A few minutes consideration of the task led to a tremendous improvement in quality.

    Read the article

  • how to use SQL wildcard % with Queryset extra>select?

    - by tylias
    I'm trying to add weights to search terms I'm using to filter a queryset. Using the '%' wildcard is causing me some problems. I'm using the extra() modifier to add a weight parameter to the queryset, which I will be using to inform a sort ordering. (See http://docs.djangoproject.com/en/1.1/ref/models/querysets/#extra-select-none-where-none-params-none-tables-none-order-by-none-select-params-none ) Here's the gist of the code: def viewname(request) ... exact_matchstrings="" exact_matchstrings.append("(accountprofile.first_name LIKE '" + term + "')") exact_matchstrings.append("(accountprofile.first_name LIKE '" + term + '\%' + "')") extraquerystring = " + ".join(exact_matchstrings) return_queryset = return_queryset.extra( select = { 'match_weight': extraquerystring }, ) The effect I'm going for is that if the search term matches exactly, the weight associated with the record is 2, but if the term merely starts with the search term and isn't an exact match, the weight is 1. (for example, if 'term' = 'Jon', an entry with first_name='Jon' gets a weight of 2 but an entry with an entry with first_name = 'Jonathan' gets a weight of 1.) I can test the statement in SQL and it seems to work well enough. If I make this SQL query from the mysql shell, no problem: select (first_name like "Carl") + (first_name like "Car%") from accountprofile; But trying to run it via the extra() modifier in my view code and evaluating the resulting queryset gives me the following error: Traceback (most recent call last): File "<console>", line 1, in <module> File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 68, in __repr__ data = list(self[:REPR_OUTPUT_SIZE + 1]) File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 83, in __len__ self._result_cache.extend(list(self._iter)) File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 238, in iterator for row in self.query.results_iter(): File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 287, in results_iter for rows in self.execute_sql(MULTI): File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/query.py", line 2369, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python2.6/dist-packages/django/db/backends/util.py", line 22, in execute sql = self.db.ops.last_executed_query(self.cursor, sql, params) File "/usr/local/lib/python2.6/dist-packages/django/db/backends/__init__.py", line 217, in last_executed_query return smart_unicode(sql) % u_params ValueError: unsupported format character ''' (0x27) at index 309 I've tried it escaping and not escaping % wildcard but that doesn't solve the problem. Doesn't seem to affect it at all, really. Any ideas?

    Read the article

  • fetch_all or fetch_assoc MySQLi statement

    - by all-R
    Hi, is it possible to use the fetch_all(), fetch_assoc() etc. from the the MySQLi_Result class with a prepared statement from the MySQLi_STMT class? I've done it using the query() method in the Mysqli class (and by escaping trough mysqli_real_escape_string()), but not using statements with binding parameters. I'm considering using PDO thanks!

    Read the article

  • SharpZip escape filename

    - by mr.moses
    I'm using SharpZipLib to create a zip file with an html page and images. If the html file has a / in the name, it creates a folder (which messes up the image paths). Example: If the html file should be named Web/Design.html the zip file will contain a Web folder with a Design.html file in it. I've tried escaping / by replacing / with // or \/ but nothing has worked so far.

    Read the article

  • How to change the primary key to be non-clustered?

    - by AngryHacker
    Part-time reluctant DBA here. I want to change an existing primary key index from clustered to non-clustered. And the syntax is escaping me. This is how it's scripted out right now. ALTER TABLE [dbo].[Config] WITH NOCHECK ADD CONSTRAINT [PK_Config] PRIMARY KEY CLUSTERED ( [ConfigID] ) ON [PRIMARY] I am not seeing an ALTER CONSTRAINT statement in the online docs.

    Read the article

  • What does JSLint's "Bad Escapement" mean in this case?

    - by karlthorwald
    I thougth "bad escapement" stands for wrong use escaping with slash. Why does JSLint bring up the message in this function on the 3d line (for...) ? function splitTags(commaSeparated) { var tagArray = commaSeparated.split(','); for (var i=tagArray.length - 1; i>=0; --i ){ tagArray[i] = f.trim(tagArray[i]); } return tagArray; }

    Read the article

  • Regular expressions and the question mark

    - by James P.
    I'm having trouble finding a regular expression that matches the following String. Korben;http://feeds.feedburner.com/KorbensBlog-UpgradeYourMind?format=xml;1 One problem is escaping the question mark. Java's pattern matcher doesn't seem to accept \? as a valid escape sequence but it also fails to work with the tester at myregexp.com. Here's what I have so far: ([a-zA-Z0-9])+;http://([a-zA-Z0-9./-]+);[0-9]+ Any suggestions?

    Read the article

  • email address in the url

    - by phoenix24
    Hi, I am passing the email address as part of the url, for ex. http://example.com/hello/[email protected] but, when being passed to the application controller it is changed to " user%40hotmail.com ". I can't seem to understand this special character escaping; confusion. please help me explain the problem here, and also what can I do to fix it. I am using python's "webapp" web application framework.

    Read the article

  • Sanitizing input for display in view when using simple_format

    - by Eric
    Hi, I'm trying to figure out the right way to display comments such that newlines and links are displayed. I know that usually, you should display user-inputs only when escaping html with h(). That of course won't display newlines or links, so I found the simple_format and auto_link methods. What I am now doing is: simple_format(santize(auto_link(comment.text))) Is this the right way to do this, and is it still safe from XSS attacks? Thanks! Eric

    Read the article

  • Lua on Android: Comment character

    - by markus_b
    I have a tiny LUA script which is supposed to disable call forwarding: require 'android' android.dialNumber('*21#') The problem is that the script only dials '*21' and omits the '#' character. Playing around It looks to me like the # character is treated as comment character as everything after it is ignored. I've tried singel and double quotes, escaping, \023, but nothing works. How can I dial '*21#' on android with LUA ?

    Read the article

  • Regular expressions and matching question marks in URLs

    - by James P.
    I'm having trouble finding a regular expression that matches the following String. Korben;http://feeds.feedburner.com/KorbensBlog-UpgradeYourMind?format=xml;1 One problem is escaping the question mark. Java's pattern matcher doesn't seem to accept \? as a valid escape sequence but it also fails to work with the tester at myregexp.com. Here's what I have so far: ([a-zA-Z0-9])+;http://([a-zA-Z0-9./-]+);[0-9]+ Any suggestions?

    Read the article

  • Java equivalent of C# @

    - by Simon Rigby
    Hi all, Quick question. Is there an equivalent of @ as applied to strings in Java: For example I can do @"c:\afolder\afile" in C# and have it ignore the escape characters when processing instead of having to do "c:\afolder\aFile". Is there a Java equivalent? hmmm: stackoverflow is escaping on me .. lol. The second example should read: c:(double-backslash)afolder(double-backslash)aFile

    Read the article

  • Drupal Private Publishing

    - by Kevin
    Is there a way to have a content type that is only viewable to admins AND the person who created it, including comments? I feel like I know the answer to this but its escaping me.

    Read the article

  • Sending @reply in curl

    - by willwill
    I'm writing an identi.ca client, and seems that @reply isn't working. After investigation I found that @ prefix is used by curl to indicate file upload, and escaping with \@reply doesn't work; curl doesn't remove the \ at the front. I also can't format the postfields to query string, as I need to send files on that request too. Is there any method to send both @reply and file upload in the same request?

    Read the article

  • What's the best, Escape then store Or store then escape the output?

    - by Axel
    Hi, After doing a long search on stackoverflow i didn't find any one talked about this even if it's a big choice, the Question is what's the best in order to prevent both of XSS and SQL injection, Escaping the data then store it in the DB or Store it as it is and escape when output it? Note: it is better if you give some examples of practics if possible. Thanks

    Read the article

  • mysqli real_escape_string problem

    - by tridat
    When im inserting to the database on my dev server the text goes in fine, for example "that's" is "that's" in the db. when uploading the exact same code to production server (hosted on a reseller account at bluehost) "that's" becomes "that\'s", im not double escaping, its exactly the same code, what could be the issue here?

    Read the article

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