小编jao*_*jao的帖子

Bash - 按名称和大小列出和排序文件及其大小


我试图找出如何按名称和大小排序文件列表.
如何使用" du -a " 按文件名和大小排序而不显示目录?

使用" du -a "

1   ./locatedFiles
0   ./testDir/j.smith.c
0   ./testDir/j.smith
1   ./testDir/sampleFunc/arrays
2   ./testDir/sampleFunc
0   ./testDir/j.smith.txt
0   ./testDir/testing
0   ./testDir/test2
0   ./testDir/test3
0   ./testDir/test1
0   ./testDir/first/j.smith
0   ./testDir/first/test
1   ./testDir/first
1   ./testDir/second
1   ./testDir/third
6   ./testDir
Run Code Online (Sandbox Code Playgroud)

如何列出所有没有目录的文件,添加文件大小,先按文件名排序,然后按大小排序?

谢谢你的帮助

sorting size bash

5
推荐指数
2
解决办法
2万
查看次数

获取邮件应用程序以识别回复电子邮件php

我无法弄清楚如何获取邮件应用程序(谷歌邮件除外)以识别电子邮件是作为"回复"发送的,并将这些电子邮件组合在一起作为发送和回复电子邮件的列表.

例如,使用php,如果我使用

$header = "From: Testing <email@mail.com>\r\n" .
                "Reply-To: email@mail.com\r\n" . 
                "X-Mailer: PHP/" . phpversion();

$to = "email@mail.com";

$message = "This is a reply";
$subject = "test 123";  
$success = mail($to, $subject, $message, $header);
Run Code Online (Sandbox Code Playgroud)


并发送两次,我收到两封单独的电子邮件.而不是由两封电子邮件组成的一封电子邮件.
有没有办法将它们组合在一起,因为一封电子邮件回复给另一封电子邮件,或者我做错了什么?
我已经阅读了php mail()文档和多个网页,解释了php邮件是如何工作的,仍然无法让电子邮件相互回复.

感谢您的时间和帮助!

php email-headers

4
推荐指数
1
解决办法
1626
查看次数

Flex/ActionScript中的字典

有没有办法在Flex应用程序中使用ActionScript实现字典.例如,我想存储这样的东西.

public var orientation:ArrayCollection = new ArrayCollection([
    {a: new Direction('0','0','b','0')},
    {b: new Direction('a','c','0','h')},
    {c: new Direction('0','b','d','e')},
    {d: new Direction('c','0','0','0')},
    {e: new Direction('f','g','0','c')},
    {f: new Direction('0','0','e','0')},
    {g: new Direction('0','0','0','e')},
    {h: new Direction('0','b','0','i')},
    {i: new Direction('l','h','j','m')},
    {j: new Direction('i','k','0','0')},
    {k: new Direction('0','0','0','j')},
    {l: new Direction('0','0','i','0')},
    {m: new Direction('0','i','0','0')}
]);
Run Code Online (Sandbox Code Playgroud)

所以,而不是

orientation.getItemAt(3).north
Run Code Online (Sandbox Code Playgroud)

我可以去做类似的事情

orientation.getItemAt('d')north
Run Code Online (Sandbox Code Playgroud)

没有得到以下错误

Implicit coercion of a value of type String to an unrelated type int.
Run Code Online (Sandbox Code Playgroud)

谢谢您的帮助

apache-flex dictionary actionscript-3

2
推荐指数
1
解决办法
6206
查看次数

存储和检索Python列表中的对象

我是python的新手,很难在Python中使用数组或列表来存储和访问对象.

我尝试过这样的事情:

class NodeInfo:
    def __init__(self, left, value, right):
        self.l = left
        self.r = right
        self.v = value

tree[0] = NodeInfo(0,1,2)

tree[0].l = 5
tree[0].r = 6
tree[0].v = 7
Run Code Online (Sandbox Code Playgroud)

当我尝试为变量赋值或尝试从变量中读取时,我收到以下错误:

tree[0] = NodeInfo(0,1,2)
NameError: name 'tree' is not defined
Run Code Online (Sandbox Code Playgroud)

我做错了什么,或者是否有不同的方法从Python中的数组或列表中分配和读取对象.

python arrays store list object

1
推荐指数
1
解决办法
3750
查看次数