二分查找-JS实现
{代码...} 有序数组中查找
2017-01-05
MySQL中存储引擎和数据类型
存储引擎 一、查看存储引擎 输入show engines; {代码...} 或者输入show variables like 'have%'; {代码...} 一般来说MySQL默认存储引擎为InnoDB。 二、默认存储引擎 1.查看默认存储引擎 MySQL5.5版本之前默认存储引擎为MyISAM,5.5之后改为了InnoDB。 {代码...} 2.修改默认存储引擎 修改默认引擎有两种方式,一种为通过...
Apache Kyuubi 在B站大数据场景下的应用实践
近几年随着B站业务高速发展,数据量不断增加,离线计算集群规模从最初的两百台发展到目前近万台,从单机房发展到多机房架构。在离线计算引擎上目前我们主要使用Spark、Presto、Hive。架构图如下所示,我们的BI、ADHOC以及DQC服务都是通过自研的Dispatcher路由服务来实现统一SQL调度,Dispatcher会结合查询SQL语法特征、...
微信小程序项目-你是什么垃圾?
垃圾分类特别火也不知道北京什么时候也开始执行,看见之前上海市民被灵魂拷问了以后垃圾真的不知道如何丢了,作为程序员就做一个小程序造福人类吧。 效果图:一、全局的app.json和app.wxss加入了一点东西 App.json {代码...} App.wxss {代码...} 二、下面就是首页的index.wxml、index.js、 index.wxss index.wxml {代码....
2019-09-26
常用算法PHP版
下面分享一些最常见的算法,用PHP如何实现。 冒泡排序 function bubble_sort($arr) { {代码...} } 归并排序 function Merge(&$arr, $left, $mid, $right) { {代码...} }function MergeSort(&$arr, $left, $right) { {代码...} } 二分查找-递归 function bin_search($arr,$low,$high,$value) { {代码...} } 二分...
网上移值java 版微信发红包到 php 版
{代码...}
ES--ids查询
ES每一行数据,即文档都会有一个id,如果指定某一列field值作为id,则该列field必须为唯一键,类似于MySQL的UK;不过不指定,ES会自动生成,常常为了更好的定位数据,会指定一列满足UK的field作为文档的id,接下来我们说一下根据id查询。类似MySQL的 where id=?
2021-07-06
Computer Lab
You run four computer labs. Each lab contains computer stations that are numbered as shown in the table below:-Lab Number Computer Station Numbers1 1-52 1-63 1-44 1-3Each user has a unique five-digit ID Number. Whenever a user logs on, the user's ID, Lab Number, and the computer station are trans...
2021-11-10
SAP 电商云 Spartacus UI SSR 单元测试里的 callFake
callFake 的接口定义可以在 jasmine.js 里找到:SpyStrategy.callFake, 返回 Spy 对象。spy1 即 originalEngine,二者指向同一个对象实例:只要 spy1 即 originalEngine 这个函数被调用,则返回 callFake 指定的 mock 版本的实现:return originalEngineInstance,后者也是个 mock 对象。engine 本身是 Spartacus SSR 标...
2021-10-06
LeetCode -- Trie
In computer science, trie, also known as prefix tree or dictionary tree, is an ordered tree used to store associative arrays, in which the key is usually a string. Different from binary search tree, the key is not directly saved in the node, but determined by the location of the node in the tree....
2021-05-16
前端:css 瀑布流实现
1. 瀑布流布局 {代码...} 2. 解决column-count引起的内容割裂bug容器内加上样式 {代码...}
2021-04-28
[elixir! #0042] 与 rust 的初次会面
在看了许多安利 rust 的视频之后, 我决定花一个月的时间来尝试一下 rust. 一周过去了, 我对 Ownership, Lifetime 这些概念还是一头雾水, 但我也不求立刻理解 rust 里所有的概念, 因为它的其它部分同样引人注目.
2017-07-10
vue组件---搜索框
基础形态高级搜索搜索完成组件的基本代码 {代码...} 同时,也写入了全局混入 {代码...} 上面代码中涉及到一个packageRequestAndResults方法 {代码...} 上面有一个searchBaseData,下面即将出场页面使用 {代码...} item-num必须与搜索item的个数一致,绑定results,clear,search无需改名,因为上面的mixins中已定义,除非...
long-sql优化实例 todo
Table InformationCreated: 2016-09-12Engine: InnoDBRows: 815558Size: 282 MiBEncoding: utf8_general_ciAuto-Increment: 1384415
2017-07-04
gitbook 入门教程之使用 gitbook-cli 开发电子书
gitbook 生成电子书主要有三种方式: gitbook-cli 命令行操作,简洁高效,适合从事软件开发的相关人员. gitbook-editor 编辑器操作,可视化编辑,适合无编程经验的文学创作者. gitbook.com 官网操作,在线编辑实时发布,适合无本地环境且科学上网的体验者. 本文主要讲解第一种 gitbook-cli 命令行操作流程,其他两种见另外两篇教...
2019-04-03
The Universal Recommender
The Universal Recommender (UR) is a new type of collaborative filtering recommender based on an algorithm that can use data from a wide variety of user taste indicators—it is called the Correlated Cross-Occurrence algorithm. Unlike the matrix factorization embodied in things like MLlib's ALS, The...
2018-03-17
nginx url rewriting: difference between break and last
Outside the location block, both break and last behave in the exact manner...
2018-04-11