w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
  Home » FILE » Page 1
linux kernel: how can I copy files before panic?
Only a Kernel panic occurs its possible that in-core data structures are already corrupted and unreliable. Ideally, your kernel is not expected to panic, if the version you are using is a stable and tested release. I would recommend capturing a vmcore using crash tool and working with the vendor on the root cause of the kernel panic. However, if you are referring to an abrupt system shutdown dew

Categories : File

Developing With Multiple Computers
The easiest way is probably to get a Dropbox account (https://www.dropbox.com). Install the dropbox desktop app on both computers and specify the Dropbox folder location where XAMPP lives (move it out of the way first and then copy it back on the most current computer). XAMPP configuration files specific to the local computer may need to be separated in some way.

Categories : File

formatting a text file before mailing it in shell script
You can pipe your output to: awk '{for (i=1; i<=NF; i++) printf "%s%s", $i, (i%4==0)?ORS:OFS}' That will give: 002506960 830148XXM ILD514CSE 0000000 004129197 737620BQJ LCT453INN 0000000 000130122 984062NOR YUR416XER 0000480 000134266 095151MET RUB648DEA 0000210 000232322 941669CAR DET672KEH 0000600 000232320 941669CAR DET672KEH 0071014 000232325 941669CAR DET672KEH 0071014

Categories : File

Reading text file line by line NASM
use mmap syscall, read entire file to memory and search for 0x0A sequence. This is the ASCII code for end of line. Perhaps usefull too to check for 0x0D (in case you are dealing with windows text files. There the sequence 0x0A,0x0D indicates an new line and thus an end of line. mmap will try to allocate memory for you without the overhead of administration for you. Otherwise determine the file len

Categories : File

Clojure, raynes.fs, iterate-dir: a cryptic file-related data structure
The File objects are standard java.io.File instances. You can look up java.io.File in javadoc to find the operations that can be done on a File. Like most java classes, it has no Clojure read support, so it must be created via constructor calls (ie. (java.io.File. ".") to get a File for the current directory). As the doc for iterate-dir mentions, it will return a sequence of every node in the t

Categories : File

In AppleScript, how do I copy a directory's contents to another directory without deleting the destination directory's existing files?
This is far to confusing to explain when you are using the same names. It's like trying to understand Who's on first for the first time. Try using different folder names until you can get it working then worry about what things are called. To try and help the only thing I can say is if the files have the same exact names and you use the "with replacing" it will overwrite what ever is in the desti

Categories : File

Apple Swift File IO Operations
Is there an Operations with which I can read single characters? Swift code can use any of the usual frameworks (Foundation, Cocoa, Cocoa Touch, etc.), and that alone gives you a great many ways to read and write files, usually at a higher level than a character at a time. If you want lower level file I/O you can use NSInputStream and NSOutputStream as Martin R. suggests, or you can use NSData

Categories : File

Receiving a file via XModem on HyperTerminal
XMODEM transfer is initiated by the receiver rather than the sender. The transfer starts when the receiving device sends an SOH (XMODEM) or 'C' (XMODEM-CRC/1K). If the receiving end does not initiate the transfer, no transfer will occur. You may find that you have to start the transfer from the sending end, then initiate the transfer at the receiver. Alternatively when waiting for the transfer

Categories : File

How to convert '¿' special character in unix
Your file is basically fine, it's in proper UTF-8 and the character you are looking at is an INVERTED QUESTION MARK (U+00BF) (though you seem to be using some legacy 8-bit character set to view the file, and the output of od -x is word-oriented little-endian, so you get the hex backwards -- the sequence is 0xC2 0xBF, not the other way around). This article explains that when Oracle tries to expor

Categories : File

filp_open not working with O_RDWR or O_WRONLY
I could not understand why're you turning on address conversion before error checking. You've called filp_open in kernel address space(i assume get_ds takes you there) and hence it's practice to do error checks in same space. This might be the reason filp gets translated to some random address and why device boot sequence is breaking. If issue persists even after this has been looked into, target

Categories : File

how to find files on server, which came on specific time period say 1 jan to 31 march
Can I answer with a command without grep? find /path -type f -daystart -mtime -$(( ($(date +%s) - $(date +%s -d '2015-01-01 -1 day')) /60/60/24 )) -mtime +$(( ($(date +%s) - $(date +%s -d '2015-03-31 23:59:59')) /60/60/24 )) This will find any file in the /path directory whose modification time is between 2015-01-01 00:00:00 and 2015-03-31 23:59:59 expressed as days ago. I.e. today is 20

Categories : File

How to create a file object in python without using open()
The StringIO class is a file-like class, which stores the contents in memory. You can create an instance with your content, and pass it to doSomething(strio). From the docs: import StringIO output = StringIO.StringIO() output.write('First line. ') print >>output, 'Second line.'

Categories : File

Batch File error
You can't cd to a file, just a directory. Since these are in the System32 folder, they're already in the system path so you don't even need to cd to that directory. @echo off CLS :Menu ECHO. ECHO............................................... ECHO PRESS 1, 2 to select your task; or 3 to exit ECHO............................................... EcHO. ECHO 1 - OPEN NOTEPAD ECHO 2 - OPEN WRITE ECHO

Categories : File

InnoSetup: dll can't be deleted at uninstall
You need to unload the library before deleting. Use the UnloadDLL function for that (the help contains an example just for this case). Missing that leads the DeleteFile function to fail in your code. For your uninstaller write this instead: procedure LoadVCLStyle_UnInstall(VClStyleFile: String); external 'LoadVCLStyleA@{app}unins000.dll stdcall uninstallonly'; procedure UnLoadVCLStyles_UnInstall;

Categories : File

What is the `file` URI scheme in Puppet?
The file path is always absolute. It refers to a file on the system that runs the catalog. This is the agent system, or a machine on which you invoke puppet apply. file { '/etc/motd': source => "file:///media/shared-storage0/motd/${fqdn}.motd"; } For example, the above resource will make the agent sync motd contents and file metadata from a shared storage. You can omit the file:

Categories : File

How to load XML file online and process?
Try this: private static void downloadFile(String url, String filePath) { try { File outputFile = new File(filePath); URL u = new URL(url); URLConnection conn = u.openConnection(); int contentLength = conn.getContentLength(); DataInputStream stream = new DataInputStream(u.openStream()); byte[] buffer = new byte[contentLength]; stream.r

Categories : File

Check if all files exist in a directory batch scripting
Try this; @echo OFF for %%a in (eim_account.dat eim_contact.dat eim_employee.dat eim_accnt_dtl.dat eim_fn_asset.dat) do ( if NOT exist C:TestScript\%%a echo %%a doesnt exist ) pause I assumed C:TestScript is where your *.dat files are.

Categories : File

Batch File if command; is there any way to complete a certain task if a variable includes a certain character?
The VBA command for finding a character in a string is INSTR so if you are looking for a . for example then in VBA could could use INSTR. There are two ways to do what you want: Write a QBASIC or VBscript version of INSTR and then call that from a BATCH script Write a batch script that does INSTR. If you are interested in the second one look at http://www.dostips.com/forum/viewtopic.php?f=3&a

Categories : File

NSIS simple copy one file from another folder in program files directory to installation dir not working
You need to change: CopyFiles "$PROGRAMFILESMyAppVer1.0licensesome_license.slc" $INSTDIR/license/some_license.slc" To: CopyFiles "$PROGRAMFILESMyAppVer1.0licensesome_license.slc" $INSTDIRlicensesome_license.slc"

Categories : File

How do I enable 'Access-Control-Allow-Origin' headers for static files in Yesod?
This could be accomplished by using a WAI middleware that adds this header. That middleware would be added in your Application module. There are a number of middlewares in the wai-extra package that can be used as an example of how to do this. More generally: this is probably a feature worth building into yesod-static itself. Can you open up a Github issue about it?

Categories : File

How would you add the name of a variable to a file name in Python 3.4?
You should consider reading the Python tutorial - string concatenation is a basic topic. secondFileNamePart = '7' file = open('test'+secondFileNamePart+'.txt', 'w')

Categories : File

Set default directory to browse for file upload
This question reminds me of this question. With HTML and Javscript, I do not believe it is possible.

Categories : File

Psexec to execute batch file,which calls a vbscript,and this vbscript executes test case using qtp on a remote machine
PSEXEC \<Targetsystem> -u domainusername -p password -i -w D: cmd.exe /c abc.bat or place the abc.bat in the same folder as psexec and execute this one: PSEXEC \<Targetsystem> -u domainusername -p password -i -c -f abc.bat (P.S.: a look at PSEXEC /? may help ;))

Categories : File

Google Api - Key with file:// protocol
You don't need to use the map api key with file:// protocol. Google checks the web site domain, but file:// protocol does not have it, so you can skip it. By the way, phonegap-googlemaps-plugin brings native Google Maps view into your Cordova app. It's better performance (although less functions than Google Maps JS API v3). Just for your information.

Categories : File

Programmers should avoid writing to the local file system in cloud?
In short, yes, you probably should avoid it. Most cloud providers - just like Cloud Foundry - recommend that you only keep ephemeral data (like caches) on your local disk, since a single machine may fail or reboot for upgrade or re-balancing at any time and you don't necessarily get the same machine back after a restart. Many providers provide alternate SAN/SMB mountable disks which you can use

Categories : File

Batch Create folders based first part filename, move files into that folder
i need some more informations... is the directory structure like "2014, 11, 01053910001.1.D799D" or something like "2014111053910001.1.D799D"? means "D799D" the extension? does the client identifier always contain 10 digits/letters? do you know if there are duplicate filenames to be aware of? where should the target-folder be created? Kind regards Edit: Save this to a File (e.g. "Cl

Categories : File

Delete AF_UNIX file automatically?
No, there is not. You can however remove it when you start up, before you (re)create the socket. On e.g. linux you can avoid creating an entry in the file system by having the sun_path start with a 0 byte - this creates an "abstract" socket that isn't visible in the filsystem - see the mentioned man page for more info, and thus vanishes when the process exits. It's not entierly clear to me whet

Categories : File

nsRichEdit::Load cannot load license text
${SOURCEFOLDER} is a compile time define. You must extract the license somewhere on the end-users machine: nsDialogs::CreateControl RichEdit20A ${ES_READONLY}|${WS_VISIBLE}|${WS_CHILD}|${WS_TABSTOP}|${WS_VSCROLL}|${ES_MULTILINE}|${ES_WANTRETURN} ${WS_EX_STATICEDGE} 17.77u 7.38u 261.32u 80u "" Pop $RichTextLicense File "/oname=$pluginsdirgpl.txt" "${SOURCEFOLDER}GPL.txt" nsRichEdit::Load $RichTex

Categories : File

strip the file path in Batch script
@ECHO Off SETLOCAL SET "SourceFilePath=D:ProjectsCodeSiteBeanchGVdllfunctiondll_featurefilename.cpp" SET /a count=0 :loop FOR %%a IN ("%sourcefilepath%") DO SET "part%count%=%%~nxa"&SET "sourcefilepath=%%~dpa" IF DEFINED part%count% SET /a count +=1&SET "sourcefilepath=%sourcefilepath:~,-1%"&GOTO loop SET part SET count GOTO :EOF Provided you don'y have weirdo characters in the start

Categories : File

Code is not detecting the right amount in a file
The principal problem was with the elif statements: elif data[3] == 'safe' and data[1] == 'large': large_safe = large_safe + 1 elif data[0] == 'brown' and data[3] == 'dangerous': brown_dangerous = brown_dangerous + 1 elif (data[3] == 'safe') and (data[0] == 'red' or data[2] == 'hard'): With this logic, any animal that is large and safe could never be counted also

Categories : File

File IO - Calculate Grades
Here is a start (untested) with a couple of pieces left for you. with open("score.txt", "r") as imp, open("score_report.txt", "w") as out: n, class_sum = 0, 0 for lime in imp: items = line.split() if not len(items) % 2: raise ValueError('line has even number of items') it = iter(items) name = next(it) # cannot fail because odd number of items

Categories : File

Batch: Compare File Sizes
The FOR loop expansion z will return the size of a file (e.g. %~zl). Delayed variable expansion is a requirement for this script. This particular script only copies if the file is larger, but you could easily change it to copy the file if the size is at all different by changing GTR to NEQ. @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION SET REMOTE_DIR=\SERVERsharepath ofiles SET LOCAL_DIR=. FOR /F %

Categories : File

Write a variable with special character to a file in batch
One possible way: set /p "filemask=Enter Your Filemask:" set "filemask=%filemask:>=^>%" set "filemask=%filemask:<=^<%" echo get %filemask% >> winscp.txt OR setlocal enableDelayedExpansion set /p "filemask=Enter Your Filemask:" echo get !filemask! >> winscp.txt

Categories : File

How to add a files to a zipped file but to it's subfolders with command prompt?
First, if you are trying to run this from the command-line and not the GUI, you should use rar instead of Winrar, since Winrar starts the WinRaR GUI. Your command, a -u ZippedFile.zip fileToUpdate.xml, assumes a single file to update that's located in same directory as the archive. That's why it doesn't get updated to the ETC folder, even though it may be located there. One way to get this to wo

Categories : File

Run a script on multiple files using numbers in their names
You might do this: for ((i=0; i <= 100; i++)); do name=DUO_BM_${i}.txt input=/home/arashsa/duo-bokmaal/Bokmaal/$name if test -e "$input"; then /corpora/bokm/tools/The-Oslo-Bergen-Tagger/./tag-lbk.sh "$input" > "/home/arashsa/duo-bokmaal-obt/$name" fi done

Categories : File

C reading file using ./a.out
I'm having the exact same problem. Tried every method I could find to eat the remaining input in the buffer, but it never ends. Got it to work using fopen and fscanf, but the prof. said he prefers the code using a.out < filename

Categories : File

hive command in bash script won't load file into table
Filename should be placed inside '' : load data local inpath 'foo.csv' into table mytable In your script you should probably escape these symbols so you won't get another parse exception. Also, look at Language Manual on loading

Categories : File

Write variable to a file in Ansible
You could use the copy module, with the content parameter: - copy: content="{{ your_json_feed }}" dest=/path/to/destination/file The docs here: copy module

Categories : File

Bulk rename files ascending in number
Here's one way using BASH: #!/bin/sh counter="$(basename /path/to/file/5000.swf ".swf")" for i in /path/to/random/files/*.swf; do ((counter++)) mv "$i" "$counter.swf"; done

Categories : File




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.