最近做项目时,遇到了一个需求:要求div里文本在两行显示,div的宽度是固定的,如果溢出的话就显示省略号。单行文本的溢出问题,我们都很熟悉,只要添加以下css属性就ok: overflow: hidden; white-space: nowrap; //段落中文本不换行 text-overflow: ...
分类:
Web程序 时间:
2020-05-31 13:08:54
阅读次数:
92
第1章 Spark 概述 1.1 什么是 Spark 官网:http://spark.apache.org Spark 的产生背景 Spark 是一种快速、通用、可扩展的大数据分析引擎,2009 年诞生于加州大学伯克利分校 AMPLab,2010 年开源,2013 年 6 月成为 Apache 孵化 ...
分类:
其他好文 时间:
2020-05-30 22:09:09
阅读次数:
75
一行时,超出长度的部分变为省略号 .text-hidden { width:200px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } 注:通过width来控制字符串长度 多行时,在第n行超出的部分变为省略号 .text ...
分类:
Web程序 时间:
2020-05-30 20:05:06
阅读次数:
209
第五章学习了树与二叉树等相关内容 具体有如何去遍历一颗二叉树,分为层次遍历,先序遍历,中序遍历和后序遍历。其次还有最优的哈夫曼树,怎么去构造一棵哈夫曼树,从低往上构造等等。以及树的构造中会用到的链式存储及顺序存储结构还有借助数组来解决相关问题,定义树时采用的是递归的方式。 #include<iost ...
分类:
其他好文 时间:
2020-05-30 16:05:52
阅读次数:
78
题目:整除光棍(数学,思维) 题目链接:https://pintia.cn/problemsets/994805046380707840/problems/994805084284633088 题目大意: 给出光棍数定义:(如1,11,111) 而且任何一个光棍都能被一个不以5结尾的奇数整除。给出一 ...
分类:
其他好文 时间:
2020-05-30 16:04:40
阅读次数:
60
题目传送门!! 经典强联通题目。 对于一个强联通,如果其出度为0,则其中所有的奶牛都为明星。 注意,如果出现两个以上出度为0的强联通,则无法做到“被全部喜欢”, 应该特判输出“0”。 #include <bits/stdc++.h> using namespace std; #define N 10 ...
分类:
其他好文 时间:
2020-05-30 12:35:51
阅读次数:
54
题目: 给定一个整数数组 nums 和一个目标值 target,请你在该数组中找出和为目标值的那两个整数,并返回他们的数组下标。 你可以假设每种输入只会对应一个答案。但是,数组中同一个元素不能使用两遍。 示例: 给定 nums = [2, 7, 11, 15], target = 9 因为 nums ...
分类:
编程语言 时间:
2020-05-30 01:25:11
阅读次数:
117
Given a string, you are supposed to output the length of the longest symmetric sub-string. For example, given Is PAT&TAP symmetric?, the longest symme ...
分类:
其他好文 时间:
2020-05-30 01:16:17
阅读次数:
60
问题: 输入格式: 输入在一行中依次给出 3 个整数 A、B 和 D。 输出格式: 输出 A+B 的 D 进制数。 输入样例: 123 456 8 输出样例: 1103 总结: 考虑sum==0的情况 代码: #include <iostream>#include <cstring>#include ...
分类:
其他好文 时间:
2020-05-29 23:03:04
阅读次数:
69
问题描述: 总结: 忘记break;一直无法找见错误; 代码: #include <iostream>#include <cstring>#include <algorithm>#include <cstdio>#include <algorithm>//#include <sstream>//#i ...
分类:
其他好文 时间:
2020-05-29 21:15:09
阅读次数:
59