文档库 最新最全的文档下载
当前位置:文档库 › Video and Audio Streaming with Flash and Open Source Tools

Video and Audio Streaming with Flash and Open Source Tools

Video and Audio Streaming with Flash and Open Source Tools
Video and Audio Streaming with Flash and Open Source Tools

1. Video and Audio Streaming with Flash and Open Source Tools

? 2005 Klaus Rechert

https://www.wendangku.net/doc/f815993940.html,/kfra/archive/2006/10/04/50003.aspx

Flash has always been developed and used for multimedia purposes, but until version 6 the possibilities for audio streaming were limited and also there was no video support. With Version 6 and 7 Macromedia introduced video support and a new file format to support various ways of streaming. This article covers only a streaming variant called "progressive download" which does not need server support. True streaming support is available with Macromedia's non-free Flash Communication Server (FCS).

FLV Streams

Streaming is build upon a new file format called FLV, which separates the streamable content and the flash movie. The result is a very compact flash movie acting as a multimedia player and a storage for streamable content from which the flash movie loads a stream on demand.

A single FLV stream contains at most one audio stream and at most one video stream. Flash supports uncompressed sound and various compressed formats like MP3 and ADPCM as well as the proprietary Nellymoser audio codec. With flash version 6 Macromedia also introduced video support for flash. In version 6 only the Sorenson H.263 video codec was supported which is a slightly modified version of the open H.263 standard. The latest flash version 7 introduced a second video format "Screen Video", which is a simple, loss less video format, especially developed for screen capturing.

Converting and Creating Content

One method for creating FLV streams is converting existing audio and video content with FFmpeg [https://www.wendangku.net/doc/f815993940.html,]. FFmpeg is a mature and very excellent software project for converting audio and video from and to various formats. Converting a video can be simply done with

ffmpeg -i infile.[avi|mpeg] stream.flv

FFmpeg uses the Sorenson H.263 video format for encoding video data. There is no support for the Screen Video format at this time. While the Screen Video format is mainly useful for screen capturing applications, Sorensons H.263 is multipurpose video codec with good compression rates, suitable especially for encoding motion pictures.

Another project dealing with FLV streams is called libflv [https://www.wendangku.net/doc/f815993940.html,]. While FFmpeg is a general audio and video converting suite, libflv is focused on working with FLV streams. The project is still in a very early stage, but is able encoding videos in the Screen Video format and allows simple FLV stream manipulations like (de-)multiplexing of audio and video streams. A simple GTK-based screen capturing application can be found in the example directory. Building a Simple Multimedia Player

After having created some streamable content, a flash multimedia player is needed. One huge advantage of flash based players over other plug-in based multimedia-players is that there are no

constraints about its look and how it is integrated in your sites design.

MING is an open source library which is able to create flash files with almost all recent flash features, including Action Script, sound and video support. The library also has language bindings for a bunch of script and programming languages. The examples presented in this article are written in PHP4. Porting the examples to other supported languages like C/C++, Java, Python or Perl should be trivial.

To run the following example a current CVS snapshot of MING is needed. It is available either via Sourceforges anonymous CVS service or pre-packaged at https://www.wendangku.net/doc/f815993940.html,/ming/. First we create a new move instance and set dimension and background color:

ming_useswfversion(7); $movie=new SWFMovie(7);

$movie->setDimension($width, $height); $movie->Background($r,$g,$b);

The new flash move can now be filled with flash objects called characters. For the multimedia player example we create a video canvas object and add it to the movie. The add() method takes a character and inserts it to the current frame and returns a handle to the object. This can be used to move, rotate, resize or remove an object. If the object is going to be used with ActionScript, a name can be assigned to it.

$stream = new SWFVideoStream(); $stream->setDimension($width,

$height); $item = $movie->add($stream); $item->moveTo($x, $y);

$item->setname("video");

The SWFVideoStream() constructor can also take a FLV file as argument. In this case the video stream will be embedded to the flash file. However this approach has some drawbacks. First of all the resulting flash movie will get as least as big as the stream. But also the stream's frame rate must not exceed the flash movies frame rate and each flash file is limited to 16000 frames, which means that the embedded stream can contain at most 16000 frames.

A multimedia player application should be able to load and play streams dynamically. Therefore the SWFVideoStream() constructor is called with no arguments. Thus only an empty video canvas will be created, which will be controlled by the following ActionScript code: connection = new NetConnection();

connection.connect(null);

stream = new NetStream(connection);

video.attachVideo(stream);

stream.setBufferTime(10);

stream.play('http://localhost/mystream.flv');

The ActionScript first creates a pseudo connection by passing null to the connect() method of the NetConnection object. In contrast, a real connection to a Macromedia streaming server can be made by passing a valid url to the method. Having a NetConnection instance a new NetStream object can be created and attached to the empty video canvas. This object handles streaming and provides methods for controlling the stream. The above example loads a FLV stream from the local web server with a downloadbuffer of 10 seconds. The ActionScript code can be compiled and added to the movie with:

$action = new SWFAction($action_string); $movie->add($action);

Until now the flash movie just loads and plays a certain FLV stream. To control its behavior,

a simple user interface consisting of some buttons and a seek-slider is missing. Flash has its own compressed loss less bitmap format called DBL. MING provides a small utility png2dbl to convert PNG images to DBL. Such images are used for the player's control buttons:

$button = new SWFButton(); $flags = (SWFBUTTON_UP | SWFBUTTON_HIT |

SWFBUTTON_OVER | SWFBUTTON_DOWN);

$button->addShape(ImageShape("images/pause.dbl"), $flags); $action = new

SWFAction("stream.pause();"); $button->addAction($action,

SWFBUTTON_MOUSEDOWN); $button_ref = $movie->add($button);

$button_ref->moveTo($x, $y);

The above example creates a pause button for the multimedia player. An interactive button is created in two steps. First its look has to be defined by adding shapes for certain mouse events. In flash a shape is the basic representation for graphic objects. For each mouse event a different shape object can be assigned to the button. In the above example the button looks always the same. In the second step the buttons action can be defined by assigning ActionScript to a special event. One drawback using progressive download streaming without server support is that there is no possibility to get the stream's total length. Therefore the seek-sliders functionality is limited to seeking within the already loaded parts of the stream.

The dragable part of the seek-slider is realized as a movie-clip object. A movie-clip is running as an independent movie in the flash movie. It has an independent time line, can handles scripts and handles external events itself.

$mc = new SWFSprite(); $shape = new SWFShape();

$shape->setLine(4,25,0,0,128); $shape->movePenTo(0, 5);

$shape->drawLineTo(0, 10); $mc->add($shape); $mc->nextFrame(); $slider

= $movie->add($mc); $slider->moveTo($xMin, $y);

A movie clip (SWFSprite) has similar methods like a movie object. The add() method inserts a flash object to the current frame, nextFrame() finishes the current frame and creates a new one. The movie clip is also a normal flash object which can be added to a movie and placed on the stage. The functionality of the seek-slider is defined by three small scripts. The first two actions make the movie-clip dragable:

$a = new SWFAction("startDrag(this, $xMin, $y, $xMax, $y, 1); drag = true;");

$slider->addAction($a, SWFACTION_MOUSEDOWN);

$a = new

SWFAction("stopDrag(); drag=flase;"); $slider->addAction($a, SWFACTION_MOUSEUP); The third more lengthy script sets the stream position depending on sliders x-position if the slider is actually moved by the user or sets the sliders x-position depending on the streams current time: // width in px width = xMax - xMin; paused = false; if(drag) { // pause

stream while seeking _global.stream.pause(true); paused = true; x =

_root._xmouse - xMin; seekTo = (_global.streamLen / width) * x;

_global.stream.seek(seekTo); } else { pos = (_global.stream.time * (width /

_global.streamLen)) + xMin; this._x = pos; this._y = y; } // restart paused

stream if(paused) { _global.stream.pause(false); }

This script is assigned to the $slider-handle with the SWFACTION_ENTERFRAME event.

After having added all elements to the flash movie the first frame has to be closed with the nextFrame() call. Since we don not need another frame the movie can also be finished:

$movie->nextFrame(); $movie->save("FLVPlayer.swf");

The resulting multimedia player

Example Video: Copyright by Thilo Weigel, University of Freiburg

Conclusion

With flash it is easy to create a lightweight, fully customized, embedded video and audio player. There are powerful open source tools available for creating content and also creating flash movies. This article introduced the basic concepts of flash streaming and working with MING. The here presented mediaplayer provides only the most basic features and was only intended as a simple example. It can be extended in many ways, which is left to the reader.

References

[1.] FFmpeg Project [https://www.wendangku.net/doc/f815993940.html,]

[2.] libflv [https://www.wendangku.net/doc/f815993940.html,]

[3.] MING [https://www.wendangku.net/doc/f815993940.html,]

[4.] MING CVS snapshots [https://www.wendangku.net/doc/f815993940.html,/ming]

[5.] FLV player source tarball [Player Source]

2. FlvScrubber播放器

You liked seeking to any playing position and experience immediate playback. You enjoyed the feeling of streaming video, without having to buy and maintain a streaming server. And you wanted to have a “web 2.0″interface, easy to use controls, minimalistic design, flexible resolutions, TV-like fullscreen, a volume slider, video smoothing, URL-linking and user tracking via clickTAG. Now you got it! For free if you use it in a non-commercial context, and for a small amount of EUR 50 per domain for a commercial licence.

Requirements: Client

Clients need to have at least Flash Player 9.0 installed as a browser plugin, which is freely available from Adobe for Windows, Mac OS X, Linux and Solaris (Get Flash Player). Fullscreen support is limited by Adobe to Windows and Mac OS X and requires at least Flash Player 9.0.28.

Requirements: Server

You need a webserver that is able to seek inside Flash Videos and deliver only seqments. My recommendation is lighttpd with its streaming module (see this tutorial), but others like IIS, Apache and Nginx are also known to work. H.264 is supported and looks great, but does not allow scrubbing capabilities at the moment.

Requirements: Flash Video / H.264 Video

However you transcode your videos, they should have metadata included. There are several tools to inject metadata to FLV files. On command line, yamdi (OS X, Linux, BSD) seems to perform best, but there is also flvtool2 (crossplatform, Ruby required) and flvmdi (Windows, also with a graphical user interface). For H.264 video, I use qt-faststart on command line that moves the H.264 metadata (moov atom) to the beginning of the file, which enables progressive downloads.

Requirements: Technical skills

Too much technical details here? Some of my customers let me prepare their gigabytes of videocontent online to work with progressive streaming. Others let me write JavaScript code to

connect to FLVScrubber3 for user tracking, or event handling in both directions. Or they let me set up and tweak their video playout servers, e.g. on innovative infrastructure like Amazon EC2.

Embedding FLV-Scrubber

Embedding is straight-forward, for the video above it looks like that:

codebase="https://www.wendangku.net/doc/f815993940.html,/pub/shockwave/cabs/flash/swflash.cab#version=9,0, 0,0">

There are three attributes of interest: Width and height define the resolution of FLV-Scrubber. If your videos’ native resolution is eg. 320×240 pixels, you might want to set width to 320 and height to 240. No problem if does not match, the video just will be scaled up or down. The third attribute is “flashvars”. That’s where you change the bahaviour and pass over information to FLVScrubber. You need to set at least file here, to link to the video you want to play. Everything else is optional (key/value pairs inside the flashvar attribute are separated using &). Here is a complete list:

file=[URL] defines which video to show

&autoStart lets the video start immediately

&bufferTime=[number] changes the buffer time (default is 3 seconds)

&clickTag=[URL] defines a target to call after video ended

&credit=[(URL encoded) text] to show a credit like your company name in the context menu &link=[URL] defines a website to open when user clicks into the video

&linkTarget=[blank,parent,self,top] defines the target of the website above (default: blank) &loop=true lets your video replay itself instead of ending (default: false)

&previewImage=[URL] sets an backgroundimage as preview before playback starts

&scrubbing=false use that, if you’re webserver has no enabled module for fake streaming (default: true)

&seeking=false disallows the user to seek inside the video (default: true)

&secondsToHide=[number] defines amount of seconds that the controlbar waits before hiding (0 means never, default is 5)

&startAt=[number] defines the the second where the playback will start (default:0)

Download and use FLVScrubber

Download the latest version of FLV-Scrubber 3.x (Click right and select save as) and use it right now! Usage is free in a non-commercial context! A commercial licence costs only EUR 50 per domain and you can purchase it via PayPal right now.

This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 2.0 Austria License.

FLV-Scrubber 2.0

FLV-Scrubber 2.0 is a lightweight, web-based player for Flash Video, that allows the viewers to jump to any position of the video and experience immediate playback, just if it was streaming video. In fact, it is still a progressive download, delivered by a webserver that has special segmentation capabilities (I recommend lighttpd, technology is described here). But even without such a webserver it is still possible to watch videos, but YouTube-like.

The new 2.0 version has fullscreen videoplayback (with Flash Player Plugin 9.0.28 or higher for Windows and OS X), videosmoothing, a previewpicture, an improved buffering algorithm to save bandwidth and allows you to define the second to start from if you want to link a context.

To embed FLVScrubber2 into your website, just follow this example:

Privileges to use FLV-Scrubber for commercial purposes and/or

without attributon are purchasable for EUR 50 per domain. If you miss functionality, need support, consultation, transcoding, … , feel free to hire me!

Download FLV-Scrubber 2.0

Many thanks to Jan Kneschke, Stephan Richter, Lee Brimelow, Nikolai Longolius, the FFmpeg-Developers, Norman Timmler and Yuji Oshimoto

Details for other webservers (Use lighttpd if you can!):

Francesco Meani: FLV Flash video streaming with https://www.wendangku.net/doc/f815993940.html, 2.0, IIS and HTTP handler

Alexey Kovyrin: Flash Video (FLV) Streaming With Nginx

Paul Querna: mod_flvx (for Apache)

AS编写关键点:

1、播放FMS实时视频流时,要将NetConnection对象链接到视频流服务器,比如:nc.connect("rtmp://https://www.wendangku.net/doc/f815993940.html,/vod/");

2、FMS实时视频可以用NetStream.seek(时间)方法直接任意定位;

3、FLV自由定位需要视频服务器的支持,(现在各大视频网站都支持FLV自由定位),在等到视频数据时(NetStream.onMetaData),用“视频对象.keyframes.filepositions”属性获取FLV关键帧列表并赋予一个数组,以备拖动定位时调用,自由定位时使用:NetStream.play(FLV视频地址?start=关键帧),start后接的必须是FLV的关键帧,否则是不能播放的。

3.播放器代码举例(ScrubberFlv)

/* FLV-Scrubber

* ------------

* Version 2.0 (19.02.2007)

* (CC) by Fabian Topfstedt, renta@topfstedt.de

*

* Creative Commons Attribution-Noncommercial-Share Alike 2.5 License

* Privileges to use FLV-Scrubber for commercial purposes and/or

* without attributon are purchasable. If you miss functionality, need

* support, consultation, transcoding, ... , hire me :)

*

* Many thanks to Jan Kneschke, Stephan Richter, Lee Brimelow, Nikolai Longolius, * the FFmpeg-Developers, Norman Timmler and Yuji Oshimoto

*/

// GLOBAL VARIABLES全局变量

var _debugFlag:Boolean = false;

var _errorFlag:Boolean = false;

var _videoEndFlag:Boolean = false;

var _onMetaDataContainsKeyframesFlag:Boolean = false;

var _flvURL:String = "";

var _flvBeginning:Number = 0; //视频的开始播放时间点

var _flvDuration:Number = 0; //视频的总时间

var _flvFrameRate:Number = 0;

var _flvWidth:Number = 0;

var _flvHeight:Number = 0;

var _flvAudioBitrate:Number = 0;

var _flvVideoBitrate:Number = 0;

var _flvStartAt:Number = 0;

var _loadBarWidth:Number = loader.loadbar._width;

var _netConnection:NetConnection = new NetConnection();

var _netStream:NetStream;

// INITIALIZATION初始化部分

// NetConnection and NetStream网络连接对象和网络流对象

_netConnection.connect(null);

_netStream = new NetStream(_netConnection);

// Times

videoLength.text = "";

videoPosition.text = "";

// Create SoundClip创建声音Clip

_root.createEmptyMovieClip('soundClip', _root.getNextHighestDepth());

soundClip.attachAudio(_netStream);

var audio = new Sound(soundClip);

audio.setVolume(100);

// Set visibility to start movie with设置显示特性

fileNotFoundClip._visible = false;

bufferClip._visible = false;

buttonUnMute._visible = false;

buttonPause._visible = false;

// Disable all buttons except for "Start"禁止除Start之外的按钮buttonPlay.enabled = false;

buttonPause.enabled = false;

buttonRewind.enabled = false;

bufferClip.enabled = false;

loader.scrub.enabled = false;

buttonMute.enabled = false;

buttonUnMute.enabled = false;

//StartAt given?启动位置设置

if(_root.startAt) {

_flvStartAt = _root.startAt;

}

//Filename given?给出文件名

if(_root.file) {

_flvURL = _root.file;

} else {

//Print "Video not found!" and deactivate user interaction

_errorFlag = true;

buttonStart._visible = false;

fileNotFoundClip._visible = true;

}

// Show Previewimage if given预览图像设置

if(_root.previewImage) {

image.loadMovie(_root.previewImage);

}

// BufferTime given?缓存时间设置

if(_root.BufferTime) {

_netStream.setBufferTime(_root.BufferTime);

} else {

_netStream.setBufferTime(3);

}

// Autostart video?自动启动参数设置

if(_root.autoStart == "true") {

streamRestart();

}

// Set loadbar to zero设置启动条为0

loader.loadbar._width = 0;

// Connect movieclip and stream连接视频片段

theVideo.attachVideo(_netStream);

// STREAM EVENTS流传输事件处理

// Streamevent onMetaData

_netStream.onMetaData = function(obj) {

if(_debugFlag) trace("Stream: Event onMetaData");

// Read FLVs metadata读元数据

_flvDuration = obj.duration;

// If duration is not set, make scrubber invisible如果影片长度没有设置就不显示播放器

if(isNaN(_flvDuration))

loader.scrub._visible = false;

_flvWidth = obj.width;

_flvHeight = obj.height;

_flvFrameRate = obj.framerate;

_flvAudioBitrate = obj.audiodatarate;

_flvVideoBitrate = obj.videodatarate;

//Times ...设置滑动条上的时间

videoLength.text = secondsToTimestamp(_flvDuration, _flvFrameRate, true);

videoPosition.text = secondsToTimestamp(0, 0, true);

// Read times and positions of keyframes读关键帧的时间戳和位置

times = obj.keyframes.times;

positions = obj.keyframes.filepositions;

// Check if FLV contains keyframes and metadata (needed to scrub through video)检查Flv文件中是否包含关键帧和元数据

if(times && positions) _onMetaDataContainsKeyframesFlag = true;

if(_debugFlag && _onMetaDataContainsKeyframesFlag)

trace("Info: FLV contains times and positions of keyframes!");

else if(_debugFlag)

trace("Info: FLV does not contain times and positions of keyframes!");

// StartAt 启动位置

if((_onMetaDataContainsKeyframesFlag) && (_flvStartAt > 0) && (_flvStartAt < _flvDuration)) {

scrubit(_flvStartAt);

}

// Set Contextmenu设置上下文菜单

setContextMenu();

// Set Videostage设置视频状态

setVideoStage(obj.width, obj.height);

};

// Streamevent onStatus流传输状态事件

_netStream.onStatus = function(info) {

if(_debugFlag) trace("Stream: Status " + info.code);

switch(info.code) {

// Buffer is full缓冲区满

case 'NetStream.Buffer.Full' :

bufferClip._visible = false;

_videoEndFlag = false;

clearInterval(statusID);

statusID = setInterval(videoStatus, 500);

break;

// Buffer is empty缓冲区为空

case 'NetStream.Buffer.Empty' :

// Show bufferClip if Buffer is empty and end is not reached

if(!_videoEndFlag) bufferClip._visible = true;

// Move scrubber to the very end of loadbar (otherwise it might be ~1px left of it)

loader.scrub._x = loader.loadbar._width;

// Stop triggering videoStatus停止触发视频状态

clearInterval(statusID);

break;

// Playback stopped

case 'NetStream.Play.Stop' :

bufferClip._visible = false;

break;

// Playbay started

case 'NetStream.Play.Start' :

_videoEndFlag = false;

break;

// Video was not found

case 'NetStream.Play.StreamNotFound' :

bufferClip._visible = false;

fileNotFoundClip._visible = true;

break;

// Buffer flushed

case 'NetStream.Buffer.Flush' :

_videoEndFlag = true;

break;

}

};

// Streamevent onLastSecond最后一秒的流事件

_netStream.onLastSecond = function(info) {

if(_debugFlag) trace("Stream: onLastSecond");

};

// USER INTERACTION用户交互事件、按钮处理

// "Click to play" pressed

buttonStart.onRelease = function() {

if(_debugFlag) trace("User: Start");

// Restart stream

streamRestart();

// Hide button and preview

this._visible = false;

image._visible = false;

// Enable buttons as controls

buttonPlay.enabled = true;

buttonPause.enabled = true;

buttonRewind.enabled = true;

bufferClip.enabled = true;

buttonMute.enabled = true;

buttonUnMute.enabled = true;

loader.scrub.enabled = true;

};

// Rewind pressed回放buttonRewind.onRelease = function() { if(_debugFlag) trace("User: Rewind");

// Restart stream if everything was ok

if(!_errorFlag) {

scrubit(0);

}

};

// Play pressed播放

buttonPlay.onRelease = function() {

if(_debugFlag) trace("User: Play");

// Pause stream

_netStream.pause();

buttonPlay._visible = false;

buttonPause._visible = true;

};

// Pause pressed暂停

buttonPause.onRelease = function() {

if(_debugFlag) trace("User: Pause");

// Play stream

_netStream.pause();

buttonPause._visible = false;

buttonPlay._visible = true;

};

// Mute pressed哑声

buttonMute.onRelease = function() {

if (_debugFlag) trace("User: Mute");

// Mute oder unmute audio

audio.setV olume(0);

buttonUnMute._visible = true;

buttonMute._visible = false;

};

// Unmute pressed

buttonUnMute.onRelease = function() {

if (_debugFlag) trace("User: Unmute");

// Unmute audio

audio.setV olume(100);

buttonMute._visible = true;

buttonUnMute._visible = false;

};

// Pressed on video (or on link, a transparent movieclip)点到视频上

link.onRelease = function () {

if(_debugFlag) trace("User: Clicked inside the video");

switch(Stage["displayState"]) {

case "fullScreen":

theVideo.smoothing = false;

Stage["displayState"] = "normal";

break;

case "normal":

theVideo.smoothing = true;

Stage["displayState"] = "fullscreen";

break;

}

};

// Scrubberbar pressed

loader.scrub.onPress = function() {

if(_debugFlag) trace("User: Pressed scrubberbar");

if (!_errorFlag) {

clearInterval(statusID);

this.startDrag(false, 0, this._y, _loadBarWidth, this._y);

}

};

// Scrubberbar released at new position

loader.scrub.onReleaseOutside = function() {

if(_debugFlag) trace("User: Released scrubberbar");

var second = Math.floor((loader.scrub._x / _loadBarWidth) * _flvDuration);

scrubit(second);

this.stopDrag();

};

// See above

loader.scrub.onRelease = loader.scrub.onReleaseOutside;

// Triggered function that runs during playback回放期间的激发函数

function videoStatus() {

if(_debugFlag) trace("Info: videoStatus-Method called");

// Show progress of download inside the loadbar

var width = ((_flvDuration - _flvBeginning) / _flvDuration) * _loadBarWidth;

loader.loadbar._width = (_netStream.bytesLoaded / _netStream.bytesTotal) * width;

loader.loadbar._x = _loadBarWidth - width;

// Move scrubber

loader.scrub._x = (_netStream.time / _flvDuration) * _loadBarWidth;

// Show time

videoPosition.text = secondsToTimestamp(Math.floor(_netStream.time), _flvFrameRate, true);

};

// Scrubs to posititon

function scrubit(second) {

if(_debugFlag) trace("User: Scrubbed to " + secondsToTimestamp(second, _flvFrameRate));

// Detect how many seconds already are cached检测能缓存多少秒的视频数据

var cachedSeconds = Math.floor((_flvDuration - _flvBeginning) * (_netStream.bytesLoaded/_netStream.bytesTotal)) - 1;

//If target already cached, seek to the position

if((second >= _flvBeginning) && (second < (_flvBeginning + cachedSeconds))) { _netStream.seek(second);

//If FLV contains keyframes inside the onMetaData-Tag, jump to keyframe

} else if(_onMetaDataContainsKeyframesFlag) {

var index = getNearestKeyframeIndex(second, times);

second = times[index];

bufferClip._visible = true;

if(_debugFlag) trace("Info: Get new segment of FLV-file starting at byteposition " + positions[index]);

_netStream.play(_flvURL+'?start='+positions[index]); //根据字节位置参数拉取新的片段

_flvBeginning = second;

//If there are no keyframes and position is not yet cached, just continue playing

} else {

_netStream.seek(_netStream.time);

}

}

// Restarts stream重启流

function streamRestart() {

if(_debugFlag) trace("Info: Stream restarting");

if (!_errorFlag) {

bufferClip._visible = true;

buttonPlay._visible = false;

buttonPause._visible = true;

_netStream.play(_flvURL);

}

}

//Changes the contextmenu and adds information检查上下文菜单

function setContextMenu() {

var theMenu:ContextMenu = new ContextMenu();

theMenu.hideBuiltInItems();

_root.menu = theMenu;

theMenu.customItems[0] = new ContextMenuItem("FLV-Scrubber 2.0 by Fabian Topfstedt", trace);

theMenu.customItems[0].onSelect = function() { getURL("http://www.topfstedt.de/weblog/?page_id=208", "_blank"); }

theMenu.customItems[1] = new ContextMenuItem("Fullscreen on/off");

theMenu.customItems[1].separatorBefore = true;

theMenu.customItems[1].onSelect = function(item:Object, item_menu:Object) {

switch (Stage["displayState"]) {

case "normal" :

Stage["displayState"] = "fullScreen";

break;

case "fullScreen" :

Stage["displayState"] = "normal";

break;

}

};

theMenu.customItems[2] = new ContextMenuItem("Videosmoothing on/off");

theMenu.customItems[2].onSelect = function(item:Object, item_menu:Object) { theVideo.smoothing = !theVideo.smoothing

};

theMenu.customItems[3] = new ContextMenuItem("Datarate: " + Math.round(_flvAudioBitrate + _flvVideoBitrate) + " kbps (" + Math.floor(_flvAudioBitrate) + " kbps audio, " + Math.floor(_flvVideoBitrate)+" kbps video)", trace);

theMenu.customItems[3].enabled = false;

theMenu.customItems[3].separatorBefore = true;

theMenu.customItems[4] = new ContextMenuItem("Duration: " + secondsToTimestamp(_flvDuration, _flvFrameRate) + " (HH:MM:SS.FF)", trace);

theMenu.customItems[4].enabled = false;

theMenu.customItems[5] = new ContextMenuItem("Framerate: " + _flvFrameRate + " fps", trace);

theMenu.customItems[5].enabled = false;

theMenu.customItems[6] = new ContextMenuItem("Resolution: " + _flvWidth + "x" + _flvHeight + " px", trace);

theMenu.customItems[6].enabled = false;

}

//Sets theVideo due to VideoRatio设置视频的缩放率

function setVideoStage(width, height) {

theVideo._width = 320;

theVideo._height = (320/width) * height;

theVideo._y = (240 - theVideo._height) / 2;

}

// Get nearest Keyframe of second取得最近的关键帧的秒数

function getNearestKeyframeIndex(second, keyFrameArray) {

var index1 = 0;

var index2 = 0;

// Iterate through array to find keyframes before and after scrubber second

for(var i=0; i

if(times[i] < second) {

index1 = i;

} else {

index2 = i;

break;

}

}

// Calculate nearest keyframe

if((second - keyFrameArray[index1]) < (keyFrameArray[index2] - second)) { return index1;

} else {

return index2;

}

}

//Converts seconds and framerate to a timestamp (String)实现帧率和秒时间的转换function secondsToTimestamp(seconds, framerate, noFrames) {

var temp:Number = seconds;

//If seconds is not a number, return nothing

if(isNaN(seconds)) return "";

var timestamp:String = twoDigitFormat(Math.floor(temp / 3600)) + ":";

temp = temp % 3600;

timestamp += twoDigitFormat(Math.floor(temp / 60)) + ":";

temp = temp % 60;

timestamp += twoDigitFormat(Math.floor(temp));

if(noFrames) return timestamp;

timestamp += ".";

temp = temp - Math.floor(temp);

//Due to arithmetic errors Math.Floor is used for frames too

timestamp += twoDigitFormat(Math.floor(temp * framerate));

return timestamp;

}

//Adds a leading zero to a number with one digit在一个一位的数字前增加一个前导符0 function twoDigitFormat(number) {

if (String(number).length == 1) {

return "0"+number;

} else {

return number;

}

}

用例:

In php streaming using xmoov.php to scrub to a different spot the way to get stuff done is call the php document, then use GET parameters to tack on the filename, position, and other builtin functions.

ns.play (_phpURL + “?file=” + _vidName + “&position=” + positions[i] + “&bw=” + bandwidth);

Here in your method you call the file using the following parameters visible in html:

http://HOST/FLVScrubber2/FLVScrubber2.swf?file=http://HOST/FILE.flv&bufferTime=3& startAt=0&autoStart=false

So if I wanted to have to seek using the apache server mod, should I have my fla document use the GET method to the server and say something like:

ns.play(“http://FLVScrubber2.swf?file=”+myFile.flv+ “&startAt=” positionOfDesiredSeek[i]);

So is the startAt function finding the nearest file position to seek using your apache mod? Or do we need to write something more in our actionscript to tell apache the closest filepostion we would like to seek? Because the issue for a while with php seeking was that unless you had an exact file position, flash took some time before it got to your spot. So someone built in some slick functions in php to do their file seeking.

I’m trying to understand what your mod is doing so that I can build some cool functionality on the scrubber bar, on the draggable triangle, and create some movieclips which act as markers during longer play of media.

带宽检测应用:

The scripts and modules will measure the bandwidth. Then based on the result you would choose the correct pre-encoded .flv rendition to use. The client side code to accomplish the choose is quite simple. The bandwidth checker returns values in Kbps (kilo bits per second) which is generally the same units that are used to control the encoding of .flv content. So if we encode content at let's say 100Kbps (mycoolvideo_100.flv), 250Kbps (mycoolvideo_250.flv), 500Kbps (mycoolvideo_500.flv) and 750Kbps (mycoolvideo_750.flv), then we would need to code client

side that would simply take the output of the bandwidth checker to determine which of the four renditions to play. It might look something like:

Code:

var bandwidthVer = "_100";

if (detected_bw >= 800)

bandwidthVer = "_750";

else if (detected_bw >= 550)

bandwidthVer = "_500";

else if (detected_bw >= 300)

bandwidthVer = "_250";

var movieName = "mycoolvideo"+bandwidthVer;

netStream.play(movieName);I left 50Kbps of slop in my checks to account for any bandwidth fluxuations during delivery.

带宽检测:

/*-----------------------------------------------------------------------------

Flash Media Server Bandwidth, Firewall Proxy Port Detection Script

created by Derek Entringer

created on 07.09.2007

Files:

bandwidthproxycheck.fla ~source FLA

bwcheck.asc ~server side FMS script

NCManager.as ~local Net Connection Manager Script

-----------------------------------------------------------------------------*/

application.onConnect = function(p_client, p_autoSenseBW) {

this.acceptConnection(p_client);

if (p_autoSenseBW)

this.calculateClientBw(p_client);

else

p_client.call("onBWDone");

}

Client.prototype.getStreamLength = function(p_streamName) {

return Stream.length(p_streamName);

}

Client.prototype.checkBandwidth = function() {

application.calculateClientBw(this);

}

application.calculateClientBw = function(p_client) {

p_client.payload = new Array();

for (var i=0; i<1200; i++){

p_client.payload[i] = Math.random();//16K approx

}貌似使用视频连接外的数据测试带宽,创建1200个随机数据

var res = new Object();

https://www.wendangku.net/doc/f815993940.html,tency = 0;

res.cumLatency = 1;

res.bwTime = 0;

res.count = 0;

res.sent = 0;

res.client = p_client;

var stats = p_client.getStats();

var now = (new Date()).getTime()/1;

res.pakSent = new Array();

res.pakRecv = new Array();

res.beginningValues = {b_down:stats.bytes_out, b_up:stats.bytes_in, time:now};

res.onResult = function(p_val) {

var now = (new Date()).getTime()/1;

this.pakRecv[this.count] = now;

//trace( "Packet interval = " + (this.pakRecv[this.count] - this.pakSent[this.count])*1 );

this.count++;

var timePassed = (now - this.beginningValues.time);

if (this.count == 1) {

https://www.wendangku.net/doc/f815993940.html,tency = Math.min(timePassed, 800);

https://www.wendangku.net/doc/f815993940.html,tency = Math.max(https://www.wendangku.net/doc/f815993940.html,tency, 10);

}

//trace("count = " + this.count + ", sent = " + this.sent + ", timePassed = " + timePassed);

//if we have a hi-speed network with low latency send more to determine

//better bandwidth numbers, send no more than 6 packets

if ( this.count == 2 && (timePassed<2000)) {

this.pakSent[res.sent++] = now;

this.cumLatency++;

this.client.call("onBWCheck", res, this.client.payload);

} else if ( this.sent == this.count ) {

//see if we need to normalize latency

if ( https://www.wendangku.net/doc/f815993940.html,tency >= 100 ) {

//make sure we detect sattelite and modem correctly

if ( this.pakRecv[1] - this.pakRecv[0] > 1000 ) {

https://www.wendangku.net/doc/f815993940.html,tency = 100;

}

}

delete this.client.payload;

//got back responses for all the packets compute the bandwidth

var stats = this.client.getStats();

var deltaDown = (stats.bytes_out - this.beginningValues.b_down)*8/1000;

var deltaTime = ((now - this.beginningValues.time) - (https://www.wendangku.net/doc/f815993940.html,tency * this.cumLatency) )/1000;

if ( deltaTime <= 0 )

deltaTime = (now - this.beginningValues.time)/1000;

var kbitDown = Math.round(deltaDown/deltaTime);

trace("onBWDone: kbitDown = " + kbitDown + ", deltaDown= " + deltaDown + ", deltaTime = " + deltaTime + ", latency = " + https://www.wendangku.net/doc/f815993940.html,tency + "KBytes " + (stats.bytes_out - this.beginningValues.b_down)/1024) ;

this.client.call("onBWDone", null, kbitDown, deltaDown, deltaTime, https://www.wendangku.net/doc/f815993940.html,tency );

}

}

res.pakSent[res.sent++] = now;

p_client.call("onBWCheck", res, "");

res.pakSent[res.sent++] = now;

p_client.call("onBWCheck", res, p_client.payload);

}

FLV Scrubbing with throttling Posted on Apr 30, 2010 by Paul White

In the old days of the internet if you wanted to provide videos on your website, you would use embed tags, or play an FLV via a flash SWF. But the problem with this the huge amount of wasted transfer that results. So I set out to develop a customized handler using https://www.wendangku.net/doc/f815993940.html, that would allow FLV scrubbing, and also allow throttling to save on bandwidth.

What is FLV Scrubbing? Scrubbing技术允许视频随机拖动位置

Those of you who have been to youtube of any modern porn site have noticed how you can drag the slider and jump to later cue points in the movie without having to load the entire movie. This is beneficial in two ways. It allows people to skip the parts of the video they don't want to watch and get right to the climax of the video. For Websites it allows them to save a few KB to a few MB of transfer since they don't have to send over the boring parts of the video. So it enhances the user experience as well as saves money on the hosting side. Its a win win, but providing this kind of interface is no easy task.

What is FLV throttling? Throttling技术能人为地限制传输速率

Throttling is the act of artificially limiting the rate of transfer. In the case of FLV videos, they would normally be downloaded by the client as fast as the network and server's hardware would allow. This might be at a full 100M/bit if the client is on a fast enough connection. But lets say the client was going a watch a video that was 5 minutes long, and 100 MB in size. They get through the first 20 seconds and realize they don't like the video so they browse to something else. However the 100 MB video has already downloaded. that was probably about 90 MB of transfer wasted. Instead of letting the client download the entire video as fast as they could what if you throttled the rate of transfer to the actual rate of demand. There is no reason you should have to feed data to the client faster than they need it. So if your video plays at 100KB/sec there is no reason to transfer the data faster then that. Of course there is no reason you should force people to wait for the initial buffering time. So we will give the client full transfer speed as a buffering turbo, then throttle their transfer rate after they have a good 2-3 second buffer.

FLV scrubbing and throttling with https://www.wendangku.net/doc/f815993940.html,

There are a few issues we need to overcome before we can effectively do this. The first issue is FLV files by default do not have cue points. To create the cue points we need to modify them with a flvtool. FLVTOOL is an dos executable that will automatically modify the FLV with the proper cue points, so we can scrub the video. The other issue is in order to effectively throttle the data rate we need to know what they minimum rate of transfer is. In https://www.wendangku.net/doc/f815993940.html, throttling the transfer rate is nothing more than using a System Pause for X miliseconds between sending over each buffer of data. But this presents even more problems. Not every client is going to transfer at the same rate. So your code is going to have to be smart and determine what the optimal pause time is. Second we need to create a non throttled buffer to ensure people wait as little as possible for the data to buffer up and the video to start playing.

Working Example

Here is my FLVStreaming.cs file.

I just dump this into my App_Code directory, makes some edits to my web.config and it automatically will intercept all requests for FLV files. Whenever a Request for an FLV is handled by default it will be throttled to 150 KB /sec, after a 3 second full speed buffer. However if a duration variable is passed in the QueryString of the FLV request, it will use that to determine what the best transfer rate is, and throttle it to that. If you want to use the Scrubbing feature you will need to impliment a SWF FLV video player that supports it. I have links at the bottom of the page to a few other sites that include a SWF example.

using System;

using System.Threading;

using System.Diagnostics;

using System.IO;using System.Web;using https://www.wendangku.net/doc/f815993940.html,;

using System.Data;using System.Data.Odbc;public

class FLVStreaming : IHttpHandler

private static readonly byte _flvheader = HexToByte("464C5601010000000900000009"); //"FLVx1x1000x9000x9"

public FLVStreaming()

public void ProcessRequest(HttpContext context)

try

int pos;

int length; // Check start parameter if present

string filename = Path.GetFileName(context.Request.FilePath);

decimal duration = 0;

if(context.Request.Params"duration"!=null && context.Request.Params"duration"!="") duration=Convert.ToDecimal(context.Request.Params"duration");

decimal datalength=0;

using (FileStream fs = new FileStream(context.Server.MapPath(filename), FileMode.Open, FileAccess.Read, FileShare.Read))

string qs = context.Request.Params"start";

if (string.IsNullOrEmpty(qs))

pos = 0;

length = Convert.ToInt32(fs.Length);

datalength= Convert.ToDecimal(fs.Length);

With的用法全解

With的用法全解 with结构是许多英语复合结构中最常用的一种。学好它对学好复合宾语结构、不定式复合结构、动名词复合结构和独立主格结构均能起很重要的作用。本文就此的构成、特点及用法等作一较全面阐述,以帮助同学们掌握这一重要的语法知识。 一、 with结构的构成 它是由介词with或without+复合结构构成,复合结构作介词with或without的复合宾语,复合宾语中第一部分宾语由名词或代词充当,第二部分补足语由形容词、副词、介词短语、动词不定式或分词充当,分词可以是现在分词,也可以是过去分词。With结构构成方式如下: 1. with或without-名词/代词+形容词; 2. with或without-名词/代词+副词; 3. with或without-名词/代词+介词短语; 4. with或without-名词/代词 +动词不定式; 5. with或without-名词/代词 +分词。 下面分别举例: 1、 She came into the room,with her nose red because of cold.(with+名词+形容词,作伴随状语)

2、 With the meal over , we all went home.(with+名词+副词,作时间状语) 3、The master was walking up and down with the ruler under his arm。(with+名词+介词短语,作伴随状语。) The teacher entered the classroom with a book in his hand. 4、He lay in the dark empty house,with not a man ,woman or child to say he was kind to me.(with+名词+不定式,作伴随状语)He could not finish it without me to help him.(without+代词 +不定式,作条件状语) 5、She fell asleep with the light burning.(with+名词+现在分词,作伴随状语) Without anything left in the with结构是许多英 语复合结构中最常用的一种。学好它对学好复合宾语结构、不定式复合结构、动名词复合结构和独立主格结构均能起很重要的作用。本文就此的构成、特点及用法等作一较全面阐述,以帮助同学们掌握这一重要的语法知识。 二、with结构的用法 with是介词,其意义颇多,一时难掌握。为帮助大家理清头绪,以教材中的句子为例,进行分类,并配以简单的解释。在句子中with结构多数充当状语,表示行为方式,伴随情况、时间、原因或条件(详见上述例句)。 1.带着,牵着…… (表动作特征)。如: Run with the kite like this.

compare 的两个重要词组区别

compare to 和compare with 的区别是什么 Compare to 是“把……比作”的意思。例如: We compare him to a little tiger. 我们把他比作小老虎。 The last days before liberation are often compared to the darkness before the dawn. 将要解放的那些日子常常被比作黎明前的黑暗。 Compare ... with 是“把……和……比较”的意思。例如: We must compare the present with the past. 我们要把现在和过去比较一下。 We compared the translation with the original. 我们把译文和原文比较了下。 从上面比较可以看出,compare with 侧重一个仔细的比较过程。有时,两者都可以互相代替。例如: He compared London to (with) Paris. 他把伦敦比作巴黎。 London is large, compared to (with) Paris. 同巴黎比较而言,伦敦大些。 在表示“比不上”、“不能比”的意思时,用compare with 和compare to 都可以。例如: My spoken English can't be compared with yours. 我的口语比不上你的。 The pen is not compared to that one. 这笔比不上那支。 1、c ompare…to…意为“把…比作”,即把两件事物相比较的同时,发现某些方面相似的地方。这两件被比较的事物 或人在本质方面往往是截然不同的事物。如: He compared the girl to the moon in the poem. 他在诗中把那姑娘比作月亮。 2、compare…with…“与…相比,把两件事情相比较,从中找出异同”,这两件事又往往是同类的, 如:I'm afraid my English compares poorly with hers. 恐怕我的英语同她的英语相比要差得多。 compare to和compare with有何区别,当说打比方时和做比较是分别用哪个? compare…to…比喻.例如: The poets often compare life to a river. 诗人们经常把生活比喻成长河. compare…with…相比.例如: My English can't compare with his. 我的英文水平不如他.

五种计算机语言的特点与区别

php语言,PHP(PHP: Hypertext Preprocessor的缩写,中文名:“PHP:超文本预处理器”)是一种通用开源脚本语言。语法吸收了C语言、Java和Perl的特点,入门门槛较低,易于学习,使用广泛,主要适用于Web开发领域。 特性:PHP 独特的语法混合了C、Java、Perl 以及PHP 自创新的语法;PHP可以比CGI 或者Perl更快速的执行动态网页——动态页面方面,与其他的编程语言相比,PHP是将程序嵌入到HTML文档中去执行,执行效率比完全生成htmL标记的CGI要高许多,PHP具有非常强大的功能,所有的CGI的功能PHP都能实现;PHP支持几乎所有流行的数据库以及操作系统;最重要的是PHP可以用C、C++进行程序的扩展。 Java语言,Java是一种可以撰写跨平台应用软件的面向对象的程序设计语言,是由Sun Microsystems公司于1995年5月推出的Java程序设计语言和Java平台(即JavaSE, JavaEE, JavaME)的总称。 Java 技术具有卓越的通用性、高效性、平台移植性和安全性,广泛应用于个人PC、数据中心、游戏控制台、科学超级计算机、移动电话和互联网,同时拥有全球最大的开发者专业社群。在全球云计算和移动互联网的产业环境下,Java更具备了显著优势和广阔前景。 Java的优势,与传统程序不同,Sun 公司在推出Java 之际就将其作为一种开放的技术。全球数以万计的Java 开发公司被要求所设计的Java软件必须相互兼容。“Java 语言靠群体的力量而非公司的力量”是Sun公司的口号之一,并获得了广大软件开发商的认同。这与微软公司所倡导的注重精英和封闭式的模式完全不同。 Sun 公司对Java 编程语言的解释是:Java 编程语言是个简单、面向对象、分布式、解释性、健壮、安全与系统无关、可移植、高性能、多线程和动态的语言。 python语言,是一种面向对象、直译式计算机程序设计语言,Python语法简洁而清晰,具有丰富和强大的类库。它常被昵称为胶水语言,它能够很轻松的把用其他语言制作的各种模块(尤其是C/C++)轻松地联结在一起。 常见的一种应用情形是,使用python快速生成程序的原型(有时甚至是程序的最终界面),然后对其中有特别要求的部分,用更合适的语言改写。 Python是完全面向对象的语言。函数、模块、数字、字符串都是对象。并且完全支持继承、重载、派生、多继承,有益于增强源代码的复用性。 Python支持重载运算符和动态类型。相对于Lisp这种传统的函数式编程语言,Python对函数式设计只提供了有限的支持。有两个标准库(functools, itertools)提供了Haskell和Standard

with用法归纳

with用法归纳 (1)“用……”表示使用工具,手段等。例如: ①We can walk with our legs and feet. 我们用腿脚行走。 ②He writes with a pencil. 他用铅笔写。 (2)“和……在一起”,表示伴随。例如: ①Can you go to a movie with me? 你能和我一起去看电影'>电影吗? ②He often goes to the library with Jenny. 他常和詹妮一起去图书馆。 (3)“与……”。例如: I’d like to have a talk with you. 我很想和你说句话。 (4)“关于,对于”,表示一种关系或适应范围。例如: What’s wrong with your watch? 你的手表怎么了? (5)“带有,具有”。例如: ①He’s a tall kid with short hair. 他是个长着一头短发的高个子小孩。 ②They have no money with them. 他们没带钱。 (6)“在……方面”。例如: Kate helps me with my English. 凯特帮我学英语。 (7)“随着,与……同时”。例如: With these words, he left the room. 说完这些话,他离开了房间。 [解题过程] with结构也称为with复合结构。是由with+复合宾语组成。常在句中做状语,表示谓语动作发生的伴随情况、时间、原因、方式等。其构成有下列几种情形: 1.with+名词(或代词)+现在分词 此时,现在分词和前面的名词或代词是逻辑上的主谓关系。 例如:1)With prices going up so fast, we can't afford luxuries. 由于物价上涨很快,我们买不起高档商品。(原因状语) 2)With the crowds cheering, they drove to the palace. 在人群的欢呼声中,他们驱车来到皇宫。(伴随情况) 2.with+名词(或代词)+过去分词 此时,过去分词和前面的名词或代词是逻辑上的动宾关系。

域名解析教程

域名解析详细教程 域名解析是把域名指向网站空间IP,让人们通过注册的域名可以方便地访问到网站一种服务。域名解析也叫域名指向、服务器设置、域名配置以及反向IP登记等等。说得简单点就是将好记的域名解析成IP,服务由DNS服务器完成,是把域名解析到一个IP地址,然后在此IP地址的主机上将一个子目录与域名绑定。 英文名:DNSR(domain name system resolution) 在域名注册商那里注册了域名之后如何才能看到自己的网站内容,用一个专业术语就叫“域名解析”。在相关术语解释中已经介绍,域名和网址并不是一回事,域名注册好之后,只说明你对这个域名拥有了使用权,如果不进行域名解析,那么这个域名就不能发挥它的作用,经过解析的域名可以用来作为电子邮箱的后缀,也可以用来作为网址访问自己的网站,因此域名投入使用的必备环节是“域名解析”。 域名解析(17张) 我们知道域名是为了方便记忆而专门建立的一套地址转换系统,要访问一台互联网上的服务器,最终还必须通过IP地址来实现,域名解析就是将域名重新转换为IP 地址的过程。一个域名对应一个IP地址,一个IP地址可以对应多个域名;所以多个域名可以同时被解析到一个IP地址。域名解析需要由专门的域名解析服务器(DNS)来完成。解析过程,比如,一个域名为:***.com,是想看到这个现HTTP服务,如果要访问网站,就要进行解析,首先在域名注册商那里通过专门的DNS服务器解析到一个WEB服务器的一个固定IP上:211.214.1.***,然后,通过WEB服务器来接收这个域名,把***.com这个域名映射到这台服务器上。那么,输入***.com这个域名就可以实现访问网站内容了.即实现了域名解析的全过程;人们习惯记忆域名,但机器间互相只认IP地址,域名与IP地址之间是对应的,它们之间的转换工作称为域名解析,域名解析需要由专门的域名解析服务器来完成,整个过程是自动进行的。域名解析协议(DNS)用来把便于人们记忆的主机域名和电子邮件地址映射为计算机易于识别的IP地址。DNS是一种c/s的结构,客户机就是用户用于查找一个名字对应的地址,而服务器通常用于为别人提供查询服务。

战略与策略的主要区别

战略与策略的主要区别 一,什么是战略营销? 必须首先明确,什么是战略。 1,战略的本质是一个企业的选择。为什么要做选择?因为任何一个企业都不是全能的。不可能做所有的事情,也不是所有的事情都能做好!任何企业的资源和能力都是有限的。战略就是要把有限的资源和能力,用到产出最大的地方。战略就是一个选择的过程,选择什么?如何选择?这是企业战略规划所要研究的课题。 2,战略首先意味着放弃。在中国目前的经济环境下,战略对于企业家的意义,更为重要的是“放弃”。中国的经济处在快速发展期,有太多的市场机会可供选择。但选择意味着放弃,而放弃是一件很痛苦的事情。 综上所述,战略选择的核心是对企业目标客户群的选择。而战略营销就是从战略的高度思考和规划企业的营销过程,是聚焦最有价值客户群的营销模式。 我们都知道80/20原理,20%的客户创造了企业80%的利润。战略营销要做的就是找到适合企业的目标客户群,并锁定他们进行精确打击,使企业的资源和能力发挥最大的效益,并实现企业能力的持续提升。 因此,战略营销的三个关键要素就是:1)客户细分;2)聚焦客户价值;3)为股东和客户增值。 二,什么是策略营销? 策略营销主要指的是在市场营销中,将企业的市场策略运用到营销中的过程。 比如: 1,低成本策略 通过降低产品生产和销售成本,在保证产品和服务质量的前提下,使自己的产品价格低于竞争对手的价格,以迅速扩大的销售量提高市场占有率的竞争策略。 2.差别化策略 通过发展企业别具一格的营销活动,争取在产品或服务等方面具有独特性,使消费者产生兴趣而消除价格的可比性,以差异优势产生竞争力的竞争策略。 3.聚焦策略 通过集中企业力量为某一个或几个细分市场提供有效的服务,充分满足一部分消费者的特殊需求,以争取局部竞争优势的竞争策略。 一个企业的市场营销策略必须是在企业的战略营销策略下确定的,可以简单把策略营销理解成企业在市场的战术营销。这就是两者的区别!

真理的定义和特点以及谬误的区别

、真理的定义和特点以及谬误的区别 定义:真理是人们对客观事物及其规律的正确反映。 特点:1、真理具有客观性。真理的内容是客观的;检验真理的标准是客观的。 2、真理具有价值性。真理的价值性是指真理对人类实践活动的功能性,它揭示了客观真理具有能满足主体需要、对主体有用的属性。 9.资本循环和资本周转(资本循环的三个阶段三大职能,两大前提条件;资本周转的定义,影响周转的因素) 资本循环指产品资本从一定的形式出发,经过一系列形式的变化,又回到原来出发点的运动。产品资本在循环过程中要经历三个不同的阶段,于此相联系的是资本依次执行三种不同的职能: 第一个阶段是购买阶段,即生产资料与劳动力的购买阶段。它属于商品的流通过程,在这一阶段,产业资本执行的是货币资本的职能。 第二个阶段是生产阶段,即生产资料与劳动者相结合生产物质财富并使生产资本得以增值,执行的是生产资本的职能。 第三个阶段是售卖阶段,即商品资本向货币资本的转化阶段。在此阶段产业资本所执行的是商品资本的职能,通过商品买卖实现商品的价值,满足人们的需要。 资本循环必须具备两个基本前提条件: 一是产业资本的三种职能形式必须在空间上同时并存,也就是说,产业资本必须按照一定比例同时并存于货币资本、生产资本和商品资本三种形式中。 二是产业资本的三种职能形式必须在时间上继起,也就是说,产业资本循环的三种职能形式必须保持时间上的依次连续性。 资本周转是资本反复不断的循环运动所形成的周期性运动。 影响资本周转最重要的两个要素是:一是资本周转的时间;二是生产资本的固定资本和流动资本的构成。要加快资本周转的时间,获得更多的剩余价值,就要缩短资本周转时间,加快流动资本周转速度。 第五章 2.垄断条件下竞争的特点 竞争目的上,垄断竞争是获取高额利润,并不断巩固和扩大自己的垄断地位和统治权力;竞争手段上,垄断组织的竞争,除采取各种形式的经济手段外,还采取非经济手段,使经济变得更加复杂、更加激烈; 在竞争范围上,国际市场的竞争越来越激烈,不仅经济领域的竞争多种多样,而且还扩大到经济领域范围以外进行竞争。 总之,垄断条件下的竞争,不仅规模大、时间长、手段残酷、程度更加激烈,而且具有更大的破坏性。 3.金融寡头如何握有话语权 金融寡头在经济领域中的统治主要通过“参与制”实现。所谓参与制,即金融寡头通过掌握

独立主格with用法小全

独立主格篇 独立主格,首先它是一个“格”,而不是一个“句子”。在英语中任何一个句子都要有主谓结构,而在这个结构中,没有真正的主语和谓语动词,但又在逻辑上构成主谓或主表关系。独立主格结构主要用于描绘性文字中,其作用相当于一个状语从句,常用来表示时间、原因、条件、行为方式或伴随情况等。除名词/代词+名词、形容词、副词、非谓语动词及介词短语外,另有with或without短语可做独立主格,其中with可省略而without不可以。*注:独立主格结构一般放在句首,表示原因时还可放在句末;表伴随状况或补充说明时,相当于一个并列句,通常放于句末。 一、独立主格结构: 1. 名词/代词+形容词 He sat in the front row, his mouth half open. Close to the bank I saw deep pools, the water blue like the sky. 靠近岸时,我看见几汪深池塘,池水碧似蓝天。 2. 名词/代词+现在分词 Winter coming, it gets colder and colder. The rain having stopped, he went out for a walk.

The question having been settled, we wound up the meeting. 也可以The question settled, we wound up the meeting. 但含义稍有差异。前者强调了动作的先后。 We redoubled our efforts, each man working like two. 我们加倍努力,一个人干两个人的活。 3. 名词/代词+过去分词 The job finished, we went home. More time given, we should have done the job much better. *当表人体部位的词做逻辑主语时,不及物动词用现在分词,及物动词用过去分词。 He lay there, his teeth set, his hands clenched, his eyes looking straight up. 他躺在那儿,牙关紧闭,双拳紧握,两眼直视上方。 4. 名词/代词+不定式 We shall assemble at ten forty-five, the procession to start moving at precisely eleven. We divided the work, he to clean the windows and I to sweep the floor.

功能和特点的区别Excel的主要功能和特点

功能和特点的区别Excel的主要功能和特点 Excel的主要功能和特点 Excel电子表格是office系列办公软的-种,实现对日常生活、工作中的表格的数据处理。它通过友好的人机界面,方便易学的智能化操作方式,使用户轻松拥有实用美观个性十足的实时表格,是工作、生活中的得力助手。 一、Excel功能概述; 1、功能全面:几乎可以处理各种数据 2、操作方便:菜单、窗口、对话框、工具栏 3、丰富的数据处理函数 4、丰富的绘制图表功能:自动创建各种统计图表 5、丰富的自动化功能:自动更正、自动排序、自动筛选等 6、运算快速淮确: 7、方便的数据交换能力 8、新增的Web工具 二、电子数据表的特点Excel 电子数据表软工作于Windows平台,具有Windows环境软的所有优点。而在图形用户界面、表格处理、数据分析、图表制作和网络信息共享等方面具有更突出的特色。工.图形用户界面Excel 的图形用户界面是标准的Windows的窗口形式,有控制菜单、最大化、最小化按钮、标题栏、菜单栏等内容。其中的

菜单栏和工具栏使用尤为方便。菜单栏中列出了电子数据表软的众多功能,工具栏则进一步将常用命令分组,以工具按钮的形式列在菜单栏的下方。而且用户可以根据需要,重组菜单栏和工具栏。在它们之间进行复制或移动操作,向菜单栏添加工具栏按钮或是在工具栏上添加菜单命令,甚至定义用户自己专用的菜单和工具栏。当用户操作将鼠标指针停留在菜单或工具按钮时,菜单或按钮会以立体效果突出显示,并显示出有关的提示。而当用户操作为单击鼠标右键时,会根据用户指示的操作对象不同,自动弹出有关的快捷菜单,提供相应的最常用命令。为了方便用户使用工作表和建立公式,Excel 的图形用户界面还有编辑栏和工作表标签。. 2.表格处理 Excel的另-个突出的特点是采用表格方式管理数据,所有的数据、信息都以二维表格形式(工作表)管理,单元格中数据间的相互关系一目了然。从而使数据的处理和管理更直观、更方便、更易于理解。对于曰常工作中常用的表格处理操作,例如,增加行、删除列、合并单元格、表格转置等操作,在Excel中均只需询单地通过菜单或工具按钮即可完成。此外Excel还提供了数据和公式的自动填充,表格格式的自动套用,自动求和,自动计算,记忆式输入,选择列表,自动更正,拼写检查,审核,排序和筛选等众多功能,可以帮助用户快速高效地建立、编辑、编排和管理各种表格。

with用法小结

with用法小结 一、with表拥有某物 Mary married a man with a lot of money . 马莉嫁给了一个有着很多钱的男人。 I often dream of a big house with a nice garden . 我经常梦想有一个带花园的大房子。 The old man lived with a little dog on the lonely island . 这个老人和一条小狗住在荒岛上。 二、with表用某种工具或手段 I cut the apple with a sharp knife . 我用一把锋利的刀削平果。 Tom drew the picture with a pencil . 汤母用铅笔画画。 三、with表人与人之间的协同关系 make friends with sb talk with sb quarrel with sb struggle with sb fight with sb play with sb work with sb cooperate with sb I have been friends with Tom for ten years since we worked with each other, and I have never quarreled with him . 自从我们一起工作以来,我和汤姆已经是十年的朋友了,我们从没有吵过架。 四、with 表原因或理由 John was in bed with high fever . 约翰因发烧卧床。 He jumped up with joy . 他因高兴跳起来。 Father is often excited with wine . 父亲常因白酒变的兴奋。 五、with 表“带来”,或“带有,具有”,在…身上,在…身边之意

易名域名解析教程

设置域名解析?(www和泛解析) 登陆ID后,可以通过“管理中心——用户菜单——域名管理——域名管理——(请输入条件查询信息)——列出所有域名——(找到对应域名)——[管理]——解析管理”进入“域名控制面板”操作设置。 1)登录ID,进入管理中心“用户菜单——域名管理”。 2)在输入条件查询信息中输入关键字,通过“域名类型”“注册模版”“域名分类”“域名状态”等多种方式或选择其中一种后,点击“查询”来查找域名。(注:可以直接点击“查询”列出所有域名)

3)查找到需要解析的域名后,点击域名后的[管理]按钮,即可进行相应操作。 4)在域名管理页面中选择“解析管理”进入域名解析操作界面。

5)按照图示进行设定之后,点击新增一条,即可完成域名解析。 例如域名:https://www.wendangku.net/doc/f815993940.html,,主机名设置*(泛解析),类型A,IP地址即为您主机的IP,设置后即可以任何前缀+域名进行访问,如 https://www.wendangku.net/doc/f815993940.html,或https://www.wendangku.net/doc/f815993940.html,等等;主机名为空(没有填写任何字符),类型A,IP地址即为您主机的IP,设置后是以域名直接访问;如 https://www.wendangku.net/doc/f815993940.html, 主机名为www,类型A,IP地址即为您主机的IP,设置后是以www+域名进行访问,如https://www.wendangku.net/doc/f815993940.html,。

如何设置别名记录(CNAME)? 登录ID后,可以通过“管理中心——用户菜单——域名管理——域名管理——(请输入条件查询信息)——列出所有域名——(找到对应域名)——[管理]——解析管理”进入“域名控制面板”操作设置别名记录。 1)登录ID,进入管理中心“用户菜单——域名管理”。

2)在输入条件查询信息中输入关键字,通过“域名类型”“注册模版”“域名分类”“域名状态”等多种方式或选择其中一种后,点击“查询”来查找域名。(注:可以直接点击“查询”列出所有域名) 3)查找到需要设置别名记录的域名后,点击域名后的[管理]按钮,即可进入域名管理页面。

各类格式的特点区分

在用各类软件设计时相信大家肯定存在着这样的问题,各种各样的格式让大家很是迷惑。没关系,福利来了,这里就给大家介绍了各种格式的特点应用。 TIFF格式 标签图像文件格式(Tagged Image File Format,简写为TIFF) 是一种主要用来存储包括照片和艺术图在内的图像的文件格式。它最初由Aldus公司与微软公司一起为PostScript 打印开发.TIFF文件格式适用于在应用程序之间和计算机平台之间的交换文件,它的出现使得图像数据交换变得简单。 TIFF是最复杂的一种位图文件格式。TIFF是基于标记的文件格式,它广泛地应用于对图像质量要求较高的图像的存储与转换。由于它的结构灵活和包容性大,它已成为图像文件格式的一种标准,绝大多数图像系统都支持这种格式。用Photoshop 编辑的TIFF文件可以保存路径和图层。 应用广泛 (1)TIFF可以描述多种类型的图像;(2)TIFF拥有一系列的压缩方案可供选择;(3)TIFF 不依赖于具体的硬件;(4)TIFF是一种可移植的文件格式。 可扩展性 在TIFF 6.0中定义了许多扩展,它们允许TIFF提供以下通用功能:(1)几种主要的压缩方法;(2)多种色彩表示方法;(3)图像质量增强;(4)特殊图像效果;(5)文档的存储和检索帮助。 格式复杂 TIFF文件的复杂性给它的应用带来了一些问题。一方面,要写一种能够识别所有不同标记的软件非常困难。另一方面,一个TIFF文件可以包含多个图像,每个图像都有自己的IFD 和一系列标记,并且采用了多种压缩算法。这样也增加了程序设计的复杂度。 文档图像中的TIFF TIFF格式是文档图像和文档管理系统中的标准格式。在这种环境中它通常使用支持黑白(也称为二值或者单色)图像的CCITT Group IV 2D压缩。在大量生产的环境中,文档通常扫描成黑白图像(而不是彩色或者灰阶图像)以节约存储空间。A4大小200dpi(每英寸点数分辨率)扫描结果平均大小是30KB,而300dpi的扫描结果是50KB。300dpi比200dpi更

with的用法

with[wIT] prep.1.与…(在)一起,带着:Come with me. 跟我一起来吧。/ I went on holiday with my friend. 我跟我朋友一起去度假。/ Do you want to walk home with me? 你愿意和我一道走回家吗 2.(表带有或拥有)有…的,持有,随身带着:I have no money with me. 我没有带钱。/ He is a man with a hot temper. 他是一个脾气暴躁的人。/ We bought a house with a garden. 我们买了一座带花园的房子。/ China is a very large country with a long history. 中国是一个具有历史悠久的大国。3.(表方式、手段或工具)以,用:He caught the ball with his left hand. 他用左手接球。/ She wrote the letter with a pencil. 她用铅笔写那封信。4.(表材料或内容)以,用:Fill the glass with wine. 把杯子装满酒。/ The road is paved with stones. 这条路用石头铺砌。5.(表状态)在…的情况下,…地:He can read French with ease. 他能轻易地读法文。/ I finished my homework though with difficulty. 虽然有困难,我还是做完了功课。6.(表让步)尽管,虽然:With all his money, he is unhappy. 尽管他有钱,他并不快乐。/ With all his efforts, he lost the match. 虽然尽了全力,他还是输了那场比赛。7.(表条件)若是,如果:With your permission, I’ll go. 如蒙你同意我就去。8.(表原因或理由)因为,由于:He is tired with work. 他工作做累了。/ At the news we all jumped with joy. 听到这消息我们都高兴得跳了起来。9.(表时间)当…的时候,在…之后:With that remark, he left. 他说了那话就离开了。/ With daylight I hurried there to see what had happened. 天一亮我就去那儿看发生了什么事。10. (表同时或随同)与…一起,随着:The girl seemed to be growing prettier with each day. 那女孩好像长得一天比一天漂亮。11.(表伴随或附带情况)同时:I slept with the window open. 我开着窗户睡觉。/ Don’t speak with your mouth full. 不要满嘴巴食物说话。12.赞成,同意:I am with you there. 在那点上我同你意见一致。13.由…照看,交…管理,把…放在某处:I left a message for you with your secretary. 我给你留了个信儿交给你的秘书了。/ The keys are with reception. 钥匙放在接待处。14 (表连同或包含)连用,包含:The meal with wine came to £8 each. 那顿饭连酒每人8英镑。/ With preparation and marking a teacher works 12 hours a day. 一位老师连备课带批改作业每天工作12小时。15. (表对象或关系)对,关于,就…而言,对…来说:He is pleased with his new house. 他对他的新房子很满意。/ The teacher was very angry with him. 老师对他很生气。/ It’s the same with us students. 我们学生也是这样。16.(表对立或敌对)跟,以…为对手:The dog was fighting with the cat. 狗在同猫打架。/ He’s always arguing with his brother. 他老是跟他弟弟争论。17.(在祈使句中与副词连用):Away with him! 带他走!/ Off with your clothes! 脱掉衣服!/ Down with your money! 交出钱来! 【用法】1.表示方式、手段或工具等时(=以,用),注意不要受汉语意思的影响而用错搭配,如“用英语”习惯上用in English,而不是with English。2.与某些抽象名词连用时,其作用相当于一个副词:with care=carefully 认真地/ with kindness=kindly 亲切地/ with joy=joyfully 高兴地/ with anger=angrily 生气地/ with sorrow=sorrowfully 悲伤地/ with ease=easily 容易地/ with delight=delightedly 高兴地/ with great fluency =very fluently 很流利地3.表示条件时,根据情况可与虚拟语气连用:With more money I would be able to buy it. 要是钱多一点,我就买得起了。/ With better equipment, we could have finished the job even sooner. 要是设备好些,我们完成这项工作还要快些。4.比较with 和as:两者均可表示“随着”,但前者是介词,后者是连词:He will improve as he grows older. 随着年龄的增长,他会进步的。/ People’s ideas change with the change of the times. 时代变了,人们的观念也会变化。5.介词with和to 均可表示“对”,但各自的搭配不同,注意不要受汉语意思的影响而用错,如在kind, polite, rude, good, married等形容词后通常不接介词with而接to。6.复合结构“with+宾语+宾语补足语”是一个很有用的结构,它在句中主要用作状语,表示伴随、原因、时间、条件、方式等;其中的宾语补足语可以是名词、形容词、副词、现在分词、过去分词、不定式、介词短语等:I went out with the windows open. 我外出时没有关窗户。/ He stood before his teacher with his head down. 他低着头站在老师面前。/ He was lying on the bed with all his clothes on. 他和衣躺在床上。/ He died with his daughter yet a schoolgirl. 他去世时,女儿还是个小学生。/ The old man sat there with a basket beside her. 老人坐在那儿,身边放着一个篮子。/ He fell asleep with the lamp burning. 他没熄灯就睡着了。/ He sat there with his eyes closed. 他闭目坐在那儿。/ I can’t go out with all these clothes to wash. 要洗这些衣服,我无法出去了。这类结构也常用于名词后作定语:The boy with nothing on is her son. 没穿衣服的这个男孩子是她儿子。 (摘自《英语常用词多用途词典》金盾出版社) - 1 -

认清维也纳华尔兹中的重要区别

认清维也纳华尔兹中的重要区别 维也纳华尔兹中的重要区别: 1、左转步与右转步不相同。左转步反身,右转步摆荡; 2、男士步法与女士步法不相同。男士前进摆荡,女士前进无摆荡; 3、前进小节与后退小节不相同。男士前进小节大步向前,后退小节小步调整; 4、节拍长短不相同。每一拍时间值长短不相同,不是平均占一拍。具体来说: 1、维也纳华尔兹左转步与右转步不相同。 在维也纳华尔兹中,右转和左转的跳法是不对称的,右旋转是横并式结构,右转步强调向前流动,强调摆荡,有倾斜,有起伏,步幅大,以单侧拉腰为主;左旋转是锁式结构,左转步强调拧腰胯,反身,无摆荡,无升降,锁步,步幅小,要不停地反身。 2、维也纳华尔兹男士步法与女士步法不相同。

在维也纳华尔兹中,男士与女士步法不相同,男士的前进转身小节是女士的后退转身小节,男士前进右转摆荡,女士后退右转也摆荡;男士后退右转无摆荡,女士前进右转也无摆荡。 3、维也纳华尔兹前进小节与后退小节跳法不相同。 在维也纳华尔兹中,前进与后退小节跳法不相同,男士前进小节大步向前,后退小节小步调整。右转男士后退(女士前进)那个小节不摆荡,步子也较小,相当于休息。 4、维也纳华尔兹中节拍长短不相同。 在维也纳华尔兹中,每两小节六步为一组,每一节拍时间值长短不相同,不都是平均占一拍。六个节拍时间值分别是:1.5、0.75、0.75、1.5、0.75、0.75,第一、四拍最长,第三、六拍最短,口令:慢、快、快、慢、快、快 跳快三的要领 (2011-11-14 10:18:09) 转载▼ 标签:

杂谈

维也纳华尔兹俗称快三,它是舞中之王,跳快三是很难跳得好的,我虽然跳舞多年,长期以来被错误的观点支配,也是最近才掌握到跳快三的要领。 快三看似简单,只有四种基本步法,左转、右转、左换步、右换步,但如果不掌握要领,光靠看视频,听舞友指点,不容易领会关键的要领,舞就跳不好。 很多人以为快三就是比慢三转快一些,这就错了,这也是跳不好快三的原因。我以前也是用这种思维去跳的,结果一直转不好,转起来不畅顺,不能绕舞池转。开始还以为对方没跳好,但与多个人跳过也不好,最近才发现,是自己没跳对,不会带舞伴,跳和带的方法不对。 不久前,在网上无意间找到了2句跳好快三的要决,原来快三的转与慢三的转完全不一样,慢三是转园圈,像车轮那样。而快三的转是折转或翻转,像蛇爬行时一样。其次,快三不是以3拍为一小节,而是以6拍为一小节。一小节中跳半个大圈和半个小圈,不是两个半圈相同的,跳时男女互相错开,男跳大半圈时女跳小半圈,只有跳大半圈时才发力。这就是对快三的新认识,是跳快三的要领。 从以上认识入手,还需要学会用力的方法,以前我和很多人一样用手发力来带对方转,这显然不能到位。其实,关键是要从腰发力,用侧腰的力去带动身体前进,以前进带动转动。 快三的左转和右转也很不一样,很多人右转不错,但左转就不妥,这也是上面说的原因,没有认识快三的转的实质。在跳快三过

产品特性与过程特性的区别

产品特性与过程特性得区别 如果说产品特性从安全、法规、性能、尺寸、外观、装配等方面考虑,过程特性仅从产品形成过程中得参数(温度、压力、电压、电流)等考虑就是不就是很准确呢??欢迎大家讨论,敬请指教! 简单得讲,产品特性就是随着产品走,如过程加工中产品得尺寸、材料等,?过程特性就是在过程上不随产品走得东西,如工艺参数温度、压力等、 我一般就是作这样得区分、 产品特性能做spc,过程特性不能 产品特性一般就是指产品工程规范得要求;过程特性可以指工艺(过程)参数 过程特性保证产品特性 虽然大家说得都对,但就是怎样确定产品与过程得特殊特性呢?就是不就是特殊特性都要采用SPC控制或100%控制或防差错系统? ?通过fmea来确定得!根据过程得风险以及顾客得呼声来确定控制方法! 特性矩阵分析-初始特殊特性清单-FMEA-控制计划? 还就是:特性矩阵分析-FMEA-初始特殊特性清单--控制计划? 第一阶段: 确定初始过程特殊特性清单FMA分析 第二阶段?样件控制计划产品与过程特殊特性 第三阶段 特性矩阵图试生产控制计划PFMEA?第四阶段:?控制计划 产品特性,随着产品走,就是在过程中形成得,而过程特性不随产品走,我们只有通过过程特性来控制产品特性。而控制产品特性包括人、机、法、环、测与过程规范,故这些都就是过程特性;产品特性可以从料、技术要求、技术规范进行考虑。谁有更深层次得讨论,请指教。 更正一下。?初始特殊特性清单-特性矩阵分析-PFMEA-控制计划先有特殊特性,才有特性矩阵分析。体现特性与过程之间得相互关系及特性之间得影响。 产品特性与过程特性得区别:用过程特性去保证产品特性啊!产品特性就是要带到最总顾客得手里啊!而过程特性就是在过程中为保证产品得特性而对过程设置得特性,过程控制主要控制“过程特性啊” 特殊特性释义? 以下就是我对特殊特性得一些见解,希望能够得到大家得评论!也就是为了“特殊特性清单就是越来越长还就是越来越短”得讨论而作 特殊特性就是APQP得核心。无论就是QS9000还就是TS16949,其实对于特殊特性得解释与理解就是一样得。不同得就是QS9000着重阐明了通用、福特、克莱斯勒三大车厂得特殊要求。如对特性得等级分类以及特性符号标记。而TS16949则体现得就是大众化得,灵活得,可根据顾客而定得特性要求。?现在就以TS16949体系中对于特殊特性得理解来展开说明,一直推广到QS9000中得特殊要求。 TS16949中特殊特性得出处说明!? TS16949有两处地方出现过特殊特性。 第一处: 7.2.1、1顾客指定得特殊特性?组织必须在特殊特性得指定、文件化、与控制方面符合客户得所有要求。 解释:也就就是说凡就是客户指定得特殊特性,应在相关文件中体现。?相关文件有:设计FMEA、过程FMEA、控制计划、作业指导书、检验规范等 在上述文件中应作特殊特性符号得标记。

(完整版)with的复合结构用法及练习

with复合结构 一. with复合结构的常见形式 1.“with+名词/代词+介词短语”。 The man was walking on the street, with a book under his arm. 那人在街上走着,腋下夹着一本书。 2. “with+名词/代词+形容词”。 With the weather so close and stuffy, ten to one it’ll rain presently. 天气这么闷热,十之八九要下雨。 3. “with+名词/代词+副词”。 The square looks more beautiful than even with all the light on. 所有的灯亮起来,广场看起来更美。 4. “with+名词/代词+名词”。 He left home, with his wife a hopeless soul. 他走了,妻子十分伤心。 5. “with+名词/代词+done”。此结构过去分词和宾语是被动关系,表示动作已经完成。 With this problem solved, neomycin 1 is now in regular production. 随着这个问题的解决,新霉素一号现在已经正式产生。 6. “with+名词/代词+-ing分词”。此结构强调名词是-ing分词的动作的发出者或某动作、状态正在进行。 He felt more uneasy with the whole class staring at him. 全班同学看着他,他感到更不自然了。 7. “with+宾语+to do”。此结构中,不定式和宾语是被动关系,表示尚未发生的动作。 So in the afternoon, with nothing to do, I went on a round of the bookshops. 由于下午无事可做,我就去书店转了转。 二. with复合结构的句法功能 1. with 复合结构,在句中表状态或说明背景情况,常做伴随、方式、原因、条件等状语。With machinery to do all the work, they will soon have got in the crops. 由于所有的工作都是由机器进行,他们将很快收完庄稼。(原因状语) The boy always sleeps with his head on the arm. 这个孩子总是头枕着胳膊睡觉。(伴随状语)The soldier had him stand with his back to his father. 士兵要他背对着他父亲站着。(方式状语)With spring coming on, trees turn green. 春天到了,树变绿了。(时间状语) 2. with 复合结构可以作定语 Anyone with its eyes in his head can see it’s exactly like a rope. 任何一个头上长着眼睛的人都能看出它完全像一条绳子。 【高考链接】 1. ___two exams to worry about, I have to work really hard this weekend.(04北京) A. With B. Besides C. As for D. Because of 【解析】A。“with+宾语+不定式”作状语,表示原因。 2. It was a pity that the great writer died, ______his works unfinished. (04福建) A. for B. with C. from D.of 【解析】B。“with+宾语+过去分词”在句中作状语,表示状态。 3._____production up by 60%, the company has had another excellent year. (NMET) A. As B.For C. With D.Through 【解析】C。“with+宾语+副词”在句中作状语,表示程度。

相关文档
相关文档 最新文档