Class cc.Node
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
cc.Node()
cc.Node is the root class of all node. |
Method Summary
Class Detail
cc.Node is the root class of all node. Anything that gets drawn or contains things that get drawn is a cc.Node.
The most popular cc.Nodes are: cc.Scene, cc.Layer, cc.Sprite, cc.Menu.
The main features of a cc.Node are:
- They can contain other cc.Node nodes (addChild, getChildByTag, removeChild, etc)
- They can schedule periodic callback (schedule, unschedule, etc)
- They can execute actions (runAction, stopAction, etc)
Some cc.Node nodes provide extra functionality for them or their children.
Subclassing a cc.Node usually means (one/all) of:
- overriding constructor function "ctor" to initialize resources and schedule callbacks
- create callbacks to handle the advancement of time
Features of cc.Node:
- position
- scale (x, y)
- rotation (in degrees, clockwise)
- anchor point
- size
- color
- opacity
- visible
- z-order
- WebGL z position
Default values:
- rotation: 0
- position: (x=0,y=0)
- scale: (x=1,y=1)
- contentSize: (x=0,y=0)
- anchorPoint: (x=0,y=0)
- color: (r=255,g=255,b=255)
- opacity: 255
Limitations:
- A cc.Node is a "void" object. It doesn't have a texture
Order in transformations with grid disabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
Order in transformations with grid enabled
-# The node will be translated (position)
-# The node will be rotated (rotation)
-# The node will be scaled (scale)
-# The grid will capture the screen
-# The node will be moved according to the camera values (camera)
-# The grid will render the captured screen
Field Detail
Method Detail
-
addChild(child, localZOrder, tag)
"add" logic MUST only be in this method
If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately.
- Parameters:
- {cc.Node} child
- A child node
- {Number} localZOrder Optional
- Z order for drawing priority. Please refer to setZOrder(int)
- {Number} tag Optional
- A integer to identify the node easily. Please refer to setTag(int)
-
addComponent(component)Adds a component to the node's component container.
- Parameters:
- {cc.Component} component
-
attr(attrs)
Properties configuration function All properties in attrs will be set to the node, when the setter of the node is available, the property will be set via setter function.
- Parameters:
- {Object} attrs
- Properties to be set to node
-
{cc.Rect} boundingBox()Returns a "local" axis aligned bounding box of the node.
- Deprecated:
- since v3.0, please use getBoundingBox instead
- Returns:
- {cc.Rect}
-
cleanup()Stops all running actions and schedulers
-
{cc.Point} convertToNodeSpace(worldPoint)Converts a Point to node (local) space coordinates. The result is in Points.
- Parameters:
- {cc.Point} worldPoint
- Returns:
- {cc.Point}
-
{cc.Point} convertToNodeSpaceAR(worldPoint)Converts a Point to node (local) space coordinates. The result is in Points.
treating the returned/received node point as anchor relative.- Parameters:
- {cc.Point} worldPoint
- Returns:
- {cc.Point}
-
{cc.Point} convertTouchToNodeSpace(touch)convenience methods which take a cc.Touch instead of cc.Point
- Parameters:
- {cc.Touch} touch
- The touch object
- Returns:
- {cc.Point}
-
{cc.Point} convertTouchToNodeSpaceAR(touch)converts a cc.Touch (world coordinates) into a local coordiante. This method is AR (Anchor Relative).
- Parameters:
- {cc.Touch} touch
- The touch object
- Returns:
- {cc.Point}
-
{cc.Point} convertToWorldSpace(nodePoint)Converts a Point to world space coordinates. The result is in Points.
- Parameters:
- {cc.Point} nodePoint
- Returns:
- {cc.Point}
-
{cc.Point} convertToWorldSpaceAR(nodePoint)Converts a local Point to world space coordinates.The result is in Points.
treating the returned/received node point as anchor relative.- Parameters:
- {cc.Point} nodePoint
- Returns:
- {cc.Point}
-
Allocates and initializes a node.
-
ctor()Constructor function, override it to extend the construction behavior, remember to call "this._super()" in the extended "ctor" function.
-
draw(ctx)Render function using the canvas 2d context or WebGL context, internal usage only, please do not call this function
- Parameters:
- {CanvasRenderingContext2D | WebGLRenderingContext} ctx
- The render context
-
{cc.Action} getActionByTag(tag)Returns an action from the running action list by its tag.
- Parameters:
- {Number} tag
- Returns:
- {cc.Action} The action object with the given tag.
- See:
- cc.Node#getTag and cc.Node#setTag
-
{cc.ActionManager} getActionManager()
Returns the CCActionManager object that is used by all actions.
(IMPORTANT: If you set a new cc.ActionManager, then previously created actions are going to be removed.)- Returns:
- {cc.ActionManager} A CCActionManager object.
- See:
- cc.Node#setActionManager
-
{cc.Point} getAnchorPoint()
Returns a copy of the anchor point.
Anchor point is the point around which all transformations and positioning manipulations take place.
It's like a pin in the node where it is "attached" to its parent.
The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner.
But you can use values higher than (1,1) and lower than (0,0) too.
The default anchor point is (0.5,0.5), so it starts at the center of the node.- Returns:
- {cc.Point} The anchor point of node.
-
{cc.Point} getAnchorPointInPoints()Returns a copy of the anchor point in absolute pixels.
you can only read it. If you wish to modify it, use setAnchorPoint- Returns:
- {cc.Point} The anchor point in absolute pixels.
- See:
- cc.Node#getAnchorPoint
-
{cc.Rect} getBoundingBox()Returns a "local" axis aligned bounding box of the node.
The returned box is relative only to its parent.- Returns:
- {cc.Rect} The calculated bounding box of the node
-
{cc.Rect} getBoundingBoxToWorld()Returns a "world" axis aligned bounding box of the node.
- Returns:
- {cc.Rect}
-
{cc.Camera} getCamera()Returns a camera object that lets you move the node using a gluLookAt
var camera = node.getCamera(); camera.setEye(0, 0, 415/2); camera.setCenter(0, 0, 0);
- Deprecated:
- since v3.0, no alternative function
- Returns:
- {cc.Camera} A CCCamera object that lets you move the node using a gluLookAt
-
{cc.Node} getChildByName(name)Returns a child from the container given its name
- Parameters:
- {Number} name
- An identifier to find the child node.
- Returns:
- {cc.Node} a CCNode object whose name equals to the input parameter
-
{cc.Node} getChildByTag(aTag)Returns a child from the container given its tag
- Parameters:
- {Number} aTag
- An identifier to find the child node.
- Returns:
- {cc.Node} a CCNode object whose tag equals to the input parameter
-
{Array} getChildren()Returns an array of all children
Composing a "tree" structure is a very important feature of CCNode//This sample code traverses all children nodes, and set their position to (0,0) var allChildren = parent.getChildren(); for(var i = 0; i< allChildren.length; i++) { allChildren[i].setPosition(0,0); }
- Returns:
- {Array} An array of children
-
{Number} getChildrenCount()Returns the amount of children.
- Returns:
- {Number} The amount of children.
-
{cc.Color} getColor()Returns the color of Node
- Returns:
- {cc.Color}
-
{cc.Component} getComponent(name)Returns a component identified by the name given.
- Parameters:
- {String} name
- The name to search for
- Returns:
- {cc.Component} The component found
-
{cc.Size} getContentSize()
Returns a copy the untransformed size of the node.
The contentSize remains the same no matter the node is scaled or rotated.
All nodes has a size. Layer and Scene has the same size of the screen by default.- Returns:
- {cc.Size} The untransformed size of the node.
-
{cc.Color} getDisplayedColor()Returns the displayed color of Node, the difference between displayed color and color is that displayed color is calculated based on color and parent node's color when cascade color enabled.
- Returns:
- {cc.Color}
-
{number} getDisplayedOpacity()Returns the displayed opacity of Node, the difference between displayed opacity and opacity is that displayed opacity is calculated based on opacity and parent node's opacity when cascade opacity enabled.
- Returns:
- {number} displayed opacity
-
{number} getGlobalZOrder()Return the Node's Global Z Order.
- Returns:
- {number} The node's global Z order
-
{Number} getGLServerState()Returns the state of OpenGL server side.
- Deprecated:
- since v3.0, no need anymore
- Returns:
- {Number} The state of OpenGL server side.
-
{cc.GridBase} getGrid()
Returns a grid object that is used when applying effects.
This function have been deprecated, please use cc.NodeGrid to run grid actions- Deprecated:
- since v3.0, no alternative function
- Returns:
- {cc.GridBase} A CCGrid object that is used when applying effects
-
{Number} getLocalZOrder()Returns the local Z order of this node.
- Returns:
- {Number} The local (relative to its siblings) Z order.
-
{string} getName()Returns a string that is used to identify the node.
- Returns:
- {string} A string that identifies the node.
-
{cc.AffineTransform} getNodeToParentTransform()Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
The matrix is in Pixels.- Returns:
- {cc.AffineTransform} The affine transform object
-
{cc.AffineTransform} getNodeToWorldTransform()Returns the world affine transform matrix. The matrix is in Pixels.
- Returns:
- {cc.AffineTransform}
-
{Number} getNumberOfRunningActions()
Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays).
Composable actions are counted as 1 action. Example:
If you are running 1 Sequence of 7 actions, it will return 1.
If you are running 7 Sequences of 2 actions, it will return 7.- Returns:
- {Number} The number of actions that are running plus the ones that are schedule to run
-
{number} getOpacity()Returns the opacity of Node
- Returns:
- {number} opacity
-
{Number} getOrderOfArrival()Returns the arrival order, indicates which children should be added previously.
- Returns:
- {Number} The arrival order.
-
{cc.Node} getParent()Returns a reference to the parent node
- Returns:
- {cc.Node} A reference to the parent node
-
{cc.AffineTransform} getParentToNodeTransform()Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates.
The matrix is in Pixels.- Returns:
- {cc.AffineTransform}
-
{cc.Point} getPosition()
Returns a copy of the position (x,y) of the node in cocos2d coordinates. (0,0) is the left-bottom corner.
- Returns:
- {cc.Point} The position (x,y) of the node in OpenGL coordinates
-
{Number} getPositionX()
Returns the x axis position of the node in cocos2d coordinates.
- Returns:
- {Number}
-
{Number} getPositionY()
Returns the y axis position of the node in cocos2d coordinates.
- Returns:
- {Number}
-
{Number} getRotation()Returns the rotation (angle) of the node in degrees. 0 is the default rotation angle. Positive values rotate node clockwise.
- Returns:
- {Number} The rotation of the node in degrees.
-
{Number} getRotationX()Returns the X axis rotation (angle) which represent a horizontal rotational skew of the node in degrees.
0 is the default rotation angle. Positive values rotate node clockwise
(support only in WebGL rendering mode)- Returns:
- {Number} The X rotation in degrees.
-
{Number} getRotationY()Returns the Y axis rotation (angle) which represent a vertical rotational skew of the node in degrees.
0 is the default rotation angle. Positive values rotate node clockwise
(support only in WebGL rendering mode)- Returns:
- {Number} The Y rotation in degrees.
-
{Number} getScale()Returns the scale factor of the node.
- Returns:
- {Number} The scale factor
-
{Number} getScaleX()Returns the scale factor on X axis of this node
- Returns:
- {Number} The scale factor on X axis.
-
{Number} getScaleY()Returns the scale factor on Y axis of this node
- Returns:
- {Number} The scale factor on Y axis.
-
{cc.Scheduler} getScheduler()
Returns the cc.Scheduler object used to schedule all "updates" and timers.
- Returns:
- {cc.Scheduler} A CCScheduler object.
-
{cc.GLProgram} getShaderProgram()Return the shader program currently used for this node
- Returns:
- {cc.GLProgram} The shader program currently used for this node
-
{Number} getSkewX()
Returns the skew degrees in X The X skew angle of the node in degrees.
This angle describes the shear distortion in the X direction.
Thus, it is the angle between the Y axis and the left edge of the shape The default skewX angle is 0. Positive values distort the node in a CW direction.- Returns:
- {Number} The X skew angle of the node in degrees.
-
{Number} getSkewY()
Returns the skew degrees in Y
The Y skew angle of the node in degrees.
This angle describes the shear distortion in the Y direction.
Thus, it is the angle between the X axis and the bottom edge of the shape
The default skewY angle is 0. Positive values distort the node in a CCW direction.
- Returns:
- {Number} The Y skew angle of the node in degrees.
-
{Number} getTag()Returns a tag that is used to identify the node easily.
//You can set tags to node then identify them easily. // set tags node1.setTag(TAG_PLAYER); node2.setTag(TAG_MONSTER); node3.setTag(TAG_BOSS); parent.addChild(node1); parent.addChild(node2); parent.addChild(node3); // identify by tags var allChildren = parent.getChildren(); for(var i = 0; i < allChildren.length; i++){ switch(node.getTag()) { case TAG_PLAYER: break; case TAG_MONSTER: break; case TAG_BOSS: break; } }
- Returns:
- {Number} An integer that identifies the node.
-
{object} getUserData()
Returns a custom user data pointer
You can set everything in UserData pointer, a data block, a structure or an object.- Returns:
- {object} A custom user data pointer
-
{object} getUserObject()Returns a user assigned cocos2d object.
Similar to userData, but instead of holding all kinds of data it can only hold a cocos2d object- Returns:
- {object} A user assigned CCObject
-
{Number} getVertexZ()Returns WebGL Z vertex of this node.
- Returns:
- {Number} WebGL Z vertex of this node
-
{cc.AffineTransform} getWorldToNodeTransform()Returns the inverse world affine transform matrix. The matrix is in Pixels.
- Returns:
- {cc.AffineTransform}
-
{Number} getZOrder()Returns z order of this node
- Deprecated:
- since 3.0, please use getLocalZOrder instead
- Returns:
- {Number}
-
ignoreAnchorPointForPosition(newValue)
Sets whether the anchor point will be ignored when you position this node.
When anchor point ignored, position will be calculated based on the origin point (0, 0) in parent's coordinates.
This is an internal method, only used by CCLayer and CCScene. Don't call it outside framework.
The default value is false, while in CCLayer and CCScene are true- Parameters:
- {Boolean} newValue
- true if anchor point will be ignored when you position this node
-
{boolean} init()Initializes the instance of cc.Node
- Returns:
- {boolean} Whether the initialization was successful.
-
{boolean} isCascadeColorEnabled()Returns whether node's color value affect its child nodes.
- Returns:
- {boolean}
-
{boolean} isCascadeOpacityEnabled()Returns whether node's opacity value affect its child nodes.
- Returns:
- {boolean}
-
{Boolean} isIgnoreAnchorPointForPosition()Returns whether the anchor point will be ignored when you position this node.
When anchor point ignored, position will be calculated based on the origin point (0, 0) in parent's coordinates.- Returns:
- {Boolean} true if the anchor point will be ignored when you position this node.
- See:
- cc.Node#ignoreAnchorPointForPosition
-
{Boolean} isOpacityModifyRGB()Get whether color should be changed with the opacity value
- Returns:
- {Boolean}
-
{Boolean} isRunning()
Returns whether or not the node accepts event callbacks.
Running means the node accept event callbacks like onEnter(), onExit(), update()- Returns:
- {Boolean} Whether or not the node is running.
-
{Boolean} isVisible()Returns if the node is visible
- Returns:
- {Boolean} true if the node is visible, false if the node is hidden.
- See:
- cc.Node#setVisible
-
{cc.AffineTransform} nodeToParentTransform()
Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates.
The matrix is in Pixels.- Deprecated:
- since v3.0, please use getNodeToParentTransform instead
- Returns:
- {cc.AffineTransform}
-
nodeToWorldTransform()
- Deprecated:
- since v3.0, please use getNodeToWorldTransform instead
-
onEnter()
Event callback that is invoked every time when CCNode enters the 'stage'.
If the CCNode enters the 'stage' with a transition, this event is called when the transition starts.
During onEnter you can't access a "sister/brother" node.
If you override onEnter, you must call its parent's onEnter function with this._super(). -
onEnterTransitionDidFinish()
Event callback that is invoked when the CCNode enters in the 'stage'.
If the CCNode enters the 'stage' with a transition, this event is called when the transition finishes.
If you override onEnterTransitionDidFinish, you shall call its parent's onEnterTransitionDidFinish with this._super() -
onExit()
callback that is called every time the cc.Node leaves the 'stage'.
If the cc.Node leaves the 'stage' with a transition, this callback is called when the transition finishes.
During onExit you can't access a sibling node.
If you override onExit, you shall call its parent's onExit with this._super(). -
onExitTransitionDidStart()
callback that is called every time the cc.Node leaves the 'stage'.
If the cc.Node leaves the 'stage' with a transition, this callback is called when the transition starts.
If you override onExitTransitionDidStart, you shall call its parent's onExitTransitionDidStart with this._super() -
parentToNodeTransform()
- Deprecated:
- since v3.0, please use getParentToNodeTransform instead
-
pause()
Pauses all scheduled selectors and actions.
This method is called internally by onExit -
pauseSchedulerAndActions()
Pauses all scheduled selectors and actions.
This method is called internally by onExit- Deprecated:
- since v3.0, please use pause instead
-
release()
Currently JavaScript Bindings (JSB), in some cases, needs to use retain and release. This is a bug in JSB, and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB. This is a hack, and should be removed once JSB fixes the retain/release bug
You will need to retain an object if you created an engine object and haven't added it into the scene graph during the same frame.
Otherwise, JSB's native autorelease pool will consider this object a useless one and release it directly,
when you want to use it later, a "Invalid Native Object" error will be raised.
The retain function can increase a reference count for the native object to avoid it being released,
you need to manually invoke release function when you think this object is no longer needed, otherwise, there will be memory learks.
retain and release function call should be paired in developer's game code.- See:
- cc.Node#retain
-
removeAllChildren(cleanup)Removes all children from the container and do a cleanup all running actions depending on the cleanup parameter.
If the cleanup parameter is not passed, it will force a cleanup.
- Parameters:
- {Boolean | null} cleanup
- true if all running actions on all children nodes should be cleanup, false otherwise.
-
removeAllChildrenWithCleanup(cleanup)Removes all children from the container and do a cleanup all running actions depending on the cleanup parameter.
- Parameters:
- {Boolean | null} cleanup
-
removeAllComponents()Removes all components
-
removeChild(child, cleanup)
Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter.
If the cleanup parameter is not passed, it will force a cleanup.
"remove" logic MUST only be on this method
If a class wants to extend the 'removeChild' behavior it only needs
to override this method- Parameters:
- {cc.Node} child
- The child node which will be removed.
- {Boolean|null} cleanup Optional, Default: null
- true if all running actions and callbacks on the child node will be cleanup, false otherwise.
-
removeChildByTag(tag, cleanup)Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter. If the cleanup parameter is not passed, it will force a cleanup.
- Parameters:
- {Number} tag
- An integer number that identifies a child node
- {Boolean} cleanup
- true if all running actions and callbacks on the child node will be cleanup, false otherwise.
-
removeComponent(component)Removes a component identified by the given name or removes the component object given
- Parameters:
- {String|cc.Component} component
-
removeFromParent(cleanup)Remove itself from its parent node. If cleanup is true, then also remove all actions and callbacks.
If the cleanup parameter is not passed, it will force a cleanup.
If the node orphan, then nothing happens.- Parameters:
- {Boolean} cleanup
- true if all actions and callbacks on this node should be removed, false otherwise.
-
removeFromParentAndCleanup(cleanup)Removes this node itself from its parent node.
If the node orphan, then nothing happens.- Parameters:
- {Boolean} cleanup
- true if all actions and callbacks on this node should be removed, false otherwise.
- Deprecated:
- since v3.0, please use removeFromParent() instead
-
reorderChild(child, zOrder)Reorders a child according to a new z value.
The child MUST be already added.- Parameters:
- {cc.Node} child
- An already added child node. It MUST be already added.
- {Number} zOrder
- Z order for drawing priority. Please refer to setZOrder(int)
-
resume()
Resumes all scheduled selectors and actions.
This method is called internally by onEnter -
resumeSchedulerAndActions()Resumes all scheduled selectors and actions.
This method is called internally by onEnter- Deprecated:
- since v3.0, please use resume() instead
-
retain()
Currently JavaScript Bindings (JSB), in some cases, needs to use retain and release. This is a bug in JSB, and the ugly workaround is to use retain/release. So, these 2 methods were added to be compatible with JSB. This is a hack, and should be removed once JSB fixes the retain/release bug
You will need to retain an object if you created an engine object and haven't added it into the scene graph during the same frame.
Otherwise, JSB's native autorelease pool will consider this object a useless one and release it directly,
when you want to use it later, a "Invalid Native Object" error will be raised.
The retain function can increase a reference count for the native object to avoid it being released,
you need to manually invoke release function when you think this object is no longer needed, otherwise, there will be memory learks.
retain and release function call should be paired in developer's game code.- See:
- cc.Node#release
-
{cc.Action} runAction(action)Executes an action, and returns the action that is executed.
The node becomes the action's target. Refer to cc.Action's getTarget()- Parameters:
- {cc.Action} action
- Returns:
- {cc.Action} An Action pointer
-
schedule(callback_fn, interval, repeat, delay)
Schedules a custom selector.
If the selector is already scheduled, then the interval parameter will be updated without scheduling it again.- Parameters:
- {function} callback_fn
- A function wrapped as a selector
- {Number} interval
- Tick interval in seconds. 0 means tick every frame. If interval = 0, it's recommended to use scheduleUpdate() instead.
- {Number} repeat
- The selector will be executed (repeat + 1) times, you can use kCCRepeatForever for tick infinitely.
- {Number} delay
- The amount of time that the first tick will wait before execution.
-
scheduleOnce(callback_fn, delay)Schedules a callback function that runs only once, with a delay of 0 or larger
- Parameters:
- {function} callback_fn
- A function wrapped as a selector
- {Number} delay
- The amount of time that the first tick will wait before execution.
- See:
- cc.Node#schedule
-
scheduleUpdate()
schedules the "update" method.
It will use the order number 0. This method will be called every frame.
Scheduled methods with a lower order value will be called before the ones that have a higher order value.
Only one "update" method could be scheduled per node. -
scheduleUpdateWithPriority(priority)
schedules the "update" callback function with a custom priority. This callback function will be called every frame.
Scheduled callback functions with a lower priority will be called before the ones that have a higher value.
Only one "update" callback function could be scheduled per node (You can't have 2 'update' callback functions).
- Parameters:
- {Number} priority
-
setActionManager(actionManager)
Sets the cc.ActionManager object that is used by all actions.
- Parameters:
- {cc.ActionManager} actionManager
- A CCActionManager object that is used by all actions.
-
setAdditionalTransform(additionalTransform)
Sets the additional transform.
The additional transform will be concatenated at the end of getNodeToParentTransform.
It could be used to simulate `parent-child` relationship between two nodes (e.g. one is in BatchNode, another isn't).
// create a batchNode var batch= cc.SpriteBatchNode.create("Icon-114.png"); this.addChild(batch); // create two sprites, spriteA will be added to batchNode, they are using different textures. var spriteA = cc.Sprite.create(batch->getTexture()); var spriteB = cc.Sprite.create("Icon-72.png"); batch.addChild(spriteA); // We can't make spriteB as spriteA's child since they use different textures. So just add it to layer. // But we want to simulate `parent-child` relationship for these two node. this.addChild(spriteB); //position spriteA.setPosition(ccp(200, 200)); // Gets the spriteA's transform. var t = spriteA.getNodeToParentTransform(); // Sets the additional transform to spriteB, spriteB's position will based on its pseudo parent i.e. spriteA. spriteB.setAdditionalTransform(t); //scale spriteA.setScale(2); // Gets the spriteA's transform. t = spriteA.getNodeToParentTransform(); // Sets the additional transform to spriteB, spriteB's scale will based on its pseudo parent i.e. spriteA. spriteB.setAdditionalTransform(t); //rotation spriteA.setRotation(20); // Gets the spriteA's transform. t = spriteA.getNodeToParentTransform(); // Sets the additional transform to spriteB, spriteB's rotation will based on its pseudo parent i.e. spriteA. spriteB.setAdditionalTransform(t);
- Parameters:
- {cc.AffineTransform} additionalTransform
- The additional transform
-
setAnchorPoint(point, y)
Sets the anchor point in percent.
anchor point is the point around which all transformations and positioning manipulations take place.
It's like a pin in the node where it is "attached" to its parent.
The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner.
But you can use values higher than (1,1) and lower than (0,0) too.
The default anchor point is (0.5,0.5), so it starts at the center of the node.- Parameters:
- {cc.Point|Number} point
- The anchor point of node or The x axis anchor of node.
- {Number} y Optional
- The y axis anchor of node.
-
setCascadeColorEnabled(cascadeColorEnabled)Enable or disable cascade color, if cascade enabled, child nodes' opacity will be the cascade value of parent color and its own color.
- Parameters:
- {boolean} cascadeColorEnabled
-
setCascadeOpacityEnabled(cascadeOpacityEnabled)Enable or disable cascade opacity, if cascade enabled, child nodes' opacity will be the multiplication of parent opacity and its own opacity.
- Parameters:
- {boolean} cascadeOpacityEnabled
-
setColor(color)
Sets the color of Node.
When color doesn't include opacity value like cc.color(128,128,128), this function only change the color.
When color include opacity like cc.color(128,128,128,100), then this function will change the color and the opacity.- Parameters:
- {cc.Color} color
- The new color given
-
setContentSize(size, height)
Sets the untransformed size of the node.
The contentSize remains the same no matter the node is scaled or rotated.
All nodes has a size. Layer and Scene has the same size of the screen.- Parameters:
- {cc.Size|Number} size
- The untransformed size of the node or The untransformed size's width of the node.
- {Number} height Optional
- The untransformed size's height of the node.
-
setGlobalZOrder(globalZOrder)
Defines the oder in which the nodes are renderer.
Nodes that have a Global Z Order lower, are renderer first.
In case two or more nodes have the same Global Z Order, the oder is not guaranteed.
The only exception if the Nodes have a Global Z Order == 0. In that case, the Scene Graph order is used.
By default, all nodes have a Global Z Order = 0. That means that by default, the Scene Graph order is used to render the nodes.
Global Z Order is useful when you need to render nodes in an order different than the Scene Graph order.
Limitations: Global Z Order can't be used used by Nodes that have SpriteBatchNode as one of their ancestors.
And if ClippingNode is one of the ancestors, then "global Z order" will be relative to the ClippingNode.- Parameters:
- {Number} globalZOrder
-
setGLServerState(state)Sets the state of OpenGL server side.
- Parameters:
- {Number} state
- The state of OpenGL server side.
- Deprecated:
- since v3.0, no need anymore
-
setGrid(grid)
Changes a grid object that is used when applying effects
This function have been deprecated, please use cc.NodeGrid to run grid actions- Parameters:
- {cc.GridBase} grid
- A CCGrid object that is used when applying effects
- Deprecated:
- since v3.0, no alternative function
-
setLocalZOrder(localZOrder)
LocalZOrder is the 'key' used to sort the node relative to its siblings.
The Node's parent will sort all its children based ont the LocalZOrder value.
If two nodes have the same LocalZOrder, then the node that was added first to the children's array
will be in front of the other node in the array.
Also, the Scene Graph is traversed using the "In-Order" tree traversal algorithm ( http://en.wikipedia.org/wiki/Tree_traversal#In-order )
And Nodes that have LocalZOder values < 0 are the "left" subtree
While Nodes with LocalZOder >=0 are the "right" subtree.- Parameters:
- {Number} localZOrder
-
setName(name)Changes the name that is used to identify the node easily.
- Parameters:
- {String} name
-
setNodeDirty()Sets node's dirty flag to true so that it can be updated in visit function of the next frame
-
setOpacity(opacity)Sets the opacity of Node
- Parameters:
- {Number} opacity
-
setOpacityModifyRGB(value)Set whether color should be changed with the opacity value, useless in cc.Node, but this function is overrided in some class to have such behavior.
- Parameters:
- {Boolean} value
-
setOrderOfArrival(Var)
Sets the arrival order when this node has a same ZOrder with other children.
A node which called addChild subsequently will take a larger arrival order,
If two children have the same Z order, the child with larger arrival order will be drawn later.- Parameters:
- {Number} Var
- The arrival order.
-
setParent(parent)Sets the parent node
- Parameters:
- {cc.Node} parent
- A reference to the parent node
-
setPosition(newPosOrxValue, yValue)
Changes the position (x,y) of the node in cocos2d coordinates.
The original point (0,0) is at the left-bottom corner of screen.
Usually we use cc.p(x,y) to compose CCPoint object.
and Passing two numbers (x,y) is more efficient than passing CCPoint object.var size = cc.winSize; node.setPosition(size.width/2, size.height/2);
- Parameters:
- {cc.Point|Number} newPosOrxValue
- The position (x,y) of the node in coordinates or the X coordinate for position
- {Number} yValue Optional
- Y coordinate for position
-
setPositionX(x)
Sets the x axis position of the node in cocos2d coordinates.
- Parameters:
- {Number} x
- The new position in x axis
-
setPositionY(y)
Sets the y axis position of the node in cocos2d coordinates.
- Parameters:
- {Number} y
- The new position in y axis
-
setRotation(newRotation)
Sets the rotation (angle) of the node in degrees.
0 is the default rotation angle.
Positive values rotate node clockwise, and negative values for anti-clockwise.- Parameters:
- {Number} newRotation
- The rotation of the node in degrees.
-
setRotationX(rotationX)
Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew.
(support only in WebGL rendering mode)
0 is the default rotation angle.
Positive values rotate node clockwise, and negative values for anti-clockwise.- Parameters:
- {Number} rotationX
- The X rotation in degrees which performs a horizontal rotational skew.
-
setRotationY(rotationY)
Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew.
(support only in WebGL rendering mode)
0 is the default rotation angle.
Positive values rotate node clockwise, and negative values for anti-clockwise.- Parameters:
- rotationY
- The Y rotation in degrees.
-
setScale(scale, scaleY)Sets the scale factor of the node. 1.0 is the default scale factor. This function can modify the X and Y scale at the same time.
- Parameters:
- {Number} scale
- or scaleX value
- {Number} scaleY Optional
-
setScaleX(newScaleX)
Changes the scale factor on X axis of this node
The deafult value is 1.0 if you haven't changed it before- Parameters:
- {Number} newScaleX
- The scale factor on X axis.
-
setScaleY(newScaleY)
Changes the scale factor on Y axis of this node
The Default value is 1.0 if you haven't changed it before.- Parameters:
- {Number} newScaleY
- The scale factor on Y axis.
-
setScheduler(scheduler)
Sets a CCScheduler object that is used to schedule all "updates" and timers.
IMPORTANT: If you set a new cc.Scheduler, then previously created timers/update are going to be removed.- Parameters:
- scheduler
- A cc.Scheduler object that is used to schedule all "update" and timers.
-
setShaderProgram(newShaderProgram)
Sets the shader program for this node Since v2.0, each rendering node must set its shader program. It should be set in initialize phase.
node.setGLProgram(cc.shaderCache.programForKey(cc.SHADER_POSITION_TEXTURECOLOR));
- Parameters:
- {cc.GLProgram} newShaderProgram
- The shader program which fetchs from CCShaderCache.
-
setSkewX(newSkewX)
Changes the X skew angle of the node in degrees.
This angle describes the shear distortion in the X direction.
Thus, it is the angle between the Y axis and the left edge of the shape
The default skewX angle is 0. Positive values distort the node in a CW direction.- Parameters:
- {Number} newSkewX
- The X skew angle of the node in degrees.
-
setSkewY(newSkewY)
Changes the Y skew angle of the node in degrees.
This angle describes the shear distortion in the Y direction.
Thus, it is the angle between the X axis and the bottom edge of the shape
The default skewY angle is 0. Positive values distort the node in a CCW direction.
- Parameters:
- {Number} newSkewY
- The Y skew angle of the node in degrees.
-
setTag(tag)Changes the tag that is used to identify the node easily.
Please refer to getTag for the sample code.- Parameters:
- {Number} tag
- A integer that identifies the node.
- See:
- cc.Node#getTag
-
setUserData(Var)
Sets a custom user data reference
You can set everything in UserData reference, a data block, a structure or an object, etc.- Parameters:
- {object} Var
- A custom user data
-
setUserObject(newValue)
Sets a user assigned cocos2d object
Similar to UserData, but instead of holding all kinds of data it can only hold a cocos2d object
In JSB, the UserObject will be retained once in this method, and the previous UserObject (if existed) will be release.
The UserObject will be released in CCNode's destruction.- Parameters:
- {object} newValue
- A user cocos2d object
-
setVertexZ(Var)
Sets the real WebGL Z vertex.
Differences between openGL Z vertex and cocos2d Z order:
- WebGL Z modifies the Z vertex, and not the Z order in the relation between parent-children
- WebGL Z might require to set 2D projection
- cocos2d Z order works OK if all the nodes uses the same WebGL Z vertex. eg: vertexZ = 0
- Parameters:
- {Number} Var
-
setVisible(visible)Sets whether the node is visible
The default value is true- Parameters:
- {Boolean} visible
- Pass true to make the node visible, false to hide the node.
-
setZOrder(z)
Sets the Z order which stands for the drawing order, and reorder this node in its parent's children array.
The Z order of node is relative to its "brothers": children of the same parent.
It's nothing to do with OpenGL's z vertex. This one only affects the draw order of nodes in cocos2d.
The larger number it is, the later this node will be drawn in each message loop.
Please refer to setVertexZ(float) for the difference.- Parameters:
- {Number} z
- Z order of this node.
- Deprecated:
- since 3.0, please use setLocalZOrder instead
-
sortAllChildren()
Sorts the children array once before drawing, instead of every time when a child is added or reordered.
This approach can improves the performance massively. -
stopAction(action)Stops and removes an action from the running action list.
- Parameters:
- {cc.Action} action
- An action object to be removed.
-
stopActionByTag(tag)Removes an action from the running action list by its tag.
- Parameters:
- {Number} tag
- A tag that indicates the action to be removed.
-
stopAllActions()Stops and removes all actions from the running action list .
-
transform(ctx)Performs view-matrix transformation based on position, scale, rotation and other attributes.
- Parameters:
- {CanvasRenderingContext2D|WebGLRenderingContext} ctx
- Render context
-
unschedule(callback_fn)unschedules a custom callback function.
- Parameters:
- {function} callback_fn
- A function wrapped as a selector
- See:
- cc.Node#schedule
-
unscheduleAllCallbacks()
unschedule all scheduled callback functions: custom callback functions, and the 'update' callback function.
Actions are not affected by this method. -
unscheduleUpdate()Unschedules the "update" method.
-
update(dt)Update will be called automatically every frame if "scheduleUpdate" is called when the node is "live".
The default behavior is to invoke the visit function of node's componentContainer.
Override me to implement your own update logic.- Parameters:
- {Number} dt
- Delta time since last update
-
updateDisplayedColor(parentColor)Update the displayed color of Node
- Parameters:
- {cc.Color} parentColor
-
updateDisplayedOpacity(parentOpacity)Update displayed opacity
- Parameters:
- {Number} parentOpacity
-
updateTransform()
Calls children's updateTransform() method recursively.
This method is moved from CCSprite, so it's no longer specific to CCSprite.
As the result, you apply CCSpriteBatchNode's optimization on your customed CCNode.
e.g., batchNode->addChild(myCustomNode), while you can only addChild(sprite) before. -
visit(ctx)Recursive method that visit its children and draw them
- Parameters:
- {CanvasRenderingContext2D|WebGLRenderingContext} ctx
-
worldToNodeTransform()
- Deprecated:
- since v3.0, please use getWorldToNodeTransform instead


Brewing Wild Ale for a sophisticated palate in a Dangerous Neighborhood.
We are in the process of building a new website and are looking forward to sharing it with you when we are done. In the meantime, please check our Instagram, Facebook, and foambrewers.com for updates on what we are up to and bottle releases.
House of Fermentology is a small beer blendery that ferments and ages its beers slowly in oak barrels. We ferment with our mixed culture of saccharomyces and brettanomyces yeasts along with lactic acid bacteria to make this beer lean, dry and refreshingly tart. Through our artiful blending, this process creates distinctive and original wild ales. All of our beers are alive, unfiltered and 100% bottle conditioned.


Phone<PHONE_NUMBER>
Email<EMAIL_ADDRESS>PRICING
OUR PRICING TABLE
This template is designed with a unique and simple, so that it can promote and laundry business solution.
Rs25
Rs45
MORE DETAIL PRICE
This template is designed with a unique and simple, so that it can promote and laundry business solution.
Dry Cleaning.
All Shirts
$ 1.50
Pants, Jeans, Skirt
$ 2.50
Sweeters
$ 6.50
Tie, Scarf
$ 5.50
Coat, Heavy Jacket, Dress
$ 10.50
Laundry Press.
Sheets
$ 1.50
Pillowcases
$ 2.50
Duvet Covers
$ 6.50
Bed Covers
$ 5.50
Gorden
$ 10.50
Special Items.
Fancy Dresses
$ 21.50
Comforters
$ 22.50
Handkerchief
$ 16.50
Tuxedo Shirt
$ 8.50
Polo (laundered short sleeve)
$ 6.50
Leather Items.
Fancy Dresses
$ 21.50
Comforters
$ 22.50
Handkerchief
$ 16.50
Tuxedo Shirt
$ 8.50
Polo (laundered short sleeve)
$ 6.50
Don't worry if your items not listed here, Call Us and we will take care of it.
ABOUT US
We provides premium washing and dry cleaning service leveraging mobile based technology. our aims at providing high quality laundry services coupled with customized experience and express delivery.
CONNECT WITH US
OPERATIONAL TIMINGS
GET IN TOUCH
Phone :<PHONE_NUMBER>
Email<EMAIL_ADDRESS>Website : www.xyz.com
Address : 88/1,Patel nagar
Kanpur
208007 U.P.
©2015 XYZ. All Rights Reserved


I am a Post Doctoral Research Associate in the Advanced Leadership Computing Facility (ALCF) at Argonne National Laboratory. My current research work is on Deep Learning methods such as reinforcement learning, active learning and generative models for autonomous design of material’s atomic structure with desired physical and mechanical properties. To this end, some of my current projects includes predictive synthesis and design of quantum materials using reinforcement learning, graph-neural network based potential energy function for simulation of material’s dynamics and active learning assisted accelerated search of best thermoelectric 2D materials. Beside this, my research interest also includes meta-learning and current challenges in these models such as problems related to task-memorization in few-shot learning.
I received my Ph.D. in Computational Material Science and MS in Computer Science with Data Science specialization from University of Southern California (USC) under the guidance of Prof. Priya Vashishta, Prof. Aiichiro Nakano and Prof. Rajiv Kalia. During my Ph.D, the focus of dissertation topic was on force field development for materials simulation, large scale reactive molecular dynamics simulation of materials consisting of billions of atoms and development of machine learning models for the analysis of these large scale simulation data, where some of these simulations are performed at blue gene/Q supercomputer at Argonne National Laboratory.
Research Interest: Deep Generative Models, Meta-Learning, Reinforcement Learning, Graph Neural Network, Active Learning, High Performance Computing, Force Field Development and Large Scale Molecular Dynamics Simulation.
| Mar 2021 | Will be giving invited talk on Multi-Task Reinforcement Learning for Autonomous Material Design at APS March Meeting 2021. |
| Nov 2020 | Our paper Quantum Material Synthesis by Reinforcement Learning got accepted for poster presentation at NeurIPS workshop, Machine Learning and the Physical Sciences. |
| Nov 2020 | Our paper Denoising Autoencoders for High-Qubit Quantum Dynamics Simulations on Quantum Computers got accepted for poster presentation at NeurIPS workshop NeurIPS workshop, Machine Learning and the Physical Sciences. |
| May 2020 | Presented at SCADL workshop at IPDPS conference on Neural Network Molecular Dynamics at Scale. |
| Sep 2019 | Gave invited talk on "Generative and Reinforcement Learning for Interfaces and Metamaterial Design" at CINT Annual Meeting organised by ointly operated by Los Alamos and Sandia National Laboratorie. |
P. Rajak, A. Krishnamoorthy, A. Mishra, R. K. Kalia, A. Nakano and P. Vashishta, under review Preprint
P. Rajak, K. Liu, A. Krishnamoorthy, R. K. Kalia, A. Nakano, K. Nomura, S. C. Tiwari and P. Vashishta International Parallel and Distributed Processing Symposium Workshops, 2020 Conference Paper
P. Rajak, A. Krishnamoorthy, R. K. Kalia, A. Nakano and P. Vashishta, Phys. Rev. B 100, 014108: 1-7 (2019) Paper
S. Hong, K. Nomura, A. Krishnamoorthy, P. Rajak, C. Sheng, R. K. Kalia, A. Nakano and P. Vashishta, J. Phys. Chem. Lett. 10, 2739- 2744 (2019) Paper
P. Rajak, R. K. Kalia, A. Nakano and P. Vashishta, MRS Adv. 4, 1109-1117 (2019) Conference Paper
K. Liu, K. Nomura, R. K. Kalia, A. Nakano, P. Vashishta and P. Rajak, Proceedings of the High Performance Computing Symposium, (2019) Conference Paper
L. Bassman*, P. Rajak*, R. K. Kalia, A. Nakano, F. Sha, J. Sun, D. J. Singh, M. Aykol, P. Huck, K. Persson and P. Vashishta, npj Comput. Mater. 4, 74: 1-9 (2018), *equal contribution Paper
A. Mishra, S. Hong, P. Rajak, C. Sheng, K. Nomura, R. K. Kalia, A. Nakano and P. Vashishta, npj Comput. Mater. 4, 42: 1-7 (2018) Paper
A Apte*, V Kochat*, P Rajak*, A Krishnamoorthy, P Manimunda, J Hachtel, J. C. Idrobo, A. Nakano, R. K. Kalia, P Vashishta, C. S. Tiwary, and P. M. Ajayan, ACS Nano 12, 3468-3476 (2018), *equal contribution Paper
P. Rajak, R. K. Kalia, A. Nakano and P. Vashishta, ACS Nano 12, 9005-9010 (2018) Paper
P. Rajak, A. Mishra, C. Sheng, S. Tiwari, A. Krishnamoorthy, R. K. Kalia, A. Nakano and P. Vashishta. Appl. Phys. Lett. 111, 213701: 1-5 (2017) Paper


WITNESS LIST Criminal Justice Committee April 26, 2005 - 1:30P SB 875 FOR: Balagia, David Major (Travis County Sheriff's Office), Austin, TX Registering, but not testifying: For: Allison, Jim General Counsel (County Judges and Commissioners), Austin, TX Gill, Raman Attorney (Texas Appleseed), Austin, TX Sims, Randy Brazos County Judge (Brazos County), Bryan, TX On: Del Llano, Ann Attorney (ACLU), Austin, TX SB 992 FOR: Morris, Karen Assistant DA (Harris County District Attorney's Office), Houston, TX Registering, but not testifying: For: Coffey, Debra Volunteer (MADD), Austin, TX Gaylor, Tom Deputy Executive Director (Texas Municipal Police Association), Austin, TX Jones, James Captain (Houston Police Department), Houston, TX Spears, Monroe Assistant District Attorney (Bexar County DA's office), San Antonio, TX On: Rolater, John Assistant District Attorney (Bill Hill, Dallas County Criminal District Attorney), Dallas, TX SB 1266 FOR: Del Llano, Ann Attorney (ACLU), Austin, TX AGAINST: McCown, Jana First Assistant District Attorney (Williamson County District Attorney), Georgetown, TX Zinsmeyer, Rick CSCD Director (Williamson County Adult Probation), Georgetown, TX ON: Creuzot, John (Self), Dallas, TX Place, Allen Attorney (Texas Criminal Defense Lawyers's Association), Austin, TX Weeks, David Walker County District Attorney (Self), Huntsville, TX Registering, but not testifying: On: Parker, Angela Director of Legal Staff (Texas Department of Public Safety), Austin, TX Zgabay, Sherrie Manager (Texas Department of Public Safety), Austin, TX SB 1267 FOR: Elliott, Thomas Sergeant (Dallas Police Department), Dallas, TX AGAINST: Murphy, Tim Chair, Legislative committee (Texas Association of Pawn Brokers), Aransas Pass, TX Registering, but not testifying: For: DeCorte, Joe Vice President (Dallas Police Officers Association), Dallas, TX Jones, Jim Vice President (San Antonio Police Officer's Association), San Antonio, TX Lyons, Steve Lieutenant (Houston Police Department), Houston, TX McLaughlin, James General Counsel (Texas Police Chiefs Association), Elgin, TX Wilkinson, Charley Political Legislative Director (CLEAT), Austin, TX Against: Robnett, N.J. Buzz (United Pawn Brokers), Austin, TX SB 1675 FOR: Balagia, David Major (Travis County Sheriff's Office), Austin, TX AGAINST: Del Llano, Ann Attorney (ACLU), Austin, TX


CHADDON
Disable Chat on this page
Disable all chats
Chatroom Settings
General
Automatically join classrooms
Save Settings


PUBG Guide: Best sensitivity settings for Assault Rifles in PUBG Mobile
by Aarthi VenkateshMastering PlayerUnknown's Battlegrounds Mobile involves a lot of skills and adjusting the sensitivity settings to what fits best can aid the process to a large extent. Here's a complete walkthrough of the sensitivity settings in PUBG Mobile and the best proportions that could easily increase the number of kills.
The best way to zero down on the best sensitivity ratios is perhaps by getting into the training room, changing settings and checking right after. After opening settings and choosing sensitivity, one will be able to tweak Camera Sensitivity, Camera, ADS Sensitivity and the Gyroscope. It is important to note that the settings mentioned below work best for Assault Rifles only.
#1 Camera Sensitivity
Camera Sensitivity relates to the look-around view of a player. Adjusting this will decide how fast/slow a player will be able to look around. The default sensitivity of the TPP and FPP camera should work fine. Here are the values:
- Camera: 95-100%
- TPP: 95-100%
- FPP: 70-75%
#2 Camera
Tweaking the sensitivity values of the Camera will alter a player's sensitivity while looking around while scoping in. A primary rule to gauge the right sensitivity would be this: the higher the scope, the lower the sensitivity. The logic behind this rule is that aiming accurately using scopes with higher capacities need very less movement since players will already be aiming somewhere close to their targets. Here are the best values:
- TPP with no scope: 95-100%
- FPP with no scope: 85-90%
- Red Dot, Holographic, Aim Assist: 50-55%
- 2x Scope: 30-35%
- 3x Scope: 20-25%
- 4x Scope, VSS: 15-18%
- 6x Scope: 10-13%
- 8x Scope: 10-13%
#3 ADS Sensitivity
ADS is an acronym for Aim Down Sight. Adjusting ADS sensitivity will determine how much control a player will have over recoil while firing. Changing the ADS sensitivity will not change the sensitivity of looking around but will affect the movement of guns while scoping in and firing. Tweaking the ADS sensitivity can adjust recoil and help players close in on targets faster. Here are the best ADS sensitivity settings:
- TPP with no scope: 95-100%
- FPP with no scope: 85-90%
- Red Dot, Holographic, Aim Assist: 55-60%
- 2x Scope: 37-42%
- 3x Scope: 30-35%
- 4x Scope, VSS: 25-30%
- 6x Scope: 20-23%
- 8x Scope: 10-13%
#4 Gyroscope
The Gyroscope in PUBG Mobile tracks the movements of a device and converts that into a motion within the game. Adjusting Gyroscope's sensitivity will determine how quickly the game will track movements to change screen orientations. Here are the best sensitivity settings for Gyroscope:
- TPP with no scope: 95-100%
- FPP with no scope: 95-100%
- Red Dot, Holographic, Aim Assist: 90-95%
- 2x Scope: 120-125%
- 3x Scope: 60-65%
- 4x Scope, VSS: 50-55%
- 6x Scope: 40-45%
- 8x Scope: 30-35%
Tencent Games and PUBG Corporation's PUBG Mobile has just launched the 0.15.5 update and Royale Pass Season 10. With leaks pointing at the arrival of more updates and map optimizations, a lot more is in store for the fans of PUBG Mobile.
Stick with Sportskeeda for the latest PMCO 2019 Updates , PUBG Mobile News and other Esports News .


Dark Mode
Dealership Name:
DPID:
Contact Name:
Contact Phone:
Contact Email:
Vin/StockNum:
Notes/Links:
Issue/Concern:
Steps to Reproduce:
Conclusion:
Copy
Clear


Michelle Robinson Obama served as First Lady of the United States from 2009 to 2017. As a transformative First Lady, Mrs. Obama launched and led four key initiatives: Let’s Move!, to address the challenge of childhood obesity; Joining Forces, to support veterans, service members and their families; Reach Higher, to inspire young people to seek higher education; and Let Girls Learn, to help adolescent girls around the world go to school. Before becoming First Lady, Michelle Obama attended Princeton University and Harvard Law School. She started her career as an attorney at the Chicago law firm, Sidley & Austin, where she met her future husband, Barack Obama. She later worked in the Chicago mayor’s office, the University of Chicago, and the University of Chicago Medical Center. Mrs. Obama also founded the Chicago chapter of Public Allies, an organization that prepares young people for careers in public service. Mrs. Obama was born on January 17, 1964. She married Barack Obama in 1992. They currently live in Washington, DC and have two daughters, Malia and Sasha.


---
layout: post
title: Buzzwords 1.1 Released
category : news
tagline: "50% OFF"
tags : [buzzwords, android, news, apps]
---
We've released a new version of Buzzwords and with it come some new features and bug fixes we'd like to let you know about.
- New Feature: Added card review to Turn Results, allowing players to closely examine cards from
the previous Turn. While reviewing a card, the players may view a card's buzzwords and amend
the card's right, wrong, or skip status.
- New Feature: Added gestures to the Turn screen, allowing users to mark a card Correct with a
swipe up (thumbs up), Wrong with a swipe down (thumbs down), Skip with swipe right,
and go back a card with swipe left.
- Added card status icons that display as you mark cards during a Turn.
- Polished the look of Turn Results and expanded row items to be more easily clickable.
- Added sounds to many more actions such as pause / resume game.
- Timer bar fixed to fill screen properly on high resolution devices (Xoom).
- Fixed a bug where duplicate cards were showing up on frequent turns.


Rosetta Example: Sudoku
Solve a partially filled-in 9x9 Sudoku grid and display the result in a human-readable format. For detailed description of this example, see https://rosettacode.org/wiki/Sudoku_Solver
This implementation is based on https://wiki.tcl-lang.org/19934
package require nx
The class Sudoku
implements the basic interface to a sudoku 9x9
board to load/dump data and to set/access cells, rows, columns and
regions.
nx::Class create Sudoku { :variable board # Setup an array from 0..9 to ease iterations over the cells of # lines and columns. for {set i 0} {$i < 9} {incr i} {lappend positions $i} :variable positions $positions :public method load {data} { # # Load a 9x9 partially solved sudoku. The unsolved cells are # represented by a@ symbols. # set error "data must be a 9-element list, each element also being a\ list of 9 numbers from 1 to 9 or blank or an @ symbol." if {[llength $data] != 9} { error $error } foreach y ${:positions} { set row [lindex $data $y] if {[llength $row] != 9} { error $error } foreach x ${:positions} { set cell [lindex $row $x] if {![regexp {^[@1-9]?$} $cell]} { error $cell-$error } if {$cell eq "@"} {set cell ""} :set $x $y $cell } } } :public method dump {-pretty-print:switch} { # # Output the current state of the sudoku either as list or in # a pretty-print style. # set rows [lmap y ${:positions} {:getRow 0 $y}] if {${pretty-print}} { set result +-----+-----+-----+\n foreach line $rows postline {0 0 1 0 0 1 0 0 1} { append result |[lrange $line 0 2]|[lrange $line 3 5]|[lrange $line 6 8]|\n if {$postline} { append result +-----+-----+-----+\n } } return $result } else { return $rows } } :method log {msg} { #puts "log: $msg" } :method set {x y value:integer,0..1} { # # Set cell at position x,y to the given value or empty. # if {$value<1 || $value>9} { set :board($x,$y) {} } else { set :board($x,$y) $value } } :method get {x y} { # # Get value of cell at position x, y. # return [set :board($x,$y)] } :method getRow {x y} { # # Return a row at constant position y. # return [lmap x ${:positions} {:get $x $y}] } :method getCol {x y} { # # Return a column at constant position x. # return [lmap y ${:positions} {:get $x $y}] } :method getRegion {x y} { # # Return a 3x3 region # set xR [expr {($x/3)*3}] set yR [expr {($y/3)*3}] set regn {} for {set x $xR} {$x < $xR+3} {incr x} { for {set y $yR} {$y < $yR+3} {incr y} { lappend regn [:get $x $y] } } return $regn } }
The class SudokuSolver
inherits from Sudoku
, and adds the
ability to solve a given Sudoku game. The method solve applies all
rules for each unsolved cell until it finds a safe solution.
nx::Class create SudokuSolver -superclass Sudoku { :public method validchoices {x y} { set v [:get $x $y] if {$v ne {}} { return $v } set row [:getRow $x $y] set col [:getCol $x $y] set regn [:getRegion $x $y] set eliminate [list {*}$row {*}$col {*}$regn] set eliminate [lsearch -all -inline -not $eliminate {}] set eliminate [lsort -unique $eliminate] set choices {} for {set c 1} {$c < 10} {incr c} { if {$c ni $eliminate} { lappend choices $c } } if {[llength $choices]==0} { error "No choices left for square $x,$y" } return $choices } :method completion {} { # # Return the number of already solved items. # return [expr {81-[llength [lsearch -all -inline [join [:dump]] {}]]}] } :public method solve {} { # # Try to solve the sudoku by applying the provided rules. # while {1} { set begin [:completion] foreach y ${:positions} { foreach x ${:positions} { if {[:get $x $y] eq ""} { foreach rule [Rule info instances] { set c [$rule solve [self] $x $y] if {$c} { :set $x $y $c :log "[$rule info class] solved [self] at $x,$y for $c" break } } } } } set end [:completion] if {$end == 81} { :log "Finished solving!" break } elseif {$begin == $end} { :log "A round finished without solving any squares, giving up." break } } } }
The class rule provides "solve" as public interface for all rule objects. The rule objects apply their logic to the values passed in and return either 0 or a number to allocate to the requested square.
nx::Class create Rule { :public method solve {hSudoku:object,type=::SudokuSolver x y} { :Solve $hSudoku $x $y [$hSudoku validchoices $x $y] } # Get all the allocated numbers for each square in the row, column, and # region containing $x,$y. If there is only one unallocated number among all # three groups, it must be allocated at $x,$y :create ruleOnlyChoice { :object method Solve {hSudoku x y choices} { if {[llength $choices] == 1} { return $choices } else { return 0 } } } # Test each column to determine if $choice is an invalid choice for all other # columns in row $X. If it is, it must only go in square $x,$y. :create RuleColumnChoice { :object method Solve {hSudoku x y choices} { foreach choice $choices { set failed 0 for {set x2 0} {$x2 < 9} {incr x2} { if {$x2 != $x && $choice in [$hSudoku validchoices $x2 $y]} { set failed 1 break } } if {!$failed} {return $choice} } return 0 } } # Test each row to determine if $choice is an invalid choice for all other # rows in column $y. If it is, it must only go in square $x,$y. :create RuleRowChoice { :object method Solve {hSudoku x y choices} { foreach choice $choices { set failed 0 for {set y2 0} {$y2 < 9} {incr y2} { if {$y2 != $y && $choice in [$hSudoku validchoices $x $y2]} { set failed 1 break } } if {!$failed} {return $choice} } return 0 } } # Test each square in the region occupied by $x,$y to determine if $choice is # an invalid choice for all other squares in that region. If it is, it must # only go in square $x,$y. :create RuleRegionChoice { :object method Solve {hSudoku x y choices} { foreach choice $choices { set failed 0 set regnX [expr {($x/3)*3}] set regnY [expr {($y/3)*3}] for {set y2 $regnY} {$y2 < $regnY+3} {incr y2} { for {set x2 $regnX} {$x2 < $regnX+3} {incr x2} { if { ($x2!=$x || $y2!=$y) && $choice in [$hSudoku validchoices $x2 $y2] } then { set failed 1 break } } } if {!$failed} {return $choice} } return 0 } } } SudokuSolver create sudoku { :load { {3 9 4 @ @ 2 6 7 @} {@ @ @ 3 @ @ 4 @ @} {5 @ @ 6 9 @ @ 2 @} {@ 4 5 @ @ @ 9 @ @} {6 @ @ @ @ @ @ @ 7} {@ @ 7 @ @ @ 5 8 @} {@ 1 @ @ 6 7 @ @ 8} {@ @ 9 @ @ 8 @ @ @} {@ 2 6 4 @ @ 7 3 5} } :solve puts [:dump -pretty-print] }
The dump method outputs the solved Sudoku:
+-----+-----+-----+
|3 9 4|8 5 2|6 7 1|
|2 6 8|3 7 1|4 5 9|
|5 7 1|6 9 4|8 2 3|
+-----+-----+-----+
|1 4 5|7 8 3|9 6 2|
|6 8 2|9 4 5|3 1 7|
|9 3 7|1 2 6|5 8 4|
+-----+-----+-----+
|4 1 3|5 6 7|2 9 8|
|7 5 9|2 3 8|1 4 6|
|8 2 6|4 1 9|7 3 5|
+-----+-----+-----+


Icon Color: White Black Blue Red Rainbow
Only Show Macro Name:
Always Show Advanced Results:
Show Roll Animation:
Macros


An exploration in the truck's polarising design.
A black hole is a region of spacetime where gravity is so strong that nothing can escape from it.
Dashboard design guidelines. These are some of my 10 rules for dashboard design.


ISABEL
LEVIN
ME
NU
WORK
ABOUT
CONTACT
RESUME
WORK
ABOUT
CONTACT
RESUME
Get in touch with me by
filling out the form below:
SEND