当前位置: 首页 > 编程日记 > 正文

WebKit、Gecko使用图形库

2008年11月30日 星期日 上午 01:20
阅读了之后,觉得作为浏览器内核WebKit、Gecko,为了能高效美观的显示页面的内容,选择适当的图形库非常重要。如果图形库选择不当,往往会导致页面上显示的文字、图片不美观,看起来总让人觉得别扭,更为糟糕的是排列布局出现紊乱,简直无法阅览。

从浏览器发展的历史来看,IE系列浏览器的网页布局、文字图片显示的美观程度还是相当高的,也许这与Microsoft图形显示方面的功力相关,到目前为止linux桌面显示还是与传统的windows桌面显示有相当的差距。

相 比较Firefox1.5,Firefox3.0图形显示方面也有相当大的进步,这应该归功于完全采取Cario图形库来显示页面,目前应当完全达到了 IE6的显示效果。可见图形显示的好与坏,直接决定了一款浏览器的质量以及用户接受程度。那究竟什么是图形库?其主要功能是什么?目前WebKit、 Gecko可使用哪些图形库?它们在浏览器中是如何发挥其应有的作用呢?

一、图形库概述及其主要功能
A graphics library is a program designed to aid in rendering computer graphics to a monitor. This typically involves providing optimized versions of functions that handle common rendering tasks.

This can be done purely in software and running on the CPU, common in embedded systems, or being hardware accelerated by a GPU, more common in PCs. By employing these functions, a program can assemble an image to be output to a monitor. This relieves the programmer of the task of creating and optimizing these functions, and allows them to focus on building the graphics program.

目前主要的图形库有:
windows提供的GDI/GDI+、DirectX、OpenGL;
支持X的有Cario、GTK、QT、OpenGL;
其他的还有Skia(google提供)、Quartz 2D(apple提供)、wxWidget等;

一 般说来图形库只提供绘画图形,渲染文字、图片等,不管是2D还是3D,其往往不提供消息处理,简单的说来就是如何高效的在一块指定的画布上将线条、文字、 图片显示出来,其中往往涉及字体、颜色等;典型的图形库如GDI/GDI+、Cario、DirectX、Quartz 2D等;

而按钮、菜单、窗口等图形组件往往是基于图形库的基础上绘画出来的并有相对固定形状,同时一般具有消息处理功能;相关实现有GTK、QT、wxWidget、windows组件等;

其中GTK、QT、wxWidget、Skia等不仅提供图形组件,同时提供图形库的功能;而Cario则是一个纯粹的图形库,类似与Quartz 2D,目前GTK2则完全基于Cario来实现;

由 于浏览器页面元素的数量存在不确定性,将页面上的一些元素对应成图形组件可能导致一个页面使用组件过多的问题(早期的IE就曾出现使用GDI对象过多的现 象)。因此尽可能的将一个页面的所有元素显示在一个图形组件上,至于其显示交给图形库来处理,其消息响应交互交给DOM及原生窗口消息循环来完成。

从这里我们可以进一步的确认图形库在浏览器中的重要性,以及随着用户需求的增加及硬件的提升,浏览器中使用3D效果应该是一个大的方向。

二、Gecko中使用图形库Cario
1、Cario概述
Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System, Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Experimental backends include OpenGL (through glitz), XCB, BeOS, OS/2, and DirectFB.

Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available (eg. through the X Render Extension).

其主要优点在于其在X、Win32、Quartz的基础上统一了图形库的操作方式,同时支持PS、PDF、SVG、PNG/JPEG等图像格式的输出,极大的方便页面的再次利用,在glitz的支持下支持部分3D效果。

2、Cario在Gecko中的使用
首先提供一个gfxASurface抽象类,代表一块可以作画的画布;提供一个gfxContext类,它用来管理究竟如何作画,如画圆形、旋转,维护画布的状态、当前颜色、路径等,其往往需要一个gfxASurface子类实例来初始化;

其次不同的图形输出实现不同的gfxASurface子类如gfxWindowsSurface、gfxXlibSurface、gfxQuartzSurface、gfxGlitzSurface、gfxQuartzPDFSurface、gfxPSSurface等;

其次提供一个DeviceContextImpl类实现nsIDeviceContext接口,以描述指定原生Widget相关的字体属性及创建可以在该原生Widget上作画的nsIRenderingContext接口实现;

而nsThebesRenderingContext类实现了nsIRenderingContext接口,以供外部(如不同的DOM Node页面元素对应的不同Frame)在其上显示文字、图像、作图形等;

然后当解析、布局完DOM页面元素后需要画出不同的页面元素时则由DeviceContextImpl类实例来创建nsThebesRenderingContext类实现,并初始化它,其初始化代码如下:
nsThebesRenderingContext::Init(nsIDeviceContext* aContext, nsIWidget *aWidget)
{
nsThebesDeviceContext *thebesDC = static_castnsIRenderingContext接口究竟有哪些主要方法?
// RenderingContext interface
class nsIRenderingContext : public nsISupports
{
public:
.........................................................................
/**
* Initialize the RenderingContext
* @param aContext the device context to use.
* @param aWidget the widget to hook up to
* @result The result of the initialization, NS_Ok if no errors
*/
NS_IMETHOD Init(nsIDeviceContext* aContext, nsIWidget *aWidget) = 0;
/**
* Get the DeviceContext that this RenderingContext was initialized
* with. This function addrefs the device context. Though it might
* be better if it just returned it directly, without addrefing.
* @result the device context
*/
NS_IMETHOD GetDeviceContext(nsIDeviceContext *& aDeviceContext) = 0;

/**
* Sets the forground color for the RenderingContext
* @param aColor The color to set the RenderingContext to
*/
NS_IMETHOD SetColor(nscolor aColor) = 0;

/**
* Get the forground color for the RenderingContext
* @return The current forground color of the RenderingContext
*/
NS_IMETHOD GetColor(nscolor &aColor) const = 0;

/**
* Sets the font for the RenderingContext
* @param aFont The font to use in the RenderingContext
*/
NS_IMETHOD SetFont(const nsFont& aFont, nsIAtom* aLangGroup) = 0;

/**
* Sets the font for the RenderingContext
* @param aFontMetric The font metrics representing the
* font to use in the RenderingContext
*/
NS_IMETHOD SetFont(nsIFontMetrics *aFontMetrics) = 0;

/**
* Get the current fontmetrics for the RenderingContext
* @return The current font of the RenderingContext
*/
NS_IMETHOD GetFontMetrics(nsIFontMetrics *&aFontMetrics) = 0;

/**
* Add in a translate to the RenderingContext's transformation matrix
* @param aX The horizontal translation
* @param aY The vertical translation
*/
NS_IMETHOD Translate(nscoord aX, nscoord aY) = 0;

/**
* Add in a scale to the RenderingContext's transformation matrix
* @param aX The horizontal scale
* @param aY The vertical scale
*/
NS_IMETHOD Scale(float aSx, float aSy) = 0;

/**
* Draw a line
* @param aXO starting horiztonal coord in twips
* @param aY0 starting vertical coord in twips
* @param aX1 end horiztonal coord in twips
* @param aY1 end vertical coord in twips
*/
NS_IMETHOD DrawLine(nscoord aX0, nscoord aY0, nscoord aX1, nscoord aY1) = 0;

/**
* Draw a rectangle
* @param aRect The rectangle to draw
*/
NS_IMETHOD DrawRect(const nsRect& aRect) = 0;

/**
* Draw a string in the RenderingContext
* @param aString The string to draw
* @param aLength The length of the aString
* @param aX Horizontal starting point of baseline
* @param aY Vertical starting point of baseline.
* @param aSpacing inter-character spacing to apply
*/
NS_IMETHOD DrawString(const char *aString, PRUint32 aLength,
nscoord aX, nscoord aY,
const nscoord* aSpacing = nsnull) = 0;

/*
* Tiles an image over an area
* @param aImage Image to tile
* @param aXImageStart x location where the origin (0,0) of the image starts
* @param aYImageStart y location where the origin (0,0) of the image starts
* @param aTargetRect area to draw to
* @param aSubimageRect the subimage (in tile space) which we expect to
* sample from; may be null to indicate that the whole image is
* OK to sample from
*/
NS_IMETHOD DrawTile(imgIContainer *aImage,
nscoord aXImageStart, nscoord aYImageStart,
const nsRect * aTargetRect,
const nsIntRect * aSubimageRect) = 0;
...............................................................................
};

其中DrawString、DrawTile方法最常用,其分别对应如何显示文字及图像。
针对图形库显示文字的基本原理可以参考及。

至于图形库如何显示不同格式的图像可参考如gif、jpeg、png等。

Gecko对Cario的使用还体现在对canvas标签的实现,具体可参考nsCanvasRenderingContext2D.cpp、nsHTMLCanvasElement.cpp等。

三、WebKit中使用图形库
1、WebKit支持的图形库
目 前WebKit支持的图形库包括Cairo、Gtk、Qt、Wx、Cg、Mac、Skia等,虽然不同的图形库能支持不同的平台,但其在不同平台上的显示 效果也不尽相同。至于在一个指定的平台上究竟使用何种库,则显示出很大的灵活性。就目前来看,在windows平台上可选的图形库有Cairo、Qt、 Wx、Cg、Skia等,其中阐述了Chrome关于图形库的选择。

其实从WebKit的角度来看,它通过提供一组与Gecko中nsIRenderingContext类似的公共图形接口,而不同的图形库则根据自身的不同实现了这些公共图形接口,以提供给WebCore元素使用,从而可以让WebKit支持不同的图形库。

2、WebKit支持不同图形库的实现
在WebKit中提供了一个GraphicsContext类,其中包括所有的图形接口,完全类似nsIRenderingContext,针对不同平台的特性,其定义中包含一些不同平台特有的
宏及元素定义。

在 目录webcore\platform\graphics\下的子目录Cairo、Cg、Gtk、Mac、Qt、Win、Wx分别提供了 GraphicsContext类部分方法的实现,而公共的实现则在webcore\platform\graphics \GraphicsContext.cpp中提供。

其中我们非常值得关注的方法有drawText与drawImage,其实现如下:
void GraphicsContext::drawText(const TextRun& run, const IntPoint& point, int from, int to)
{
if (paintingDisabled())
return;

font().drawText(this, run, point, from, to);
}

void GraphicsContext::drawImage(Image* image, const FloatRect& dest, const FloatRect& src, CompositeOperator op, bool useLowQualityScale)
{
if (paintingDisabled() || !image)
return;

float tsw = src.width();
float tsh = src.height();
float tw = dest.width();
float th = dest.height();

if (tsw == -1)
tsw = image->width();
if (tsh == -1)
tsh = image->height();

if (tw == -1)
tw = image->width();
if (th == -1)
th = image->height();

if (useLowQualityScale) {
save();
setUseLowQualityImageInterpolation(true);
}
image->draw(this, FloatRect(dest.location(), FloatSize(tw, th)), FloatRect(src.location(), FloatSize(tsw, tsh)), op);
if (useLowQualityScale)
restore();
}

最 终的实现转交给类Font、Image的方法drawText、draw来实现,而不同实现如Cairo、Cg、Gtk、Mac、Qt、Win、Wx则会 针对类Font、Image分别提供部分对应的实现,而公共的实现则在webcore\platform\graphics\Font.cpp及 Image.cpp中提供。

3、不同平台GraphicsContext实例创建及使用
GraphicsContext 创建的时机往往在对应平台的WebView获得Paint消息事件时,进而将该GraphicsContext类实例传递给FrameView及其不同的 RenderObject实例,由不同的RenderObject实例来决定究竟如何来显示自身的内容,而GraphicsContext类实例提供了各 种的显示文字、图形、图像的方法以供RenderObject实例调用。其调用关系基本上与Gecko中的不同Frame对象使用 nsIRenderingContext接口方法类似。

创建GraphicsContext实例的示例如下:
//Gtk
static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose* event)
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
WebKitWebViewPrivate* priv = webView->priv;

Frame* frame = core(webView)->mainFrame();
GdkRectangle clip;
gdk_region_get_clipbox(event->region, &clip);
cairo_t* cr = gdk_cairo_create(event->window);
GraphicsContext ctx(cr);
ctx.setGdkExposeEvent(event);
if (frame->contentRenderer() && frame->view()) {
frame->view()->layoutIfNeededRecursive();

if (priv->transparent) {
cairo_save(cr);
cairo_set_operator(cr, CAIRO_OPERATOR_CLEAR);
cairo_paint(cr);
cairo_restore(cr);
}

frame->view()->paint(&ctx, clip);
}
cairo_destroy(cr);

return FALSE;
}

//win
void WebView::paintIntoBackingStore(FrameView* frameView, HDC bitmapDC, const IntRect& dirtyRect)
{
LOCAL_GDI_COUNTER(0, __FUNCTION__);

RECT rect = dirtyRect;

#if FLASH_BACKING_STORE_REDRAW
HDC dc = ::GetDC(m_viewWindow);
OwnPtr yellowBrush = CreateSolidBrush(RGB(255, 255, 0));
FillRect(dc, &rect, yellowBrush.get());
GdiFlush();
Sleep(50);
paintIntoWindow(bitmapDC, dc, dirtyRect);
::ReleaseDC(m_viewWindow, dc);
#endif

FillRect(bitmapDC, &rect, (HBRUSH)GetStockObject(WHITE_BRUSH));
if (frameView && frameView->frame() && frameView->frame()->contentRenderer()) {
GraphicsContext gc(bitmapDC);
gc.save();
gc.clip(dirtyRect);
frameView->paint(&gc, dirtyRect);
gc.restore();
}
}

//wx
void wxWebView::OnPaint(wxPaintEvent& event)
{
if (m_beingDestroyed || !m_impl->frame->view() || !m_impl->frame)
return;

wxAutoBufferedPaintDC dc(this);

if (IsShown() && m_impl->frame && m_impl->frame->document()) {
#if USE(WXGC)
wxGCDC gcdc(dc);
#endif

if (dc.IsOk()) {
wxRect paintRect = GetUpdateRegion().GetBox();

WebCore::IntSize offset = m_impl->frame->view()->scrollOffset();
#if USE(WXGC)
gcdc.SetDeviceOrigin(-offset.width(), -offset.height());
#endif
dc.SetDeviceOrigin(-offset.width(), -offset.height());
paintRect.Offset(offset.width(), offset.height());

#if USE(WXGC)
WebCore::GraphicsContext* gc = new WebCore::GraphicsContext(&gcdc);
#else
WebCore::GraphicsContext* gc = new WebCore::GraphicsContext((wxWindowDC*)&dc);
#endif
if (gc && m_impl->frame->contentRenderer()) {
if (m_impl->frame->view()->needsLayout())
m_impl->frame->view()->layout();

m_impl->frame->paint(gc, paintRect);
}
}
}
}

//Qt
void QWebFrame::render(QPainter *painter, const QRegion &clip)
{
if (!d->frame->view() || !d->frame->contentRenderer())
return;

d->frame->view()->layoutIfNeededRecursive();

GraphicsContext ctx(painter);
QVector vector = clip.rects();
WebCore::FrameView* view = d->frame->view();
for (int i = 0; i <>paint(&ctx, vector.at(i));
}

/*!
Render the frame into \a painter.
*/
void QWebFrame::render(QPainter *painter)
{
if (!d->frame->view() || !d->frame->contentRenderer())
return;

d->frame->view()->layoutIfNeededRecursive();

GraphicsContext ctx(painter);
WebCore::FrameView* view = d->frame->view();
view->paint(&ctx, view->frameGeometry());
}

4、WebKit 3D Port实现
在中提供了WebKit 对3D Port的支持与实现,其实现类似于Gtk+/Cairo图形库的实现,但其3D效果仅实现在Port层,没有对页面上的元素如文字、图像实现3D效果支持。

这里只是简单的了解WebKit中如何整合不同的图形库及其与WebCore的交互。要想更加深入的了解页面上的文字、图形、图像究竟是如何显示出来的,则需要更进一步的针对不同平台库进行学习与了解。

WebKit 中也支持canvas标签,该标签提供的接口与Gecko能提供的几乎一致,其具体实现可参考webcore\html \CanvasRenderingContext2D.cpp,结合GraphicsContext类的实现,应该能对canvas标签的实现有充分的理 解。

四、总结
其实关于图形库及其使用的内容非常的多,而对浏览器内核来讲能对图形库进行高效使用也是非常重要的一部分,所以在这里所谈到的内容也许只是一些皮毛,但希望能在此开阔一下了解浏览器内核特别是图形库使用方面的思路。

五、参考资源

Wiki Cairo
Cairo HomePage
Wiki Qt
Wiki GTK+
Wiki wxWidgets
Wiki GDI
Wiki DirectX
Wiki Quartz 2D
Wiki OpenGL
Wiki OpenGL ES

Wiki gif
Wiki jpeg
Wiki png

Clutter Toolkit
http://blog.chinaunix.net/uid-25554408-id-234904.html

转载于:https://www.cnblogs.com/Jason-Ch/articles/2855993.html

相关文章:

office使用技巧

Word绝招:一、 输入三个“”&#xff0c;回车&#xff0c;得到一条双直线&#xff1b;二、 输入三个“~”&#xff0c;回车&#xff0c;得到一条波浪线&#xff1b;三、 输入三个“*”或 “-”或 “#”&#xff0c;回车&#xff0c;惊喜多多&#xff1b;在单元格内输入now&…

怎样用matlab打开mw文,C# matlab混合编程 MWArray使用笔记

C# matlab混合编程徐凯Email&#xff1a;xukai19871105http://www.doczj.com/doc/1a6e191fff00bed5b9f31dbf.html这几天突然想搞一搞以前没有搞定的MATLABC#混合编程&#xff0c;今天把原来编写的代码拿出来看看&#xff0c;然后结合网上一些正确的和一些错误的代码看看&#x…

【Android OpenGL ES】阅读hello-gl2代码(二)Java代码

AndroidManifest.xml <?xml version"1.0" encoding"utf-8"?> <manifest xmlns:android"http://schemas.android.com/apk/res/android"package"com.android.gl2jni"><applicationandroid:label"string/gl2jni_ac…

activiti任务TASK

一、概要 设计TASK的表主要是&#xff1a;ACT_RU_TASK&#xff0c;ACT_HI_TASKINST&#xff08;见参考-activiti表&#xff09;&#xff1b;任务主要有&#xff1a;人工任务&#xff08;usertask&#xff09;,服务任务&#xff08;servicetask&#xff09;等&#xff1b;候选人…

matlab数值分析拟合实例,数值分析函数拟合matlab代码.doc

数值分析函数拟合matlab代码.doc 第一题MATLAB代码用SPLINE作图XI0204060810YI098092081064038X10012Y1NEWTON3XI,YI,X源代码见M文件Y2SPLINEXI,YI,XPLOTXI,YI, O ,X,Y1, R ,X,Y2, K 用CSAPE作图XI0204060810YI098092081064038X10012Y1NEWTON3XI,YI,X源代码见M文件PPCSAPEXI,YI…

ArrayList Iterator remove java.lang.UnsupportedOperationException

在使用Arrays.asList()后调用add&#xff0c;remove这些method时出现 java.lang.UnsupportedOperationException异常。这是由于Arrays.asList() 返回java.util.Arrays$ArrayList&#xff0c; 而不是ArrayList。Arrays$ArrayList和ArrayList都是继承AbstractList&#xff0c;rem…

android中方法调用super(..)的相关知识

java中的多态有重写 方法被子类重写后 父类的原方法就会被隐藏 当你又需要调用父类所定义的原方法 这个时候就可以用super来调用super调用指向了父类&#xff0c;在一些调用里可以很巧妙的利用&#xff0c;比如监听返回键了在onKeyDown的方法里&#xff0c;如果想让系统对back…

在使用Reference Source调试.Net 源代码时如何取消optimizations(代码优化)-翻译

当你在使用Reference Source functionality in VS 2008 调试.Net 的源代码的时候&#xff0c;你会发现很多变量没法再调试时查看。 这是因为源代码服务器上提供的代码默认是为最终销售优化过的&#xff08;optimized &#xff09;。这些值虽然你没法查看&#xff0c;但不会阻断…

java旅游网站毕业论文,基于JAVA技术的旅游网站的开发.doc

摘要: 这次毕设主要是为了实现基于JAVA技术的旅游网站的开发&#xff0c;方便人们近距离的出行游玩。网站的开发过程中用到了很多方法技术&#xff0c;最主要的是JAVA技术&#xff0c;用于编写后台的功能实现代码&#xff1b;框架采用的是Spring MVC&#xff0c;作为轻量级企业…

Spring 实践 -IoC

Spring 实践标签&#xff1a; Java与设计模式 Spring简介 Spring是分层的JavaSE/EE Full-Stack轻量级开源框架.以IoC(Inverse of Control 控制反转)和AOP(Aspect Oriented Programming 面向切面编程)为内核, 取代EJB的臃肿/低效/脱离现实. 主页http://spring.io/ IoC与DI IOC…

大话编程(一)

2013年1月15日 11:40:38 还有20分钟下班,实在忍不住了,想说点儿什么 编程入门的可以看看 (一)什么是0什么是1 有那么一堆叫半导体的东西,某个牛逼人用铜线连起来,组成了一个电路. 这个电路在一直通电的情况下,可以使某个点的电压保持不变, 如果这个点的电压大于某个值,就抽象为…

php 保存表单数据,使用jquery和php自动保存表单数据

我对PHP非常好,但是使用jQuery的总菜单,并且卡在自动保存表单数据中.自动保存功能在dummy.php中每30秒调用一次.我正在将用于处理的序列化表单数据( – >数据库)发送到savetest.php.此刻,我坚持这个问题&#xff1a;如何让savetest.php“监听”传入的数据并对其作出反应&…

Finalize/Dispose/Destructor

我总是会搞混这些东西&#xff0c;还是写下来帮助记忆。 Finalize 即Object.Finalize()&#xff0c;C#中不允许使用Finalize&#xff0c;析构器就等价于Finalize。 Destructor 析构器&#xff08;Destructor&#xff09;是在对象没有被引用的时候&#xff0c;由CLR自动调用的。…

linux 串口minicom配置使用

在minicom -s配置是记得取消硬件流控制。 1.minicom -o 配置文件 2.alias comminicom -o 配置文件 转载于:https://www.cnblogs.com/niceskyfly/p/5257713.html

POJ-1185 炮兵阵地 动态规划+状态压缩

由于递推的时候依赖于三个连续层的关系.一开始想着直接三重for循环,但是这里有个问题就是上一层的0位置上包括着上上层是0和1两种可能,而后者又对当前行有约束,因此该方法不行.当然有一个办法就是增加状态数,让状态能够表示是从1还是从0转移过来的.(这题有个解法是采用多进制的…

php字符串转换表达式,php处理字符串格式的计算表达式

有时候我们对每一种产品都有一个提成公式&#xff0c;而这个计算提成的公式是以字符串格式存在表中的当我们用这个计算公式时&#xff0c;他并不像我们写的&#xff1a;$a23*5;这样简单的能计算出结果&#xff0c;而它是个字符串所以&#xff0c;我们就必须把字符串转化为我们能…

JS函数式编程【译】5.2 函子 (Functors)

函子&#xff08;Functors&#xff09; 态射是类型之间的映射&#xff1b;函子是范畴之间的映射。可以认为函子是这样一个函数&#xff0c;它从一个容器中取出值&#xff0c; 并将其加工&#xff0c;然后放到一个新的容器中。这个函数的第一个输入的参数是类型的态射&#xff0…

[转]Introduction of iSCSI Target in Windows Server 2012

Introduction of iSCSI Target in Windows Server 2012 源地址&#xff1a;http://blogs.technet.com/b/filecab/archive/2012/05/21/introduction-of-iscsi-target-in-windows-server-2012.aspx The iSCSI Target made its debut as a free download for Windows 2008 R2 in A…

全国移动联通基站数据升级包(2013年1月基站升级包).rar

“全国移动联通基站数据升级包(2013年1月基站升级包).rar” 已经上传到CNBLOGS 地址&#xff1a;http://files.cnblogs.com/topwang-com/%E5%85%A8%E5%9B%BD%E7%A7%BB%E5%8A%A8%E8%81%94%E9%80%9A%E5%9F%BA%E7%AB%99%E6%95%B0%E6%8D%AE%E5%8D%87%E7%BA%A7%E5%8C%85(2013%E5%B9%…

php自动计算增长率,如何写sql计算增长率?

问题已有数据表(假定表名为t)time sale1999 4844904672000 651413668.92001 13713710082002 18177416252003 25053320952004 37654384862005 48177203842006 6083322598需要产生如下的数据表time sale …

我先了解一下博客园创建随笔/文章/日记的过程与三者的区别(隐私等级,是否审核等)...

我先了解一下博客园创建随笔/文章/日记的过程与三者的区别(隐私等级,是否审核等)转载于:https://www.cnblogs.com/Totooria-Hyperion/p/5260289.html

构建Java并发模型框架

2002 年 2 月 22 日 Java的多线程特性为构建高性能的应用提供了极大的方便&#xff0c;但是也带来了不少的麻烦。线程间同步、数据一致性等烦琐的问题需要细心的考虑&#xff0c;一不小心就会出现一些微妙的&#xff0c;难以调试的错误。另外&#xff0c;应用逻辑和线程逻辑纠缠…

Unity Note 1

1.把开始时间设定到播放完成的时间点&#xff0c;作为倒放的起点 animation["clip"].timeanimation["clip"].clip.length; animation["clip"].speed-1; animation.Play("clip"); 2.寻找场景中物体var door GameObject.Find(…

基于matlab的硅晶体模型,基于Matlab的图像处理技术识别硅太阳电池的缺陷

第 44 卷 第 7 期  2010 年 7 月 上 海 交 通 大 学 学 报 JOURNAL OF SHANGHAI J IAOTON G UNIVERSITY Vol. 44 No. 7   Jul. 2010   收稿日期 :20090908 作者简介 :柳效辉(19852) ,男 ,江西九江人 ,硕士生 ,主要从事光伏检测与光伏系统方面的研究. 徐  林(联系人) ,男 ,副…

spark- PySparkSQL之PySpark解析Json集合数据

PySparkSQL之PySpark解析Json集合数据 数据样本 12341234123412342|asefr-3423|[{"name":"spark","score":"65"},{"name":"airlow","score":"70"},{"name":"flume",&quo…

cmd库的导入Java,在cmd命令窗口导入第三方jar包来运行java文件

在cmd命令窗口导入第三方jar包来运行java文件&#xff0c;以下测试都是基于window环境&#xff0c;Linux环境没有测试。1、编译使用命令javac -cp或者javac -classpath本机测试&#xff1a;如下图所示&#xff0c;java文件路径为D:\workspace\demo,StringUtilsTest.java依赖了第…

JQuery 动态创建表单,并自动提交

前言&#xff1a;写这个是为了实现使用cookie进行自动登录的功能&#xff0c; 下面的代码是一个元素一个元素进行创建和赋值的&#xff0c; (可以尝试下将所有的html代码(form、input&#xff09;全部拼好以后放到${ } 中&#xff0c;再进行提交。) submit的时候注意下写法&…

(转)利用ArcScene进行三维地形模拟

本文摘自&#xff1a;http://www.sunzx.net/archive/1109.html 在ArcGIS Desktop中&#xff0c;可用于三维场景展示的程序为ArcGlobe和ArcScene&#xff0c;由于两者的差别&#xff0c;在三维场景展示中适用的情况有所不同。ArcScene是一个适合于展示三维透视场景的平台&#x…

Android使用自定义View时:Error inflating class错误的原因。

当在布局文件里使用自定义的View的时候&#xff0c;出现Error inflating class错误的原因&#xff1a; 1、没有定义inflate需要的默认构造函数&#xff1b; eg:自定义View为TestView,需要定义TestView(Context context),TestView(Context context,AttributeSet set); 2、这是个…

oracle的表几种连接比较,几种表连接方式的使用场景

1)nested loopnested loop&#xff0c;指的是两个表连接时, 通过两层嵌套循环来进行依次的匹配, 最后得到返回结果集的表连接方法.select t1.owner,t1.object_name,t2.OBJECT_IDfrom test_tab1 t1,test_tab2 t2where t1.OBJECT_ID t2.OBJECT_IDand ROWNUM select *from test_t…