😮 互联网 Java 工程师进阶知识完全扫盲:涵盖高并发、分布式、高可用、微服务等领域知识,后端同学必看,前端同学也可学习
ansj分词.ict的真正java实现.分词效果速度都超过开源版的ict. 中文分词,人名识别,词性标注,用户自定义词典
Promise based HTTP client for the browser and node.js
Simple HTML5 Charts using the <canvas> tag
Ultralightweight JSON parser in ANSI C
practice cmake
🇨🇳 Chinese translation for vuejs.org
程序员的自我修养 , 整理一些计算机类的基本知识
Apache Commons Math
JavaScript library of crypto standards.
startedkatmeister/tokyo-2019
started time in 3 hours
pull request commentDaveGamble/cJSON
I've renamed the file (doesn't really make a difference), as you can see the top-most check is what all future PR's will have, the check will fail if a PR introduces a bug or breaks the build.
This is an extra check on top of the existing OSS-Fuzz integration, this lets you know not to merge commits that would fail with OSS-Fuzz ahead of time.
comment created time in 3 hours
pull request commentstefankoegl/python-json-patch
Declare json-patch operations as class-based attribute
Coverage decreased (-0.1%) to 65.846% when pulling 1268e09ffaead08f22184b63b3ad34bb41ab8bab on tzoiker:fix/json-patch-ops into f3c46e8d37833eb3cb7ff5f914d8dac85450fafb on stefankoegl:master.
comment created time in 4 hours
PR opened stefankoegl/python-json-patch
I propose to declare available JSON-patch operations as class-based attributes rather than in the constructor.
Motivation:
- It seems a bit more logical.
- It became impossible to add custom operations without complete copy-paste of the constructor due to added validation.
Python 2.7 does not support MappingProxyType, so it should be handled with more care (due to dict mutability), although I suppose it is not much of a problem as python2.7 was deprecated.
pr created time in 4 hours
pull request commentstefankoegl/python-json-patch
Fix #110 - validate patch document during creation
I have just released v1.27 which inlcudes this PR. Thanks for the contribution!
comment created time in 5 hours
pull request commentstefankoegl/python-json-patch
Allow custom JSON pointer class
I have just released v1.27 which inlcudes this PR. Thanks for the contribution!
comment created time in 5 hours
push eventstefankoegl/python-json-patch
commit sha 3972a8e648b7d761b92ee53591fc24b9d805a90d
Update Python to 3.9
commit sha f3c46e8d37833eb3cb7ff5f914d8dac85450fafb
Merge pull request #117 from stefankoegl/py3.9 Update Python to 3.9
push time in 5 hours
pull request commentstefankoegl/python-json-patch
Coverage decreased (-0.1%) to 65.846% when pulling 3972a8e648b7d761b92ee53591fc24b9d805a90d on py3.9 into 3a956350391f644e61790df17c82f578c8020170 on master.
comment created time in 5 hours
issue closedstefankoegl/python-json-patch
The change introduced by #103 jsonpatch uses json.dumps to check for equality. This breaks when using Python structures that were deserialized using custom types. In our case this happens because floats are deserialized as decimal.Decimal. When calling: JsonPatch.from_diff(old, new) this now causes a TypeError: Decimal('1') is not JSON serializable.
Possible fixes:
- Explicitly only support the types natively supported by the built in json module
- Use the simplejson module instead of the builtin json module (at the expense of an extra dependency) to at least support the
decimal.Decimaltype - Allow a custom
dumpsimplementation to be passed tofrom_diff(and possibly when creating instances ofJsonPatchto makeJsonPatch.to_stringalso work with custom types, although this is easy to work around using theJsonPatch.patchattribute).
Option 3 exposes what could be considered an implementation detail (the use of dumps for comparisons). However if custom types are to be supported at all, I wonder if this is not the only way that things will work. For example, I can casually construct an example (using custom types) where two values compare equal before serialization but not after:
>>> decimal.Decimal('1.0') == decimal.Decimal('1.00')
True
>>> simplejson.dumps(decimal.Decimal('1.0')) == simplejson.dumps(decimal.Decimal('1.00'))
False
The only way to know, in a generic way, whether the two things that use custom types should generate a patch op or not would be to serialize them, as far as I can tell.
closed time in 5 hours
cljpush eventstefankoegl/python-json-patch
commit sha ab775d187539c85cb7214905ad295358b240af14
feat: add custom json pointer support
commit sha bb4ea7ba669b26d29f31ec75015d92fb6633f07b
test: custo json pointer
commit sha 124eb76c09136aef56618e7347230f981edd51c3
doc: fix docstrings
commit sha fb04fcc4df0e060586f6401b61af703d60bb6b65
test: add more tests
commit sha 0b680ea87afc6e747fc584aaef513815de0c52c3
chore: bump version
commit sha c37b40ffec5674bf76bbb2197917e528e74b4552
test: update
commit sha 0994bfe2ce199d6edccb4ab97fc10e3c26683348
test: add toy jsonpointer example
commit sha d24fa96a7ad1f01cb793c0efe835a76ddd3b2fc7
test: fix for py27
commit sha 4d073929b732af3403ae9fac92433e0066f0061a
style: fix typo
commit sha c9613e303531ce4a016b3a696992743e62e12258
chore: revert version bump
commit sha 50fb942e3500d84950ec9309f886f1952bd2fa25
tests: moar
commit sha eca4f8ab337b8ca8e9db5d0d0d81f536d77fbd7d
Merge branch 'master' into feature/custom-pointer # Conflicts: # jsonpatch.py # tests.py
commit sha 3a956350391f644e61790df17c82f578c8020170
Merge pull request #114 from tzoiker/feature/custom-pointer Allow custom JSON pointer class
push time in 6 hours
PR merged stefankoegl/python-json-patch
@stefankoegl It would be nice to be able to pass a custom implementation of the JSON pointer.
pr closed time in 6 hours
pull request commentexceljs/exceljs
docs: fix default options for streaming xlsx reader
@alubbe Will do.
comment created time in 6 hours
startedbradleytaunt/1mb-club
started time in 8 hours
issue commentmqyqingfeng/Blog
JavaScript深入之从ECMAScript规范解读this
i. Let thisValue be the result of calling the ImplicitThisValue concrete method of GetBase(ref).
文章中所有的 ImplicitThisValue(ref) 是不是要改成 GetBase(ref).ImplicitThisValue() 呀
comment created time in 11 hours
issue commentexceljs/exceljs
[Q] Data not appearing to excel file in async
The problem was, i did not use column keys when reading an existing excel file. Alth im not sure if you are supposed to use them? ` let workbook = new ExcelJS.Workbook() await workbook.xlsx.readFile(str);
let worksheet = workbook.getWorksheet('Time counter')
worksheet.columns = [ {header: 'Job Name', key: 'jobName', width: 32}, //Column A {header: 'PDF Time', key: 'PDFKey'}, //Column B {header: 'Nesting Time', key: 'NestKey'}, // Column C
]
worksheet.addRow({jobName:workName,PDFKey: asd,NestKey: xyz});
await workbook.xlsx.writeFile(str);`
comment created time in 19 hours
issue commentexceljs/exceljs
Any update on this? This feature is really valuable and it would great to have it in exceljs. At least the docs should mention that's it's not present in the streaming version of exceljs.
comment created time in a day
issue commentjson-path/JsonPath
Filter on children level, return the parent node
As a workaround (it works on https://jsonpath.herokuapp.com/ but not other simulators):
JsonPath : $.[?(@.c[*].d contains "d3" )]['a', 'b']
Input : [ { "a": "a1", "b": "b1", "c": [ { "d": "d1", "e": "e1" }, { "d": "d2", "e": "e2" } ] }, { "a": "a2", "b": "b2", "c": [ { "d": "d3", "e": "e3" } ] } ]
It brings the correct result :
[ { "a" : "a2", "b" : "b2" } ]
comment created time in 2 days
startedPallinder/go-randomdata
started time in 2 days
issue commentmqyqingfeng/Blog
` function test(a, b, c = 10) { console.log(arguments); // [1, 2] console.log(a, b, c); // 1 2 10 arguments[0] = 2; // [2, 2] console.log(a); // 1 a = 3; // 3 console.log(arguments); // [2, 2] b = 3; console.log(arguments[1]); // [2, 2] c = 20; console.log(arguments); // [2, 2] }
test(1, 2); ` 目前浏览器和node环境测试表明 实参和arguments之间没有什么关联了。有人解释下吗
MDN找到答案了,是因为我使用了参数默认值。
在严格模式下,剩余参数、默认参数和解构赋值参数的存在不会改变 arguments对象的行为,但是在非严格模式下就有所不同了。
当非严格模式中的函数没有包含剩余参数、默认参数和解构赋值,那么arguments对象中的值会跟踪参数的值(反之亦然)
comment created time in 2 days
