Find attribute_id
SELECT * FROM eav_attribute where attribute_code = 'is_anchor'
Update all of them with anchor_id from above (usually is ID 51)
UPDATE `catalog_category_entity_int` set value = 1 where attribute_id = 51
| using UnityEngine;using System.Collections; public class Attackable : MonoBehaviour { public float maxHp; public float currentHp; public Camera mainCamera; public Texture2D hpBarBG; public Texture2D hpBarCurrent; private float offsetY; //script will be atached to each GameObject that can suffer dmg. void Start () { //put it on top of the character offsetY=gameObject.collider.bounds.size.y+5; Debug.Log(offsetY); } void Update () { } void OnGUI(){ //the hp bar background location on screen Rect rcBg = new Rect(0,0,60,14); //the current HP bar Rect rcCurrent = new Rect(0,0,((currentHp)/maxHp)*56,8); //the important part : where this object is located in my screen Vector3 point = mainCamera.WorldToScreenPoint(new Vector3( transform.position.x, |
| using UnityEngine; | |
| public class Follow : MonoBehaviour { | |
| Transform target; //the target to follow | |
| Vector3 offset = Vector3.zero; //the amount to be offset by | |
| void Update() { | |
| if(target) transform.position = target.position + offset; | |
| } | |
| } |
| float theta_scale = 0.1; //Set lower to add more points | |
| int size = (2.0 * PI) / theta_scale; //Total number of points in circle. | |
| LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>(); | |
| lineRenderer.material = new Material(Shader.Find("Particles/Additive")); | |
| lineRenderer.SetColors(c1, c2); | |
| lineRenderer.SetWidth(0.2F, 0.2F); | |
| lineRenderer.SetVertexCount(size); | |
| int i = 0; |
| # Not only have we been adding wands, but our users have been adding new ones daily! Let's create a list of all the unique wand makers in our database. | |
| db.wands.aggregate( | |
| { | |
| "$group": { | |
| "_id": "$maker" | |
| } | |
| } | |
| ) |
| import arrow | |
| import boto3 | |
| import uuid | |
| dynamodb = boto3.client('dynamodb') | |
| some_id = uuid.uuid4() | |
| some_time = arrow.now() | |
| request = { | |
| 'ConsistentRead': False, |
| image: docker:latest | |
| before_script: | |
| - apt-get update -y # Updating the Ubuntu Docker instance. | |
| - python -V # Print out python version for debugging. | |
| - apt install -y zip jq | |
| - pip install awscli --upgrade --user | |
| - export PATH=~/.local/bin:$PATH # Required for awscli. | |
| - aws --version # Print out aws cli version for debugging. |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');Those suck for maintenance and they're ugly.
| # update | |
| sudo yum -y update | |
| sudo yum -y upgrade | |
| # enable EPEL6 by changing enabled=0 -> enabled=1 | |
| sudo vim /etc/yum.repos.d/epel.repo | |
| # install htop | |
| sudo yum install htop |