filenames

File name … differs from already included file name … only in casing

不打扰是莪最后的温柔 提交于 2020-05-29 02:36:58
问题 I’m getting the following error in VSCode in my Angular 6 application: ERROR in src/app/providers/dynamic-data/dynamic-data.service.ts(5,26): error TS1149: File name '/Users/gibranshah/repos/eva/EVA/src/app/model/endpoint.ts' differs from already included file name '/Users/gibranshah/repos/eva/EVA/src/app/model/Endpoint.ts' only in casing. It’s telling me that this line in dynamic-data.service.ts: import { Endpoint } from '../../model/endpoint'; …refers to a file whose name is Endpoint.ts.

BASH - file selection by multiple patterns in zenity

蓝咒 提交于 2020-05-13 05:48:08
问题 Im pretty new to zenity and bash. Im trying to make file selection window that will display only the ones with .ogg, .aac and .wav extension. I tried this, but it doesn't work. option=`zenity --file-selection --file-filter=*.ogg | *.aac` For one extension it's working as intented: option=`zenity --file-selection --file-filter=*.ogg` Zenity man provides information: --file-filter=NAME | PATTERN1 PATTERN2 Sets a filename filter I dont really understand how am I supposed to use it. Can someone

Replacing dots in a filename

ε祈祈猫儿з 提交于 2020-02-29 06:35:53
问题 How should I replace dots with underlines without losing the file extension? $str = $_FILES['files']['name']; //file.name.word.jpg $ext = end(explode('.', $str)); $filename = explode('.', $str); //output file_name_word.jpg ps: it needs to be before upload.. if the user uploads a file with dots it must to be renamed and inserted on db 回答1: Use pathinfo() to extract the file name and str_replace() to remove all the dots out of it. $filename = pathinfo('/path/to/your/file'); echo str_replace('.'

Issues in log4net with dynamic filenaming in RollingFileAppender

强颜欢笑 提交于 2020-02-22 06:17:26
问题 I have 3 appenders in my config file for creating 3 different types of logs. I am using dynamic naming of file in each of the 3 appenders by setting the global context properties. In some cases, i need to set the log file name dynamically for just 1 appender. When i set the file name for just 1 appender, it creates another file named "null" with no data in addition to the actual logfile whose name has been set dynamically . I have created the config file as shown. <appender name=

Get bitmap file name

99封情书 提交于 2020-02-01 03:11:53
问题 I use this line below for create my Bitmap: Bitmap b = new Bitmap(@"C:\<file name>"); After I modify this bitmap and I want to save it as in line below: b.Save(@"C:\\<other file name>") My question is - how to get the file name bitmap from property. Simply put, I need to save the bitmap with the same name with whom I had initiated it. Thanks 回答1: Perhaps you can do this with Metadata - but I'm not familiar with this subject so I'm not completely sure it's possible, nor do I how to do it. What

Get bitmap file name

拈花ヽ惹草 提交于 2020-02-01 03:11:06
问题 I use this line below for create my Bitmap: Bitmap b = new Bitmap(@"C:\<file name>"); After I modify this bitmap and I want to save it as in line below: b.Save(@"C:\\<other file name>") My question is - how to get the file name bitmap from property. Simply put, I need to save the bitmap with the same name with whom I had initiated it. Thanks 回答1: Perhaps you can do this with Metadata - but I'm not familiar with this subject so I'm not completely sure it's possible, nor do I how to do it. What

What is the best way to combine a path and a filename in C#/.NET?

空扰寡人 提交于 2020-01-30 15:22:48
问题 What is the best way to combine a path with a filename? That is, given c:\foo and bar.txt , I want c:\foo\bar.txt . Given c:\foo and ..\bar.txt , I want either an error or c:\foo\bar.txt (so I cannot use Path.Combine() directly). Similarly for c:\foo and bar/baz.txt , I want an error or c:\foo\baz.txt (not c:\foo\bar\baz.txt ). I realize, I could check that the filename does not contain '\' or '/', but is that enough? If not, what is the correct check? 回答1: If you want "bad" filenames to

Add index to filename for existing file (file.txt => file_1.txt)

*爱你&永不变心* 提交于 2020-01-30 07:42:50
问题 I want to add an index to a filename if the file already exists, so that I don't overwrite it. Like if I have a file myfile.txt and same time myfile.txt exists in destination folder - I need to copy my file with name myfile_1.txt And same time if I have a file myfile.txt , but destintation folder contains myfile.txt and myfile_1.txt - generated filename has to be myfile_2.txt So the functionality is very similar to the creation of folders in Microsoft operating systems. What's the best

Add index to filename for existing file (file.txt => file_1.txt)

不想你离开。 提交于 2020-01-30 07:41:50
问题 I want to add an index to a filename if the file already exists, so that I don't overwrite it. Like if I have a file myfile.txt and same time myfile.txt exists in destination folder - I need to copy my file with name myfile_1.txt And same time if I have a file myfile.txt , but destintation folder contains myfile.txt and myfile_1.txt - generated filename has to be myfile_2.txt So the functionality is very similar to the creation of folders in Microsoft operating systems. What's the best

Getting filename from BufferedImage

扶醉桌前 提交于 2020-01-24 05:21:24
问题 Is there a way to get the filename from a BufferedImage? I don't seem to see any methods for it. 回答1: A BufferedImage doesn't necessarily have to be backed by a file. It could be a byte array in a database, or even backed by a stream. 回答2: A BufferedImage is not necessarily associated with a file. Just as you can read a String from a file, but there is no getFilename() method on String objects, there is no such method on BufferedImage . 来源: https://stackoverflow.com/questions/4611303/getting