精华内容
下载资源
问答
  • 1, 下载包: wget http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz2, 解压缩:tar -zxvf rzsz-3.48.tar.gz3, cd src4, 修改Makefile文件:第四行, 修改Makefile第四行OFLAG= -O 为 OFLAG= -O -...

    1, 下载包: wget http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz
    2, 解压缩:tar -zxvf rzsz-3.48.tar.gz
    3, cd src
    4, 修改Makefile文件:第四行, 修改Makefile第四行OFLAG= -O 为 OFLAG= -O -DREGISTERED(也可以修改源代码)保存退出
    5,make posix
    6, 把 sz rz 拷贝到 /usr/bin 下

    转载于:https://www.cnblogs.com/nosaferyao/archive/2012/07/11/2586377.html

    展开全文
  • 带回Sublime Text体验!
  • # coding=utf-8 ...import copy import requests import json import time import uuid from celery import Celery from celery.schedules import crontab from flask import jsonify fro...
    # coding=utf-8
    import connexion
    import copy
    import requests
    import json
    import time
    import uuid
    from celery import Celery
    from celery.schedules import crontab
    from flask import jsonify
    from celery.utils.log import get_task_logger
    logger = get_task_logger(__name__)
    
    app = connexion.FlaskApp(__name__, specification_dir='.')
    
    application = app.app
    # Celery configuration db 7
    application.config['CELERY_BROKER_URL'] = 'redis://:pwd@r-xxx.redis.rds.aliyuncs.com:6379/7'
    application.config['result_backend'] = 'redis://:pwd@r-xxx.redis.rds.aliyuncs.com:6379/7'
    
    # 调度器
    # 问题:Celery Received unregistered task of type
    # 解决:我的flask的main.py文件和celery的主脚本task_timed_del_post.py在同一目录,
    # 我的定时函数@celery.task(bind=True) def timed_del_post(self)也同时在该脚本中没有独立出去
    # 下面的app是我工程项目的目录,在app里开始找,然后找到自己,然后找到函数timed_del_post
    # 这里配置调度器和下面使用调度器效果一致
    # "schedule": crontab(minute="*/1"),
    application.config['beat_schedule'] = {
             "test001": {
                'task': 'app.task_timed_del_post.timed_del_post',
                'schedule': 1.0,
                'args': ()
            }
    }
    
    
    RESULT = {
        'code': 0,
        'message': 'Success',
        'data': {}
    }
    result = copy.deepcopy(RESULT)
    
    
    def make_celery(app):
        celery = Celery(app.name, backend=app.config['result_backend'],
                        broker=app.config['CELERY_BROKER_URL'])
        celery.conf.update(app.config)
    
        celery.conf.update(
            result_serializer='json',
            task_serializer='json',
        )
        celery.conf.timezone = 'UTC'
        # celery.conf.beat_schedule = {
        #      "test001": {
        #         'task': 'app.task_timed_del_post.timed_del_post',
        #         'schedule': 1.0,
        #         'args': ()
        #     }
        # }
    
        TaskBase = celery.Task
    
        class ContextTask(TaskBase):
            abstract = True
    
            def __call__(self, *args, **kwargs):
                with app.app_context():
                    return TaskBase.__call__(self, *args, **kwargs)
        celery.Task = ContextTask
        return celery
    
    celery = make_celery(app.app)
    
    
    # 核心函数
    @celery.task(bind=True)
    def timed_del_post(self):
        print("hello world!")
    
        return "ok"
    
    
    # 运行方式:
    # 服务器使用一个celery_service
    # screen -S celery_service
    # cd /root/backend/services/app
    # 我的初始化celery对象叫做celery, 如果初始化叫做app,应该默认不写,叫别的名改别的名字
    # celery -A app.task_timed_del_post.celery worker -B --loglevel=info
    # celery -A app.task_timed_del_post worker -B -s /tmp/celerybeat-schedule --loglevel=info
    

      

    app文件夹下:

    task_timed_del_post.py

    timed_del_post函数在task_timed_del_post.py

     

    更简单点的:

    from celery import Celery, Task
    from celery.utils.log import get_task_logger
    from flask import Flask
    from datetime import timedelta
    
    app = Flask(__name__)
    app.config['CELERY_NAME'] = 'test_celery'
    app.config['CELERY_BROKER_URL'] = 'redis://:lyp82nLF@r-2zeaf096da357c24.redis.rds.aliyuncs.com:6379/7'
    app.config['CELERY_RESULT_BACKEND'] = 'redis://:lyp82nLF@r-2zeaf096da357c24.redis.rds.aliyuncs.com:6379/7'
    app.config['CELERYBEAT_SCHEDULE'] = {
            'add-every-10-seconds': {
                'task': 'app.task_coretask.long_task',
                'schedule': 1.0,
                'args': ()
            },
        }
    logger = get_task_logger(__name__)
    celery = Celery(app.name, broker=app.config['CELERY_BROKER_URL'])
    celery.conf.update(app.config)
    
    
    @celery.task(bind=True)
    def long_task(self):
        """启动worker: celery -A test_celery.celery worker -B --loglevel=debug"""
        logger.debug('================')
        logger.debug('此处写需要定时调用的任务')
        logger.debug('================')
        print("hello world")
        return "ok"
    
    # 服务器使用一个celery_service
    # screen -S
    # cd /root/backend/services/app
    # celery -A app.task_coretask.celery worker -B --loglevel=info
    
    # 测试client
    # class Trigger(Task):
    #     def run(self):
    #         task = long_task.apply_async()
    #         print(task)
    #
    #
    # if __name__ == '__main__':
    #     trigger = Trigger()
    #     trigger.run()
    

      

     

    转载于:https://www.cnblogs.com/adamans/articles/10691482.html

    展开全文
  • } } 当我把这个重载函数copy到初始MainActivity 时却出现编译错误,提示 没有重载函数 于是继续查。 后来才发现原来有两个FlutterActivity,而我代码中导入的是老的版本 io.flutter.app.FlutterActivity; //老版 io...

    今天尝试在Android 工程下的Flutter  dart 代码里使用WebView 控件,来打开一个web页面

    但是首次结果是页面白屏,运行错误如题:大概意思是webview插件没有注册。

    我按照百度出来的方法,一一对照

    第一步,在pubspec.yaml文件里添加了 flutter 依赖

    dependencies:
     
    flutter:
       
    sdk: flutter

     
    # The following adds the Cupertino Icons font to your application.
      # Use with the CupertinoIcons class for iOS style icons.
     
    cupertino_icons: ^0.1.3
     
    webview_flutter: ^0.3.22+1

     

    第二步、然后在AndroidManifest.xml 设置对应权限

     

    第三步、并添加相应res目录下的xml资源

    <?xml version="1.0" encoding="utf-8"?>
    
    <network-security-config>
    
        <base-config cleartextTrafficPermitted="true">
    
            <trust-anchors>
    
                <certificates src="system" />
    
            </trust-anchors>
    
        </base-config>
    
    </network-security-config>

    确保以上三步都做了,执行flutter clean, 并重新编译运行,发现白屏依旧,log错误依旧。

    后来即便看了github 上https://github.com/flutter/flutter/issues/25714

    所有解决方案,结果依然白屏。

    到底哪里注册插件呢?

    反复查看配置文件和代码,无意中发现android工程目录io.flutter.plugins 下有个新生成的GeneratedPluginRegistrant 文件,

    /**
    
     * Generated file. Do not edit.
    
     * This file is generated by the Flutter tool based on the
    
     * plugins that support the Android platform.
    
     */
    @Keep
    
    public final class GeneratedPluginRegistrant {
    
      public static void registerWith(@NonNull FlutterEngine flutterEngine) {
    
        flutterEngine.getPlugins().add(new io.flutter.plugins.webviewflutter.WebViewFlutterPlugin());
    
      }
    
    }
    
    从文件注释来看,这个文件是flutter工具自动生成的,需要在某个地方调用一下,就可以注册webview 插件了
    
    然后发现了这个插件调用地方,即FlutterActvity 的重载函数configureFlutterEngine 中调用
    
    public class MainActivity extends FlutterActivity {
    
         @Override
    
         public void configureFlutterEngine(@NonNull FlutterEngine flutterEngine) {
    
            //  FlutterLogger.i("FlutterLoader configureFlutterEngine =" );
    
              GeneratedPluginRegistrant.registerWith(flutterEngine);
    
         }
    
    }
    当我把这个重载函数copy到初始MainActivity 时却出现编译错误,提示 没有重载函数
     
    于是继续查。
     
    后来才发现原来有两个FlutterActivity,而我代码中导入的是老的版本
    
    io.flutter.app.FlutterActivity; //老版
    io.flutter.embedding.android.FlutterActivity; //新版
    github上关于老版FlutterActivity的注释是这样的

    /**

     

     * Deprecated base class for activities that use Flutter.

     

     *

     

     * <p>Deprecation: {@link io.flutter.embedding.android.FlutterActivity} is the new API that now

     

     * replaces this class. See https://flutter.dev/go/android-project-migration for more migration

     

     * details.

     

     */

    https://github.com/flutter/engine/blob/master/shell/platform/android/io/flutter/app/FlutterActivity.java
    

    老版 FlutterActivity已经Deprecated, 需要使用一些新功能的话就必须使用新版FlutterActivity 

    于是将FlutterActivity 导入包改成新版

    import io.flutter.embedding.android.FlutterActivity;

    同时导入

    import androidx.annotation.NonNull;//不然编译会有错误

    由于需要使用androidx, 所以还要在build.gradle 里面添加androidx的依赖

    dependencies {

        testImplementation 'junit:junit:4.12'

        androidTestImplementation 'androidx.test:runner:1.1.1'

        androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'

    }

    最后,在终端先后执行 flutter clean, flutter build apk xxxx

    并将新生成的apk再次在手机上运行时,h5网页终于正常打开了。

    需要注意的是,flutter webview这个插件只能在android sdk 20 以上的版本上运行,否则依然会白屏。

     

    我尝试在android 4.4.2(API level 19)的android机顶盒上运行,页面白屏,log错误提示如下:

    Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to use platform views with API 19, required API level is: 20

    考虑到目前市面上android机顶盒大部分是android4.4版本,所以若想在机顶盒上通过flutter直接打开webview控件是行不通,相关功能得另想办法。

     
    展开全文
  • Volume Shadow Copy Service error: Error calling a routine on the Shadow Copy Provider {f5dbcc43-b847-494e-8083-f030501da611}. Routine details BeginPrepareSnapshot({f5dbcc43-b847-494e-8083-f030501da611

    Volume Shadow Copy Service error: Error calling a routine on the Shadow Copy Provider {f5dbcc43-b847-494e-8083-f030501da611}. Routine details BeginPrepareSnapshot({f5dbcc43-b847-494e-8083-f030501da611},//?/Volume{c1d4763c-0699-11df-9661-806e6f6e6963}/) [hr = 0x80070002].

     

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

    NTBackup and Acronis TrueImage Server VSS troubles

    Today I decided to test out the Volume Shadow Copy (VSS) support in Virtual Server 2005 R2. In theory, as I mentioned in an earlier post, with VSS, virtual server can create a consistent “snapshot” of a running virtual machine so other applications, such as backup clients, can use that snapshot without interrupting the virtual machine itself.

    The only VSS-aware backup application I had installed was Windows’ very own NTBackup. So, I enabled VSS on the volumes, run NTBackup, and proceed to make a backup of my virtual machine. Everything started out OK, until NTBackup got stuck with the message “Waiting to retry shadow copy…”. Following my standard error-solving checklist, I checked the Event Viewer, and I found this message logged:

     

    Volume Shadow Copy Service error: Error calling a routine on the Shadow Copy Provider {f5dbcc43-b847-494e-8083-f030501da611}. Routine details BeginPrepareSnapshot({f5dbcc43-b847-494e-8083-f030501da611},//?/Volume{0cb1b616-8ea6-11db-88de-806e6f6e6963}/) [hr = 0x80070002].

     

    We use Acronis imaging solution for deploying our server, and it turns out that Acronis’ VSS Provider has an issue with Microsoft’s VSS provider. Apparently the issue is well-known, and is documented in two forums posts. It is solved in the latest version of Acronis’ products, but I didn’t really had time to perform an upgrade (and Acronis’ products are notoriously stubborn when you try to uninstall them). So, I applied the solution suggested in one of the forum posts. I unregistered Acronis’ VSS provider using the command:

     

    regsvr32 /u /windows/system32/snapapivss.dll

     

    After that, the backup went without problems:

    VSS03

    Opening up the log once the backup is complete shows you that all files from the virtual machine were backed up succesfully:

    展开全文
  • 安装RZSZ

    2012-08-08 01:01:14
    wget :http://freeware.sgi.com/source/rzsz/rzsz-3.48.tar.gz   tar zxvf rzsz-3.48.tar.gz ...UNREGISTERED COPY"...**** UNREGISTERED COPY ***** Please read the License Agreeme...
  • 一、device定义 ...[cpp] view plain copy 598/** 599 * struct device - The basic device structure 600 * @parent: The device's "parent" device, the device to which it is
  • This software is shareware, but you can copy and use the unregistered version for free (for non-commercial usage only). The free (unregistered) copy of ShotGraph has the following limitations: - the ...
  • Chrome的启动参数

    千次阅读 2021-02-23 13:55:42
     ↪ --ash-copy-host-background-at-boot ⊗ Copies the host window's content to the system background layer at startup. Can make boot slightly slower, but also hides an even-longer awkward period ...
  • Oracle 19c 参数列表及概要介绍

    千次阅读 2020-04-13 18:47:22
    Oracle 19c包括5412个参数,各参数概要内容
  • kprobe 的 3 种使用

    2020-06-17 10:22:56
    知识背景:会编写基础内核模块 kprobe用处:用来跟踪、记录、打桩。最常见的使用就是需要打印内核函数的执行流程,比如排查问题时、或者学习内核流程时需要用到。... } p = copy_process(NULL, trace, NUMA_NO_NODE...
  • Quartz 2.4.0 源码解析

    2020-02-15 03:27:17
    You may obtain a copy * of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the ...
  • * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License ...
  • * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA ...
  • 一、概念  Framebuffer,也叫帧缓冲,其内容对应于屏幕上的界面显示,可以将其简单理解为屏幕上显示内容对应的缓存,修改Framebuffer中的内容,即表示修改屏幕上的内容,所以,直接操作Framebuffer可以直接从...
  • /* copy each string name in case parent_names is __initdata */ for (i = 0; i < clk->num_parents; i++) { clk->parent_names[i] = kstrdup(hw->init->parent_names[i], GFP_KERNEL); if (!clk->...
  • 前面章节对按键程序已经进行了多次修改,分别引入了中断,阻塞方式的等待队列,非阻塞方式的poll,以及异步通知,以及... * and needs not be explicitly unregistered or freed. */ struct input_dev { const char...
  • Android源代码仓库及其管理工具Repo分析

    万次阅读 多人点赞 2014-01-20 00:58:25
    软件工程由于需要不断迭代开发,因此要对源代码进行版本管理。Android源代码工程(AOSP)也不例外,它采用Git来进行版本管理。AOSP作为一个大型开放源代码工程,由许许多多子项目组成,因此不能简单地用Git进行管理...
  • [ERROR] WSREP no such a transition REPLICATING

    千次阅读 2018-02-28 10:11:52
    满心欢喜的测试高大上的PXC,还没折腾几天就碰到了Bug,主要的错误提示为[ERROR] WSREP: FSM: no such a transition REPLICATING -&gt; REPLICATING,后面的描述是碰到了Bug。本文是具体描述及其解决方案。...
  • boost log库学习二(日志过滤)

    千次阅读 2017-06-27 16:51:19
    * (See accompanying file LICENSE_1_0.txt or copy at * http://www.boost.org/LICENSE_1_0.txt) */ /*! * \file core/core.hpp * \author Andrey Semashev * \date 19.04.2007 * * This header contains...
  • 首先,处理按键按下后,可以通过发送广播让应用层识别按键事件,那么怎么来发送,可以找到下面这个文件: ...对应这个文件,我们找到这个方法,... * You may obtain a copy of the License at * * http://www.apache.org...
  • 通知链

    千次阅读 2017-04-06 00:58:18
     可阻塞的通知链有两种类型,一种用信号量实现回调函数的加锁,另一种是采用互斥锁和叫做“可睡眠的读拷贝更新机制”(Sleepable Read-Copy UpdateSleepable Read-Copy Update),链表头的定义分别如下:   ...
  • V4L2学习记录

    千次阅读 2016-08-24 15:28:59
    V4L2学习记录  这个还没有分析完,先在这放着,防止电脑坏掉丢了,以后再完善 V4L2
  •  if(LOGENABLE) mLogger.d("ControlServiceImpl have been unregistered");  mCallBack.unregister(callback);  }  }  public void doSomething(){  doSomething();  }  } } 回...
  • x264代码剖析(六):encode()函数之x264_encoder_headers()函数    encode()函数是x264的主干函数,主要包括x264_encoder_open()函数、x264_encoder_headers()函数、x264_encoder_encode()函数与x264_encoder_...
  • 观察者模式

    千次阅读 2015-12-26 19:58:51
    概述 有时被称作发布/订阅模式,观察者模式定义了一种一对多的依赖关系,让多个观察者对象同时监听某一个主题对象。这个主题对象在状态发生变化时,会通知所有观察者对象,使它们能够自动更新自己。...
  • Oracle EBS R12实用配置文件列表

    千次阅读 2015-11-24 11:04:08
    Profile Options in Oracle Application Object Library This section lists each profile option in Oracle Application Object Library. These profile options are grouped into categories based on their fu
  • 由于现在正在进行framebuffer的一个项目开发,所以需要学习framebuffer的内核代码,今天现在这里上传我的相关注释,后面再将我的学习内容和相关framebuffer的操作提交上来.位置:源代码根目录/include/linux/fb.h#...
  • Android日志系统驱动程序Logger源代码分析

    万次阅读 多人点赞 2011-07-10 13:50:58
    * destroyed until it has been unregistered. * * A zero is returned on success and a negative errno code for * failure. */ int misc_register(struct miscdevice * misc) { struct miscdevice *c; ...
  • 示例模块jprobe-exam.c是一个jprobes探测例子,它示例了获取系统调用open的参数,但读者不要试图在实际的应用中这么使用,因为copy_from_user可能导致睡眠,而kprobe并不允许在探测点处理函数中这么做(请参看前面...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 1,621
精华内容 648
关键字:

copyunregistered