Search Results

Search found 6696 results on 268 pages for 'syntax highlighting'.

Page 147/268 | < Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >

  • Ubuntu Bash Script changing file names chronologicaly

    - by Manifold
    I have this bash script where I am trying to change all *.txt files in a directory to their date of last modification. This is the script: #!/bin/bash # Renames the .txt files to the date modified # FROM: foo.txt Created on: 2012-04-18 18:51:44 # TO: 20120418_185144.txt for i in *.txt do mod_date=$(stat --format %y "$i"|awk '{print $1"_"$2}'|cut -f1 -d'.'|sed 's/[: -]//g') mv "$i" "$mod_date".txt done The error I am getting is: renamer.sh: 6: renamer.sh: Syntax error: word unexpected (expecting "do") Any help would be greatly appreciated. Thank you for your time.

    Read the article

  • Writing a collection to Excel

    - by jame
    I'm working in VS2005 and I need the C# syntax write to write collection values in an Excel sheet. I initialize the collection like this: Reports oReports =new Reports();//oReports is a collection Assuming that this collection has values, how would I write them to Excel?

    Read the article

  • Multi-Dimensional Array and ArrayIndexOutOfBoundsException

    - by notset
    Hello, I have a strange problem which I can't fix: A field: private boolean[][][] gaps; Constructor (1st line): gaps = new boolean[NOBARRICADES][WIDTH][HEIGHT]; Constructor (2nd line): for (int i = 0; i < NOBARRICADES; i++) { JAVA throws an error for the 2nd line, saying: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException Does it have anything to do with JAVA syntax (the mistake is in these lines of code) or I should look for the problem somewhere else?

    Read the article

  • Why is i++++++++i valid in python?

    - by SysAdmin
    I "accidentally" came across this weird but valid syntax i=3 print i+++i #outputs 6 print i+++++i #outputs 6 print i+-+i #outputs 0 print i+--+i #outputs 6 (for every even no: of minus symbol, it outputs 6 else 0, why?) Does this do anything useful? Update (Don't take it the wrong way..I love python): One of Python's principle says There should be one-- and preferably only one --obvious way to do it. It seems there are infinite ways to do i+1

    Read the article

  • How do I create a query which displays dots (....) after a certain number of characters within the field

    - by Marchese Il Chihuahua
    I would like to create a query on a field which after a certain number of characters adds/displays a number of dots to show the user that there is additional text to read. At the moment there is a syntax error using the following code in which it doesn't like the "Left" instruction: X:IIF(len(description) > 5, Left(description, 5) & "....", description) Note: "X" is what i am naming the field 'description' in my query screen in Access

    Read the article

  • android : SQL Exception while querying

    - by Ram
    Team, Can you please help me to understand why I m getting the following exception. 05-07 10:57:20.652: ERROR/AndroidRuntime(470): android.database.sqlite.SQLiteException: near "1": syntax error: , while compiling: SELECT Id,Name FROM act WHERE Id 1-IJUS-1 Thanks in advance,

    Read the article

  • Basic Java question?

    - by LAT
    Hi I am quite new to programming, i have a question please help me. ( this question is java question but i can't remember the syntax but what i write here is mostly it.) A class Person speaks i am a person A class Student speaks i am a student Student extends from Person Person p = new Student then what is p speaking then?

    Read the article

  • C: Convert A ? B : C into if (A) B else C

    - by tur1ng
    I was looking for a tool that can convert C code expressions for the form: a = (A) ? B : C; into the 'default' syntax with if/else statements: if (A) a = B else a = C Does someone know a tool that's capable to do such a transformation? I work with GCC 4.4.2 and create a preprocessed file with -E but do not want such structures in it.

    Read the article

  • Find and replace date within a file

    - by user1629011
    My apologies if my title is not descriptive enough, I believe the following will be. I have 3 files which are just plain text, within each file, is a date Date: 2012-08-31 for example I would like to get a command/script to find this and update to the current date, but the date will be ever changing and may not be known going in (without viewing the contents of the file Knowing what the date is, its simple enough with sed, but how can I do this knowing the syntax of the line I want to modify, but not the specific values. ("Date: " at least is unchanging)

    Read the article

  • How do I use a file grep comparison inside a bash if/else statement?

    - by openid_kenja
    When our server comes up we need to check a file to see how the server is configured. We want to search for the following string inside our /etc/aws/hosts.conf file: MYSQL_ROLE=master Then, we want to test whether that string exists and use an if/else statement to run one of two options depending on whether the string exists or not. What is the BASH syntax for the if statement? if [ ????? ]; then #do one thing else #do another thing fi

    Read the article

  • The table '#sql-5f8_9c' is full

    - by gansodesoya
    hello, im trying to delete a foreign key with the following syntax (5.0.45-community-nt): alter table [table] drop foreign key [fk_name] but I'm getting the folling error: The table '#sql-5f8_9c' is full – 99543 ms any ideas? thanks!

    Read the article

  • Enums in java compile error

    - by London
    Hi, I'm trying to learn java from bottom up, and I got this great book to read http://www.amazon.com/o/ASIN/0071591060/ca0cc-20 . Now I found example in the book about declaring Enums inside a class but outside any methods so I gave it a shot : Enum CoffeeSize { BIG, HUGE, OVERWHELMING }; In the book its spelled enum and I get this compile message Syntax error, insert ";" to complete BlockStatements Are the Enums that important at all?I mean should I skip it or its possible that I will be using those some day?

    Read the article

  • [VS2008] - Run Add-in from PrebuildEvent

    - by JBL
    I'm writing an VS 2008 add-in to synchronize Setup project Version with startup project assembly version. It works fine. But I was wondering if it was possible to call add-in from the Prebuild Event of my setup project. It works fine by command line window, but I didn't find any syntax to make it work in prebuildEvent. Is Someone has an idea ? Thanks

    Read the article

  • How do i use the top keyword in an insert statement?

    - by acidzombie24
    I was using it as LIMIT when i got the exception Incorrect syntax near the keyword 'TOP'. Maybe i can omit it in this case without problem? but if i couldnt where do i put top? INSERT INTO [user_data] (...) SELECT ... @14 WHERE not exists (SELECT * FROM [user_data] WHERE [email] = @15 OR [name] = @16 OR [unconfirmed_email] = @17 TOP 1);

    Read the article

  • Created query is not supported by my DB

    - by stacker
    I created an application using seam-gen. The created operation to search the DB ends with and exception (syntax error). The query has a where clause like this: lower(barcode0_.barcode_ean) like lower((?||'%')) limit ? Does hibnerate or seam create the where clause which my DB can't understand? Or is there a workaround for SQL statement related issues in seam?

    Read the article

  • Autohotkey to map F5 to Shift+Home and then F5 - eventually executing a single line query in sql server?

    - by puretechy
    Reading the syntax from autohotkey, I am trying to achieve this. But the first step of selecting the entire line is not working:- F5:: send {Shift Home} return I have tried few others too, but its not working. This is not sending Shift+Home combination on pressing F5 key. Please tell me what's wrong with this? Also if possible, what to do next?, as if I will write send {F5} I believe, it will recursively fire this script again and again..

    Read the article

  • Store html into MYSql database

    - by jouzef19
    hello I'm try to store String (that contain html ) to mysql database by using Longtext data type. but its always says "You have an error in your SQL syntax". (note : i tried to store normal text , and its work)

    Read the article

  • Deprecate in Java 1.6

    - by iano
    In Java 1.5, to deprecate a method you would: @Deprecated int foo(int bar) { } Compiling this in Java 1.6 results in the following: Syntax error, annotations are only available if source level is 1.5 Any ideas?

    Read the article

  • spliting the string

    - by prince23
    hi, i have an string like this string strdate =@"5/2/2006"; which is in a form of month/day/year i need to display it in a form of like this 02-05-2006 how do i format the data like this if the value is like this 12/28/2005 it should be displayed like this 28-12-2010 i know we should be splitting the data based on that we should do it. i am not getting the syntax how to do it . any help would be great

    Read the article

  • does PHP Version 5.3.2 work without <?php woth with <?

    - by air
    i have one complete website which was written in php4, now my hosting server is PHP Version 5.3.2, windows 2008 server and my site is not working, what i found is old site use following syntax <? but if i change it into <?php page start working. is there any way to solve this issue... PHP Version 5.3.2 work with <? any script which change all <? to <?php in all pages. Thanks

    Read the article

< Previous Page | 143 144 145 146 147 148 149 150 151 152 153 154  | Next Page >