Class Endpoint<TRequest, TResponse>
use this base class for defining endpoints that use both request and response dtos.
Inheritance
Inherited Members
Namespace: FastEndpoints
Assembly: FastEndpoints.dll
Syntax
public abstract class Endpoint<TRequest, TResponse> : BaseEndpoint, IEndpoint where TRequest : new()
where TResponse : new()
Type Parameters
| Name | Description |
|---|---|
| TRequest | the type of the request dto |
| TResponse | the type of the response dto |
Properties
BaseURL
the base url of the current request
Declaration
protected string BaseURL { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Config
gives access to the configuration
Declaration
protected IConfiguration Config { get; }
Property Value
| Type | Description |
|---|---|
| Microsoft.Extensions.Configuration.IConfiguration |
Env
gives access to the hosting environment
Declaration
protected IWebHostEnvironment Env { get; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Hosting.IWebHostEnvironment |
Files
the files sent with the request. only populated when content-type is 'multipart/form-data'
Declaration
protected IFormFileCollection Files { get; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Http.IFormFileCollection |
Form
the form sent with the request. only populated if content-type is 'application/x-www-form-urlencoded' or 'multipart/form-data'
Declaration
protected IFormCollection Form { get; }
Property Value
| Type | Description |
|---|---|
| Microsoft.AspNetCore.Http.IFormCollection |
HttpMethod
the http method of the current request
Declaration
protected Http HttpMethod { get; }
Property Value
| Type | Description |
|---|---|
| Http |
Logger
the logger for the current endpoint type
Declaration
protected ILogger Logger { get; }
Property Value
| Type | Description |
|---|---|
| Microsoft.Extensions.Logging.ILogger |
Response
the response that is sent to the client.
Declaration
protected TResponse Response { get; set; }
Property Value
| Type | Description |
|---|---|
| TResponse |
User
the current user principal
Declaration
protected ClaimsPrincipal User { get; }
Property Value
| Type | Description |
|---|---|
| System.Security.Claims.ClaimsPrincipal |
ValidationFailed
indicates if there are any validation failures for the current request
Declaration
public bool ValidationFailed { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
AddError(Expression<Func<TRequest, Object>>, String)
adds an error message for the specified property of the request dto
Declaration
protected void AddError(Expression<Func<TRequest, object>> property, string errorMessage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.Expression<Func<TRequest, System.Object>> | property | the property to add teh error message for |
| System.String | errorMessage | the error message |
AddError(String)
adds a "GeneralError" to the current list of validation failures
Declaration
protected void AddError(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | the error message |
AllowAnonymous(Http[])
allow unauthenticated requests to this endpoint. optionally specify a set of verbs to allow unauthenticated access with. i.e. if the endpoint is listening to POST, PUT & PATCH and you specify AllowAnonymous(Http.POST), then only PUT & PATCH will require authentication.
Declaration
protected void AllowAnonymous(params Http[] verbs)
Parameters
| Type | Name | Description |
|---|---|---|
| Http[] | verbs |
AllowFileUploads()
enable file uploads with multipart/form-data content type
Declaration
protected void AllowFileUploads()
AllowFormData()
enable multipart/form-data submissions
Declaration
protected void AllowFormData()
Claims(String[])
allows access if the claims principal has ANY of the given claim types
Declaration
protected void Claims(params string[] claimTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | claimTypes | the claim types |
ClaimsAll(String[])
allows access if the claims principal has ALL of the given claim types
Declaration
protected void ClaimsAll(params string[] claimTypes)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | claimTypes | the claim types |
Delete(String[])
specify to listen for DELETE requests on one or more routes.
Declaration
protected void Delete(params string[] routePatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | routePatterns |
DontThrowIfValidationFails()
disable auto validation failure responses (400 bad request with error details) for this endpoint
Declaration
protected void DontThrowIfValidationFails()
Get(String[])
specify to listen for GET requests on one or more routes.
Declaration
protected void Get(params string[] routePatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | routePatterns |
HandleAsync(TRequest, CancellationToken)
the handler method for the endpoint. this method is called for each request received.
Declaration
public abstract Task HandleAsync(TRequest req, CancellationToken ct)
Parameters
| Type | Name | Description |
|---|---|---|
| TRequest | req | the request dto |
| CancellationToken | ct | a cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
OnAfterHandle(TRequest, TResponse)
override this method if you'd like to do something after the handler is executed.
Declaration
protected virtual void OnAfterHandle(TRequest req, TResponse res)
Parameters
| Type | Name | Description |
|---|---|---|
| TRequest | req | the request dto |
| TResponse | res | the response dto that was sent to the client |
OnAfterValidate(TRequest)
override this method if you'd like to do something to the request dto after it gets validated.
Declaration
protected virtual void OnAfterValidate(TRequest req)
Parameters
| Type | Name | Description |
|---|---|---|
| TRequest | req | the request dto |
OnBeforeHandle(TRequest)
override this method if you'd like to do something to the request dto before the handler is executed.
Declaration
protected virtual void OnBeforeHandle(TRequest req)
Parameters
| Type | Name | Description |
|---|---|---|
| TRequest | req | the request dto |
OnBeforeValidate(TRequest)
override this method if you'd like to do something to the request dto before it gets validated.
Declaration
protected virtual void OnBeforeValidate(TRequest req)
Parameters
| Type | Name | Description |
|---|---|---|
| TRequest | req | the request dto |
Options(Action<RouteHandlerBuilder>)
set endpoint configurations options using an endpoint builder action
Declaration
protected void Options(Action<RouteHandlerBuilder> builder)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<Microsoft.AspNetCore.Builder.RouteHandlerBuilder> | builder | the builder for this endpoint |
Patch(String[])
specify to listen for PATCH requests on one or more routes.
Declaration
protected void Patch(params string[] routePatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | routePatterns |
Permissions(String[])
allows access if the claims principal has ANY of the given permissions
Declaration
protected void Permissions(params string[] permissions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | permissions | the permissions |
PermissionsAll(String[])
allows access if the claims principal has ALL of the given permissions
Declaration
protected void PermissionsAll(params string[] permissions)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | permissions | the permissions |
Policies(String[])
specify one or more authorization policy names you have added to the middleware pipeline during app startup/ service configuration that should be applied to this endpoint.
Declaration
protected void Policies(params string[] policyNames)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | policyNames | one or more policy names (must have been added to the pipeline on startup) |
Post(String[])
specify to listen for POST requests on one or more routes.
Declaration
protected void Post(params string[] routePatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | routePatterns |
PostProcessors(IPostProcessor<TRequest, TResponse>[])
configure a collection of post-processors to be executed after the main handler function is done. processors are executed in the order they are defined here.
Declaration
protected void PostProcessors(params IPostProcessor<TRequest, TResponse>[] postProcessors)
Parameters
| Type | Name | Description |
|---|---|---|
| IPostProcessor<TRequest, TResponse>[] | postProcessors | the post processors to be executed |
PreProcessors(IPreProcessor<TRequest>[])
configure a collection of pre-processors to be executed before the main handler function is called. processors are executed in the order they are defined here.
Declaration
protected void PreProcessors(params IPreProcessor<TRequest>[] preProcessors)
Parameters
| Type | Name | Description |
|---|---|---|
| IPreProcessor<TRequest>[] | preProcessors | the pre processors to be executed |
PublishAsync<TEvent>(TEvent, Mode, CancellationToken)
publish the given model/dto to all the subscribers of the event notification
Declaration
protected Task PublishAsync<TEvent>(TEvent eventModel, Mode waitMode = Mode.WaitForAll, CancellationToken cancellation = null)
where TEvent : class
Parameters
| Type | Name | Description |
|---|---|---|
| TEvent | eventModel | the notification event model/dto to publish |
| Mode | waitMode | specify whether to wait for none, any or all of the subscribers to complete their work |
| CancellationToken | cancellation | an optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task | a Task that matches the wait mode specified. Mode.WaitForNone returns an already completed Task (fire and forget). Mode.WaitForAny returns a Task that will complete when any of the subscribers complete their work. Mode.WaitForAll return a Task that will complete only when all of the subscribers complete their work. |
Type Parameters
| Name | Description |
|---|---|
| TEvent |
Put(String[])
specify to listen for PUT requests on one or more routes.
Declaration
protected void Put(params string[] routePatterns)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | routePatterns |
Resolve(Type)
resolve an instance for the given type from the dependency injection container. will throw if unresolvable.
Declaration
protected object Resolve(Type typeOfService)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | typeOfService | the type of the service to resolve |
Returns
| Type | Description |
|---|---|
| System.Object |
Resolve<TService>()
resolve an instance for the given type from the dependency injection container. will throw if unresolvable.
Declaration
protected TService Resolve<TService>()
Returns
| Type | Description |
|---|---|
| TService |
Type Parameters
| Name | Description |
|---|---|
| TService | the type of the service to resolve |
ResponseCache(Int32, ResponseCacheLocation, Boolean, String, String[])
specify response caching settings for this endpoint
Declaration
protected void ResponseCache(int durationSeconds, ResponseCacheLocation location = ResponseCacheLocation.Any, bool noStore = false, string varyByHeader = null, string[] varyByQueryKeys = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | durationSeconds | the duration in seconds for which the response is cached |
| Microsoft.AspNetCore.Mvc.ResponseCacheLocation | location | the location where the data from a particular URL must be cached |
| System.Boolean | noStore | specify whether the data should be stored or not |
| System.String | varyByHeader | the value for the Vary response header |
| System.String[] | varyByQueryKeys | the query keys to vary by |
Roles(String[])
allows access if the claims principal has ANY of the given roles
Declaration
protected void Roles(params string[] rolesNames)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | rolesNames | one or more roles that has access |
Routes(String[])
specify one or more route patterns this endpoint should be listening for
Declaration
protected void Routes(params string[] patterns)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String[] | patterns |
SendAsync(TResponse, Int32, CancellationToken)
send the supplied response dto serialized as json to the client.
Declaration
protected Task SendAsync(TResponse response, int statusCode = 200, CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| TResponse | response | the object to serialize to json |
| System.Int32 | statusCode | optional custom http status code |
| CancellationToken | cancellation | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
SendBytesAsync(Byte[], String, String, CancellationToken)
send a byte array to the client
Declaration
protected async Task SendBytesAsync(byte[] bytes, string fileName = null, string contentType = "application/octet-stream", CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | bytes | the bytes to send |
| System.String | fileName | |
| System.String | contentType | optional content type to set on the http response |
| CancellationToken | cancellation | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
SendEmptyJsonObject(CancellationToken)
send an empty json object in the body
Declaration
protected Task SendEmptyJsonObject(CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellation | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
SendErrorsAsync(CancellationToken)
send a 400 bad request with error details of the current validation failures
Declaration
protected Task SendErrorsAsync(CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellation |
Returns
| Type | Description |
|---|---|
| Task |
SendFileAsync(FileInfo, String, CancellationToken)
send a file to the client
Declaration
protected Task SendFileAsync(FileInfo fileInfo, string contentType = "application/octet-stream", CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| FileInfo | fileInfo | |
| System.String | contentType | optional content type to set on the http response |
| CancellationToken | cancellation | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
SendForbiddenAsync()
send a 403 unauthorized response
Declaration
protected Task SendForbiddenAsync()
Returns
| Type | Description |
|---|---|
| Task |
SendNoContentAsync()
send a 204 no content response
Declaration
protected Task SendNoContentAsync()
Returns
| Type | Description |
|---|---|
| Task |
SendNotFoundAsync()
send a 404 not found response
Declaration
protected Task SendNotFoundAsync()
Returns
| Type | Description |
|---|---|
| Task |
SendOkAsync()
send an http 200 ok response without any body
Declaration
protected Task SendOkAsync()
Returns
| Type | Description |
|---|---|
| Task |
SendStreamAsync(Stream, String, Nullable<Int64>, String, CancellationToken)
send the contents of a stream to the client
Declaration
protected Task SendStreamAsync(Stream stream, string fileName = null, long? fileLengthBytes = null, string contentType = "application/octet-stream", CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | stream | the stream to read the data from |
| System.String | fileName | and optional file name to set in the content-disposition header |
| System.Nullable<System.Int64> | fileLengthBytes | optional total size of the file/stream |
| System.String | contentType | optional content type to set on the http response |
| CancellationToken | cancellation | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
SendStringAsync(String, Int32, CancellationToken)
send the supplied string content to the client.
Declaration
protected Task SendStringAsync(string content, int statusCode = 200, CancellationToken cancellation = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | content | the string to write to the response body |
| System.Int32 | statusCode | optional custom http status code |
| CancellationToken | cancellation | optional cancellation token |
Returns
| Type | Description |
|---|---|
| Task |
SendUnauthorizedAsync()
send a 401 unauthorized response
Declaration
protected Task SendUnauthorizedAsync()
Returns
| Type | Description |
|---|---|
| Task |
ThrowError(Expression<Func<TRequest, Object>>, String)
adds an error message for the specified property of the request dto and sends back a 400 bad request with error details immediately interrupting handler execution flow. no execution will continue past this call.
Declaration
protected void ThrowError(Expression<Func<TRequest, object>> property, string errorMessage)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Linq.Expressions.Expression<Func<TRequest, System.Object>> | property | |
| System.String | errorMessage |
ThrowError(String)
add a "GeneralError" to the validation failure list and send back a 400 bad request with error details immediately interrupting handler execution flow. if there are any vallidation failures, no execution will continue past this call.
Declaration
protected void ThrowError(string message)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | message | the error message |
ThrowIfAnyErrors()
interrupt the flow of handler execution and send a 400 bad request with error details if there are any validation failures in the current request. if there are no validation failures, execution will continue past this call.
Declaration
protected void ThrowIfAnyErrors()
TryResolve(Type)
try to resolve an instance for the given type from the dependency injection container. will return null if unresolvable.
Declaration
protected object TryResolve(Type typeOfService)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | typeOfService | the type of the service to resolve |
Returns
| Type | Description |
|---|---|
| System.Object |
TryResolve<TService>()
try to resolve an instance for the given type from the dependency injection container. will return null if unresolvable.
Declaration
protected TService TryResolve<TService>()
Returns
| Type | Description |
|---|---|
| TService |
Type Parameters
| Name | Description |
|---|---|
| TService | the type of the service to resolve |
Verbs(Http[])
specify one or more http method verbs this endpoint should be accepting requests for
Declaration
protected void Verbs(params Http[] methods)
Parameters
| Type | Name | Description |
|---|---|---|
| Http[] | methods |


Secure NGINX Webserver
24 Mar 2018Before you begin
This post is specific to Nginx, but many of the principles can be applied to apache or other popular web servers with a few tweaks to the configuration statements.
To compare your security settings before and after, Mozilla will scan your website and give you a grade for your level of security at observatory.mozilla.org. You can also install wapiti to scan your site for vulnerabilities outside of the scope of this post.
View the report for Connor.rocks at observatory.mozilla.org/analyze/connor.rocks
Important files:
- Nginx main config file
- /etc/nginx/nginx.conf
- Diffie-Hellman key file
- You can chose where to put this, but I recommend here for organization.
- /etc/nginx/cert/
- PHP configuration file
- /etc/php.ini (default)
SSL/TLS
SSL/TLS could probably merit an entire post, so I’ll try to keep it sort. LetsEncrypt will do basically everything for free, and all you gotta do is run the installer. Here’s how: download certbot for your setup at certbot.eff.org, run it, and you can now use HTTPS.
From here I recommend upgrading your Diffie-Hellman key. Default key lengths are quite short, so we need to generate a new one. You will need Git if you have not already installed it.
Create the folder /etc/nginx/cert/ if it does not already exist, then run the following command. This could take a while. It took a full episode of Your Lie in April (~20 minutes) for me before it finally finished.
openssl dhparam 4096 -out /etc/nginx/cert/dhparam.pem
When it finishes, add this to your nginx config file right around where the ssl options added by certbot appear.
Last but not least, if yo do not see the following in the config file, add it to ensure that your server prefers to use at least generally acceptable ciphers.
Content Security Policy (CSP)
This will be the hardest section.
Content security policy is one of the most important aspects of securing your visitors aside from SSL/TLS, but is not supported by all browsers. The CSP itself is sent via HTTP headers. It limits what a browser will display by whitelisting or blacklisting specific content from third party sites. For example, if any external scripts run on your site e.g. Google analytics.
The command to add your own strict content security policy is
This command, as written will disable nearly all content from external sites. In order to relax this a bit we need to look at each directive. It should be added outside of any sections to apply it to the whole server, as opposed to a subset.
Directives
Each directive is added to the list separated by semicolons in the header. Notable values are ‘none’, ‘self’, and ‘unsafe-inline’. Using ‘none’ will disallow all sources of the content controlled by the directive. Using ‘self’ is just a shorter version of typing your own url, so for this site it would translate to ‘https://connor.rocks’, and would allow content from myself. Last but not least, ‘unsafe-inline’ is used mainly in script-src and style-src allowing scripts or css written in line with HTML. I do not recommend using it because it is quite easy to add lines to HTML in transit, meaning that your visitors may execute code injected by a man in the middle.
This table is an overview of common directives. An extended list can be found at w3.org.
| Directive | Usage | Description |
|---|---|---|
| script-src | 'self' js.external.com | Determines allowed sources of client side scripts. |
| default-src | 'none' external.website.com | This directive is the default for all loaded content: JavaScript, css, fonts, frames, ...etc. Most directives, if not manually set, will use this value. As such, the most secure option is to use 'none' and override the default by allowing other settings. |
| style-src | 'self' external.website.com | Determines allowed sources of CSS. |
| img-src | 'self' external.website.com | Determines allowed sources of images. |
| form-src | 'self' | Determines allowed sources of HTML forms. Usually this is just self. |
| frame-src | 'self' external.website.com | Determines allowed sources of iframes. This includes things like embedded youtube videos. |
Example to add Paypal donate button to website with strict content security policy
These are the only directives needed to add a PayPal donate button to your site. Using a strict content security policy, browsers will not display the donate button unless you add PayPal as an acceptable source for images and forms.
Redirect traffic to HTTPS
Strict Transport Security (HSTS)
HSTS tells the client that they should use HTTPS, and remember it for the future.
It’s just an extra line in the config.
Max age is the time that the browser should remember that it should use HTTPS on your site. You can append ‘includeSubDomains’ to well… include sub domains.
Double check to be sure the redirect is working
Having the certificates and setup for HTTPS is great and all, but if no one uses it, then it is worthless.
This one is pretty easy. Just add this line that checks for http connections and redirects them to a corresponding https url.
Using this method is effective, but as of writing this, Mozilla’s observatory does not support detection for this method.
Prevent Information Disclosure
Server information
If you check the headers on a default install of nginx, you will find that it likes to give visitors a lot of information about your server that they don’t need. You can check the headers using curl -I http://localhost. Look for the ‘Server’ header and look at the information sent. It should look something like this.
$ curl -I http://localhost
HTTP/1.1 200 OK
…
Server: nginx/1.13.10 (Ubuntu)
…
Knowing the version number and operating system gives attackers a lot of information about your system for free. I’m not super into that so let’s turn it off. Add this line to an http block in your config file.
PHP Information
Oh boy here we go again. If you’ve got PHP, you’re probably giving out info for free. PHP wants everyone to know what version it is. Now we’re back to checking out your headers. Again, the header we’re looking for will look similar to this.
$ curl -I http://localhost
HTTP/1.1 200 OK
…
X-Powered-By: PHP/5.4.0
…
To prevent this we need to change some PHP settings in /etc/php.ini. Inside the file there is a line that will say expose_php, change it to off.
Clickjack prevention
The X-Frame-Options header can be set to inform a browser what content will be allowed to render a page in a frame or object. This prevents third parties from embedding their content in your site.
There are three options for this header
X-Frame-Options: DENY
X-Frame-Options: SAMEORIGIN
X-Frame-Options: ALLOW-FROM https://external.website.com/
- DENY obviously denies all pages.
- SAMEORIGIN will allow pages from the same origin as the current site. Different browsers interpret origin to mean one of the following: top level, parent, or the whole chain.
- ALLOW-FROM will allow a specific site to embed content. A common use for this is to add YouTube as a valid source to show YouTube videos on your site.
The command to actually add this to your server is
Content Type Check
If you are a lemonade salesman, and people ask you for steak, that’s gonna confuse you. The same goes for web servers and MIME type. The X-Content-Type-Options header with the nosniff option will block a request unless the type is “style” or “script” and the MIME type does not match “text/css” or a JavaScript mime type.
Again, this one is pretty simple to add.
Detect reflected cross site scripting attacks
If you disable in line JavaScript via content security policy, then this header is only useful on browsers that do not support content security policies. The X-XSS-Protection header tells the browser to stop loading a page if it detects reflected cross site scripting. Reflected cross site scripting is when an attacker injects code into a request. It is not saved on the server and will only affect users that request it. An example would be posting JavaScript code in a forum post that does not sanitize user input.
You can see all the options for this header at developer.mozilla.org. Otherwise, just add this.
Conclusion
There is much more to do, but this is a solid foundation. If you have any questions or corrections, send them to support@connor.rocks


At Admerasia, I worked on the storyboard and logo design for client Nissan. Two of my storyboards were approved for production and aired on Nissan's YouTube channel. The campaign was targeted at Chinese-Americans, using YouTube celebrities and local fashion icons.
In addition, I designed an infographic piece for Asia Society visualizing a coporate survey for Asian Pacific Americans and the logo for the New York Online Newsletter.


GAlytics Sample Usage
Click each of the below links and see the event logged in the console.
A simple event
One with a label
One with a value
Both label and value
Label, value, and category
Mouse over me


With few steps below, you will jump to new incredible style of development
pod "XBMobile"
#import <XBMobile.h>
By code:
XBTableView *tableView = ...
tableView.xbDelegate = self;
Full document of plist's properties here, and soon we will provide the IDE for XBMobile
//Load post params to request (optional)
tableView.postParams = @{@"token":[[NSUserDefaults standardUserDefaults] objectForKey:@"token"],
@"photo_id":@(123),
@"comment": @"This is a comment from XBTableView"};
[tableView loadInformationFromPlist:@"YOUR_PLIST_FILE_NAME"];
// call when user tap to a row. item is the data stored with that index path
- (void)xbTableView:(XBTableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath forItem:(id)item;
// call when user tap to a button of a row. similar like the one above, but provide (UIButton *)btn so you can use it to separated the control.
- (void)xbTableView:(XBTableView *)tableView didSelectButton:(UIButton *)btn atIndexPath:(NSIndexPath *)indexPath forItem:(id)item;
// call at the end of normal cellForRowAtIndexPath:, with prepared cell and item, allow you to have the last chance to edit the cell before showing it. usually i do something like border colour or round corner, which isn't supported by XIB
- (UITableViewCell *)xbTableView:(XBTableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath withPreparedCell:(UITableViewCell *)cell withItem:(id)item;
After all, we provide set of function & params to expand your options
// this is the information of plist. you can load it by function below, but if you have some plist's string somewhere, this is pretty useful for you.
@property (nonatomic, retain) NSDictionary *informations;
// Post params using in your query to fetch your data to the list
@property (nonatomic, retain) NSDictionary *postParams;
// allow you using HUB activity indicator and alert error when data from the server have some problem. Default of both is NO
@property (nonatomic, assign) BOOL usingHUD, usingErrorAlert;
@property (nonatomic, retain) IBOutlet id <XBTableViewDelegate> xbDelegate;
// Control to fetch all the data, including cache, data process, everything here.
@property (nonatomic, retain) XBDataFetching *dataFetching;
// load setting from plist
- (void)loadInformationFromPlist:(NSString *)plist;
// load data from custom array, when you don't use external data.
- (void)loadData:(NSArray *)data;


Increase EBS volume of AWS on linux
Problem
- A disk volume 32GB
/dev/xvdf1
is mounted into/var/lib/mysql
- This volume is out of space, need to be extend size to 64GB
- Extended to 64GB on aws console, but from ec2 point of view, it’s just 32GB
Rootcause
: didn’t merge partition after extending and resize fs
Table of Contents
Solution
Resize file system to larger size of this volume
Step1: Collect information
Check disk ID
root@webapp-unstable:~# blkid
/dev/xvda1: LABEL="cloudimg-rootfs" UUID="4573eb39-57f3-439b-9a73-8aef508afd3f" TYPE="ext4" PARTUUID="965243d6-01"
/dev/xvdf1: UUID="d56d3b3e-4385-48a7-ba95-6d3884d5dca8" TYPE="ext4" PARTUUID="cc52698e-01"
Check size disk and mount point of /dev/xvdf1
root@webapp-unstable:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 16G 0 disk
└─xvda1 202:1 0 16G 0 part /
xvdf 202:80 0 64G 0 disk
└─xvdf1 202:81 0 32G 0 part /var/lib/mysql
Step 2: Unmount this volume out of system
Unmount
root@webapp-unstable:~# umount /dev/xvdf1
Check after unmount
root@webapp-unstable:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 16G 0 disk
└─xvda1 202:1 0 16G 0 part /
xvdf 202:80 0 64G 0 disk
└─xvdf1 202:81 0 32G 0 part
Step 3: Delete and recreate new partition
Why? Because old partition is using 32GB only, should delete and re-create new one. After that, the new one will use all of space 64GB
Using fdisk
or parted/gparted
root@webapp-unstable:~# fdisk /dev/xvdf
Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/xvdf: 64 GiB,<PHONE_NUMBER>6 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcc52698e
Device Boot Start End Sectors Size Id Type
/dev/xvdf1 2048 67108863 67106816 32G 83 Linux
Command (m for help): d
Selected partition 1
Partition 1 has been deleted.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-134217727, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-134217727, default 134217727):
Created a new partition 1 of type 'Linux' and of size 64 GiB.
Command (m for help): p
Disk /dev/xvdf: 64 GiB,<PHONE_NUMBER>6 bytes, 134217728 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcc52698e
Device Boot Start End Sectors Size Id Type
/dev/xvdf1 2048 134217727 134215680 64G 83 Linux
Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
Step 4: Resize file system of this volume
Using resize2fs
because this volume is ext4
format
root@webapp-unstable:~# resize2fs /dev/xvdf1
resize2fs 1.42.13 (17-May-2015)
Filesystem at /dev/xvdf1 is mounted on /var/lib/mysql; on-line resizing required
old_desc_blocks = 2, new_desc_blocks = 4
The filesystem on /dev/xvdf1 is now 16776960 (4k) blocks long.
Check after resizing
root@webapp-unstable:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
xvda 202:0 0 16G 0 disk
└─xvda1 202:1 0 16G 0 part /
xvdf 202:80 0 64G 0 disk
└─xvdf1 202:81 0 64G 0 part /var/lib/mysql
root@webapp-unstable:~# df -h
Filesystem Size Used Avail Use% Mounted on
udev 2.0G 0 2.0G 0% /dev
tmpfs 396M 41M 355M 11% /run
/dev/xvda1 16G 6.9G 8.6G 45% /
tmpfs 2.0G 0 2.0G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup
tmpfs 396M 0 396M 0% /run/user/1000
/dev/xvdf1 63G 30G 31G 50% /var/lib/mysql
root@webapp-unstable:~# mount -fav
/ : ignored
/var/lib/mysql : already mounted
DONE.
Reference
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html


HTML First Project
This was my very first project at Thaddeus Stevens and my first introduction to HTML5. We learned the basics of HTML5 and how to open .html files in the browser.
Link to site!This was my very first project at Thaddeus Stevens and my first introduction to HTML5. We learned the basics of HTML5 and how to open .html files in the browser.
Link to site!This is one of my most useful projects that I still use to this day. This project was made to teach us some more advanced CSS3 properties that we would then share with the class. This was by far my favorite project.
Link to site!This was a website recreation that was designed by our professor. We worked in small teams simmulating a front-end project. This project went really well for our group, and we learned the importance of pre-planning from this project.
Link to site!This was the final project recreation for our front-end course/semester. Again, we worked in small teams to accomplish this project. My group did phenomenally on this project and were able to finish well before the deadline. All of the projects before this one prepared us, so my group had hardly any difficulties even with the newly introduced javascript that we had been learning.
Link to site!As part of our front-end course, we were tasked with creating a javascript project in groups of two. My buddy and I originally wanted to do pong in a browser, but I completed the project the day it was assigned. We then decided to make a two player beer pong game. This project took us a while, but is one of the projects I am most proud of. It is soley HTML, CSS, and javascript running in a browser. The game still has resolution issues that I have yet to fix.
Link to game!This was a website recreation that was designed by our professor. We worked in small teams simmulating a front-end project. This project was the first time we would use javascript. We learned javascript as we went along and finished the project on time and well done. My group and I had issues dividing up the work evenly so some people did not have as much work to do throughout the project. This taught us to plan on doing the difficult and neccesary things first so people can always be busy.
Link to site!This was the big project for our third semester. We had to build a project that pulled well structured data from a custom api using our own well structured database. The app was supposed to show the data visually(graphs), and allowed for an admin portal and data accessing. Testing was mandatory and the api needed documentation. We were allowed to use our desired languages for the project.
The project is a scheduling app designed more specifically for counter strike organizer(leagues). Users are on teams and the teams can play in tournaments or leagues run by organizations. Matches can be recorded and stats can be seen on your profile based on your matches with a specific team
This project was built with a python(Flask) api pulling from a MySQL(Google Cloud) database. The backend is built with javascript(Express) and frontend templating is done with Mustache(js). Graphs are using Chart(js).
I learned a lot from this project. Second semester was difficult for me and my class as we jumped through many languages(ruby, elixer, php) and did not get quality time with just one. This semester though, we where able to spend quality time on the languages of our choosing. I'm excited to have built my first backend project. I learned a lot and even though I found many mistakes late in my project, I'm happy for this experience as it has grown me as a developer.
It's not a very good project, but its my first real backend project. It has a lot of flaws, but I'm excited to move on to my next project!
Link to site!


King James Library
This gem is found by passing through a much smaller library by the entrance of St Mary's Quad. Once inside upstairs you'll enter a large chamber with sanctuary-like silence and may even be struck by its great historical value as it was once Regius Professor James Gregory's workshop.


List:
selected="selected" >imp
selected="selected" >mfl
selected="selected" >ivt
selected="selected" >gre3000
Group:
1
2
3
4
5
Idfrom:
to:
I
M
V
total number:
/
Back_to_list
Changelist
Undo
Last_word
Chi_to_Eng
Skip
Last_Gro
Next_Gro
Last_Lst
Next_Lst


Seek error accessing TIFF directory. An error occurred while positioning to the location of the directory.
Wrong data type %d for field "%s". The tag entry in the directory had an incorrect data type. For example, an ImageDescription tag with a SHORT data type.
TIFF directory is missing required "%s" field. The specified tag is required to be present by the TIFF 5.0 specification, but is missing. The directory is (usually) unusable.
%s: Rational with zero denominator. A directory tag has a RATIONAL value whose denominator is zero.
Incorrect count %d for field "%s" (%lu, expecting %lu); tag ignored. The specified tag's count field is bad. For example, a count other than 1 for a SubFileType tag.
Cannot handle different per-sample values for field "%s". The tag has SamplesPerPixel values and they are not all the same; e.g. BitsPerSample. The library is unable to handle images of this sort.
Count mismatch for field "%s"; expecting %d, got %d. The count field in a tag does not agree with the number expected by the library. This should never happen, so if it does, the library refuses to read the directory.
Invalid TIFF directory; tags are not sorted in ascending order. The directory tags are not properly sorted as specified in the TIFF 5.0 specification. This error is not fatal.
Ignoring unknown field with tag %d (0x%x). An unknown tag was encountered in the directory; the library ignores all such tags.
TIFF directory is missing requred "ImageLength" field. The image violates the specification by not having a necessary field. There is no way for the library to recover from this error.
TIFF directory is missing requred "PlanarConfig" field. The image violates the specification by not having a necessary field. There is no way for the library to recover from this error.
TIFF directory is missing requred "StripOffsets" field. The image has multiple strips, but is missing the tag that specifies the file offset to each strip of data. There is no way for the library to recover from this error.
TIFF directory is missing requred "TileOffsets" field. The image has multiple tiles, but is missing the tag that specifies the file offset to each tile of data. There is no way for the library to recover from this error.
TIFF directory is missing required "StripByteCounts" field. The image has multiple strips, but is missing the tag that specifies the size of each strip of data. There is no way for the library to recover from this error.
TIFF directory is missing required "StripByteCounts" field, calculating from imagelength. The image violates the specification by not having a necessary field. However, when the image is comprised of only one strip or tile, the library will estimate the missing value based on the file size.
Bogus "StripByteCounts" field, ignoring and calculating from imagelength. Certain vendors violate the specification by writing zero for the StripByteCounts tag when they want to leave the value unspecified. If the image has a single strip, the library will estimate the missing value based on the file size.


Toggle navigation
An eCommerce platform for restaurants
We didn't recognize your Email address :(
Sign Up To Learn More
Thanks for signing up!
Email:
Name:
Phone Number:
Restaurant Name:
Position:
Orderbrain uses Machine Learning Analytics
Increase average order value
Speed up the time is takes for customers to complete orders
Maximize customer satisfaction
Orderbrain provides your customers with Online Ordering
Accept orders from your mobile website
Print the orders in your store to fulfill them
Our printers are mobile and work with food trucks & pop-up shops!

Hosting and Designing your modern website is handled by us!
Signup for a year & we will include a free custom domain name
Follow Orderbrain!
Twitter
Instagram
Github


Vulnerability rank of some Caribbean countries. EcVI is the economic vulnerability index [ 17]. EVI is the Environmental Vulnerability Index [ 18]. RMI is the Risk Management Index [ 19] and CCVI is the Climate Change Vulnerability Index [ 20]. A value of 1/114 indicates the highest vulnerability of the 114 countries in the study.


This is a demo of the IsoVoxel renderer that converts MagicaVoxel .vox files to the isometric pixel art you see here.


In this project, you'll classify images from the CIFAR-10 dataset. The dataset consists of airplanes, dogs, cats, and other objects. You'll preprocess the images, then train a convolutional neural network on all the samples. The images need to be normalized and the labels need to be one-hot encoded. You'll get to apply what you learned and build a convolutional, max pooling, dropout, and fully connected layers. At the end, you'll get to see your neural network's predictions on the sample images.
Run the following cell to download the CIFAR-10 dataset for python.
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
from urllib.request import urlretrieve
from os.path import isfile, isdir
from tqdm import tqdm
import problem_unittests as tests
import tarfile
cifar10_dataset_folder_path = 'cifar-10-batches-py'
# Use Floyd's cifar-10 dataset if present
floyd_cifar10_location = '/input/cifar-10/python.tar.gz'
if isfile(floyd_cifar10_location):
tar_gz_path = floyd_cifar10_location
else:
tar_gz_path = 'cifar-10-python.tar.gz'
class DLProgress(tqdm):
last_block = 0
def hook(self, block_num=1, block_size=1, total_size=None):
self.total = total_size
self.update((block_num - self.last_block) * block_size)
self.last_block = block_num
if not isfile(tar_gz_path):
with DLProgress(unit='B', unit_scale=True, miniters=1, desc='CIFAR-10 Dataset') as pbar:
urlretrieve(
'https://www.cs.toronto.edu/~kriz/cifar-10-python.tar.gz',
tar_gz_path,
pbar.hook)
if not isdir(cifar10_dataset_folder_path):
with tarfile.open(tar_gz_path) as tar:
tar.extractall()
tar.close()
tests.test_folder_path(cifar10_dataset_folder_path)
The dataset is broken into batches to prevent your machine from running out of memory. The CIFAR-10 dataset consists of 5 batches, named data_batch_1
, data_batch_2
, etc.. Each batch contains the labels and images that are one of the following:
Understanding a dataset is part of making predictions on the data. Play around with the code cell below by changing the batch_id
and sample_id
. The batch_id
is the id for a batch (1-5). The sample_id
is the id for a image and label pair in the batch.
Ask yourself "What are all possible labels?", "What is the range of values for the image data?", "Are the labels in order or random?". Answers to questions like these will help you preprocess the data and end up with better predictions.
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import helper
import numpy as np
# Explore the dataset
batch_id = 1
sample_id = 0
helper.display_stats(cifar10_dataset_folder_path, batch_id, sample_id)
def normalize(x):
"""
Normalize a list of sample image data in the range of 0 to 1
: x: List of image data. The image shape is (32, 32, 3)
: return: Numpy array of normalize data
"""
# TODO: Implement Function
# Create a new numpy array with size = len(x) x 32x32x3
arr = np.array(x)
#np.set_printoptions(threshold=np.inf)
#print(arr[0,:,:,0])
max = np.max(arr)
min = np.min(arr)
arr = (arr - min) / (max - min)
return arr
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_normalize(normalize)
Just like the previous code cell, you'll be implementing a function for preprocessing. This time, you'll implement the one_hot_encode
function. The input, x
, are a list of labels. Implement the function to return the list of labels as One-Hot encoded Numpy array. The possible values for labels are 0 to 9. The one-hot encoding function should return the same encoding for each value between each call to one_hot_encode
. Make sure to save the map of encodings outside the function.
Hint: Don't reinvent the wheel.
def one_hot_encode(x):
"""
One hot encode a list of sample labels. Return a one-hot encoded vector for each label.
: x: List of sample Labels
: return: Numpy array of one-hot encoded labels
"""
# TODO: Implement Function
# Define number of categories
num_categories = 10
# Create a numpy array
arr = np.array(x)
one_hot_encode = np.zeros((arr.size, num_categories))
one_hot_encode[np.arange(arr.size), arr] = 1
return one_hot_encode
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_one_hot_encode(one_hot_encode)
As you saw from exploring the data above, the order of the samples are randomized. It doesn't hurt to randomize it again, but you don't need to for this dataset.
Running the code cell below will preprocess all the CIFAR-10 data and save it to file. The code below also uses 10% of the training data for validation.
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
# Preprocess Training, Validation, and Testing Data
helper.preprocess_and_save_data(cifar10_dataset_folder_path, normalize, one_hot_encode)
This is your first checkpoint. If you ever decide to come back to this notebook or have to restart the notebook, you can start from here. The preprocessed data has been saved to disk.
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import pickle
import problem_unittests as tests
import helper
# Load the Preprocessed Validation data
valid_features, valid_labels = pickle.load(open('preprocess_validation.p', mode='rb'))
For the neural network, you'll build each layer into a function. Most of the code you've seen has been outside of functions. To test your code more thoroughly, we require that you put each layer in a function. This allows us to give you better feedback and test for simple mistakes using our unittests before you submit your project.
Note: If you're finding it hard to dedicate enough time for this course each week, we've provided a small shortcut to this part of the project. In the next couple of problems, you'll have the option to use classes from the TensorFlow Layers or TensorFlow Layers (contrib) packages to build each layer, except the layers you build in the "Convolutional and Max Pooling Layer" section. TF Layers is similar to Keras's and TFLearn's abstraction to layers, so it's easy to pickup.
However, if you would like to get the most out of this course, try to solve all the problems without using anything from the TF Layers packages. You can still use classes from other packages that happen to have the same name as ones you find in TF Layers! For example, instead of using the TF Layers version of the
conv2d
class, tf.layers.conv2d, you would want to use the TF Neural Network version ofconv2d
, tf.nn.conv2d.
Let's begin!
The neural network needs to read the image data, one-hot encoded labels, and dropout keep probability. Implement the following functions
neural_net_image_input
image_shape
with batch size set to None
.name
parameter in the TF Placeholder.neural_net_label_input
n_classes
with batch size set to None
.name
parameter in the TF Placeholder.neural_net_keep_prob_input
name
parameter in the TF Placeholder.These names will be used at the end of the project to load your saved model.
Note: None
for shapes in TensorFlow allow for a dynamic size.
import tensorflow as tf
def neural_net_image_input(image_shape):
"""
Return a Tensor for a batch of image input
: image_shape: Shape of the images
: return: Tensor for image input.
"""
# TODO: Implement Function
# print(image_shape) = (32,32,3) hence we need to take out individual values
# image_shape[0], image_shape[1] and image_shape[2]
return tf.placeholder(dtype=tf.float32, shape=[None, image_shape[0], image_shape[1], image_shape[2]], name='x')
def neural_net_label_input(n_classes):
"""
Return a Tensor for a batch of label input
: n_classes: Number of classes
: return: Tensor for label input.
"""
# TODO: Implement Function
# print(n_classes)
return tf.placeholder(dtype=tf.int32, shape=[None, n_classes], name='y')
def neural_net_keep_prob_input():
"""
Return a Tensor for keep probability
: return: Tensor for keep probability.
"""
# TODO: Implement Function
return tf.placeholder(dtype=tf.float32, name='keep_prob')
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tf.reset_default_graph()
tests.test_nn_image_inputs(neural_net_image_input)
tests.test_nn_label_inputs(neural_net_label_input)
tests.test_nn_keep_prob_inputs(neural_net_keep_prob_input)
Convolution layers have a lot of success with images. For this code cell, you should implement the function conv2d_maxpool
to apply convolution then max pooling:
conv_ksize
, conv_num_outputs
and the shape of x_tensor
.x_tensor
using weight and conv_strides
.pool_ksize
and pool_strides
.Note: You can't use TensorFlow Layers or TensorFlow Layers (contrib) for this layer, but you can still use TensorFlow's Neural Network package. You may still use the shortcut option for all the other layers.
def conv2d_maxpool(x_tensor, conv_num_outputs, conv_ksize, conv_strides, pool_ksize, pool_strides):
"""
Apply convolution then max pooling to x_tensor
:param x_tensor: TensorFlow Tensor
:param conv_num_outputs: Number of outputs for the convolutional layer
:param conv_ksize: kernal size 2-D Tuple for the convolutional layer
:param conv_strides: Stride 2-D Tuple for convolution
:param pool_ksize: kernal size 2-D Tuple for pool
:param pool_strides: Stride 2-D Tuple for pool
: return: A tensor that represents convolution and max pooling of x_tensor
"""
# TODO: Implement Function
#print(conv_ksize[0])
#print(conv_strides)
#print(conv_num_outputs)
#print(x_tensor.get_shape())
#print(conv_strides)
#print(pool_ksize)
#print(pool_strides)
# First of all we have an input tensor x_tensor of shape [batch, in_height, in_width, in_channels]
# And we require a filter / kernel tensor of shape [filter_height, filter_width, in_channels, out_channels]
# Filter (height, width) we get from conv_size, in_channels we get from input and out_channels we
# get from conv_num_outputs
weight = tf.Variable(tf.random_normal([conv_ksize[0], conv_ksize[1],
x_tensor.shape.as_list()[3], conv_num_outputs], stddev=0.1))
bias = tf.Variable(tf.random_normal([conv_num_outputs], stddev=0.1))
# Apply a convolution on input
conv = tf.nn.conv2d(x_tensor, weight, strides=[1, conv_strides[0], conv_strides[1], 1], padding='SAME')
# Apply bias on convolution output
biased = tf.nn.bias_add(conv, bias)
# Add a nonlinear activation to the convolution(biased)
activated = tf.nn.relu(biased)
# Now add a max pooling layer
max_pool = tf.nn.max_pool(activated, ksize=[1, pool_ksize[0], pool_ksize[1], 1],
strides=[1, pool_strides[0], pool_strides[1], 1], padding='SAME')
return max_pool
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_con_pool(conv2d_maxpool)
Implement the flatten
function to change the dimension of x_tensor
from a 4-D tensor to a 2-D tensor. The output should be the shape (Batch Size, Flattened Image Size). Shortcut option: you can use classes from the TensorFlow Layers or TensorFlow Layers (contrib) packages for this layer. For more of a challenge, only use other TensorFlow packages.
def flatten(x_tensor):
"""
Flatten x_tensor to (Batch Size, Flattened Image Size)
: x_tensor: A tensor of size (Batch Size, ...), where ... are the image dimensions.
: return: A tensor of size (Batch Size, Flattened Image Size).
"""
# TODO: Implement Function
flattened_image_size = x_tensor.shape.as_list()[1] * x_tensor.shape.as_list()[2] * x_tensor.shape.as_list()[3]
# As Batch Size can be None hence we pass -1 as first parameter to shape inside reshape
flattened = tf.reshape(x_tensor, shape=(-1, flattened_image_size))
return flattened
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_flatten(flatten)
Implement the fully_conn
function to apply a fully connected layer to x_tensor
with the shape (Batch Size, num_outputs). Shortcut option: you can use classes from the TensorFlow Layers or TensorFlow Layers (contrib) packages for this layer. For more of a challenge, only use other TensorFlow packages.
def fully_conn(x_tensor, num_outputs):
"""
Apply a fully connected layer to x_tensor using weight and bias
: x_tensor: A 2-D tensor where the first dimension is batch size.
: num_outputs: The number of output that the new tensor should be.
: return: A 2-D tensor where the second dimension is num_outputs.
"""
# TODO: Implement Function
weight = tf.Variable(tf.random_normal(shape=(x_tensor.shape.as_list()[1], num_outputs), stddev=0.1))
bias = tf.Variable(tf.random_normal(shape=[num_outputs], stddev=0.1))
fully_conn = tf.add( tf.matmul(x_tensor, weight), bias)
# As this is fully connected layer so activation is applied
return tf.nn.relu(fully_conn)
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_fully_conn(fully_conn)
Implement the output
function to apply a fully connected layer to x_tensor
with the shape (Batch Size, num_outputs). Shortcut option: you can use classes from the TensorFlow Layers or TensorFlow Layers (contrib) packages for this layer. For more of a challenge, only use other TensorFlow packages.
Note: Activation, softmax, or cross entropy should not be applied to this.
def output(x_tensor, num_outputs):
"""
Apply a output layer to x_tensor using weight and bias
: x_tensor: A 2-D tensor where the first dimension is batch size.
: num_outputs: The number of output that the new tensor should be.
: return: A 2-D tensor where the second dimension is num_outputs.
 The function takes in a batch of images, x
, and outputs logits. Use the layers you created above to create this model:
keep_prob
. def conv_net(x, keep_prob):
"""
Create a convolutional neural network model
: x: Placeholder tensor that holds image data.
: keep_prob: Placeholder tensor that hold dropout keep probability.
: return: Tensor that represents logits
"""
# TODO: Apply 1, 2, or 3 Convolution and Max Pool layers
# Play around with different number of outputs, kernel size and stride
# Function Definition from Above:
# conv2d_maxpool(x_tensor, conv_num_outputs, conv_ksize, conv_strides, pool_ksize, pool_strides)
conv2d_maxpool1 = conv2d_maxpool(x, 16, (4,4), (1,1), (4,4), (2,2))
#print(conv2d_maxpool1.shape)
conv2d_maxpool2 = conv2d_maxpool(conv2d_maxpool1, 32, (4,4), (1,1), (4,4), (2,2))
#print(conv2d_maxpool2.shape)
conv2d_maxpool3 = conv2d_maxpool(conv2d_maxpool2, 64, (4,4), (1,1), (4,4), (2,2))
# TODO: Apply a Flatten Layer
# Function Definition from Above:
# flatten(x_tensor)
flattened = flatten(conv2d_maxpool3)
#print(flattened.shape)
# TODO: Apply 1, 2, or 3 Fully Connected Layers
# Play around with different number of outputs
# Function Definition from Above:
# fully_conn(x_tensor, num_outputs)
fully_connected1 = fully_conn(flattened, num_outputs=1024)
drop_out1 = tf.nn.dropout(fully_connected1, keep_prob=keep_prob)
fully_connected2 = fully_conn(drop_out1, num_outputs=512)
drop_out2 = tf.nn.dropout(fully_connected2, keep_prob=keep_prob)
fully_connected3 = fully_conn(drop_out2, num_outputs=64)
# TODO: Apply an Output Layer
# Set this to the number of classes
# Function Definition from Above:
# output(x_tensor, num_outputs)
output_final = output(fully_connected3, 10)
# TODO: return output
return output_final
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
##############################
## Build the Neural Network ##
##############################
# Remove previous weights, bias, inputs, etc..
tf.reset_default_graph()
# Inputs
x = neural_net_image_input((32, 32, 3))
y = neural_net_label_input(10)
keep_prob = neural_net_keep_prob_input()
# Model
logits = conv_net(x, keep_prob)
# Name logits Tensor, so that is can be loaded from disk after training
logits = tf.identity(logits, name='logits')
# Loss and Optimizer
cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=y))
optimizer = tf.train.AdamOptimizer().minimize(cost)
# Accuracy
correct_pred = tf.equal(tf.argmax(logits, 1), tf.argmax(y, 1))
accuracy = tf.reduce_mean(tf.cast(correct_pred, tf.float32), name='accuracy')
tests.test_conv_net(conv_net)
Implement the function train_neural_network
to do a single optimization. The optimization should use optimizer
to optimize in session
with a feed_dict
of the following:
x
for image inputy
for labelskeep_prob
for keep probability for dropoutThis function will be called for each batch, so tf.global_variables_initializer()
has already been called.
Note: Nothing needs to be returned. This function is only optimizing the neural network.
def train_neural_network(session, optimizer, keep_probability, feature_batch, label_batch):
"""
Optimize the session on a batch of images and labels
: session: Current TensorFlow session
: optimizer: TensorFlow optimizer function
: keep_probability: keep probability
: feature_batch: Batch of Numpy image data
: label_batch: Batch of Numpy label data
"""
# TODO: Implement Function
session.run(optimizer, feed_dict={
x: feature_batch,
y: label_batch,
keep_prob: keep_probability
})
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
tests.test_train_nn(train_neural_network)
Implement the function print_stats
to print loss and validation accuracy. Use the global variables valid_features
and valid_labels
to calculate validation accuracy. Use a keep probability of 1.0
to calculate the loss and validation accuracy.
def print_stats(session, feature_batch, label_batch, cost, accuracy):
"""
Print information about loss and validation accuracy
: session: Current TensorFlow session
: feature_batch: Batch of Numpy image data
: label_batch: Batch of Numpy label data
: cost: TensorFlow cost function
: accuracy: TensorFlow accuracy function
"""
# TODO: Implement Function
loss = session.run(cost, feed_dict={
x: feature_batch,
y: label_batch,
keep_prob: 1.
})
val_accuracy = session.run(accuracy, feed_dict={
x: valid_features,
y: valid_labels,
keep_prob: 1.
})
print('Loss: {:>10.4f} Validation Accuracy: {:.6f}'.format(
loss,
val_accuracy*100))
Tune the following parameters:
epochs
to the number of iterations until the network stops learning or start overfittingbatch_size
to the highest number that your machine has memory for. Most people set them to common sizes of memory:keep_probability
to the probability of keeping a node using dropout# TODO: Tune Parameters
epochs = 50
batch_size = 512
keep_probability = 0.7
Instead of training the neural network on all the CIFAR-10 batches of data, let's use a single batch. This should save time while you iterate on the model to get a better accuracy. Once the final validation accuracy is 50% or greater, run the model on all the data in the next section.
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
print('Checking the Training on a Single Batch...')
with tf.Session() as sess:
# Initializing the variables
sess.run(tf.global_variables_initializer())
# Training cycle
for epoch in range(epochs):
batch_i = 1
for batch_features, batch_labels in helper.load_preprocess_training_batch(batch_i, batch_size):
train_neural_network(sess, optimizer, keep_probability, batch_features, batch_labels)
print('Epoch {:>2}, CIFAR-10 Batch {}: '.format(epoch + 1, batch_i), end='')
print_stats(sess, batch_features, batch_labels, cost, accuracy)
Now that you got a good accuracy with a single CIFAR-10 batch, try it with all five batches.
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
save_model_path = './image_classification'
print('Training...')
with tf.Session() as sess:
# Initializing the variables
sess.run(tf.global_variables_initializer())
# Training cycle
for epoch in range(epochs):
# Loop over all batches
n_batches = 5
for batch_i in range(1, n_batches + 1):
for batch_features, batch_labels in helper.load_preprocess_training_batch(batch_i, batch_size):
train_neural_network(sess, optimizer, keep_probability, batch_features, batch_labels)
print('Epoch {:>2}, CIFAR-10 Batch {}: '.format(epoch + 1, batch_i), end='')
print_stats(sess, batch_features, batch_labels, cost, accuracy)
# Save Model
saver = tf.train.Saver()
save_path = saver.save(sess, save_model_path)
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
%matplotlib inline
%config InlineBackend.figure_format = 'retina'
import tensorflow as tf
import pickle
import helper
import random
# Set batch size if not already set
try:
if batch_size:
pass
except NameError:
batch_size = 64
save_model_path = './image_classification'
n_samples = 4
top_n_predictions = 3
def test_model():
"""
Test the saved model against the test dataset
"""
test_features, test_labels = pickle.load(open('preprocess_test.p', mode='rb'))
loaded_graph = tf.Graph()
with tf.Session(graph=loaded_graph) as sess:
# Load model
loader = tf.train.import_meta_graph(save_model_path + '.meta')
loader.restore(sess, save_model_path)
# Get Tensors from loaded model
loaded_x = loaded_graph.get_tensor_by_name('x:0')
loaded_y = loaded_graph.get_tensor_by_name('y:0')
loaded_keep_prob = loaded_graph.get_tensor_by_name('keep_prob:0')
loaded_logits = loaded_graph.get_tensor_by_name('logits:0')
loaded_acc = loaded_graph.get_tensor_by_name('accuracy:0')
# Get accuracy in batches for memory limitations
test_batch_acc_total = 0
test_batch_count = 0
for test_feature_batch, test_label_batch in helper.batch_features_labels(test_features, test_labels, batch_size):
test_batch_acc_total += sess.run(
loaded_acc,
feed_dict={loaded_x: test_feature_batch, loaded_y: test_label_batch, loaded_keep_prob: 1.0})
test_batch_count += 1
print('Testing Accuracy: {}\n'.format(test_batch_acc_total/test_batch_count))
# Print Random Samples
random_test_features, random_test_labels = tuple(zip(*random.sample(list(zip(test_features, test_labels)), n_samples)))
random_test_predictions = sess.run(
tf.nn.top_k(tf.nn.softmax(loaded_logits), top_n_predictions),
feed_dict={loaded_x: random_test_features, loaded_y: random_test_labels, loaded_keep_prob: 1.0})
helper.display_image_predictions(random_test_features, random_test_labels, random_test_predictions)
test_model()
You might be wondering why you can't get an accuracy any higher. First things first, 50% isn't bad for a simple CNN. Pure guessing would get you 10% accuracy. However, you might notice people are getting scores well above 80%. That's because we haven't taught you all there is to know about neural networks. We still need to cover a few more techniques.
When submitting this project, make sure to run all the cells before saving the notebook. Save the notebook file as "dlnd_image_classification.ipynb" and save it as a HTML file under "File" -> "Download as". Include the "helper.py" and "problem_unittests.py" files in your submission.


Burna Boy Wins ‘African Artiste Of The Year’ In AFRIMA 2019
by George OgboluGrammy-nominated Nigerian Artiste, Burna Boy, on Saturday night emerged as the “African Artiste of The Year” in the 2019 AFRIMA Awards.
The 6th All Africa Music Awards (AFRIMA) was held at the Eko convention hall, Eko Hotel and Suites, Lagos State.
Damini Ogulu, better known as Burna Boy, also went home with the Best Male artiste in West Africa.
Naija News reports that many of the Nigerian artistes who won awards did not attend the event.
Most of them however had representatives at the event, but award winners from other regions in Africa turned up for the show.
The annual event was attended by Nigeria’s Minister of Information and Culture, Lai Mohammed.
Wizkid won song of the year in Africa, with his song ‘Fever’, while Tiwa Savage won Best Female Artiste in Western Africa. The award was collected by her manager.


🍑
welcome to pchs.co. i'm ann and i keep all my projects here. most of what i do here is behind the scenes, but here's a sampling of what's available:


Tired of the XmlSerializer's generic "File or assembly name ctewkx4b.dll, or one of its dependencies, was not found" exception? The XmlSerializerPreCompiler tools checks to see if a type can be serialized by the XmlSerializer class and if it can't, shows the compiler errors happening behind the scenes so that the type can be modified. Enjoy.
This just in: Mathew Nolton has posted a GUI front-end to my XmlSerializerPreCompiler that you might find useful. Thanks, Matt!


The Conformance resource doesn't have direct links to the spec for each Operation (it does link to the OperationDefinition resource though). This link will display the general description of Operations in the spec.


Estimated hitpoints assumes accurate, agressive or defensive.
Controlled and defensive distance training will yeild a different result
The maximum of the two will imapact the combat level.
base lvls {{combatCalc.baseValues.lvl.computed.value}}
base exp {{combatCalc.baseValues.exp.computed.value}}
computed lvls {{combatCalc.calcValues.lvl.computed.value}}
computed exp {{combatCalc.calcValues.exp.computed.value}}
delta lvls {{combatCalc.deltaValues.value.lvl}}
delta exp {{combatCalc.deltaValues.value.exp}}
Levels {{combatCalc.getHumanReadableRsLevels()}}


This static website was created with m4 macros and a makefile. There are several flavors of m4, a legendary macro processor that first appeared in 1977. The macros used for building these pages should be available in all versions. Read more about this project in the about page.


|
Satire in Boston Legal
by David Papke
Boston Legal does not add to the convention of
the dramatic courtroom trial that has been a mainstay of primetime
legal drama since the emergence of network programming in the
late 1940s. Boston Legal also does not significantly advance
the portrayal of small law firms, the lawyers therein, and the
tortured relationships among them. L. A. Law established
the law firm sub-genre in the late 1980s, and it has continued
to be part of primetime through The Practice up to the
present. However, Boston Legal has given television viewers
a fresh satirical look at lawyers and legal practice, and this
satirical dimension of the series may be its most noteworthy
feature. The viewing public's positive response to satire in
Boston Legal may also be suggestive of what lawyers have
come to represent in the culture of postmodern America.
 If well executed, satire amuses
the reader or viewer more so than it provokes hatred or contempt.
There is a lightness or playfulness to the best satire. How does
satire differ from comedy in general? Comedy produces laughter
in and of itself, but satire is more specialized. In playfully
deriding and derogating, satire makes fun of something that exists
outside the given anecdote, short story, movie, or television
drama. The chief satirical target in Boston Legal is the
legal profession and, in particular, self-impressed and immoral
lawyers.
The two most developed satirical characters in the series are
Denny Crane and Alan Shore. The former is portrayed by William
Shatner, who is of course known to one and all for his portrayal
of Captain James T. Kirk in Star Trek. Earlier in his career
Shatner also played an earnest law clerk in the heavy-handed
film Judgment at Nuremberg (1961) and an idealistic prosecutor
in For the People (CBS; 1965). In Boston Legal
Shatner's Denny Crane is a buffoonish lawyer, who seems to suffer
from some variety of dementia but who nevertheless continues
to believe he is "the greatest trial attorney that ever
lived." Crane frequently conveys this sentiment with the
simple phrase "Denny Crane." Yes, some lawyers are
a deluded, unduly self-impressed lot, and what's even more sobering
is that the inept courts and superficial legal system often defer
- or so Boston Legal tells us - to these delusions and
self-impressions.
James Spader plays the lawyer Alan Shore. Less recognizable for
viewers than Shatner, Spader has nevertheless strung together
a long list of acting credits, often playing characters with
a pathological side. Especially noteworthy in this regard is
his creepy performance in the film Sex, Lies, and Videotape
(1989). In Boston Legal Shore has left the firm of Young,
Berlutti & Fruitt of The Practice and joined the more white-shoe
Crane, Poole & Schmidt, where he has made his mark taking
(and usually winning) cases nobody else wants. Shore does not
let such things as integrity and honesty impede his practice.
His conduct and comments are a satire of the conduct and comments
of the ethically-challenged lawyer, who is the source of so many
jokes and cartoons in contemporary American culture. How are
lawyers different than vultures? Only lawyers qualify for frequent-flyer
mileage.
Boston Legal is only partially satirical, and it is not
the first primetime legal drama to satirize lawyers. Ally McBeal's
partner John Cage, after all, prepared for trial by listening
to Barry White tapes, and he was the best litigator in the firm!
However, the sustained excellence of the satire in Boston
Legal is notable, and when we finish laughing and smirking,
we might contemplate what the lawyer has come to symbolize in
our culture. Gone and perhaps not even remembered is De Tocqueville's
sense that lawyers were America's most honored and distinguished
profession, the symbolic elite of a democratic people. In contemporary
America they might and often do serve as the butt of satire.
Posted April 4, 2005
|


Presented by Scott Covert / @scottbcovert
Umm, my workflow rule can't do that-what should I do?
The world of Apex development ain't all sunshine and rainbows.
Should my logic live in a before or after trigger?
Null reference? I thought all records have ids?
Umm, you mean you want to insert more than a single account at once?
...what's a governor limit?
Unit tests?
...but it's sorta working
Before:
After:
Insert:
Update:
trigger accountTestTrggr on Account (before insert, before update) {
//This only handles the first record in the Trigger.new collection
//But if more than 1 Account initiated this trigger, those additional records
//will not be processed
Account acct = Trigger.new[0];
List<Contact> contacts = [select id, salutation, firstname, lastname, email
from Contact where accountId = :acct.Id];
}
trigger accountTestTrggr on Account (before insert, before update) {
List<String> accountNames = new List<String>{};
//Loop through all records in the Trigger.new collection
for(Account a: Trigger.new){
//Concatenate the Name and billingState into the Description field
a.Description = a.Name + ':' + a.BillingState
}
}
.
trigger accountTestTrggr on Account (before insert, before update) {
//For loop to iterate through all the incoming Account records
for(Account a: Trigger.new){
/*
THIS FOLLOWING QUERY IS INEFFICIENT AND DOESN'T SCALE
Since the SOQL Query for related Contacts is within the FOR loop, if this trigger is initiated
with more than 20 records, the trigger will exceed the trigger governor limit
of maximum 20 SOQL Queries.
*/
List<Contact> contacts = [select id, salutation, firstname, lastname, email
from Contact where accountId = :a.Id];
for(Contact c: contacts){
System.debug('Contact Id[' + c.Id + '], FirstName[' + c.firstname + '],
LastName[' + c.lastname +']');
c.Description=c.salutation + ' ' + c.firstName + ' ' + c.lastname;
/*
THIS FOLLOWING DML STATEMENT IS INEFFICIENT AND DOESN'T SCALE
Since the UPDATE dml operation is within the FOR loop, if this trigger is initiated
with more than 20 records, the trigger will exceed the trigger governor limit
of maximum 20 DML Operations.
*/
update c;
}
}
}
trigger accountTestTrggr on Account (before insert, before update) {
//This queries all Contacts related to the incoming Account records in a single SOQL query.
//This is also an example of how to use child relationships in SOQL
List<Account> accountsWithContacts = [select id, name, (select id, salutation, description,
firstname, lastname, email from Contacts)
from Account where Id IN :Trigger.newMap.keySet()];
List<Contact> contactsToUpdate = new List<Contact>{};
// For loop to iterate through all the queried Account records
for(Account a: accountsWithContacts){
// Use the child relationships dot syntax to access the related Contacts
for(Contact c: a.Contacts){
System.debug('Contact Id[' + c.Id + '], FirstName[' + c.firstname + '], LastName[' + c.lastname +']');
c.Description=c.salutation + ' ' + c.firstName + ' ' + c.lastname;
contactsToUpdate.add(c);
}
}
//Now outside the FOR Loop, perform a single Update DML statement.
update contactsToUpdate;
}
Makes unit testing much easier
Keeps your codebase DRY
trigger updateContactOtherAddress on Account(after insert, after update) {
if (trigger.isUpdate) {
//Identify Account Address Changes
Set<Id> setAccountAddressChangedIds = new Set<Id>();
for (Account oAccount : trigger.new) {
Account oOldAccount = trigger.oldMap.get(oAccount.Id);
boolean bIsChanged = (oAccount.BillingStreet != oOldAccount.BillingStreet || oAccount.BillingCity != oOldAccount.BillingCity);
if (bIsChanged) {
setAccountAddressChangedIds.add(oAccount.Id);
}
}
//If any, get contacts associated with each account
if (setAccountAddressChangedIds.isEmpty() == false) {
List<Contact> listContacts = [SELECT Id, AccountId FROM Contact WHERE AccountId IN :setAccountAddressChangedIds];
for (Contact oContact : listContacts) {
//Get Account
oAccount = trigger.newMap.get(oContact.AccountId);
//Set Address
oContact.OtherStreet = oAccount.BillingStreet;
oContact.OtherCity = oAccount.BillingCity;
oContact.OtherState = oAccount.BillingState;
oContact.OtherPostalCode = oAccount.BillingPostalCode;
}
//If any, execute DML command to save contact addresses
if (listContacts.isEmpty() == false) {
update listContacts;
}
}
}
}
trigger AccountBeforeEventListener on Account (before insert, before update) {
if (trigger.isInsert) {
AccountUtil.setDefaultValues(trigger.new);
AccountUtil.setIndustryCode(trigger.new);
}
}
public class AccountUtil {
public static void setDefaultValues(List<Account> listAccounts) {
for (Account oAccount : listAccounts) {
if (oAccount.Industry == null) {
oAccount.Industry = ‘Cloud Computing’;
}
}
}
public static void setIndustryCode(List<Account> listAccounts) {
for (Account oAccount : listAccounts) {
if (oAccount.Industry == ‘Cloud Computing’) {
oAccount.Industry_Code__c = ‘CC’;
}
}
}
}
No more:


|
Embedded Artistry Framework
Embedded Systems C++ Framework
|
General ARM NVIC Controller Interface. More...
#include <nvic.hpp>
Static Public Member Functions | |
| static void | trigger (int32_t irq) noexcept |
| static uint32_t | priority_ (int32_t irq) noexcept |
| static uint32_t | priority_ (int32_t irq, uint32_t priority) noexcept |
| static void | enableInterrupts_ () noexcept |
| static void | disableInterrupts_ () noexcept |
| static void | enable_ (int32_t irq) noexcept |
| static void | disable_ (int32_t irq) noexcept |
| static bool | enabled_ (int32_t irq) noexcept |
| static bool | pending_ (int32_t irq) noexcept |
| static void | clear_ (int32_t irq) noexcept |
| static uintptr_t | handler_ (int32_t irq, uintptr_t func) noexcept |
| static uintptr_t | handler_ (int32_t irq) noexcept |
| static uint32_t | priority (int32_t irq) noexcept |
| static uint32_t | priority (int32_t irq, uint32_t priority) noexcept |
| static void | enableInterrupts () noexcept |
| static void | disableInterrupts () noexcept |
| static void | enable (int32_t irq) noexcept |
| static void | disable (int32_t irq) noexcept |
| static bool | enabled (int32_t irq) noexcept |
| static bool | pending (int32_t irq) noexcept |
| static void | clear (int32_t irq) noexcept |
| static uintptr_t | handler (int32_t irq, uintptr_t func) noexcept |
| static uintptr_t | handler (int32_t irq) noexcept |
Private Member Functions | |
| NVICControl ()=default | |
| ~NVICControl ()=default | |
General ARM NVIC Controller Interface.
This class is not meant to be instantiated directly. Instead, use the static methods.
|
privatedefault |
|
privatedefault |
|
inlinestaticnoexceptinherited |
|
staticnoexcept |
|
inlinestaticnoexceptinherited |
|
staticnoexcept |
|
inlinestaticnoexceptinherited |
|
staticnoexcept |
|
inlinestaticnoexceptinherited |
|
staticnoexcept |
|
inlinestaticnoexceptinherited |
|
inlinestaticnoexceptinherited |
|
staticnoexcept |
|
inlinestaticnoexceptinherited |
|
inlinestaticnoexceptinherited |
|
inlinestaticnoexceptinherited |
|
inlinestaticnoexceptinherited |
|
inlinestaticnoexceptinherited |
|
staticnoexcept |
Referenced by NordicNVIC::trigger().


Eat Order Sleep
About
US
Online
Reservation
Online
Food
Select
City
Sign
UP
Since 2015
The Year We Gathered
Well Yes! Somehow we Managed


atmos.org
You found Corey, a software engineer somewhere in NY.
Contact
Email
Casual on
GitHub
Twitter
{{ content }}


Drake v0.14.0¶
Breaking Changes¶
These are breaking changes that did not undergo a deprecation period.
- SDFormat 1.7 backwards-incompatible changes (#12505)
- Models must have at least one link
- The model frame is now attached to a link
- Model frames can no longer reference “world”
- Drake no longer accidentally supports regexes in the channel name passed to DrakeLcm::Subscribe (#12534)
- Remove unused constraint equation API form Systems framework (#12553)
- Removed the following public API:
- drake::systems::System::CalcConstraintErrorNorm
- drake::systems::System::CalcVelocityChangeFromConstraintImpulses
- drake::systems::System::EvalConstraintEquationsDot
- drake::systems::System::num_constraint_equations
- Removed the following protected API:
- drake::systems::System::DoCalcConstraintErrorNorm
- drake::systems::System::DoCalcVelocityChangeFromConstraintImpulses
- drake::systems::System::DoEvalConstraintEquations
- drake::systems::System::DoEvalConstraintEquationsDot
- drake::systems::System::do_get_num_constraint_equations
- Removed the following public API:
Dynamical Systems¶
New features
- Add ability to implicit integrators to do full Newton (#12524)
Fixes
- Update Simulator’s interface for changing integrators (#12520)
- Eliminate spurious algebraic loop from SymbolicVectorSystem (#12500)
- Systems reject Contexts that they did not create (#12551)
Documentation
- Add high level event documentation (#12501)
Multibody Dynamics¶
New features
- Use Articulated Body Algorithm (ABA) in MultibodyPlant::DoCalcTimeDerivatives() (#12470)
- Add drake contact material properties to SDFormat/URDF parsing (#12491)
- Parse the collision filter group for URDFs (#12495)
- Register a geometry frame for all MultibodyPlant bodies (#12489)
- Add ability to construct MultibodyForces before constructing a MultibodyPlant (#12556)
- Support ellipsoid rendering (#12547)
- Add graphviz visualization of multibodyplant topology (#12485)
- Support parsing SDFormat 1.7 (#12505, #12533), incorporating the pose frame semantics proposal
- Support textures for primitive objects, not just meshes (#12423); this only applies to rendering (RenderEngine*)
- Add C++17 structured binding support to AddMultibodyPlantSceneGraphResult (#12559)
Fixes
- Fix warning on unsupported joint limits for continuous models (#12531, #12499)
- Fix scalar conversion bug in RevoluteSpring (#12522)
New hydroelastic contact model in progress (#12538, #12541, #12418, #12471, #12493, #12529):
- Still only experimental
- Improve performance
- Improve visualization
- Improve specification
Miscellaneous features and fixes¶
Common:
LCM fixes:
- Escape regex characters in DrakeLcm channel names (#12534)
- Clean up DrakeLcm comment/documentation (#12521)
Examples:
pydrake bindings¶
New features
Fixes
- Use np.asarray in gradient and jacobian (#12511)
- Remove “Please see …” addendum from deprecation messages (#12578)
Newly bound
- pydrake.examples.acrobot.AcrobotGeometry (#12574)
- pydrake.examples.pendulum.PendulumGeometry (#12569)
- pydrake.examples.manipulation_station.ManipulationStation.SetupPlanarIiwaStation (#12503)
- pydrake.examples.manipulation_station.ManipulationStation.num_iiwa_joints (#12503)
- pydrake.examples.manipulation_station.ManipulationStation.RegisterRgbdSensor (#12513)
Build system and dependencies¶
- Add Dockerfile for Binder (#12472)
- Fix Binder Dockerfile for Docker versions before 19.03 (#12510)
- Error out on now-unsupported –config=snopt_fortran (#12549, #12545)
- Update recommended Bazel version to 2.0 (#12526)
- Ensure drake lcmtypes are exposed in installed bazel external repository (#12573)
- Fix mkdoc comment handling edge cases (#12519)
- Upgrade bullet to latest release 2.89 (#12516)
- Upgrade libsdformat to latest release 9.0 (#12505)
- Upgrade meshcat to latest commit (#12516)
- Upgrade pybind fork to use merge with latest upstream (#12572)
- Upgrade semantic_version to latest release 2.8.4 (#12516)
- Upgrade uritemplate_py to latest release 3.0.1 (#12516)
- Remove uninstall of ipopt and mumps on macOS (#12517)
Newly-deprecated APIs¶
- drake::multibody::MultibodyPlant default constructor with no arguments
(#12525)
- Use constructor with time_step argument explicit specified instead.
- drake::multibody::AddMultibodyPlantSceneGraph overload without time_step or
plant specified (#12558)
- Use overload with time_step or plant explicitly specified.
- pydrake.multibody.rigid_body_tree.RigidBodyTree.number_of_positions
(#12514)
- Use pydrake.multibody.rigid_body_tree.RigidBodyTree.get_num_positions instead.
- pydrake.multibody.rigid_body_tree.RigidBodyTree.number_of_velocities
(#12514)
- Use pydrake.multibody.rigid_body_tree.RigidBodyTree.get_num_velocities instead.
- DRAKE_NODISCARD in common/drake_nodiscard.h (#12539)
- Use
[[nodiscard]]
directly.
- Use
- drake/examples/kuka_iiwa/iiwa_wsg_simulation will be removed from Drake
(#12581)
- Copy the code into your own project if still needed.
- drake::examples::kuka_iiwa_arm::OracularStateEstimation (#12581)
- Copy the code into your own project if still needed.
- drake::examples::kuka_iiwa_arm::IiwaAndWsgPlantWithStateEstimator (#12581)
- Copy the code into your own project if still needed.
Removal of deprecated APIs¶
- drake::systems::Simulator::StepTo (#12515)
- Use drake::systems::Simulator::AdvanceTo instead.
drake::systems::Simulator::reset_integrator(std::unique_ptr<U>)
(#12520)- Use void or max-step-size version of reset_integrator() instead.
drake::systems::Simulator::reset_integrator(Args&&...)
(#12520)- Use void or max-step-size version of reset_integrator() instead.
- Bazel label @drake//solvers:mathematical_program_lite (#12515)
- Use @drake//solvers:mathematical_program instead.
- Attic removals (#12514)
- DrakeJoint::getNumPositions
- Use DrakeJoint::get_num_positions instead.
- DrakeJoint::getNumVelocities
- Use DrakeJoint::get_num_velocities instead.
- DrakeJoint::getTransformToParentBody
- Use DrakeJoint::get_transform_to_parent_body instead.
- DrakeJoint::getName
- Use DrakeJoint::get_name instead.
- DrakeJoint::getPositionName
- Use DrakeJoint::get_position_name instead.
- DrakeJoint::getVelocityName
- Use DrakeJoint::get_velocity_name instead.
- DrakeJoint::isFloating
- Use DrakeJoint::is_floating instead.
- Several overloads of AddModelInstanceFromUrdfString
- Use more specific overload names.
- RigidBody::hasParent
- Use RigidBody::has_parent_body instead.
- RigidBodyTree::get_number_of_model_instances
- Use RigidBodyTree::get_num_model_instances instead.
- RigidBodyTree::getPositionName
- Use RigidBodyTree::get_position_name instead.
- RigidBodyTree::getVelocityName
- Use RigidBodyTree::get_velocity_name instead.
- RigidBodyTree::findAncestorBodies
- Use RigidBodyTree::FindAncestorBodies instead.
- RigidBodyTree::findLinkId
- Use RigidBodyTree::FindBodyIndex instead.
- RigidBodyTree::findJointId
- Use RigidBodyTree::FindIndexOfChildBodyOfJoint instead.
- RigidBodyTree::get_number_of_bodies
- Use RigidBodyTree::get_num_bodies instead.
- RigidBodyTree::number_of_positions
- Use RigidBodyTree::get_num_positions instead.
- RigidBodyTree::number_of_velocities
- Use RigidBodyTree::get_num_velocities instead.
- RigidBodyTree::bodies
- Use RigidBodyTree::get_bodies and RigidBodyTree::add_rigid_body instead.
- RigidBodyTree::frames
- Use RigidBodyTree::get_frames and RigidBodyTree::addFrame instead.
InverseDynamics(const RigidBodyTree<T>*, bool)
- Use constructor with InverseDynamicsType instead.
- InverseDynamics::get_output_port_torque
- Use InverseDynamics::get_output_port_force instead.
- InverseDynamicsController::get_robot_for_control
- Use InverseDynamicsController::get_rigid_body_tree_for_control instead.
- DrakeJoint::getNumPositions
This release provides pre-compiled binaries named drake-20200116-{bionic|mac}.tar.gz
. See https://drake.mit.edu/from_binary.html#nightly-releases for instructions on how to use them.
Drake binary releases incorporate a pre-compiled version of SNOPT as part of the Mathematical Program toolbox. Thanks to Philip E. Gill and Elizabeth Wong for their kind support.


One says that it was written by Martin Harris and Oliver Cowdery, from the
mouth of Joseph Smith, Jr., as he looked at a stone, with his face in a hat;
the other, that it was written, and altered by Sidney Rigdon, from the
"..."!! One makes it out that it was written in Harmony
township, Susquehanah county, by Martin Harris and Oliver Dowdery; the other,
that it was written in Conneaut, Ohio, first by Solomon Spaulding, and
afterwards altered by Sidney Rigdon, in Pittsburg, Pennsylvania!!! So much,
then, for the agreement of the testimony which is brought forth as FACTS
concerning the coming forth of the Book of Mormon; and yet these gentlemen are
both of them good men; both of them accredited ministers of the Methodist
connexion; and both of them have got what they call FACTS, diametrically
opposed to each other as light is from darkness. But Mr. Heys has got good
testimony to his account, so has Mr. Livesey; and I suppose that because both
of the testimonies are good, they must both of them be true—although the one
contradicts the other—especially as they were supported and held forth by
such pious, holy men.
I shall leave Messrs. Heys and Livesey, then, to settle this difficulty
between themselves, and after the one has proved the other’s statement
false, I will prove his to be false. I would, however, give these gentlemen
one piece of advice, and that is, if they value their standing in society, to
be careful for the future to abide by the truth, and let the Word of God be
their standard, and to leave the "..." lest they should be
found when the destinies of men shall be fixed, among those that love, and
make lies; for, be it remembered, that the "..." as well as
the makers of them, "..."
Is it not a pity that men standing at the head of their flocks as "..." should be necessitated to have recourse to such low subterfuges
as those to defend their falling creeds with? Surely such things are ...
Mr. Heys seems to have forgot the time when Methodist ministers were belied
and slandered, as we are now belied and slandered by him. He must recollect
that it is not long ago since the finger of scorn was pointed at the
Methodists, and the lip of reproach and tongue of scandal were employed
against them. I would have him to remember "..." Then they were despised,
persecuted, and cast out; but it is different with them now, and why
different? Our Saviour says—"..." John 15:19. How is the gold become
dim; and the fine gold, how is it changed? Surely Messrs. John Wesley, John
Nelson, Fletcher, and Bramwell, who were ornaments to the Methodist society,
would have been ashamed to have been found in the situation to which Messrs
Heys and Livesey have placed themselves in.
I would then apply to Mr. Heys the passage of scripture he has quoted in his
circular, "..." and advise him to abide by the truth, for the Word of God
will be true when every man will be found a liar.
I certainly was at the first a little surprised at the malignant attacks that
were made upon me by the ministers of the Methodist order; on pondering over
the circumstance I was reminded of the story of the pheasant and the dunghill
fowls, it was a little surprised that it should be so ill used, being a
stranger among them; but when it saw that they fell out among themselves, it
quietly submitted to its fate. So, When I recollected that these gentlemen
were always bespattering one another, and that I had seen two periodicals
called The Watchman, and Watchman’s Lantern, the pages of which are yet
stained with foul names, epithets, and testimonials concerning conduct the
most disgraceful, and proceedings as dark as ever blackened the history of any
church, and that these were good men (writing against good men) that used this
foul-mouthed slander, or truth, I don’t know which, I was not surprised that
they should call a stranger—"..." etc, etc. I see in all these
things the Word of God fulfilling.


Conjure up an image of the ancient world. Do you see a betoga'd fellow beating a bird about the bonce with an iron bar? No? Then read your Pliny. Here he is, in the Natural History, telling us about parrots:
“She hath an head as hard as is her beak: when she learns to speak, she must be beaten about the head with a rod of yron: for otherwise she careth for no blowes.”
ADDENDUM : Pliny's seventeenth-century English translator Philomen Holland uses the phrase “barton & mue” for aviary. This is splendid, and I suggest we all take every opportunity to resurrect so grievous a loss to the language. You may wish to write a note of it in your day-book, particularly if, as Pliny/Holland says elsewhere, your “memory is so shittle, [you] will soone forget the same againe”.


--- layout: page permalink: /software/real-time-communication/ title: "Real-Time Communication" description: "Discover secure and private ways to communicate with others online without letting any third parties read your messages." --- {% include sections/instant-messenger.html %}


In this website, you can check the people that are invited to the next big event.
Click here to check the invited people.


"As an adolescent, I was painfully shy, withdrawn. I didn’t really have the nerve to sing my songs on stage and nobody else was doing them. I decided to do them in disguise so that I didn’t have to actually go through the humiliation of going on stage and being myself. Rather than be me — which must be incredibly boring to anyone — I’d take Ziggy in, or Aladdin Sane or The Thin White Duke. It was a very strange thing to do.’”


CFD Notebooks¶
Ajay B Harish, Sanjay Govindjee and Frank McKenna
CFD Notebooks is an educational application published on Designsafe and available through the CFD Notebooks Simcenter page, and released under a BSD Clause 2 license. Check out the Getting started with CFDN to know more about how to access the application.
The CFD Notebooks are a set of Jupyter notebooks aimed at senior undergraduate and early graduate students who are interested in learning OpenFOAM. It is hosted on DesignSafe that allows learner to get started with the open-source CFD tool OpenFOAM and to run it on Designsafe. It provides a foundation for all aspects of OpenFOAM, from running cases to programming, so is useful to both new users and existing users wishing to broaden their basic knowledge of OpenFOAM. The learners are exposed to running exercises and simulating cases in OpenFOAM using Designsafe’s HPC computing platform, accessed directly through the Jupyter notebook. The Jupyter notebooks consist of video tutorials, DIY examples, and general reading materials. This learning tool is truly platform-independent and leverages the power of the cloud.
Each notebook of the CFDN covers a particular topic. Thus, advanced users can directly jump to topics of interest rather than follow a one-size-fits-all learning process. The topics covered in the beginner notebooks include:
Introduction to OpenFOAM and Designsafe
Different solvers in OpenFOAM and which to use?
Boundary conditions in OpenFOAM
Meshing in OpenFOAM (blockMesh)
In the next version of CFDN, it will also include content on
Meshing in OpenFOAM (snappyHexMesh)
Importing meshing into OpenFOAM
Turbulence models and what are these?
Multiphase flows and VOF
Post-processing in OpenFOAM using Markers
Finite Volume Method and interpolations
Using wavemaker boundary conditions
Writing custom boundary conditions
If there is a topic of particular interest to you, please make a feature request on our Message Board and we would be glad to add them.
Contact¶
Ajay B Harish (ajaybh@berkeley.edu), Frank Mckenna (fmk@berkeley.edu), NHERI SimCenter, University of California Berkeley


Progressively strategize just in time scenarios and compelling results. Intrinsicly parallel task extensive systems whereas distinctive catalysts for scenarios and compelling results change.


Plugin Information |
|---|
No information for the plugin 'HiddenParameter' is available. It may have been removed from distribution. |
Jenkins Hidden Parameter Plugin
This plugin adds support for Parameter. After the plugin is installed,in job configuration's page,you can see Hidden Parameter.
Characteristics
1. Parameters once more, it looks bad user experience.this plugin can resolve the problem.
2. Some key parameters, once modified, can lead to the risk.these parameters,only administrator can modify,to reduce the risk.
3. Hidden parameter,only hide in the build execution, in job configuration's page can modify.
4. After the build, parameter list can display hidden parameters.
Install
Use Case
After the plugin is installed,in job configuration's page,you can see Hidden Parameter:
https://github.com/wy-scm/hidden-parameter-plugin/raw/master/images/JobConfiguration1.png
for example,you add a hidden parameter,is called hidden_para.
https://github.com/wy-scm/hidden-parameter-plugin/raw/master/images/JobConfiguration2.png
click 'Build With Parameters' link ,the parameter hidden_para of the set before, is hide,don't display in this page.
https://github.com/wy-scm/hidden-parameter-plugin/raw/master/images/JobConfiguration3.png
After the build , click 'Parameters' link, parameter list can display hidden parameters hidden_para.
https://github.com/wy-scm/hidden-parameter-plugin/raw/master/images/JobConfiguration4.png
Contribute
Fork me on Github at https://github.com/wy-scm/hidden-parameter-plugin.


This website was made becuase I had to make a functioning website for my web design final exam at The Portage Lakes Carreer Center. I decided to do mine about Halloween because I had some knowledge about it.
Who made it?
My name is Jake and I am 17 and I am a senior at The Portage Lakes Career.
What's the purpose of this website?
The purpose of this website was to be informational spread information about the holiday. This website will give you different views on how different countries celebrate their Halloween.
Contact Information
If you feel like contacting me for any reason click Feedback to contact me. Also here is my instructors email click here


Check the main page and scroll down to find the link to the presentation with information on how to help!
It's a simple blog for now, but it'll get better!
We are QEFA and we strive to provide a quality education for those who are less fortunate.


{% for person in tense.persons %} {% include 'conjugation/person.html' with person=person %}{% endfor %}


I found it interesting that mindfulness is a skill that can be easily learnt and applied to anyone's working life.
How did you find the two minutes of mindfulness?
I found my two minutes of mindfulness extremely relaxing. I tried the 'Easy' approach and while I often felt my mind wander to other things it was easy enough to bring it back to thinking about my breathing and stay in that mindful state. It is definitely something I want to continue to practice.


About The Server
This page is a static page that is directly served by using the utility methods of the server
You can find more detailed information on the documention of the server