CipherGen is a utility which encrypts text using a machine-specific key. It is necessary when adding the Account and License configuration properties to the configuration file. Using encryption keeps this sensitive data private; employing a machine-specific key ensures that the configuration file cannot be copied and used on a different machine.
It is only necessary to run this utility when there is no other option for securely storing the Account and License values. These values are considered sensitive data, and the best practice is to keep them in a password-protected database or other password-protected storage. Should this not be possible, the Adapter's configuration file does support the properties (see About Configuration). In this case, encrypting the values is strongly encouraged.
The executable (CipherGen.exe) must be placed in the same directory as the Avalara.AvaTax.Common.Security.dll.
1. Double-click CipherGen.exe or type "CipherGen.exe" into a command window (where the current directory is the location of the executable). When the application is running, you will be prompted to enter the text to be encrypted:
Input the string to encrypt:
2. Type in the Account number provided by Avalara:
Input the string to encrypt:<PHONE_NUMBER>CipherGen will output the encrypted text and specify the text file into which the encrypted text has been copied:
01000000D08C9DDF0115D1118C7A00C04FC297EB01000000A65E7B2EBC4A2D4881DB3840FDD9380D<PHONE_NUMBER>000000000003660000A800000010000000FF96D7DB0DF30262A3BA42A917AD2AE50000<PHONE_NUMBER>00A0000000100000003D91B0852D9BB22EA4EA1E3086ABC352100000005F560961F88E EDB08440C959190D80D514000000034380E4AE62DC64163D894330C1A1D01D6FD173 The encrypted text was written to the file: C:\Projects\AvaTax\cipher.txt Press Enter key to exit...CipherGen will not overwrite an existing output file. It defaults to "cipher.txt". If this file already exists, it will try to output the encrypted text to "cipher_1.txt". If this file already exists, it will try "cipher_2.text", and so on.
3. Open the file specified, copy the encrypted text, and paste it into the configuration file between the <Account> element tags:
<RequestSecurity type="Avalara.AvaTax.Adapter.RequestSecurity, Avalara.AvaTax.Adapter"> <Account>0100000...D894330C1A1D01D6FD173</Account> <License></License> <Timeout>300</Timeout> </RequestSecurity>The actual encrypted text in the example above has been shortened for readability purposes. The entire text should be copied, unaltered, from the cipher.txt file into the configuration file.
4. To get the encrypted License text, repeat the above steps 1 through 3, entering the License key provided by Avalara when prompted to "Input the string to encrypt:". For example:
Input the string to encrypt:<PHONE_NUMBER>123456 01000000D08C9DDF0115D1118C7A00C04FC297EB01000000A65E7B2EBC4A2D4881DB3840FDD9380D<PHONE_NUMBER>000000000003660000A80000001000000041D97CF14BAC6F30677A703FA60559F70000<PHONE_NUMBER>00A000000010000000C6822F56F4161980F0A12E9516D48D51180000005CF898C06C5D 56B03E347B6700CCC3D3B0D433E90C8D73A81400000031AFA0A70D14C38233C895463A368882ED26 C3BC The encrypted text was written to the file: C:\Projects\AvaTax\cipher_1.txt Press Enter key to exit...
5. Open the file specified, copy the encrypted text, and paste it into the configuration file between the <License> element tags:
<RequestSecurity type="Avalara.AvaTax.Adapter.RequestSecurity, Avalara.AvaTax.Adapter"> <Account>0100000...D894330C1A1D01D6FD173</Account> <License>0100000...0A70D14C38233C895463A368882ED26C3BC</License> <Timeout>300</Timeout> </RequestSecurity>The actual encrypted text in the example above has been shortened for readability purposes. The entire text should be copied, unaltered, from the cipher.txt file into the configuration file.
SDK Overview | About Configuration


mantic UI make use of the fantastic Semantic UI and Fomantic UI frameworks
Please support their projects Semantic UI Fomantic UI
Currently we are heavily working to get all components and features implemented.
To support us, visit our GitHub Repository


Data of Class _oslFileStatus
- uStructSize
- sal_uInt32 uStructSize;
- Summary
- Must be initialized with the size in bytes of the structure before passing it to any function
- uValidFields
- sal_uInt32 uValidFields;
- Summary
- Determines which members of the structure contain valid data
- eType
- oslFileType eType;
- Summary
- The type of the file (file, directory, volume).
- uAttributes
- sal_uInt64 uAttributes;
- Summary
- File attributes
- aCreationTime
- TimeValue aCreationTime;
- Summary
- First creation time in nanoseconds since 1/1/1970. Can be the last modify time depending on
platform or file system.
- aAccessTime
- TimeValue aAccessTime;
- Summary
- Last access time in nanoseconds since 1/1/1970. Can be the last modify time depending on
platform or file system.
- aModifyTime
- TimeValue aModifyTime;
- Summary
- Last modify time in nanoseconds since 1/1/1970.
- uFileSize
- sal_uInt64 uFileSize;
- Summary
- Size in bytes of the file. Zero for directories and volumes.
- ustrFileName
- rtl_uString * ustrFileName;
- Summary
- Case correct name of the file. Should be set to zero before calling
osl_getFileStatus
and released after usage.
- ustrFileURL
- rtl_uString * ustrFileURL;
- Summary
- Full URL of the file. Should be set to zero before calling
osl_getFileStatus
and released after usage.
- ustrLinkTargetURL
- rtl_uString * ustrLinkTargetURL;
- Summary
- Full URL of the target file if the file itself is a link.
Should be set to zero before calling
osl_getFileStatus
and released after usage.
Top of Page
Copyright © 2012, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


喜欢骑公路车、摄影。
骑车最远从上海-杭州
打算健身 但总是练到一半因为各种原因咕咕咕
Ingress 小透明(?) 探员
Love roadbike cycling, photographing.
Personal longest session: Shanghai - Hangzhou
Planned to take some physical training But always giving up halfway
Ingress anonymous(?) agent


core-mark
Businessmodel of Core-Mark
Customer Segments
Core-Mark is a leading wholesale distributor to the convenience retail industry in North America, providing sales, marketing, distribution and logistics services to more than 36,500 customer locations across the US and Canada. The Company has three principal customer segments:
- Traditional convenience stores, comprising a number of major national and super-regional convenience store operators, as well as independently owned convenience stores;
- Alternative retail outlets, comprising grocery stores, drug stores, liquor stores, cigarette and tobacco shops, hotel gift shops, military exchanges, college and corporate campuses, casinos, hardware stores, airport concessions and other specialty and small format stores; and
- Manufacturers, comprising manufacturers of various consumer products. In 2015 Core-Mark’s top ten customers accounted for 37.4% of its net sales, including its largest customer Alimentation Couche-Tard, which accounted for 14.2% of the Company’s total net sales. Other customers include 7-Eleven, Rite Aid, and Murphy USA.
Core-Mark’s principal market is its native US, which accounted in 2015 for more than 90% of its net sales. The Company’s remaining sales were to customers in Canada.
Value Propositions
Core-Mark provides value to its customers in the following ways:
- Its reputation and industry standing, with the Company established as an effective operator within the industry and one of the largest wholesale distributors the North American convenience retail industry;
- Its track record for delivering reliable and efficient services, with the Company operating an efficient distribution and logistics systems for timely delivery of products to customers;
- Its innovative and flexible service offerings, with the Company enabling customers to place small quantity orders, inventory management and access to trade credit, as well as innovative marketing programs, technology solutions, and logistics support services; and
- Its extensive distribution capabilities, with the Company able to service large national chain accounts, through its broad network of logistics and distribution facilities across the US and Canada. ### Channels
Core-Mark operates a website at www.core-mark.com, through which it provides information on its services, company structure, and distribution network. The Company also operates an online customer portal under the name My Core-Mark, through which customers are able to connect with local divisions and retrieve information regarding certain services.
Core-Mark serves its customers through a direct sales and service teams that operate through the Company’s network of offices. The Company’s distribution and logistics services are provided through the Company’s own distribution infrastructure, including 20 distribution centres in the US and four distribution centres in Canada. Core-Mark utilises a proprietary Distribution Centre Management System platform across its distribution network.
Core-Mark also operates four consolidation centre, which buy products from suppliers in bulk and re-distribute the products to distribution centres, as well as two additional facilities as a third party logistics provider.
Customer Relationships
Core-Mark provides a small portion of services to its customers on a self-service basis through its online customer portal. This channel allows customers to manage certain account details and access information without interacting directly with members of the Core-Mark sales team.
Core-Mark’s customer relationships are managed by dedicated relationship management staff and sales and support team, which work closely with customers in order to fully cover the individual needs of each client. The majority of the Company’s sales are made under purchase orders and short-term contracts with convenience retail stores. The Company often agrees multi-year service contracts and seeks to secure recurring business.
Core-Mark provides ongoing support to customers through its online customer portal. Customers are also able to contact support staff directly, and receive personalised responses to enquiries, by filling in an online contact form. The Company also operates social media accounts, including with Facebook and Twitter, through which it is able to interact with customers directly.
Key Activities
Core-Mark operates as a wholesale distributor of products to convenience retail businesses across North America, providing sales, marketing, distribution and logistics services to numerous customers across the US and Canada.
The Company utilizes an extensive network of owned and leased distribution facilities. Core-Mark reports its activities in two geographic segments: US, and Canada. The Company’s product categories include cigarettes, food, candy, other tobacco products, health and beauty products, beverages, and equipment. Core-Mark’s customer base principally comprises traditional convenience stores – including high-profile companies such as 7-Eleven – as well as alternative retailers, including drug stores, liquor stores, cigarette and tobacco shops, hotel gift shops.
Key Partners
Core-Mark collaborates with a range of companies throughout the acquisition and distribution of its products. These partnerships include:
- Supplier and Vendor Partners, comprising suppliers of stock and products, tools, and services, which support the Company’s supply chain and distribution operations; and
- Strategic and Alliance Partners, comprising a range of companies with which the Company shares resources and collaborates on joint projects. Core-Mark’s supplier partnerships include tie-ups with strategically-located dairies, fresh kitchens and bakeries that enable the Company to deliver fresh products to its customers, including sandwiches, cut-fruit, pastries, and bread. The Company is in the process of transitioning portions of its fleet to compressed natural gas, owning and operating two compressed natural gas plants in partnership with US Oil.
Key Resources
Core-Mark’s key resources are its supply chain infrastructure, its distribution infrastructure – including its fleet of vehicles, its IT and communications infrastructure, its sales channels, its partnerships, and its personnel.
The Company owns and leases a number of properties, including 24 distribution centres across the US and Canada, as well as four consolidation centres. The Company also operates several compressed natural gas plants, and has a fleet of 870 tractors, trucks and vans, the majority of which are leased.
Cost Structure
Core-Mark incurs costs in relation to the operation of its supply chain and the acquisition of stock, the operation and maintenance of its distribution and logistics infrastructure, the operation and maintenance of its distribution fleet – including the purchase of fuel, the maintenance of its IT infrastructure, the management of its partnerships, and the retention of its personnel.
In 2015 Core-Mark accrued warehousing and distribution expenses in the amount of $352.60 million, and selling, general and administrative expenses – including the payment of salaries and benefit to its workforce of 6,655 employees across the US and Canada – totaling $196.00 million.
Revenue Streams
Core-Mark generates revenue through the provision of marketing, distribution, and logistics services to the North American convenience retail market. This includes service and sales revenue derived from its core services, as well as shipping and handling fees and related costs.
In 2015 Core-Mark generated total net sales of $11.07 billion, up on the $10.28 billion in sales recorded by the Company the previous year. The Company’s sales are divided into several product categories. The majority of its sales relate to products from its Cigarettes category, which accounted for $7.53 billion in sales for the year. The only other product category that contributed more than $1 billion to the Company’s total net sales was its Food category, which generated $1.59 million in sales in 2015.


<ywlib>
There is a list of all defined in <ywlib>
.
<ywlib-0.hpp>
Almost all contens defined here are constant-evaluable.
| Header Name | Description |
|---|---|
<type.hpp> |
Many template-typenames and template-constants are defined. |
<concept.hpp> |
Many concepts are defined. |
<utility.hpp> |
Many useful template-functions are defined. |
<sarray.hpp> |
A template class, class sarray<T_, N_> (static-array or fixed-size-array) is defined. |
<vector.hpp> |
A template class, class vector<N_> (mathemetical vector) is defined. |
<constr.hpp> |
A template class, class constr<T_> (string class for constant-evaluating) is defined. |
<algorithm.hpp> |
Many useful functions used with sarray<T_, N_> , vecotr<N_> and/or constr<N_> are defined. |
<math.hpp> |
Almost all mathemetical functions are defined. |
<ywlib-1.hpp>
Many fundamental functions/systems are available.
| Header Name | Description |
|---|---|
<darray.hpp> |
A template class, class darray<T_> (dynamic-array or variable-size-array) is defined. |
<string.hpp> |
A template class, class stringy<T_> (string class) is defined. |
<io.hpp> |
Many functions and classes for i/o are defined. |


Class TableDataSource
Represents a datasource based on DataTable class.
Inheritance
Inherited Members
Namespace: FastReport.Data
Assembly: FastReport.OpenSource.dll
Syntax
public class TableDataSource : DataSourceBase, IFRSerializable, IParent
Examples
This example shows how to add a new table to the existing connection:
Report report1;
DataConnectionBase conn = report1.Dictionary.Connections.FindByName("Connection1");
TableDataSource table = new TableDataSource();
table.TableName = "Employees";
table.Name = "Table1";
conn.Tables.Add(table);
Constructors
TableDataSource()
Initializes a new instance of the TableDataSource class with default settings.
Declaration
public TableDataSource()
Properties
Connection
Gets or sets the parent DataConnectionBase object.
Declaration
public DataConnectionBase Connection { get; set; }
Property Value
| Type | Description |
|---|---|
| DataConnectionBase |
Parameters
Gets a collection of parameters used by "select" command.
Declaration
public CommandParameterCollection Parameters { get; set; }
Property Value
| Type | Description |
|---|---|
| CommandParameterCollection |
Remarks
You must set up this property if the SQL query that you've specified in the SelectCommand property contains parameters.
You can pass a value to the SQL parameter in two ways.
The right way is to define a report parameter. You can do this in the "Data" window. Once you have defined the parameter, you can use it to pass a value to the SQL parameter. To do this, set the SQL parameter's Expression property to the report parameter's name (so it will look like [myReportParam]). To pass a value to the report parameter from your application, use the SetParameterValue(String, Object) method.
The other way (unrecommended) is to find a datasource object and set its parameter from a code:
TableDataSource ds = report.GetDataSource("My DataSource Name") as TableDataSource;
ds.Parameters[0].Value = 10;
This way is not good because you hardcode the report object's name.
QbSchema
Gets or sets the query builder schema.
Declaration
public string QbSchema { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
This property is for internal use only.
SelectCommand
Gets or sets SQL "select" command.
Declaration
public string SelectCommand { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
If this command contains parameters, you should specify them in the Parameters property.
StoreData
Gets or sets a value that determines whether it is necessary to store table data in a report file.
Declaration
public bool StoreData { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Table
Gets or sets the underlying DataTable object.
Declaration
public DataTable Table { get; set; }
Property Value
| Type | Description |
|---|---|
| DataTable |
TableData
Gets or sets the table data.
Declaration
public string TableData { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Remarks
This property is for internal use only.
TableName
Gets or sets the table name.
Declaration
public string TableName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
AddChild(Base)
Adds a child object to this object's childs.
Declaration
public override void AddChild(Base child)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child | Object to add. |
Overrides
CanContain(Base)
Gets a value indicating that this object can contain the specified child object.
Declaration
public override bool CanContain(Base child)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child | Child object. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if this object can contain the specified child object; otherwise, false. |
Overrides
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
Overrides
GetChildObjects(ObjectCollection)
Gets a list of child objects.
Declaration
public override void GetChildObjects(ObjectCollection list)
Parameters
| Type | Name | Description |
|---|---|---|
| ObjectCollection | list | List to fill with values. |
Overrides
GetValue(Column)
Gets data stored in a specified column.
Declaration
protected override object GetValue(Column column)
Parameters
| Type | Name | Description |
|---|---|---|
| Column | column | The column. |
Returns
| Type | Description |
|---|---|
| System.Object | An object that contains the data. |
Overrides
InitializeComponent()
Initializes the object before running a report.
Declaration
public override void InitializeComponent()
Overrides
Remarks
This method is used by the report engine, do not call it directly.
InitSchema()
Initializes the datasource schema.
Declaration
public override void InitSchema()
Overrides
Remarks
This method is used to support the FastReport.Net infrastructure. Do not call it directly.
LoadData(ArrayList)
Loads the datasource with data.
Declaration
public override void LoadData(ArrayList rows)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Collections.ArrayList | rows | Rows to fill with data. |
Overrides
Remarks
This method is used to support the FastReport.Net infrastructure. Do not call it directly.
RefreshTable()
Refresh the table schema.
Declaration
public void RefreshTable()
RemoveChild(Base)
Removes a specified object from this object's childs.
Declaration
public override void RemoveChild(Base child)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | child |
Overrides
Serialize(FRWriter)
Serializes the object.
Declaration
public override void Serialize(FRWriter writer)
Parameters
| Type | Name | Description |
|---|---|---|
| FRWriter | writer | Writer object. |
Overrides
Remarks
Do not call this method directly. You should override it if you are developing a new component for FastReport.
This method is called when the object needs to save the state. It may happen when:
- saving the report to the file or stream;
- saving the report to the designer's undo buffer;
- assigning the object to another object using the Assign(Base) or AssignAll(Base) methods;
- saving the object to the designer's clipboard;
- saving the object to the preview (when run a report).
SetParent(Base)
Sets the object's parent.
Declaration
public override void SetParent(Base value)
Parameters
| Type | Name | Description |
|---|---|---|
| Base | value | New parent. |
Overrides
Remarks
This method is for internal use only. You can use it if you are developing a new component for FastReport. Override it to perform some actions when the parent of an object is changing. This method checks that parent can contain a child.
Exceptions
| Type | Condition |
|---|---|
| ParentException | Parent object cannot contain this object. |


Check out financial metrics about public companies
Talk about investing in stock among peers
Be able to gather opinions and make a solid investment


Melissa Day 5/24/2013 Upgrade of Andrew Diamond's quiverc2wcmap to generate a quiver plot with arrows colored according to vector magnitude. Functional differences from quiverc2wcmap: 1) Allows user to specify colormap boundaries using 'bound': changes colorbar axes AND corresponding vector coloring (much more useful for intercomparison of datasets) 2) Improved fidelity to magnitude colors in large datasets (at a cost of increased computation time...) Uses some improvements from DS's vfield_color 3) Small clarifications added Example: x = rand(1,50).*100; y = rand(1,50).*100; u = rand(1,50) .* 10; v = rand(1,50) .* 10; scale = 0; figure; quiverwcolorbar(x',y',u',v',scale); %compare to: figure; quiverwcolorbar(x',y',u',v',scale,'bounds',[0 10]); ---------------- function hh = quiverc2wcmap(varargin) Andrew Diamond 3/17/2005 This is based off of Tobias H�fken which was based off of Bertrand Dano keeping with their main intent to show a color w/r to magnitude quiver plot while maintaining a large amount of quiver API backwards compatability. Functional differences from quiverc2: 1) This works under 6.5.1 2) It handles NaNs 3) It draws a colormap that is w/r to the quiver magnitudes (hard coded to 20 segments of the colormap as per quiverc2 - seems fine for a quiver). 4) Various bug fixes (I think) In order to do this I needed some small hacks on 6.5.1's quiver to take a color triplet. I have included as part of this file in a subfunction below. ---------------- Comments from quiverc2 changed Tobias H�fken 3-14-05 totally downstripped version of the former split input field into n segments and do a quiver qhich each of them
0001 function hh = quiverwcolorbar(varargin) 0002 % Melissa Day 5/24/2013 0003 % Upgrade of Andrew Diamond's quiverc2wcmap to generate a quiver plot 0004 % with arrows colored according to vector magnitude. 0005 % Functional differences from quiverc2wcmap: 0006 % 1) Allows user to specify colormap boundaries using 'bound': changes 0007 % colorbar axes AND corresponding vector coloring 0008 % (much more useful for intercomparison of datasets) 0009 % 2) Improved fidelity to magnitude colors in large datasets 0010 % (at a cost of increased computation time...) 0011 % Uses some improvements from DS's vfield_color 0012 % 3) Small clarifications added 0013 % Example: 0014 % x = rand(1,50).*100; 0015 % y = rand(1,50).*100; 0016 % u = rand(1,50) .* 10; 0017 % v = rand(1,50) .* 10; 0018 % scale = 0; 0019 % figure; quiverwcolorbar(x',y',u',v',scale); %compare to: 0020 % figure; quiverwcolorbar(x',y',u',v',scale,'bounds',[0 10]); 0021 %---------------- 0022 % function hh = quiverc2wcmap(varargin) 0023 % Andrew Diamond 3/17/2005 0024 % This is based off of Tobias H�fken which was based off of Bertrand Dano 0025 % keeping with their main intent to show a color w/r to magnitude quiver plot 0026 % while maintaining a large amount of quiver API backwards compatability. 0027 % Functional differences from quiverc2: 0028 % 1) This works under 6.5.1 0029 % 2) It handles NaNs 0030 % 3) It draws a colormap that is w/r to the quiver magnitudes (hard coded to 0031 % 20 segments of the colormap as per quiverc2 - seems fine for a quiver). 0032 % 4) Various bug fixes (I think) 0033 % In order to do this I needed some small hacks on 6.5.1's quiver to take a 0034 % color triplet. I have included as part of this file in a subfunction below. 0035 %---------------- 0036 % Comments from quiverc2 0037 % changed Tobias H�fken 3-14-05 0038 % totally downstripped version of the former 0039 % split input field into n segments and do a quiver qhich each of them 0040 0041 % Modified version of Quiver to plots velocity vectors as arrows 0042 % with components (u,v) at the points (x,y) using the current colormap 0043 0044 % Bertrand Dano 3-3-03 0045 % Copyright 1984-2002 The MathWorks, Inc. 0046 0047 % changed T. H�fken 14.03.05, for high data resolution 0048 % using fixed color "spacing" of 20 0049 0050 %QUIVERC Quiver color plot. 0051 % QUIVERC(X,Y,U,V) plots velocity vectors as arrows with components (u,v) 0052 % at the points (x,y). The matrices X,Y,U,V must all be the same size 0053 % and contain corresponding position and velocity components (X and Y 0054 % can also be vectors to specify a uniform grid). QUIVER automatically 0055 % scales the arrows to fit within the grid. 0056 % 0057 % QUIVERC(U,V) plots velocity vectors at equally spaced points in 0058 % the x-y plane. 0059 % 0060 % QUIVERC(U,V,S) or QUIVER(X,Y,U,V,S) automatically scales the 0061 % arrows to fit within the grid and then stretches them by S. Use 0062 % S=0 to plot the arrows without the automatic scaling. 0063 % 0064 % QUIVERC(...,LINESPEC) uses the plot linestyle specified for 0065 % the velocity vectors. Any marker in LINESPEC is drawn at the base 0066 % instead of an arrow on the tip. Use a marker of '.' to specify 0067 % no marker at all. See PLOT for other possibilities. 0068 % 0069 % QUIVERC(...,'filled') fills any markers specified. 0070 % 0071 % H = QUIVERC(...) returns a vector of line handles. 0072 % 0073 % Example: 0074 % [x,y] = meshgrid(-2:.2:2,-1:.15:1); 0075 % z = x .* exp(-x.^2 - y.^2); [px,py] = gradient(z,.2,.15); 0076 % contour(x,y,z), hold on 0077 % quiverc(x,y,px,py), hold off, axis image 0078 % 0079 % See also FEATHER, QUIVER3, PLOT. 0080 % Clay M. Thompson 3-3-94 0081 % Copyright 1984-2002 The MathWorks, Inc. 0082 % $Revision: 5.21 $ $Date: 2002/06/05 20:05:16 $ 0083 %------------------------------------------------------------- 0084 nin = nargin; %number of inputs 0085 0086 % error(nargchk(2,5,nin)); 0087 error(nargchk(2,7,nin)); %added +2 to maxargs to account for 'bounds' add 0088 0089 % Check numeric input arguments 0090 if nin<4, % quiver(u,v) or quiver(u,v,s) 0091 [msg,x,y,u,v] = xyzchk(varargin{1:2}); 0092 else % quiver(x,y,u,v) and beyond 0093 [msg,x,y,u,v] = xyzchk(varargin{1:4}); 0094 end 0095 if ~isempty(msg), error(msg); end 0096 0097 scale=1; % This is the default I think. 0098 if(nin == 3) % quiver(u,v,s) 0099 if(isscalar(varargin{nin})) 0100 scale = varargin{nin}; 0101 end 0102 elseif(nin >= 5) % quiver(x,y,u,v,s) or quiver(x,y,u,v,s,'bounds',[start end]) 0103 if(isscalar(varargin{5})) 0104 scale = varargin{5}; 0105 end 0106 end 0107 0108 %-------------Define matrix of vector magnitudes------------- 0109 % Define matrix of vector magnitudes 0110 vr = sqrt(u.^2+v.^2); 0111 0112 % From quiverc2wcmap: 0113 % if data has Nan, don't let it contaminate the computations that segment the 0114 % data; I could just do this with vr and then get clever with the indices but 0115 % this make for easy debugging and as this is a graphics routine the computation 0116 % time is completely irrelevant. 0117 nonNaNind = find(~isnan(vr(:))); 0118 xyuvvrNN = [x(nonNaNind),y(nonNaNind),u(nonNaNind),v(nonNaNind),vr(nonNaNind)]; 0119 [xyuvvrNNs, xyuvvrNNsi] = sortrows(xyuvvrNN,5); 0120 0121 % From quiverc2wcmap, no longer necessary 0122 % n = 20; %number of colors 0123 % CC = colormap; 0124 % iCCs=round(linspace(1,size(CC,1),n)); 0125 % iData = round(linspace(0,size(xyuvvrNNs,1),n+1)); 0126 % figure; 0127 0128 %-------------Generate colorbar------------- 0129 % Includes a clever way to generate (and subsequently hide) an image that 0130 % is required for colorbar without running out of memory for large datasets. 0131 % 0132 % Condensed comments from quiverc2wcmap: 0133 % In 6.5.1 if you ever want a colorbar tick marks to reflect real data ranges 0134 % (versus just the indices of a colormap) then there apparently has to be an 0135 % image somewhere in the figure. Of course, I don't want an image but I figured 0136 % I just make it invisible and then draw the quiver plot over it. 0137 % Unfortunately, it seems that colorbar uses caxis to retrive the data range in 0138 % the image and for invisible images it always seems to be 0 UNLESS you 0139 % explictly reset the caxis. 0140 % This will work but then the axis will be oversized to accomodate the image 0141 % because images have their first and last vitual "pixels" CENTERED around the 0142 % implicit or explict xmin,xmax,ymin,ymax (as per imagesc documentation) but the 0143 % start and end of each of these "pixels" is +/- half a unit where the unit 0144 % corresponds to subdividing the limits by the number of pixels (-1). Given 0145 % that formula and given my invisible 2x2 image for which it is desired to 0146 % diplay in an axis that ISN'T oversized (i.e. min(x), max(x), min(y),max(y)) it 0147 % is possible to solve for the limits (i.e. an artifically reduced limit) 0148 % that need to be specified for imagesc to make its final oversized axis to be the 0149 % non oversized axis that we really want. 0150 % xa,xb,ya,yb compenstates for the axis extention given by imagesc to make 0151 % pixels centered at the limit extents (etc.). Note, this "easy" 0152 % formula would only work for 2x2 pixel images. 0153 0154 xs = min(x); %x(1); 0155 xf = max(x); %x(end) 0156 xa = (3 * xs + xf)/4; 0157 xb = (3 * xf + xs)/4; 0158 ys = min(y); %y(1); 0159 yf = max(y); %y(end) 0160 ya = (3 * ys + yf)/4; 0161 yb = (3 * yf + ys)/4; 0162 0163 % Determine magnitude min/max (which is reflected in colorbar) 0164 colormin = min(xyuvvrNNs(:,5)); %column 5 is NaN-cleared vr 0165 colormax = max(xyuvvrNNs(:,5)); 0166 0167 % Allow user to edit bounds using "'bounds',[colormin colormax]" input 0168 for k=1:nin 0169 if (k~=nin) && (length(varargin{k})==6) && strcmp(varargin{k},'bounds') 0170 bounds = varargin{k+1}; 0171 if isempty(bounds), error('Specify colormap boundaries'); end 0172 colormin = bounds(1); 0173 colormax = bounds(2); 0174 end 0175 end 0176 % mapbounds = reshape(xyuvvrNNs([1,end;1,end],5),2,2); %from quiverc2wcmap 0177 mapbounds = [colormin colormax; colormin colormax]; 0178 h=imagesc([xa,xb],[ya,yb],mapbounds); 0179 set(h,'visible','off'); 0180 0181 % Prep colorbar 0182 rang = (colormax-colormin)/colormax; 0183 ticknum = 6; %if you want to toggle number of ticks on colorbar 0184 incr = rang./(ticknum-1); 0185 B = [colormin/colormax:incr:1]; 0186 B = B.*colormax; 0187 C = sprintf(['%4.2e',repmat([' \n%4.2e'], 1, ticknum)],B); 0188 C = str2num(C); 0189 caxis([colormin colormax]) 0190 colorbar('EastOutside','ytick',B,'yticklabel',C,... 0191 'ticklength',[0.04 0.1],'YLim',[B(1) B(ticknum)],'FontSize',20) 0192 0193 % In quiverc2wcmap this loop plotted for each color level (n=20) and was very 0194 % fast, but I found it did not plot some large data sets with enough color 0195 % accuracy. Switched the loop to examine each data point individually. 0196 % Takes longer but I'm more confident that the colors are correct. Note: 0197 % much of this overhaul was inspired by DS's vfield_color. 0198 hold on; 0199 cmap = jet(64); %toggle type of colormap 0200 CC = colormap(cmap); 0201 cm_stepsize = (colormax-colormin)/length(CC); 0202 for it=1:size(xyuvvrNNs,1) %takes ~13 seconds for a 8730-point dataset 0203 % Some quiverc2wcmap fragments for reference: 0204 % for it=1:n %10x faster, but may not be accurate 0205 % c = CC(iCCs(it),:); %colormap([1:64](it),:) %ie "This RGB color row =" 0206 % si = iData(it)+1; %[1:size(data)](it)+1; %ie "This start row" 0207 % ei = iData(it+1); %[1:size(data)](it+1); %ie "This end row" 0208 % hh=quiver(xyuvvrNNs(si:ei,1),xyuvvrNNs(si:ei,2),... 0209 % xyuvvrNNs(si:ei,3),xyuvvrNNs(si:ei,4),scale*it/n,'Color',c) 0210 cm_index = floor( (xyuvvrNNs(it,5) - colormin) / ( cm_stepsize ) ) + 1; 0211 if cm_index == 1 %in case colormin is zero 0212 c = CC(cm_index,:); 0213 elseif cm_index > length(CC) %in case max(xyuvvrNNs) > colormax 0214 cm_index = length(CC); 0215 c = CC(cm_index,:); 0216 elseif cm_index <= 0 %in case min(xyuvvrNNs) < colormin 0217 cm_index = 1; 0218 c = CC(cm_index,:); 0219 else 0220 cm_index = cm_index-1; 0221 c = CC(cm_index,:); 0222 end 0223 hh=quiver(xyuvvrNNs(it,1),xyuvvrNNs(it,2),... 0224 xyuvvrNNs(it,3),xyuvvrNNs(it,4),scale,'Color',c); 0225 end 0226 0227 0228 %----------Rest of document is from quiverc2wcmap--------------- 0229 % This is Matlab's 6.5.1 quiver. I figure that ensures a fair amouint of backward 0230 % compatibility but I needed to hack it to allow a 'Color' property. Obviously 0231 % a person could do more. 0232 0233 function hh = quiver(varargin) 0234 %QUIVER Quiver plot. 0235 % QUIVER(X,Y,U,V) plots velocity vectors as arrows with components (u,v) 0236 % at the points (x,y). The matrices X,Y,U,V must all be the same size 0237 % and contain corresponding position and velocity components (X and Y 0238 % can also be vectors to specify a uniform grid). QUIVER automatically 0239 % scales the arrows to fit within the grid. 0240 % 0241 % QUIVER(U,V) plots velocity vectors at equally spaced points in 0242 % the x-y plane. 0243 % 0244 % QUIVER(U,V,S) or QUIVER(X,Y,U,V,S) automatically scales the 0245 % arrows to fit within the grid and then stretches them by S. Use 0246 % S=0 to plot the arrows without the automatic scaling. 0247 % 0248 % QUIVER(...,LINESPEC) uses the plot linestyle specified for 0249 % the velocity vectors. Any marker in LINESPEC is drawn at the base 0250 % instead of an arrow on the tip. Use a marker of '.' to specify 0251 % no marker at all. See PLOT for other possibilities. 0252 % 0253 % QUIVER(...,'filled') fills any markers specified. 0254 % 0255 % H = QUIVER(...) returns a vector of line handles. 0256 % 0257 % Example: 0258 % [x,y] = meshgrid(-2:.2:2,-1:.15:1); 0259 % z = x .* exp(-x.^2 - y.^2); [px,py] = gradient(z,.2,.15); 0260 % contour(x,y,z), hold on 0261 % quiver(x,y,px,py), hold off, axis image 0262 % 0263 % See also FEATHER, QUIVER3, PLOT. 0264 0265 % Clay M. Thompson 3-3-94 0266 % Copyright 1984-2002 The MathWorks, Inc. 0267 % $Revision: 5.21 $ $Date: 2002/06/05 20:05:16 $ 0268 0269 % Arrow head parameters 0270 alpha = 0.33; % Size of arrow head relative to the length of the vector 0271 beta = 0.33; % Width of the base of the arrow head relative to the length 0272 autoscale = 1; % Autoscale if ~= 0 then scale by this. 0273 plotarrows = 1; % Plot arrows 0274 sym = ''; 0275 0276 filled = 0; 0277 ls = '-'; 0278 ms = ''; 0279 col = 'b'; 0280 0281 nin = nargin; 0282 ColorSpecInd = find(strcmpi(varargin, 'color')); 0283 if(length(ColorSpecInd)==1 & nin > ColorSpecInd) 0284 col = varargin{ColorSpecInd+1}; 0285 varargin = varargin([1:ColorSpecInd-1,ColorSpecInd+2:nin]); 0286 nin = nin-2; 0287 end 0288 % Parse the string inputs 0289 while isstr(varargin{nin}), 0290 vv = varargin{nin}; 0291 if ~isempty(vv) & strcmp(lower(vv(1)),'f') 0292 filled = 1; 0293 nin = nin-1; 0294 else 0295 [l,c,m,msg] = colstyle(vv); 0296 if ~isempty(msg), 0297 error(sprintf('Unknown option "%s".',vv)); 0298 end 0299 if ~isempty(l), ls = l; end 0300 if ~isempty(c), col = c; end 0301 if ~isempty(m), ms = m; plotarrows = 0; end 0302 if isequal(m,'.'), ms = ''; end % Don't plot '.' 0303 nin = nin-1; 0304 end 0305 end 0306 0307 error(nargchk(2,5,nin)); 0308 0309 % Check numeric input arguments 0310 if nin<4, % quiver(u,v) or quiver(u,v,s) 0311 [msg,x,y,u,v] = xyzchk(varargin{1:2}); 0312 else 0313 [msg,x,y,u,v] = xyzchk(varargin{1:4}); 0314 end 0315 if ~isempty(msg), error(msg); end 0316 0317 if nin==3 | nin==5, % quiver(u,v,s) or quiver(x,y,u,v,s) 0318 autoscale = varargin{nin}; 0319 end 0320 0321 % Scalar expand u,v 0322 if prod(size(u))==1, u = u(ones(size(x))); end 0323 if prod(size(v))==1, v = v(ones(size(u))); end 0324 0325 if autoscale, 0326 % Base autoscale value on average spacing in the x and y 0327 % directions. Estimate number of points in each direction as 0328 % either the size of the input arrays or the effective square 0329 % spacing if x and y are vectors. 0330 if min(size(x))==1, n=sqrt(prod(size(x))); m=n; else [m,n]=size(x); end 0331 delx = diff([min(x(:)) max(x(:))])/n; 0332 dely = diff([min(y(:)) max(y(:))])/m; 0333 del = delx.^2 + dely.^2; 0334 if del>0 0335 len = sqrt((u.^2 + v.^2)/del); 0336 maxlen = max(len(:)); 0337 else 0338 maxlen = 0; 0339 end 0340 0341 if maxlen>0 0342 autoscale = autoscale*0.9 / maxlen; 0343 else 0344 autoscale = autoscale*0.9; 0345 end 0346 u = u*autoscale; v = v*autoscale; 0347 end 0348 0349 ax = newplot; 0350 next = lower(get(ax,'NextPlot')); 0351 hold_state = ishold; 0352 0353 % Make velocity vectors 0354 x = x(:).'; y = y(:).'; 0355 u = u(:).'; v = v(:).'; 0356 uu = [x;x+u;repmat(NaN,size(u))]; 0357 vv = [y;y+v;repmat(NaN,size(v))]; 0358 0359 % h1 = plot(uu(:),vv(:),[col ls]); 0360 h1 = plot(uu(:),vv(:),ls,'Color',col); 0361 0362 if plotarrows, 0363 % Make arrow heads and plot them 0364 hu = [x+u-alpha*(u+beta*(v+eps));x+u; ... 0365 x+u-alpha*(u-beta*(v+eps));repmat(NaN,size(u))]; 0366 hv = [y+v-alpha*(v-beta*(u+eps));y+v; ... 0367 y+v-alpha*(v+beta*(u+eps));repmat(NaN,size(v))]; 0368 hold on 0369 % h2 = plot(hu(:),hv(:),[col ls]); 0370 h2 = plot(hu(:),hv(:),ls,'Color',col); 0371 else 0372 h2 = []; 0373 end 0374 0375 if ~isempty(ms), % Plot marker on base 0376 hu = x; hv = y; 0377 hold on 0378 % h3 = plot(hu(:),hv(:),[col ms]); 0379 h3 = plot(hu(:),hv(:),ls,'Color',col); 0380 if filled, set(h3,'markerfacecolor',get(h1,'color')); end 0381 else 0382 h3 = []; 0383 end 0384 0385 if ~hold_state, hold off, view(2); set(ax,'NextPlot',next); end 0386 0387 if nargout>0, hh = [h1;h2;h3]; end 0388 0389 0390 0391 function retval = isscalar(m) 0392 retval = prod(size(m)) == 1;


A place for general developer talk – for everyone! | Documentation https://developers.komodoplatform.com | MoreDev Docs - https://docs.komodoplatform.com | Mastering CryptoConditions - https://github.com/KomodoPlatform/Mastering_CryptoConditions
100 messages
Before 05-Dec-19 12:00 AM
grewalsatinder28-Mar-19 10:54 AM
got another hint/angle to try, thanks to person helping in comments.
dukeleto28-Mar-19 01:22 PM
@grewalsatinder explain your problem to me, a dummy that doesn't understand Go
this must be why I hear people say "don't write web apps in Go"
what are some methods of getting data from multiple sources and choosing just one?
is there libraries that exist for this, e.g.
datasources[ src1, src2, src3, src4 ];
getData.usingMethodFirstToRespond(datasources);
getData.usingMethodFilteredByJurisdiction(datasources, filter);
Does such a toolkit exist, don't care what programming language. Likely perl has something if i were to place a bet.
jl777c29-Mar-19 08:01 AM
make a list of urls, for each one have a JSON converter to standard format, then aggregate
1
KomodoWorld29-Mar-19 01:35 PM
Lately I've seen some attention for this paper, it's very much over my head but I post here for reference
https://rainbownet.work/RainbowNetwork.pdfThis paper presents the Rainbow Network, a design for an off-chain non-custodial exchange and payment network supporting any liquid asset. The Rainbow Network allows a user to trade, lend, borrow, send, and receive any liquid asset, entirely off-chain, while having only one on-chain payment channel collateralized by a single asset. The network is composed of Rainbow channels, a variant of payment channels where settlement balances are computed based on the current prices of other assets. This paper presents two constructions of Rainbow channels: one where the parties to each channel agree on a price oracle, and a more limited versionthat does not require a trusted price oracle. The latter construction can be implemented on top of any bidirectional payment channel, such as the Bitcoin payment channels used in the Lightning Network(edited)
dukeleto30-Mar-19 03:03 AM
@mylo I would use the grep Perl builtin to filter out things from an array, like grep { is_correct_jurisdiction($_) } @datasources
1
@KomodoWorld i see a lot of ETH-handwaiving in that paper, but I can't make much sense of it
Alright30-Mar-19 05:26 AM
@ComputerGenie 👴👴👴 man idk what to tell you, the example you showed me worked as expected(edited)
unless you can give me another case in which it doesn't work, not sure what to do
18Nbe... is definitely the corresponding BTC addy for RGenie though
I can tell you that
ComputerGenie 👴👴👴30-Mar-19 05:28 AM
yes, but the key the script gives doesn't get 18Nbe in the wallet
Alright30-Mar-19 05:28 AM
secp256k1 collision or op error
which is more likely
ComputerGenie 👴👴👴30-Mar-19 05:29 AM
well it's not op err, even I can't fek up copy/paste the exact same way 17 times
I'm very new to Go language and trying to wrap my head around channels. To clear my understanding I have watched video tutorials, read some books, but I'm still feeling confused when comes to pract...
2
@dukeleto
Now that it's solved in my example code, I need to test it if it really works with my rogue app
I really hope the same method works. It should!
dukeleto01-Apr-19 09:51 AM
One interesting thing that all of these languages have in common is that they are all being sponsored by major companies: Google started Go, Microsoft with TypeScript, JetBrains with Kotlin and Mozilla with Rust.
JetBrains is a cutting-edge software vendor specializing in the creation of intelligent development tools, including IntelliJ IDEA â€“ the leading Java IDE, and the Kotlin programming language.
never used it, but some people like it
jorian01-Apr-19 10:34 AM
it's basically the only proper IDE when you develop stuff with Java
my professors still use Eclipse, but that application hasn't seen updates in years
A revolutionary 49-inch dual QHD curved monitor with ultra-wide views, multitasking features and seamless connectivity immerses you in your work.
1
dukeleto01-Apr-19 04:04 PM
@webworker01 yes, it's a tough choice to spend in a bear market, but I know it will increase my productivity
@jorian i would need it to wrap around my whole body at that price
good example of why jl777's decision to remove Sprout support was a good idea: Zcash is still finding and fixing important bugs in Sprout: https://github.com/zcash/zcash/pull/3897
I am very excited for Hush to be a pure-Sapling chain with not a single Sprout utxo/transaction on it. It might be one of the first?(edited)
jl777c01-Apr-19 04:22 PM
yes
dukeleto01-Apr-19 05:03 PM
I didn't call out VBK specifically because this is a much larger problem, and we will see many more VBK's if we ride another bull market soon. We need to stamp out the idea that closed source at any point is remotely reasonable: https://twitter.com/dukeleto/status/1112762071492386817
Let's talk about closed source blockchain technology and cryptocoins.
How is this even a thing in 2019?
How do these people not get laughed out of the room?
How can you entrust your business, financial sovereignty or Proof-of-Work algorithm to closed source code? ...
We're still hovering right around 50k unconfirmed transactions, in case you were curious. 49k right now, but we keep ranging between 42k & 52k or so. Not quite piling too much more on, but also not processing the backlog.
grewalsatinder03-Apr-19 08:26 AM
@radix42 hey Jane, if I need to compile komodo for arm64, which repo/branch I need to compile?
anyone have a "suggested reading" for including static QT depends in OSX?
radix4203-Apr-19 02:43 PM
My source is linked on my site at janemercer.us
If you look at the duff between the branch linked there and mainline kmd you will see that it's pretty far away
I have attached gotta go get bfast and coffee, I will bbiab
Damn autocorrect
Need to eat
radix4203-Apr-19 03:52 PM
I started out doing things the Right Way, @grewalsatinder, using conditionals to tell if its building on/for x86 or not, but kept failing at that in one way or another, as I am not a C/C++ diety like jl777 or MikeT, so I punted to scraping out the AES optimzed VerusHash code, which is what was giving it fits (or rather, the building of it, its still in the branch)
dukeleto03-Apr-19 04:27 PM
@radix42 good to see you around, stranger
radix4203-Apr-19 04:39 PM
you too!
I've been in the Pirate discord more than here lately
logged into both always of course
but you know me i live on twitter....i live tweet ports lol
grewalsatinder03-Apr-19 05:11 PM
I know it's hard to fix the ports for arm64 mate. but feel sad it's not there in jl777 branch
Mr.Cryptodude04-Apr-19 08:27 PM
Hey guys, where could I start learning programing on KMD?


I regret to say that an account suggesting IBM was researching @KomodoPlatform is definitely phishy
A little investigation found it's a bought account & there's no such people working for IBM. Fake Linkedin, stolen photo, etc..
Weird, what kind of game are they playing? ...


UGWA has been updated for the 2020-21 school year.
Here's a tip for memorizing the schedule that might cease to exist on September 11th later this year:
- All periods are 30 minutes on Monday and 75 minutes on other days!
- Announcements infect the last numbered period before lunch and adds an extra 5 minutes! (Hint: SELF is not a numbered period.)
- Days with SELF have brunch; other non-Mondays have breaks!
- When in doubt, just remember that Thursday ends at 2:35 pm!
Because the schedule applies to all PAUSD secondary schools, Paly and middle schools can also use UGWA for time management and keeping track of assignments.


Cosy Coffee in Crawley
We are an independent coffee shop serving speciality coffee, home-made cakes and cookies, and all-day brunch on weekends, all in a cosy shop in the heart of historic Crawley. On Friday and Saturday nights we also offer cheese and meat platters with fine wines. We are new, so come say hello and meet our head of customer care - resident bulldog Arthur!


|
After transcription, eukaryotic mRNA precursors contain protein-coding exons and noncoding introns. In the following splicing, introns are excised and exons are joined by a macromolecular complex, the spliceosome. The standard spliceosome is made up of five small nuclear ribonucleoproteins (snRNPs), U1, U2, U4, U5, and U6 snRNPs, and several spliceosome-associated proteins (SAPs). Spliceosomes are not a simple stable complex, but a dynamic family of particles that assemble on the mRNA precursor and help fold it into a conformation that allows transesterification to proceed. Various spliceosome forms (e.g. A-, B- and C-complexes) have been identified. |


{% if communities|length != 0 %} Show each person with photos they appear in (hover over the photo number to view the photo) {% else %} Unfortunately, we are not able to access any tagged person from your photos. Please use our template instead. {% endif%}


var result = doSomething()'
These are used for starting a function and can be used to pass values or strings called parameters to the function for example function doSomething(a, b)
. They can also be used to control the order of arithmetic.
For example grouping expressions a = (4 + 3) * 2
or containing expressions (a < 10)
In Javascript brackets are used for either accessing data from an array or properties of an object. The process behind this is called bracket notation.
As an example, we can use var data = array[0]
to get access to the first data in an array. You can use objectname["property"]
, to access an object that stores data through properties.
The object name and property can also be used in a looping condition for example board.cells[i].isMine
, to access a number of mines until you can't.
Braces are used to let you know where the start and end of the function is, for example, function doSomething() {code}. They are also used to seperate blocks of code within a function for example a for loop in function doSomething() { for () {} }
.
Another use of braces can be for objects for example object = {property: [value,..]}
Single quotes are mostly used with classes and events in terms of how they respond to user action. They are used for strings, which are pieces of data, in the form of a sequence of characters, that can be made up of words or numbers. Single quotes can also be used to put HTML within Javascript and they can be used within double quotes to highlight text within text.
Double quotes are used for strings to display text. The main use of double quotes in javascript is when we want to create a variable and give it a value.
Double quotes can be used in the same way as single quotes for displaying text, however the main difference is that single quotes can go either inside or outside double quotes.
Double quotes cannot go inside double quotes, unless they have an escape character with a backslash \ . For example "I \"love\" Javascript"


Bases: xierpa3.components.column.Column
alias of Constants
Build the column. Note that although the “div” suggest that it is just HTML building there, the method get called both with b as CssBuilder and as HtmlBuilder. Each builder will filter out the appropriate attributes and translates it into its own syntax. The HTML tags generated by the article are set in CSS by the empty statements.
Build the single CSS for all expected tags in an article that is answered by self.adapter. We cannot check on that here, since the content may vary and even is hidden by e.g. calls to a PHP adapter.
Bases: xierpa3.components.theme.Theme
The TextColumn generates an HTML file with a column of random blurb text. Double click the generated file or drag to a browser see the result.
alias of Constants
Create a theme site with just one single template home page. Answer a list of page instances that are used as templates for this site.
Answer the single basis style that will be defined as overall CSS, before specific block definitions start.
The instance of this class builds CSS and HTML files at the optional path root. If not defined, then the default ~/Desktop/Xierpa3Examples/[component.name] is used as export path, as set by Builder.DEFAULT_ROOTPATH


Normal level text that is flush,
with a second line flush as well.
Now this is indented
This is even more indented. Like way to much!
AND HOW!
This will be rendered as code. Since it's indented alone. But yea, you can indent things.
In any number of ways.
It just looks at the start of the line for sets of spaces or tabs.


• Managing all strategic and operational activities regarding ATX Hack for Change
• Formulating local, national and global community awareness and engagement goals through the creation of a robust event sponsor and partner program
• Overseeing brand management and marketing to align with event development and growth; redesigned logo and materials for 2016 event
• Building and managing the website; from writing original content, design to drawing technical wireframes
• Implementing social media strategy and monitoring all multimedia content on all social media platforms
• Developing a repository of operational materials for long term, sustainable project success
Youtube Link
• Assisting with event logistics on Digi Girlz; a Microsoft YouthSpark program, which gives middle and high school girls opportunities to learn about careers in technology and computer science.
• Presenting civic hacking opportunities for future engagement to make an impact on local and global social issues
Youtube Link
• Oversees strategic communication planning and all written/multimedia materials
• Directs community outreach and OIT showcase events at SXSWedu
• Directs the in-house production of communication materials: print, web and video
• Collaboratively leads the development and execution of strategies for enhancing cross-functional communication within OIT and with external-facing entities
• Demonstrated OK, AR, and TX stakeholder concern on the Regional Haze (RH) rule to U.S. EPA
• Orchestrated volunteer fly-in to EPA HQ in Washington, D.C. to highlight RH work
• Project Manager for both Austin and Oklahoma City RH EPA Public Hearings
• Project Manager and Trainer for the Sierra Club Apprenticeship Program 2014-15
• Creator of @BeyondCoalTexas and updated the Beyond Coal Texas website
• Demonstrated OK, AR, and TX stakeholder concern on the RH rule to EPA
• Conducted informational sessions with federal and gov. agencies in OK, AR, and TX
• Drafted RH press releases, blogs, email content, and fact sheets.
• Social Media Coordinator for Dallas EPA Hearing and New Orleans Coal Exports Meeting
Texas Green Blog
• Selected to write promotional blog content to assist in client advertising
Event Promotions Blog
• Co-creator of CBS student blog that streamlined academic processes
CBS Student Blog
• Chosen to assist with experiments to transfect cells with light producing enzymes to use as a model system for testing contrast agents with quarterly presentations to research team


Returns the game-time-object which starts automatically and serves as base for various internal operations.
Appends an event listener for events whose type attribute value is type. The callback argument sets the callback that will be invoked when the event is dispatched. The options argument sets listener-specific options. For compatibility this can be a boolean, in which case the method behaves exactly as if the value was specified as options's capture. When set to true, options's capture prevents callback from being invoked when the event's eventPhase attribute value is BUBBLING_PHASE. When false (or not present), callback will not be invoked when event's eventPhase attribute value is CAPTURING_PHASE. Either way, callback will be invoked if event's eventPhase attribute value is AT_TARGET. When set to true, options's passive indicates that the callback will not cancel the event by invoking preventDefault(). This is used to enable performance optimizations described in §2.8 Observing event listeners. When set to true, options's once indicates that the callback will only be invoked once after which the event listener will be removed. The event listener is appended to target's event listener list and is not appended if it has the same type, callback, and capture.
Stops and deletes all Timers attached. Should be called before this Time-object leaves scope
See Javascript documentation
See Javascript documentation
Deletes Timer found using the id of the connected interval/timeout-object
Dispatches a synthetic event event to target and returns true if either event's cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Retrieves the current scaled timestamp of this instance in milliseconds
Retrieves the scaled time in milliseconds passed since the last call to this method Automatically reset at every call to set(...) and setScale(...)
Retrieves the offset of this time
Retrieves the current scaling of this time
Removes the event listener in target's event listener list with the same type, callback, and options.
Recreates Timers when scaling changes
(Re-) Sets the timestamp of this instance
The timestamp to represent the current time (default 0.0)
See Javascript documentation. Creates an internal Timer object
Sets the scaling of this time, allowing for slowmotion (<1) or fastforward (>1)
The desired scaling (default 1.0)
See Javascript documentation. Creates an internal Timer object
Generated using TypeDoc
Instances of this class generate a timestamp that correlates with the time elapsed since the start of the program but allows for resetting and scaling. Supports interval- and timeout-callbacks identical with standard Javascript but with respect to the scaled time
Jirka Dell'Oro-Friedl, HFU, 2019


Image 2 Surface
Load an image by Dragging & Dropping onto view. Or load from file:
Image Information
- FileName:
- Dimensions: 0x0
Surface Information
Generate a surface and send to Fusion 360:
Clear current image:
Help
- View Rotate: Left mouse button
- View Pan: Middle mouse button
- View Zoom: Mousewheel
- Adjust parameters to define surface mesh
https://github.com/hanskellner/Fusion360Image2Surface


What each stat does
Posted: Mon Jul 30, 2007 10:38 pm
This is what I think each stat should do. It's only slightly changed from Xenimus. The goal here is to make each stat useful to every class.

Let Agility affect casting speed so that it isn't wasted on mages.
What can I say about Consitution? Basically all it does is give HP.
Intelligence should give a bit more bonus EXP( in Xenimus it's 1 point per point in Intelligence). It should also increase the rate of skill points per level, to make it more useful all around.
Wisdom needs a little boost. Let it affect buffs and detection magic.
Both Intelligence and Wisdom should give mana. I don't really like the idea of having a primary magic stat and the other one giving no MP. We will see more balanced mages this way.

Let Agility affect casting speed so that it isn't wasted on mages.
What can I say about Consitution? Basically all it does is give HP.
Intelligence should give a bit more bonus EXP( in Xenimus it's 1 point per point in Intelligence). It should also increase the rate of skill points per level, to make it more useful all around.
Wisdom needs a little boost. Let it affect buffs and detection magic.
Both Intelligence and Wisdom should give mana. I don't really like the idea of having a primary magic stat and the other one giving no MP. We will see more balanced mages this way.


My name is "PUT YOUR NAME HERE".....
TASK ONE
PUT A BUTTON ON THIS PAGE THAT WHEN CLICKED WILL CHANGE THE COLOR OF SOMETHING.. FOR EXAMPLE -> BACKGROUND COLOR?
REQUIRED: Javascript must be used to get this functionality done
My name is "PUT YOUR NAME HERE".....
TASK ONE
PUT A BUTTON ON THIS PAGE THAT WHEN CLICKED WILL CHANGE THE COLOR OF SOMETHING.. FOR EXAMPLE -> BACKGROUND COLOR?
REQUIRED: Javascript must be used to get this functionality done


Henderson
This page contains an index of all the individuals in the database with the surname of Henderson. Selecting the person’s name will take you to that person’s individual page.
| Given Name | Birth | Death | Partner | Parents |
|---|---|---|---|---|
| Alice Ann E. | 1897 | 1971 | Charles, Arthur | Henderson, James Richard Wright, Elizabeth Jane |
| Archibald Craib “Archie” | 1919-08-05 | 1944 | Henderson, John Craib, Mary Cambell | |
| Charles Leslie W. | 1891 | 1936 | Shettle, Margaret Kathleen | Henderson, James Richard Wright, Elizabeth Jane |
| Christian “Chris” | 1923-01-31 | 1995-03-31 | Henderson, John Craib, Mary Cambell | |
| David Herbert | 1899 | 1956 | Cairns, Winifred Grace | Henderson, James Richard Wright, Elizabeth Jane |
| Ernest Frank | 1895 | 1959 | Harris, Ellen Louise | Henderson, James Richard Wright, Elizabeth Jane |
| Hubert | 1901 | 1901 | Henderson, James Richard Wright, Elizabeth Jane | |
| James John | c1924 | 2000-06-06 | Salvestro, Elsie | Henderson, Charles Leslie W. Shettle, Margaret Kathleen |
| James Richard | 1862 | 1919 | Wright, Elizabeth Jane | |
| Jane E. G. M. | 1903 | Bailey, George | Henderson, James Richard Wright, Elizabeth Jane | |
| John | 1885-11-21 | Craib, Mary Cambell | ||
| John “Jack” | Henderson, John Craib, Mary Cambell | |||
| John G. J. | 1886 | 1929 | Nixon, Sarah ?? | Henderson, James Richard Wright, Elizabeth Jane |
| Kaye Lorraine | 1948-03-22 | 1948-03-26 | Henderson, [Living] Atkin, Eileen Joyce | |
| Marie Patricia | c1926 | 2009-06-09 | Perry, Peter Whitney | Henderson, Charles Leslie W. Shettle, Margaret Kathleen |
| Sarah A. M. | 1884 | Hawes, Herbert Hollingworth | Henderson, James Richard Wright, Elizabeth Jane | |
| William Charles “Billy” | 1922 | 1947-01-02 | Henderson, Charles Leslie W. Shettle, Margaret Kathleen | |
| William George, married Ivy | 1888 | 1967-03-14 | Henderson, James Richard Wright, Elizabeth Jane | |
| [Living] | Connor, [Living] | Henderson, [Living] Atkin, Eileen Joyce | ||
| [Living] | Henderson, [Living] Atkin, Eileen Joyce | |||
| [Living] | Atkin, Eileen Joyce | Henderson, John Craib, Mary Cambell | ||
| [Living] | Henderson, [Living] | |||
| [Living] | Henderson, [Living] | Henderson, Ernest Frank Harris, Ellen Louise | ||
| [Living] | Henderson, [Living] Henderson, [Living] |


--- layout: default title: Creative Coding Showcase – Information nav: about ---
This site showcases the outcomes of the Creative Coding workshop conducted by Johannes Jakob and Felix Koppe at Dessau Department of Design’s summer school in 2021. Two students, Daniela Heinz and Jasmin Schmidt, participated in the workshop, and due to the small group size, the working atmosphere was very relaxed and focused.
The workshop was designed for people without any programming knowledge and covered the fundamentals of creative coding with p5.js and also a few bits of p5.play for gameplay mechanics.
Browse through the small experiments and games Daniela and Jasmin have created during the five-day workshop.


Description
This command declares a named constant.
Command Syntax
'@x:var' <id> {'~' <exp>}? {':=' <exp>}?
No body is permitted.
The following options are permitted.
| visible | The variable name is declared as visible in the enclosing scope. If visible is specified, then local can not be specified. |
| local | The variable name is declared as local in the enclosing scope. If local is specified, then visible can not be specified. |
Name Semantics
The <id> variable name is declared the scope that surrounds the @x:var command.
Execution Semantics
The variable is initialized to the value of the initial value expression following the :=. If no initial value is specified, then the variable is uninitialized. Attempting to use an uninitialized variable will result in an execution error. The initial value, if specified, and any later value assigned to the variable must satisfy the type or view given following any ~. The result of executing the @x:var command is null.
Examples


Welcome to the Space Exploration page – a place to play games and learn about the solar system! We have 9 planets here to explore and you can learn about them simply by choosing a starting planet and then clicking their icons. Also, don’t forget to try out the fun quiz after each planet. What are you waiting for? Let’s go!


public class CertificateValidatorUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMON_NAME_OID |
static java.lang.String |
EXTENDED_KEY_USAGE_OID |
static java.lang.String |
KEY_USAGE_EXTENSION_OID |
static java.lang.String |
SERVER_AUTHENTICATION_KEY_USAGE_OID |
static java.lang.String |
SHA1_OID |
| Constructor and Description |
|---|
CertificateValidatorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dumpCertificateInfo(org.bouncycastle.asn1.x509.Certificate cert)
Inspected and display various informations from the Certificate passed as
parameter.
|
static java.lang.String |
extractCommonName(org.bouncycastle.asn1.x509.Certificate cert)
Extracts and returns a java.lang.String corresponding to the common name
of the subject from the certificate cert.
|
static java.lang.String |
extractIssuerName(org.bouncycastle.asn1.x509.Certificate cert)
Retrieves the issuer common name.
|
static org.bouncycastle.asn1.x509.Certificate |
getCertificateFromJarOrRecordStore(java.lang.String cn)
Loads a certificate either from the device record store or from the
application jar.
|
static java.util.Hashtable |
getCertInfoMap(org.bouncycastle.asn1.x509.Certificate[] certs)
Creates a Hashtable containing information (common name, issuer cn,
purpose, etc.) about all chain certificates.
|
static java.util.Date |
getDateFromX509Time(org.bouncycastle.asn1.x509.Time time)
Receives an org.bouncycastle.asn1.x509.Time returning a java.util.Date
instance corresponding to the same timestamp as the
org.bouncycastle.asn1.x509.Time informed.
|
static org.bouncycastle.crypto.ExtendedDigest |
getDigestInstance(org.bouncycastle.asn1.x509.Certificate cert)
Obtains the digest instance corresponding to the Signature Algorithm OID
stored within the X509CertificateStructure @cert parameter.
|
static java.util.Hashtable |
getServerCertificateInfo(java.util.Hashtable certInfos)
Get the certificate info hashtable corresponding to the server
certificate.
|
static byte[] |
loadJarResource(java.lang.String filename)
Loads a file from the application jar.
|
static void |
printCertificateDetails(org.bouncycastle.asn1.x509.Certificate cert)
Prints common certificate informations like signature, signature
algorithm, subject and issuer details, etc.
|
public static java.lang.String SHA1_OID
public static java.lang.String COMMON_NAME_OID
public static java.lang.String EXTENDED_KEY_USAGE_OID
public static java.lang.String KEY_USAGE_EXTENSION_OID
public static java.lang.String SERVER_AUTHENTICATION_KEY_USAGE_OID
public static void printCertificateDetails(org.bouncycastle.asn1.x509.Certificate cert)
cert
- The X509CertificateStructure containing the information that
will be printed.public static void dumpCertificateInfo(org.bouncycastle.asn1.x509.Certificate cert)
cert
- The X509CertificateStructure to be inspected.public static org.bouncycastle.crypto.ExtendedDigest getDigestInstance(org.bouncycastle.asn1.x509.Certificate cert)
cert
- The X509CertificateStructure to be analyzed.public static java.util.Date getDateFromX509Time(org.bouncycastle.asn1.x509.Time time)
time
- An instance of org.bouncycastle.asn1.x509.Time containing a
given Date.public static java.lang.String extractCommonName(org.bouncycastle.asn1.x509.Certificate cert)
cert
- The certificate from which the subject's common name is to be
extracted.public static java.lang.String extractIssuerName(org.bouncycastle.asn1.x509.Certificate cert)
cert
- The certificate from which the issuer name is to the
extracted.public static java.util.Hashtable getCertInfoMap(org.bouncycastle.asn1.x509.Certificate[] certs)
certs
- Certificates to be processed.public static java.util.Hashtable getServerCertificateInfo(java.util.Hashtable certInfos)
certInfos
- The same hashtable generated by
getCertInfoMap(Certificate[])
.public static org.bouncycastle.asn1.x509.Certificate getCertificateFromJarOrRecordStore(java.lang.String cn) throws javax.microedition.rms.RecordStoreNotOpenException, javax.microedition.rms.InvalidRecordIDException, javax.microedition.rms.RecordStoreException, java.io.IOException
cn
- The common name attribute identifying the certificate.javax.microedition.rms.RecordStoreNotOpenException
javax.microedition.rms.InvalidRecordIDException
javax.microedition.rms.RecordStoreException
java.io.IOException
public static byte[] loadJarResource(java.lang.String filename) throws java.io.IOException
filename
- The fullpath of the resource at the jar file.java.io.IOException


Soul Guide Asefa:
In order to receive the blessing of the ancestors, you must dedicate a
Buffalo horn
to them! Go to the battleground and return victorious, you'll receive a Buffalo horn as a reward!


Requirements
You need Tomcat 5.0 or later.
If using Tomcat 5.5.22 or up, you need to set the system property org.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH
to true
so encoded slashes are allowed.
Installation
To install Jenkins on Tomcat, simply copy jenkins.war
to $TOMCAT_HOME/webapps
, then access http://yourhost/jenkins
.
If you are running Tomcat just to host Jenkins, then remove everything from $TOMCAT_HOME/webapps
, and place jenkins.war
as ROOT.war
(Same case is important). Tomcat should expand this and create the ROOT
directory, and you should see Jenkins in http://yourhost
(if you accepted the Tomcat defaults - http://yourhost:8080
) without any additional path. This also works nicely when you set up a virtual host, as it allows a single Tomcat instance to run multiple applications, yet users can still access your jenkins with URLs like http://jenkins.acme.org/
without any additional path. See the Tomcat documentation for more about how to set up a virtual host.
Upgrade
Simply overwrite your jenkins.war
with the new version. Tomcat should automatically redeploy the application.
Setting JENKINS_HOME
Before starting Tomcat, set CATALINA_OPTS like this. This can be also used to specify JVM options to increase the heap size:
$ export CATALINA_OPTS="-DJENKINS_HOME=/path/to/jenkins_home/ -Xmx512m" $ catalina.sh start
Or if that fails for some reason, you should still be able to use the environment variable:
$ export JENKINS_HOME=/path/to/jenkins_home/ $ catalina.sh start
Or in the Tomcat context descriptor of the servlet, which allows a different setting per servlet:
<Context ...> <Environment name="JENKINS_HOME" value="/path/to/jenkins_home/" type="java.lang.String"/> </Context>
Securing Jenkins on Tomcat
Tomcat by default stores the user database in an XML file called $TOMCAT_HOME/conf/tomcat-users.xml
. You can add the following lines to this file to create an admin user.
<role rolename="admin"/> <user username="jenkins-admin" password="secret" roles="admin"/>
i18n
Some versions of Tomcat (such as 5.0.28) uses iso-8859-1 to decode URLs, which is in a clear violation of the relevant RFCs. To fix this problem, add the following URIEncoding
attribute to the connector definition in $TOMCAT_HOME/conf/server.xml
.
<Connector port="8080" URIEncoding="UTF-8"/>
Other people reported that a presence of RequestDumperValve
would also cause a problem.
Related reads
- Similar instruction for Confluence (http://confluence.atlassian.com/display/DOC/Configuring+Tomcat's+URI+encoding)
- John O'Conner's blog entry about his experiment. See Elliotte(id:elharo)'s comment in particular,
Relevant Issues
See the list of issues filed that are specifically marked relevant to Tomcat.
There is also a known issue in Tomcat 6.0.21 to 6.0.26 that may cause some requests to hang.
Tomcat from XAMPP
If you are using XAMPP's tomcat installation, and you have Java > 1.5, then you need to remove the following jars from the common\lib directory, otherwise you will get FileNotFound exceptions from the changelog.xml generator:
xalan.jar xercesImpl.jar xercesSamples.jar
Tomcat from Ubuntu
If you get Tomcat from Ubuntu via apt-get, Jenkins will report an error citing the security permission issue. This is because Tomcat in Ubuntu comes with the security manager on by default. This can be disabled by modifying /etc/default/tomcat5
(version number will be different depending on which version of Tomcat you install.) See JENKINS-719 for more details.
Tomcat from Debian
Fix security issues adding the next lines at /etc/tomcat5.5/policy.d/04webapps.policy
:
grant codeBase "file:/var/lib/tomcat5.5/webapps/jenkins/-" { permission java.security.AllPermission; };
Set Jenkins home at file /etc/default/tomcat5.5
:
CATALINA_OPTS="-DJENKINS_HOME=/var/lib/tomcat5.5/webapps/jenkins/"
Tomcat from Windows
GUI Testing in Windows
Most Windows services -- including those run with the option "Allow service to interact with desktop" in Windows XP and Vista -- do not have access to many of the computer's resources, including the console display. This may cause Automated GUI Tests to fail if you are running Apache Tomcat as a Windows Service and are doing any GUI testing. This is true at least for AWT and Abbot frameworks. A typical error might look similar to this:
[junit] \# An unexpected error has been detected by HotSpot Virtual Machine: [junit] \# [junit] \# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d07baf4, pid=3260, tid=288 [junit] \# [junit] \# Java VM: Java HotSpot(TM) Client VM (1.5.0_09-b03 mixed mode, sharing) [junit] \# Problematic frame: [junit] \# C [awt.dll+0xbaf4|awt.dll+0xbaf4] [junit] \#
This limitation can be resolved by not running Tomcat as a Windows Service, but instead through a "Scheduled Task" as an Application that runs at logon. There are several options for doing this, an example would be to run "$TOMCAT_HOME\bin\tomcat5.exe". When setting up the scheduled task in Windows Vista consider choosing the check-box for "Run with highest privileges" from the general tab, as this removes the need to always provide administrator privileges and may resolve other issues as well.
*Note: This workaround/fix may or may not require an admin to be logged in during testing. Running your tests while logged in as a standard user this is fine, but some modifications may need to be made for your individual configuration.


This biweekly email digest goes out to 4,500 across NYC, informing you of Tech@NYU initiatives and other events for students and technologists.


Chapter 21. Database Programming
In this chapter, we discuss how to communicate with databases from Python. Earlier, we discussed simplistic persistent storage, but in many cases, a full-fledged relational database management system (RDBMS) is required for your application.
|


Design and implementation by Greg Hewgill.
Comments and feedback welcome on stackapps.com. Source code available on github.com.
SBJson Copyright (C) 2007-2011 Stig Brautaset. All rights reserved.


npm library for easily generating artistic representation of planets and other celestial objects. It works over three.js.
Read moreKeplerian elements define an elliptical orbit. This model allows to visualize this parameters and change them in real time to make the model change.
LaunchAnimated periodic table that shows the different logic scientific arrangements that chemical elements may have.
LaunchAnimated model of planets where you can appreciate the real size of them compared each other.
LaunchInteractive protitipe for a celestial map. This project will allow you to localize stars in the sky.
Launch


| 1 | package fr.sii.ogham.email.sendgrid.v2.builder.sendgrid; | |
| 2 | ||
| 3 | import static fr.sii.ogham.core.util.BuilderUtils.evaluate; | |
| 4 | ||
| 5 | import java.net.URL; | |
| 6 | import java.util.ArrayList; | |
| 7 | import java.util.List; | |
| 8 | ||
| 9 | import org.slf4j.Logger; | |
| 10 | import org.slf4j.LoggerFactory; | |
| 11 | ||
| 12 | import com.sendgrid.SendGrid; | |
| 13 | ||
| 14 | import fr.sii.ogham.core.builder.MessagingBuilder; | |
| 15 | import fr.sii.ogham.core.builder.env.EnvironmentBuilder; | |
| 16 | import fr.sii.ogham.core.env.PropertyResolver; | |
| 17 | import fr.sii.ogham.core.message.content.MayHaveStringContent; | |
| 18 | import fr.sii.ogham.core.message.content.MultiContent; | |
| 19 | import fr.sii.ogham.core.mimetype.MimeTypeProvider; | |
| 20 | import fr.sii.ogham.email.builder.EmailBuilder; | |
| 21 | import fr.sii.ogham.email.message.Email; | |
| 22 | import fr.sii.ogham.email.sendgrid.builder.AbstractSendGridBuilder; | |
| 23 | import fr.sii.ogham.email.sendgrid.v2.sender.impl.SendGridV2Sender; | |
| 24 | import fr.sii.ogham.email.sendgrid.v2.sender.impl.sendgrid.client.DelegateSendGridClient; | |
| 25 | import fr.sii.ogham.email.sendgrid.v2.sender.impl.sendgrid.client.SendGridClient; | |
| 26 | import fr.sii.ogham.email.sendgrid.v2.sender.impl.sendgrid.client.SendGridInterceptor; | |
| 27 | import fr.sii.ogham.email.sendgrid.v2.sender.impl.sendgrid.handler.MapContentHandler; | |
| 28 | import fr.sii.ogham.email.sendgrid.v2.sender.impl.sendgrid.handler.MultiContentHandler; | |
| 29 | import fr.sii.ogham.email.sendgrid.v2.sender.impl.sendgrid.handler.StringContentHandler; | |
| 30 | ||
| 31 | /** | |
| 32 | * Configures how SendGrid implementation will send {@link Email}s. | |
| 33 | * | |
| 34 | * This implementation uses SendGrid HTTP API. | |
| 35 | * | |
| 36 | *
 | |
| 37 | * To send {@link Email} using SendGrid, you need to register this builder into | |
| 38 | * a {@link MessagingBuilder} like this: | |
| 39 | * | |
| 40 | *
 | |
| 41 | *  | |
| 42 | * MessagingBuilder msgBuilder = ... | |
| 43 | * msgBuilder.email() | |
| 44 | * .sender(SendGridV2Builder.class) // registers the builder and accesses to that builder for configuring it | |
| 45 | *  | |
| 46 | *
 | |
| 47 | * | |
| 48 | * Once the builder is registered, sending email through SendGrid requires | |
| 49 | * either an API key or a username/password pair. You can define it using: | |
| 50 | * | |
| 51 | *
 | |
| 52 | *  | |
| 53 | * msgBuilder.email() | |
| 54 | * .sender(SendGridV2Builder.class) // registers the builder and accesses to that builder for configuring it | |
| 55 | * .apiKey("foo") | |
| 56 | *  | |
| 57 | *
 | |
| 58 | * | |
| 59 | * Or you can also use property keys (using interpolation): | |
| 60 | * | |
| 61 | *
 | |
| 62 | *  | |
| 63 | * msgBuilder | |
| 64 | * .environment() | |
| 65 | * .properties() | |
| 66 | * .set("custom.property.for.api-key", "foo") | |
| 67 | * .and() | |
| 68 | * .and() | |
| 69 | * .email() | |
| 70 | * .sender(SendGridV2Builder.class) // registers the builder and accesses to that builder for configuring it | |
| 71 | * .apiKey("${custom.property.for.api-key}") | |
| 72 | *  | |
| 73 | *
 | |
| 74 | * | |
| 75 | *
 | |
| 76 | * Finally, Ogham will transform general {@link Email} object into | |
| 77 | * {@link SendGrid}.Email object. This transformation will fit almost all use | |
| 78 | * cases but you may need to customize a part of the SendGrid message. Instead | |
| 79 | * of doing again the same work Ogham does, this builder allows you to intercept | |
| 80 | * the message to modify it just before sending it: | |
| 81 | * | |
| 82 | *
 | |
| 83 | *  | |
| 84 | * .sender(SendGridV2Builder.class) | |
| 85 | * .intercept(new MyCustomInterceptor()) | |
| 86 | *  | |
| 87 | *
 | |
| 88 | * | |
| 89 | * See {@link SendGridInterceptor} for more information. | |
| 90 | * | |
| 91 | * @author Aurélien Baudet | |
| 92 | * | |
| 93 | */ | |
| 94 |
3
1. build : All methods instructions replaced by: return null; → NO_COVERAGE 2. password : All methods instructions replaced by: return null; → NO_COVERAGE 3. username : All methods instructions replaced by: return null; → NO_COVERAGE |
public class SendGridV2Builder extends AbstractSendGridBuilder<SendGridV2Builder, EmailBuilder> { |
| 95 | private static final Logger LOG = LoggerFactory.getLogger(SendGridV2Builder.class); | |
| 96 | ||
| 97 | private List<String> usernames; | |
| 98 | private List<String> passwords; | |
| 99 | private SendGridClient client; | |
| 100 | private SendGridInterceptor interceptor; | |
| 101 | ||
| 102 | /** | |
| 103 | * Default constructor when using SendGrid sender without all Ogham work. | |
| 104 | * | |
| 105 | * WARNING: use is only if you know what you are doing ! | |
| 106 | */ | |
| 107 | public SendGridV2Builder() { | |
| 108 | this(null); | |
| 109 | } | |
| 110 | ||
| 111 | /** | |
| 112 | * Constructor that is called when using Ogham builder: | |
| 113 | * | |
| 114 | *
 | |
| 115 | * MessagingBuilder msgBuilder = ... | |
| 116 | * msgBuilder | |
| 117 | * .email() | |
| 118 | * .sender(SendGridV2Builder.class) | |
| 119 | *
 | |
| 120 | * | |
| 121 | * @param parent | |
| 122 | * the parent builder instance for fluent chaining | |
| 123 | */ | |
| 124 | public SendGridV2Builder(EmailBuilder parent) { | |
| 125 | super(SendGridV2Builder.class, parent); | |
| 126 | usernames = new ArrayList<>(); | |
| 127 | passwords = new ArrayList<>(); | |
| 128 | } | |
| 129 | ||
| 130 | /** | |
| 131 | * Set username for SendGrid HTTP API. | |
| 132 | * | |
| 133 | * You can specify a direct value. For example: | |
| 134 | * | |
| 135 | *
 | |
| 136 | * .username("foo"); | |
| 137 | *
 | |
| 138 | * | |
| 139 | *
 | |
| 140 | * You can also specify one or several property keys. For example: | |
| 141 | * | |
| 142 | *
 | |
| 143 | * .username("${custom.property.high-priority}", "${custom.property.low-priority}"); | |
| 144 | *
 | |
| 145 | * | |
| 146 | * The properties are not immediately evaluated. The evaluation will be done | |
| 147 | * when the {@link #build()} method is called. | |
| 148 | * | |
| 149 | * If you provide several property keys, evaluation will be done on the | |
| 150 | * first key and if the property exists (see {@link EnvironmentBuilder}), | |
| 151 | * its value is used. If the first property doesn't exist in properties, | |
| 152 | * then it tries with the second one and so on. | |
| 153 | * | |
| 154 | * @param username | |
| 155 | * one value, or one or several property keys | |
| 156 | * @return this instance for fluent chaining | |
| 157 | */ | |
| 158 | public SendGridV2Builder username(String... username) { | |
| 159 |
3
1. username : All methods instructions replaced by: return null; → NO_COVERAGE 2. username : All methods instructions replaced by: return null; → KILLED 3. username : All methods instructions replaced by: return null; → KILLED |
for (String u : username) { |
| 160 | if (u != null) { | |
| 161 | usernames.add(u); | |
| 162 | } | |
| 163 | } | |
| 164 | return this; | |
| 165 | } | |
| 166 | ||
| 167 | /** | |
| 168 | * Set password for SendGrid HTTP API. | |
| 169 | * | |
| 170 | * You can specify a direct value. For example: | |
| 171 | * | |
| 172 | *
 | |
| 173 | * .password("foo"); | |
| 174 | *
 | |
| 175 | * | |
| 176 | *
 | |
| 177 | * You can also specify one or several property keys. For example: | |
| 178 | * | |
| 179 | *
 | |
| 180 | * .password("${custom.property.high-priority}", "${custom.property.low-priority}"); | |
| 181 | *
 | |
| 182 | * | |
| 183 | * The properties are not immediately evaluated. The evaluation will be done | |
| 184 | * when the {@link #build()} method is called. | |
| 185 | * | |
| 186 | * If you provide several property keys, evaluation will be done on the | |
| 187 | * first key and if the property exists (see {@link EnvironmentBuilder}), | |
| 188 | * its value is used. If the first property doesn't exist in properties, | |
| 189 | * then it tries with the second one and so on. | |
| 190 | * | |
| 191 | * @param password | |
| 192 | * one value, or one or several property keys | |
| 193 | * @return this instance for fluent chaining | |
| 194 | */ | |
| 195 | public SendGridV2Builder password(String... password) { | |
| 196 |
3
1. password : All methods instructions replaced by: return null; → NO_COVERAGE 2. password : All methods instructions replaced by: return null; → SURVIVED 3. password : All methods instructions replaced by: return null; → KILLED |
for (String p : password) { |
| 197 | if (p != null) { | |
| 198 | passwords.add(p); | |
| 199 | } | |
| 200 | } | |
| 201 | return this; | |
| 202 | } | |
| 203 | ||
| 204 | /** | |
| 205 | * By default, calling SendGrid HTTP API is done through the default | |
| 206 | * {@link SendGrid} implementation. If you want to use another client | |
| 207 | * implementation (creating your custom HTTP API caller for example), you | |
| 208 | * can implement the {@link SendGridClient} interface and provide it: | |
| 209 | * | |
| 210 | *
 | |
| 211 | * .client(new MyCustomHttpApiCaller()) | |
| 212 | *
 | |
| 213 | * | |
| 214 | * NOTE: if you provide your custom implementation, any defined properties | |
| 215 | * and values using {@link #apiKey(String...)}, {@link #username(String...)} | |
| 216 | * or {@link #password(String...)} won't be used at all. You then have to | |
| 217 | * handle it by yourself. | |
| 218 | * | |
| 219 | * @param client | |
| 220 | * the custom client used to call SendGrid HTTP API | |
| 221 | * @return this instance for fluent chaining | |
| 222 | */ | |
| 223 | public SendGridV2Builder client(SendGridClient client) { | |
| 224 |
3
1. client : All methods instructions replaced by: return null; → NO_COVERAGE 2. client : All methods instructions replaced by: return null; → KILLED 3. client : All methods instructions replaced by: return null; → KILLED |
this.client = client; |
| 225 | return this; | |
| 226 | } | |
| 227 | ||
| 228 | ||
| 229 | /** | |
| 230 | * Ogham will transform general {@link Email} object into | |
| 231 | * {@link SendGrid}.Email objects. This transformation will fit almost all | |
| 232 | * use cases but you may need to customize a part of the SendGrid message. | |
| 233 | * Instead of doing again the same work Ogham does, this builder allows you | |
| 234 | * to intercept the message to modify it just before sending it: | |
| 235 | * | |
| 236 | *
 | |
| 237 | * .sender(SendGridV2Builder.class) | |
| 238 | * .intercept(new MyCustomInterceptor()) | |
| 239 | *
 | |
| 240 | * | |
| 241 | * See {@link SendGridInterceptor} for more information. | |
| 242 | * | |
| 243 | * @param interceptor | |
| 244 | * the custom interceptor used to modify {@link SendGrid}.Email | |
| 245 | * @return this instance for fluent chaining | |
| 246 | */ | |
| 247 | public SendGridV2Builder intercept(SendGridInterceptor interceptor) { | |
| 248 |
1
1. intercept : All methods instructions replaced by: return null; → NO_COVERAGE |
this.interceptor = interceptor; |
| 249 | return this; | |
| 250 | } | |
| 251 | ||
| 252 | @Override | |
| 253 | public SendGridV2Sender build() { | |
| 254 |
3
1. build : All methods instructions replaced by: return null; → NO_COVERAGE 2. build : All methods instructions replaced by: return null; → KILLED 3. build : All methods instructions replaced by: return null; → KILLED |
PropertyResolver propertyResolver = environmentBuilder.build(); |
| 255 | String apiKey = evaluate(this.apiKeys, propertyResolver, String.class); | |
| 256 | String username = evaluate(this.usernames, propertyResolver, String.class); | |
| 257 | String password = evaluate(this.passwords, propertyResolver, String.class); | |
| 258 | URL url = evaluate(this.urls, propertyResolver, URL.class); | |
| 259 | SendGridClient builtClient = buildClient(apiKey, username, password, url); | |
| 260 | if (builtClient == null) { | |
| 261 | return null; | |
| 262 | } | |
| 263 | LOG.info("Sending email using SendGrid API is registered"); | |
| 264 | LOG.debug("SendGrid account: apiKey={}, username={}", apiKey, username); | |
| 265 | return new SendGridV2Sender(builtClient, buildContentHandler(), interceptor); | |
| 266 | } | |
| 267 | ||
| 268 | private SendGridClient buildClient(String apiKey, String username, String password, URL url) { | |
| 269 |
3
1. buildClient : All methods instructions replaced by: return null; → NO_COVERAGE 2. buildClient : All methods instructions replaced by: return null; → KILLED 3. buildClient : All methods instructions replaced by: return null; → KILLED |
if (client != null) { |
| 270 | return client; | |
| 271 | } | |
| 272 | if (apiKey != null || (username != null && password != null)) { | |
| 273 | return new DelegateSendGridClient(buildSendGrid(apiKey, username, password, url)); | |
| 274 | } | |
| 275 | return null; | |
| 276 | } | |
| 277 | ||
| 278 | private SendGrid buildSendGrid(String apiKey, String username, String password, URL url) { | |
| 279 |
3
1. buildSendGrid : All methods instructions replaced by: return null; → NO_COVERAGE 2. buildSendGrid : All methods instructions replaced by: return null; → KILLED 3. buildSendGrid : All methods instructions replaced by: return null; → KILLED |
SendGrid sendGrid = newSendGrid(apiKey, username, password); |
| 280 | if (url != null) { | |
| 281 | sendGrid.setUrl(url.toString()); | |
| 282 | } | |
| 283 | if(httpClient != null) { | |
| 284 | sendGrid.setClient(httpClient); | |
| 285 | } | |
| 286 | return sendGrid; | |
| 287 | } | |
| 288 | ||
| 289 | private SendGrid newSendGrid(String apiKey, String username, String password) { | |
| 290 |
3
1. newSendGrid : All methods instructions replaced by: return null; → NO_COVERAGE 2. newSendGrid : All methods instructions replaced by: return null; → KILLED 3. newSendGrid : All methods instructions replaced by: return null; → KILLED |
if (apiKey != null) { |
| 291 | return new SendGrid(apiKey); | |
| 292 | } | |
| 293 | return new SendGrid(username, password); | |
| 294 | } | |
| 295 | ||
| 296 | private MapContentHandler buildContentHandler() { | |
| 297 |
3
1. buildContentHandler : All methods instructions replaced by: return null; → NO_COVERAGE 2. buildContentHandler : All methods instructions replaced by: return null; → KILLED 3. buildContentHandler : All methods instructions replaced by: return null; → KILLED |
MimeTypeProvider mimetypeProvider = mimetypeBuilder.build(); |
| 298 | MapContentHandler contentHandler = new MapContentHandler(); | |
| 299 | contentHandler.register(MultiContent.class, new MultiContentHandler(contentHandler)); | |
| 300 | contentHandler.register(MayHaveStringContent.class, new StringContentHandler(mimetypeProvider)); | |
| 301 | return contentHandler; | |
| 302 | } | |
| 303 | } | |
Mutations | ||
| 94 |
1.1 2.2 3.3 |
|
| 159 |
1.1 2.2 3.3 |
|
| 196 |
1.1 2.2 3.3 |
|
| 224 |
1.1 2.2 3.3 |
|
| 248 |
1.1 |
|
| 254 |
1.1 2.2 3.3 |
|
| 269 |
1.1 2.2 3.3 |
|
| 279 |
1.1 2.2 3.3 |
|
| 290 |
1.1 2.2 3.3 |
|
| 297 |
1.1 2.2 3.3 |


{% extends "layout-pattern.html" %} {% block pattern_content %}
Mapping a service is not a rule
A map is just a way to organise information a team has discovered about it's users and service.
Only having performed a Discovery, should a team consider mapping how it's service currently works.
The activity of mapping a service can become a distraction from learning about your user and service. Only map the current service when:
Having the right parts of service mapped, can help ensure decisions about the design of a service are as informed as possible.
Your team should map:
If you do make a map, work hard to keep it clear and simple. It can be tempting to map every type of thing included in a service. Maps with too many types of information can say so much, they say nothing.
Your team can also map:
Before using the licensing pattern to help design a new service, the same pattern can help teams work out the cost of the existing service.
Cost per transaction is useful data but being more specific
What are the existing service's:
A map should be readable to anyone, even if they are not involved or familiar with your service.
Using tried and tested formats for describing parts of a service, is a way of ensuring a service map is readable by others across government.
Advice:
Formats: