关于 JavaScript 的36道题 [ JavaScript Puzzlers! ]

VLOOKUP_fixed.py 立即下载

最近在微博上发现了一个网站 [ http://javascript-puzzlers.herokuapp.com/ ] 是关于 JavaScript 的36道题, 于是尝试自己做了下, 挺不错的, 在此总结下小小的收获. ^-^..

1.What is the result of this expression? (or multiple ones) ["1", "2", "3"].map(parseInt)
["1", "2", "3"][1, 2, 3][0, 1, 2]other

what you actually get is [1, NaN, NaN] because parseInt takes two parameters (val, radix) and map passes 3(element, index, array)

收获: parseInt( 字符串[, 字符串的进制] ), 其返回的数值是十进制的.
(1) 对于无法转换的值会返回 NaN.( 例如: parseInt('2', 2); 二进制状态下只能出现0/1, 2已超出其基数范围,返回 NaN )
(2) 不提供字符串的进制或者提供字符串的进制为 0, 若字符串以'0x'开头采用十六进制,若以'0'开头采用八进制,其他开头采用十进制 
[ 
 注; 若明确提供进制, 则此条不适用. 即 parseInt('0x7', 10); => 0 
(1)( parseInt 从头尽量匹配字符串,若第一个字符就不符合规则,像上面的例子,则输出NaN,若第一个字符符合,则一直匹配到结尾或不能匹配,例如此例中 'x' 不符合,则取0.同理 parseInt('012x7', 10) => parseInt('012', 10) => 12.像 000010010 的二进制会省略前面的 0 一样,十进制也一样,012 => 12)
(2)( parseInt 也会事先去掉字符串前后的空格(trim 一下) )
]

解析: 返回的新数组应该是[ parseInt('1', 0, ['1', '2', '3']),parseInt('2', 1, ['1', '2', '3']), parseInt('3', 2, ['1', '2', '3']) ], 对于 parseInt 来说第三个参数是用不上的, 因此依次是 [ 1, NaN, NaN ]

2.What is the result of this expression? (or multiple ones) [typeof null, null instanceof Object]
["object", false][null, false]["object", true]other

typeof will always return "object" for native non callable objects.


收获: typeof null -> 'object' ( 只是ECMA-262的规定 )
 关于 instanceof: object instanceof constructor 判断 constructor.prototype 是否在 object 的原型链上 ( 此处 null instanceof Object, Object.prototype,虽然所有对象的原型链顶端都是这个对象, 也可以推测类似 null, undefined, 12, true, 'abc'的简单类型没有原型链, 所以他们的 instanceof Object 都是 false )

3.What is the result of this expression? (or multiple ones) [ [3,2,1].reduce(Math.pow), [].reduce(Math.pow) ]
an error[9, 0][9, NaN][9, undefined]

Per spec: reduce on an empty array without an initial value throws TypeError

收获: Array.prototype.reduce(callback[,initialValue]); 将数组缩减为一个值,元素和之前的结果进行计算,计算返回值再和下一个元素进行计算.
      callback(previousValue, currentValue, currentIndex, array);
      previousValue,针对第一次调用,如果有initialValue则为initialValue,currentValue为数组的第一个元素,
                                  如果没有则为数组的第一个元素,currentValue为数组的第二个元素
     如果没有initaialValue, 且数组为空则抛出错误

4.What is the result of this expression? (or multiple ones) var val = 'smtg';console.log('Value is ' + (val === 'smtg') ? 'Something' : 'Nothing');
Value is SomethingValue is NothingNaNother

it actually prints 'Something' the + operator has higher precedence than the ternary one.

收获: + 优先级高于三元运算符, 'Value is true' ? 'Someting' : 'Nothing' => 'Something'

5.What is the result of this expression? (or multiple ones) var name = 'World!';(function () { if (typeof name === 'undefined') { var name = 'Jack'; console.log('Goodbye ' + name); } else { console.log('Hello ' + name); }})();
Goodbye JackHello JackHello undefinedHello World

The var declaration is hoisted to the function scope, but the initialization is not.


6.What is the result of this expression? (or multiple ones) var END = Math.pow(2, 53);var START = END - 100;var count = 0;for (var i = START; i <= END; i++) { count++;}console.log(count);
0100101other

it goes into an infinite loop, 2^53 is the highest possible number in javascript, and 2^53+1 gives 2^53, so i can never become larger than that.


收获; 2^53是JavaScript能表示的最大整数,当i === 2^53时之后再执行+1,i的值因为不能再大所以还是2^53满足等于的判断,无限循环.

7.What is the result of this expression? (or multiple ones) var ary = [0,1,2];ary[10] = 10;ary.filter(function(x) { return x === undefined;});
[undefined × 7][0, 1, 2, 10][][undefined]

Array.prototype.filter is not invoked for the missing elements.


收获: Array.prototype.filter(callback[,thisArg]) 产生一个新数组,原数组中的每一个元素经过callback的计算,函数返回true的进入新数组, 没有值的数组位置不调用callback,数组中没有调用callback的元素,不进入新数组.(因为if(i in arr)才进行操作). 
(1)callback(element,index,array)
(2)void 操作符: void操作符计算其后面的表达式,并且返回undefined.[The void operator evaluates the given expression and then returns undefined]

8.What is the result of this expression? (or multiple ones) var two = 0.2var one = 0.1var eight = 0.8var six = 0.6[two - one == one, eight - six == two]
[true, true][false, false][true, false]other

JavaScript does not have precision math, even though sometimes it works correctly.

9.What is the result of this expression? (or multiple ones) function showCase(value) { switch(value) { case 'A': console.log('Case A'); break; case 'B': console.log('Case B'); break; case undefined: console.log('undefined'); break; default: console.log('Do not know!'); }}showCase(new String('A'));
Case ACase BDo not know!undefined

switch uses === internally and new String(x) !== x

收获: switch进行的比较是===,不进行类型的隐式转换, new String('a') == 'a' -> true, new String('a') === 'a' -> false
new出来的是一个对象,而'a'是一个字符串 new String('a').toString() === 'a' -> true

10.What is the result of this expression? (or multiple ones) function showCase2(value) { switch(value) { case 'A': console.log('Case A'); break; case 'B': console.log('Case B'); break; case undefined: console.log('undefined'); break; default: console.log('Do not know!'); }}showCase2(String('A'));
Case ACase BDo not know!undefined

String(x) does not create an object but does return a string, i.e. typeof String(1) === "string"


收获: String()和字符串字面量相同

11.What is the result of this expression? (or multiple ones) function isOdd(num) { return num % 2 == 1;}function isEven(num) { return num % 2 == 0;}function isSane(num) { return isEven(num) || isOdd(num);}var values = [7, 4, '13', -9, Infinity];values.map(isSane);
[true, true, true, true, true][true, true, true, true, false][true, true, true, false, false][true, true, false, false, false]

Infinity % 2 gives NaN, -9 % 2 gives -1 (modulo operator keeps sign so it's result is only reliable compared to 0)


收获: (1)负数取模,结果为其正数取模之后加负号,余数是0则依然为0.(2)当字符串参与运算时,如果是纯数字字符串则按数字计算(包括负数字符串'-5'%2 -> -1),与+不同只要运算符中有一个字符串(即使是纯数字字符串也按字符串计算)结果就是字符串

12.What is the result of this expression? (or multiple ones) parseInt(3, 8)parseInt(3, 2)parseInt(3, 0)
3, 3, 33, 3, NaN3, NaN, NaNother

3 doesn't exist in base 2, so obviously that's a NaN, but what about 0? parseInt will consider a bogus radix and assume you meant 10, so it returns 3.


13.What is the result of this expression? (or multiple ones) Array.isArray( Array.prototype )
truefalseerrorother

Array.prototype is an Array. Go figure.


收获: Array.prototype 是数组,并且应该是带了很多字符串属性(比如Array.prototype.concat..)的数组.

14.What is the result of this expression? (or multiple ones) var a = [0];if ([0]) { console.log(a == true);} else { console.log("wut");}
truefalse"wut"other

[0] as a boolean is considered true. Alas, when using it in the comparisons it gets converted in a different way and all goes to hell.


收获: 比较的时候[0]竟然不是true...应该被认为是0了..[1] == true -> true..[0] == true -> false..还是不用为好.Boolean([0]) -> true.一定要用的话,比较前转换一下吧.

15.What is the result of this expression? (or multiple ones) []==[]
truefalseerrorother

== is the spawn of satan.


见解: 个人认为是两个对象进行比较,比较引用,因此不相等.

16.What is the result of this expression? (or multiple ones) '5' + 3 '5' - 3
"53", 28, 2errorother

Strings know about + and will use it, but they are ignorant of - so in that case the strings get converted to numbers.

收获: 同前面那个模运算(%)一样,字符串的纯数字在进行数字运算时会被当作数字,'+'除外.

17.What is the result of this expression? (or multiple ones) 1 + - + + + - + 1
21errorother

Great fun.

收获: 不要把表达式写的这么奇葩好不好..

18.What is the result of this expression? (or multiple ones) var ary = Array(3);ary[0]=2ary.map(function(elem) { return '1'; });
[2, 1, 1]["1", "1", "1"][2, "1", "1"]other

The result is ["1", undefined × 2], as map is only invoked for elements of the Array which have been initialized.


收获: map函数的实现中会构造和调用数组一样长度的数组作为返回,同时把原数组有值的位置进行计算放入新数组对应位置,原数组没有值的位置不进行操作.

19.What is the result of this expression? (or multiple ones) function sidEffecting(ary) { ary[0] = ary[2];}function bar(a,b,c) { c = 10 sidEffecting(arguments); return a + b + c;}bar(1,1,1)
312errorother

The result is 21, in javascript variables are tied to the arguments object so changing the variables changesarguments and changing arguments changes the local variables even when they are not in the same scope.


20.What is the result of this expression? (or multiple ones) var a = 111111111111111110000, b = 1111;a + b;
111111111111111111111111111111111111110000NaNInfinity

Lack of precision for numbers in JavaScript affects both small and big numbers.

疑问: 为何整数也缺少精度??

21.What is the result of this expression? (or multiple ones) var x = [].reverse;x();
[]undefinederrorwindow

[].reverse will return this and when invoked without an explicit receiver object it will default to the defaultthis AKA window


收获: 常规来说reverse函数有一个显式的接收者作为this, 函数返回这个this, 此处x的this是window, 全局对象

22.What is the result of this expression? (or multiple ones) Number.MIN_VALUE > 0
falsetrueerrorother

Number.MIN_VALUE is the smallest value bigger than zero, -Number.MAX_VALUE gets you a reference to something like the most negative number.


收获: MIN_VALUE是能表示的最小的大于0的值

23.What is the result of this expression? (or multiple ones) [1 < 2 < 3, 3 < 2 < 1]
[true, true][true, false]errorother

Implicit conversions at work. both true and false are greater than any number.


24.What is the result of this expression? (or multiple ones) // the most classic wtf 2 == [[[2]]]
truefalseundefinedother

both objects get converted to strings and in both cases the resulting string is "2"


收获: 将非Date类型对象转换为原始类型,优先尝试'valueOf'然后尝试'toString',还是没太搞明白, 为何都转换为字符串了?

25.What is the result of this expression? (or multiple ones) 3.toString()3..toString()3...toString()
"3", error, error"3", "3.0", errorerror, "3", errorother

3.x is a valid syntax to define "3" with a mantissa of x, toString is not a valid number, but the empty string is.


收获: 3.5.toString() -> '3.5'

26.What is the result of this expression? (or multiple ones) (function(){ var x = y = 1;})();console.log(y);console.log(x);
1, 1error, error1, errorother

y is an automatic global, not a function local one.


收获: 大意了, y没用var声明

27.What is the result of this expression? (or multiple ones) var a = /123/, b = /123/;a == ba === b
true, truetrue, falsefalse, falseother

Per spec Two regular expression literals in a program evaluate to regular expression objects that never compare as === to each other even if the two literals' contents are identical.



28.What is the result of this expression? (or multiple ones) var a = [1, 2, 3], b = [1, 2, 3], c = [1, 2, 4];a == b; a === b; a > c; a < c;
false, false, false, truefalse, false, false, falsetrue, true, false, trueother

Arrays are compared lexicographically with > and <, but not with == and ===


收获: 数组的大于小于是用字典序进行比较.

29.What is the result of this expression? (or multiple ones) var a = {}, b = Object.prototype;[a.prototype === b, Object.getPrototypeOf(a) === b]
[false, true][true, true][false, false]other

Functions have a prototype property but other objects don't so a.prototype is undefined. 
Every Object instead has an internal property accessible via Object.getPrototypeOf


30.What is the result of this expression? (or multiple ones) function f() {}var a = f.prototype, b = Object.getPrototypeOf(f);a === b
truefalsenullother

f.prototype is the object that will become the parent of any objects created with new f whileObject.getPrototypeOf returns the parent in the inheritance hierarchy.


31.What is the result of this expression? (or multiple ones) function foo() { }var oldName = foo.name;foo.name = "bar";[oldName, foo.name]
error["", ""]["foo", "foo"]["foo", "bar"]

name is a read only property. Why it doesn't throw an error when assigned, I do not know.


收获; 函数的name是只读属性,赋值无效,但不抛出异常.

32.What is the result of this expression? (or multiple ones) "1 2 3".replace(/\d/g, parseInt)
"1 2 3""0 1 2""NaN 2 3""1 NaN 3"

String.prototype.replace invokes the callback function with multiple arguments where the first is the match, then there is one argument for each capturing group, then there is the offset of the matched substring and finally the original string itself. so parseInt will be invoked with arguments 1, 0, 2, 2, 3, 4.

33.What is the result of this expression? (or multiple ones) function f() {}var parent = Object.getPrototypeOf(f); f.name // ? parent.name // ? typeof eval(f.name) // ? typeof eval(parent.name) // ?
"f", "Empty", "function", "function""f", undefined, "function", error"f", "Empty", "function", errorother

The function prototype object is defined somewhere, has a name, can be invoked, but it's not in the current scope.


收获: Function.prototype.name -> 'Empty'(长知识了..) 还有eval的参数是字符串类型的代码,上述代码相当于 typeof f -> 'function' 和 typeof Empty -> 报错

34.What is the result of this expression? (or multiple ones) var lowerCaseOnly = /^[a-z]+$/; [lowerCaseOnly.test(null), lowerCaseOnly.test()]
[true, false]error[true, true][false, true]

the argument is converted to a string with the abstract ToString operation, so it is "null" and "undefined".

收获: test函数参数自动转换为字符串!

35.What is the result of this expression? (or multiple ones) [,,,].join(", ")
", , , ""undefined, undefined, undefined, undefined"", , """

JavaScript allows a trailing comma when defining arrays, so that turns out to be an array of three undefined.


收获; 在join函数执行时, undefined和''空字符串效果类似

36.What is the result of this expression? (or multiple ones) var a = {class: "Animal", name: 'Fido'};a.class
"Animal"Objectan errorother

The answer is: it depends on the browser. class is a reserved word, but it is accepted as a property name by Chrome, Firefox and Opera. It will fail in IE. On the other hand, everybody will accept most other reserved words (int, private, throws etc) as variable names too, while class is verboten.


收获: 不要用关键字做变量名产生歧义.

D打卡签到,蓝牙中继,广播信号模拟器 模拟WIFI或蓝牙,有如下4种运行模式 1、WIFI模式:指定SSID、BSSID名称等,模拟WIFI,供设备连接。 2、蓝牙静态模式:指定MAC地址,广播固定的RAW数据。 3、蓝牙动态主机模式:扫描周围蓝牙设备,获取指定MAC地址的蓝牙及其RAW数据,实时发送至Cloud云端,可以设定时间段,只在设定的时间段内发送。 4、蓝牙动态从机模式:指定MAC地址,从Cloud云端获取动态主机模式实时上传的该MAC地址的RAW数据,并广播RAW数据。 准备工作: 1、板子:选择ESP32C3或ESP32C3 Supermini 2、nRF Connect手机app:用于扫描获取待模拟蓝牙设备的MAC和RAW数据。 Wifi分析仪或WiFi魔盒手机APP:用于扫描获取待模拟WIFI设备的SSID和BSSID。 3、可使用官方flash_download_tool_3.9.11工具来固件烧录。 使用说明: 上述完成后,设备首次上电,RESET一侧的指示灯会常亮,可以把它理解成电源指示灯; BOOT一侧的灯会亮,该灯常亮,表示设备开启了AP模式,此时设备会发射一个WIFI信号源,名称为ESPWIFI_AP,密码为12345678,手机或电脑连接该WIFI,浏览器输入192.168.4.1,进入设备的配置页面,进行相应的配置,其中动态主机模式和动态从机模式的SSID、Pwd 及要模拟的蓝牙MAC地址。配置完成并保存后,会重启,重启后设备会按照保存的配置运行。若下次要修改设备配置,可以长按BOOT按键,等待BOOT一侧的灯常亮,即进入AP模式,再按照上述流程配置即可。 仅用于蓝牙设备的开发与调试,请勿用于签到等违法违纪用途。 立即下载

相关推荐

YOLO26算法心电图十二导联目标检测+训练好的模型+368张数据集+pyqt可视化界面.zip

附训练好的 YOLO 权重与 PyQt 可视化检测界面,页面底部含可视化效果预览,毕设/课设开箱即用。 【数据集概况】 · 检测类别(中文):[导联I(I), 导联II(II), 导联III(III), 胸导联V1(V1), 胸导联V2(V2), 胸导联V3(V3), 胸导联V4(V4), 胸导联V5(V5), 胸导联V6(V6), 加压肢体导联aVF(aVF), 加压肢体导联aVL(aVL), 加压肢体导联aVR(aVR)] · 训练集:313 张 · 验证集:37 张 · 测试集:18 张 · 总计:368 张 该数据集聚焦于临床心电图信号的精准识别与定位,其核心检测目标为标准12导联心电图中的各个独立导联波形区域,涵盖肢体导联(I、II、III)与加压肢体导联(aVR、aVL、aVF),以及胸前导联(V1至V6),适用于心电图自动分析系统中对各导联位置的快速准确标注与分类。数据采集场景真实还原了医院心电图室或急诊监护环境下的标准心电图记录纸,波形清晰、基线稳定,具有高度临床参考价值。... 【训练曲线与评估图】 【模型训练配置】 参数 | 值 模型 | yolo26n 训练轮数 | 100 epochs 输入尺寸 | 640x640 批次大小 | 24 优化器 | auto 初始学习率 | 0.01 训练设备 【关键指标汇总】 训练了 57 个 epoch,最终轮指标: 指标 | 数值 mAP50 | **0.9708** mAP50-95 | 0.6344 Precision | 0.8990 Recall | 0.9191 train/box_loss | 1.2231 train/cls_loss | 0.9703 val/box_loss | 1.2779 val/cls_loss | 0.... 使用场景:毕业设计、课程设计、深度学习入门、工业场景落地验证。

死磕 36 个 JS 手写题(转载)

这篇文章特别好, 提升比较大, 目前我才看到一半的位置。 希望以后反复阅读

AzeShinja的博客 402

企业级AI助手平台 开箱即用的全栈AI平台,支持多智能体协同、Supervisor模式编排、多种决策模式、RAG技术和流程编排能力 支持多厂商大模型统一接入与管理,安全可控的企业知识库与高精度检索优化

企业级AI应用开发框架,支持多厂商大模型统一接入与管理,安全可控的企业知识库与高精度检索优化能力,提供可视化流程编排、自主决策智能体与多智能体协同调度,兼容主流 Agent Skill 协议,帮助企业与开发者零门槛快速构建安全、高效、可落地的AI智能体应用与行业解决方案。

Python联系题2--对称数判定

import math x=int(input('please input a number\n')) #获取数字位数 y=x n=0 while 1:     y=int(y/10)     n+=1     if y==0:         break         '''12321%10-0==(12321%100000-12321%10000)10000

guanruijie34的博客 4330

Java低代码, 轻量级, 支持国产化 国密 AI大模型MCP服务 商业免费 包括核心模块如:组织机构、角色用户、权限授权、数据权限、内容管理、工作流、Spring Cloud 微服务、AI大模型等

Java低代码, 轻量级, 支持国产化 国密 AI大模型MCP服务 商业免费 Spring Boot, MyBatis, Flowable, TypeScript, Vue, Antdv, 包括核心模块如:组织机构、角色用户、权限授权、数据权限、内容管理、工作流、Spring Cloud 微服务、AI大模型、代码生成器等

文创媒体电商行业智算中心(AIDC)建设规划方案.pptx

文创媒体电商行业智算中心(AIDC)建设规划方案.pptx

JavaScript专业八级测试,你能做对几道?

欢迎大家前往挑战,第一遍做我是很懵逼的,题目很多虽然很偏,也不具什么实用价值,但多学学总是好,看看你能做对多少。随便看看几个题目的画风:(说出输出或返回值) var val = ‘smtg’; console.log(‘Value is ’ + (val === ‘smtg’) ? ‘Something’ : ‘Nothing’); [ [3,2,1].reduce(Math.pow), [].r

MrZZhou的博客 810

集团企业数字化转型AI智能体平台规划及场景应用方案.pptx

集团企业数字化转型AI智能体平台规划及场景应用方案.pptx

每日一题(十)function showCase(value){ switch(value){ case 'A': console.log('case

题目描述:写出执行结果,并解释原因 function showCase(value){ switch(value){ case 'A': console.log('case A'); break; case 'B': console.log('case B'); ...

MFWSCQ的博客 2412

基于动态窗口法DWA的机器人路径规划研究(Matlab代码实现)

内容概要:本文系统研究了基于动态窗口法(DWA)的机器人局部路径规划算法,深入剖析其在动态环境中实现自主避障与实时轨迹优化的核心机制。文章详细阐述了DWA算法的速度空间采样策略、轨迹预测模型、动力学约束处理及多目标代价函数的设计原理,并通过构建完整的Matlab仿真框架验证算法有效性。结合典型场景的仿真实验,展示了机器人在复杂障碍物环境下如何实时生成安全、平滑且符合运动学约束的最优路径,充分体现了DWA在移动机器人导航中的实用性与鲁棒性。; 适合人群:具备机器人运动规划基础知识和Matlab编程能力,从事智能移动机器人、自动驾驶或服务机器人研发的研究生、科研人员及工程技术人员。; 使用场景及目标:①深入理解DWA算法的理论基础与实现细节;②掌握机器人局部路径规划的仿真实现方法;③为实际机器人系统的导航模块开发提供可复用的算法原型与代码参考;④作为进一步研究高级导航算法(如TEB、MPC)的技术基础。; 阅读建议:建议结合提供的Matlab代码逐模块分析与调试,重点关注速度采样、轨迹积分、障碍物距离计算及代价评估等关键环节,通过调整参数在不同地图环境中进行对比实验,以深刻把握算法性能与参数之间的关系,进而提升对实时路径规划系统设计的理解与应用能力。

【轴承故障诊断】用于轴承故障诊断的集中时频分析研究(Matlab代码实现)

内容概要:本文系统研究了用于轴承故障诊断的集中时频分析技术,重点解决了传统时频分析方法在处理非平稳信号时存在的能量分散与分辨率不足等问题。通过引入集中时频分析方法,能够有效聚焦信号能量,精确提取轴承故障特征频率,提升故障识别的准确性与时效性。文章详细阐述了该方法的理论基础,并结合仿真信号与实际实验数据验证其优越性能,同时提供了完整的Matlab代码实现流程,涵盖信号预处理、时频变换、参数优化及结果可视化等环节,便于读者复现与拓展应用。; 适合人群:具备一定信号处理理论基础和Matlab编程能力的研究生、科研人员,以及从事机械设备状态监测、故障诊断与预测性维护工作的工程技术人员。; 使用场景及目标:①应用于电机、风机、齿轮箱等旋转机械的早期轴承故障检测,实现故障预警;②提升工业设备运维系统的智能化水平,支撑预测性维护体系构建;③作为高校或研究机构在信号处理、机械故障诊断等课程中的教学案例与实践素材。; 阅读建议:建议读者结合文中提供的Matlab代码逐段运行与调试,深入理解集中时频分布的生成机制及其关键参数(如核函数选择、平滑窗口大小)对诊断效果的影响,并尝试将其应用于其他类型的机械故障信号分析中,开展对比研究以深化对该方法适用性的认识。

36个JS手写题

数据类型判断 typeof 可以正确识别:Undefined、Boolean、Number、String、Symbol、Function 等类型的数据,但是对于其他的都会认为是 object,比如 Null、Date 等,所以通过 typeof 来判断数据类型会不准确。但是可以使用 Object.prototype.toString 实现。 function typeOf(obj) { - let res = Object.prototype.toString.call(obj).split('

m0_59628052的博客 1281

LLaVA-1.5:多模态视觉问答新突破

LLaVA-1.5在多模态视觉问答(VQA)任务中取得了显著进展,主要得益于视觉-语言连接器的优化和特定任务数据集的增加。通过将连接器升级为两层MLP,模型在处理视觉与语言关系时表现更佳。同时,引入如OKVQA、OCRVQA等数据集,增强了模型在复杂视觉推理任务中的能力。在11个基准测试中,LLaVA-1.5超越了现有方法,展示了其强大的多模态能力。此外,模型通过提升输入图像分辨率、扩展语言模型和改进多语言能力,进一步提升了性能。尽管在短格式回答任务中初期表现不佳,但通过调整提示格式和微调,其性能显著提升

weixin_57060548的博客 945

javascript-puzzlers

序言 国外有一个网站,总共44道JS题目,挑战大家对JS是否熟悉,链接地址 下文是对这些题目的分析 parseInt && map map的回调函数需要三个参数callback(currentValue, index, array) MDN文档中指明parseInt第二个参数是一个2到36之间的整数值,用于指定转换中采用的基数。如果省略该参数或其值为0,则数字将以10为基础来解析。 如果该参数小于2或者大于36,则parseInt返回NaN。此外,转换失败也会返回NaN。 ["1", "2"

zwf193071的专栏 265

当vCenter的证书过期、Root密码过期、Root密码遗忘同时发生时的解决方法与步骤

vCenter,强制修改root密码,修改SSO User密码,修复证书过期问题

OCTSJimmy的专栏 5546

ROS相机内参标定详细步骤指南

相机标定的目的是为了确定相机内部参数和外部参数,以便修正图像并将图像坐标映射到世界坐标,或者从世界坐标映射到图像坐标。这个过程是计算机视觉和三维感知任务的关键步骤之一,它有以下主要目的: 1. **减小畸变**:相机镜头和传感器可能引入径向和切向畸变,使得图像中的直线变得弯曲或者物体的形状不准确。通过标定相机,可以矫正这些畸变,使图像更准确。

m0_56661101的博客 1万+

javascript-puzzlers题目笔记

1. ["1", "2", "3"].map(parseInt) parseInt(‘1’,0) = 1 radix为0时,返回第一个参数的值 parseInt(‘2’,1) = NaN radix小于 2 或者大于 36,则 parseInt() 将返回 NaN。 parseInt(‘3’,2) = NaN 除了“0、1”外,其它数字都不是有效二进制数字 parseInt(s,radix) s : 要被解析的值。如果参数不是一个字符串,则将其转换为字符串(使用 ToString 抽象操作)。《

weixin_43693458的博客 443

遥感大模型核心技术之自监督预训练技术研究(2025年9月版)

本文系统探讨了自监督预训练技术在遥感大模型构建中的核心作用。随着遥感数据进入"大数据"时代,传统监督学习面临"数据丰富、标签贫乏"的瓶颈,而自监督预训练通过设计代理任务从无标签数据中学习特征表示,成为驱动大模型发展的关键引擎。文章分析了遥感领域对自监督预训练的三大独特挑战:多源异构性、地理空间约束和时空动态性,并提出了针对性解决方案:掩码自编码(MAE)技术及其演进、地理对比学习与多模态融合、位置感知预训练与多任务学习。

panshengwu的博客 842

44道javaScript变态题(上)

转自:https://github.com/xiaoyu2er/blog/issues/1  原题来自: javascript-puzzlers 读者可以先去做一下感受感受. 当初笔者的成绩是 21/44... 当初笔者做这套题的时候不仅怀疑智商, 连人生都开始怀疑了.... 不过, 对于基础知识的理解是深入编程的前提. 让我们一起来看看这些变态题到底变态不变态吧!

漫游学海之旅 9419

《自然语言处理实战入门》文本分类 ---- 使用词向量与SVM 进行文本分类

文本分类用电脑对文本集(或其他实体或物件)按照一定的分类体系或标准进行自动分类标记。 它根据一个已经被标注的训练文档集合, 找到文档特征和文档类别之间的关系模型, 然后利用这种学习得到的关系模型对 新的文档进行类别判断 。文本分类从基于知识的方法逐渐转变为基于统计 和机器学习的方法。

shiter编写程序的艺术 2388

PSM倾向性评分分析介绍、spss进行倾向性评分分析示例

PSM倾向性评分分析介绍、spss进行倾向性评分分析示例

statistics+insight+vista+power 1481

[转载]JavaScript Puzzlers 解密:为什么 ["1", "2", "3"].map(parseInt) 返回 [1, NaN, NaN]?

JavaScript Puzzlers 解密:为什么 ["1", "2", "3"].map(parseInt) 返回 [1, NaN, NaN]? JavaScript Puzzlers!被称为 javascript 界的专业八级测验,感兴趣的 jser 可以去试试。 我试了一下, 36 道题只做对了 19 道, 算下来正确率为 53%,还没有及格。 第一题为[...

weixin_30888413的博客 98

静态时序分析(STA)基本概念

静态时序分析中常见概念(fasle Path,multicycle path等)

m0_61544122的博客 2254

JavaScript Puzzlers 解密(一):为什么 ["1", "2", "3"].map(parseInt) 返回 [1, NaN, NaN]?...

JavaScript Puzzlers! 被称为 javascript 界的专业八级测验,感兴趣的 jser 可以去试试。 我试了一下, 36 道题只做对了 19 道, 算下来正确率为 53%,还没有及格。 第一题为 ["1", "2", "3"].map(parseInt) 的返回值。 &gt; ["1", "2", "3"].map(parseInt) [1, NaN,

justJavaC的专栏 344

使用conda环境python3.13和python3.12下安装vllm过程记录

使用conda环境python3.13和python3.12下安装vllm过程记录

没刮胡子的程序员专栏 885

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

js--笔试题1

1.What is the result of this expression? (or multiple ones)题目:[typeof null, null instanceof Object]答案:["object",false]解析: ES的基本数据类型有Undefined,Null,Boolean,Number,String ES的复杂数据类型有Object。 typeof操作符是检

王欢的博客 2443

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

上一篇: 关于JavaScript中用name作为变量名
下一篇: GIT忽略文件方式
彼岸的风
博客等级 码龄15年 1粉丝 8原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值