tmp

Convert compressed swf to mp4

匿名 (未验证) 提交于 2019-12-03 02:45:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm looking for a batch script to convert swf to mp4, lossless. I tried using both ffmpeg and handbrake, but apparently swf is compressed and I can't convert them this way. ffmpeg -i input -c:v libx264 -preset ultrafast -qp 0 output.mkv HandBrakeCLI -i source -o destination I know I acn use a tool like xilisoft, but I've more than 3000 videos and would need to run this automatically. Is there a script/ algorithm that can help me automate this process? 回答1: Get gnash: git clone git://git.sv.gnu.org/gnash.git You'll need a bunch of

MySQL incorrect key file for tmp table when making multiple joins

匿名 (未验证) 提交于 2019-12-03 02:44:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I don't come here for help often but I am pretty frustrated by this and I am hoping someone has encountered it before. Whenever I try to fetch records from a table using more than one join I get this error: #126 - Incorrect key file for table '/tmp/#sql_64d_0.MYI'; try to repair it So this query will produce the error: SELECT * FROM `core_username` INNER JOIN `core_person` ON (`core_username`.`person_id` = `core_person`.`id`) INNER JOIN `core_site` ON (`core_username`.`site_id` = `core_site`.`id`) ORDER BY `core_username`.`name` ASC LIMIT 1

docker executable file not found in $PATH

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Trying to run a rails migration on a running docker compose container throws this error: $ docker-compose run webapp rails db:migrate ERROR: Cannot start service webapp: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\"rails\\": executable file not found in $PATH\"\n" However, I can access rails from inside the container: $ docker-compose run webapp bash root@3fd3a87275a1:/home/app/webapp# which rails /usr/local/rvm/gems/ruby-2.3.1/bin/rails My container is already running

MySQL: Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2) - What does it even mean?

匿名 (未验证) 提交于 2019-12-03 02:19:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: For some reason my production DB decided to spew out this message. All application calls fail to the DB with the error: PreparedStatementCallback; SQL [ /*long sql statement here*/ ]; Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2); nested exception is java.sql.SQLException: Can't create/write to file '/tmp/#sql_3c6_0.MYI' (Errcode: 2) I have no idea, what this even means. There is no file #sql_3c6_0.MYI in /tmp and I can't create one with a # character for some reason. Has anyone heard about it or seen this error? What could

Nginx cannot find unix socket file with Unicorn (no such file or directory)

匿名 (未验证) 提交于 2019-12-03 02:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am deploying a Rails 4 app to a Fedora 19 x64 server using Nginx and Unicorn. The problem is that I get an error when visiting the address: "We're sorry, but something went wrong." My Nginx error log ( /var/log/nginx/error.log ) shows: 2014 / 03 / 08 03 : 50 : 12 [ warn ] 23934 #0: conflicting server name "localhost" on 0.0.0.0:80, ignored 2014 / 03 / 08 03 : 50 : 12 [ warn ] 23936 #0: conflicting server name "localhost" on 0.0.0.0:80, ignored 2014 / 03 / 08 03 : 50 : 14 [ crit ] 23939 #0: *1 connect() to unix:/tmp/unicorn.[app

Current date and time as string

匿名 (未验证) 提交于 2019-12-03 02:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I wrote a function to get a current date and time in format: DD-MM-YYYY HH:MM:SS . It works but let's say, its pretty ugly. How can I do exactly the same thing but simpler? string currentDateToString() { time_t now = time(0); tm *ltm = localtime(&now); string dateString = "", tmp = ""; tmp = numToString(ltm->tm_mday); if (tmp.length() == 1) tmp.insert(0, "0"); dateString += tmp; dateString += "-"; tmp = numToString(1 + ltm->tm_mon); if (tmp.length() == 1) tmp.insert(0, "0"); dateString += tmp; dateString += "-"; tmp = numToString(1900 + ltm-

Adb install failure: INSTALL_CANCELED_BY_USER

匿名 (未验证) 提交于 2019-12-03 01:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I try to install app via adb and get a error: $ ./ adb - d install / Users / dimon / Projects / one - place / myprogram / platforms / android / build / outputs / apk / android - debug . apk - r - g 3704 KB / s ( 4595985 bytes in 1.211s ) pkg : /data/ local / tmp / android - debug . apk Failure [ INSTALL_CANCELED_BY_USER ] In device I do nothing in this moment. Device is Xiaomi MI5, MIUI 7.2.13, Android 6.0. Developer mode enabled. How to fix this? The same error I get when try to run "ionic run android" command. UPD Here is logs

How do I stop “Can't create/write to file” (Errcode: 2) in MySQL?

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I now frequently receive the error: #1 - Can't create/write to file '/tmp/#sql_1a2_3.MYI' (Errcode: 2) From my MySQL server. It locks out any queries or changes to data until I restart the daemon. It then fixes itself for a while and then happens again. I've tried using touch on the file inside the tmp directory with 777 permissions, and I've also tried moving the tmp directory inside of the MySQL directory (/var/lib/mysql/tmp): MySQL Error 1 (HY000) Trouble creating file Errcode 2 Neither has worked. My tmp directory is nowhere near full

2018南京icpc-J-Prime Game (欧拉筛+唯一分解定理)

可紊 提交于 2019-12-03 01:42:42
题意:给定n个数ai(n<=1e6,ai<=1e6),定义 ,并且fac(l,r)为mul(l,r)的不同质因数的个数,求 思路:可以先用欧拉筛求出1e6以内的所有质数,然后对所有ai判断,如果ai不是质数就利用唯一分解定理计算其所有质因数。然后按照顺序依次计算每个质因子的贡献。假设n=5,对质因子2,依次记录它在数组出现的下标,如果它在2、4下标出现了,那么它的贡献即为所有包含2或4的区间个数,逆向计算,即所有区间个数-不包含2和4的区间个数,即 n(n+1)/2-m1(m1+1)/2-m2(m2+1)/2-m3(m3+1)/2,其中m1=2-1-0=1,m2=3-2=1,m3=5-4=1,即3块不包含2和4的子区间长度。 AC代码: #include<cstdio> #include<cstring> #include<queue> #include<vector> using namespace std; typedef long long LL; const int maxn=1e6+5; int n,a[maxn],cnt,vis[maxn],prime[maxn]; int pre[maxn],vis1[maxn]; LL ans,cs; void Eular(){ for(int i=2;i<maxn;++i){ if(!vis[i]) prime[cnt++]=i;

IO Error in boto3 download_file

匿名 (未验证) 提交于 2019-12-03 01:34:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Background I am using boto3 code to download file from s3.Here is the following code. for record in event['Records']: bucket = record['s3']['bucket']['name'] key = record['s3']['object']['key'] print (key) if key.find('/') < 0 : if len(key) > 4 and key[-5:].lower() == '.json': //File is uploaded outside any folder download_path = '/tmp/{}{}'.format(uuid.uuid4(), key) else: download_path = '/tmp/{}/{}'.format(uuid.uuid4(), key)//File is uploaded inside a folder If a new file is uploaded in s3 bucket,this code is triggered and that newly