首页 \ 问答 \ 如何恢复FileZilla的旧主题?(How do I restore the old theme of FileZilla?)

如何恢复FileZilla的旧主题?(How do I restore the old theme of FileZilla?)

我最近注意到我升级的FileZilla不再具有这个主题:

旧的FileZilla主题

而是这个主题:

新的FileZilla主题

我浏览了设置中的所有主题:

主题列表

而且没有一个匹配。 是否可以从旧图像创建自己的主题?


I recently noticed that my upgraded FileZilla no longer has this theme:

old FileZilla theme

But rather this theme:

new FileZilla theme

I went through all of the themes in the settings:

theme list

And none of them match. Is it possible to create my own theme from the old images?


原文:https://stackoverflow.com/questions/41255969
更新时间:2023-07-05 13:07

最满意答案

测试它是成功还是失败:

hour = -1;   // So you can detect afterwards if they never succeeded at all

while ( 1 == scanf("%d", &hour) )
{
    if ( hour >= MIN_HOUR && hour <= MAX_HOUR )
         break;

    printf("Invalid hour input, try again...");
}

例如,如果他们输入"hello" ,该版本将会中断。 如果你想在输入垃圾后继续询问它们,那么你必须清除流中的所有垃圾,例如:

for (;;)
{
    int result = scanf("%d", &hour);

    if ( result == EOF )
    {
        hour = -1;
        break;
    }

    if ( result != 1 )
    {
    // consume garbage which will end in a newline
        for (int ch; (ch = getchar()) != EOF && ch != '\n'; ) {}
        continue;
    }

    if ( hour >= MIN_HOUR && hour <= MAX_HOUR )
         break;

    printf("Invalid hour input, try again...");
}

在C中执行强大的流输入并不简单!


Test whether it succeeded or failed:

hour = -1;   // So you can detect afterwards if they never succeeded at all

while ( 1 == scanf("%d", &hour) )
{
    if ( hour >= MIN_HOUR && hour <= MAX_HOUR )
         break;

    printf("Invalid hour input, try again...");
}

That version will break if they type in "hello", for example. If you want to keep asking them after they type in garbage, then you have to clear all the garbage from the stream, e.g.:

for (;;)
{
    int result = scanf("%d", &hour);

    if ( result == EOF )
    {
        hour = -1;
        break;
    }

    if ( result != 1 )
    {
    // consume garbage which will end in a newline
        for (int ch; (ch = getchar()) != EOF && ch != '\n'; ) {}
        continue;
    }

    if ( hour >= MIN_HOUR && hour <= MAX_HOUR )
         break;

    printf("Invalid hour input, try again...");
}

It's not straightforward to do robust stream input in C!

相关问答

更多
  • 每1000个值后循环将停止。 #include #include void main() { //Short int is declared intentionally short int d=0; char i; //Infinite loop is created intentionally for(d=0; ;d++) { //printing value printf("\n%d",d ...
  • 也许以下程序将帮助您可视化正在发生的事情: #include int main(void) { int ar[10], br[2], i; printf("Enter 12 numbers: "); fflush(stdout); for( i = 0; i < 10; ++i ) { scanf("%d", &ar[i]); } printf("We've read the first 10, let's print ...
  • 定义应该是 char命令[100]; 而不是char *命令[100] - 这是一个包含100个char指针的数组。 scanf()也不容易使用,我会使用fgets(command, sizeof(command), stdin); 然后删除换行符。 while ( 1 ) { char command[100]; printf("---| "); scanf( "%s", command); printf("%s\n",command); } The definition ...
  • 这是int的错误格式说明符:应该是"%d" 。 它试图将一个字符串读入一个int变量,可能会覆盖内存。 当指定"%s" ,所有输入将被读取,因此scanf()返回一个大于零的值。 That is the incorrect format specifier for an int: should be "%d". It is attempting to read a string into an int variable, probably overwriting memory. As "%s" is spe ...
  • 因为scanf函数只会在输入正确时才提取输入。 如果输入不正确,当循环迭代时,输入仍然在输入缓冲区中,下一次对scanf调用将读取完全相同的输入。 您可能想要使用scanf的返回值来确定是否应该退出循环,或者使用例如fgets来读取并提取完整的行,然后使用例如strtol (或sscanf )来获取该值。 Because the scanf function will only extract the input if it's correct. If the input is not correct, t ...
  • 问题的原因是如果输入流与请求的格式不匹配,则scanf()不会使用输入流。 这意味着当你打电话时: scanf("%i", &option); 如果用户输入的数字不是数字(如"o" ),那么该用户输入仍保留在输入流中 - 所以当你循环并再次调用scanf()时, "o"仍然存在,仍然没有t匹配请求的格式。 这就是为什么scanf()不是特别适合用户输入的原因 - 它设计用于消耗格式良好的数据文件。 相反,由于您有一个面向行的用户界面,您应该使用fgets()从用户读取整行,然后尝试使用sscanf()解析 ...
  • 测试它是成功还是失败: hour = -1; // So you can detect afterwards if they never succeeded at all while ( 1 == scanf("%d", &hour) ) { if ( hour >= MIN_HOUR && hour <= MAX_HOUR ) break; printf("Invalid hour input, try again..."); } 例如,如果他们输入"hello ...
  • 如果scanf()无法读取输入,它实际上不会读取它,因此它在您的示例中反复读取相同的输入。 您可以丢弃无效输入,如下所示: while(scanf("%d",&numOfPlayers)!=1){ scanf("%s"); printf("Please enter the right number of players\n"); } If scanf() can't read the input, it actually doesn't read it, so it reads the same ...
  • 这是一个明确的可能性。 将电子邮件类设置为在发送日志电子邮件时不记录消息,或将日志类设置为不发送有关发送电子邮件(或两者)的电子邮件日志条目。 That's a definite possibility. Either set the email class to not log messages when sending log e-mails, or set the log class to not email log entries about sending e-mails (or both).
  • 可能非数字输入在stdin 。 OP的代码不会消耗它。 结果:无限循环。 最好使用fgets() 。 然而,OP决定使用scanf() ,测试其输出并根据需要使用非数字输入。 [编辑]每个@Dmitri更正 int players; int count; // Count of fields scanned while((count = scanf("%d", &players)) != 1 || players <= 0) { if (count == EOF) { Handle_end_o ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)