- C++八股
Petrichorzncu
八股总结c++开发语言
这里写目录标题C++内存管理C++的构造函数,复制构造函数,和析构函数深复制与浅复制:构造函数和析构函数哪个能写成虚函数,为什么?C++数据结构内存排列结构体和类占用的内存:==虚函数和虚表的原理==虚函数虚表(Vtable)虚函数和虚表的实现细节==内存泄漏==指针的工作原理函数的传值和传址new和delete与malloc和freeC++内存区域划分C++11新特性C++常见新特性==智能指针
- Day_11
ROC_bird..
算法
面试题16.15.珠玑妙算-力扣(LeetCode)/***Note:Thereturnedarraymustbemalloced,assumecallercallsfree().*///下标和对应位置的值都一样,answer[0]+1,对应位置的值猜对了,但是下标不对,answer[1]+1int*masterMind(char*solution,char*guess,int*returnSiz
- malloc和new的区别及联系
月夜星辉雪
数据结构
一.区别1.用法上malloc是一个函数,而new是C++一个操作符malloc需要手动计算开辟的空间大小,new后面只需跟上空间的类型,如果有多个对象,加上[]给个数即可malloc申请的空间不能初始化,而new可以malloc返回void*,需要强制类型转换,而new返回对应类型的指针malloc失败会返回空指针,需要手动检查;new失败抛出异常,要用catch捕获2.底层原理上申请自定义类型
- 已知两个非降序链表序列S1与S2,设计函数构造出S1与S2合并后的新的非降序链表S3。输入格式:输入分两行,分别在每行给出由若干个正整数构成的非降序序列,用−1表示序列的结尾(−1不属于这个序列
无敌的大佬
链表windows数据结构
#include#includetypedefstructnode{//创建结构体intnum;structnode*next;//指针域}node,*list;//结构体指针structnode*CreateList()//Createalinkedlistinwhichyoucanenterdataelements{intd;listhead=(list)malloc(sizeof(node)
- 嵌入式八股文(一) C语言篇
云雨歇
学习笔记c语言
文章目录前言一、指针和变量二、关键字1.volatile2.const3.static4.extern三、数据结构1.结构体1.1结构体基本内容1.2通过指针对结构体赋值1.3结构体指针2.联合体3.链表3.1基本概念3.2链表的插入和删除4.栈(Stack)5.堆(Heap)6.队列四、内存1.内存分配的方法2.malloc和free3.内存泄漏4.内存溢出前言笔者在学习时发觉自己的C语言很久没
- 操作系统,虚拟内存,malloc分配器
深巷卖樱桃
算法改行学it程序人生机器学习c语言
讲计算机系统的时候我们提到了几个关键词:中间人,指令,基础,复用。本着以旧知识带动新知识的理念,我们来谈两个本质和系统相似的概念:虚拟内存;malloc分配器。一.和计算机系统的异同:1.同:中间人,指令,基础,复用2.异:计算机系统为内存里的指令和cpu牵线;虚拟内存为硬盘里的指令和内存空间牵线;malloc分配器为硬盘指令和内存空间里的堆(内存空间里的一部份区域)牵线二.计算机系统,虚拟内存和
- 【C语言】动态内存管理
我言秋日胜春朝★
C语言进阶c语言开发语言
目录一、动态内存管理函数:1、malloc:2、free:3、calloc:4、realloc:二、常见的错误:1、对NULL指针解引用:2、对动态开辟空间的越界访问:3、对非动态开辟内存的释放:4、使用free释放动态内存开辟的一部分:5、对同一块内存多次释放:6、动态内存开辟的空间忘记释放:(内存泄漏)前言:动态内存管理是在内存中的堆区上进行维护的:一、动态内存管理函数:1、malloc:这个
- C语言详细笔记--动态存储分配
Jasmine5606
C语言c语言笔记算法c#开发语言
动态存储分配是指程序运行过程中在需要时显示地申请内存空间、在不需要时释放内存空间的一种方法。通过使用动态存储分配,程序员可以在函数执行部分的任何地方使用动态存储分配函数或者回收内存空间,从而有效地使用内存空间。目录一、malloc()函数二、free()函数一、malloc()函数malloc()函数用于分配内存空间,函数原型如下:void*malloc(unsignedintsize);功能:在
- 【软考】希尔排序算法分析
王佑辉
软考算法算法软考
目录1.c代码2.运行截图3.运行解析1.c代码#include#includevoidshellSort(intdata[],intn){//划分的数组,例如8个数则为[4,2,1]int*delta;intk;//i控制delta的轮次inti;//临时变量,换值inttemp;intdk;intj;k=n;delta=(int*)malloc(sizeof(int)*(n/2));i=0;d
- 面试真题 | C++面试 30 题
TrustZone_Hcoco
ARM/Linux嵌入式面试面试c++java嵌入式硬件uboot单片机资料
1.new、delete、malloc、free关系delete会调用对象的析构函数,和new对应。free只会释放内存,new调用构造函数。malloc与free是C++/C语言的标准库函数,new/delete是C++的运算符。它们都可用于申请动态内存和释放内存。对于非内部数据类型的对象而言,光用maloc/free无法满足动态对象的要求。对象在创建的同时要自动执行构造函数,对象在消亡之前要自
- 文章的目录
TrustZone_Hcoco
ARM/Linux嵌入式面试java开发语言
C++基础知识汇总C++基础知识30问题1.new、delete、malloc、free关系2.delete与delete[]区别3.C++有哪些性质(面向对象特点)4.子类析构时要调用父类的析构函数吗?5.多态,虚函数,纯虚函数6.求下面函数的返回值(微软)7.什么是“引用”?8.将“引用”作为函数参数有哪些特点?9.在什么时候需要使用“常引用”?10.将“引用”作为函数返回值类型的格式、好处和
- C++复习day06
ao_lang
C++c++java算法
一、内存管理1.课件上关于内存分配的题目intglobalVar=1;staticintstaticGlobalVar=1;voidTest(){staticintstaticVar=1;intlocalVar=1;intnum1[10]={1,2,3,4};charchar2[]="abcd";constchar*pChar3="abcd";int*ptr1=(int*)malloc(sizeo
- OpenCV内存池管理(二)
globbo
c/c++图像处理数据结构与算法opencv内存
上一节绘制了基本的Opencv内存池结构,本节着重讲解一下运行的流程,注意没有考虑线程安全。1、三个链表在上一节的图中,有三个主要的链表:①内存池自由链:单向链接的Block区块。②Block区块的私有链:单向链接的区块内释放过的地址链表③通过START和FREE管理的双向链表。2、fastmalloc()流程3、falstfree()流程4、总结通过上面的几个图示,大致能了解内存分配的基本流程,
- 16 C语言使用堆实现优先队列
天黑我就困
数据结构与算法c语言算法数据结构
#include"stdio.h"#include"stdlib.h"typedefintElemType;typedefstructMaxHeap{ElemType*arr;intsize;intcapacity;}Heap;Heap*initHeap(){Heap*heap=(Heap*)malloc(sizeof(Heap));if(heap==NULL){exit(-1);}heap->s
- Linux安装redis执行make命令报错:gcc not found和*** [adlist.o] Error 1
Holy_Java
Mysql&Redis数据库开发需求&错误解决linuxcentos运维
目录第一章、问题分析与解决1.1)报错11.2)报错2友情提醒先看文章目录,大致了解文章知识点结构,点击文章目录可直接跳转到文章指定位置。第一章、问题分析与解决1.1)报错1报错问题1:gcc:Commandnotfound解决方式:执行命令:yum-yinstallgcc执行命令:yum-yinstallgcc1.2)报错2报错问题2:error:jemalloc/jemalloc.h:Nosu
- Coredump-X: exit的时候析构全局对象;double-free
mzhan017
gdb/coredumpcoredump
今天遇到一个例子,是在进程退出的时候,调用全局对象的析构函数,析构函数里调用了delete操作,但是delete操作,所要释放的指针,虽然不为0,但是之前已经被释放过了,不是合理的malloc内存:corrupteddouble-linkedlist。这种大多是多线程导致问题,最好是枷锁保护这个关键指针变量。#00xf7f1b129in__kernel_vsyscall()#10xf6868ae6
- [自用5.]C++动态内存的分配、使用和释放
.远_
C++学习笔记c++开发语言
new和deletenew和delete是运算符,不是函数,因此运行效率比较高为了与C语言兼容,C++仍保留了malloc和free,但是建议使用new和deletenew运算符使用方法:指针变量=new类型(常量);指针变量=new类型[表达式];//数组指针变量=new类型[表达式][表达式];//二维数组作用:从堆上分配一块“类型”指定大小的存储空间,返回首地址其中,常量是初始化的值,可以省
- Rocm-Programming with HIP 内存分配
青禾子的夏
HIPRocm异构计算
1.主机内存(HostMemory)hipHostMalloc是HIPAPI中的一个函数,它用于在主机上分配特殊的内存,这种内存被称为"pinned"或"page-locked"内存。这种内存有以下特点和用途:GPU地址空间映射:分配的内存被映射到系统中所有GPU的地址空间。这意味着GPU可以直接访问这块内存,而不需要数据复制操作。加速数据传输:使用hipHostMalloc分配的内存可以加速主机
- 循环队列 、二叉树
安亿103
服务器linuxc语言学习软件构建数据结构
1、循环队列特点:只允许在队尾入队,队头出队,遵循先进先出原则不能随机访问,不能随机插入1.1循环队列创建定义两个指针分别指向队头,队尾。初始化队头,队尾为0;SeqQueue*CreateSeqQueue(intMaxLen){SeqQueue*pTmpQueue=NULL;pTmpQueue=malloc(sizeof(SeqQueue));if(NULL==pTmpQueue){return
- C++学习笔记----6、内存管理(一)---- 使用动态内存(2)
王俊山IT
c++学习笔记开发语言
2.2、我的好朋友malloc怎么样了?如果你是一个C程序员,对啦,我就是,你可能会想,malloc()函数怎么样了。在C语言中,malloc()用于分配一定数量的内存字节。总的来讲,使用malloc()简单直接。在C++中malloc()函数依然存在,但你要尽量避免使用它。New比malloc()有优势的地方就是new不仅仅分配内存,它还构造对象。例如,考虑以下两行代码,使用了一个叫做Foo的假
- 十二、重载new、delete、()
木鱼_cc
1.堆内存操作符(operatornew/delete)适用于极个别情况需要定制的时候才用的到。一定很少用。//重载的newdelete,虽然说是用malloc和free实现,但还是会调用类的构造函数classA{public:A(){this->a=0;couta=a;}~A(){coutusingnamespacestd;classSqr{public:intoperator()(inti){
- egret项目游戏内存泄漏总结
独一人守座城
JS内存管理JS中内存的分配和回收都是虚拟机自动完成的,不需要像C/C++为每一个new/malloc操作去写配对的delete/free代码,不容易出现内存泄漏的问题。JS引擎中对变量的存储主要是在栈内存,堆内存。内存泄漏的实质是应该回收的对象出现意外而没有被回收,而是常驻内存。GC原理在堆中查看无用的对象,把这些对象占用的内存空间进行回收。浏览器上的GC(GabageCollection垃圾回
- ARM/Linux嵌入式面经(三十):腾讯 C++开发工程师
TrustZone_Hcoco
ARM/Linux嵌入式面试arm开发linuxc++芯片嵌入式硬件单片机
文章目录自我介绍:首先让我做了一个简短的自我介绍。volatile关键字:解释了volatile关键字的作用和使用场景。回答volatile关键字的作用和使用场景追问几个有深度的技术问题malloc底层:详细描述了malloc函数的底层实现机制。malloc函数的底层实现机制概述深度技术追问及答案虚函数:讲解了虚函数的概念和用途。回答虚函数的概念和用途追问有深度的技术问题及答案内联函数:解释了内联
- C语言 | Leetcode C语言题解之第388题文件的最长绝对路径
DdddJMs__135
分享C语言Leetcode题解
题目:题解:#defineMAX(a,b)((a)>(b)?(a):(b))intlengthLongestPath(char*input){intn=strlen(input);intpos=0;intans=0;int*level=(int*)malloc(sizeof(int)*(n+1));memset(level,0,sizeof(int)*(n+1));while(pos1){len+
- C++基础之指针(加精)
Mr.Crocodile
c++c++
指针真正的用武之地在于,在运行阶段分配未命名的内存以存储值。在这种情况下,只能通过指针来访问内存。在C语言中,可以用库函数malloc()来分配内存;在C++中仍然可以这样做,但C++还有更好的方法——new运算符。文章目录指针与数组深入探究探究一探究二探究三探究四探究五探究六探究七指针与字符串指针与结构`new`和`delete`使用规则int*ptr;ptr=(int*)0xB8000000;
- 指针的一些细节补充———C语言
光而不耀@lgy
c语言数据结构开发语言
野指针:1.未初始化的指针:eg:int*p;//未初始化的指针*p=5;//未定义行为,p是野指针———————————————————————————————————————————————————————————————————————————————————————————//解决方法://在动态内存开辟完成后应该进行检查int*p=(int*)malloc(sizeof(int));if
- C语言实现哈希表
白小筠
数据结构散列表c语言哈希算法
哈希表1、哈希表的创建#defineMAX10#defineNULL_KEY-1typedefintdata_type;typedefstruct{data_type*ele;intn;}hash_table;hash_table*create_hash_table(){hash_table*ht=(hash_table*)malloc(sizeof(hash_table));ht->n=0;ht
- 哈希表C语言实现详解
hurryddd
数据结构与算法
目录1、数据结构2、操作函数声明3、具体实现1、数据结构#defineHASH_TABLE_MALLOC(size)rt_malloc(size);#defineHASH_TABLE_REALLOC(p,size)rt_realloc(p,size);#defineHASH_TABLE_CALLOC(n,size)rt_calloc(n,size);#defineHASH_TABLE_FREE(p
- 解决WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail
蟹蟹呵呵
redisredis
解决WARNINGMemoryovercommitmustbeenabled!Withoutit,abackgroundsaveorreplicationmayfailunderlowmemorycondition.Beingdisabled,itcanalsocausefailureswithoutlowmemorycondition,seehttps://github.com/jemalloc
- C语言-内存函数
、sakura
c语言c++开发语言
内存函数在C语言中,当一个程序被加载到内存中运行,系统会为该程序分配一块独立的内存空间,并且这块内存空间又可以再被细分为很多区域,比如:栈区、堆区、静态区、全局区等栈区:保存局部变量。存储在栈区的变量,在函数执行结束后,会被系统自动释放。堆区:由malloc、calloc、realloc……等函数分配内存。其生命周期由free函数控制,在没有被释放之前一直存在,直到程序运行结束。栈内存定义在函数内
- 继之前的线程循环加到窗口中运行
3213213333332132
javathreadJFrameJPanel
之前写了有关java线程的循环执行和结束,因为想制作成exe文件,想把执行的效果加到窗口上,所以就结合了JFrame和JPanel写了这个程序,这里直接贴出代码,在窗口上运行的效果下面有附图。
package thread;
import java.awt.Graphics;
import java.text.SimpleDateFormat;
import java.util
- linux 常用命令
BlueSkator
linux命令
1.grep
相信这个命令可以说是大家最常用的命令之一了。尤其是查询生产环境的日志,这个命令绝对是必不可少的。
但之前总是习惯于使用 (grep -n 关键字 文件名 )查出关键字以及该关键字所在的行数,然后再用 (sed -n '100,200p' 文件名),去查出该关键字之后的日志内容。
但其实还有更简便的办法,就是用(grep -B n、-A n、-C n 关键
- php heredoc原文档和nowdoc语法
dcj3sjt126com
PHPheredocnowdoc
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Current To-Do List</title>
</head>
<body>
<?
- overflow的属性
周华华
JavaScript
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml&q
- 《我所了解的Java》——总体目录
g21121
java
准备用一年左右时间写一个系列的文章《我所了解的Java》,目录及内容会不断完善及调整。
在编写相关内容时难免出现笔误、代码无法执行、名词理解错误等,请大家及时指出,我会第一时间更正。
&n
- [简单]docx4j常用方法小结
53873039oycg
docx
本代码基于docx4j-3.2.0,在office word 2007上测试通过。代码如下:
import java.io.File;
import java.io.FileInputStream;
import ja
- Spring配置学习
云端月影
spring配置
首先来看一个标准的Spring配置文件 applicationContext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi=&q
- Java新手入门的30个基本概念三
aijuans
java新手java 入门
17.Java中的每一个类都是从Object类扩展而来的。 18.object类中的equal和toString方法。 equal用于测试一个对象是否同另一个对象相等。 toString返回一个代表该对象的字符串,几乎每一个类都会重载该方法,以便返回当前状态的正确表示.(toString 方法是一个很重要的方法) 19.通用编程:任何类类型的所有值都可以同object类性的变量来代替。
- 《2008 IBM Rational 软件开发高峰论坛会议》小记
antonyup_2006
软件测试敏捷开发项目管理IBM活动
我一直想写些总结,用于交流和备忘,然都没提笔,今以一篇参加活动的感受小记开个头,呵呵!
其实参加《2008 IBM Rational 软件开发高峰论坛会议》是9月4号,那天刚好调休.但接着项目颇为忙,所以今天在中秋佳节的假期里整理了下.
参加这次活动是一个朋友给的一个邀请书,才知道有这样的一个活动,虽然现在项目暂时没用到IBM的解决方案,但觉的参与这样一个活动可以拓宽下视野和相关知识.
- PL/SQL的过程编程,异常,声明变量,PL/SQL块
百合不是茶
PL/SQL的过程编程异常PL/SQL块声明变量
PL/SQL;
过程;
符号;
变量;
PL/SQL块;
输出;
异常;
PL/SQL 是过程语言(Procedural Language)与结构化查询语言(SQL)结合而成的编程语言PL/SQL 是对 SQL 的扩展,sql的执行时每次都要写操作
- Mockito(三)--完整功能介绍
bijian1013
持续集成mockito单元测试
mockito官网:http://code.google.com/p/mockito/,打开documentation可以看到官方最新的文档资料。
一.使用mockito验证行为
//首先要import Mockito
import static org.mockito.Mockito.*;
//mo
- 精通Oracle10编程SQL(8)使用复合数据类型
bijian1013
oracle数据库plsql
/*
*使用复合数据类型
*/
--PL/SQL记录
--定义PL/SQL记录
--自定义PL/SQL记录
DECLARE
TYPE emp_record_type IS RECORD(
name emp.ename%TYPE,
salary emp.sal%TYPE,
dno emp.deptno%TYPE
);
emp_
- 【Linux常用命令一】grep命令
bit1129
Linux常用命令
grep命令格式
grep [option] pattern [file-list]
grep命令用于在指定的文件(一个或者多个,file-list)中查找包含模式串(pattern)的行,[option]用于控制grep命令的查找方式。
pattern可以是普通字符串,也可以是正则表达式,当查找的字符串包含正则表达式字符或者特
- mybatis3入门学习笔记
白糖_
sqlibatisqqjdbc配置管理
MyBatis 的前身就是iBatis,是一个数据持久层(ORM)框架。 MyBatis 是支持普通 SQL 查询,存储过程和高级映射的优秀持久层框架。MyBatis对JDBC进行了一次很浅的封装。
以前也学过iBatis,因为MyBatis是iBatis的升级版本,最初以为改动应该不大,实际结果是MyBatis对配置文件进行了一些大的改动,使整个框架更加方便人性化。
- Linux 命令神器:lsof 入门
ronin47
lsof
lsof是系统管理/安全的尤伯工具。我大多数时候用它来从系统获得与网络连接相关的信息,但那只是这个强大而又鲜为人知的应用的第一步。将这个工具称之为lsof真实名副其实,因为它是指“列出打开文件(lists openfiles)”。而有一点要切记,在Unix中一切(包括网络套接口)都是文件。
有趣的是,lsof也是有着最多
- java实现两个大数相加,可能存在溢出。
bylijinnan
java实现
import java.math.BigInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class BigIntegerAddition {
/**
* 题目:java实现两个大数相加,可能存在溢出。
* 如123456789 + 987654321
- Kettle学习资料分享,附大神用Kettle的一套流程完成对整个数据库迁移方法
Kai_Ge
Kettle
Kettle学习资料分享
Kettle 3.2 使用说明书
目录
概述..........................................................................................................................................7
1.Kettle 资源库管
- [货币与金融]钢之炼金术士
comsci
金融
自古以来,都有一些人在从事炼金术的工作.........但是很少有成功的
那么随着人类在理论物理和工程物理上面取得的一些突破性进展......
炼金术这个古老
- Toast原来也可以多样化
dai_lm
androidtoast
Style 1: 默认
Toast def = Toast.makeText(this, "default", Toast.LENGTH_SHORT);
def.show();
Style 2: 顶部显示
Toast top = Toast.makeText(this, "top", Toast.LENGTH_SHORT);
t
- java数据计算的几种解决方法3
datamachine
javahadoopibatisr-languer
4、iBatis
简单敏捷因此强大的数据计算层。和Hibernate不同,它鼓励写SQL,所以学习成本最低。同时它用最小的代价实现了计算脚本和JAVA代码的解耦,只用20%的代价就实现了hibernate 80%的功能,没实现的20%是计算脚本和数据库的解耦。
复杂计算环境是它的弱项,比如:分布式计算、复杂计算、非数据
- 向网页中插入透明Flash的方法和技巧
dcj3sjt126com
htmlWebFlash
将
Flash 作品插入网页的时候,我们有时候会需要将它设为透明,有时候我们需要在Flash的背面插入一些漂亮的图片,搭配出漂亮的效果……下面我们介绍一些将Flash插入网页中的一些透明的设置技巧。
一、Swf透明、无坐标控制 首先教大家最简单的插入Flash的代码,透明,无坐标控制: 注意wmode="transparent"是控制Flash是否透明
- ios UICollectionView的使用
dcj3sjt126com
UICollectionView的使用有两种方法,一种是继承UICollectionViewController,这个Controller会自带一个UICollectionView;另外一种是作为一个视图放在普通的UIViewController里面。
个人更喜欢第二种。下面采用第二种方式简单介绍一下UICollectionView的使用。
1.UIViewController实现委托,代码如
- Eos平台java公共逻辑
蕃薯耀
Eos平台java公共逻辑Eos平台java公共逻辑
Eos平台java公共逻辑
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
蕃薯耀 2015年6月1日 17:20:4
- SpringMVC4零配置--Web上下文配置【MvcConfig】
hanqunfeng
springmvc4
与SpringSecurity的配置类似,spring同样为我们提供了一个实现类WebMvcConfigurationSupport和一个注解@EnableWebMvc以帮助我们减少bean的声明。
applicationContext-MvcConfig.xml
<!-- 启用注解,并定义组件查找规则 ,mvc层只负责扫描@Controller -->
<
- 解决ie和其他浏览器poi下载excel文件名乱码
jackyrong
Excel
使用poi,做传统的excel导出,然后想在浏览器中,让用户选择另存为,保存用户下载的xls文件,这个时候,可能的是在ie下出现乱码(ie,9,10,11),但在firefox,chrome下没乱码,
因此必须综合判断,编写一个工具类:
/**
*
* @Title: pro
- 挥洒泪水的青春
lampcy
编程生活程序员
2015年2月28日,我辞职了,离开了相处一年的触控,转过身--挥洒掉泪水,毅然来到了兄弟连,背负着许多的不解、质疑——”你一个零基础、脑子又不聪明的人,还敢跨行业,选择Unity3D?“,”真是不自量力••••••“,”真是初生牛犊不怕虎•••••“,••••••我只是淡淡一笑,拎着行李----坐上了通向挥洒泪水的青春之地——兄弟连!
这就是我青春的分割线,不后悔,只会去用泪水浇灌——已经来到
- 稳增长之中国股市两点意见-----严控做空,建立涨跌停版停牌重组机制
nannan408
对于股市,我们国家的监管还是有点拼的,但始终拼不过飞流直下的恐慌,为什么呢?
笔者首先支持股市的监管。对于股市越管越荡的现象,笔者认为首先是做空力量超过了股市自身的升力,并且对于跌停停牌重组的快速反应还没建立好,上市公司对于股价下跌没有很好的利好支撑。
我们来看美国和香港是怎么应对股灾的。美国是靠禁止重要股票做空,在
- 动态设置iframe高度(iframe高度自适应)
Rainbow702
JavaScriptiframecontentDocument高度自适应局部刷新
如果需要对画面中的部分区域作局部刷新,大家可能都会想到使用ajax。
但有些情况下,须使用在页面中嵌入一个iframe来作局部刷新。
对于使用iframe的情况,发现有一个问题,就是iframe中的页面的高度可能会很高,但是外面页面并不会被iframe内部页面给撑开,如下面的结构:
<div id="content">
<div id=&quo
- 用Rapael做图表
tntxia
rap
function drawReport(paper,attr,data){
var width = attr.width;
var height = attr.height;
var max = 0;
&nbs
- HTML5 bootstrap2网页兼容(支持IE10以下)
xiaoluode
html5bootstrap
<!DOCTYPE html>
<html>
<head lang="zh-CN">
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">