“unshare –mount” inside a jenkins chroot environment

In some of my build scripts I’ve been using mount namespaces as a mechanism to safely mount without ever leaving these mounts behind when the script terminates. Unshared mount points are implicitly unmounted when the last process in that namespace exits. My scripts usually include a stansa such as this: #!/bin/bash self_ns=$(ls -lh /proc/self/ns/mnt) init_ns=$(ls…

Details

Atlassian JIRA Java library attach file to task immediately upon creation

Working with Atlassian Java API. Making 2 steps: 1. Creating issue IssueType it = new IssueType(jiraServerUri, ticket.getTypeId(), ticket.getTypeName(), false, ticket.getTypeName(), null); issueBuilder.setIssueType(it); IssueInput issueInput = issueBuilder.build(); Promise<BasicIssue> reply = issueRestClient.createIssue(issueInput); BasicIssue issue = reply.claim(); LOG.debug(“CREATED TICKET:/” + issue.getKey() + “/” + issue + “/”); 2. Attaching files com.atlassian.jira.rest.client.api.domain.Issue issueWithAttachment = issueRestClient.getIssue(key).claim(); if (attachments != null…

Details

Confused about two dimensional factor in R

I have the following data frame: dat <- data.frame(toys = c(“yoyo”, “doll”, “duckie”, “tractor”, “airplaine”, “ball”, “racecar”, “dog”, “jumprope”, “car”, “elephant”, “bear”, “xylophone”, “tank”, “checkers”, “boat”, “train”, “jacks”, “truck”, “whistle”, “pinwheel”), price = c(1.22, 2.75, 1.85, 5.97, 6.47, 2.16, 7.13, 4.57, 1.46, 5.18, 3.16, 4.89, 7.11, 6.45, 4.77, 8.04, 6.71, 2.31, 6.21, 0.98, 0.87)) I…

Details

css selector in angular directive

Looking at the documentation for angular directives they list valid selectors. https://angular.io/api/core/Directive element-name: Select by element name .class: Select by class name. [attribute]: Select by attribute name. [attribute=value]: Select by attribute name and value. :not(sub_selector): Select only if the element does not match the sub_selector. selector1, selector2: Select if either selector1 or selector2 matches. But…

Details

How do I apply a custom discount to individual product total prices depending on their categories on the cart and checkout pages of WooCommerce?

I am coding a wordpress plugin that will run on a multi-vendor woocommerce site. I have a list of discounts (in percentage) that applies to all the products categories I have on the woocommerce site stored on a separate database along with my wordpress database. And I wish to be giving some certain members (that…

Details