temp

Error while building an xtext project with ant: Generation of the Grammar classes fails

强颜欢笑 提交于 2019-12-10 17:33:28
问题 I am developing an xtext plug-in project for an eclipse application for my Bachelor thesis. I want to do the 'Generate Xtext Artifacts' at runtime with an ant script executing the Mwe2Launcher class and do the generation in an temp folder. I wrote an Activator to create in the temp folder a project folder and copy the mwe2 file, my grammar file and the ant script. Executing the Ant script leads to this error: osgi> start 360 gen: [java] 0 INFO StandaloneSetup - Registering platform uri 'C:

使用wm_concat() 报错:不存在的LOB值

匆匆过客 提交于 2019-12-10 16:27:46
在两个临时表temp、temp1中,其中temp使用了wm_concat() 函数,并用to_char()函数对合并的字段进行了转换,当两个表关联的时候,报错“不存在的LOB值”。 百度了下是因为wm_concat() ,wm_concat()在比较高的版本上返回的是clob类型。 解决办法:在临时表temp中对wm_concat()合并的字段不进行to_char()转换,在关联后的结果中再进行转换,此时不会报错。 来源: https://www.cnblogs.com/dreamttt/p/12016944.html

[LeetCode] [Python] Linked List

给你一囗甜甜゛ 提交于 2019-12-10 13:18:30
https://leetcode.com/problems/add-two-numbers/discuss/447910/Python-Faster-than-93.43 class Solution : def addTwoNumbers ( self , l1 : ListNode , l2 : ListNode ) - > ListNode : p , q = l1 , l2 cur = dummy = ListNode ( - 1 ) carry = 0 while p and q : temp = p . val + q . val + carry cur . next = ListNode ( temp % 10 ) carry = 1 if temp >= 10 else 0 cur = cur . next p = p . next q = q . next while p : temp = p . val + carry cur . next = ListNode ( temp % 10 ) carry = 1 if temp >= 10 else 0 p = p . next cur = cur . next while q : temp = q . val + carry cur . next = ListNode ( temp % 10 ) carry =

js消除图片小游戏

空扰寡人 提交于 2019-12-10 05:57:55
做了一个简易的消除图片的小游戏,没有连线的规则。 <!DOCTYPE html> < html lang = " en " > < head > < meta charset = " UTF-8 " > < meta name = " viewport " content = " width=device-width, initial-scale=1.0 " > < meta http-equiv = " X-UA-Compatible " content = " ie=edge " > < title > js连连看 </ title > < style > * { margin : 0 ; padding : 0 ; } html, body { width : 100% ; height : 100% ; background : #222 ; overflow : hidden ; } .wrapper { background-size : 100% 100% ; margin : 10px auto ; position : relative ; /* border: 1px solid #f40; */ } .square { cursor : pointer ; position : absolute ; width : 80px ; height : 80px ;

实现一个的简单的网络聊天程序

烈酒焚心 提交于 2019-12-10 01:30:59
   本次实验采用Java语言,编写了一个简单的聊天室程序,可以实现多人之间的聊天。以下将对该程序进行详尽分析,并对比分析该编程语言提供的网络接口API与Linux Socket API之间的关系。 1、 网络通信相关要素 1) 协议   通信的协议还是比较复杂的, java.net 包中包含的类和接口,它们提供低层次的通信细节。我们可以直接使用这 些类和接口,来专注于网络程序开发,而不用考虑通信的细节。 java.net 包中提供了两种常见的网络协议的支持: TCP:传输控制协议 (Transmission Control Protocol)。TCP协议是面向连接的通信协议,即传输数据之前, 在发送端和接收端建立逻辑连接,然后再传输数据,它提供了两台计算机之间可靠无差错的数据传输。 三次握手:TCP协议中,在发送数据的准备阶段,客户端与服务器之间的三次交互,以保证连接的可 靠。 第一次握手,客户端向服务器端发出连接请求,等待服务器确认。 第二次握手,服务器端向客户端回送一个响应,通知客户端收到了连接请求。 第三次握手,客户端再次向服务器端发送确认信息,确认连接。整个交互过程如下图所示。    完成三次握手,连接建立后,客户端和服务器就可以开始进行数据传输了。由于这种面向连接的特性,TCP协议可 以保证传输数据的安全,所以应用十分广泛,例如下载文件、浏览网页等。    UDP

Linux 使用cp命令的错误

醉酒当歌 提交于 2019-12-09 19:17:16
昨天维护的编译软件出了一个奇怪的问题,功能大概是这样的: 1、下载资源和代码; 2、编译; 3、将需要打包的文件复制到临时目录打包。 后来由于新需求,修改了一下功能,在复制到临时目录之前还有回去一些资源到临时目录: 2.5、下载三方资源到临时目录。 增加此功能后错误就出现了,复制的临时目录的结构全乱了,比如: java/bin应复制到temp/bin,结果去错误的复制到了temp/bin/bin。 看到此问题我以为是2.5步骤中下载的资源包目录有问题,将功能运行到2.5步停止查看目录无问题,保留第3步把2.5删除也无问题,唯独这些一起运行就有问题,而且windows系统下没问题,Linux却有问题。 后来一位前辈想到了问题的原因,linux系统下面调用了cp命令来复制文件和文件夹,问题就出在这里。 调用的命令 cp -arf srcdir destdir -a是要复制链接文件,有些生僻,-r递归-f强制较常见。 从srcdir到destdir有讲究。举例子来说: cp -arf java/bin temp/bin 有两种情况的复制: a.复制前 若temp/bin不存在,则将java/bin直接复制到temp,即temp/bin就是java/bin; b.复制前 若temp/bin存在,则将java/bin复制到temp/bin/中,即temp/bin/bin才是java/bin。

对excel文件批量去重

穿精又带淫゛_ 提交于 2019-12-09 14:52:50
python3环境 安装openpyxl模块python3 -m pip install openpyxl 最后代码如下 #!python3 -*utf-8*- import os #Workbook新建一个xlsx from openpyxl import Workbook from openpyxl import load_workbook #load_workbook打开xlsx wb2 = Workbook ( ) ws2 = wb2 . active path = 'C:\\xx\\Desktop\\xx' #xx文件夹的路径 lists = os . listdir ( path ) print ( lists ) #提取所有xlsx文件名称 temp = [ ] for x in lists : prefix , suffix = os . path . splitext ( x ) if ( suffix == '.xlsx' ) : temp . append ( x ) print ( temp ) #把共有的第一行加入ws2 wb = load_workbook ( path + '\\' + temp [ 0 ] ) #print(wb) sheet = wb [ '登录动作' ] print ( wb ) #se存储第8列(主键),不重复的加入ws2

设计模式 | 第二篇:观察者模式

邮差的信 提交于 2019-12-09 14:21:59
观察者模式定义   在对象之间定义了一对多的依赖,这样一来,当一个对象改变状态,依赖它的对象会收到通知并自动更新。 使用场景   杂志的发布订阅,微信公众号的通知等 设计原则   为了交互对象之间的松耦合设计而努力 优缺点   优点:     1、观察者和被观察者是抽象耦合的。     2、建立一套监听触发机制。   缺点:     1、如果观察者众多,通知所有的观察者会很消耗时间,这里建议异步处理。         2、可能出现循环调用。 UML类图 示例   这里应用《Head First设计模式》一书中的例子 主题(被观察者)接口   package com.study.headfirst.oberver; /** * 主题 * * @author mdl * @date 2019/12/02 */ public interface Subject { /** * 注册观察者 * * @param o */ public void registerObserver(Observer o); /** * 去除观察者 * * @param o */ public void removeObserver(Observer o); /** * 通知所有观察者 */ public void notifyObserver(); } 主题(被观察者): package com.study

【leetcode算法-简单】38. 报数

故事扮演 提交于 2019-12-09 13:21:43
【题目描述】 报数序列是一个整数序列,按照其中的整数的顺序进行报数,得到下一个数。其前五项如下: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 被读作 "one 1" ("一个一") , 即 11。 11 被读作 "two 1s" ("两个一"), 即 21。 21 被读作 "one 2", "one 1" ("一个二" , "一个一") , 即 1211。 给定一个正整数 n(1 ≤ n ≤ 30),输出报数序列的第 n 项。 注意:整数顺序将表示为一个字符串。 示例 1 : 输入: 1 输出: "1" 示例 2: 输入: 4 输出: "1211" 【 解答 】 解法:题目的意思是按照给定的读法,下一个人把上一个人的数字读出来       最容易想到的就是总共循环 n 次,每次循环开始都将一个中间接受结果的temp置为空字符串,在遍历完本次的s后,再将temp的值赋给s       下一次循环基于本次的基础上,将temp置为空字符串,再遍历新的s。 class Solution: def countAndSay(self, n: int) -> str: s = '1' for i in range(1,n): temp = '' count = 1 num = s[0] for j in range(1,len(s)): if s[j] == num

Batch-file get CPU temperature in °C and set as variable

我们两清 提交于 2019-12-09 05:44:48
问题 How do i get a batch-file to work out the temperature of the Cpu and return it as a variable. I know it can be done as i have seen it been done. The solution can use any external tool. I have looked on Google for at least 2 hours but found nothing. Can any one help. Thanks. 回答1: Here is an example which keeps the decimal values and uses the full conversion value. Code @echo off for /f "skip=1 tokens=2 delims==" %%A in ('wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get