text:
# Scripting Examples
View examples of Condition, Validation, Action, and Library scripts.

Condition Scripts
Validation Scripts
Action Scripts
Library Scripts

## **Condition Scripts**

### **Check Item Has Approvals**

Controls workflow by hiding the transition to the next state unless a workspace item has all required approvals. The script assumes a workspace item with three Boolean fields that indicate approval by the Artist, the Designer, and QA.

```js
if (item.ARTIST_APPROV === 0 || item.DESIGNER_APPROV === 0 || item.QA_APPROV === 0)
  returnValue(false);
else
  returnValue(true);
Check Item Inspection/Repair Hours
```

Controls workflow by hiding the transition to the next state if any inspection or repair of the workspace item required less than four hours to complete. The inspection/repair data is obtained from an HRS_RQRD field that is part of the entries in the item Grid, with each item in the Grid representing an individual inspection/repair record.

```js
var hours = 0;
var grid = item.grid;
var totalHours = 0;

for (var index in grid){
  var gridRow = grid[index];
  totalHours+=gridRow.HRS_RQRD;
}

if (hours < 4) {
  returnValue(false);
  }
else {
  returnValue(true);
  }
```

### **Check Status of Linked Manufacturing Plan Item**

Controls workflow by hiding/showing the next transition based on data from a linked item. `item.MANUFACTURING_PLAN` references a field in the workspace item that is a link to an item in another workspace (for example, "Manufacturing Plan"). `STATUS` references a Pick List field in the linked item. `If STATUS != Complete`, the script hides the transition.

```js
if (item.MANUFACTURING_PLAN.STATUS == 'Complete')
  returnValue(true);
else
  returnValue(false);
  ```

Check Item Transition From State

Controls workflow by hiding the transition to the next state unless the state before the transition (fromState) is a certain state (stateID = 16).

```js
var state = 0;

var lastChange = item.workflowActions[0];
var state = lastChange.transition.fromState.stateID;

if (state == 16)
  returnValue(true);
else
  returnValue(false);
```

### **Check Login User is Item Owner**

Controls workflow by hiding the transition to the next state unless the current user is the workspace item Owner. The script uses the ownerID object and the userID argument.

```js
if (item.descriptor.ownerID == userID)
  returnValue(true);
else
  returnValue(false);
```

### **Check Login User is in Given Permission Role**

Controls workflow by hiding the transition to the next state unless the logged-in user is assigned the RW_ChangeOrders role. The script uses the Security.inRole(userID, roleName) function. You can apply any role to the script by changing the role variable accordingly.

```js
var role = 'RW_ChangeOrders';
var inRole = Security.inRole(userID, role);

returnValue(inRole);
```

## **Validation Scripts**

### **Validate Item Cost for Fast Track Approval**

Controls workflow by preventing fast-track approval of the workspace item by disallowing the transition to the next state if item total cost exceeds 50 or the supplier is considered high-risk. It includes an array of messages that let the user know the specific reason for disallowing the transition. The script assumes a workspace item with `COST` and `QUANTITY` fields, and a `SUPPLIER_RISK` pick list field with High as a value.

```js
var messages = [];

if ((item.COST * item.QUANTITY) > 50){
  messages.push('Item costs too much for fast-track approval.');
}
else if (item.SUPPLIER_RISK == 'High'){
  messages.push('Cannot fast-track approval of parts from high-risk vendors.');
}

println(item.QUANTITY', 'item.SUPPLIER_RISK);
returnValue(messages);
```

### **Validate Item Repair Hours Meets Minimum**

Controls workflow using inspection/repair data from the item Grid. The script does the following: (1) identifies the Grid entries that are repairs `(ACTIVITY_TYPE == Repair)`, (2) disallows transitioning if the time to complete any repair (HRS_RQRD) is less than seven hours, and (3) returns a different validation failure message for completion times less than three hours and less than seven hours.

```js
var messages = [];

var grid = item.grid;
for (var index in grid){
  var  gridRow = grid[index];
  var type = gridRow.ACTIVITY_TYPE;
  var hours = gridRow.HRS_RQRD;

  if (type == 'Repair' && hours < 3){
    messages.push('A complete inspection of the item is required before
    transitioning to the next state.');
  }
  else if (type == 'Repair' && hours < 7){
    messages.push('A partial inspection of the item is required before
    transitioning to the next state.');
  }
}

returnValue(messages);
```

### **Validate Age of Attached File**

Controls workflow by disallowing transitioning to the next state if the date and time on which the item attachment was last modified is older than December 31, 2011.

```js
var messages = [];

var attachments = item.attachments;
for (var index in attachments){
  var attachmentsFile = attachments[index];
  var date = attachmentsFile.timestamp;
  var cutoffDate = new Date('December 31, 2011 00:00:00')

  if (date < cutoffDate){
    messages.push('A file attached to the workspace item has not been modified since
      December 31, 2011. The file content is too old to allow transitioning to the
      next state.');
  }
}

returnValue(messages);
```

### **Validate Current Version Is Working and Not Older Than Cutoff Date**

Controls workflow by accessing revisioning data to determine if the current version of the workspace item is the Working Version (working) and then comparing the date and time of the version (timeStamp) with a cutoff date. If the date/time is older than the cutoff date, the script disallows transitioning and returns a message explaining why. Script data is accessed through the Descriptor dvi object.

```js
var cutoffDate = new Date('July 1, 2010 00:00:00');
var revision = item.descriptor.dvi;
var isWorking = revision.working;
var revDate = revision.timeStamp;

var messages = [];
if (isWorking == 1 && cutoffDate > revDate){
  Messages.push('Cannot complete the transition because the date of the item’s
  working version is past the cutoff date.');
}

returnValue(messages);
```

### **Validate Item Is Unreleased**

Controls workflow by allowing transitioning to the "deleted" state only if the workspace item was never released (Unreleased lifecycle phase). The script accesses item revisioning data using the revisionList object array. If the script determines the item has been released at any point in time, it disallows the transition and returns an error with the time and date of the release.

```js
var messages = [];

var revisionList = item.descriptor.revisionList;

for (var index in revisionList){
  var lifeCycleState = revisionList[index].lifeCycleState;

  if (lifeCycleState.stateName == 'RELEASED'){
    messages.push('Can’t delete part, it was released on '
    +lifeCycleState.timeStamp);
  }

}

returnValue(messages);
```

### **Validate Item Owner Is Not Any of Given Users**

Controls workflow by disallowing transitioning to the next step if the workspace item Owner is any of the specified users. The script uses the Security.loadUser(userID) function. You can apply the script to any users by changing the user1 and user2 variables, and even adding additional user variables.

```js
var user1 = 'bloggsj';
var user2 = 'doem';

var loadedUser1 = Security.loadUser(user1);
var loadedUser2 = Security.loadUser(user2);
var ownerId = item.descriptor.ownerID;

var messages = [];

if (ownerId == user1){
  messages.push('Cannot complete transition if item Owner is user '
  +loadedUser1.firstName+' ' +loadedUser1.lastName);
}
else if (ownerId == user2){
  messages.push('Cannot complete transition if item Owner is user '
  +loadedUser2.firstName+' '+loadedUser2.lastName);
}

returnValue(messages);
```

## **Action Scripts**

### **Edit Item Date**

Checks whether an item's DATE field is empty. If the field is empty, the script sets the date to Today. If the field is populated, the script changes the date to one week from the current date (Today + 7 days).

```js
if  (item.date === null) {
  item.DATE = new Date();
}
else {
  item.DATE = newDate(item.DATE.getTime() + 1000 * 60 * 60 * 24 * 7);
  }
```

### **Create New Item in Customers Workspace**

Adds a new item to the Customers workspace using `createItem('WS_WORKSPACE_ID')`. The script specifies the workspace by passing the Workspace ID, as it appears on the Workspace Settings page (WS_CUSTOMERS), to `WS_WORKSPACE_ID`. Values for Item Detail fields are passed as properties on the object using Field IDs.

```js
newItem = createItem('WS_CUSTOMERS');
newItem.NAME = 'ABC Co.';
newItem.WEB_SITE = 'http://www.abc.com';
newItem.EMAIL_ADDRESS =<EMAIL_ADDRESS>```

### **Create New Change Order and Set Up Lookup From Spawning Change Request**

Creates a new item in the Change Orders workspace and sets the value of a "Spawned Change Order" field (SPAWNED_CO) in the associated Change Request item to the new Change Order. You would typically trigger this script after successful transitioning of the associated Change Order to the "Approved" workflow state.

```js
newCO = createItem('WS_CHANGE_ORDERS');
newCO.TITLE = 'Release XYZ';
newCO.TYPE = '1 - Engineering';
newCO.URGENCY = '2 - Medium';

item.SPAWNED_CO = newCO;
```

### **Create New Milestone**

Creates a new milestone for the workspace item and sets a number of its properties, including workflow state, through the shortName property.

```js
var milestone = item.addMilestone();

milestone.setWorkflowState('Short name');
milestone.milestoneType = 'ENTER';
milestone.milestoneDate = new Date();
milestone.warnThreshold = 10;
milestone.progress = 50;
```

### **Send Email to a Given Email Address**

Creates an Email() object to send a message to the email address stored in the associated item's CONTACT_EMAIL field. The script assigns the getPrintView() function to the object's body property to pass data from the associated item to the body of the message via a specified Advanced Print View ('Basic Item Data View'). The Email.send() method queues the email message for delivery.

```js
var email = new Email();

email.to = item.CONTACT_EMAIL;
email.subject = 'Agenda for Staff Meeting';
email.body = getPrintView('Basic Item Data View');
email.send();
```

### **Send Email to an Ad Hoc List of Recipients**

Creates an `Email()` object to send an email message to the recipients specified by a comma-delimited list of addresses assigned as a string to the To property. The script also CCs the message to the email address assigned to the cc property. The script sends the message content as an HTML-formatted string assigned to the body property. The default format is text/html so there is no need to set contenttype. The `Email.send()` method queues the email message for delivery.

```js
var email = new Email();

email.to = 'jdoe@abc.com,jbloggs<EMAIL_ADDRESS>email.cc =<EMAIL_ADDRESS>email.subject = 'Agenda for Staff Meeting';
email.body = '<html><body><p>Please be ready to discuss the following projects ...</p></body></html>';
email.send();
```

### **Send Email to a List of Recipients Generated from a User Group**

The script starts by creating an `Email()` object and assigning values to the subject and body object properties. It assigns the `getPrintView()` function to the body property to pass data from the associated item as the body of the message via a specified Advanced Print View ('Basic Item Data View'). The script then uses the `Security.listUserInGroup('GROUP_NAME')` function to load an array of the users in the Quality user group into a users variable. It parses the email addresses in the array and passes them to the object's to property. Finally, the `Email.send()` method queues the email message for delivery to each address in the users array.

```js
var email = new Email();
email.subject = 'Changes to User Group Permissions';
email.body = getPrintView('Basic Item Data View');

var users = Security.listUsersInGroup('Quality');

for(var index in users) {
  email.to = users[index].email;
  email.send();
}
```

### **Create a Named Sequencer**

Sequencer scripts always increment the named sequence even when you are testing or debugging the script. When testing, use a test sequence name to avoid increasing numbers on actual named sequences used in production.

```js
var seq = new Sequencer(name, start, step);
// name is required, start and step optional. default for both is 1 if omitted.
// start can be set to >= 0 whereas step >=1

var seq = new Sequencer("foo"); // same as foo,1,1
var seq = new Sequencer("foo", 500); // step=1

Then can get next sequence:
var nextNum = seq.nextValue();

Or can read step and start (cannot change them)
Var step = seq.step;
var start = seq.start;

To get a sequencer, you go:
var seq2 = Sequencer.get("name");
// if it doesn't exist, new sequence will be created with values of 1 for start and step.

To list all named sequencers:
var seqs = Sequencer.list(); //array of names
```

### **Add-Clone-Edit-Delete Item Grid Rows**

The script first creates a new item in the RFQ worspace and sets the VENDOR field to "ABC Co." It then adds a row to the item's Grid using item.grid.addRow(), passing it values through properties on the grid object. Notice that the value for the row VENDOR property is the variable that was assigned to the item's VENDOR property. Next, the script adds a second row, passing it values as an associative array of name-value pairs. It then adds a third row to the Grid by cloning the second row. Finally, the script deletes the first row added to the Grid (index = 0) using item.grid.remove(), and then changes the value for QTY in the cloned row, which after the deletion has become the second row in the Grid (index = 1).

```js
var rfq = createItem('WS_RFQ');
rfq.VENDOR = 'ABC Co.';

var vendor = rfq.VENDOR;

var row1 = item.grid.addRow();
row1.ITEM = '67-235/T2C-PX2Y2/2T-ND';
row1.TITLE = 'LED WHITE 6-SMD';
row1.QTY = 4000;
row1.VENDOR = vendor;

var row2 = item.grid.addRow({ ITEM: '68-236/T2C-PX3Y3/4T-ND', TITLE: 'LED WHITE 12-SMD',
     QTY: 3500, VENDOR: vendor });

var row3 = item.grid.addRow(row2);

item.grid[0].remove();

item.grid[1].QTY = 4500;
```

## **Library Scripts**
### **Check for Value in Array**

Determines if the passed value is in the passed array.

```js
function inArray(passedArray, passedValue) {

    for(var index in passedArray){
        if(passedArray[index] === passedValue) {
          returnValue(true);
        }
        else {
          returnValue(false);
        }
    }
}
```

### **Create New Item**

Creates a new workspace item using the createItem('WS_WORKSPACE_ID') function, where workspaceID is the ID of the workspace where you want to create the item and propertiesArray is an array of the item field values you want to set.

```js
function createNewItem(workspaceID, propertiesArray){

  newItem = createItem(workspaceID);

  for(var propKey in propertiesArray){
    newItem[propKey] = propertiesArray[propKey];
  }
}
```

*Example Use*

```js
var newProperties = [];
newProperties.NAME = 'John Doe';
newProperties.EMAIL =<EMAIL_ADDRESS>
createNewItem('WS_CUSTOMERS', newProperties);
```

### **In-Session Scripting**

Manipulates an item spawned by the script itself.

```js
/**
 * add newly spawned item into existing item's tabs.
 * example, when an itemX is spawned in script1 of itemA, then allow me to add itemX to managed tab of itemA.
 * itemX --> item
*/
var itemX = createItem('WS_SIMPLE');
itemX.TITLE = 'Item X ' + new Date();

//Managed items (Workflow Items)
item.workflowItems.addItem({RELATED:itemX});
//BOMs
item.boms.addBOM({RELATED: itemX, QUANTITY: 1, ITEM_NUMBER: 1});
//Projects
item.project.addTask(itemX);
//Relationships
item.relationships.addRelated(itemX, "Cross-Reference", "Unidirectional", "Description");

/**
* add existing records to a newly spawned item's tabs.
 * example, when an itemX is spawned in script1 of itemA, then allow me to add itemA to projects tab of newly spawned itemX.
* item --> itemY
*/
var itemY = createItem('WS_SIMPLE');
itemY.TITLE = 'Item Y ' + new Date();

//Managed items (Workflow Items)
itemY.workflowItems.addItem({RELATED:item});
//BOMs, don't add item to itemX to avoid cyclic bom error since itemX had been added to item's bom list above. So we create a new itemY and add item into it.
itemY.boms.addBOM({RELATED: item, QUANTITY: 1, ITEM_NUMBER: 1});
//Projects
itemY.project.addTask(item);
//Relationships
itemY.relationships.addRelated(item, "Cross-Reference", "Unidirectional", "Description");

/**
* add newly spawned records to tabs of other newly spawned items.
 * example, when an itemX and itemY are spawned in script1 of itemA,
 * then allow to add itemX to projects tab of itemY AND allow adding itemY to managed tab of itemX, all in the context of that script 1.
* itemY --> itemZ
*/
var itemZ = createItem('WS_SIMPLE');
itemZ.TITLE = 'Item Z ' + new Date();

//Managed items (Workflow Items)
itemZ.workflowItems.addItem({RELATED:itemY});
//BOMs, don't add item to itemX to avoid cyclic bom error since itemX had been added to item's bom list above. So we create a new itemY and add item into it.
itemZ.boms.addBOM({RELATED: itemY, QUANTITY: 1, ITEM_NUMBER: 1});
//Projects
itemZ.project.addTask(itemY);
//Relationships
itemZ.relationships.addRelated(itemY, "Cross-Reference", "Unidirectional", "Description");

/**
* add records to spawned items tabs. eg addRow() to grid tab of a spawned item or create and add milestone to Milestone tab.
*/
//Grid
itemX.grid.addRow({GRID_FIELD:1});
itemX.grid.addRow({GRID_FIELD:2});
//Milestone
var milestone1 = itemX.addMilestone();
milestone1.setWorkflowState('State1');
milestone1.milestoneType = 'ENTER';
milestone1.milestoneDate = new Date();
milestone1.warnThreshold = 10;
milestone1.progress = 50;
var milestone2 = itemX.addMilestone();
milestone2.setWorkflowState('State2');
milestone2.milestoneType = 'ENTER';
milestone2.milestoneDate = new Date();
milestone2.warnThreshold = 10;
milestone2.progress = 50;
```

repository: dennerj/autodesk-fusion-lifecycle

repo_name: dennerj/autodesk-fusion-lifecycle


text:
---
layout: default
---

# 1997-10-24 - [news] Pentagon computers broken into over 250 times

## Header Data

From: Vipul Ved Prakash<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Cypherpunks)

Message Hash: 12f6d576416b3887ca95e8c609cae2731341d60b86f7faa0d4e09ff056bc55b8

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-10-24 10:48:55 UTC

Raw Date: Fri, 24 Oct 1997 18:48:55 +0800

## Raw message

```
{% raw  %}From: Vipul Ved Prakash<EMAIL_ADDRESS>Date: Fri, 24 Oct 1997 18:48:55 +0800
To<EMAIL_ADDRESS>(Cypherpunks)
Subject: [news] Pentagon computers broken into over 250 times
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text

*** Pentagon computers broken into over 250 times

More than 250 U.S. Defense Department computer systems were broken
into last year and the number of attempted break-ins was projected to
double this year, a U.S. intelligence official said. The comments
that Air Force Lt. Gen. Kenneth Minihan, director of the National
Security Agency (NSA), made Saturday at an intelligence convention
were released Thursday. Urging stepped-up awareness of cyber security
issues, Minihan said the United States built its information
infrastructure on a "poor foundation -- and we will eventually pay
for it." See http://www.infobeat.com/stories/cgi/story.cgi?id=5585016-7b1

--
Powell lingered. "How's Earth?"
It was a conventional enough question and Muller gave the
conventional answer, "Still spinning."
				      -- "Reason", Asimov.
==================================================================
Vipul Ved Prakash                 | - Electronic Security & Crypto
<EMAIL_ADDRESS>                  | - Web Objects
91 11 2233328                     | - PERL Development
198 Madhuban IP Extension         | - Linux & Open Systems
Delhi, INDIA 110 092              | - Networked Virtual Spaces

{% endraw %}
```

## Thread

+ Return to [October 1997](/archive/1997/10)

+ Return to "[Vipul Ved Prakash <vipul@best.com>](/authors/vipul_ved_prakash_vipul_at_best_com_)"

+ 1997-10-24 (Fri, 24 Oct 1997 18:48:55 +0800) - [news] Pentagon computers broken into over 250 times - _Vipul Ved Prakash<EMAIL_ADDRESS>

license: MIT

branch_name: refs/heads/master

extension: md

gha_license_id: MIT

license_type: permissive


text:
# visualize_network_traffic
## ELK6
* install ELK6 with YAF, super_mediator, curl and wireshark on ubuntu/bionic64
* JSON files and Elasticsearch indicies created before 30 days are automatically deleted.
### requirements
* VirtualBox
* Vagrant
* vagrant plugin install vagrant-disksize
* vagrant plugin install vagrant-proxyconf (if you use proxy)
* vagrant plugin install vagrant-vbguest (option)

### install
Please set http_proxy and https_proxy if you need.

    $ vagrant up
    (snip)
    (select network interface for packet capture)
    ==> default: Available bridged network interfaces:
    1) en1: Wi-Fi (AirPort)
    2) bridge0
    3) en0: Ethernet
    4) en2: Thunderbolt 1
    5) p2p0
    ==> default: When choosing an interface, it is usually the one that is
    ==> default: being used to connect to the internet.
        default: Which interface should the network bridge to? 3
    (snip)
    PLAY RECAP *********************************************************************
    testserver                 : ok=44   changed=40   unreachable=0    failed=0

    $ vagrant ssh
    (snip)
    vagrant@ubuntu-xenial:~$ ls -l yaf/json
    total 2396
    -rw-r--r-- 1 root root 2447363 Dec 18 06:11 yaf.20181217154009.json
    vagrant@ubuntu-xenial:~$

### usage (kibana)
Please use firefox or chrome.
- open http://<IP_ADDRESS>:5601/
- select "Management"
- select "Saved Objects"
- push "Import"
- File Upload: kibana6/yaf_ndpi.json (check "Automatically overwrite all saved objects?")
- push "Done"
- select "Dashboard"
- select "main", "bar", "bar2", "bar2_nDPI", "circle" or "circle2"
- enjoy!

### usage (grafana)
- open http://<IP_ADDRESS>:3000/
- login (username: admin password: admin)
- change password
- push "Add data source"
- push "Elasticsearch" from "Choose data source type"
- input "yaf" in Name
- input "http://localhost:9200" in URL
- input "yaf.*" in Elasticsearch details Index Name
- select "6.0+" in Elasticsearch deaiils Version
- push "Save & Test"
- select "+" and "Import"
- push "Upload .json File"
- upload "grafana/ElasticSearch YAF count.json"
- select "yaf" from "Select a Elasticsearch data source"
- push "Import"
- enjoy!

### ToDo
- document


text:
# RAF_Nightly

RAF Nightly Build for Internal Servers.  This is checked out and used by Jenkins to build the projects for in-house use.  There should be targets for CentOS 7, 8, and 9.

build_all.sh is the script that is run.  It loops over projects that use make(1), scons(1).  Some of the targets require changing into specific directories before building.

There is a loop to loop over projects that have a **publish** target.  The publish target is to copy html documentation to the EOL webserver space.  This is generally /net/www/docs/raf/software and is set in the SConstruct files as $PUBLISH_PREFIX.


text:
---
layout: article
mathjax: true
title: Set Difference
image: "/assets/images/covers/tim-johnson-Vwf8q3RzBRE-unsplash.jpg"
categories:
- DM
desc:
imagealt: Cover Image for article
---

Difference of set $A$ from set $B$ (denoted as $A - B$) will be the elements of $A$ without elements common with $B$ ([Set Intersection]({% post_url 2021-06-05-set-intersection %}) of $A$ and $B$).

$$A-B = A -(A \cap B)$$

It could also be called *complement of B with respect to A*.

$$A-B = \{x | (x \in A) \wedge (x \notin B)\}$$

This blog was published directly from my notes.
To check the source of my notes and images used in this blog, visit Credits.

To read my notes, download this repository.


text:
---
title: Debugging CloudFormation
---

Underneath the hood, CloudFormation is used to provision AWS resources. This is discussed in this [podcast](http://5by5.tv/rubyonrails/253) interview.  Jets actually creates several CloudFormation stacks.   Jets manages this all for you.

So if a [jets deploy](http://rubyonjets.com/reference/jets-deploy/) fails, you likely want to check out the CloudFormation console for errors. Particularly, usually checking the child stack with the error instead of the parent stack is the most helpful.

## Example

The `jets deploy` command itself logs the CloudFormation of the parent stack.  Here's what an example of a deploy with an error:

    $ jets deploy
    ...
    Deploying CloudFormation stack with jets app!
    03:20:27AM UPDATE_IN_PROGRESS AWS::CloudFormation::Stack demo-dev User Initiated
    ...
    03:20:44AM UPDATE_FAILED AWS::CloudFormation::Stack JetsPreheatJob Embedded stack arn:aws:cloudformation:us-west-2:112233445566:stack/demo-dev-JetsPreheatJob-IXX3J912KGKS/f4fec860-1871-11e9-94d5-0a57e06cb5fc was not successfully updated. Currently in UPDATE_ROLLBACK_IN_PROGRESS with reason: The following resource(s) failed to update: [WarmLambdaFunction, TorchLambdaFunction].
    03:20:45AM UPDATE_FAILED AWS::CloudFormation::Stack JetsPublicController Resource update cancelled
    03:20:45AM UPDATE_FAILED AWS::CloudFormation::Stack PostsController Resource update cancelled
    ...
    03:21:43AM UPDATE_ROLLBACK_COMPLETE AWS::CloudFormation::Stack demo-dev
    Stack rolled back: UPDATE_ROLLBACK_COMPLETE
    ...

The parent stack is reporting that the main error is on the `JetsPreheatJob Embedded stack` nested child stack.  You can check on this error in CloudFormation console by clicking on the child stack and will find something like this:

![](/img/docs/debug/cloudformation-child-stack-error.png)

You can see here that the error is because the user does not have the necessary IAM permission. In this case, giving the user the [Minimal Deploy IAM Policy]({% link _docs/minimal-deploy-iam.md %}) will resolve the issue.

## New Child Stacks Deleted

When a child stack is created for the very first time and happens to fail, CloudFormation will roll back the child stack and delete it. This makes it tricky for those who don't yet realize this because the error message is gone by the time they check. In this case, you have to refresh the CloudFormation console during a deploy to see it and capture that.

You may want to try incrementally debugging it. First, create a simple class with just one method and get that deployed successfully. And then add your full logic and deploy again. With this approach, the rolled back child stack remain intact and you can see the error message post deploy.

Back
Next Step

Pro tip: Use the <- and -> arrow keys to move back and forward.

repository: orbanbotond/jets

repo_name: orbanbotond/jets


text:
This repo contains the directory software being created by me. Two versions are uploaded so far

Version 1:
Functionality: Read in csv file and store in a vector in memory called directory, add worker into directory by making new object and pushing into directory, searches directory based off string with keywords by parsing the string and using string function find().

Options:
1. Read in csv file and store in a vector in memory called directory
2. Prompts for first and last name of a perosn and the adds person into directory
3. Search based off string of keywords provided by user

Version 2:
Functionality: similar as v1 but with more options for reading data with csv.h and more data fields to enter in for option 2. Major change in class structure (one class vs 5 classes). Directory now is specific to a school system. Now can determine who is involved in a course, list out all courses without instructors that students are taking, print out all instructors and the courses they are teaching, pay all staff members, and display if person has permisson to e-mail based on list.

Options:
Same 3 from v1

4. Prompt user for a course, and will display Instructors and TAs teaching that course with students that are enrolled in that course.
5. Prints out all enrolled courses without instructors and all intrustors with courses they are teaching
6. Pays all staff. Instuctors are paid by courses time salary. Staff is paid by salary. TA is paid by hours times salary. No info is displayed.
7. Prompts name from user. The prompts user for a list of e-mails. Program will display which e-mails that named person can sent an e-mail to.

Note: If your csv file is badly formatted, the csv reader will not be able to read it and program will prompt an error


text:
# Warface API

Convenient library for working with the Warface API on PHP.

## Prerequisites

| Name  | Version |
|  ---  |   ---   |
|  php  | \>=7.4  |
| ext-curl | *    |
| ext-json | *    |

## Installation

This generator can be installed using Composer by running the following command:

```sh
composer require wnull/warface-api
```

## Example of use

Before using, you should read a documentation about the functions and their parameters.

```php
require __DIR__ . '/vendor/autoload.php';

$client = new Warface\ApiClient();
$info = $client->clan()->members('1337', Warface\Enums\GameServer::ALPHA);

print_r($info);
```

## License

This library is licensed under the [MIT License](https://github.com/wnull/warface-api/blob/master/LICENSE).


text:
# cpufetch

Prints a fancy summary of the CPU with some advanced information

### Platforms
This tool works on both 64 only and under Linux because of its [implementation details](#implementation). AMD support is not guaranteed so information may not be correct

### Usage and installation

Just clone the repo and use `make` to compile it

```
git clone https://github.com/Dr-Noob/cpufetch
cd cpufetch
make
./cpufetch
```

### Example

This is the output of `cpufetch` in a i7-4790K

![Example](/preview.png)

### Output

Output is detailed as follows:

| Field      | Description             | Possible Values  |
|:----------:|:-----------------------:|:-----------------:|
| Name       | Name of the CPU   | Any valid CPU name |
| Frequency  | Max frequency of the CPU(in GHz) | X.XX(GHz or MHz)
| N.Cores    | Number of cores the CPU has. If CPU supports `Hyperthreading` or similar, this will show cores and threads separately | X(cores)X(threads)
| AVX        | Type of AVX supported by the CPU or None. AVX instructions allows the CPU to vectorize the code with a witdh of 256 bits in single precision(or 512bits if AVX512 is supported) | AVX,AVX2,AVX512,None
| SSE        | Same as AVX, but SSE family are 128bits witdh | SSE, SSE2, SSE3, SSSE3, SSE4a, SSE4_1, SSE4_2,None |
| FMA        | Does this CPU support FMA(Fused Multiply Add)?This instruction allows the CPU to multiply and add a value on the same clock cycle | FMA3,FMA4,None |
| AES        | Does this CPU support AES? This instruction is allows the CPU to make AES cypher efficiently | Yes or No |
| SHA        | Does this CPU support SHA? This instruction is allows the CPU to make SHA hashing efficiently | Yes or No |
| L1 Size    | Size(in bytes) of the L1 cache, separated in data and instructions | XXB(Data)XXB(instructions) |
| L2 Size    | Size(in bytes) of the L2 cache(both are unified) | XXXKB or None |
| L3 Size    | Same as L3 | XXXXKB or None |
| Peak FLOPS | Max FLOPS(Floating Point Operation Per Second) this CPU could theoretical achieve. This is calculated by: `N.Cores*Freq*2(Because 2 functional units)*2(If has FMA)*VectorWidth` | XXX.XX (G/T)FLOPs |

`cpufetch` also prints a simple ascii art of the manufacturer logo.

### Implementation

`cpufetch` makes use of two techniques to fetch data:
* __cpuid__: CPU name, number of threads per core and instructions features are fetched via _cpuid_. See [this](http://www.sandpile.org/x86/cpuid.htm) and [Intel  Processor Identification and the CPUID Instruction](https://www.scss.tcd.ie/~jones/CS4021/processor-identification-cpuid-instruction-note.pdf) for more information.
* __udev__: Cache and frequency are fetched via _udev_, by looking at specific files from `/sys/devices/system/cpu`

### Bugs or improvements
Feel free to open a issue on the repo to report a issue or propose any improvement in the tool


text:
# php_data_object

[![Build Status](https://travis-ci.org/flancer32/php_data_object.svg)](https://travis-ci.org/flancer32/php_data_object)
[![codecov.io](https://codecov.io/github/flancer32/php_data_object/coverage.svg?branch=master)](https://codecov.io/github/flancer32/php_data_object?branch=master)

_"Smart data structures and dumb code works a lot better than the other way around."_ (c) Eric S. Raymond

_"Bad programmers worry about the code. Good programmers worry about data structures and their relationships."_ (c) Linus Torvalds

## Overview
This is yet another PHP implementation of the data container (like [DTO](https://en.wikipedia.org/wiki/Data_transfer_object) / [SDO](http://php.net/manual/en/book.sdo.php)). Some kind of the wrapper around associative array. The main goal of this implementation is to be an accessor for the raw data.

## Native PHP objects

### Structure
We can use any property of any PHP object:

    $obj1 = new class {};
    $obj2 = new class {};
    $obj1->name = 'first';
    $obj2->code = 'OBJ2';
    $obj1->sub = $obj2;
    $this->assertEquals('first', $obj1->name);
    $this->assertEquals('OBJ2', $obj1->sub->code);

[More...](./docs/010_PhpObjects.md)

### Paths
We can set/get value of the inner property in PHP style:

    $obj->sub->code = $code;
    $code = $obj->sub->code;

but we will have "_Undefined property_" error if `$obj->sub` property does not exist.

### Type checking
We need to use accessors to control properties types.

This is `Customer` class with `string` property:

    /**
     * @property string $name Customer name.
     */
    class Customer
    {
        public function getName() : string
        {
            return $this->name;
        }

        public function setName(string $data)
        {
            $this->name = $data;
        }
    }

This is `Order` class with `Customer` property:

    /**
     * @property Customer $customer
     */
    class Order
    {
        public function getCustomer() : Customer
        {
            return $this->customer;
        }

        public function setCustomer(Customer $data)
        {
            $this->customer = $data;
        }
    }

This is code without errors (all types are expected):

    $customer = new Customer();
    $customer->setName('John Dow');
    $order = new Order();
    $order->setCustomer($customer);
    $this->assertTrue(is_string($order->getCustomer()->getName()));

This code will throw a `\TypeError` exception:

    $customer = new class {};
    $customer->name = 'John Dow';
    $order = new Order();
    $order->setCustomer($customer);

[More...](./docs/020_TypeChecking.md)

## Data Objects

### Structure

### Paths
With paths we will have property value if chain of properties exists or `null` otherwise:

    $code = $obj->get('sub/code');
    $code = $obj->get('/sub/code');    // equals to 'sub/code'
    $code = $obj->get('/subs/0/code'); // 'subs' is array
    $code = $obj->get('/sub/code/does/not/exist'); // 'null' is returned, no error is occured

Also we can set data property by path:

    $obj->set('order/customer/name', 'John Dow');

### Type hinting

## Installation
Add to `composer.json`:

    "require": {
        "flancer32/php_data_object": "0.1.0"
    }

## Development

    $ composer install
    $ ./vendor/bin/phpunit -c ./test/unit/phpunit.dist.xml

gha_language: PHP


text:
# Note: Most of this doc is obsolete! These classes should be accessed via import in Lua, or reflect in ros, if possible.

# Common Scripting API for Lua and RedOnionScript (ROS)
Here is some information about the API that we provide. In the future a lot of the content in these docs will be automated, but for now we will try to keep documentation manually caught up with at least some of the features we have added. But some features may be out of date or improperly maintained until we have an automatic documentation system.

Note: As we are very early in the process of figuring out all that we can do with this system, this API may change dramatically. We are also going to try to make the API more consistent between the two engines. We are very heavily involved in exploring what we can do with this at the moment and a lot of this can be considered a prototype.

WE ARE PROVIDING ACCESS TO POWERFUL KSP FEATURES:
MANY WILL LEAD TO ERRORS IN ONE OR MORE OF THE SCRIPTING ENGINES.

This is a WIP, and as time goes on we will develop a more robust system.

# KSP
We are exposing various objects/types to our Scripting engines. Some are defined in KSP or UnityEngine, and some are objects/types we created ourselves that are useful for interacting with the game. These objects/types have been added inside an object/namespace that is a global in both scripting languages.

For Lua, this global is spelled "Ksp", and for ROS (though ros is case insensitive) it is spelled "KSP".

For Lua, we must expose instantiated objects, while for ROS we can expose types or instantiated objects.

All of the Following Objects/Types are exposed under the "Ksp" or "KSP" namespace in Lua or ROS or both.

## FlightControl
This an experimental autopilot we have developed. To use with ROS, at the moment, you call GetInstance to get the instance.

ROS:
```
var ctrl=KSP.FlightControl.GetInstance()
```

Lua:
```
ctrl=Ksp.FlightControl
```

From there you can call `ctrl.StopSpin()` to put the autopilot in
STOP_SPIN mode.

`ctrl.SetSpin(vec)` Sets the spin to a particular Vector where the xyz components are used as follows: x means pitch, y means roll, and z means yaw.

To set the ship to always point at a particular direction, use
`ctrl.TargetDir=vec`. This is using the raw coordinate system under the hood and a better function will be implemented to replace this in the future.

To stop the autopilot you can click "Kill Ctrl" button in the repl, or call `ctrl.Shutdown()`.

Autopilot currently doesn't handle control surfaces well.
It's a WIP.

## FlightGlobals
Here we are exposing KSP's [FlightGlobals](https://kerbalspaceprogram.com/api/class_flight_globals.html) class. This is just used as a static class, and those are accessed similarly in Lua and ROS.

From flight globals you can get a reference to the `ActiveVessel` which
allows you to interact directly with the very vessel you are flying.

`ActiveVessel` is null when you are not in a flight scene.

You can get access to a lot of different gameplay objects from this class.

## HighLogic
This is KSP's [HighLogic](https://kerbalspaceprogram.com/api/class_high_logic.html) class, which is also used as a static class.

One thing you can do with this, is get access to the [CurrentGame](https://kerbalspaceprogram.com/api/class_game.html), and use that to get a reference to the current [CrewRoster](https://kerbalspaceprogram.com/api/class_kerbal_roster.html).

## EditorLogic
This is KSP's [EditorLogic](https://kerbalspaceprogram.com/api/class_editor_logic.html) class. This is not used as a static class so it's accessed differently in Lua and ROS at the moment.

For Lua, you just access `editor=Ksp.EditorLogic` to get the instance, while in ROS you do `var editor=KSP.EditorLogic.fetch`.

The EditorLogic instance will be null unless you are in the VAB or SPH.

I'm thinking a lot about what I can do with this class. One thing it allows you to do is get a reference to the ship that is being currently built: `editor.ship`.

from this you can iterate over the parts (ROS):
```
var vessel=ksp.EditorLogic.fetch.ship

for var part in vessel.parts
    for var module in part.modules
        print module
```
Lua:
```
--(Lua Moonsharp seems to have an issue with nested generic for-loops so I have to use each or weird things happen.)
editor=Ksp.EditorLogic
ship=editor.ship
parts=ship.parts
function each(lst,action)
    for i=0,lst.count-1 do
        action(lst[i])
    end
end

for part in parts do
    each(part.Modules,function(m)
        print(m)
    end)
end
```

## ShipConstruction
Here we are exposing KSP's [ShipConstruction](https://kerbalspaceprogram.com/api/class_ship_construction.html) class, which is used as a static class.

There are a lot of interesting capabillities that seem to be accessible from this class. I don't know much about it at the moment.

Possibly only useful in the VAB/SPH

## PartLoader
Here we are exposing KSP's [PartLoader](https://kerbalspaceprogram.com/api/class_part_loader.html) class. There are static methods which are available and also there is `KSP.PartLoader.Instance.loadedParts` which lists all the parts that have been loaded by the game (I think).

## FlightDriver
Here we are exposing KSP's [FlightDriver](https://kerbalspaceprogram.com/api/class_flight_driver.html)

One thing I know that this can do is allow you to programmatically switch to a different vessel.

The following code prints out all the vessels and their associated index:

ROS:
```
var vessels=ksp.FlightGlobals.Vessels

for var i=0;i<vessels.count;i++
    print i+":"+vessels[i]
```
Then you can pick an `index` from the printed list and use that `index` to switch to the associated vessel using `FlightDriver` and `HighLogic`.

```
Ksp.FlightDriver.StartAndFocusVessel(Ksp.HighLogic.CurrentGame,index)
```

## StageManager
KSP's [StageManager](https://kerbalspaceprogram.com/api/class_k_s_p_1_1_u_i_1_1_screens_1_1_stage_manager.html) class. You use the static method `ActivateNextStage()` to ... well... activate the next stage.

This is not purely a static class. I believe you get the instance with the `Instance` static method. And though I haven't used the instance, it looks like it allows you to modify the staging order.

## Vec
This is a little helper class with some static methods to help with
vector math.

Partwise vector division:
`Ksp.Vec.Div(vec1,vec2)`

Partwise vector absolute value:
`Ksp.Vec.Abs(vec)`

Instantiate new vector (currently needed for Lua):
`Ksp.Vec.New(x,y,z)` and `Ksp.Vec.New()`

## Mathf
UnityEngine's [Mathf](https://docs.unity3d.com/ScriptReference/Mathf.html)

## Time
UnityEngine's [Time](https://docs.unity3d.com/ScriptReference/Time.html)

Repl/Editor scripts are ran during the FixedUpdate.
You can use Time.deltaTime to ensure accurate physics
calculations.

Example (Lua):
```
vessel=Ksp.FlightGlobals.ActiveVessel
ctrl=Ksp.FlightControl
local previousTime=os.time()
local ctrlTable={roll=0,pitch=0,yaw=0}

while true do
    print(vessel.ctrlState.GetPYR())

    torque=ctrl.GetAvailableTorque(vessel)

    local angularVelocity=Ksp.Vec.Div(vessel.angularMomentum,vessel.MOI)
    local maxAccel=Ksp.Vec.Div(torque,vessel.MOI)
    local input=Ksp.Vec.Div(angularVelocity,maxAccel*Ksp.Time.deltaTime)

    ctrlTable.pitch=input.x
    ctrlTable.roll=input.y
    ctrlTable.yaw=input.z

    ctrl.SetWithTable(ctrlTable)

    if(angularVelocity.magnitude<0.01) then
        ctrl.Shutdown()
        print("finished!")
        break
    end

    coroutine.yield()
end
```

## Random
UnityEngine's [Random](https://docs.unity3d.com/ScriptReference/Mathf.html)

repository: evandisoft/RedOnion

gha_language: C#

repo_name: evandisoft/RedOnion


text:
# Test Description

This test shows how we handle long DATA lines for SMTP.

## PCAP

PCAP comes from ttps://osqa-ask.wireshark.org/questions/33094/extract-an-attachment-email-smtp-cap
and has been modified to have a really long DATA line (6512 Bytes).

## Related issues

https://redmine.openinfosecfoundation.org/issues/5981

repository: jasonish/suricata-verify

gha_language: Python

repo_name: jasonish/suricata-verify


text:
---
title: App AutoScaler API Reference

language_tabs: # must be one of https://git.io/vQNgJ
  - shell

toc_footers:
  - Cloud Foundry App Auto-Scaler

search: true
---

# App AutoScaler

This topic explains how to use the App-AutoScaler with its RESTful API.

The App Autoscaler API allows you to manage `App Autoscaler` with `curl` from command line simply or in other programming approach.

If you access `App Autoscaler API` through `shell`, we assume you have installed [Cloud Foundry Command Line][a] which could be used to get Authentication token and Application guid related information.

# Authentication

> To get the authorization token, use this code:

```shell
token=`cf oauth-token`
curl "api_endpoint_here" \
  -H "Authorization:$token`
```

`App Autoscaler API` uses the [Cloud Foundry User Token][uaa] to identify the user's information and only responses to the requests raised by authorized Space developers.

# Policy

## Get policy

> To get the AutoScaling policy of your application, please use the code below:

```shell
token=`cf oauth-token`
appId=`cf app <Your-App> --guid`
curl "http://example.com/v1/apps/$appId/policy" \
  -X GET \
  -H "Authorization:$token`
```
> Make sure to replace `Your-App` with your application name.

> The above command returns JSON structured like this, which is built per [App AutoScaler policy specification][policy]

```json
{
  "instance_min_count": 1,
  "instance_max_count": 4,
  "scaling_rules": [
    {
      "metric_type": "memoryutil",
      "breach_duration_secs": 600,
      "threshold": 30,
      "operator": "<",
      "cool_down_secs": 300,
      "adjustment": "-1"
    },
    {
      "metric_type": "memoryutil",
      "breach_duration_secs": 600,
      "threshold": 90,
      "operator": ">=",
      "cool_down_secs": 300,
      "adjustment": "+1"
    }
  ],
  "schedules": {
    "timezone": "Asia/Shanghai",
    "recurring_schedule": [
      {
        "start_time": "10:00",
        "end_time": "18:00",
        "days_of_week": [
          1,
          2,
          3
        ],
        "instance_min_count": 1,
        "instance_max_count": 10,
        "initial_min_instance_count": 5
      },
      {
        "start_date": "2099-06-27",
        "end_date": "2099-07-23",
        "start_time": "11:00",
        "end_time": "19:30",
        "days_of_month": [
          5,
          15,
          25
        ],
        "instance_min_count": 3,
        "instance_max_count": 10,
        "initial_min_instance_count": 5
      }
    ],
    "specific_date": [
      {
        "start_date_time": "2099-06-02T10:00",
        "end_date_time": "2099-06-15T13:59",
        "instance_min_count": 1,
        "instance_max_count": 4,
        "initial_min_instance_count": 2
      },
      {
        "start_date_time": "2099-01-04T20:00",
        "end_date_time": "2099-02-19T23:15",
        "instance_min_count": 2,
        "instance_max_count": 5,
        "initial_min_instance_count": 3
      }
    ]
  }
}

```

This endpoint retrieves the Auto-Scaling policy of your application.

### HTTP Request

`GET /v1/apps/:guid/policy`

where `:guid` is the application's GUID.

## Create/Update policy

> To create an AutoScaling policy to your application, please prepare a policy JSON according to [App AutoScaler policy specification][policy] first, then attach the policy with the code below:

```shell
token=`cf oauth-token`
appId=`cf app Your-App --guid`
curl "http://example.com/v1/apps/$appId/policy" \
  -X PUT \
  -H "Authorization:$token` \
  -H "Content-Type: application/json" \
  -d @policy.json
```
> Make sure to replace `Your-App` with your application name, also replace `policy.json` with your policy file.

> If the policy content is written in valid schema, the example response is :

```
HTTP/1.1 200 OK
<file contents>
```

> If the policy content is invalid, the example response is :

```
HTTP/1.1 400 Bad Request
<Error messages>
```

This endpoint create/update the Auto-Scaling policy to your application.

### HTTP Request

`PUT /v1/apps/:guid/policy`

where `:guid` is the application's GUID.

The request body should be a valid App AutoScaler policy

## Delete policy

> To remove `App AutoScaler` from your application, you can delete the policy with the code below:

```shell
token=`cf oauth-token`
appId=`cf app <Your-App> --guid`
curl "http://example.com/v1/apps/$appId/policy" \
  -X DELETE \
  -H "Authorization:$token`
```
> Make sure to replace `Your-App` with your application name.

>Example response is :

```
HTTP/1.1 200 OK
```

This endpoint delete the Auto-Scaling policy from your application.

### HTTP Request

`DELETE /v1/apps/:guid/policy`

where `:guid` is the application's GUID.

# Metrics

## Aggregated Metrics

> To get historical aggreagated metrics of your application, please use the code below:

```shell
token=`cf oauth-token`
appId=`cf app <Your-App> --guid`
curl "http://example.com/v1/apps/$appId/aggregated_metric_histories/<Metric-Type>" \
  -X GET \
  -H "Authorization:$token`
```
> Make sure to replace `Your-App` with your application name, and replace the `Metric-Type` to one of the supported metric types.

> The above command returns JSON Array like below:

```json
[
  "total_results": 2,
  "total_pages": 1,
  "page": 1,
  "prev_url": null,
  "next_url": null,
  "resources": [
    {
      "app_guid": "appId",
      "timestamp":<PHONE_NUMBER>138350433,
      "metric_type": "memoryused",
      "value": "400",
      "unit": "megabytes"
    },
    {
      "app_guid": "appId",
      "timestamp":<PHONE_NUMBER>138350433,
      "metric_type": "memoryused",
      "value": "400",
      "unit": "megabytes"
    }
  ]
]
```
This endpoint retrieves the aggregated metrics of your application.

`App AutoScaler` has more interests in the application’s aggregated average metric than individual instance metrics and use the aggregated metrics in evaluation stage.  So, querying the aggrgated metrics will help you to understand why a scaling action happens at that time.

### HTTP Request

`GET /v1/apps/:guid/aggregated_metric_histories/:<Metric-Type>`, in which

* `:guid` is the application's GUID
* `:<Metric-Type>` is one of the supported metric type value, including
   * memoryused
   * memoryutil
   * responsetime
   * throughput

### Query Parameters

Parameter | Description                 | Values           | Required
--------- | ----------------------------|----------------- | --------
start-time| The start time              | int, the number of nanoseconds elapsed since January 1, 1970 UTC  | false, default 0
end-time  | The end time                | int, the number of nanoseconds elapsed since January 1, 1970 UTC  | false, default `now`
order | The order of display             | string,”asc” or “desc” | false, default `desc`
page | The required page number          | int | false, default 1
results-per-page | Number of results which displayed in the same page       | int | false, default 10

## Instances Metrics

> To get historical instance's metrics of your application, please use the code below:

```shell
token=`cf oauth-token`
appId=`cf app <Your-App> --guid`
curl "http://example.com/v1/apps/$appId/metric_histories/<Metric-Type>" \
  -X GET \
  -H "Authorization:$token`
```
> Make sure to replace `Your-App` with your application name, and replace the `Metric-Type` to one of the supported metric types.

> The above command returns JSON Array like below:

```json
[
  "total_results": 2,
  "total_pages": 1,
  "page": 1,
  "resources": [
    {
      "app_guid": "appId",
      "instanceIndex": 0,
      "timestamp":<PHONE_NUMBER>138350433,
      "collected_at":<PHONE_NUMBER>138350000,
      "metric_type": "memoryused",
      "value": "400",
      "unit": "megabytes"
    },
    {
      "app_guid": "appId",
      "instance_index": 1,
      "timestamp":<PHONE_NUMBER>138350433,
      "collected_at":<PHONE_NUMBER>138350000,
      "metric_type": "memoryused",
      "value": "400",
      "unit": "megabytes"
    }
  ]
]
```
This endpoint retrieves the instance's metrics of your application.

### HTTP Request

`GET /v1/apps/:guid/metric_histories/:<Metric-Type>`, in which

* `:guid` is the application's GUID
* `:<Metric-Type>` is one of the supported metric type value, including
   * memoryused
   * memoryutil
   * responsetime
   * throughput

### Query Parameters

Parameter | Description                 | Values           | Required
--------- | ----------------------------|----------------- | --------
start-time| The start time              | int, the number of nanoseconds elapsed since January 1, 1970 UTC  | false, default 0
end-time  | The end time                | int, the number of nanoseconds elapsed since January 1, 1970 UTC  | false, default `now`
order | The order of display             | string,”asc” or “desc” | false, default `desc`
page | The required page number          | int | false, default 1
results-per-page | Number of results which displayed in the same page       | int | false, default 10

# Histories

> To get the autoscaling histories of your application, please use the code below:

```shell
token=`cf oauth-token`
appId=`cf app <Your-App> --guid`
curl "http://example.com/v1/apps/$appId/scaling_histories" \
  -X GET \
  -H "Authorization:$token`
```
> Make sure to replace `Your-App` with your application name.

> The above command returns JSON Array like below:

```json
{
  "total_results": 2,
  "total_pages": 1,
  "page": 1,
  "resources": [
    {
      "app_guid": "appId",
      "timestamp":<PHONE_NUMBER>138350433,
      "scaling_type": 1,
      "status": 0,
      "old_instances": 1,
      "new_instances": 2,
      "reason": "",
      "message": "",
      "error": ""
    },
    {
      "app_guid": "appId",
      "timestamp":<PHONE_NUMBER>138350435,
      "scaling_type": 1,
      "status": 0,
      "old_instances": 1,
      "new_instances": 2,
      "reason": "",
      "message": "",
      "error": ""
    }
  ]
}
```
This endpoint retrieves the autoscaling history events of your application for audit purpose.

### HTTP Request

`GET /v1/apps/:guid/scaling_histories`

where `:guid` is the application's GUID

### Query Parameters

Parameter | Description                 | Values           | Required
--------- | ----------------------------|----------------- | --------
start-time| The start time              | int, the number of nanoseconds elapsed since January 1, 1970 UTC  | false, default 0
end-time  | The end time                | int, the number of nanoseconds elapsed since January 1, 1970 UTC  | false, default `now`
order | The order of display             | string,”asc” or “desc” | false, default `desc`
page | The required page number          | int | false, default 1
results-per-page | Number of results which displayed in the same page       | int | false, default 10

[uaa]:https://github.com/cloudfoundry/uaa/blob/develop/docs/UAA-Tokens.md
[policy]:/app-autoscaler/policy.html

repository: cdlliuy/slate

repo_name: cdlliuy/slate


text:
# Bordeaux 3d

A project to visualize Bordeaux and the CUB in 3D. Based on [Open Data](http://data.lacub.fr/data.php?themes=1&layer=344).

This project is the core of Bordeaux3D.
It contains the core features:
* Tools to process the raw data and prepare it for efficient server->client transport
* Server-side serving the 3D objects (using socket.io currently)
* index.html file
* Three.js scene creation
* Client-side scripts to load the data for the 3D objects and add them to the Three.js scene
* Client-side API

Everything else should be features added that interact with the client-side API.
* Lights
* Shadows
* Cameras

# Entry points

There are three main entry points to this project:
* `tools/unzipCUB3ds.js` a batch script to unzip and process the 3D open data in .3ds format (explanations below)
** exposed as `unzipCUB3ds` binary in package.json
* `server/index.js` server-side of city-core (handling both HTTP and websockets endpoints)
** exposed as `city-server` binary in package.json
* `front/index.js` client-side library to be used by city-core clients to interact with the server and the 3D WebGL scene
** exposed as `main` in package.json (to be `require()`'d)

# How to make this all work

1. Get the 3D data

* Right now the 3D data has to be downloaded via the [dedicated GUI](http://data.lacub.fr/graphic_downloader.php?layer=344&format=76). Once you have it, put it somewhere. It should be a .zip archive named `BATI3D_NT.zip` or equivalent.
* Altitude data in CSV format can be found in the [CUB data website](http://data.lacub.fr/data.php?themes=1&layer=344) (under "découpage des dalles 3D"). They should be put under `data/DALLAGE_3D.csv`.

1. `git clone` the project
1. `npm install`

1. Extract all the buildings and metadata in `front/data`:

```bash
node tools/unzipCUB3ds.js --out front/data --zip path/to/3Ddata/BATI3D_NT.zip
```

It should take about 2-3 minutes per exported "dalle" in normal hardware. This will extract all the buildings and other 3d objects from the open data in [.3ds format](http://en.wikipedia.org/wiki/.3ds). It will create thousands of binary files in `front/data/` as well as a file names `metadata.json`.

```bash
npm run build
npm run start-dev
```

1. Open http://localhost:9000

# TODO

* explain client-side hard dependencies :
** ES6 Map, Set and WeakMap are hard dependencies. The client-side library won't work without them.
Either require a browser with them or use a polyfill like [harmony-collections](https://github.com/Benvie/harmony-collections)
** need to hardcode a couple of `glsl` framents inline in the HTML with ids `sky-vertex` and `sky-fragment`.
** Hardcoded front/img/sky.jpg file

Reorg:
* common/
** things in common, like meshType.js
* data/
** altitude data
* example/
** example of code using this repo
* front/
* img/
** for sky.jpg for now
* test/
* tools/
* server/

# Dev

```bash
npm run watch
npm start
```

# Licence

[MIT](LICENCE)

repository: anthill/city-core

gha_language: JavaScript

repo_name: anthill/city-core


text:
Ti=Access and Investigation

1.0.sec=Prior to the {_Closing_Date}, and upon reasonable notice from {_Buyer}, each {_Seller} shall, and shall cause each {_Acquired_Company} to,

1.1.sec=(a) afford {_Buyer} and its {_Representatives} and prospective lenders and their {_Representatives} (collectively, "{_Buyer_Group}") full and free access, during regular business hours, to each {_Acquired_Company}'s personnel, assets, {_Contracts}, and {_Records},

1.2.sec=(b) furnish {_Buyer_Group} with copies of all such {_Contracts} and {_Records} as {_Buyer} may reasonably request,

1.3.sec=(c) furnish {_Buyer_Group} with such additional financial, operating, and other relevant data and information as {_Buyer} may reasonably request, and

1.4.sec=(d) otherwise cooperate and assist, to the extent reasonably requested by {_Buyer}, with {_Buyer}'s investigation of the business, condition (financial or otherwise), assets, results of operations, or prospects of each {_Acquired_Company}.

1.=[Z/para/s4]

2.sec=In addition, {_Buyer} shall have the right to have the {_Real_Property} and the tangible personal property of each {_Acquired_Company} inspected by {_Buyer_Group}, at {_Buyer}'s sole cost and expense, including the performance of subsurface or other intrusive testing.

=[Z/para/s2]

repository: CommonAccord/Cmacc-Source

repo_name: CommonAccord/Cmacc-Source


text:
# HyperCwd

Opens new tabs with the same directory as the current tab in HyperTerm

![New Tabs](https://raw.githubusercontent.com/hharnisc/hypercwd/master/newTabs.gif)

## Installation

Open ~/.hyperterm.js and add `hypercwd` to the list of plugins.


text:
  {{cookiecutter.app_name}}

  {{cookiecutter.project_short_description}}

## Table of Contents

- [Table of Contents](#table-of-contents)
- [Introduction](#introduction)
- [Features](#features)
- [Requirements](#requirements)
  - [EGO](#ego)
  - [Local](#local)
  - [Docker](#docker)
- [Quick Start](#quick-start)
  - [Configure JWT Verification Key](#configure-jwt-verification-key)
  - [Run Local](#run-local)
  - [Run Docker](#run-docker)
- [Testing](#testing)
- [API](#api)
- [Acknowledgements](#acknowledgements)

## Introduction

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e91606af4a364076a7058c5ea1c006a8)](https://www.codacy.com/app/joneubank/microservice-template-java?utm_source=github.com&utm_medium=referral&utm_content=overture-stack/microservice-template-java&utm_campaign=Badge_Grade)
[![CircleCI](https://circleci.com/gh/overture-stack/microservice-template-java/tree/master.svg?style=shield)](https://circleci.com/gh/overture-stack/microservice-template-java/tree/master)

TODO: Replace with introduction

## Features
TODO: Description of features

* Include a list of
* all the many beautiful
* web server features

## Requirements
The application can be run locally or in a docker container, the requirements for each setup are listed below.

### EGO
A running instance of [EGO](https://github.com/overture-stack/ego/) is required to generate the Authorization tokens and to provide the verification key.

[EGO](https://github.com/overture-stack/ego/) can be cloned and run locally if no public server is available.

### Local
* [GO][(http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html](https://golang.org/dl/))
* [Mockgen](https://github.com/golang/mock)
* [Sqlc](https://github.com/kyleconroy/sqlc)
* [Goose](https://github.com/pressly/goose)

### Docker
* [Docker](https://www.docker.com/get-docker)

## Quick Start
Make sure the JWT Verification Key URL is configured, then you can run the server in a docker container or on your local machine.

### Configure JWT Verification Key
Update __application.yml__. Set `auth.jwt.publicKeyUrl` to the URL to fetch the JWT verification key. The application will not start if it can't set the verification key for the JWTConverter.

The default value in the __application.yml__ file is set to connect to EGO running locally on its default port `8081`.

### Run Local
```bash
$ make run
```

Application will run by default on port `1234`

Configure the port by changing `server.port` in __application.yml__

### Run Docker

First build the image:
```bash
$ docker-compose build
```

When ready, run it:
```bash
$ docker-compose up
```

Application will run by default on port `1234`

Configure the port by changing `services.api.ports` in __docker-compose.yml__. Port 1234 was used by default so the value is easy to identify and change in the configuration file.

## Testing
TODO: Additional instructions for testing the application.

## API
TODO: API Reference with examples, or a link to a wiki or other documentation source.

## Acknowledgements
TODO: Show folks some love.

repository: zeihanaulia/cookiecutter-go-service

branch_name: refs/heads/main

repo_name: zeihanaulia/cookiecutter-go-service


text:
# Usage

Before using HADDOCK3, install HADDOCK3 following the [installation
instructions](INSTALL.md).

## Run HADDOCK3

This is a minimal description of how to run HADDOCK3. We are currently
creating detailed documentation and tutorials. The minimal HADDOCK3
execution command is:

```bash
haddock3 <CONFIG WORKFLOW>
```

Where the `<CONFIG WORKFLOW>` is a haddock3 configuration file
describing the simulation workflow.

You can inspect all `haddock3` options with:

```bash
haddock3 -h
```

Inside the HADDOCK3 main folder, there is an `examples/` folder. There
you will find several subfolder with examples for specific docking
scenarios. Please experiment running those configuration files ending in
`-test.cfg`. For example:

```bash
cd examples/docking-protein-protein
haddock3 docking-protein-protein-test.cfg
```

Feel free to open the `cfg` files with your preferred test editor, these
are plain text files.

To get the list of all possible parameters for each module:

```bash
haddock3-cfg -h
haddock3-cfg -m <MODULE NAME>
haddock3-cfg -m rigidbody
```

We are actively working towards expanding our documentation pages.
Thanks for using HADDOCK3! For any question please [open an issue
here](https://github.com/haddocking/haddock3/issues).


text:
# pyvo_bot

A bot 🤖 reminding people that the [Pyvo](https://pyvo.cz) meetup 🍻 is coming.
Also [@honzajavorek](https://github.com/honzajavorek)'s first real [project](https://en.wikipedia.org/wiki/Project-based_learning) written in Haskell.

## Usage

Currently the bot supports only [Telegram](https://telegram.org/) and can be found at https://t.me/pyvo_bot. The bot runs once per day here using the [CircleCI build](https://circleci.com/gh/honzajavorek/pyvo_bot). It loads iCalendar feed of Pyvo Praha and checks when is the next meetup. If it's about to be soon, it notifies the https://t.me/pyvopraha Telegram channel.

## Development

The project uses [Stack](https://docs.haskellstack.org/). Initial setup:

```
$ git clone git@github.com:honzajavorek/pyvo_bot.git
$ cd pyvo_bot
$ stack setup
```

Building:

```
$ stack build --fast
```

Running:

```
$ TELEGRAM_API_KEY=... \
    TELEGRAM_CHAT_ID... \
    stack --no-nix-pure exec pyvo_bot 'https://pyvo.cz/api/series/praha-pyvo.ics'
```

You can get the chat ID by [adding the bot to a conversation](https://stackoverflow.com/a/33497769), then writing something there so it gets updated with a message, and then GETting `https://api.telegram.org/bot<api_key>/getUpdates` (see [this](https://medium.com/@ManHay_Hong/how-to-create-a-telegram-bot-and-send-messages-with-python-4cf314d9fa3e)).

## To Do

- nicer code
- error/maybe handling
- unit tests
- support & create Telegram channels for Pyvo meetups in other Czech towns
- support Slack

## Credits

Inspired by [ikvasnica/bude-hezky](https://github.com/ikvasnica/bude-hezky), my friend's first real project written in Python.

## License

[MIT](LICENSE)


text:
---
layout: post
title: The Capacitive Button Cult Must Be Stopped
intro: Just like glossy laptop screen, and hyper contrast LCD TV.
link: http://ignorethecode.net/blog/2011/07/04/the_capacitive_button_cult_must_be_stopped/
---
Lukas Mathis on capacitive buttons:

> I think phones have capacitive buttons for the same reason laptops have
> reflective screens, and TVs in stores have their brightness and contrast
> turned all the way up. It looks really cool when you see it in a store, and
> you don't notice how screwed up it really is until after you've already
> bought it.


text:
# Convox Rack on Digital Ocean

## Initial Setup

- Log in to your Digital Ocean Dashboard
- Go to https://cloud.digitalocean.com/account/api/tokens
- Generate a new **Personal Access Token** and **Spaces Access Key**
- Note these credentials

## Install Convox

- Clone this repository and switch to the directory containing this `README`
- Run `terraform init`
- Run `terraform apply`

## Convox CLI Setup

- [Install the Convox CLI](https://docs.convox.com/introduction/installation)
- Run `export RACK_URL=$(terraform output rack_url)`
- Run `convox rack` to ensure that your CLI is connected to your new Rack

repository: AstmDesign/convox

repo_name: AstmDesign/convox


text:
# VBA-iFormBuilder
Resources for utilizing the Zerion iFormBuilder API in VBA.

## Dependencies

Communicating with the iFormBuilder API requires parsing JSON data, in addition to encoding text in Base64 and hashing with SHA256. All of these capabilities are provided by [VBA-Web](https://github.com/VBA-tools/VBA-Web/) from VBA-Tools.

## Obtaining an API token

```visual basic
' Load variables
    Dim Client_Key As String
    Client_Key = "myapikey"
    Dim Client_Secret As String
    Client_Secret = "myapisecret"
    Dim Server_Name As String
    Server_Name = "myservername"

' Get an access token to the IFB API
    Dim Access_Token As String
    Access_Token = Get_iForm_Access_Token(Server_Name, Client_Key, Client_Secret)
    If Access_Token = "" Then
        MsgBox "An access token to the iFormBuilder API could not be generated."
    End If
```

## Download IFB data to Access

The function `DownloadIFBData` can be utilized to insert a parent form's data with all child form data as separate tables in an Access database. See the function documentation for further details.

```visual basic
DownloadIFBData(PageId := 123456, _
                User := "MyUserName", _
                Password := "MyPassword", _
                ServerName := "MyCompany")
```

## Deleting downloaded data from IFB

repository: bdevoe/VBA-iFormBuilder

repo_name: bdevoe/VBA-iFormBuilder


text:
---
layout: post
title: "Doctor Who improving"
categories:
- culture
- media
date: 2007-07-02 00:00
comments: true
---

After really not enjoying the first series of Doctor Who with David Tennant, I've liked this series a lot more. I thought that Freema Agyeman was pretty terrific as Martha Jones, and somehow the change of companion meant that I was making fewer unfavourable comparisons with the Eccleston/Piper pairing. Some of the episodes have been a little lame, but there have also been some cracking ones.

I thought that Blink in particular was really good -- almost M. R. James quality shivers. I won't give the plot away, but it involved statues of weeping angels (think of Victorian statues in Highgate cemetery), which moved only when you weren't looking at them, but could move in the fraction of a second that it takes you to blink. It was really classically scary stuff, because all the horror was implied -- you never even saw anything move, but the creepiness was outstanding.

Mr. Bsag phoned me half way through the episode, and I nearly jumped out of my skin. He then had to suffer a completely incoherent one-sided conversation from me, as I tried to explain the plot without taking my eyes off the screen or pausing for breath:

"There'sthesestatuesandthey'realiveandtheymovewhenyou'renotlooking... Raaahrgggh!!They'recomingdon'tlookaway!"

Great stuff.

The two-part Human Nature/The Family of Blood was also very good (and rather moving, but I'm a sucker for anything set at the time of the First World War), and the final two episodes were very dramatic. When Derek Jacobi said "I. Am. The Master", it raised all the hairs on my neck. And Captain Jack was back - yay!

There was one odd thing though: was it just me, or did the last two episodes have very strongly Christian overtones? I suddenly thought, "Hey, they've stolen this plot from the Bible!" Again, trying not to give away the plot completely, there was a person walking the earth spreading the word about an individual who saves people without them knowing, there was a Judas character, and even a resurrection of sorts.

repository: bsag/blog-octo

repo_name: bsag/blog-octo


text:
### v1.1.1

---

- Add new rules: `jsx-newline` and `jsx-no-constructed-context-values`
- Upgrade dependencies

### v1.1.0

---

- Add new rules: jsx-a11y/autocomplete-valid
- Upgrade dependencies

### v1.0.2

---

- Add new rules: react/function-component-definition, react/jsx-no-script-url, react/no-adjacent-inline-elements
- Nothing major, just dependencies upgraded

### v1.0.1

---

- Add some missing rules

### v1.0.0

---

- Yay. First release :)

repository: tricinel/eslint-config-frontwerk-react

repo_name: tricinel/eslint-config-frontwerk-react


text:
# Injector++

[![Build status](https://ci.appveyor.com/api/projects/status/gd9380fs0wnnx05e?svg=true)](https://ci.appveyor.com/project/mazong1123/injectorpp)

Injector++ is a library to help you fake virtual/non-virtual methods, static methods and global functions **WITHOUT** changing existing code.

## How to use

### Prerequisites

#### Windows
- Injector++ needs to retrieve information from pdb, therefore please:
- In Visual Studio, open project property dialog, select Configuration Properties -> Linker -> Debugging, change `Generate Debug Info` to `Debug`.
- Add `dbgHelp.lib` as dependency in your test project setting.
- Project property dialog -> Linker -> General -> Enable Incremental Linking -> `No (/INCREMENTAL:NO)`.

#### Linux
In progress.

#### Mac OS
In progress.

### Mock global functions

Below example fakes `fooReturnString` by using `fakeFooReturnString`:

```cpp

std::string fooReturnString()
{
    return "FooReturnString";
}

std::string fakeFooReturnString()
{
    return "FakeFooReturnString";
}

TEST_F(FakeClassNonVirtualMethodTestFixture, FakeGlobalStringFunctionWhenCalled)
{
    // Prepare
    std::string expected = "FakeFooReturnString";
    InjectorPP::Injector injector;

    injector.whenCalled(fooReturnString)
        .willExecute(fakeFooReturnString);

    // Act
    // fakeFooReturnString will be executued!
    std::string actual = fooReturnString();

    // Assert
    EXPECT_EQ(expected, actual);
}

```

### Mock non-virtual methods

Below example fakes `BaseClassTest::getAnInteger()` by using `fakeFunc()`:

```cpp

class FakeClassNonVirtualMethodTestFixture : public ::testing::Test
{
public:
    int fakeFunc()
    {
        return 6;
    }
};

TEST_F(FakeClassNonVirtualMethodTestFixture, FakeIntFunctionWhenCalled)
{
    // Prepare
    int expected = 6;
    InjectorPP::Injector injector;

    injector.whenCalled(INJECTORPP_MEMBER_FUNCTION(BaseClassTest::getAnInteger))
        .willExecute(INJECTORPP_MEMBER_FUNCTION(FakeClassNonVirtualMethodTestFixture::fakeFunc));

    BaseClassTest b = BaseClassTest();

    // Act
    // fakeFunc will be executed!
    int actual = b.getAnInteger();

    // Assert
    EXPECT_EQ(expected, actual);
}

```

### Mock virtual methods
Injector++ supports virtual method mocking (Amazing, huh?). Below is a simple example:

```cpp

int fakeIntFuncForDerived()
{
    return 2;
}

TEST_F(FakeClassVirtualMethodTestFixture, MockDerivedClassVirtualMemberFunctionWhenCalled)
{
    // Prepare
    int expected = 2;
    BaseClassTest* derived = new SubClassTest();

    InjectorPP::Injector injector;
    injector.whenCalledVirtualMethod(derived, "getAnIntegerVirtual")
        .willExecute(fakeIntFuncForDerived);

    // Act
    // fakeIntFuncForDerived() will be exectued!
    int actual = derived->getAnIntegerVirtual();

    // Assert
    EXPECT_EQ(expected, actual);

    delete derived;
    derived = NULL;
}

```

### Mock static methods
Injector++ supports static method mocking. Below is a simple example:

```cpp

static Address fakeGetAnAddressStatic()
{
    Address addr;
    addr.setAddressLine("fakeAddressLine");
    addr.setZipCode("fakeZipCode");

    return addr;
}

TEST_F(FakeClassNonVirtualMethodTestFixture, FakeStaticFunctionReturnUserDefinedClassWhenCalled)
{
    // Prepare
    Address expected;
    expected.setAddressLine("fakeAddressLine");
    expected.setZipCode("fakeZipCode");

    InjectorPP::Injector injector;

    injector.whenCalled(INJECTORPP_STATIC_MEMBER_FUNCTION(BaseClassTest::getAnAddressStatic))
        .willExecute(INJECTORPP_MEMBER_FUNCTION(FakeClassNonVirtualMethodTestFixture::fakeGetAnAddressStatic));

    // Act
    // fakeGetAnAddressStatic will be executed!
    Address actual = BaseClassTest::getAnAddressStatic();

    // Assert
    EXPECT_EQ(expected, actual);
}

```

## Roadmap
There's a headache of C++ unit testing - No way to abstract the legacy code. As there's no reflection in C++, it is not that easy to change the behavior of non-virtual and static methods, which makes C++ unit testing extremely hard.

Injector++ intends to resolve the headache. Its goal is to make static method, non-virtual method and global functions testable without changing your production code. To accomplish this we still have to:

1. Add rich mock helper functions (e.g, return value expectation, input parameter mock, exception expectation...).
2. Add Linux support.
3. Adapt to mainstream unit test runners.

## Contribute
Welcome to help Injector++. You can submit bugs, suggestions and feature requests to the issue tracker, or send me pull request. Happy coding & testing!

### Build the source code

#### Windows

You need following prerequisites:
- cmake 2.6+
- Visual Studio 2008+ (Please create an issue if you need older MSVC support)

Run `.\build.cmd` to full build the source code as well as running tests.

Run `.\build.cmd /f` to clean the build directory and rebuild all the source code and running tests.

Run `.\build.cmd /skiptests` if you want build source code without building and running tests.

You can combine `/f` and `/skiptests`:

```sh
.\build.cmd /f /skiptests
```

After build finished, you'll find `injectorpp.sln` under `build` folder. You can use Visual Studio to edit and debug the code.

#### Linux
In progress.

#### Mac OS
In progress.

repository: Junch/injectorpp

repo_name: Junch/injectorpp


text:
To do
=====

Describe where to find the required library, PuLP

Link to my Google+ post about goals for the system

Make an interaction log with the programs, demonstrating which goals it does and doesn't fulfill.

Link to related fiction and non-fiction about alternative monetary systems.

Upload explanatory pseudocode or program structure document

In one of the session logs, I suggest not agreeing to debit all / most of someone's whuffie, as that reduces the ways that a favour can be paid back. Pick a way to measure when this is going to happen, so the parties involved can choose to avoid it if desired. Otherwise you might end up accidentally doing it in multiple small transactions, none of which individually debit most of someone's whuffie.

Maybe later
-----------

Test how many people and transactions the program can handle before getting slow.

Make the program robust against bad transactions, specifically, debits or queries about previously unmentioned people.

Make some documentation with graphs, it would be easier to read.

Add reference to maximum flow problem, https://en.wikipedia.org/wiki/Maximum_flow_problem

Allow credits to decay according to some chosen half-life.

Done
====

Allow turning off the scaling of credits, to allow for simpler examples

Upload python code for computations

repository: caspian-maclean/whuffie-credits

repo_name: caspian-maclean/whuffie-credits


text:
# Welcome to POJOs in Action

This is the source code for the book [POJOs in Action](http://manning.com/crichardson/) by [@crichardson](http://twitter.com/#!/crichardson).

In the very near future the code examples from @crichardson's [NoSQL presentations](http://www.slideshare.net/chris.e.richardson/presentations) will be added to this repo.

repository: gusdelact/pia

repo_name: gusdelact/pia


text:
# Kroshu Tools

Kroshu Tools provides scripts for managing your ROS project.

## Installation

The easiest way to install Kroshu Tools is to clone this repository and create soft links to the scripts in /usr/bin. This way updating Kroshu Tools is as easy as doing a git pull.

```sh
git clone https://github.com/kroshu/kroshu-tools.git
sudo ln -s /home/user/kroshu-tools/src/kroshu_setup/usr/bin/kroshu_setup /usr/bin/kroshu_setup
```

## Instructions

#### kroshu_setup:

The script kroshu_setup initializes your ROS package for continuous integration. It adds neccesary configuration files for Travis CI and SonarQube, installs the TestCoverage cmake module if not already installed and extends your CMakeLists with test coverage options.

Projects configured with kroshu_setup use a fork of the ros-industrial/industrial\_ci repository. The kroshu fork extends the industrial\_ci by adding SonarQube analysis with test coverage included. In order to use SonarQube, your GitHub organization needs to be set up with SonarCloud or an own SonarQube server, and the SONAR\_TOKEN environment variable needs to be set. More information about setting up SonarCloud with GitHub and Travis CI can be found [here](https://sonarcloud.io/documentation/integrations/github/).

 The script makes the following changes to your project:

 - Create .travis.yml file for configuration with Travis CI
 - Create sonar-project.properties file for configuration with SonarQube
 - Create src and test folders if they didn't already exist
 - Append the CMakeLists.txt file with test coverage option. Note: By default no files are checked for coverage. Targets have to be added in CMakeLists.txt explicitly.

Note: if you don't have the TestCoverage cmake module installed (e.g. first time use), you will need to run the script as root. This will install TestCoverage.cmake to /usr/lib/cmake/TestCoverage.

repository: kroshu/kroshu-tools

repo_name: kroshu/kroshu-tools


text:
---
layout: default
---

# 1997-09-19 - Re: sooner or later

## Header Data

From: "William H. Geiger III"<EMAIL_ADDRESS>To: "David Downey"<EMAIL_ADDRESS>Message Hash: 864176de92e558dd0f11ecadb4fb07b99931ed40c17079ae336df14d4a268fc2

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-09-19 20:22:56 UTC

Raw Date: Sat, 20 Sep 1997 04:22:56 +0800

## Raw message

```
{% raw  %}From: "William H. Geiger III"<EMAIL_ADDRESS>Date: Sat, 20 Sep 1997 04:22:56 +0800
To: "David Downey"<EMAIL_ADDRESS>Subject: Re: sooner or later
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

In<EMAIL_ADDRESS>on 09/19/97
   at 11:23 AM, "David Downey"<EMAIL_ADDRESS>said:

>>Bill Stewart wrote:
>>>At 10:45 PM 9/18/97 -0700, Wei Dai wrote:
>>>>Many of us believe that a crypto ban is inevitable. The only
>>>>question for us is whether it'll happen sooner or later. Seen in
>>>>this perspective, all that industry and civil liberties lobbies can
>>>>do is delay the ban. But is this necessarily a good thing?
>>
>>>Yes.  Later is bad, but sooner is worse.  First of all, "Soon" means
>>>"We lost already", while "Later" means "We haven't lost yet, even
>>>though it looks pretty much like we're going to lose later,...
>>

> The only way I see us losing is if we do not stand together. I do see
>that we will need to go underground ofr awhile, but when they see that
>they will always have a problem with us, they will eventually have to
>deal with us. That is unless they want to turn the US into a real life
>version of the movie Red Dawn!

Oh I wouldn't be feeling to optimistic with that. We in the
crypto/anarchist community are a very small minority. Our govenrmnet would
have no qualms at all of taking us out. A nice little Reichstag Fire to
turn popular opinion against us and then the storm troopers will be sent
out. If you are expecting some type of popular support of "us" against
"them" I think you are sorely mistaken. The majority of the sheeple would
be all to happy to turn in those evil cryptologist for their 5min of fame.

- --
- ---------------------------------------------------------------
William H. Geiger III  http://www.amaranth.com/~whgiii
Geiger Consulting    Cooking With Warp 4.0

Author of E-Secure - PGP Front End for MR/2 Ice
PGP & MR/2 the only way for secure e-mail.
OS/2 PGP 2.6.3a at: http://www.amaranth.com/~whgiii/pgpmr2.html
- ---------------------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: cp850
Comment: Registered_User_E-Secure_v1.1b1_ES000000

iQCVAwUBNCLNH49Co1n+aLhhAQFT7AP/Z7Kqwr9ovhW8i/cIItOz74Ju/RoQvJ0C
4OCdXh5+YUBECmYKTnTzIPkNzrBBOpQLy8xnaCNHItG1z1OSo1VGVeap4pye2Kpu
n54sLSWB59tnEhN1EWig9qG1aGuG/EAa+yKiG6eNnN/iJh/tk9dp6M5S4BG9n8OM
VNuT+xqI8dQ=
=/uit
-----END PGP SIGNATURE-----

{% endraw %}
```

## Thread

+ Return to [September 1997](/archive/1997/09)

+ Return to "["David Downey" <digital_matrix@hotmail.com>](/authors/david_downey_digital_matrix_at_hotmail_com_)"
+ Return to "["William H. Geiger III" <whgiii@invweb.net>](/authors/william_h_geiger_iii_whgiii_at_invweb_net_)"

+ 1997-09-19 (Sat, 20 Sep 1997 02:31:40 +0800) - [Re: sooner or later](/archive/1997/09/1f4ef4f909c9852babdf13868c12b9642df7088ca40ac62c4ce77b5554446f82) - _"David Downey"<EMAIL_ADDRESS>  + 1997-09-19 (Sat, 20 Sep 1997 04:22:56 +0800) - Re: sooner or later - _"William H. Geiger III"<EMAIL_ADDRESS>


text:
# Rekor

Rekór - Greek for “Record”

Rekor's goals are to provide an immutable tamper resistant ledger of metadata generated within a software projects supply chain.
Rekor will enable software maintainers and build systems to record signed metadata to an immutable record.
Other parties can then query said metadata to enable them to make informed decisions on trust and non-repudiation of an object's lifecycle. For more details visit the [sigstore website](https://sigstore.dev)

The Rekor project provides a restful API based server for validation and a transparency log for storage.
A CLI application is available to make and verify entries, query the transparency log for inclusion proof,
integrity verification of the transparency log or retrieval of entries by either public key or artifact.

Rekor fulfils the signature transparency role of sigstore's software signing
infrastructure. However, Rekor can be run on its own and is designed to be
extensible to working with different manifest schemas and PKI tooling.

For more details on set up a Rekor server,  [visit the following link](https://sigstore.dev/get_started/server/)

For details on CLI usage, [visit the following link](https://sigstore.dev/get_started/client/)

If you're interesting in integration with Rekor, we have an [OpenAPI swagger editor](https://sigstore.dev/swagger/)

## Public Instance

A public instance of rekor can be found at [api.sigstore.dev](https://api.sigstore.dev/api/v1/log/)

**IMPORTANT**: This instance is currently operated on a best-effort basis.
We **will take the log down** and reset it with zero notice.
We will improve the stability and publish SLOs over time.

This instance is maintained by the Rekor community.
Interested in helping operate and maintain our production CA system and Transparency Logs?
Please reach out via the [mailing list](https://groups.google.com/g/sigstore-dev).

If you have production use-cases in mind, again - please reach out over email via the [mailing list](https://groups.google.com/g/sigstore-dev).
We are interested in helping on board you!

### Auditing the Instance

We run a job to publish the latest Signed Tree Hashes on GCS.
They are served publicly, and can be found with:

```
gsutil ls gs://rekor-sth/
gs://rekor-sth/sth-1173.json
```

The format is currently:

```
$ gsutil cat gs://rekor-sth/sth-1173.json | jq .
{
  "SignedLogRoot": {
    "key_hint": "Ni+Oy6cvQyY=",
    "log_root": "AAEAAAAAAAAElSB3sp4yw0NFEWsTB6RT5mjr6GCKxVQ8Tlym+P3uKTQwuxZquNPzzd3mAAAAAAAACIUAAA==",
    "log_root_signature": "MEUCIQCb8QHWym7jBvBMFk8ir1ZTqT83zpjE0c90vi7VrTG70wIgBwQmaQ96Od62ODZkdT6r1eVsl4r14tYR1MwQbkNv8ZM="
  },
  "VerifiedLogRoot": {
    "TreeSize": 1173,
    "RootHash": "d7KeMsNDRRFrEwekU+Zo6+hgisVUPE5cpvj97ik0MLs=",
    "TimestampNanos":<PHONE_NUMBER>833709600,
    "Revision": 2181,
    "Metadata": ""
  }
}
```

We store them in both raw (unverified) and decoded (verified) formats.
You can verify the signatures against Rekor's public key.

These entries contain the tree length, tree root hash as well as the timestamp.
The (signed) timestamp and index of a (signed) tree hash may be used as an attestation that any entries in the log
prior to this index were witnessed by Rekor before this time.

## Extensibility

Rekor allows customized manifests (which term them as types), [type customization is outlined here](https://github.com/sigstore/rekor/tree/main/pkg/types).

## Contributions

We welcome contributions from anyone and are especially interested to hear from
users of Rekor.

repository: ahmetb/rekor

gha_license_id: NOASSERTION

repo_name: ahmetb/rekor


text:
# Changelog

# [4.1.0] - 2019-02-01
### Added

- In certificate attributes was added algorithm;
- Selecting signing algorithm by certificate in detached sign method;

# [4.0.1] - 2018-12-16

- Didn't changes from version `4.0.0`

# [4.0.0] - 2018-10-18
### Changed
 - Function `paramsForDetachedSignature` was renamed to `detachedSign`

# [3.0.0] - 2018-08-25
### Changed
 - Structure of library

## [2.0.0] - 2018-04-18
### Changed
 - Constant `CADESCOM_CURRENT_USER_STORE` instead `CADESCOM_CONTAINER_STORE`

## [1.3.0] - 2017-12-11
### Added
 - Method `digestValue`, which return checksum of data

## [1.2.0] - 2017-10-25
### Added
 - Search certificates in all accessible storages (#2);
 - Attribute of time of signing into the simple signature (#3);

### Fixed
 - Attribute of content encoding in the simple signature;

## [1.1.1] - 2017-10-11
### Fixed
  - Error `certificate is not defined`;
  - Readme;

## [1.1.0] - 2017-09-27
### Added
 - Changelog;
 - Method `_hexToBase64`;

### Changed
 - Readme;
 - `Valid_from_date` => `valid_from_date`: parameters of certificates list in async version;
 - `Valid_to_date` => `valid_to_date`: parameters of certificates list in async version;
 - Documentation;

### Deleted
 - Methods `_reverse` and `_hexToString`;

## [1.0.4] - 2017-09-26
### Fixed
 - Error of encoding `signature_value` to base64;

## [1.0.3] - 2017-09-20
### Changed
 - Readme;

## [1.0.2] - 2017-09-13
### Fixed
 - Bugs of detached signature;

### Changed
 - `Valid_from_date` => `valid_from_date`: parameters of certificates list;
 - `Valid_to_date` => `valid_to_date`: parameters of certificates list;

## [1.0.1] - 2017-09-07
### Added
 - Documentation;

[4.1.0]: https://github.com/VMashanov/crypto-pro-provider/compare/4.0.1...4.1.0
[4.0.1]: https://github.com/VMashanov/crypto-pro-provider/compare/4.0.0...4.0.1
[4.0.0]: https://github.com/VMashanov/crypto-pro-provider/compare/3.0.0...4.0.0
[3.0.0]: https://github.com/VMashanov/crypto-pro-provider/compare/2.0.0...3.0.0
[2.0.0]: https://github.com/VMashanov/crypto-pro-provider/compare/1.3.0...2.0.0
[1.3.0]: https://github.com/VMashanov/crypto-pro-provider/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/VMashanov/crypto-pro-provider/compare/1.1.1...1.2.0
[1.1.1]: https://github.com/VMashanov/crypto-pro-provider/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/VMashanov/crypto-pro-provider/compare/1.0.4...1.1.0
[1.0.4]: https://github.com/VMashanov/crypto-pro-provider/compare/1.0.3...1.0.4
[1.0.3]: https://github.com/VMashanov/crypto-pro-provider/compare/1.0.2...1.0.3
[1.0.2]: https://github.com/VMashanov/crypto-pro-provider/compare/1.0.1...1.0.2
[1.0.1]: https://github.com/VMashanov/crypto-pro-provider/compare/1.0.0...1.0.1

repository: VMashanov/crypto-pro-provider

repo_name: VMashanov/crypto-pro-provider


text:
# ModalDrawerLayout

!!! info
    This is the API of version 1.0.0-alpha02. Newer versions may have a different one

With a ModalDrawerLayout you can create a navigation drawer. You can define a drawer state and an onStateChange function.
You define the content of the drawer with **drawerContent** and the rest of your layout in **bodyContent**

```kotlin
@Composable
fun ModalDrawerLayoutSample() {
    val drawerState = rememberDrawerState(DrawerValue.Closed)

    ModalDrawerLayout(
            drawerState = drawerState,
            drawerContent = {
                Column {
                    Text("Text in Drawer")
                    Button(onClick = { drawerState.close() }) {
                        Text("Close Drawer")
                    }
                }
            },
            bodyContent = {
                Column {
                    Text("Text in Bodycontext")
                    Button(onClick = { drawerState.open() }) {
                        Text("Click to open")
                    }
                }
            }
    )
}
```

repository: Gurupreet/Jetpack-Compose-Playground

repo_name: Gurupreet/Jetpack-Compose-Playground


text:
Test suite
==========

Preparing the test suite
------------------------

In order to run the test:

1. Clone the repo with the --recursive flag (if not done yet).
2. Potentially create or enter a virtual environment.
3. Install test dependencies using *pip install -r tests/requirements.txt* or *conda install --file tests/requirements.txt*.

Running the test suite
----------------------

To run tests:

```shell
make tests
```

To have coverage information:

```shell
make cover
```

To have information of visit lines in HTML files in `htmlcov` folder:

```shell
make coverhtml
```

To run in multiple CPUs (e.g: for 4 CPUs):

```shell
make command NUM_PROC=4
```

where `command` is any of above.

You can also run the test using `pytest`:

```shell
python -m pytest test/
```

for running individual test, filtering warnings or some other configurations check [pytest documentation](https://docs.pytest.org).

repository: SDXorg/pysd

repo_name: SDXorg/pysd