Search Results

Search found 4783 results on 192 pages for 'txt'.

Page 42/192 | < Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >

  • php cache zend framework

    - by msaif
    server side is PHP + zend framework. problem: i have huge of data appox 5000 records and no of columns are 5 in input.txt file. i like to read all data into memory only once and send some data to the every browser request. but if i update that input.txt file then updated data must be auto synchronized to that memory location. so i need to solve that problem by using memory caching technique.but caching technique has expire time.but if input.txt is updated before cache expire then i need to auto synchronize to that memory location. now i am using zend framework 1.10.is it possible in zend framework. can anybody give me some line of code of zendfrmawork i have no option to use memchached server(distributed). Only zend framwork.

    Read the article

  • bash: hwo to know NUM option in grep -A -B "on the fly" ?

    - by Michael Mao
    Hello everyone: I am trying to analyze my agent results from a collection of 20 txt files here. If you wonder about the background info, please go see my page, what I am doing here is just one step. Basically I would like to take only my agent's result out of the messy context, so I've got this command for a single file: cat run15.txt | grep -A 50 -E '^Agent Name: agent10479475' | grep -B 50 '^==' This means : after the regex match, continue forward by 50 lines, stop, then match a line separator starts with "==", go back by 50 lines, if possible (This would certainly clash the very first line). This approach depends on the fact that the hard-coded line number counter 50, would be just fine to get exactly one line separator. And this would not work if I do the following code: cat run*.txt | grep -A 50 -E '^Agent Name: agent10479475' | grep -B 50 '^==' The output would be a mess... My question is: how to make sure grep knows exactly when to stop going forward, and when to stop getting backward? Any suggestion or hint is much appreciated.

    Read the article

  • How does Microsoft Detours work and how do I use it to get a stack trace?

    - by Bruce
    I am new to Microsoft Detours. I have installed it to trace the system calls a process makes. I run the following commands which I got from the web syelogd.exe /q C:\Users\xxx\Desktop\log.txt withdll.exe /d:traceapi.dll C:\Program Files\Google\Google Talk\googletalk.exe I get the log file. The problem is I don't fully understand what is happening here. How does detours work? How does it trace the system calls? Also I don't know how to read the output in log.txt. Here is one line in log.txt 20101221060413329 2912 50.60: traceapi: 001 GetCurrentThreadId() Finally I want to get the stack trace of the process. How can I get that?

    Read the article

  • trying to find if a file exists in a given path

    - by Yeshwanth Venkatesh
    I am fairly new to java and I am trying to find if the file specified in the LINUX path exists. private void validateFilePath(String filePath) { File dir = new File(filePath); if(dir.exists()){ System.out.println("File exists in the path " + dir); setTARGET_IMG_DIR("filePath"); return; }else{ System.out.println("File does not exists in the path: " + dir); return; } } The dir.exists works fine if I give a absolute path from my root like this /Users/yv/Documents/Eclipse-workspace/InputParser/bin/test.txt but if I give a relative path like test.txt or /InputParser/bin/test.txt it says files does not exists. I am planing on creating a jar of this projects and hence this should work with both relative path(files in the same directory) and absolute path from the root. How can I handle this ? Is it possible to search for the absolute path of that file from the root and append it to the file name ?

    Read the article

  • Search for a String and replace it with a variable

    - by chrissygormley
    Hello, I am trying to use regular expression to search a document fo a UUID number and replace the end of it with a new number. The code I have so far is: read_file = open('test.txt', 'r+') write_file = open('test.txt', 'w') r = re.compile(r'(self.uid\s*=\s*5EFF837F-EFC2-4c32-A3D4\s*)(\S+)') for l in read_file: m1 = r.match(l) if m1: new=(str,m1.group(2)) new?????? This where I get stuck. The file test.txt has the below UUID stored in it: self.uid = '5EFF837F-EFC2-4c32-A3D4-D15C7F9E1F22' I want to replace the part D15C7F9E1F22. I have also tried this: r = re.compile(r'(self.uid\s*=\s*)(\S+)') for l in fp: m1 = r.match(l) new=map(int,m1.group(2).split("-") new[4]='RHUI5345JO' But I cannot seem to match the string. Thanks in advance for any help.

    Read the article

  • windows C system call with spaces in command

    - by myforwik
    I cannot make system calls with spaces in the names and parameters. For example: system("c:\program files\something\example.exe c:\my files\example.txt"); I have tried escaping in every way I know how, and NOTHING works. I have tried: system("\"c:\program files\something\example.exe\" \"c:\my files\example.txt\""); and system("c:\program^ files\something\example.exe c:\my^ files\example.txt"); Neither work. I still get 'c:\program' is not a recongnised internal or external command This is really driving me mad... I need to call and pass parameters that have spaces in them. I cannot use the short notation for reasons I won't go into. I have tried with ' quotes instead of " quotes, still doesn't work. I have tried putting quotes around the whole thing and quotes around the spaces and that doesn't work. Does anyone know how to do it properly?

    Read the article

  • How do negated patterns work in .gitignore?

    - by chrisperkins
    I am attempting to use a .gitignore file with negated patterns (lines starting with !), but it's not working the way I expect. As a minimal example, I have the folllowing directory structure: C:/gittest -- .gitignore -- aaa/ -- bbb/ -- file.txt -- ccc/ -- otherfile.txt and in my gitignore file, I have this: aaa/ !aaa/ccc/ My understanding (based on this: http://ftp.sunet.se/pub//Linux/kernel.org/software/scm/git/docs/gitignore.html) is that the file aaa/ccc/otherfile.txt should not be ignored, but in fact git is ignoring everything under aaa. Am I misunderstanding this sentence: "An optional prefix ! which negates the pattern; any matching file excluded by a previous pattern will become included again."? BTW, this is on Windows with msysgit 1.7.0.2.

    Read the article

  • Reading a text file in c++

    - by Yavuz Karacabey
    string numbers; string fileName = "text.txt"; ifstream inputFile; inputFile.open(fileName.c_str(),ios_base::in); inputFile >> numbers; inputFile.close(); cout << numbers; And my text.txt file is: 1 2 3 4 5 basically a set of integers separated by tabs. The problem is the program only reads the first integer in the text.txt file and ignores the rest for some reason. If I remove the tabs between the integers it works fine, but with tabs between them, it won't work. What causes this? As far as I know it should ignore any white space characters or am I mistaken? If so is there a better way to get each of these numbers from the text file?

    Read the article

  • SQL Server: bcp utility: login fails

    - by Patrick
    Microsoft Windows [Version 5.2.3790] (C) Copyright 1985-2003 Microsoft Corp. C:\Documents and Settings\Administrator>bcp "SELECT TOP 1000 * FROM SOData.dbo.E xperts" queryout c:\customer3.txt -n -t -UAdministrator -P -SDNAWINDEV SQLState = 28000, NativeError = 18456 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for u ser 'Administrator'. or.. without -P flag C:\Documents and Settings\Administrator>bcp "SELECT TOP 1000 * FROM SOData.dbo.E xperts" queryout c:\customer3.txt -n -t -UAdministrator -P -SDNAWINDEV SQLState = 28000, NativeError = 18456 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for u ser 'Administrator'. or, without -P flag, and typing the password.. is the same C:\Documents and Settings\Administrator>bcp "SELECT TOP 1000 * FROM SOData.dbo.E xperts" queryout c:\customer3.txt -n -t -UAdministrator -SDNAWINDEV Password: SQLState = 28000, NativeError = 18456 Error = [Microsoft][SQL Server Native Client 10.0][SQL Server]Login failed for u ser 'Administrator'.

    Read the article

  • [Single|Double|Or no] Quotes when using grep?

    - by Hamy
    Grep acts differently depending on what kind of quotes I surround the regex with. I can't seem to get a clear understanding of why this is. Here is an example of the problem: hamiltont$ grep -e show\( test.txt variable.show(); variable.show(a); variable.show(abc, 132); variableshow(); hamiltont$ grep -e "show\(" test.txt grep: Unmatched ( or \( hamiltont$ grep -e 'show\(' test.txt grep: Unmatched ( or \( I am just assuming there is some proper way to enclose the regex with single/double quotes. Any help? FWIW, grep --version returns grep (GNU grep) 2.5.1

    Read the article

  • Powershell - Problem with Start-transcript using remoting

    - by Sanjeev
    I have a file transcript-test.ps1 with below contents $log="TestLog{0:yyyyMMdd-HHmm}" -f (Get-Date) $logfile = 'C:\logs\'+$log+'.txt' Start-transcript -path $logfile -force Echo "To test if this message gets logged" Write-host "To test if this message gets logged" logged" Stop-transcript I try to run the script from lets say "box1" and the log file contains the below contents ********** Windows PowerShell Transcript Start Start time: 20110105114050 Username : domain\user Machine : BOX1 (Microsoft Windows NT 5.2.3790 Service Pack 2) ********** Transcript started, output file is C:\logs\TestLog20110105-1140.txt This should get logged in the log file C:\logs\TestLog20110105-1140.txt ********** Windows PowerShell Transcript End End time: 20110105114050 When I run the same script from another machine using below script I don't see any messages in the log file Invoke-command {powershell.exe -ExecutionPolicy Unrestricted -NoProfile -File C:\in ll\transcript-test.ps1} -computername box1 -credential $credential Contents of log file : ********** Windows PowerShell Transcript Start Start time: 20110105114201 Username : OX\qauser Machine : MODESIGNAU1 (Microsoft Windows NT 5.2.3790 Service Pack 2) ********** Windows PowerShell Transcript End End time: 20110105114201 Is there anyway to log the messages from the script to log file when invoked remotely ? Thanks! Sanjeev

    Read the article

  • What does upload in Google AppEngine app.yaml do?

    - by Great Turtle
    I am going through the various Google AppEngine tutorials sometimes, and I just noticed something odd in a StackOverflow question about favicon.ico - specifically this question: http://stackoverflow.com/questions/887328/favicon-ico-not-found-error-in-app-engine - url: /favicon.ico static_files: media/img/favicon.ico upload: media/img/favicon.ico - url: /robots.txt static_files: media/robots.txt upload: media/robots.txt All of the posters included an "upload:" line in their app.yaml definitions The application appears to work the same with or without the upload: line, and I have not seen any mention of it in the official documentation. Where is it used, or what difference does it make if this line is included or not?

    Read the article

  • Gracefully trap error on dos start cmd

    - by diehlted
    On a cmd prompt or bat file, I issue the following: start textpad myfile.txt and it works fine. If the program textpad does not exist on the computer, then an error sound and a popup occurs which the OK button must be pushed. I desire to trap this error so that I could do something like start textpad myfile.txt || start notepad myfile.txt where the || implies that if the start of textpad is not successful, then the start of notepad should occur. HOWEVER, I still get the error sound and requirement of hitting OK. My intent is to avoid the sound and the requirement of any user intervention. I have also tried the following bat approach below, to no avail. start textpad if not %ERRORLEVEL% == 0 GOTO END start notepad :END Any help would be great. thanks ted

    Read the article

  • Log4net appender filename issue

    - by JL
    I have an appender setup like this <appender name="Scheduler_Appender" type="log4net.Appender.RollingFileAppender"> <file value="c:\temp\ApplicationLog.txt"/> <rollingStyle value="Date"/> <datePattern value="yyyyMMdd"/> <appendToFile value="true"/> <staticLogFileName value="true"/> <layout type="MinLayout"> <locationInfo value="true"/> </layout> </appender> When the log file first gets created the file name is simply ApplicationLog.txt this is correct. However when the logging rolls - the filename that gets generated is ApplicationLog.txt20100323 (for example), and not ApplicationLog20100323.txt How can I change the configuration so files are rolled to [FileName][Date].[ext] rather than [FileName].[ext][Date] Thanks

    Read the article

  • how do you load files in windows phone 7? using XNA

    - by matt
    do you seriously have to make your own content pipeline project for every single type of file you want to load? Microsoft just seem to be pretending that the iphone doesn't exist (even though they are now paying devs to port between them). I'm trying to port my game from the iphone to winmo7, and I already have a nice asset pipeline set up for exporting textures in the exact format we want (16 bit fmts ect) I just want to be able to open a file and read it, just like I would on any other platform. I have tried System.IO.File.OpenText("atextfile.txt"), but it says that function is "RESTRICTED!!!!" I have tried just adding the txt file to the content project, setting its properties to "content" and "copy always" and then trying to open it doing this.Content.Load("atextfile.txt"); with and without the extension, says it can't find the file. EDIT: FYI, i'm using XNA, not Silverlight

    Read the article

  • I'd like to know why a function executes fine when called from x but not when called from y

    - by Roland
    When called from archive(), readcont(char *filename) executes fine! Called from runoptions() though, it fails to list the files "archived"! why is this? The program must run in terminal. Use -h as a parameter to view the usage. This program is written to "archive" text files into ".rldzip" files. readcont( char *x) should show the files archived in file (*x) a) Successful call Use the program to archive 3 text files: rldzip.exe a.txt b.txt c.txt FILEXY -a archive() will call readcont and it will work showing the files archived after the binary FILEXY will be created. b) Unsuccessful call After the file is created, use: rldzip.exe FILEXY.rldzip -v You can see that the function crashes! I'd like to know why is this happening! /* Sa se scrie un program care: a) arhiveaza fisiere b) dezarhiveaza fisierele athivate */ #include<stdio.h> #include<stdlib.h> #include<conio.h> #include<string.h> struct content{ char *text; char *flname; }*arc; FILE *f; void readcont(char *x){ FILE *p; if((p = fopen(x, "rb")) == NULL){ perror("Critical error: "); exit(EXIT_FAILURE); } content aux; int i; fread(&i, sizeof(int), 1, p); printf("\nFiles in %s \n\n", x); while(i-- >1 && fread(&aux, sizeof(struct content), 1, p) != 0) printf("%s \n", aux.flname); fclose(p); printf("\n\n"); } void archive(int argc, char **argv){ int i; char inttext[5000], textline[1000]; //Allocate dynamic memory for the content to be archived! arc = (content*)malloc(argc * sizeof(content)); for(i=1; i< argc; i++) { if((f = fopen(argv[i], "r")) == NULL){ printf("%s: ", argv[i]); perror(""); exit(EXIT_FAILURE); } while(!feof(f)){ fgets(textline, 5000, f); strcat(inttext, textline); } arc[i-1].text = (char*)malloc(strlen(inttext) + 1); strcpy(arc[i-1].text, inttext); arc[i-1].flname = (char*)malloc(strlen(argv[i]) + 1); strcpy(arc[i-1].flname, argv[i]); fclose(f); } char *filen; filen=(char*)malloc(strlen(argv[argc])+1+7); strcpy(filen, argv[argc]); strcat(filen, ".rldzip"); f = fopen(filen, "wb"); fwrite(&argc, sizeof(int), 1, f); fwrite(arc, sizeof(content), argc, f); fclose(f); printf("Success! "); for(i=1; i< argc; i++) { (i==argc-1)? printf("and %s ", argv[i]) : printf("%s ", argv[i]); } printf("compressed into %s", filen); readcont(filen); free(filen); } void help(char *v){ printf("\n\n----------------------RLDZIP----------------------\n\nUsage: \n\n Archive n files: \n\n%s $file[1] $file[2] ... $file[n] $output -a\n\nExample:\n%s a.txt b.txt c.txt output -a\n\n\n\nView files:\n\n %s $file.rldzip -v\n\nExample:\n %s fileE.rldzip -v\n\n", v, v, v, v); } void runoptions(int c, char **v){ int i; if(c < 2){ printf("Arguments missing! Use -h for help"); } else{ for(i=0; i<c; i++) if(strcmp(v[i], "-h") == 0){ help(v[0]); exit(2); } for(i=0; i<c; i++) if(strcmp(v[i], "-v") == 0){ if(c != 3){ printf("Arguments misused! Use -h for help"); exit(2); } else { printf("-%s-", v[1]); readcont(v[1]); } } } if(strcmp(v[c-1], "-a") == 0) archive(c-2, v); } main(int argc, char **argv) { runoptions(argc, argv); }

    Read the article

  • TFS no release folder in build folder

    - by brian b
    I have a tfs build that works fine on the client, but when executed on the server, no actual binaries get created. When I go to the folder: \[MyServer]\builds[BuildName], I see BuildLog.txt ErrorsWarningsLog.txt Release.txt I expect to see a big \Release folder full of my dlls, but I get nothing. The error log reports no problems up until we ask the build to copy the binaries to our staging server. If I comment those out, I get no errors. CustomizableOutDir is true, DropLocation is set to something sensible BuildDirectoryPath is set to something sensible But no matter what, I just don't get any dlls built. Our local TFS guy is baffled too. Any suggestions?

    Read the article

  • fortran error I/O

    - by jpcgandre
    I get this error when compiling: forrtl: severe (256): unformatted I/O to unit open for formatted transfers, unit 27, file C:\Abaqus_JOBS\w.txt The error occurs in the beginning of the analysis. At the start, the file w.txt is created but is empty. The error may be related to the fact that I want to read from an empty file. My code is: OPEN(27, FILE = "C:/Abaqus_JOBS/w.txt", status = "UNKNOWN") READ(27, *, iostat=stat) w IF (stat .NE. 0) CALL del_file(27, stat) SUBROUTINE del_file(uFile, stat) IMPLICIT NONE INTEGER uFile, stat C If the unit is not open, stat will be non-zero CLOSE(unit=uFile, status='delete', iostat=stat) END SUBROUTINE Ref: Close multiple files If you agree with my opion about the cause of the error, is there a way to solve it? Thanks

    Read the article

  • Regex problem ...

    - by carlos
    hello i have the next regex Dim origen As String = " /c /p:""c:\mis doc umentos\mis imagenes construida\archivo.txt"" /cid:45 423 /z:65 /a:23 /m:39 /t:45rt " Dim str As String = "(^|\s)/p:""\w:(\\(\w+[\s]*\w+)+)+\\\w+.\w+""(\s|$)" Dim ar As Integer Dim getfile As New Regex(str) Dim mgetfile As MatchCollection = getfile.Matches(origen) ar = mgetfile.Count When i evaluate this it works, and gets the /p:""c:\mis doc umentos\mis imagenes construida\archivo.txt"" that basically is the path to a file. But if I change the origen string to Dim origen As String = " /c /p:""c:\mis doc umentos\mis imagenes construida\archivo.txt""/cid:45 423 /z:65 /a:23 /m:39 /t:45rt " Check that the end of the file is follow by "/cid:45" whitchs makes de patter invalid, but insted of getting a mgetfile.count = 0 the program is block, if i make a debug I got a property evaluation failed. Thanks for your comments !!!

    Read the article

  • Saving CFPropertyLists To Users Folder

    - by stephen blinkhorn
    I'm trying to save a CFPropertyList to a location in the user's home folder. Using the code below I'm getting errorCode = -10 (unknown error). CFURLRef fileURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, CFSTR("~/testfile.txt"), kCFURLPOSIXPathStyle, false ); SInt32 errorCode; Boolean status = CFURLWriteDataAndPropertiesToResource(fileURL, xmlData, NULL, &errorCode); If I change the path to something like "/testfile.txt" without the '~' then everything works. How can one save a property list to the current user's home folder? Must one obtain the user's name first and include it in the path such as /users/toffler/testfile.txt?

    Read the article

  • Decoding and caching json every 60 minutes

    - by Gary
    Hi, How do I do this on a php webpage? I want to get and decode a json string and display the results as html on my page, however, I don't want it hotlinking back to the source. If I could write the decoded string to a txt file say weather.txt on the server and keep the html formatting and do it so that the page won't fetch the json script until 60 minutes has passed since the last time it was fetched regardless of how many times the page is opened during that 60 minute period and the weather.txt is viewed. All I can come up with is a simple script that hotlinks, everything else I have tried simply failed. $file = file_get_contents('http://sample.com/weather'); $out = (json_decode($file)); echo $out-mainText; Will appreciate any help with this.

    Read the article

  • ASP.NET DropDownList Replacement

    - by user302004
    Currently, I'm populating a drop down list when a file is created in a configurable folder. if (!downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.FullName)) Then, I add the file and remove "No Responses Available". However, if the same file is resubmitted (i.e., the file name is the same but the timestamp is different), then I want to remove the older entry and replace it with a new entry in the drop down list. I have the filename, so I go into the "else" block from the line of code above. From there, I'm checking to see if I have the same filename and a different creation time. if (downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.FullName) && downloadRspDropDown.Items.Contains(new ListItem(txt, fileData.CreationTime) From here, I want to find the position, remove it, and add the new text. This approach isn't working. Can anyone offer an alternate approach?

    Read the article

  • Using PowerShell class to invoke a "[namespace.class]::method" style command

    - by Marco
    Hello, I created a powershell object via .net to invoke commands. When I invoke normal commands like 'Get-Process' I had no problems: ps.AddCommand("Get-Process").AddParameter(...).Invoke() but I'm not able to invoke a .net method with the syntax "[namespace.class]::method", just to make an example to invoke [System.IO.File]::Exists("c:\boo.txt"). I tried with ps.AddCommand("[System.IO.File]::Exists(\"c:\\boo.txt\")").Invoke() ps.AddCommand("[System.IO.File]::Exists").AddArgument("c:\\boo.txt").Invoke() and some others. It always throws an exception which says that the command specified is not recognized. There is a way to invoke that type of command? Thanks

    Read the article

  • Why I am not that user after I load cookies?

    - by MoreFreeze
    I want to grab some site data, but it must be a login account. So I register it and login, I found some API about this site that can be used to grab data. I use this Chrome plugin "cookie.txt export" export cookies.txt, I copy all content it export and use following cmd like wget -x --load-cookies cookies.txt http://www.example.com/api/name=xxxx but it doesn't work. It download the page that need I login. So I think this site has some other verification strategy, how can I pass it? Whether I must input in browser manually?

    Read the article

  • Running "source" from python

    - by R S
    Hello, I have a file a.txt with lines of commands I want to run, say: echo 1 echo 2 echo 3 If I was on csh (unix), I would have done source a.txt and it would run. From python I want to run os.execl with it, however I get: >>> os.execl("source", "a.txt") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.5/os.py", line 322, in execl execv(file, args) OSError: [Errno 2] No such file or directory How to do it?

    Read the article

< Previous Page | 38 39 40 41 42 43 44 45 46 47 48 49  | Next Page >