filenames

R - How to choose files by dates in file names?

两盒软妹~` 提交于 2019-12-11 07:37:24
问题 its pretty hard to find a title for my question because its very specific. My problem is: I have around 9000 files of data collected over different periods. The filenames contain that periods and I only want to load that files into R, that contain at least 17/18 years of data collection. I created a testlist to show what I mean: list = c("AT0ACH10000700100dymax.1-1-1993.31-12-2003", "AT0ILL10000700500dymax.1-1-1990.31-12-2011", "AT0PIL10000700500dymax.1-1-1992.31-12-2011",

QFile::open fails with unicode filename

一世执手 提交于 2019-12-11 06:48:58
问题 I want to open a file with QFile::Open where my file name is unicode: QString fname(QFile::decodeName("D:/أحدالأنشطة.txt")); QFile qFile(fname); bool b=qFile.open(QIODevice::ReadOnly); if(b) { FILE* filedesc = fdopen(qFile.handle(), "rb"); if(filedesc!=NULL) { char* nb=(char*)malloc(2*sizeof(char)); qDebug()<<"opened "; size_t size=fread(nb,sizeof(char),2,filedesc); fclose(filedesc); qDebug()<<"filedesc closed size "<<size<<"nb "<<QString::fromAscii(nb,2); nb=NULL; free(nb); }else qDebug()<<

How Get File Name from URL ,C#/.NET?

我只是一个虾纸丫 提交于 2019-12-11 06:48:55
问题 How can I get a file name if the address ends with something like this. /download/file/36fdd4aebda3819d329640ce75755657bc0c0d4c6811432b3bb6aac321dc78d/ ? This is the simplified code example, void geckoWebBrowser1_Navigating(object sender, GeckoNavigatingEventArgs e) { if (e.Uri.AbsolutePath.Contains("/file/")) { MyUrl = e.Uri.ToString(); // and here I tried different codes construstors, methods but I can not get the filename } if (e.Uri.Segments[e.Uri.Segments.Length - 1].EndsWith(".exe")) {

Gnuwin32 port of “find”?

。_饼干妹妹 提交于 2019-12-11 06:22:06
问题 Is there a problem with the Gnuwin32 port of "find"? It sort of works on my Windows XP command line, but I get blank stares when I try using file name pattern matching function. It's from "findutils-4.2.20" package. Had to rename to "gfind.exe" so Windows wouldn't confuse with CMD.EXE's "find". Some samples from my Windows console: C:\PROGRA~1\GnuWin32\doc\findutils\4.2.20\findutils-4.2.20>gfind . . ./find.chm ./find.dvi.gz ./find.GID ./find.hlp ./find.html ./find.pdf ./find.ps.gz That works.

Yeoman prompt: how generate a valid filename from a string?

邮差的信 提交于 2019-12-11 06:15:59
问题 Is there a method implemented in Yeoman or in Node to generate a valid filename from a string? My aim is to replace accented letters by normal letters, spaces by dashes, etc. 回答1: Basically, all you need is a function that removes special characters and perhaps replaces them using an arbitrary system. One option was already named by passy, which is to make use of: this._.dasherize(str) Nevertheless, there are some additional options you might use. E.g., you might check out the underscore

PHP: SQL value as filename

爷,独闯天下 提交于 2019-12-11 05:54:46
问题 I have this code: <?php $servername = "Jarvis"; $username = "TonyStark"; $password = "iLoveIronMan"; $dbname = "StarkCompany"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "SELECT o.order_id, o.customer_id, op.quantity, op.model FROM oc_order o INNER JOIN oc_order_product op ON o.order_id = op.order_id INNER JOIN oc_product p ON op.product_id = p

Embedded linux filename length

烂漫一生 提交于 2019-12-11 05:09:38
问题 I am using an arm development platform. There I installed udev and it works perfect. But when I mount a pen drive and see the file content all files and folders with names having more than 8 chars have been replaced with "~" char. eg: myfilename.mp3 is replaced with myfile~e.mp3 Before udev installation it worked well. (All file names appeared normally). What should I do? thank you. 回答1: This is not related to filename length limitation in Linux. This happened because this drive was mounted

How can I check if filename contains a portion of a string in vb.net

五迷三道 提交于 2019-12-11 04:51:43
问题 I have a userform in 2008 vb express edition. A part number is created from user input via a concat string. I want to then check if a certain portion of the part number exists in the existing file names in a directory. Below is a more detailed explanation. This is my code for creating a part number from the user input on the form. L_PartNo.Text = String.Concat(CB_Type.Text, CB_Face.Text, "(", T_Width.Text, "x", T_Height.Text, ")", mount, T_Qty.Text, weep, serv) I then have the following code

With php cURL get filename from file header

一个人想着一个人 提交于 2019-12-11 03:51:10
问题 I have this php cURL function: function curl_login($url,$data,$proxy,$proxystatus){ $fp = fopen("cookietlt.txt", "w"); fclose($fp); $login = curl_init(); curl_setopt($login, CURLOPT_COOKIEJAR, "cookie.txt"); curl_setopt($login, CURLOPT_COOKIEFILE, "cookie.txt"); curl_setopt($login, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)"); curl_setopt($login, CURLOPT_TIMEOUT, 40); curl_setopt($login, CURLOPT_RETURNTRANSFER, TRUE); if ($proxystatus == 'on') { curl_setopt($login

How to separate filename from path? basename() versus preg_split() with array_pop()

℡╲_俬逩灬. 提交于 2019-12-11 03:45:36
问题 Why use basename() in PHP scripts if what this function is actually doing may be written in 2 lines: $subFolders = preg_split("!\\\|\\/!ui", $path); // explode on `\` or `/` $name = array_pop($subFolder); // extract last element's value (filename) Am I missing something? However I guess this code above may not work correctly if file name has some \ or / in it. But that's not possible, right? 回答1: PHP may run on many different systems with many different filesystems and naming conventions.