对于应用程序来说,操纵对象集合、将它们作为参数传入函数并在处理完成时返回它们是非常常见的。
It is quite common for applications to manipulate collections of objects, passing them as arguments to functions and returning them when the processing is complete.
它将事件对象作为参数传递给这个函数。
It will pass the event object to that function as its argument.
您的目标是构建这样一个简单的控制器:它知道应该运行哪个模型和函数,然后返回一个JSON对象作为响应,这个响应可用于事务的远端。
Your goal is to build a simple controller that will know which model and function to run, and then return a JSON object as a response that is usable on the far end of the transaction.
其对象指针作为函数的第一个参数被传递。
The object pointer is passed as the first argument to the function.
实例是将类对象作为函数调用而创建的。
Instances are created by calling the class object as a function.
实际上,对象的文本表示只不过是一个联合数组,它可能包含某些函数作为一些值。
Indeed, the literal representation of an object is simply an associative array that may contain functions for some of its values.
要移动、修改或者删除图形元素,该ID将作为参数传递给包含画布对象的各个成员函数。
To move, modify, or delete a graphics element, this ID is passed as a parameter to the respective member function on the containing Canvas object.
首先,您已经看到,函数可以作为对象进行操纵和存储。
The first, as you've already seen, is that functions can be manipulated and stored as objects themselves.
这个函数使用一个信号量对象的句柄作为参数,并会一直等待下去,直到其状态变为有信号状态或超时为止。
This function takes the handle to the semaphore object and waits until it is signaled or a timeout occurs.
由于函数参数是作为请求参数传输的,可以从param对象获得它们的值。
Because the function parameters are transmitted as request parameters, their values are obtained from the param object.
要发送字符串对象数组,您调用JSON . stringify函数,将数组作为参数传递进来。
To send your array of string objects, you call the JSON.stringify function, passing in the array as the argument.
它会把我们的foo . bar函数公开给脚本和ZClass,并且还有一个作为“可添加的”对象的小接口,这就是全部内容。
It will expose our foo.bar function to scripts and ZClasses, and it will also have a little interface as an "addable" object, and that's about all.
DynamicQueryMode不支持维度对象(比如一个成员)作为特定于供应商的关系函数的参数。
Dynamic Query Mode does not allow a dimensional object, such as a member, as an argument to a vendor specific relational function.
只需将其传入json_encode函数,然后它将从另一端作为json序列化对象传出。
Just put it through the json_encode function, and it comes out the other side as a json serialized object.
除了命名对象外,该函数还告诉dacscheck它运行在一个cgi上下文中,并且应该使用REMOTE_USER的值作为发出请求的用户标识。
Besides naming the object, the function tells dacscheck that it's running within a CGI context and should use the value of REMOTE_USER as the identity of the user making the request.
该函数确保浏览器能够显示Google地图,创建一个地图对象(Gmap2),并在页面中为其提供HTML元素作为地图的容器(“map”)。
This function makes sure the browser can display a Google map, then creates a map object (Gmap2), providing it with the HTML element in the page to use as the map's container (" map ").
闭包捕获真正被调用的Web服务方法存根(称为obj的函数对象)以及流作为日志输出。
The closure captures the information about the actual Web service method stub to be invoked (the function object called obj) as well as the stream for the log output.
Joda支持使用许多其他对象作为构造函数的参数,用于创建DateTime,如清单5所示。
Joda supports a number of other objects as the constructor parameter for creating a DateTime, as shown in Listing 5.
在每一个定时器事件被调用时该state对象作为一个参数传递给你的定时回调函数。
This state object is passed to your timer callback function during each timer event invocation.
利用atom函数,可获得作为初始值包装的atom对象。
By using the atom function, you get an atom object that is a wrapper around the initial value.
需注意此类的构造函数使用com . ibm . collaboration . realtime . messages . message Handler对象作为参数的方式。
Notice how the constructor of this class takes in a com.ibm.collaboration.realtime.messages.MessageHandler object as a parameter.
清单1实例化一个默认的树查看器;您也可以定制树,并用树对象作为参数,用构造函数实例化树查看器。
Listing 1 instantiates a default tree viewer; you can also customize the tree and instantiate the tree viewer by using a constructor with a tree object as the parameter.
当作为构造函数参数时,这些可变或者不可变的变量会在一个对象被实例化的时候被初始化。
When used as constructor parameters, the mutable or immutable variables specified will be initialized when an object is instantiated.
本方法以实际系统的输入输出信号为依据,实现系统建模,用被控对象传递函数的逆作为串联控制器来对系统的动态特性进行控制。
Using the input and output signal, the method can model the system, and can control the dynamical property of the system with the inverse transfer function of the controlled object as the controller.
它使用一个函数作为它的参数,然后依次将这个函数应用到Array中的每个对象中。
It takes a function as its parameter and applies the function sequentially to each object in the Array.
在前述的这个代码片段中,完成加载之后,从服务器返回的XML在data对象中被引用,此对象作为参数发送给最初传递的函数。
In the previous code snippet, after the load is completed, the XML returned from the server is referenced in the data object, which is sent as a parameter to the function originally passed.
然后,调用友元函数spacefriend并将类对象的地址作为其参数传递。然后调用template函数,先使用整数类型,然后使用浮点数据类型。
It then calls the friend function spacefriend and passes the class object address as its argument, and calls the template function, beginning with integer types and then floating data types.
它接收XML数据作为输入,将xml字符串转化成SimpleXMLElement对象,然后发送给该类的另一个(递归)函数作为输入。
It takes XML data as input, and it converts the XML string into a SimpleXMLElement object, which is sent as input to another (recursive) function in this class.
同时假定Collaborator对象要求使用字符串和原始的int作为传递给构造函数的参数。
Also suppose that the Collaborator object requires a string and a primitive int as parameters passed to the constructor.
清单9中的 addProduct() 函数接收一个新产品记录作为键-值对数组,然后使用 Zend_Db对象的insert() 函数将记录写入到数据库表中。
The addProduct() method in Listing 9 accepts a new product record as an array of key-value pairs and then uses the Zend_Db object's insert() method to write this record to the database table.
应用推荐