text:
# jBASE FUNDAMENTALS

**Created At:** 4/27/2017 7:40:13 PM
**Updated At:** 8/28/2018 6:34:35 AM
**Original Doc:** [jbase-fundamentals](https://docs.jbase.com/30301-jbase/jbase-fundamentals)
**Original ID:** 253219
**Internal:** Yes

# Prerequisites

To get the most out of this document, it is recommended that the user has an installed licenced copy of jBASE. A basic understanding of jBASE terminology will be an advantage.

#

# Document Scope

This document will cover  fundamentals of jBASE software. The following will be covered:

- Our Roots (/)
- MultiValue data structure
- Files
- This MD/VOC/SYSTEM thing
- Understanding jql
- Understanding dictionaries
- jcl procedure language
- jbc

#

# ROOTS (/)

jBASE may feel strange as a lot of things may not be intuitive to programmers that uses non multivalue platforms. It should be noted that jBASE has its roots in the MultiValue (MV) data base environment and tries to maintain backward compatibility to those legacy systems.

##

## Just What Are These /s

The first step was the GIRLS(General Information Retrieval Language System). This lead to what today is known as jql.

Initially, a database was built into the OS, and only procedure language was used. BASIC was added later. This was the PICK system. PICK licensed their OS to many companies. Eventually the database was supported by other OS's. jBASE was born out of this.

jBASE's Data Base structure and enhanced BASIC programming language made application development quick and easy. Applications developed on jBASE tend to be feature rich.

## Ports

The emphasis on port number is a result of intellectually challenged terminals in the old days being connected to the main computer (servers) via a serial connector in a star network. Each serial connection was a port with a specific number.

Port 0 was usually the system console, but could also be used for application purposes. As an example, If a 12 port license was purchased,a total number of 12 serial connections on the back of your computer (0-11) were available for use. Application programmers wrote their own security based on port number since each user always had their own port.

- Today, the Port Number concept has been preserved even though  tty port changes each time a connection is established. Each jBASE user is assigned a unique port number.

###

## Config\_EMULATE

The Config\_EMULATE file in the configuration directory of jBASE defines emulation settings. JBCEMULATE defines configuration label as well as which label to start from. A label can be anything you want

- Universe
- R83
- Lee

Standard emulation settings are provided at installation. The emulation settings are user definable, meaning settings from another emulation can be migrated or added to the current installation. Some settings are compiled into executables, others are interpreted at run-time.

This file also defines backward compatibility to legacy functionality, even though not all legacy systems performed the same function the same way.

If needed, cursor positioning @(-# ) can be defined here. Also, emulation specific functionality such as;

- named\_common = unassigned
- invert\_F\_correl = true
- openseq\_creates = true
- returning\_am\_delimited = true
- tconv\_no\_replace=true,

can be defined here. These definitions are set prior to compiling and testing, then documented in Config\_EMULATE.txt.

# MultiValue Data Structure

In this data structure, more than one piece of information is stored in a column (field, attribute), separated by a database maintained delimiter (ASCII 253). This data structure has been described as a cube, since it have depth. Others have referred to it as a rock, as all dimensions (columns, rows, and values) can be of variable length.

##

## **MultiValues**

Other more familiar terms that refer to multivalues include :

- Nested Tables
- Chaptered Row Sets – ADO
- Data Shaping – SQL
- Hierarchical Data Grid – VB Control
- Non First Normal Form – University studies

## **MultiValue Structure**

The structure of multivalued data is where one field has multiple pieces of information in it. Each piece of information in a multi valued field is separated by a special delimiter known as a Value Mark (CHAR(253)). Since all fields are variable length, you can have as many, or as few, multi values in a field as you require.

### **MultiValue Uses**

Examples of some typical uses of multi values include:

**1. Multi-Line Address**

Each line of an address can be another value. A multi value field can be used to store various lines of an address. For example:

- Value 1 – street address
- Value 2 – floor
- Value 1 – street address
- Value 2 – postal box number

**2. 12 Month Accumulator**

If a multivalue field is set up with 12 values, they can be used for monthly accumulators.

Considering the above example, 5 months worth of sales for a client would be as:

- Month 1 - $1,200
- Month 2 - $500
- Month 3 – 0
- Month 4 - $150.50
- Month 5 – $2,340

With this structure, it is easy to determine sales for a quarter (1st qtr - $1,700), year-to-date sales ($4,190.50), year-to-date as of any month (YTD through month 4 - $1,850.50).

**3. Invoice Summary**

A group of multi value fields can maintain invoice summary information in a client row, or line item information in an invoice row.

If there are four associated fields in the table; invoice number, invoice date, invoice amount and amount received. Then the invoice number is a direct reference to the complete invoice detail row in the invoice table (invoice primary key). Using the invoice date, it is possible to get an aged accounts receivable report (for this client only or for all clients) just by looking at this client row, without examining any of the detail invoice rows. By subtracting the amount received from the invoice amount, the amount due is established.

# **FILES**

#### **CREATE-FILE command**

The CREATE-FILE command enables the user to create a new file for use within the  jBASE system.

```
CREATE-FILE
    {-L}
    {DICT | DATA} <<FileName>> {,Section}
    {TYPE=tname} {HASHMETHOD=nnn} {PERM=nnn} {CASE=YES|NO}
    {LOG=YES|NO} {TRANS=YES|NO} {BACKUP=YES|NO} SECURE=YES|NO} {NETWORK=YES|NO} {ENCRYPTED=YES|NO} {ALGORITHM=name} {KEY=user value}
    {NumBuckets, BucketMult, SecSize} {NumBuckets, BucketMult, SecSize}
```

## Typical File Creation

The create file command in the jShell as below, will create a data file  called 'CUSTOMER' and its dictionary (CUSTOMER]D) . The data file will have a modulo (hash buckets) of 1, and the dictionary a modulo of 3.

```
CREATE-FILE CUSTOMER 1 3
```

Files can take the form of Hash or directory type files. Other types are:

- Remote - accessed via jRFS
- Use Q and R pointers
- Different hash methods
- j3, j4, jplus file types
- Log files
- Large files
- Distributed files

A new JEDI will have to be written to interface to other data structures such as other database management systems for instance.

**1. Hash Files**

With this file type, primary file space is defined by a set number of groups i.e buckets and modulo. Data records are placed into a group based on a “hashing algorithm” that uses the unique record ID. The record ID always hashes into the same group. Listing a file will show hash order.

All data records ares stored in one OS file (one inode)

It is strongly recommended that only jBASE utilities be used to access and maintain hash files, as OS commands see only one line of data.

A static hashed file is determined by three parameters:

1. **Type**: This Parameter denotes the type of file. The default is J4 (block size = 4096). J3 (block size = 1024).
2. **Modulo**: An prime integer defining the number of groups in the file.
3. **Separation**: An integer specifying the number of group buffer blocks.
4. **Multiplier**: An integer specifying block size multiplier. The maximum size permitted for a hashed file is 2Gb.

The current default type (meaning that you do not specify a type when the file is created) is J4. This creates a file that uses 4k as its block size for grouping records.

- The modulo determines the number of groups for the file. While it is a file sizing parameter, it is not an upper file size limit, only an efficiency parameter.
- The separation expands the primary space.
- The multiplier is another method of expanding primary space.

Ordinarily, a hashed file cannot exceed 2Gb. However, there are two ways to exceed this limit (large files and distributed files).

**Hashed Types**

There are 4 hashing algorithms available. The default is number 4 for J4 files.

1. Uses a base 16 hash key with the last 8 char of ID
2. Uses a base 16 hash key with all char of ID
3. Uses a base 10 hash key with all char of ID
4. Uses a base 10 hash key with the last 8 char of ID

The hashing algorithms are just different ways of determining which group a record is stored in.

**Hashing Algorithms**

Using different hashing algorithms, the same ID can be placed in a different group. The order you see the records is called Hash Order. When you LIST a file, you see it in this order. Hash Order is for the convenience of the data base, not the user. As a result, jBASE allows you to sort on any dictionary item for the file, even the calculated ones.

### Overflow

Is a measure of how much a file has outgrown its original specifications.

**Factors Contributing To Overflow**

Different file types have different buffer sizes. Assuming that the record size remains the same, more records can fit into one J4 buffer than into one J3 buffer. If not enough groups are created, each one can get over loaded quicker.

Correct file sizing is not automatic but involves the deliberate effort of the developer.

###

#### Effect of overflow

To illustrate, imagine a file where group one has one overflow buffer whilst group two has two overflow buffers. When a record is to be written to group two, the processing now has to go through each of the three buffers following the pointers until it finds the space to write the record. When a record is to be read in group two, the processing may have to look through the three buffers in turn until the record is located. Thus it can be noted from the example that the presence of many overflow groups will slow down processing.

**Bucket Information**

- NumBuckets - modulo
- BucketMult - bucket size multiplier, 512 for j1, 4096 for j2 and j4, 1024 for j3
- SecSize – separation

## Sizing & Resizing of Files

Correct Modulo must be determined prior to file creation. After file creation, many files in the application may need attention from time to time, to check and change the record distribution by resizing the file. The following may be used:

- jstat
- jrf
- jchmod/jbackup/jrestore

### **What Modulo to use**

Some assumptions need to be made to approximate correct modulo prior to file creation. The parameters in brackets are intended to illustrate and hence aid understanding of the idea.

1. What is the block size of the file type? (100,000 records to be in the file).
2. How many records do you expect to be in the file? (Each record contains about 1,000 char).
3. What is is average number of characters in each record? (J4 file with a block size of 4096 char.)

Multiplying the number of records by the average record size, then dividing the product by the block size gives a rough figure that can be used for the modulo. Considering the parameters in brackets above the modulo would be as:

![jbase-fundamentals: modulo](./modulo.jpg)

It should be noted however that this method is only a rule of thumb, and can not to be considered the absolute optimum modulo. File growth and/or shrinkage must also be accounted for. If for instance the file being created is a monthly transaction file, it most likely is empty at the beginning of the month and full at the end of the month. This type of file is particularly difficult to size properly since the actual amount of space needed is a moving target.

Determining modulo is thus an art form and not an exact science.

### **Determine Separation**

Most of the time, separation is not needed. However, if the average size of a record exceeds the size of the block, or if there is a lot of wasted space in a block, separation may help optimize file size and record distribution.

Use separation when the average record size exceeds one block and/or there is a lot of wasted space in a block.

### **File Performance**

Improperly sized files may slow down processing as too many buckets results in empty buckets that have to be checked during jql. On the other hand, too few buckets results in overflow causing excessive disk head movement.

Take for instance a file that originally has a block size of 512 bytes. If Separation and Multiplier will allow additional disk blocks to be put into a bucket, overflow will physically add to end of file but logically add to end of bucket. Physical disk thrashing as well as logical hash thrashing may result.

Many files in an application will need proper attention from time to time. The following can check and change the record distribution by resizing the file:

**1**. **jstat**

This command returns information about hash files in the application. It's use is as follows;

```
  jstat –options filename
```

with 'options' taking the form of:

- **-f** free space display
- **-r** record display. A histogram of record distribution.
- **-s** short summary display
- **-v** verbose display
- **-w** do not wait on locked records

This command can take some time to finish execution.

If the command below is executed;

```
jstat FileName
```

Some useful information is obtained, including:

- File Type,
- Hash Method,
- Modulo,
- Frame Size,
- Avg. Char/Group,

of the file being considered.

if the command below is executed:

```
jstat –r FileName
```

- The –r option provides a distribution histogram. This shows how much space has been allocated for each group, how much space is actually in use and how many records are in each group.
- The groups that are going into overflow, or are already in overflow can be noticed.

If the command bellow is executed,

```
 jstat –rv FileName
```

it can be noted that adding the '**v**' option to the previous command shows each record ID that is in each group. This way, the actual hashing distribution can be seen.

**2****. jrf**

```
jrf {-options} {filename {,...} }
```

Where options can be:

        -H3 Force to HASH3 file type
        -H4 Force to HASH4 file type
        -H5 Force to HASHP (Plus) file type
        -H6 Force to HASHR (Resilient) file type
        -B  Keep original bucket/frame size
        -C  Change restore specification
        -D  Allow downsize of file
        -E  Resize empty files
        -I  Ignore empty files
        -Mn Override default Hash Method, set to method n
        -P  Take account of physical file size
        -R  Reporting only (do not actually resize)
        -V  Verbose mode
        -V1 Very verbose mode
        -Sm{,s{,i}} Size to parameters
            m - modulo, s - separation, i - ingroupmaxsz
        -L Log updates during resize of file

This is a file resize utility that should only be used when the file is **not**in use. It first creates a temporary file, copies data from the original file to the temporary file, deletes the original file, then the original file name is assigned to the temporary file.

It can also be used to change hash type, downsize a file or obtain a suggested new size.

If the command is executed ,

```
jrf –R FileName
```

The '**-R**' option will obtain a suggested new size, and then the '**-S**' option can then be used to actually resize the file.

**3. Resize during jrestore**

jBASE allows resizing a file during a restore. When a jbackup of a file is made, it is possible to include resize information. The resize information is set with the '**jchmod**' command. During jrestore, the file is restored with the new size.

**jcheck-**Can check file integrity and offer some repair. The command can be used as follows;

```
jcheck -options FileName
```

Where Options can be :
                g       Group Info
                h       Help
                i       InGroup Info
                k       Keep bad ids on salvage
                l       Lock the file
                o       OutGroup Info
                r       Record Info
                s       Salvage Info
                v       Verbose
                Bn      Begin group number
                D       Salvage to directory
                En      End group number
                F       Freespace Info
                G       Group reset if in error
                Ln      Limit maximum group jmalloc to 'n' MB, default 1MB
                M       Move salvaged file back to original
                O       Offsets Info
                P       Pause after group
                R       Redirect stderr to stdout
                S       Salvage file creates SLVG\_ prefixed copies of file

E.g.    jcheck -v HashFile      OR      find . -type f -print | jcheck -v

Users should not be using files being repaired.

##

## Directory Files

Data records are stored as files in the directory. OS utilities may be used to access and maintain rows (records) in a directory file. jBASE programs can work with directory files as if they are hash files (OPEN, READ) or as an OS file (OPENSEQ, READSEQ).

Directory files can be used to pass data from a jBASE application to a non-jBASE application. If for instance a Samba drive were to be set up and written to using a jBASE utility/program, Windows can read from it.

# MD/VOC/SYSTEM

## Accounts

An account is a collection of data files, program files, executable files and subroutine files. In legacy MV systems all these were referenced by a master file for the account or stored under one directory for the account. In jBASE however, these are referenced by environment variables.

Account locations were defined in the SYSTEM file. jBASE references the SYSTEM file, if used, with the environment variable JEDIFILENAME\_SYSTEM

Previously, the master file for referencing an account’s contents was the Master Dictionary (MD) or VOCabulary. jBASE references this master file, if used, with the environment variable JEDIFILENAME\_MD

Data files for an account are typically stored in a directory. It is recommended that developers:

- Consider putting all program files in a separate directory,
- Consider putting application-wide files (bin, lib, SYSTEM) in a global directory.

The MD and SYSTEM files are needed for Q pointers, F pointers and remote pointers, but jBASE can open any file the user can path to. MD files are also needed for PROCS and PARAGRAPHS (jcl).

Each account can be referenced in the SYSTEM file

### **File and Account Pointers**

**In the MD/VOC**

Q pointers

```
001 Q
002 Account Name
003 File Name
```

F Pointers

```
001 F
002 Data Path
003 Dictionary Path
```

**In SYSTEM**

- ID - Account Name

```
001 D
002 Account path
```

### **User Directories**

User directories that may exist on any installation could include the following:

- Directories for data files
- Home directory for each user or group of users
- Directories for program source code
- Directories for saved lists
- Directory for spooler files
- Directories for cataloged user programs (bin)
- Directories for user subroutines and functions (lib)

### The Optional MD

MD or VOC references files and commands. jBASE uses environment variables to define search paths.

- PATH - references programs
- JBCOBJECTLIST - references subroutines
- JEDIFILEPATH - references files

MD or VOC is needed for Q and F pointers, PROCS and PARAGRAPHS.

If used, ensure JEDIFILENAME\_MD and JEDIFILENAME\_SYSTEM are set.

### LOGTO

Is used to switch between different user accounts. LOGTO changes the environment from one account to another. The general use is as:

- LOGTO account name

Where 'account name' is the user account to be switched to. The environment variable JEDIFILENAME\_SYSTEM will need to be set.

On Unix systems, LOGTO will switch account to the user name found in /etc/passwd by performing an ‘su’ command, thus executing the user's profile and changes to the user's home directory.

# Understanding JQL

JQL is a query language used by jBASE. It takes the form of dictionary items used for selecting and sorting rows, and for displaying columns. The output by default uses sequential ID's in the dictionary of:

- Specified file or USING file
- JBCDEFDICTS
- JEDIFILENAME\_MD
- Universe, Unidata and Prime emulations uses the @ phrase

This query language is capable of calculating column totals, averages, and percentages with the appropriate modifiers applied. Further, modifiers if correctly applied can alter the way a dictionary is used.

## JQL or SQL

Some differences exist between JQL and SQL. They can be summarized as follows:

| <!----> | <!----> |
| --- | --- |
| **JQL**<br> | **SQL**<br> |
| Dictionary calculations<br> | Command line calculations<br> |
| Many dictionaries per field<br> | One dictionary per field<br> |
| End-user tool<br> | Developer tool<br> |
| Retrieval only<br> | Retrieval/update<br> |
| Simple syntax<br> | Difficult syntax<br> |

## Parts of a JQL Sentence

There are 5 parts to a JQL sentence.

1. The command – the action to be taken.
2. The file name – the data file upon which the action is taken.
3. Selection criteria – reduces the number of records in the query.
4. Sort criteria – puts resulting records in user defined order.
5. Output specifications – fields to display and additional formatting instructions.

### **Finding A File**

The MD is searched first if JEDIFILENAME\_MD is set, then JEDIFILEPATH is searched.

### **Selection Criteria**

- The 'WITH' or 'WITHOUT' modifies the dictionary to be used as selection criteria.
- Relational operators are used to compare query value to data base contents. The following may be used:   '=', ' #', '<', '>', '<=', '>='.
- 'AND' and 'OR' are used when multiple selection criteria are required.
- '[', ']', '[]' may be used for sub-string extraction. The '**LIKE**' can also be used.

Some examples of selection criteria are as follows:

```
LIST CUSTOMER WITH CUS.NAME = “A]” CUS.NAME
```

```
LIST CUSTOMER WITH CUS.NAME LIKE “A…” CUS.NAME
SORT ORDER WITH ORD.DATE GE “10/01/96” AND LT “11/01/96” ORD.DATE
```

## **Sort Criteria**

Different key terms will sort search results differently as can be noted bellow:

1. BY - ascending
2. BY-DSND / BY.DSND - descending
3. BY-EXP / BY.EXP - explode a multivalue field, ascending\*
4. BY-EXP-DSND / BY.EXP.DSND - explode a multivalue field, descending\*
\* Exploded sorts treat each multivalue as a separate column (field).

It is possible to have multiple sort levels, with each subsequent level a sub sort of the previous level. With regards sort justification, it is based on the dictionary (Yes, you can sort numbers left justified).

Examples of Sort Criteria are as follows:

```
SORT ORDER BY ORD.DATE ORD.DATE
```

```
SORT ORDER BY-DSND ORD.DATE ORD.DATE
```

```
SORT ORDER BY ORD.DATE WITH ORD.DATE GE “10/01/96” AND LT 11/01/96” ORD.DATE
```

```
SORT CUSTOMER BY-EXP ORDERS ORDERS ORD.AMT ORD.DATE CUS.NAME
```

##

## **Output Specifications**

Any field name without a modifier is displayed

TOTAL, AVERAGE, PERCENT

GRAND-TOTAL

BREAK-ON

HEADING, FOOTING

DET-SUPP

```
Examples of Output Specifications are as follows:
SORT ORDER BY CUS.NAME BY ORD.DATE WITH ORD.DATE GE “10/01/96” AND LT “11/01/96” AND WITH ORD.AMT GE “500” BREAK-ON CUS.NAME “Total For ‘VUD’” ORD.DATE TOTAL ORD.AMT AVERAGE ORD.AMT HEADING “October 1996 Orders Over $500 By Customer’CL’”
```

```
SORT ORDER BY CUS.NAME WITH ORD.AMT GE “500” BREAK-ON CUS.NAME TOTAL ORD.AMT AVERAGE ORD.AMT DET-SUPP ID-SUPP
```

#

# Dictionaries

## Types of Dictionaries

**Type A or S**: Legacy style 10 line dictionary. Data descriptor or calculated. From the days when the data base was the OS.

**Type D** : Legacy style 5 line data descriptor. Actually it’s 7 lines, but jBASE is missing two of them, and therefore are not as functional as the legacy.

- This is to be corrected in some 4.x release.
- This type was popular when the database was implemented on another OS.

**Type I:**Legacy style 5 line calculated column. Actually it’s 7 lines, but jBASE is missing two of them, and therefore are not as functional as the legacy.

- To be corrected in some 4.x release.
- When the data base was implemented on another OS.

**Type M or PH**: macro or phrase, 2 lines.

- Shorthand

**Macros and Phrases**

Are file dictionary items that contain frequently used portions of a jQL sentence.

```
001+  M or PH (macro or phrase)
002+  jQL sentence parts or comments
```

For example, if a macro named 'MYMACRO' has been created containing 'M' and 'CUS.NAME CUS.ADDR CUS.STATE' on line 1 and 2 respectively, executing the 'JED DICT CUSTOMER MYMACRO' command will bring in the editor something that resembles the text below;

```
001+  M
002+  CUS.NAME CUS.ADDR CUS.STATE
```

Thus issuing a query such as: 'LIST CUSTOMER MYMACRO' will automatically include the above listed portions of JQL.

## Dictionaries

1. I Types

```
001 I
002 Formula
003 Conversion code
004 Column heading
005 Format
```

2. D Types

```
001 D
002 Attribute #
003 Conversion code
004 Column heading
005 Format
```

3. 10 line structure

```
001 A
002 Attribute #
003 Column heading
004-006 Blank
007 Conversion codes
008 Correlative codes
009 Justification
010 Column width
```

##

## Dictionary Processing

### ![jbase-fundamentals: dictionary_processing](./dictionary_processing.jpg)

Most Common Conversion Codes

These go on lines 3 (of an I or D type), or 7 and 8 (of an A type); and are also used with the ICONV, OCONV, and FMT jbc functions

- D – date
- MD or MR – decimal
- MT – time
- G – group extraction
- T – text extraction
- Tfile – table lookup
- There are more!

### Date Conversions

With jBASE, the internal value is the number of days from December 31, 1967. So if the internal value for date happens to be 10000,

- D - 18 MAY 1995
- D2/ - 05/18/95
- D4\* - 05\*18\*1995
- DW - 4
- DWA - THURSDAY
- DM - 5
- DMA - MAY
- DY - 1995
- DJ - 138
- DQ – 2

### Decimal Conversions

If for instance the Internal value for a value is 100000,

- MD2 or MR2 - 1000.00
- MD2, or MR2, - 1,000.00
- MD2,$ or MR2,$ - $1,000.00
- MD4 or MR4 - 10.0000
- MD24 or MR24 - 10.00

MR conversion has additional formatting capabilities

###

### Time Conversions

With jBASE, the internal value is the number of seconds from midnight. So if for instance the internal value is 55555

- MT - 15:25
- MTS - 15:25:55
- MTH - 03:25PM
- MTHS - 03:25:55PM

###

### Group Extraction

This feature allows for the extraction of data based on a delimiter. If for instance the Internal format is 123\*456\*789, then it will follow that:

- G\*1 - 123
- G1\*1 - 456
- G2\*1 - 789
- G1\*2 - 456\*789

On line 2 of an I type

- FIELD(CUS.NAME,’ ‘,1,2) - returns the first two words of the field CUS.NAME

###

### Text Extraction

Allows for extracting data based on character position. If for instance an internal value of '123456789'

- T1,3 - 123
- T5,2 - 56
- T1 - 1 if left justified, 9 if right justified

Use in a query on line 2 of an I type:

- CUS.NAME[“1”,”3”] - 123
- CUS.NAME[“-5”,”-2”] – 5678

## Table Lookup Example

- Country code stored in field 12 of a CUSTOMER table
- Country names stored in field 1 of the COUNTRY table with country code as the primary key
- In the dictionary of the CUSTOMER table
- Field 2 references the field containing the lookup date (12)
- TCOUNTRY;X;;1
- On line 2 of an I type
- TRANS(COUNTRY,COUNTRY.CODE,COUNTRY.NAME,”X”)

## I Types

Field 2 contains the formula which can be made up of:

- Dictionary names
- @Variables - @RECORD, @ID, @VM, @DATE
- jBC functions – TRANS, FIELD, COUNT, etc
- User subroutines – first argument is the return value
- jBASE supplies subroutines for multivalues
- IF … THEN … ELSE
- Multiple expressions separated by a semi colon (;)

## JBCUserConversions

Are user developed subroutines that perform user defined conversions. They take 5 arguments, that is :

- result - return value.
- source - original value.
- code - actual conversion code.
- type - 0 = ICONV, 1 = OCONV, -1 = FMT. FMT is used for dictionary conversions (line 7 or 3), the FMT function, and ‘CRT variable format’.
- error - non-zero enters debugger.

A standard conversion subroutine code cannot be used for custom subroutine code.

## Custom Date Conversion

```
SUBROUTINE JBCUserConversions(result, source, code, type, error)
error = 0
BEGIN CASE
  CASE code = “JCAL”
   * Day of Week: Month Day, Year
      DOW = OCONV(source,”DWA”)
      MONTH = OCONV(source,”DMA”)
      DAY = OCONV(source,”DD”)
      YEAR = OCONV(source,”DY”)
      result = type:” “:DOW:”: “:MONTH:” “:DAY:”, “:YEAR
  CASE 1
    result = “”
END CASE
RETURN
END
```

## Using JBCUserConversions

A-type

```
JED DICT ORDER MYDATE
001 A
002 3
003 MY DATE
007 JCAL
009 L
010 35
LIST ORDER ORD.DATE MYDATE
```

D- type

```
JED DICT ORDER MYDATE
001 D
002 3
004 MY DATE
005 35L
LIST ORDER ORD.DATE MYDATE
```

I- type

```
JED DICT ORDER MYDATE
001 I
002 OCONV(ORD.DATE,”JCAL”)
003
004 MY DATE
005 35L
LIST ORDER ORD.DATE MYDATE
```

#

# JCL

This is the jBASE procedure language. It is made up of Procedures (Procs)  and Paragraphs.  Procs work with input and output buffers, with PQ or PQN going on line 1. PQN includes file buffers and select registers.

Paragraphs on the other hand are like DOS batch files, with PA or PR going on line 1. Procs and Paragraphs are interpreted at run-time. The MD is required to run Procs and Paragraphs.  JEDIFILENAME\_MD is needed.

## Procs

Procedures can call internal and external subroutines. The commands must be at the very beginning of a line. Procs support conditional expressions, can pass data to a JBC program and return data from it (PROCREAD, PROCWRITE).

### Proc Example

```
PQ
T C
S1
OEnter Customer Last Name+
IP:
HSELECT CUST WITH LNAME =
A”1
STON
HSAVE-LIST CUST.LNAME
P
HGET-LIST CUST.LNAME
STON
HSORT CUST BY CSZ FULL.NAME ADDRESS CSZ
P
HDELETE-LIST CUST.LNAME
P
```

## Paragraphs

Paragraphs are particularly useful because they allow branching. Like Procs, they support conditional expressions and can pass data to a jbc program(DATA, INPUT). In addition, in-line prompting is supported.

Each line of a paragraph is a separate command as if entered from the command line. Multiple lines can be combined into a single command when each line is terminated with a ‘\’.

###

### Paragraph Example

```
PA
SELECT CUST WITH LNAME = <<A,Enter Customer Last Name,0X>>
SAVE-LIST CUST.LNAME
GET-LIST CUST.LNAME
SORT CUST BY CSZ FULL.NAME ADDRESS CSZ
DELETE-LIST CUST.LNAME
```

# jBC

jBC is jBASE' version of MultiValue Basic. At compile time, the compiler produces optimized ‘C’ code for the platform in use.

Cataloging links a program with jBASE and OS libraries to produce an executable in the JBCDEV\_BIN directory. Subroutines and functions become shared objects in the JBCDEV\_LIB directory. A two step run-time creation process is followed:

- Compile program - BASIC command. Source code optimized for 'C'
- Catalog program - CATALOG command. Uses the referenced ‘C’ Compiler (PATH, LIB, INCLUDE) to produce a binary executable (programs) or shared object (subroutines and functions)

All programs ***must*** be cataloged.

## RUN Unnecessary

Since all programs are cataloged (are executable referenced via PATH), the RUN verb is no longer needed, but is supported.

It should be noted that:

- All programs, subroutines and functions must be cataloged, with all programs being placed in the JBCDEV\_BIN directory, and all subroutines and functions in the JBCDEV\_LIB directory. PATH and JBCOBJECTLIST should include the same directory as JBCDEV\_BIN and JBCDEV\_LIB
- It is strongly recommended that programs from different files with the same name not be cataloged into the same *bin* or *lib*directory. This is because they tend to overwrite with the last one cataloged being returned.
- Compiler errors are more ‘C’ than legacy MultiValue related.

## Subroutines and Functions

Multiple subroutines and functions can exist in each shared object. The jLibDefinition config file in the JBCDEV\_LIB directory defines size and name of shared objects. The order in which originally cataloged defines order in shared object. As such, it is recommended that the most frequently used, and most stable, subroutines be cataloged first.

##

### jLibDefinition File

This is a configuration file defining the naming and sizing of jBC developed shared objects (subroutines and functions). some contents of the file worth noting are:

- libname - shared object name in literal text containing:
    - %a - account name (JBCLOGNAME)
    - %n - sequence number starting with 0
    - %f - source file name
- exportname - cross reference .def or .el file,
- objectdir - shared object directory,
- maxsize - of each shared object,
- baseaddress - prevents shared object from becoming private (Windows).

###

## Directing CATALOG

A way to tell jBASE what *bin* and *lib* to use is to use the CATALOG command as follows:

```
CATALOG -obinpath -Llibpath
```

Where:

- -o specifies directory for executables,
- -L specifies directory for shared objects.

## jBC and jbuildslib Commands

Using jBC to better organize shared objects by placing subroutines and functions into a specified shared object, gives more control of which bin and lib to use.

Subroutines must have a .b extension

```
jbc -c sub1.b sub2.b
```

creates the .obj (Windows) or .o (Unix) objects

```
jbuildslib -o subs.dll
sub1.obj
sub2.obj
```

creates [subs.def](subs.def) and [subs.dll](subs.dll) (Windows)

```
jbuildslib –o subs.so sub1.o sub2.o
```

creates [subs.el](subs.el) and [subs.so](subs.so) (Unix)

## Workshop

Try out the following, and see if the results make sense

| <!----> | <!----> |
| --- | --- |
| <br>```<br>A = 1<br>CRT ++A<br>CRT A<br>END<br>```<br><br><br> | <br>```<br>A = 1<br>CRT A++<br>CRT A<br>END<br>```<br> | <br>```<br>A = “YOUR NAME”<br>CRT A[1,5]<br>CRT A[-1,1]<br>CRT A[-5,2]<br>CRT A[-5,-2]<br>```<br><br><br> |

##

## @

This function positions the cursor for printing. It takes the general form:

```
@(col{, row})
```

Where:

- col specifies column value on the screen,
- row specifies row value on the screen.

An example of everyday use is as:

```
CRT @(1,1):’Hello there’:
```

Minus numbers are used for special printing, and can be emulation specific. Examples include:

- @(-1) - clear screen
- @(-3) - clear to end of screen
- @(-4) - clear to end of line
- @(-5) - blink on
- @(-6) - blink off
- @(-15) - underline on
- @(-16) - underline off

## Arrays

Arrays are primarily used to map a data base record. The first array element is field one of a record. The first array element position is one, and not zero. There are two types of arrays

- Dynamic arrays and,
- Dimensioned arrays.

###

### 1. Dynamic Arrays

In a dynamic array, every variable is an array whose length is not fixed. Every dynamic array is one variable, with a variable number of elements. The elements referenced with < > as follows:

- array<1> is field one,
- array<2,3> is the third multivalue of field two,
- array<5,2,1> is the first subvalue of the second multivalue of field five.

###

### 2. Dimensioned Arrays

These arrays must be dimensioned first, as:

- DIM ARRAY(50)

The above determines the number of elements, with each element being a separate variable. Each element is in turn a dynamic array. Elements are referenced with ( ) as:

- array(1) is field one,
- array(2)<1,3> is the third multivalue of field two,
- array(5)<1,2,1> is the first subvalue of multivalue two of field five.

###

## Resizing Arrays

First set resize\_array=true in Config\_EMULATE, then use

- DIM MYARRAY(X),
- Where X is an integer.

The DIM statement may be used more than once for the same array to resize it according to program needs.

## Use of OPEN, READ, and WRITE

- OPEN - opens a data file to a file handle for use in a program

```
OPEN ‘CUST’ TO CUST ELSE STOP
```

- READ - reads data from an opened file into an array

```
READ ARRAY FROM CUST,ID THEN . . .
```

```
MATREAD DIMARRAY FROM CUST,ID THEN …
```

- WRITE - writes an array to an opened file

```
WRITE ARRAY ON CUST,ID
```

```
MATWRITE DIMARRAY ON CUST,ID
```

#### Workshop

Write a program to open the CUSTOMER file, read a record and display its contents

```
OPEN “CUSTOMER” TO CUST ELSE STOP
READ CUST.REC FROM CUST,12345 THEN
  CRT @(-1)
  CRT @(5,3):”CUST NUMBER 12345”
  CRT @(5,5):”CUST NAME: “:CUST.REC<1>
  CRT @(5,7):”CUST ADDR: “:CUST.REC<2>
  CRT @(5,9):”CUST STATE: “:CUST.REC<5>
END ELSE
  CRT “CUSTOMER 12345 NOT FOUND!”
END
```

## ICONV and OCONV

ICONV is a function that converts data from an external format ,  to its equivalent internal format. In use it may take the form below:

```
IDATE = ICONV(value,conv),
```

Where:

- value - data to be converted,
- conv - conversion code.

OCONV is a function that converts data to its external format, from the internal format. In use, it may take the form below:

```
ODATE = OCONV(value,conv)
```

Where :

- value - data to be converted,
- conv - conversion code.

These functions prove useful in instances that require input validation. An example is highlighted below:

```
INPUT DT
IDT = ICONV(DT,”D”)
IF IDT = “” THEN
  CRT “INVALID DATE!”
END ELSE
  CRT “DATE IS OK!”
END
```

#### Workshop

Modify the previous program to display all dates and dollars amounts in their external format

```
OPEN “CUSTOMER” TO CUST ELSE STOP
READ CUST.REC FROM CUST,12345 THEN
  CRT @(-1)
  CRT @(5,3):”CUST NUMBER 12345”
  CRT @(5,5):”CUST NAME: “:CUST.REC<1>
  CRT @(5,7):”CUST ADDR: “:CUST.REC<2>
  CRT @(5,9):”CUST DATE: “:OCONV(CUST.REC<3>,”D4/”)
END ELSE
  CRT “CUSTOMER 12345 NOT FOUND!”
END
```

#### Workshop

Write a program to tell you if an entered date is valid. The same idea can be used to write a program to tell you if an entered dollar amount is valid

```
INPUT DT
IDT = ICONV(DT,”D”)
IF IDT = “” THEN
  CRT “INVALID DATE!”
END ELSE
  CRT “DATE IS OK!”
END
```

## CASE STATEMENTS

The case statement is an alternative to the nested "IF . . . THEN . . . ELSE". The same logic is employed, but case statements are more readable. The statement takes the form:

```
BEGIN CASE
CASE first condition
Statements
CASE second condition
Statements
CASE 1
Statements to be executed if all else fails
END CASE
```

## LOCATE

The LOCATE statement is used to find which multivalue contains the information being sought.

- INS, DEL and dynamic array references maintain and retrieve information from the array.

An example of the use of locate is as:

```
LOCATE search IN array BY order SETTING pos THEN . . . ELSE . . .
```

Where:

- search - the string to be located,
- array - the dynamic array to be searched,
- order - AL (default), AR, DL, or DR,
- pos - location where *search* is found in *array* or where it should be inserted if not found.

In everyday use, would look as follows:

```
LOCATE invnbr IN invlst BY ‘AR’ SETTING pos THEN . . . ELSE . . .
```

## use of INS, INSERT, DEL and DELETE

**INS** used as:

```
INS string BEFORE array
```

Where:

- string - information to be inserted,
- array - dynamic array to accept information.

For instance:

```
INS invdate BEFORE array<1,POS>
```

**INSERT** used as:

```
array = INSERT(array,field,value,sub;data)
```

Where:

- array - dynamic array to accept information,
- field, value,sub - dynamic array location,
- data - information to be inserted.

###

**DEL** used as:

```
DEL array
```

Where:

- array - dynamic array reference to be deleted.

For Instance:

```
DEL array<1,POS>
```

**DELETE** used as:

```
Array = DELETE(field,value,sub)
```

Where:

- array - dynamic array to having the information desired,
- field, value,sub - dynamic array location,
- data - information to be deleted .

## COUNT and DCOUNT

The COUNT function returns the number of occurrences of one string in another. An example of its use is as:

```
NBR = COUNT(string1, string2)
```

Where:

- string1 - string to be checked for string2,
- string2 - string to be check in string1.

The DCOUNT function returns the number of fields separated by a delimiter. An example of use is as:

```
NBR = DCOUNT(string1, delim)
```

Where:

- string1 - string to be checked for number of fields,
- delim - field separater, does not have to be one character.

The function can be used to tell how many multi values are in a field, making it useful in scenarios that for instance need one to set an upper limit in a FOR … NEXT loop.

##

#### Workshop

- Write a program to
- Prompt for a letter to enter
- Check a dynamic array for its existence and
- Insert it in order if not found
- Remove it if found
- Display the array each time it changes
- Display how many elements are in the array

###

```
A = ""
 PROMPT ""
 LOOP
     CRT "ENTER A LETTER: ":
     INPUT LTR
 UNTIL LTR = "" DO
     LOCATE LTR IN A<1> BY "AL" SETTING POS THEN
         CRT LTR:" WAS FOUND IN VALUE POSITION ":POS:" IT WILL BE DELETED!”
         DEL A<1,POS>
     END ELSE
         CRT LTR:" WAS NOT FOUND, BUT BELONGS IN VALUE POSITION ":POS:
         CRT “IT WILL BE INSERTED!”
         INS LTR BEFORE A<1,POS>
     END
     CRT A
     CRT “THERE ARE “:DCOUNT(A,@VM):” VALUES”
 REPEAT
```

##

## SYSTEM

Typical SYSTEM options are supported, but jBASE has additional options specific to the platform including:

- 18 and 101 return JBCPORTNO
- 19 returns JBCLOGNAME
- 25 returns True if program is running in background
- 43 identifies who is holding a record lock
- 1000 returns field delimited command line
- 1008 returns JEDIFILENAME\_SYSTEM
- 1009 returns JEDIFILENAME\_MD

JBC.h has more details on the available additional SYSTEM options.

##

## IOCTL

This function provides direct communication to the database driver for a particular file (hash, directory, serial, sequential). Be sure to INCLUDE JBC.h in the program for definitions of IOCTL commands. It takes the general form:

```
IOCTL(filevar, command, parameter)
```

Where:j

- parameter - returns 0 for failure, may be used to pass information to the command
- Full path, automatic conversion, suppress lf on WRITESEQ, etc.

###

### IOCTL Example

```
INCLUDE JBC.h
RESULT = “”
OPEN “CUSTOMER” TO CUST THEN
  IF IOCTL(CUST,JBC_COMMAND_GETFILENAME,RESULT) THEN
    CRT RESULT
  END ELSE
    CRT “OH NO”
  END
END ELSE
  CRT “Cannot open CUSTOMER file!”
  STOP
END
```

##

## User Defined Functions

User defined functions are cataloged into the JBCDEV\_LIB directory. The FUNCTION statement is the first executable line of the function. Ideally, the function will have a RETURN value. Use DEFFUN in each program that will use the function.

###

### User Defined Functions Example

```
MYFUNC
001 FUNCTION MYFUNC(A,B)
002 C = A * B
003 RETURN C
004 END
```

```
FUNC.TEST
001 *TEST FUNCTION
002 A = “”; B = “”
003 DEFFUN MYFUNC(A,B)
004 RES = MYFUNC(10,4)
005 CRT RES
006 END
```

##

## EXECUTE or PERFORM

This statement pauses the currently executing program and Executes any operating system command, including other jBASE programs or commands. Clauses that may be used with the statement include:

- CAPTURING - captures screen output
- RETURNING or SETTING - captures error messages
- PASSLIST - sends a list or dynamic array to executing program
- RTNLIST - returns a list from executing program
- PASSDATA - sends variable contents to executing program. Use COLLECTDATA to pick up variable
- RTNDATA - returns variable contents from executing program. Use RTNDATA statement to return data

## **jbc Code Optimization**

Involves the use of jprof, jcover and jkeyauto.

#### jprof

Is a jBASE profiling tool, that gathers profiling information. The information is gathered by executing the program with the –JP option or setting JBCPROFILE=1. The command would take the general form:

```
Myprogram -JP
```

The tool will analyze the application program trouble spots or bottle necks. System calls and file I/O are not profiled, and CPU time is tracked. The tool keeps track of where the program is at each point in time. Profile information stored in:

- jprof\_*port#* when run with the –JP option as above, or
- jprof\_*pid*\_*inc* when using JBCPROFILE=1 as below:

```
JBCPROFILE=1
 Myprogram
```

In the example commands, 'myprogram' refers to the main program that issues calls to other programs in the application.

Profiling is done in two steps:

- Run application program
- Use jprof command to report profiling information, as below:

```
JPROF -FSOURCEFILENAME
```

jprof command then used to display profile information
The jprof command can also be used to generate a jkeyauto script based on keyboard input of the profiled program. Keystroke timings are part of the profile.

### jcover

Is a jBASE program that generates statistical about the running program. The information is gathered by setting JBCPROFILE=3, or executing the program with the –JC option as:

```
Myprogram -JC
```

The following three steps are involved:

- Run application program
- Collate recorded information
- Use jcover command to report information

Coverage information includes what parts of a program are executed, not executed and file resources used. The coverage information is stored in:

- jprof when run with –JC option
- jprof\_*pid*\_*exelev* when run with JBCPROFILE=3 as below:

```
JBCPROFILE=3
export JBCPROFILE
Myprogram
```

- Use jcover command to collate information into a jBASE hash file jcover\_*port#*

### jkeyauto

Is a program that allows a single program to control the actions of other programs. jprof and jcover can both be used to generate jkeyauto scripts. This can be useful for application bench marking. As much as it is easy to to set up, it is difficult to simulate actual user activity.

In operation, jkeyauto command interprets a script file containing program(s) to execute, keyboard input to those programs, even the amount of time for each typed character can be set.

Conditionals, looping, variables, comments, input to program, output from program are all supported.

Multiple scripts can be run in background from one connection and set to wait until signaled to go.

repository: CBarouch/docs

repo_name: CBarouch/docs


text:
# SCRIPTS

The following script (in the scripts directory) provides an easy process for
instrumenting and running an application provided by the user:

## startup.sh

**Description:**

> This script is used to setup the environment for the DSE so that applications can be
> instrumented and run without a lot of effort.

**Command:**

`startup.sh [options]`

> where [options] are:
>
> **-i** | **--install** - perform an install of all necessary tools and libraries not currently installed.
>
> **-b** | **--build**   - build all DSE components and startup mongodb and dansolver so that it is ready
> for creating and running instrumented applications.
>
> **-f** | **--force**   - force installation of all tools, even if already installed.
>
> **-v** | **--version** - display the installed versions (no install or build will be performed).
>
> **-h** | **--help**    - print this help message.

**Notes:**

It installs Open JDK 8 on Linux systems and whatever version brew defaults to
(currently JDK 10) on Darwin (mac).

If no options are specified, it will behave as if the **-b** option was selected.

## make.sh

**Description:**

> This script is used to instrument an application jar file, and to run the instrumented file.
> An *instrumented* file consists of the original jar file that has had all debug information
> stripped out of it and then additional instructions inserted for each opcode in order to
> maintain a *symbolic* stack that allows tracking constraints encountered during execution
> on user-specified parameters in the application. These constraints are sent through a network
> connection to the *solver* application that will attempt to find values for the parameters
> that can lead to unexplored paths, maximizing a loop bound, or exceeding an array bounds.

**Command:**

`make.sh [options] <app.jar> [arglist]`

> where [options] are:
>
> **-t** | **--test**  - don't actually build anything, dut display the commands used to build
>
> **-r** | **--run**   - after building the test, run it
>
> **<app.jar>** = the name (and path) of the application jar file (path can be relative)
>
> **[arglist]** = *(optional)* argument list to pass to application (if no testcfg.json file defined)

**Notes:**

This script will perform the following actions:

- build the instrumented jar file

If the *-r* option is specified, it will additionally:

- generate a default *danfig* file containing the specified symbolic parameters if *testcfg.json* specified them
- run the instrumented jar file

It will also perform the following if a *commandlist* is defined in the *testcfg.json* file

- generate a *check_results.sh* script file to verify the solution
- read the dansolver solution from the mongo database
- validate the solution based on the entries in *testcfg.json*

This requires the following files be present in the directory of the jar application file:

- __lib/*__            - contains all libraries needed by the application to run
- __testcfg.json__     - the JSON config file that defines conditions for the application (only required for *-r* option)

This will produce the following files (all contained in the results/TEST directory):

- __danfig__           - the configuration file used when running the instrumented code
- __check_results.sh__ - contains the script for running the test results validation
- __test_script.sh__   - same as *check_results.sh* but excludes the base_check.sh functions
- __TEST-strip.jar__   - the un-instrumented test application code stripped of debug info
- __TEST-dan-ed.jar__  - the instrumented test application
- __classlist.txt__    - list of classes in the application (used when running application)
- __methodlist.txt__   - list of methods in the application (used when running application)

The JSON file that is required to instrument and run the application MUST contain the
following entries (all values are defined as Strings):

  "**testname**" : the name of the java file (minus the extension)
  "**runargs**" : the argument list to pass to the application when it is run
  "**mainclass**" : the Main Class for the application

The following entries MAY optionally be included to define symbolic parameters and commands
to run:

  "**symboliclist**" : an array of symbolic parameters to define, each containing:
  "**commandlist**" : an array of commands to implement an automated test (see below)

The content of these last 2 entries is defined in the *CREATING A TESTCFG.JSON MANUALLY* section of https://github.com/vustac/dse/tree/master/test.

license: MIT

repository: vustac/dse

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: vustac/dse


text:
# LUYA MODULE MAILCHIMP CHANGELOG

All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
In order to read more about upgrading and BC breaks have a look at the [UPGRADE Document](UPGRADE.md).

## 2.1.0 (24. May 2023)

+ Do not make error while saving so verbose.
+ Add $mergeFieldAttributes which should be synced.
+ $options accept a closure function.
+ Added $interests property which also accepts a closure function.

## 2.0.0 (11. May 2023)

+ Updated to mailchimp marketing API version 3.0
+ Remove module `$groups` replaced with `$options`.
+ Removed MailchimpHelper `$updateExisting`, `$replaceInterests` and `$sendWelcome`.
+ MailchimpHelper requres new `$server` construct property.

## 1.0.6 (9. December 2021)

+ Small changes in docs, translations, composer dependencies

## 1.0.5 (6. February 2019)

+ [#12](https://github.com/luyadev/luya-module-mailchimp/issues/12) Use BaseObject instead of Object in order to ensure PHP7 compatibility.

## 1.0.4 (1. June 2018)

+ [#10](https://github.com/luyadev/luya-module-mailchimp/issues/10) Add option for double opt in.

## 1.0.3 (16. April 2018)

+ [#9](https://github.com/luyadev/luya-module-mailchimp/issues/9) Fixed interest groups to correctly work again.

## 1.0.2 (1. November 2017)

+ [#8](https://github.com/luyadev/luya-module-mailchimp/issues/8) Provide an option to disable the robots filtering.

## 1.0.1 (17. October 2017)

+ [#4](https://github.com/luyadev/luya-module-mailchimp/issues/4) **ATTENTION**: Changed the application structure and namespaces of the application, use `luya\mailchimp\Module` instead of `mailchimp\Module`.
+ [#6](https://github.com/luyadev/luya-module-mailchimp/issues/6) Use luya robots filter behavior.
+ [#5](https://github.com/luyadev/luya-module-mailchimp/issues/5) Added Helper method in order to make API calls without instantiating the Mailchimp Module.
+ [#3](https://github.com/luyadev/luya-module-mailchimp/issues/3) Removed error and success variables and moved to standard active form validation with response redirect and flash message.
+ Added LUYA Testsuite in order to make basic application tests.

## 1.0.0 (25. April 2017)

+ First stable release.

repository: luyadev/luya-module-mailchimp

gha_language: PHP

gha_license_id: MIT

repo_name: luyadev/luya-module-mailchimp


text:
# [Lets Add](http://alexa.amazon.com/#skills/amzn1.echo-sdk-ams.app.7fba70d8-07ec-46f1-b1bc-06f9a57a81db)
![3.7 stars](../../images/ic_star_black_18dp_1x.png)![3.7 stars](../../images/ic_star_black_18dp_1x.png)![3.7 stars](../../images/ic_star_black_18dp_1x.png)![3.7 stars](../../images/ic_star_half_black_18dp_1x.png)![3.7 stars](../../images/ic_star_border_black_18dp_1x.png) 3

To use the Lets Add skill, try saying...

* *Alexa, open let's add*

* *Alexa, ask let's add to quiz me up to four plus four*

* *Alexa, ask let's add for help*

Let's Add is a skill that quizzes you on addition problems.  You can specify how high you want the questions to go, up to twenty plus twenty.

Once you set how high you want to be quizzed on, Let's Add will ask you if you want the questions to be in order, or random. As you are learning addition you may want to start in order, then as you get better and need to be challenged, you can try random problems.

You can say "repeat" to hear a problem again if you didn't hear it the first time.

You can start over any time by saying "Start Over", or just say the new addition problem maximum values you want to go to, such as "five plus five".

At any time you can say "stop" or "cancel" and you will be told the number of correct answers you gave, and the number of incorrect answers you gave, out of the total possible addition problems.

So have fun, and learn to add.

Send suggestions, comments, pictures of Alexa teaching you addition, etc., to

<EMAIL_ADDRESS>

I'm looking for new ideas to make learning fun with Alexa.

Version 1.0.0

***

### Skill Details

* **Invocation Name:** lets add
* **Category:** null
* **ID:** amzn1.echo-sdk-ams.app.7fba70d8-07ec-46f1-b1bc-06f9a57a81db
* **ASIN:** B01DR9XVQK
* **Author:** Wobble Mouth
* **Release Date:** April 5, 2016 @ 07:02:33
* **In-App Purchasing:** No


text:
# Chirper Project

This repo is a code-along with the first project in the [React Nanodegree program](https://www.udacity.com/course/react-nanodegree--nd019).

Most of the commits in this repository correspond to videos in the program.

## Project Setup

* clone the Project - `git@github.com:udacity/reactnd-chirper-app.git`
* install the dependencies - `npm install`

## Contributing

Because this is a code-along project and the commits correspond to specific videos in the program, we will not be accepting pull requests.

If you feel like there's a major problem, please open an issue to discuss the problem and potential resolution.

## License

MIT

## Define Views
DashBoard
Tweet View
New Tweet

## Define components in each view

Comp
- Nav
- Tweet
- TweetList
- TweetContainer
- NewTweet
- App

- code down statically every comp
- define the state in state or store
- add dynamic - actions - reducer to each comp

## Components
- write on a post-it
- write connections

## UX - Design Sprints
personas
wire-frame
prototype

miro
figma

repository: kizouker/reactnd-chirper-app

repo_name: kizouker/reactnd-chirper-app


text:
# ardrone2islab
C code project for attitude control uploaded to AR.Drone quadrotor ver 2.0 without using AR.Drone SDK

### Status
[January 2016] Upload the code project to github

### Contact
Trung Nguyen </br>
Email<EMAIL_ADDRESS></br>
Intelligent Systems Lab </br>
Memorial University of Newfoundland, Canada </br>


text:
# circe-combine-routers 合并路由对象

## 安装

[![NPM](https://nodei.co/npm/circe-combine-routers.png?downloads=true)](https://nodei.co/npm/circe-combine-routers/)

## 使用

```typescript
import * as Koa from 'koa'
import * as Router from 'koa-router'
import * as checker from 'circe-combine-routers'

const app = new Koa()
const userRouter = new Router()
const postRouter = new Router()

app.use(combineRouters([userRouter, postRouter]))
```

## API

### function combineRoutes (routers: Router[], mounted?: string): Koa.Middleware

- routes 路由对象数组
- mount? 路由前缀

repository: ecfexorg/circe-kits

repo_name: ecfexorg/circe-kits


text:
About
=====

Overview
--------

ProjectJS is a combination of web technologies to enable streamlined software development for the web. It attempts to enable what is common in other software development environments:

-   Separation of source and target files
-   Create an application rather than a loose bunch of files
-   Build system
-   Unit testing
-   API documentation generation *(Soon to come)*

The ProjectJS application itself is a sample of how to use these technologies together. ProjectJS is nothing more than a combination of technologies used together to achieve the goals outlined above.

Getting started
---------------

### Using the project

To create a ProjectJS project you have to get a copy of the latest [ProjectJS](https://github.com/leonardseymore/ProjectJS) template and use it as a template. *(A future release may have some scripts to help with this)*

### Including 3rd party libraries

All of the resources you want to use in your project should be specified in the [Apache Ant](http://ant.apache.org/) *build.xml* script. ProjectJS itself demonstrates this by pulling in some 3rd party libraries such as [JQuery](http://jquery.com/), [AngularJS](http://angularjs.org/) and [LESS](http://lesscss.org/). You can remove and add to these libraries as you see fit to match your project. It is recommended to put all your libraries inside the *src/lib* directory.

### Testing

Testing is enabled by a combination of technologies. If you want to use another testing framework that is up to you, ProjectJS simply provides one means to achieve testing. By combining [rhinounit](http://code.google.com/p/rhinounit/) with [Envjs](http://www.envjs.com/) you can write tests as if they are running inside a browser.

### Project layout

A project follows this layout to support

|Folder|Description|
|:-----|:----------|
|src|Source files: e.g. static HTML, images, 3rd party libraries, JavaScript and CSS files|
|tools|Supporting tools: e.g. Google Closure|
|src/css|CSS and LESS files that are concatenated into a single LESS file|
|src/img|Image files and spritesheets|
|src/js|Input JavaScript files that are compressed by Google Closure and concatenated to generate a single application file|
|src/lib|3rd party libraries and supporting files|
|src/static|Static HTML, Text or any other files|
|src/test|Unit test files|
|src/test/lib|Tools and files to support testing|

### Running Ant targets

A number of Ant targets have been defined and are described below,

|Target|Description|
|:-----|:----------|
|all|Build all source files and create an exploded target directory that can be hosted on a web server|
|clean|Delete all generated content|
|css|Concatenate CSS/LESS input files into a single stylesheet|
|img|Copy source image files to target image directory|
|js|Run js-filter,js-compress,js-concat targets|
|js-filter|Copy source JavaScript files and run through filters to replace any Ant variables defined in source|
|js-compress|Use Google Closure to combine and compress input files|
|js-concat|Concatenate compressed JavaScript files with other uncompressed JavaScript files that should not be modified, e.g. custom AngularJS files|
|manifest|Copy and filter application manifest file|
|static|Copy all static input files to output directory|
|target|Creates build directory|
|test|Run test cases|
|zip|Zips up exploded target directory for distribution|

repository: leonardseymore/ProjectJS

repo_name: leonardseymore/ProjectJS


text:
# Welcome to v0.1 of Chainstigma Binance trading-

## Note

This is a manual trading GUI for Binance, which is created with Python Tkinter module.

Make easy to set an Order via REST API, get the Realtime Asset Price and set auto take profit and trailing stop loss.
This is based on Frosti2020 version and it's still under construction and testing

## Features

- Create fast `LIMIT ORDER`
- Cancel order
- Get all order information
- Get the amount of your Funds
- Realtime Price
- Some calculators for fast calculate
- No unknown libraries
- One File/Script `Chainstigma v0.1.py` (easy to look over)
- loop Get order info and set trailing stop loss and take profit

## Requirements

```python
    import tkinter as tk
    import time
    import json
    import requests
    from threading import Thread
    import hashlib
    import hmac
```
## Tutorial Guide

A tutorial guide will be posted later

## Donate

Feel free to support my motivation for new Updates:

| Asset   | ADDRESS                                     |
|-------- |-------------------------------------------- |
| BTC     |
| ETH     |
| BNB     |
| BCH     |
| LTC     |

## Contact

After finishing a contact for further discussion will be post later

repository: ChainStigma/Chainstigma-Binance

repo_name: ChainStigma/Chainstigma-Binance


text:
The rdaslides class: Research Data Alliance presentations
=========================================================

The rdaslides LaTeX class is intended to produce slides for Research
Data Alliance (RDA) presentations, or an accompanying transcript, or both.
It is based on the [beamerswitch] class.

Internally, rdaslides uses a presentation theme called 'RDA',
which can be used independently within beamer.

Installation
------------

### Automated way ###

A makefile is provided which you can use with the Make utility:

  * Running `make` generates the derived files

      - README.md
      - rdaslides.pdf
      - rdaslides-slides.pdf
      - rdaslides.cls
      - rdacolors.sty
      - beamerthemeRDA.sty
      - rdamscwg.sty
      - rdamsdwg.sty
      - rdaslides.ins

  * Running `make inst` installs the files (and images) in the user's
    TeX tree.
  * Running `make install` installs the files (and images) in the
    local TeX tree.

### Pre-requisites ###

The documentation uses fonts from the XCharter and sourcesanspro
packages, as well as sourcecodepro if XeLaTeX or LuaLaTeX is used,
or zi4 (inconsolata) otherwise. To compile the documentation
successfully, you will need the minted package installed and working.

### Manual way ###

To install the class from scratch, follow these instructions. If you have
downloaded the zip file from the [Releases] page on GitHub, you can skip the
first two steps.

 1. Compile rdaslides.dtx just as you would a normal LaTeX file. You will
    need to enable shell escape for minted to work properly. As well
    as the usual PDF (or DVI) and auxiliary files, several others are
    generated.

 2. Compile rdaslides.dtx a second time with `-jobname=rdaslides-slides`
    as a command line option to generate the sample slides. Again, you will
    need to enable shell escape for minted to work properly.

 3. Move the files to your TeX tree as follows:

      - `source/latex/rdaslides`: rdaslides.dtx, rdaslides.ins
      - `tex/latex/rdaslides`: rdaslides.cls, rdacolors.sty,
         beamerthemeRDA.sty, rdamscwg.sty, rdamsdwg.sty,
         rda-bg-normal.jpeg rda-bg-title1.jpeg rda-bg-title2.jpeg
      - `doc/latex/rdaslides`: rdaslides.pdf, rdaslides-slides.pdf,
         README.md

 4. You may then have to update your installation's file name database
    before TeX and friends can see the files.

Licence
-------

Copyright 2016 Alex Ball.

This work consists of three image files (rda-bg-normal.jpeg,
rda-bg-title1.jpeg, and rda-bg-title2.jpeg), the documented LaTeX file
rdaslides.dtx, and a Makefile.

The text files contained in this work may be distributed and/or modified
under the conditions of the [LaTeX Project Public License (LPPL)][lppl],
either version 1.3c of this license or (at your option) any later
version.

The rights to the image files distributed with this bundle are held by
the [Research Data Alliance][rda].

This work is "maintained" (as per LPPL maintenance status) by
[Alex Ball][me].

[beamerswitch]: https://github.com/alex-ball/beamerswitch
[Releases]: https://github.com/alex-ball/rdaslides/releases
[lppl]: http://www.latex-project.org/lppl.txt
[rda]: https://rd-alliance.org/
[me]: http://alexball.me.uk/

repository: is-xiaoyx/Awesome-Beamer-Collection

repo_name: is-xiaoyx/Awesome-Beamer-Collection


text:
AsciiImportExport v0.24
======================================================================

## Overview
A .NET library providing fast and easy de/serialization of arbitrary column-based text data.

## Changelog
  * v0.24 - Now supports export of quoted strings, so column separators in columns are not a problem anymore.
  * v0.23 - Bug fix for default string formats
  * v0.22 - Now supports creation of columns with PropertyInfo, which enables automatic document format building
  * v0.21 - Configurable fill char, line end trim made optional, max column width validation
  * v0.20 - Now supports types without default constructor, IFormatProvider for columns, better import performance, small Bugfixes
  * v0.12 - Custom export functions now have access to the item to export
  * v0.11 - Improved performance and memory usage of import with the use of TextReader
  * v0.10 - Added optional praefix for header line when exporting
  * v0.9  - Hiding DocumentColumn and DocumentFormatDefinition behind interfaces
  * v0.8  - Fixed column default value problems, added flag that indicates if exported lines terminate with the column separator, other small tweaks
  * v0.7  - Now supports all built-in value types, Massive performance improvements
  * v0.6  - Fixed some smaller bugs, minor restructuring of public surface
  * v0.5  - Cleaned up column handling, fixed problems with comments, changed target framework to .NET 3.5 Client Profile
  * v0.4  - Resolved some initialization problems in DocumentColumn
  * v0.3  - Added comments, cleaned method names
  * v0.2  - Added DocumentColumnBuilder for better separation of concerns
  * v0.1  - Initial release

## Example

### POCO
    public class Person
    {
        public DateTime Birthday { get; set; }
        public Gender Gender { get; set; }
        public double Height { get; set; }
        public string Memo { get; set; }
        public string Name { get; set; }
    }

    public enum Gender
    {
        Unknown,
        Female,
        Male,
    }

### Data
This is our list:

    public List<Person> GetPersonList()
    {
        return new List<Person>
                    {
                        new Person {Birthday = new DateTime(1983, 1, 29), Gender = Gender.Male, Height = 175.5, Name = "Peter", Memo = "Nice guy!"},
                        new Person {Birthday = new DateTime(1931, 10, 5), Gender = Gender.Male, Height = 173.45, Name = "Paul", Memo = "Sometimes a litte grumpy."},
                        new Person {Birthday = new DateTime(1980, 4, 12), Gender = Gender.Female, Height = 1193, Name = "Mary", Memo = "Tall!"},
                    };
    }

### Definition

Now we define how the data will be exported / imported:

    private static IDocumentFormatDefinition<Person> GetDefinition()
    {
        return new DocumentFormatDefinitionBuilder<Person>("\t", true)
            .SetCommentString("#")
            .SetExportHeaderLine(true, "# ")
            .AddColumn(x => x.Name)
            .AddColumn(x => x.Gender, b => b.SetImportFunc(StringToGender).SetExportFunc(GenderToString))
            .AddColumn(x => x.Height, "0.00", b => b.SetAlignment(ColumnAlignment.Right))
            .AddColumn(x => x.Birthday, "yyyyMMdd")
            .AddColumn(x => x.Memo, b => b.SetHeader("Description"))
            .Build();
    }

    private static string GenderToString(Person p, Gender gender)
    {
        switch (gender)
        {
            case Gender.Female:
                return "F";
            case Gender.Male:
                return "M";
            default:
                return "U";
        }
    }

    private static Gender StringToGender(string s)
    {
        switch (s)
        {
            case "M":
                return Gender.Male;
            case "F":
                return Gender.Female;
            default:
                return Gender.Unknown;
        }
    }

That is what we defined:

* seperate columns by Tabs
* automatically determine the width of a column
* lines starting with '#' are recognized as comments
* generate a header line starting with '# '
* add new column for property Name
* add new column for property Gender and use special import / export methods
* add new column for property Height. Align the data of the column to the right and use a double precision of 2.
* add new column for property Birthday with a custom date format
* add new column for property Memo and set header to "Description"

### Export

And now we can export the list:

	public string Export(List<Person> list)
	{
	    IDocumentFormatDefinition<Person> definition = GetDefinition();
	    return definition.Export(list);
	}

Which will yield:

	# Name	Gender	 Height	Birthday	Description
	Peter 	M     	 175.50	19830129	Nice guy!
	Paul  	M     	 173.45	19311005	Sometimes a litte grumpy.
	Mary  	F     	1193.00	19800412	Tall!

### Import

No surprises here!

	public void ExportAndImport(List<Person> list)
	{
	    IDocumentFormatDefinition<Person> definition = GetDefinition();

		string exportResult = definition.Export(list);

		List<Person> importResult = definition.Import(new StringReader(exportResult));
	}

repository: seburgi/AsciiImportExport

extension: markdown

gha_language: C#

repo_name: seburgi/AsciiImportExport


text:
# gear-csrf
[![Build Status](https://travis-ci.org/teambition/gear-csrf.svg?branch=master)](https://travis-ci.org/teambition/gear-csrf)
[![Coverage Status](https://coveralls.io/repos/github/teambition/gear-csrf/badge.svg?branch=master)](https://coveralls.io/github/teambition/gear-csrf?branch=master)
[![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/teambition/gear-auth/master/LICENSE)
[![GoDoc](http://img.shields.io/badge/go-documentation-blue.svg?style=flat-square)](http://godoc.org/github.com/teambition/gear-csrf)

[CSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery) middleware for Gear.

## Installation

```sh
go get -u github.com/teambition/gear-csrf
```

## Usage

```go
package main

import (
  "net/http"
  "time"

  "github.com/teambition/gear"
  csrf "github.com/teambition/gear-csrf"
)

func main() {
  app := gear.New()
  router := gear.NewRouter()
  CSRF := csrf.New("some_key", time.Minute*10)

  // http://<IP_ADDRESS>:3000/csrf
  router.Get("/csrf", func(ctx *gear.Context) error {
    secret := CSRF.SecretFromCookie(ctx)
    return ctx.JSON(http.StatusOK, map[string]string{
      "secret": secret,
      "token":  CSRF.SignToken(secret),
    })
  })

  // Enable the CSRF checking.
  // http://<IP_ADDRESS>:3000/verify-csrf?csrf_token={token}
  router.Get("/verify-csrf", CSRF.Serve, func(ctx *gear.Context) error {
    secret := CSRF.SecretFromCookie(ctx)
    return ctx.JSON(http.StatusOK, map[string]string{
      "secret": secret,
      "verify": "ok",
    })
  })

  app.UseHandler(router)
  app.Listen(":3000")
}
```

## How it works

`gear-csrf` uses a CSRF token to prevent the [CSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery) attack. A CSRF token is generated by a user secret and a salt. The user secret is shared by the user's client and the web server by cookie and then you should ensure every way to get the CSRF token in your web server application should not support CORS. So the attacker will not be able to get your CSRF token by his user secret. The salt here is used to prevent [BREACH](https://en.wikipedia.org/wiki/BREACH_(security_exploit)) attack.

## Documentation

The docs can be found at [godoc.org](https://godoc.org/github.com/teambition/gear-csrf), as usual.

## License

MIT

repository: alibaba-archive/gear-csrf

repo_name: alibaba-archive/gear-csrf


text:
![POLITICO](https://rawgithub.com/The-Politico/src/master/images/logo/badge.png)

![](dist/images/share.jpg)

# interactive_chicago-mayoral-2019

| Title | chicago-mayoral-2019 |
|-|-|
| Developer    | [Audrey<EMAIL_ADDRESS>|
| Link | [https://apps.northbynortwestern.com/interactives/2019/chicago-mayoral-2019/](https://apps.northbynortwestern.com/interactives/2019/chicago-mayoral-2019/) |

©2019 POLITICO

gha_language: JavaScript


text:
# Working with Cloud 9
Review the Video walkthrough here: [Office Mix](https://mix.office.com/watch/1w8lekdndxjhq)

### Logon to Cloud 8
Go to [http://c9.io](http://c9.io) and logon with GitHub or whatever credentials you choose

### Create your Workspace
Call it whatever you like, but choose "Custom".

### Clone the Repository

```
git clone https://github.com/cs612-f15/tomcat-mysql-c9.git

cd tomcat-mysql-c9

```

## Setting up MySQL
MySQL is already installed.

Run the following from your `~/workspace/tomcat-mysql-c9` directory.

```
./setupMySql.sh
```

## Setting up Tomcat
The following will download V8 of Tomcat and unpack it to `./tomcat`

Run the following from your `~/workspace/tomcat-mysql-c9` directory.

```
./setupTomcat.sh

```

## Building Java classes

Once the Tomcat script is run, the `survey.war` file is deployed to `./tomcat/webapps` and as the Survey site is
requested, Tomcat extracts the WAR file.

## Make sure you "Run" the site so it expands..

1. Choose "preview" from C9.io interface
2. Preview Running application
3. Popout in New window
3. Change the URL - appending `/survey` to the Server Name

![img1](./img/1.png)

![img2](./img/2.png)

![img3](./img/3.png)

![img4](./img/4.png)

## once the site is run, Tomcat 'expands' the `survey.war` file

This WAR file contains all the content, JSP, Class - and the Java source files.

A helper script allows you build `*.java` source files, then build, then restart tomcat.

```
./buildJava.sh
./tomcat/bin/catalina.sh stop
./tomcat/bin/cataling.sh start
```

# Important - Update the UserName Password

Go into the `./tomcat/webapps/survey/WEB-INF/classes/survey/DatabaseAccess.java` file

Edit the lines to change the user from `root` to `cs612`

Should look like this:

```java
  String jdbcDriver = "com.mysql.jdbc.Driver";
  String dbURL = "jdbc:mysql://localhost/test";
  String user = "cs612";
  String password = "123456";
```

Recompile, then restart Tomcat...

```bash
./buildJava.sh
./tomcat/bin/catalina.sh stop
./tomcat/bin/cataling.sh start
```

Note: JSP files if changes are immediately reprocessed and reflected within Tomcat.
Class files, sourced from Java files, requires a "restart" of Tomcat - that is what the `./tomcat/bin/cataling stop/start` provides.


text:
# Templates
This will go through all functions with example's
See https://github.com/BIntelligent/currency-system/tree/main/ExampleBot for a Example bot.
# NEW!
ADDED Info command!
# Bug reports
Join our [Support Server](https://discord.gg/stERZwjA9m):
Package Made by: `Be Intelligent#0001`.
# Docs
📚 https://currency-system.js.org
# For Global Economy
To make it global, remove following line from every command
```js
guild: message.guild,
```
# Available Methods
Click them to view more info about the methods.

## Initilize the NPM Package.

1. Set's MongoDB URL so It can Connect to MongoDB.
[`setMongoURL`](https://bintelligent.github.io/currency-system/examples/setMongoURL)
2. ( optional ) Set's Default Wallet Amount when creating new User Document
[`setDefaultWalletAmount`](https://bintelligent.github.io/currency-system/examples/setDefaultWalletAmount)
3. ( optional ) Set's Default Bank Amount when creating new User Document
[`setDefaultBankAmount`](https://bintelligent.github.io/currency-system/examples/setDefaultBankAmount)

## Economy Methods

4. Add's Money to a User.
[`addMoney`](https://bintelligent.github.io/currency-system/examples/addMoney)
5. Remove's Money from a User.
[`removeMoney`](https://bintelligent.github.io/currency-system/examples/removeMoney)
6. Gamble's the money for a user with some success of winning double money than you Gambled for.
[`gamble`](https://bintelligent.github.io/currency-system/examples/gamble)
7. Add's money from wallet to bank.
[`deposite`](https://bintelligent.github.io/currency-system/examples/deposite)
8. Take's money from bank to wallet.
[`withdraw`](https://bintelligent.github.io/currency-system/examples/withdraw)
9. Get's current balance of user. ( Bank and wallet )
[`balance`](https://bintelligent.github.io/currency-system/examples/balance)
10. Moves money from one user to another.
[`transferMoney`](https://bintelligent.github.io/currency-system/examples/transferMoney)

## Leaderboard

11. Get's Guild's leaderboard.
[`leaderboard`](https://bintelligent.github.io/currency-system/examples/leaderboard)
12. Get's Global leaderboard.
[`globalLeaderboard`](https://bintelligent.github.io/currency-system/examples/globalLeaderboard)

## Money Earning Methods

13. User can use it once per hour.
[`hourly`](https://bintelligent.github.io/currency-system/examples/hourly)
14. User can use it once every 6 hours.
[`quaterly`](https://bintelligent.github.io/currency-system/examples/quaterly)
15. User can use it once every 12 hours.
[`hafly`](https://bintelligent.github.io/currency-system/examples/hafly)
16. User can use it once every 24 hours.
[`daily`](https://bintelligent.github.io/currency-system/examples/daily)
17. User can use it once every 7 days.
[`weekly`](https://bintelligent.github.io/currency-system/examples/weekly)
18. User can use it once every month.
[`monthly`](https://bintelligent.github.io/currency-system/examples/monthly)
19. User can use it every x time. Which Bot Developor can set.
[`work`](https://bintelligent.github.io/currency-system/examples/work)
20. Rob's a user and have 50-50 chance of getting his money.
[`rob`](https://bintelligent.github.io/currency-system/examples/rob)
21. User can use it every x time. Which Bot Developor can set
[`beg`](https://bintelligent.github.io/currency-system/examples/beg)

# New!!
## Inventory System
20. Get User's Inventory.
[`getUserItems`](https://bintelligent.github.io/currency-system/examples/getUserItems)
21. Get Shop's Inventory.
[`getShopItems`](https://bintelligent.github.io/currency-system/examples/getShopItems)
22. Add Item's to Shop!
[`addItem`](https://bintelligent.github.io/currency-system/examples/addItem)
23. Removes Item's to Shop!
[`removeItem`](https://bintelligent.github.io/currency-system/examples/removeItem)
24. Set's Item's on Shop at once without doing it one by one.
[`setItems`](https://bintelligent.github.io/currency-system/examples/setItems)
25. Buy Command for User's to buy items from Shop.
[`buy`](https://bintelligent.github.io/currency-system/examples/buy)
26. Sell Command for User's to Sell items.
[`removeUserItem`](https://bintelligent.github.io/currency-system/examples/removeUserItem)
27. This tell's the about a user on what command he used already.
[`info`](https://bintelligent.github.io/currency-system/examples/info)

repository: DURGESHYS/currency-system

branch_name: refs/heads/main

repo_name: DURGESHYS/currency-system


text:
Antidot Framework Runtime
=================

[![Test Coverage](https://codecov.io/gh/antidot-framework/runtime/branch/1.x.x/graph/badge.svg?token=OWG9OZO6B5)](https://codecov.io/gh/antidot-framework/runtime)
[![Type coverage](https://shepherd.dev/github/antidot-framework/runtime/coverage.svg)](https://shepherd.dev/github/pheature-flags/pheature-flags)
[![Mutation Coverage](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fantidot-framework%2Fruntime%2F1.x.x)](https://dashboard.stryker-mutator.io/reports/github.com/antidot-framework/runtime/1.x.x)
[![Maintainability](https://api.codeclimate.com/v1/badges/346aa65dc748a4b2d271/maintainability)](https://codeclimate.com/github/antidot-framework/runtime/maintainability)

The Runtime allows running Antidot Framework applications both sync as in async way.

## Requirements

* PHP >= 8.1

repository: antidot-framework/runtime

repo_name: antidot-framework/runtime


text:
# VueJS Braintree Integration Example

Welcome!

I'm working on example integrations powered by VueJS + Webpack.

Currently, I have:

* A Drop-in UI Integration that uses [the Braintree Web Drop-in](https://github.com/braintree/braintree-web-drop-in)
* Hosted Fields integration that uses [v3 of the JS SDK](https://developers.braintreepayments.com/start/hello-client/javascript/v3)

**NOTE:** This does _not_ include the [server-side component](https://developers.braintreepayments.com/start/hello-server/), which is need to a) obtaining a Client Token and b) make API requests. You will need to supply your own server-side integration. I recommend [Node](https://developers.braintreepayments.com/start/hello-server/node) or [PHP](https://developers.braintreepayments.com/start/hello-server/php), depending what you like!

### Install:
* Clone the repo
* Go into the drop-in directory and `npm install` and `npm run build` to build the new Braintree Web Drop-in beta
* Back in the root of the cloned project, `npm install`
* After install, you have several options to run the example:
	`npm run dev`: opens a browser window with hot module reload
	`npm run build`: builds the `/dist` directory with the built scripts

Disclaimer: I work at Braintree as an Overnight Technical Support rep, but this is _not_ an official library or example integration. https://developers.braintreepayments.com/

repository: aviralyadav/Vue

repo_name: aviralyadav/Vue


text:
**(VERY)** Simple setup for React with Server side rendering ( NextJS ) with GraphQL server serve by Go.

> I am now trying to avoid Javascript as much as I can (due to personal opinion)

# Development

### Prerequisite
- Install Go compiler and go dep
- gnu make
- nodejs 8.9 ++

```

// prepare
$ yarn install
$ dep ensure -v

// run go server
$ make dev-server

// build and run client server
$ make dev-client

// Go to http://localhost:3000
```

repository: zapkub/react-graphql-go-boilerplate

repo_name: zapkub/react-graphql-go-boilerplate


text:
# Rename `timestamp` webhook verifier option

This codemod renames the `timestamp` webhook verifier option to `currentTimestampOverride`

The first thing it does is find all files that needs to be updated. We need to
look through all functions in the api/functions directory. In those functions
we're looking for calls to the `verifyEvent`, `verifySignature` or
`signPayload` functions.

A call can look like this:

```js
verifyEvent('timestampSchemeVerifier', {
  event,
  secret: process.env.STRIPE_WEBHOOK_SECRET,
  options,
})
```

Finally we need to find that `options` object and rename `timestamp` (if it
exists) to `currentTimestampOverride`

repository: redwoodjs/redwood

gha_language: TypeScript

repo_name: redwoodjs/redwood


text:
[![Github release](https://img.shields.io/npm/v/@scania/components?color=1081C2)](https://www.npmjs.com/package/@scania/components)
[![Github release](https://img.shields.io/github/v/release/scania-digital-design-system/sdds?color=1081C2)](https://github.com/scania-digital-design-system/sdds/releases)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
![](https://img.shields.io/github/license/scania-digital-design-system/sdds)
[![Getting Started](https://img.shields.io/badge/Available%20components-digitaldesign.scania.com-orange)](https://digitaldesign.scania.com/getting-started/development)

# Scania Digital Design System components

**Technical documentation**

Check out [Scania Digital Design System](https://digitaldesign.scania.com/) for implementation and technical documentation.

## Quick start

How to add components in the project:

   Install components via NPM package by running the command below.

   ```
   npm i @scania/components
   ```

   Import component as a module with `defineCustomElements` function.

   ```js
   import { defineCustomElements } from '@scania/components';

   defineCustomElements();
   ```

See all available components in the [Scania Digital Design System](https://digitaldesign.scania.com/components).

## Styling

To apply Scania styles, you need to add a theme package and use `sdds-theme` component. Check out [Scania theme documentation](https://github.com/scania-digital-design-system/sdds/tree/master/theme) for detail documentation.

## Browser support

- Chrome
- Firefox
- Safari
- Edge (chromium)

**The components are not supported in IE11 & Edge Legacy**

## Contributing

Please read through our [contributing guidelines](https://github.com/scania-digital-design-system/sdds/blob/master/CONTRIBUTING.md) for the directions to **develop components**, **create a pull request** and **coding standard**.

- [Report bug](https://github.com/scania-digital-design-system/sdds/issues)
- [Request feature](https://github.com/scania-digital-design-system/sdds/issues/new)

## Community

Get in touch with the team and the community:
- [Teams](https://teams.microsoft.com/l/team/19%3a1257007a64d44c64954acca27a9d4b46%40thread.skype/conversations?groupId=79f9bfeb-73e2-424d-9477-b236191ece5e&tenantId=3bc062e4-ac9d-4c17-b4dd-3aad637ff1ac)

## License

All CSS, HTML and JS code are available under the MIT license. The Scania brand identity, logos and photographs found in this repository are copyrighted Scania CV AB and are not available on an open source basis or to be used as examples or in any other way, if not specifically ordered by Scania CV AB.

repository: N-Asadnajafi/sdds

repo_name: N-Asadnajafi/sdds


text:
---
layout: post
title:  "Installing GeoDjango on Ubuntu"
date:   2017-03-25 19:47:10
categories: django geodjango
---

# Installing GeoDjango on Ubuntu
If your django project needs any kind of spatial queries you will need to set up GeoDjango.

## Why GeoDjango
GeoDjango allows you to make all kinds of location aware queries. If you e.g. have coffee shops saved in your db django can give you the stores within a distance of X to the user.
 Or if you have a map it can only return the rsults that are in the currently visible area to the user.

## What's this guide?
When we originally started using GeoDjango we ran into a couple of issues when setting up django that were not explained in the [docs](https://docs.djangoproject.com/en/1.10/ref/contrib/gis/install/).
We documented every issue and its solution. This way it should be a lot easier for you to get started.
This article is only applicable if you are using Postgres as your database. It is also our recommendation if you work with spatial data.
If you use another OS than Ubuntu this could still be helpful but you are better off starting with the [official guide](https://docs.djangoproject.com/en/1.10/ref/contrib/gis/install/) and coming here for troubleshooting

## Where is the shortcut?
If you are just here to play around, feel free to use the docker image: #TODO

## The parts
This article assumes that you already have a running django app.
We are going to install the following:

* GEOS
* GDAL
* PostGis
* other prerequisite-libaries

We are going to install most components from source to avoid compatibility issues with your distro.

### GEOS

repository: GreaterEquals/blog

repo_name: GreaterEquals/blog


text:
---
id: about_index
title:  "About ZIO Process"
---

_Purely functional command and process library based on ZIO._

ZIO Process provides a principled way to call out to external programs from within a ZIO application
while leveraging ZIO's capabilities like interruption and offloading blocking operations to a
separate thread pool. You don't need to worry about avoiding these common pitfalls as you would if
you were to use Java's `ProcessBuilder` or the `scala.sys.process` API since it already taken care
of for you.

ZIO Process is backed by ZIO Streams, enabling you to work with processes that output gigabytes of
data without worrying about exceeding memory constraints.

repository: reibitto/zio-process

repo_name: reibitto/zio-process


text:
---
id: millennial
title: Millennial
---

# Millennial

"It's a rare thing to find one," you said,
pointing out the path to the hammerkop's nest,
nestled in the far grove growing along
this quiet stream, so well replenished
after last night's rumbling rain.

I finally reached it,
after more mindful steps than this foolish me
can follow, forever meandering between
Cloud Cult's chorus and Chesterton's chattering finches
until, through no movement of my own,
I found myself sitting still on a koppie,
eye-level with twigs and tangledness,
taken back into thoughts of my grandfather,
who also loved these brown birds
and would bring the little boy I still call 'me'
to wonder at them and laugh at their strange heads
and marvel at the mess they could make,
teaming up with the sacred ibis
at a lake which lies on the edge
of all his fuzzy memory, still amazed
by the way she comes to greet now-me,
with wing and wild call,
before landing on some rocks eroded
by the passing years to look just like
her flattened head, as if it were meant
to be - this very moment -
molded by millennia.

#### Traces

[Skeleton](https://www.poetrynook.com/poem/skeleton-0)

[Energy](https://www.youtube.com/watch?v=fdkpAnN2Zc8 "There's So Much In Us")

![Hiding hammerkops](../img/hiding_hammerkops.jpg)

repository: andytudhope/living-blue-book

repo_name: andytudhope/living-blue-book


text:
---
# Display name
title: Onur Güngör

# Username (this should match the folder name)
authors:
- onurgu

# Is this the primary user of the site?
superuser: true

# Role/position
role: Part-time faculty at Bogazici University & Data Science Manager at Udemy

# Organizations/Affiliations
organizations:
- name: Boğaziçi University
  url: ""

# Short bio (displayed in user profile at end of posts)
bio: Data science manager leading a team that aims to understand the course content at Udemy. Part-time lecturer at Bogazici University giving a lecture titled "Transformer-based Pre-training Methods for Natural Language Processing".

interests:
- Named entity recognition
- Morphologically rich languages
- Morphological disambiguation
- Large language models

education:
  courses:
  - course: PhD in Computer Eng.
    institution: Boğaziçi University
    year: 2021
  - course: MS in Computer Eng.
    institution: Boğaziçi University
    year: 2009
  - course: BS in Computer Eng.
    institution: Boğaziçi University
    year: 2006

# Social/Academic Networking
# For available icons, see: https://sourcethemes.com/academic/docs/page-builder/#icons
#   For an email link, use "fas" icon pack, "envelope" icon, and a link in the
#   form<EMAIL_ADDRESS>or "#contact" for contact widget.
social:
- icon: envelope
  icon_pack: fas
  link: '#contact'  # For a direct email link, use<EMAIL_ADDRESS>- icon: twitter
  icon_pack: fab
  link: https://twitter.com/onurgu_ml
- icon: google-scholar
  icon_pack: ai
  link: https://scholar.google.com/citations?user=FW7c17kAAAAJ&hl=en
- icon: github
  icon_pack: fab
  link: https://github.com/onurgu

# Link to a PDF of your resume/CV from the About widget.
# To enable, copy your resume/CV to `static/files/cv.pdf` and uncomment the lines below.
# - icon: cv
#   icon_pack: ai
#   link: files/cv.pdf

# Enter email to display Gravatar (if Gravatar enabled in Config)
email: ""

# Organizational groups that you belong to (for People widget)
#   Set this to `[]` or comment out if you are not using People widget.
user_groups:
- Researchers
- Visitors
---

# Welcome

I received my PhD at [Boğaziçi University Computer Engineering Department](http://www.cmpe.boun.edu.tr).
My research focuses on named entity recognition for morphologically rich languages [[1](publication/gungor-2019-effect/), [2](publication/gungor-2018-improving/), [3](publication/gungor-2017-morphological/)], but I also write papers about explaining NLP predictions [[4](publication/gungor-2020-plosone/)], compiling interesting corpora [[5](publication/gungor-2018-lrec/)], and correcting annoying spelling errors [[6](publication/arikan-2019-detecting/)].

I also work as a data science manager at Udemy developing systems that solve business problems using natural language processing methods. For details of my industrial experience, please refer to [my LinkedIn profile](https://www.linkedin.com/in/onurgungor/).

gha_language: Jupyter Notebook


text:
# The user shares a file through another app

What users do not need is another app or service to do things they are already doing on their smartphones. Discovering and installing a new app is already a barrier to entry. A bigger barrier is managing another application to message or transfer data. This is especially the case when the user usually does it another way.

## What we found out in research

* [Users](user-research/interviews/potential-users) are often hesitant to use new apps to do the things that are already handled by other other apps
* [Early adopters](user-research/interviews/early-adopters) are increasingly interested in not using cloud services to share files

## Design considerations

* Try to use the existing mobile OS and its conventions as much as possible
* If your app has contacts stored already, utilise these for sharing as much as possible
* Prioritise frequent contacts
* Show a confirmation with CID, link or hash of the file

### Who is the user and what are their needs

Student in early 20's who wants to send files directly between smartphones not necessarily on the same operating system without having to upload it somewhere

## Putting it into practice

#### Open a photo in gallery or other file browser app on their smartphone

One very common user pattern is to share a file from the native application. This is especially the case with photos which are easier to view in photo gallery apps.

![](https://raw.githubusercontent.com/ipfs/mobile-design-guidelines/master/.gitbook/assets/ShareFile-1.png)

### Open share menu

Major mobile operating systems such as iOS and Android have contextual share menus which work across the OS. App X would also be available for instance in this bottom sheet menu. The user taps this button to share with App X.

![](https://raw.githubusercontent.com/ipfs/mobile-design-guidelines/master/.gitbook/assets/ShareFile-2.png)

> **Design consideration**
>
> Try to use the existing mobile OS and its conventions as much as possible

### Select and share through App X

A modal opens in the photo gallery app which shows the different share options for App X.

The user taps `Email` and enters in an email of a friend and then taps `Add to network and send link`.

![](https://raw.githubusercontent.com/ipfs/mobile-design-guidelines/master/.gitbook/assets/ShareFile-3.png)

> **Design consideration**
>
> If your app has contacts stored already, utilise these for sharing as much as possible and prioritise frequent contacts

### Confirmation to user showing CID link and button to open App X

The CID of the image that has been added to the IPFS network is emailed to the entered email address and the user is shown a confirmation with the hash and a link to open the image in App X.

![](https://raw.githubusercontent.com/ipfs/mobile-design-guidelines/master/.gitbook/assets/ShareFile-4.png)

> **Design consideration**
>
> Show a confirmation with CID, link or hash of the file

repository: ipfs/mobile-design-guidelines

repo_name: ipfs/mobile-design-guidelines


text:
# WebView Franz Plugin

The minimum requirement to run this plugin is Franz v. 4.0.0. To get the latest version visit [meetfranz.com](http://meetfranz.com)

## Installation
1. To install this plugin, download the `webview` folder.
2. Open the Franz Plugins folder on your machine:
  * Mac: `~/Library/Application\ Support/Franz/Plugins/`
  * Windows: `%appdata%/Franz/Plugins`
  * Linux: `~/.config/Franz/Plugins`
  * _Alternatively: Go to your Franz settings page, scroll down to the bottom and you will see an option to "Open the Franz plugin directory"_
3. Copy the `webview` folder into the plugins directory
4. Restart Franz

repository: salvatorecordiano/franz-webview-plugin

repo_name: salvatorecordiano/franz-webview-plugin


text:
# Usage:

This batch (.bat) once run on a windows machine, launches a series of apps on the computer which easily makes their computer crash. To use this file simply press the green code button on the top right corner and then press download the zip file. Once the download has finished, extract the files. Among the files is allapps.bat, which is the virus file. As soon as the target opens that file it starts opening apps on their pc and the machine crashes.

**Caution:** Do not accidentally run the file on your computer as it will crash your computer.

# -----Legal Disclaimer-----

Usage of appbomber for attacking targets without prior mutual consent is illegal. It's the end user's responsibility to obey all applicable local, state and federal laws. Developers assume no liability and are not responsible for any misuse or damage caused by this program. Only use for educational purposes.

# ------------------------------

license: Unlicense

repository: hacking-in-the-nameofgod/appbomber

repo_name: hacking-in-the-nameofgod/appbomber