خط زمانی
-
card_travelSome Title
Wifey made the best Father's Day meal ever. So thankful so happy so blessed. Thank you for making my family We just had fun with the “future” theme !!! It was a fun night all together ... The always rude Kanye Show at 2am Sold Out Famous viewing @ Figueroa and 12th in downtown.
11 hours ago via Twitter
-
extensionAnother One
Thank God for the support of my wife and real friends. I also wanted to point out that it’s the first album to go number 1 off of streaming!!! I love you Ellen and also my number one design rule of anything I do from shoes to music to homes is that Kim has to like it....
-
fingerprintAnother Title
Called I Miss the Old Kanye That’s all it was Kanye And I love you like Kanye loves Kanye Famous viewing @ Figueroa and 12th in downtown LA 11:10PM
What if Kanye made a song about Kanye Royère doesn't make a Polar bear bed but the Polar bear couch is my favorite piece of furniture we own It wasn’t any Kanyes Set on his goals Kanye
-
flight_landAnother One
Tune into Big Boy's 92.3 I'm about to play the first single from Cruel Winter also to Kim’s hair and makeup Lorraine jewelry and the whole style squad at Balmain and the Yeezy team. Thank you Anna for the invite thank you to the whole Vogue team


Calibration¶
The calibration module of Py-RAMID allows users to calibrate the coupled model with genetic algorithm in parallel. Due to the file-based coupling structure between RiverWare and human models (e.g., ABM), seperated working directory for each simuteniously simulated evaluation are required. To do that, users have to define an objective function with var and SubWD arguments as shown below.
def ObjFunc(var, SubWD):
# Create RiverwareWrap object at SubWD, which files will be copy and
# modified automatically from the source directory.
RwWrap = PyRAMID.RiverwareWrap(SubWD , "Source WD")
# Update parameters using var from GA.
# Covert var (1sD array) from GA to original formats, DataFrame or Array.
Converter = PyRAMID.GADataConverter()
# ParDF1 and ParDF2 are given uncalibrated parameter dataframes.
ConvertedVar = Converter.Covert2GAArray([ParDF1, ParDF2])
# Update ParDF1 and ParDF2 with var.
ParDF1, ParDF2 = Converter.GAArray2OrgPar(var)
# Save Par1DF and Par2Arr to ABM folder at RwWrap.PATH["ABM_Path"]
ParDF1.to_csv(os.path.join(RwWrap.PATH["ABM_Path"], "ParDF1.csv"))
ParDF2.to_csv(os.path.join(RwWrap.PATH["ABM_Path"], "ParDF2.csv"))
# Create files and start the simulation
RwWrap.createFiles()
RwWrap.runPyRAMID()
# Calculate objective value for minimization optimization
objective = ObjectiveFunction( Simulation outputs )
return objective
Note
PyRAMID.GADataConverter() is a function to convert a list of dataframes and 1d/2d array to 1D array. Also, it can convert 1d array back to original format. For details about PyRAMID.GADataConverter(), please see here.
Example¶
import os
import pyramid as PyRAMID
# Define an objective function with var and SubWD arguments
def ObjFunc(var, SubWD):
# Create RiverwareWrap object at SubWD, which files will be copy and
# modified automatically from the source directory.
RwWrap = PyRAMID.RiverwareWrap( SubWD , "Source WD")
# Update parameters using var from GA.
# Covert var (1D array) from GA to original formats, DataFrame or Array.
Converter = PyRAMID.GADataConverter()
# ParDF1 and ParDF2 are given uncalibrated parameter dataframes.
ConvertedVar = Converter.Covert2GAArray([ParDF1, ParDF2])
# Update ParDF1 and ParDF2 with var.
ParDF1, ParDF2 = Converter.GAArray2OrgPar(var)
# Save Par1DF and Par2Arr to ABM folder at RwWrap.PATH["ABM_Path"]
ParDF1.to_csv(os.path.join(RwWrap.PATH["ABM_Path"], "ParDF1.csv"))
ParDF2.to_csv(os.path.join(RwWrap.PATH["ABM_Path"], "ParDF2.csv"))
# Create files and start the simulation
RwWrap.createFiles()
RwWrap.runPyRAMID()
# Calculate objective value for minimization optimization
objective = ObjectiveFunction( Simulation outputs )
return objective
# Create GA object with given working directory ga_WD
algorithm_parameters = {'max_num_iteration': 100,
'population_size':100,
'mutation_probability':0.3,
'elit_ratio': 0.03,
'crossover_probability': 0.5,
'parents_portion': 0.3,
'crossover_type':'uniform',
'max_iter_without_improv': None}
NumAgent = 6
varbound = [[0,1]]*NumAgent + [[0,2]]*NumAgent + [[0,2]]*NumAgent
vartype = [['real'], ['real'], ['real']]*NumAgent
AutoGA = PyRAMID.GeneticAlgorithm(function = ObjFunc,
wd = ga_WD,
dimension = len(vartype),
variable_boundaries = varbound,
variable_type_mixed = vartype,
threads = 8,
seed = 2,
saveGADataPerIter = True,
function_timeout = 300000,
parallel = 2,
algorithm_parameters = algorithm_parameters,
continue_file = None,
msg_level = None)
# Start calibration
AutoGA.runGA()
# Or to continue previous run by loading GAobject.pickle.
AutoGA = PyRAMID.GeneticAlgorithm(continue_file = "GAobject.pickle")
AutoGA.runGA()
PyRAMID.GADataConverter()¶
GADataConverter() is a class that can convert between a list of Dataframes or arrays (1D or 2D) and a 1D array. We design this for assisting calibration. Below is an example.
import pandas as pd
import pyramid as PyRAMID
ParDF1 = pd.DataFrame({"Agent1": [1,2,3], "Agent2": [4,5,6]},
index = ["Par1", "Par2", "Par3"])
ParDF2 = pd.DataFrame({"Agent3": [9,8,7], "Agent4": [6,5,4]},
index = ["Par1", "Par2", "Par3"])
# Create a object called Converter.
Converter = PyRAMID.GADataConverter()
# ParDF1 and ParDF2 are given uncalibrated parameter dataframes.
ConvertedVar = Converter.Covert2GAArray([ParDF1, ParDF2])
# ConvertedVar
# Out[7]: [1, 4, 2, 5, 3, 6, 9, 6, 8, 5, 7, 4]
# Covert 1D ConvertedVar back to a DataFrame list.
DFList = Converter.GAArray2OrgPar(ConvertedVar)
# DFList
# Out:
# [ Agent1 Agent2
# Par1 1 4
# Par2 2 5
# Par3 3 6,
# Agent3 Agent4
# Par1 9 6
# Par2 8 5
# Par3 7 4]
# Update ParDF1 and ParDF2 with var.
var = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
ParDF1, ParDF2 = Converter.GAArray2OrgPar(var)
# ParDF1
# Out:
# Agent1 Agent2
# Par1 1 2
# Par2 3 4
# Par3 5 6
# ParDF2
# Out:
# Agent3 Agent4
# Par1 7 8
# Par2 9 10
# Par3 11 12


Browse Our
Design
Add your own text and
images.
Start With
Your Logo
Combine it with our
layouts and fonts.
Start With
Your Logo
Combine it with our
layouts and fonts.
Start With
Your Logo
Combine it with our
layouts and fonts.


My favorite things
These are a few of my favorite things.
People
Here are some of my favorite people!
- My Siblings
- My Neices and Nephews
- Lexi
- Julian
- Kaley
- Justin
- Sergio
- Natalia
- My Best Friends
- Julianna
- Jeremy
- Marianne
- Morgana
- My Cat Zinder
Best Toppings on Pizza
These are my 5 favorites, in order:
- Sausage
- Olives
- Mushrooms
- Pineapple
- Extra Mozzarella
Thanks for reading about me!


Usage¶
Installation¶
If you want to get started fast, use the PrestoPHP Skeleton:
composer create-project prestophp/prestophp-skeleton path/to/install
If you want more flexibility, use Composer instead:
composer require PrestoPHP/PrestoPHP:~2.0
Web Server¶
All examples in the documentation rely on a well-configured web server; read the webserver documentation to check yours.
Bootstrap¶
To bootstrap PrestoPHP, all you need to do is require the vendor/autoload.php
file and create an instance of PrestoPHP\Application
. After your controller
definitions, call the run
method on your application:
// web/index.php
require_once __DIR__.'/../vendor/autoload.php';
$app = new PrestoPHP\Application();
// ... definitions
$app->run();
Tip
When developing a website, you might want to turn on the debug mode to ease debugging:
$app['debug'] = true;
Tip
If your application is hosted behind a reverse proxy at address $ip
,
and you want PrestoPHP to trust the X-Forwarded-For*
headers, you will
need to run your application like this:
use Symfony\Component\HttpFoundation\Request;
Request::setTrustedProxies(array($ip));
$app->run();
Routing¶
In PrestoPHP you define a route and the controller that is called when that route is matched. A route pattern consists of:
Pattern: The route pattern defines a path that points to a resource. The pattern can include variable parts and you are able to set RegExp requirements for them.
Method: One of the following HTTP methods:
GET
,POST
,PUT
,DELETE
,PATCH
, orOPTIONS
. This describes the interaction with the resource.
The controller is defined using a closure like this:
function () {
// ... do something
}
The return value of the closure becomes the content of the page.
Example GET Route¶
Here is an example definition of a GET
route:
$blogPosts = array(
1 => array(
'date' => '2011-03-29',
'author' => 'igorw',
'title' => 'Using PrestoPHP',
'body' => '...',
),
);
$app->get('/blog', function () use ($blogPosts) {
$output = '';
foreach ($blogPosts as $post) {
$output .= $post['title'];
$output .= '
';
}
return $output;
});
Visiting /blog
will return a list of blog post titles. The use
statement means something different in this context. It tells the closure to
import the $blogPosts
variable from the outer scope. This allows you to use
it from within the closure.
Dynamic Routing¶
Now, you can create another controller for viewing individual blog posts:
$app->get('/blog/{id}', function (PrestoPHP\Application $app, $id) use ($blogPosts) {
if (!isset($blogPosts[$id])) {
$app->abort(404, "Post $id does not exist.");
}
$post = $blogPosts[$id];
return "
{$post['title']}
".
"
{$post['body']}
";
});
This route definition has a variable {id}
part which is passed to the
closure.
The current Application
is automatically injected by PrestoPHP to the Closure
thanks to the type hinting.
When the post does not exist, you are using abort()
to stop the request
early. It actually throws an exception, which you will see how to handle later
on.
Example POST Route¶
POST routes signify the creation of a resource. An example for this is a
feedback form. You will use the mail
function to send an e-mail:
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$app->post('/feedback', function (Request $request) {
$message = $request->get('message');
<EMAIL_ADDRESS>'[YourSite] Feedback', $message);
return new Response('Thank you for your feedback!', 201);
});
It is pretty straightforward.
Note
There is a SwiftmailerServiceProvider
included that you can use instead of mail()
.
The current request
is automatically injected by PrestoPHP to the Closure
thanks to the type hinting. It is an instance of
Request, so you can fetch variables using the request get
method.
Instead of returning a string you are returning an instance of Response.
This allows setting an HTTP status code, in this case it is set to
201 Created
.
Note
PrestoPHP always uses a Response
internally, it converts strings to
responses with status code 200
.
Other methods¶
You can create controllers for most HTTP methods. Just call one of these
methods on your application: get
, post
, put
, delete
, patch
, options
:
$app->put('/blog/{id}', function ($id) {
// ...
});
$app->delete('/blog/{id}', function ($id) {
// ...
});
$app->patch('/blog/{id}', function ($id) {
// ...
});
Tip
Forms in most web browsers do not directly support the use of other HTTP
methods. To use methods other than GET and POST you can utilize a special
form field with a name of _method
. The form’s method
attribute must
be set to POST when using this field:
<form action="/my/target/route/" method="post">

<input type="hidden" id="_method" name="_method" value="PUT" />
</form>
You need to explicitly enable this method override:
use Symfony\Component\HttpFoundation\Request;
Request::enableHttpMethodParameterOverride();
$app->run();
You can also call match
, which will match all methods. This can be
restricted via the method
method:
$app->match('/blog', function () {
// ...
});
$app->match('/blog', function () {
// ...
})
->method('PATCH');
$app->match('/blog', function () {
// ...
})
->method('PUT|POST');
Note
The order in which the routes are defined is significant. The first matching route will be used, so place more generic routes at the bottom.
Route Variables¶
As it has been shown before you can define variable parts in a route like this:
$app->get('/blog/{id}', function ($id) {
// ...
});
It is also possible to have more than one variable part, just make sure the closure arguments match the names of the variable parts:
$app->get('/blog/{postId}/{commentId}', function ($postId, $commentId) {
// ...
});
While it’s not recommended, you could also do this (note the switched arguments):
$app->get('/blog/{postId}/{commentId}', function ($commentId, $postId) {
// ...
});
You can also ask for the current Request and Application objects:
$app->get('/blog/{id}', function (Application $app, Request $request, $id) {
// ...
});
Note
Note for the Application and Request objects, PrestoPHP does the injection based on the type hinting and not on the variable name:
$app->get('/blog/{id}', function (Application $foo, Request $bar, $id) {
// ...
});
Route Variable Converters¶
Before injecting the route variables into the controller, you can apply some converters:
$app->get('/user/{id}', function ($id) {
// ...
})->convert('id', function ($id) { return (int) $id; });
This is useful when you want to convert route variables to objects as it allows to reuse the conversion code across different controllers:
$userProvider = function ($id) {
return new User($id);
};
$app->get('/user/{user}', function (User $user) {
// ...
})->convert('user', $userProvider);
$app->get('/user/{user}/edit', function (User $user) {
// ...
})->convert('user', $userProvider);
The converter callback also receives the Request
as its second argument:
$callback = function ($post, Request $request) {
return new Post($request->attributes->get('slug'));
};
$app->get('/blog/{id}/{slug}', function (Post $post) {
// ...
})->convert('post', $callback);
A converter can also be defined as a service. For example, here is a user converter based on Doctrine ObjectManager:
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
class UserConverter
{
private $om;
public function __construct(ObjectManager $om)
{
$this->om = $om;
}
public function convert($id)
{
if (null === $user = $this->om->find('User', (int) $id)) {
throw new NotFoundHttpException(sprintf('User %d does not exist', $id));
}
return $user;
}
}
The service will now be registered in the application, and the
convert()
method will be used as converter (using the syntax
service_name:method_name
):
$app['converter.user'] = function () {
return new UserConverter();
};
$app->get('/user/{user}', function (User $user) {
// ...
})->convert('user', 'converter.user:convert');
Requirements¶
In some cases you may want to only match certain expressions. You can define
requirements using regular expressions by calling assert
on the
Controller
object, which is returned by the routing methods.
The following will make sure the id
argument is a positive integer, since
\d+
matches any amount of digits:
$app->get('/blog/{id}', function ($id) {
// ...
})
->assert('id', '\d+');
You can also chain these calls:
$app->get('/blog/{postId}/{commentId}', function ($postId, $commentId) {
// ...
})
->assert('postId', '\d+')
->assert('commentId', '\d+');
Conditions¶
Besides restricting route matching based on the HTTP method or parameter
requirements, you can set conditions on any part of the request by calling
when
on the Controller
object, which is returned by the routing
methods:
$app->get('/blog/{id}', function ($id) {
// ...
})
->when("request.headers.get('User-Agent') matches '/firefox/i'");
The when
argument is a Symfony Expression , which means that you need to
add symfony/expression-language
as a dependency of your project.
Default Values¶
You can define a default value for any route variable by calling value
on
the Controller
object:
$app->get('/{pageName}', function ($pageName) {
// ...
})
->value('pageName', 'index');
This will allow matching /
, in which case the pageName
variable will
have the value index
.
Named Routes¶
Some providers can make use of named routes. By default PrestoPHP will generate an
internal route name for you but you can give an explicit route name by calling
bind
:
$app->get('/', function () {
// ...
})
->bind('homepage');
$app->get('/blog/{id}', function ($id) {
// ...
})
->bind('blog_post');
Controllers as Classes¶
Instead of anonymous functions, you can also define your controllers as
methods. By using the ControllerClass::methodName
syntax, you can tell
PrestoPHP to lazily create the controller object for you:
$app->get('/', 'Acme\\Foo::bar');
use PrestoPHP\Application;
use Symfony\Component\HttpFoundation\Request;
namespace Acme
{
class Foo
{
public function bar(Request $request, Application $app)
{
// ...
}
}
}
This will load the Acme\Foo
class on demand, create an instance and call
the bar
method to get the response. You can use Request
and
PrestoPHP\Application
type hints to get $request
and $app
injected.
It is also possible to define your controllers as services.
Global Configuration¶
If a controller setting must be applied to all controllers (a converter, a
middleware, a requirement, or a default value), configure it on
$app['controllers']
, which holds all application controllers:
$app['controllers']
->value('id', '1')
->assert('id', '\d+')
->requireHttps()
->method('get')
->convert('id', function () { /* ... */ })
->before(function () { /* ... */ })
->when('request.isSecure() == true')
;
These settings are applied to already registered controllers and they become the defaults for new controllers.
Note
The global configuration does not apply to controller providers you might mount as they have their own global configuration (read the dedicated chapter for more information).
Error Handlers¶
When an exception is thrown, error handlers allow you to display a custom error page to the user. They can also be used to do additional things, such as logging.
To register an error handler, pass a closure to the error
method which
takes an Exception
argument and returns a response:
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
$app->error(function (\Exception $e, Request $request, $code) {
return new Response('We are sorry, but something went terribly wrong.');
});
You can also check for specific errors by using the $code
argument, and
handle them differently:
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
$app->error(function (\Exception $e, Request $request, $code) {
switch ($code) {
case 404:
$message = 'The requested page could not be found.';
break;
default:
$message = 'We are sorry, but something went terribly wrong.';
}
return new Response($message);
});
You can restrict an error handler to only handle some Exception classes by setting a more specific type hint for the Closure argument:
use Symfony\Component\HttpFoundation\Request;
$app->error(function (\LogicException $e, Request $request, $code) {
// this handler will only handle \LogicException exceptions
// and exceptions that extend \LogicException
});
Note
As PrestoPHP ensures that the Response status code is set to the most appropriate one depending on the exception, setting the status on the response alone won’t work.
If you want to overwrite the status code, which you should not without a
good reason, set the X-Status-Code
header (on Symfony until version
3.2):
return new Response('Error', 404 /* ignored */, array('X-Status-Code' => 200));
As of Symfony 5.0, call
ExceptionEvent::allowCustomResponseCode()
first and then
then set the status code on the response as normal. The kernel will now use
your status code when sending the response to the client. The
ExceptionEvent
is passed to the error callback as a 4th
parameter:
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
$app->error(function (\Exception $e, Request $request, $code, ExceptionEvent $event) {
$event->allowCustomResponseCode();
$response = new Response('No Content', 204);
return $response;
});
If you want to use a separate error handler for logging, make sure you register it with a higher priority than response error handlers, because once a response is returned, the following handlers are ignored.
Note
PrestoPHP ships with a provider for Monolog which handles logging of errors. Check out the Providers chapter for details.
Tip
PrestoPHP comes with a default error handler that displays a detailed error
message with the stack trace when debug is true, and a simple error
message otherwise. Error handlers registered via the error()
method
always take precedence but you can keep the nice error messages when debug
is turned on like this:
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
$app->error(function (\Exception $e, Request $request, $code) use ($app) {
if ($app['debug']) {
return;
}
// ... logic to handle the error and return a Response
});
The error handlers are also called when you use abort
to abort a request
early:
$app->get('/blog/{id}', function (PrestoPHP\Application $app, $id) use ($blogPosts) {
if (!isset($blogPosts[$id])) {
$app->abort(404, "Post $id does not exist.");
}
return new Response(...);
});
You can convert errors to Exceptions
, check out the cookbook chapter for details.
View Handlers¶
View Handlers allow you to intercept a controller result that is not a
Response
and transform it before it gets returned to the kernel.
To register a view handler, pass a callable (or string that can be resolved to a
callable) to the view()
method. The callable should accept some sort of result
from the controller:
$app->view(function (array $controllerResult) use ($app) {
return $app->json($controllerResult);
});
View Handlers also receive the Request
as their second argument,
making them a good candidate for basic content negotiation:
$app->view(function (array $controllerResult, Request $request) use ($app) {
$acceptHeader = $request->headers->get('Accept');
$bestFormat = $app['negotiator']->getBestFormat($acceptHeader, array('json', 'xml'));
if ('json' === $bestFormat) {
return new JsonResponse($controllerResult);
}
if ('xml' === $bestFormat) {
return $app['serializer.xml']->renderResponse($controllerResult);
}
return $controllerResult;
});
View Handlers will be examined in the order they are added to the application and PrestoPHP will use type hints to determine if a view handler should be used for the current result, continuously using the return value of the last view handler as the input for the next.
Note
You must ensure that PrestoPHP receives a Response
or a string as the result of
the last view handler (or controller) to be run.
Redirects¶
You can redirect to another page by returning a RedirectResponse
response,
which you can create by calling the redirect
method:
$app->get('/', function () use ($app) {
return $app->redirect('/hello');
});
This will redirect from /
to /hello
.
Forwards¶
When you want to delegate the rendering to another controller, without a round-trip to the browser (as for a redirect), use an internal sub-request:
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\HttpKernelInterface;
$app->get('/', function () use ($app) {
// forward to /hello
$subRequest = Request::create('/hello', 'GET');
return $app->handle($subRequest, HttpKernelInterface::SUB_REQUEST);
});
Tip
You can also generate the URI via the built-in URL generator:
$request = Request::create($app['url_generator']->generate('hello'), 'GET');
There’s some more things that you need to keep in mind though. In most cases you will want to forward some parts of the current master request to the sub-request. That includes: Cookies, server information, session. Read more on how to make sub-requests.
JSON¶
If you want to return JSON data, you can use the json
helper method.
Simply pass it your data, status code and headers, and it will create a JSON
response for you:
$app->get('/users/{id}', function ($id) use ($app) {
$user = getUser($id);
if (!$user) {
$error = array('message' => 'The user was not found.');
return $app->json($error, 404);
}
return $app->json($user);
});
Streaming¶
It’s possible to stream a response, which is important in cases when you don’t want to buffer the data being sent:
$app->get('/images/{file}', function ($file) use ($app) {
if (!file_exists(__DIR__.'/images/'.$file)) {
return $app->abort(404, 'The image was not found.');
}
$stream = function () use ($file) {
readfile($file);
};
return $app->stream($stream, 200, array('Content-Type' => 'image/png'));
});
If you need to send chunks, make sure you call ob_flush
and flush
after every chunk:
$stream = function () {
$fh = fopen('http://www.example.com/', 'rb');
while (!feof($fh)) {
echo fread($fh, 1024);
ob_flush();
flush();
}
fclose($fh);
};
Sending a file¶
If you want to return a file, you can use the sendFile
helper method.
It eases returning files that would otherwise not be publicly available. Simply
pass it your file path, status code, headers and the content disposition and it
will create a BinaryFileResponse
response for you:
$app->get('/files/{path}', function ($path) use ($app) {
if (!file_exists('/base/path/' . $path)) {
$app->abort(404);
}
return $app->sendFile('/base/path/' . $path);
});
To further customize the response before returning it, check the API doc for SymfonyComponentHttpFoundationBinaryFileResponse:
return $app
->sendFile('/base/path/' . $path)
->setContentDisposition(ResponseHeaderBag::DISPOSITION_ATTACHMENT, 'pic.jpg')
;
Traits¶
PrestoPHP comes with PHP traits that define shortcut methods.
Almost all built-in service providers have some corresponding PHP traits. To use them, define your own Application class and include the traits you want:
use PrestoPHP\Application;
class MyApplication extends Application
{
use Application\TwigTrait;
use Application\SecurityTrait;
use Application\FormTrait;
use Application\UrlGeneratorTrait;
use Application\SwiftmailerTrait;
use Application\MonologTrait;
use Application\TranslationTrait;
}
You can also define your own Route class and use some traits:
use PrestoPHP\Route;
class MyRoute extends Route
{
use Route\SecurityTrait;
}
To use your newly defined route, override the $app['route_class']
setting:
$app['route_class'] = 'MyRoute';
Read each provider chapter to learn more about the added methods.
Security¶
Make sure to protect your application against attacks.
Escaping¶
When outputting any user input, make sure to escape it correctly to prevent Cross-Site-Scripting attacks.
Escaping HTML: PHP provides the
htmlspecialchars
function for this. PrestoPHP provides a shortcutescape
method:use Symfony\Component\HttpFoundation\Request; $app->get('/name', function (Request $request, PrestoPHP\Application $app) { $name = $request->get('name'); return "You provided the name {$app->escape($name)}."; });
If you use the Twig template engine, you should use its escaping or even auto-escaping mechanisms. Check out the Providers chapter for details.
Escaping JSON: If you want to provide data in JSON format you should use the PrestoPHP
json
function:use Symfony\Component\HttpFoundation\Request; $app->get('/name.json', function (Request $request, PrestoPHP\Application $app) { $name = $request->get('name'); return $app->json(array('name' => $name)); });


Sample Goals Page
Goal 1:
Click the button below
Click Me (you know you want to)
Goal 2:
Slide the slider to the right
Goal 3:
Type something profound in the box below
Goal 4:
Pick your favorite color
Goal 5:
Pick a date
Goal 6:
Choose your rank
Goal 7:
Click on this link
A Great Link
Goal 8:
How much would you like to donate?
Goal 9:
Open a window using the button below
Open Window


Bali to Palawan by plane
Booking
For this trip we booked the tickets through 12goAsia. We also searched for tickets on
Google but the cheapest ones (yes again) were on 12go Asia. The trip from Bali (Bali -
Indonesia) to Puerto Princesa (Palawan - Philippines) Cost about 740$ CAD, so it’s about
370$ CAD for eac plane tickets. We had to take two flight. You cannot jump straight from
Bali to Palawan, you have to go to Manila (Philippines capital) first, then to Palawan.
(Palawan actually has 2 airports one in puerto princesa and one in El nido. But, landing
in El nido is reallllly expensive… We kept telling ourselves that we should have stopped
traveling in the middle of the night. We are always facing with two scenario. One is to
leave during the night and arrive at odd hours or the other one is to leave during the
day and pay for the incredibly expensive tickets. The day flights are not worth it, even
for our sleep.
The flightsss
Bali to Manila
The first flight left around 11h20 pm. The flight was 4 hours long and it was with
AirAsia. During that flight you don’t have dinner, snack or water. You need to bring
your own things or pay the planes price.
Manila to Puerto Princesa
This flight is 1h30. It’s a domestic flight so you have to change terminal in order to
take your flight. In order to change terminal, there’s a bus at the airport and
unfortunately for us the bus services only started at 5AM so we had to wait for a while
to take it. Anyway, once you get to the domestic flight terminal, it’s very crowded. But
on the positive side, there’s a Mr. Donut shop so we got to indulge in cheap donuts for
breakfast. On the flight there’s no meal or snack service either and if you want some,
you need to buy at the planes rate.


(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
(Since version ) see corresponding Javadoc for more information.
Created by PM on 16/08/2016.


Composition
Title:
Incipit:
Opus:
Date of Creation:
Date of Premiere:
Place of Premiere:
Locality:
Country:
Commentary:
Dedication:
Formation:
Category:
Duration:
Author:
Excerpt:
Records
Title
Label
Published
Persons
Title
PND
Role
References
Title
ISBN
Locality


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import uk.gov.hmrc.govukfrontend.views.html.components._ @import uk.gov.hmrc.govukfrontend.views.html.components.implicits._ @import uk.gov.hmrc.preferencesadminfrontend.config.AppConfig @import uk.gov.hmrc.preferencesadminfrontend.controllers.routes @this( layout: Layout, form: FormWithCSRF, govukBreadcrumbs: GovukBreadcrumbs) @(rescindment: Form[_], succeeded: String = "-", sent: String = "-", failed: String = "-")(implicit request: Request[_], messages: Messages, appConfig: AppConfig) @layout(pageTitle = Some("Rescindment")) { @govukBreadcrumbs(Breadcrumbs( items = Seq( BreadcrumbsItem( content = Text("Home"), href = Some("/paperless/admin/home") ), BreadcrumbsItem( content = Text("Message Rescindments"), href = Some("/paperless/admin/rescindment") ), BreadcrumbsItem( content = Text("Rescindments - Send"), href = Some("#") ) ) ) )


| Name | Started | Status |
| A Personal Site | August 6, 2014 | OK |
| Hello, world! | August 6, 2014 | OK |
| Auto Stack | August 6, 2014 | OK |
| Manual Stack | August 6, 2014 | OK |
| Test: Complex App | August 6, 2014 | OK |
| Test: Module Call Order | August 6, 2014 | OK |
| Test: Module | August 6, 2014 | OK |
| Test: Nested App | August 6, 2014 | OK |
| Test: Stack | August 6, 2014 | OK |


Man charged with 2nd degree murder of man shot in broad daylight in Gaston Co. neighborhood
by WBTV Web StaffGASTONIA, N.C. (WBTV) - A Shelby man has been charged with second-degree murder after a broad-daylight shooting in Gastonia Sunday afternoon left a man dead.
The incident happened just before 2 p.m. on West Hudson Boulevard, near Hwy 321. When officers arrived at the scene, they found 22-year-old Avery Marquavis Ponder, of Cherryville, lying in the street with a single gunshot wound.
Ponder was rushed to CaroMont Regional Medical Center where he was pronounced dead a short time later.
Detectives were looking for 21-year-old Jordan Tre Chambers for questioning about the incident. On Tuesday, officials said Chambers was arrested and charged in Ponder’s death.
A possible motive for the shooting has not been released.
On Tuesday, Gaston Police also announced that Destynee Emayii Woodberry had been charged with accessory after the fact of second degree murder in connection with the case.
Anyone with further information about the investigation is asked to call the Gastonia Poice Department at<PHONE_NUMBER>.


| URL | Page Title |
|---|---|
/programs/ |
List of Programs |
/tags/research/ |
Tagged “research” |
/tags/advanced/ |
Tagged “advanced” |
/tags/strength/ |
Tagged “strength” |
/tags/keto/ |
Tagged “keto” |
/tags/programming/ |
Tagged “programming” |
/tags/program/ |
Tagged “program” |
/tags/hypertrophy/ |
Tagged “hypertrophy” |
/tags/article/ |
Tagged “article” |
/tags/creatine/ |
Tagged “creatine” |
/tags/supplements/ |
Tagged “supplements” |
/tags/supplement/ |
Tagged “supplement” |
/tags/weight/ |
Tagged “weight” |
/tags/nutrition/ |
Tagged “nutrition” |
/tags/workout/ |
Tagged “workout” |
/tags/review/ |
Tagged “review” |
/tags/beginner/ |
Tagged “beginner” |
/about/ |
About Me |
/posts/ |
|
/posts/beginnergym/ |
The Absolute Beginner's Guide to the Gym |


--- layout: default-photo title: "Map" description: "To Travel" header-img: "img/post-bg-ioses.jpg" ---


Home
Nivo Slider
EI Slider
Fullscreen Slider
Static Image
Pages
Magazine
Blog
Full Width Page
Columns
Elements
Galleries
Simple
Filterable
Fade Scroll
Video
PhotoGrid
Contact
Professional
Lightning Equipment
Passionate
Ballerina
Tranquility
in red
Vintage
Beauty
Mystery
Woman
In the
Spotlight
A touch of
Fashion
Current
Slide 1
Slide 2
Slide 3
Slide 4
Slide 5
Slide 6
Slide 7
A
Exceptional Service
Personalized to your needs
I
Creative Storytelling
Advanced use of technology
C
Infographical Education
Understanding visually
S
Sophisticated Team
Professionals in action
The beauty of simplicity


{% extends 'layout.html' %} {% block title %} {{ title }} - Innovadiv {% endblock %} {% block content %} {% autoescape false %} {{ contents }} {% endautoescape %} Interested in more? View our blog page which lists all of our current articles. {% include "components/sign-up.html" %} {% include "components/about.html" %} {% endblock %} {% block cssincludes %} {% endblock %} {% block jsincludes %} {% endblock %}
Interested in more? View our blog page which lists all of our current articles.


Toggle navigation
CONTACT US
SITEMAP
WEBMAIL
CALENDER EVENTS
Toggle navigation
OME
ABOUT US
Institute Information
Campus
Meet Our Chairman
Meet Our Director
Meet Our Registar
Institute View
Health Care
Alumni
Recreational
How To Reach
DEPARTMENTS
Computer science And Engg
Electronics And Communication Engg
Electrical Engg
Information Technology
Mechanical Engg
Chemical Engg
Biotechology
Civil Engg
Metallurgical And Materials Engg
ACADEMICS
Library
Computer Centre
Central Instruments
Facilitites
High Voltage Laboratory
ADMISSION
Under Graduates
Post Graduates
Phd
RESEARCH
Research Activity
In NIT Durgapur
Collaboration
Project And Consultancy
Bulletins
PLACEMENTS
Activity And Status
Student CV Format For
Campus Placement
Proforma For Campus
Placement Information
INFORMATION
Transcript Information
Office Notice
SC-ST Cell
The Right To Information
act 2005
Internal Complaints
commitee Related
Institute Information Officers
Minutes/Agenda Of BOG ,FC
BWC, Senate Meetings
External Information Links
Nobel Laureates
Understanding The Universe
National Knowledge Network
GENERAL NOTICES
Advertisement for recruitment to the post of Registrar(NO.NITD/Regis/Adv/45, Date:-31.10.2014)
Corrigendum for Special Recruitment Drive for SC, ST, OBC and PWD Candidates Special Recruitment Drive for SC, ST, OBC and PWD Candidates
Special Recruitment Drive for SC, ST, OBC and PWD Candidates
Academic schedule ( TENTATIVE) for the session 2014-2015
Transcript Information
Previous
Next
EVENTS AND VISITORS
President of India,
Shri Pranab Mukherjee
graced the
9th Convocation 2013. New Year Message by President of India (Recorded Video).
Student Notice Board
Special Medical Contigency Scheme Of Students
Seating Arrangement-1
Seating arrangement-2
Routine B.Tech Odd Regular 2014-15
Fee Structure For Ph.D Programme
Examination Form Submission For Post Graduates Programme
Examination Form Refund Of Tution Fee And Grade Card
Examination From Wef October 2014
Tution Fee Refund Application Form
+ Click For More Details
Student Technical Activites
AAROHAN
IEEE Student Chapter
LUG
MOTOR ZUNDUNG
Tech Magazine ANVESHAN
VERVE
+ Click For More Details
Jobs And Tenders
Tender for Supply of Equipment SERB/DST Sponsored
Project of Biotechnology Department
Tender for Equipment under Research Initiation
Grant of Biotechnology Department
Advertisement for recruitment to the post of
Registrar(NO.NITD/Regis/Adv/45, Date:-31.10.2014)
Tender for Manual Membrane Casting Unit
Invitation for quotations for supply and installation
of Equipment for a DST funded R And D project in IT Dep
+ Click For More Details
Seminar,Conference,Workshop
4th International Conference on Frontiers in Intelligent
Computing Theory and Applications(FICTA Nov 16-18, 2015)
International Conference On Decision Support System for
Early Warning And Mitigation of Disaster
(DSS - EWMD 28-30th Dec.2014)
First International Conference on Intelligent Computing
And Applications 2014 (ICICA, 22nd-24th Dec, 2014)
TEQIP-II Sponsored Short Term Course on Bioremediation of
Industrial Wastes for a Greener World(Dec 08 - 12, 2014)
International Conference on Emerging materials-Characterization
And Application-EMCA-Kolkata(4th-6th Dec, 2014):
Deadline Extended
Scientific Computation and Documentation using Open
Source Software (01Dec. 05Dec. 2014)
Short Term Training Programme on Instrumental Application
and Chemical Analysis for Environmental Samples
(November 24-30 2014)
Invited Lectures on Information Theory and Wireless
Communications(November 12-13, 2014)
+ Click For More Details
Events And Visitors
President of India, Shri Pranab Mukherjee
+ Click For More Details


| predict.bam {mgcv} | R Documentation |
Essentially a wrapper for predict.gam
for prediction from a
model fitted by bam
. Can compute on a parallel cluster.
Takes a fitted bam
object produced by bam
and produces predictions given a new set of values for the model covariates
or the original values used for the model fit. Predictions can be accompanied
by standard errors, based on the posterior distribution of the model
coefficients. The routine can optionally return the matrix by which the model
coefficients must be pre-multiplied in order to yield the values of the linear predictor at
the supplied covariate values: this is useful for obtaining credible regions
for quantities derived from the model (e.g. derivatives of smooths), and for lookup table prediction outside
R
(see example code below).
## S3 method for class 'bam' predict(object,newdata,type="link",se.fit=FALSE,terms=NULL, exclude=NULL,block.size=50000,newdata.guaranteed=FALSE, na.action=na.pass,cluster=NULL,discrete=TRUE,n.threads=1,...)
object |
a fitted |
newdata |
A data frame or list containing the values of the model covariates at which predictions
are required. If this is not provided then predictions corresponding to the
original data are returned. If |
type |
When this has the value |
se.fit |
when this is TRUE (not default) standard error estimates are returned for each prediction. |
terms |
if |
exclude |
if |
block.size |
maximum number of predictions to process per call to underlying code: larger is quicker, but more memory intensive. |
newdata.guaranteed |
Set to |
na.action |
what to do about |
cluster |
|
discrete |
if |
n.threads |
if |
... |
other arguments. |
The standard errors produced by predict.gam
are based on the
Bayesian posterior covariance matrix of the parameters Vp
in the fitted
bam object.
To facilitate plotting with termplot
, if object
possesses
an attribute "para.only"
and type=="terms"
then only parametric
terms of order 1 are returned (i.e. those that termplot
can handle).
Note that, in common with other prediction functions, any offset supplied to
gam
as an argument is always ignored when predicting, unlike
offsets specified in the gam model formula.
See the examples in predict.gam
for how to use the lpmatrix
for obtaining credible
regions for quantities derived from the model.
If type=="lpmatrix"
then a matrix is returned which will
give a vector of linear predictor values (minus any offest) at the supplied covariate
values, when applied to the model coefficient vector.
Otherwise, if se.fit
is TRUE
then a 2 item list is returned with items (both arrays) fit
and se.fit
containing predictions and associated standard error estimates, otherwise an
array of predictions is returned. The dimensions of the returned arrays depends on whether
type
is "terms"
or not: if it is then the array is 2 dimensional with each
term in the linear predictor separate, otherwise the array is 1 dimensional and contains the
linear predictor/predicted values (or corresponding s.e.s). The linear predictor returned termwise will
not include the offset or the intercept.
newdata
can be a data frame, list or model.frame: if it's a model frame
then all variables must be supplied.
Predictions are likely to be incorrect if data dependent transformations of the covariates
are used within calls to smooths. See examples in predict.gam
.
Simon N. Wood<EMAIL_ADDRESS>The design is inspired by the S function of the same name described in Chambers and Hastie (1993) (but is not a clone).
Chambers and Hastie (1993) Statistical Models in S. Chapman & Hall.
Marra, G and S.N. Wood (2012) Coverage Properties of Confidence Intervals for Generalized Additive Model Components. Scandinavian Journal of Statistics.
Wood S.N. (2006b) Generalized Additive Models: An Introduction with R. Chapman and Hall/CRC Press.
## for parallel computing see examples for ?bam ## for general useage follow examples in ?predict.gam


{% extends "base.html" %} {% block content %}
Authentication successful. Your roles should be given during the next few minutes. Please now set your teamspeak name to {{ tickered_name }}


Generate easy and quick QR Codes ready to be integrated into your business. We provide custom QR Codes as well with your branding.
Generate anywhere use anytime
Being web in nature, easily supported in dektop, mobile or any other device. Also supports API integration to your platform. Use custome client with developer friendly APIs.


template<typename T>
class drake::systems::DiagramBuilder< T >
DiagramBuilder is a factory class for Diagram.
It is single use: after calling Build or BuildInto, DiagramBuilder gives up ownership of the constituent systems, and should therefore be discarded.
A system must be added to the DiagramBuilder with AddSystem before it can be wired up in any way. Every system must have a unique, non-empty name.
|
| | DiagramBuilder () |
| |
| virtual | ~DiagramBuilder () |
| |
| template<class S > |
| S * | AddSystem (std::unique_ptr< S > system) |
| | Takes ownership of system and adds it to the builder. More...
|
| |
| template<class S , typename... Args> |
| S * | AddSystem (Args &&... args) |
| | Constructs a new system with the given args , and adds it to the builder, which retains ownership. More...
|
| |
| template<template< typename Scalar > class S, typename... Args> |
| S< T > * | AddSystem (Args &&... args) |
| | Constructs a new system with the given args , and adds it to the builder, which retains ownership. More...
|
| |
| bool | empty () const |
| | Returns whether any Systems have been added yet. More...
|
| |
| std::vector< systems::System< T > * > | GetMutableSystems () |
| | Returns the list of contained Systems. More...
|
| |
| void | Connect (const OutputPort< T > &src, const InputPort< T > &dest) |
| | Declares that input port dest is connected to output port src . More...
|
| |
| void | Connect (const System< T > &src, const System< T > &dest) |
| | Declares that sole input port on the dest system is connected to sole output port on the src system. More...
|
| |
| void | Cascade (const System< T > &src, const System< T > &dest) |
| | Cascades src and dest . More...
|
| |
| InputPortIndex | ExportInput (const InputPort< T > &input, std::variant< std::string, UseDefaultName > name=kUseDefaultName) |
| | Declares that the given input port of a constituent system is an input to the entire Diagram. More...
|
| |
| OutputPortIndex | ExportOutput (const OutputPort< T > &output, std::variant< std::string, UseDefaultName > name=kUseDefaultName) |
| | Declares that the given output port of a constituent system is an output of the entire diagram. More...
|
| |
| std::unique_ptr< Diagram< T > > | Build () |
| | Builds the Diagram that has been described by the calls to Connect, ExportInput, and ExportOutput. More...
|
| |
| void | BuildInto (Diagram< T > *target) |
| | Configures target to have the topology that has been described by the calls to Connect, ExportInput, and ExportOutput. More...
|
| |
|
| | DiagramBuilder (const DiagramBuilder &)=delete |
| |
| DiagramBuilder & | operator= (const DiagramBuilder &)=delete |
| |
| | DiagramBuilder (DiagramBuilder &&)=delete |
| |
| DiagramBuilder & | operator= (DiagramBuilder &&)=delete |
| |
| S* AddSystem |
( |
Args &&... |
args | ) |
|
Constructs a new system with the given args
, and adds it to the builder, which retains ownership.
Returns a bare pointer to the System, which will remain valid for the lifetime of the Diagram built by this builder.
DiagramBuilder<double> builder;
auto foo = builder.AddSystem<Foo<double>>("name", 3.14);
Note that for dependent names you must use the template keyword:
DiagramBuilder<T> builder;
auto foo = builder.template AddSystem<Foo<T>>("name", 3.14);
You may prefer the unique_ptr
variant instead.
- Template Parameters
-
| S | The type of System to construct. Must subclass System<T>. |
| S<T>* AddSystem |
( |
Args &&... |
args | ) |
|
Constructs a new system with the given args
, and adds it to the builder, which retains ownership.
Returns a bare pointer to the System, which will remain valid for the lifetime of the Diagram built by this builder.
DiagramBuilder<double> builder;
auto foo = builder.AddSystem<Foo>("name", 3.14);
Note that for dependent names you must use the template keyword:
DiagramBuilder<T> builder;
auto foo = builder.template AddSystem<Foo>("name", 3.14);
You may prefer the unique_ptr
variant instead.
- Template Parameters
-
| S | A template for the type of System to construct. The template will be specialized on the scalar type T of this builder. |


Have you suffered a challenging experience while trying to gain control over the mobile technology and devices in your organization? Well, you aren't alone. Organizations around the globe are dealing with the same issues.
The future of your business with HP Cloud Services
HP's Cloud Platform gives Elders flexibility
HP's Key Strength is Infrastructure
Security Solutions are critical
The Official Opening of the Aurora Data Centre in Australia
HP Enterprise Security Services
Drive growth with HP BPO Services - Kathy Garcia, Senior Vice-President


Trump campaign spokesperson Jason Miller tells Yahoo! News that Carter Page “has no role” in the campaign.


Toggle navigation
 PISTALIX
Home
About Us
Products
Pistalix TV
Careers
Services
Table
Contact us
Services
We Provied
All
Mobile App
Web App
Database
E-Commerce
Services
Android
React Native
Rasberry PI


Animal Trading Card
Codepen
|
Github
Pixel Art Maker
Codepen
|
Github
Portfolio Website
Codepen(Soon)
|
Github
Soon to be added
Codepen
|
Github


org.apache.commons.httpclient.params
Classes
DefaultHttpParams
DefaultHttpParamsFactory
HostParams
HttpClientParams
HttpConnectionManagerParams
HttpConnectionParams
HttpMethodParams
HttpParams
HttpParamsFactory


Apple TV+ Guide: All of the Original Video Content [Update]
by Andrew OrrApple is spending billions on TV shows and series. We’ve put together an Apple TV+ guide for all of the original content that the company has right now, and will have in the future. We learned during the March 2019 keynote that the content will be available this fall. The list will be updated continuously, so be sure to bookmark this page.
Truth Be Told
One of the new shows coming, Apple is working with Reece Witherspoon’s production company Hello Sunshine. Based on the novel Are You Sleeping by Kathleen Barber. The show will star Octavia Spencer. Apple has officially signed a 10-episode season. Actors will include Lizzy Caplan, Aaron Paul, Ron Cephas Jones, Elizabeth Perkins, Mekhi Phifer, Michael Beach, Tracie Thoms, and Haneefah Wood.
Amazing Stories
Apple is working with Steven Spielberg to bring back his Amazing Stories series, which ran for two seasons in the 1980s. So far Apple has committed to 10 episodes, with Bryan Fuller as showrunner.
The Morning Show
Reece Witherspoon and Jennifer Aniston will star in a as-yet-untitled drama. It’s not a morning talk show, but a drama about creating a morning talk show. Apple has committed to two seasons of 10 episodes, each lasting an hour. The writer and executive producer is Jay Carson, who previously produced House of Cards.
For All Mankind
Ronald Moore—who made the remake of Battlestar Galactica—has been signed on by Apple for a new sci-fi series. The series is called For All Mankind, and it will be co-executive produced by Matt Wolpert and Ben Nedivi. The series will explore what would happen if the global space race never ended.
Home
Home will be a show that will “offer viewers a never-before-seen look inside the world’s most extraordinary homes, and delves into the minds of the people who built them.” Apple has committed to one season of 10 episodes, each lasting an hour. It will be a documentary series produced by Matt Tyrnauer and Corey Reeser.
See
See will be a futuristic drama written by Steve Knight and directed by Francis Lawrence (Hunger Games). There is no release date yet, and the number of seasons or episodes Apple has ordered is also unknown.
Kristen Wiig Comedy
Under Apple, Kristen Wiig will star in her own comedy series. It will be created and produced by Colleen McGuinness. Apple has committed to one season of 10 episodes, each lasting a half hour. The series doesn’t have a title yet.
Vital Signs
Vital Signs will be a miniseries produced by Dr. Dre. Each episode will focus on a specific emotion, and will be a semi-autobiographical story of Dr. Dre’s life. The miniseries was originally rumored to be released in August. Since it hasn’t, we don’t know if Apple canceled the project or is holding onto it for a future release.
Drama by Damien Chazelle
Director Damien Chazelle (La La Land) will write and produce every episode of a new drama series for Apple. There are no details yet, but the series will be executive produced by Jordan Horowitz and Fred Berger.
Little America
Apple originally considered the series back in February as a straight-to-series production, and now it’s past consideration and officially under the Apple brand. Written by Emily V. Gordon, Lee Eisenberg, and Kumail Nanjiani, Little America is inspired by true stories featured in Epic Magazine.
Pages:
| 1 | 2 | 3 | 4 | Next |


- RandomPlanner - Class in cpsr.planning
-
Random planner.
- RandomPlanner(int, int, int) - Constructor for class cpsr.planning.RandomPlanner
-
Constructs a random planner using integer specified actions from given range.
- RandomPlanner(int, ArrayList<Action>) - Constructor for class cpsr.planning.RandomPlanner
-
Constructs a random planner over given action list.
- readSerializedDataSet(String) - Static method in class cpsr.stats.Basic
-
- RegressionERTGrower<R extends java.io.Serializable,N extends java.lang.Number> - Class in afest.datastructures.tree.decision.erts.grower.regression
-
Class used to grow Extra Trees.
- RegressionERTGrower(Integer, int, IERTScore<R, N>) - Constructor for class afest.datastructures.tree.decision.erts.grower.regression.RegressionERTGrower
-
Creates a ERTGrower that will create ExtraTrees according to the following parameters.
- RelativeVarianceReduction<R extends java.io.Serializable,C extends java.lang.Number> - Class in afest.datastructures.tree.decision.erts.informationfunctions
-
Computes the relative variance reduction.
- RelativeVarianceReduction() - Constructor for class afest.datastructures.tree.decision.erts.informationfunctions.RelativeVarianceReduction
-
- removeHistory(ArrayList<ActionObservation>) - Method in class cpsr.environment.components.IndicativeEvent
-
Remove a history from an IndicativeEvent
- ResetActionObservation - Class in cpsr.environment.components
-
Class defines a general reset action observation.
- ResetActionObservation() - Constructor for class cpsr.environment.components.ResetActionObservation
-
Creates a reset Action Observation pair.
- resetData() - Method in class cpsr.environment.TrainingDataSet
-
- resetPerformed() - Method in class cpsr.environment.TrainingDataSet
-
Test whether reset performed on last iterations
- resetToStartState() - Method in class cpsr.model.APSR
-
- resetToStartState() - Method in interface cpsr.model.IPSR
-
Resets PSR to start state.
- resetToStartState() - Method in class cpsr.model.MemorylessState
-
- resetToStartState() - Method in class cpsr.planning.APSRPlanner
-
Resets the PSR to its start state.
- resetToStartState() - Method in class cpsr.planning.EpsilonGreedyPlanner
-
- resetToStartState() - Method in class cpsr.SanityCheck.SanityPlanner
-
Resets the PSR to its start state.
- RewardObservation - Class in cpsr.environment.components
-
Simple wrapper class encapsulated reward and observation
into one object.
- RewardObservation(Observation, double) - Constructor for class cpsr.environment.components.RewardObservation
-
Constructs RewardObservation from specified reward
and obseravtion.
- runExperiment(int) - Method in class cpsr.environment.ModelQualityExperiment
-
Runs an experiment and returns the DataSet of test results.
- runExperiment() - Method in class cpsr.planning.PSRPlanningExperiment
-
Runs an experiment and returns the DataSet of test results.


We're sorry but this tool doesn't work properly without JavaScript enabled. Please enable it to continue.


Table of Contents
| Attributes |
| Types |
| Skills |
Attributes
The main character is Shield Hero. The player can keep track of different stats, found HERE
Attributes are Strength, Intelligence, Wisdom, Agility, Shield Mastery, Assault Shield Mastery,
Types are Fire, Ice/Water, Air, Earth, Magic,
Skills are Shield Bash, Block, Shield Charge, Shield Spam(Upgraded Version: Salty Shield Spam),Shield Counter(Upgraded Version Salty Shield Counter), Shield Aura, Shield Throw, Guard (buff reduce dmg for x-time), Victory Shout(Short buff after killing enemy with salty skill for x-time), Shield Finisher(ie repeatedly Bashing the enemy relentlessly decreasing in time for each next bash while relentlessly bashing the enemy even if they are dead).


--- layout: post title: "The IsNullOrWhiteSpace trap" description: "The IsNullOrWhiteSpace method may seem like a useful utility method, but poisons your design perspective." date: 2014-11-18 19:10 UTC tags: [Unit Testing, Software Design] --- {% include JB/setup %}
{{ page.description }}
The string.IsNullOrWhiteSpace method, together with its older sibling string.IsNullOrEmpty, may seem like useful utility methods. In reality, they aren't. In fact, they trick your mind into thinking that null is equivalent to white space, which it isn't.
Null isn't equivalent to anything; it's the absence of a value.
Various empty and white space strings ("", " ", etc), on the other hand, are values, although, perhaps, not particularly interesting values.
Imagine that you have to write a simple search canonicalization algorithm for a music search service. The problem you're trying to solve is that when users search for music, the may use variations of upper and lower case letters, as well as type the artist name before the song title, or vice versa. In order to make your system as efficient as possible, you may want to cache popular search results, but it means that you'll need to transform each search term into a canonical form.
In order to keep things simple, let's assume that you only need to convert all letters to upper case, and order words alphabetically.
Here are five test cases, represented as a Parameterized Test:
[Theory] [InlineData("Seven Lions Polarized" , "LIONS POLARIZED SEVEN" )] [InlineData("seven lions polarized" , "LIONS POLARIZED SEVEN" )] [InlineData("Polarized seven lions" , "LIONS POLARIZED SEVEN" )] [InlineData("Au5 Crystal Mathematics", "AU5 CRYSTAL MATHEMATICS")] [InlineData("crystal mathematics au5", "AU5 CRYSTAL MATHEMATICS")] public void CanonicalizeReturnsCorrectResult( string searchTerm, string expected) { string actual = SearchTerm.Canonicalize(searchTerm); Assert.Equal(expected, actual); }
Here's one possible implementation that passes all five test cases:
public static string Canonicalize(string searchTerm) { return searchTerm .Split(new[] { ' ' }) .Select(x => x.ToUpper()) .OrderBy(x => x) .Aggregate((x, y) => x + " " + y); }
This implementation uses the space character to split the string into an array, then converts each sub-string to upper case letters, sorts the sub-strings in ascending order, and finally concatenates them all together to a single string, which is returned.
The above implementation is quite naive, because it doesn't properly canonicalize if the user entered extra white space, such as in these extra test cases:
[InlineData("Seven Lions Polarized", "LIONS POLARIZED SEVEN")] [InlineData(" Seven Lions Polarized ", "LIONS POLARIZED SEVEN")]
Notice that these new test cases don't pass with the above implementation, because it doesn't properly remove all the white spaces. Here's a more robust implementation that passes all test cases:
public static string Canonicalize(string searchTerm) { return searchTerm .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select(x => x.ToUpper()) .OrderBy(x => x) .Aggregate((x, y) => x + " " + y); }
Notice the addition of StringSplitOptions.RemoveEmptyEntries
.
If you consider the above implementation, does it have any other problems?
One, fairly obvious, problem is that if searchTerm
is null, the method is going to throw a NullReferenceException, because you can't invoke the Split method on null.
Therefore, in order to protect the invariants of the method, you must test for null:
[Fact] public void CanonicalizeNullThrows() { Assert.Throws<ArgumentNullException>( () => SearchTerm.Canonicalize(null)); }
In this case, you've decided that null is simply invalid input, and I agree. Searching for null (the absence of a value) isn't meaningful; it must be a defect in the calling code.
Often, I see programmers implement their null checks like this:
public static string Canonicalize(string searchTerm) { if (string.IsNullOrWhiteSpace(searchTerm)) throw new ArgumentNullException("searchTerm"); return searchTerm .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select(x => x.ToUpper()) .OrderBy(x => x) .Aggregate((x, y) => x + " " + y); }
Notice the use of IsNullOrWhiteSpace. While it passes all tests so far, it's wrong for a number of reasons.
The first problem with this use of IsNullOrWhiteSpace is that it may give client programmers wrong messages. For example, if you pass the empty string ("") as searchTerm
, you'll still get an ArgumentNullException. This is misleading, because it gives the wrong message: it states that searchTerm
was null when it wasn't (it was "").
You may then argue that you could change the implementation to throw an ArgumentException.
if (string.IsNullOrWhiteSpace(searchTerm)) throw new ArgumentException("Empty or null.", "searchTerm");
This isn't incorrect per se, but not as explicit as it could have been. In other words, it's not as helpful to the client developer as it could have been. While it may not seem like a big deal in a single method like this, it's sloppy code like this that eventually wear client developers down; it's death by a thousand paper cuts.
Moreover, this implementation doesn't follow the Robustness Principle. Is there any rational reason to reject white space strings?
Actually, with a minor tweak, we can make the implementation work with white space as well. Consider these new test cases:
[InlineData("", "")] [InlineData(" ", "")] [InlineData(" ", "")]
These currently fail because of the use of IsNullOrWhiteSpace, but they ought to succeed.
The correct implementation of the Canonicalize method is this:
public static string Canonicalize(string searchTerm) { if (searchTerm == null) throw new ArgumentNullException("searchTerm"); return searchTerm .Split(new[] { ' ' }, StringSplitOptions.RemoveEmptyEntries) .Select(x => x.ToUpper()) .OrderBy(x => x) .Aggregate("", (x, y) => x + " " + y) .Trim(); }
First of all, the correct Guard Clause is to test only for null; null is the only invalid value. Second, the method uses another overload of the Aggregate method where an initial seed (in this case "") is used to initialize the Fold operation. Third, the final call to the Trim method ensures that there's no leading or trailing white space.
The overall problem with IsNullOrWhiteSpace and IsNullOrEmpty is that they give you the impression that null is equivalent to white space strings. This is the wrong mental model: white space strings are proper string values that you can very often manipulate just as well as any other string.
If you insist on the mental model that white space strings are equivalent to null, you'll tend to put them in the same bucket of 'invalid' data. However, if you take a hard look at the preconditions for your classes, methods, or functions, you'll find that often, a white space string is going to be perfectly acceptable input. Why reject input you can understand? That will only make your code more difficult to use.
In testing terms, it's my experience that null rarely falls in the same Equivalence Class as white space strings. Therefore, it's wrong to implicitly treat them as if they do.
The IsNullOrWhiteSpace and IsNullOrEmpty methods imply that null and white space strings are equivalent, and this will often give you the wrong mental model of the boundary cases of your software. Be careful when using these methods.
Comments
I agree if this is used at code library, which will be used by other programmer. However when directly used at application level layer, it is common to use them, at least the IsNullOrEmpty one, and they are quite powerful. And I don't find any problem in using that.


If you're seeing this message, that means
Javascript has been disabled on your browser
Please enable JS to make this app work.


Idea
My Idea for the Midterm Project is to create a website that is dedicated to advertising Affinity Photo/Affinity Designer over Adobe Photoshop/Illustrator. (It's a one time payment of $50 each and you get the software forever instead of having to subscribe to Adobe... check it out if you do photo editing as a hobby, but this is an aside) BUT, there are going to be a few hidden clues on the website that lead to puzzles that have to be solved. There's going to be a "terminal" page where you can type in your answers and check to see if you got the right answer.
Wireframe:
/home
/about
/terminal
Sitemap
Graph:
homepage.html <----> about.html ---- > terminal.html
File Structure:
| - homepage.html
| - about.html
| - terminal.html
| - assets
| | - img
| | | - images
| | - css
| | | - css files
| | - js
| | | - js files


{% extends "registration/registration_base.html" %} {% block title %}Password changed{% endblock %} {% block content %}
Password successfully changed!


{% extends "layout.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} BETA This is a new service – your feedback will help us to improve it. Home Sign out Warwickshire college Subcontractor: The college of Birmingham Select one funding type they will provide S Adult Education Budget classroom Adult Education Budget work-based Adult Education Budget learning support Adult Education Budget community learning Adult Education Budget learner support Apprenticeships non-levy 16 to 18 (New starts 1 May) Apprenticeships non-levy 19+ (New starts 1 May) Apprenticeships levy 19+ (New starts 1 May) Apprenticeships levy 16 to 18 (New starts 1 May) Apprenticeships 16 to 18 (pre 1 May 2017) Apprenticeships 19+ (pre 1 May 2017) Apprenticeships trailblazer 16 to 18 Apprenticeships trailblazer 19+ European Social Fund Traineeship 16 to 18 Traineeships 19+ S ESF: Access to employment for jobseekers ESF: Sustainable integration of young people ESF: Active inclusion ESF: Enhancing equal access to lifelong learning ESF: Improving labour market relevance of education and training systems Save and continue {% endblock %}
BETA This is a new service – your feedback will help us to improve it.
Select one funding type they will provide


PROFILE
Extremely motivated in designing and developing content.
Had been working on web development for 2 years. Learnt
securely designing apps including rest and authorization
(Oauth) frameworks.Listed on few hall of fames for finding
out security issues in their api's, frameworks and applications.
Had been designing some basic apps for iOS using swift and little
knowledge on UI/UX.
CONTACT
E-Mail<EMAIL_ADDRESS>Phone no: +91-9949111969
Address:
Plot no 468, Temple street
Pragathi Nagar, Kukatpally
Hyderabad, 500090
EDUCATION
ECE(B.Tech), GITAM University
Intermediate(MPC), Narayana junior college
Xth, SSC, Narayana concept school
ACHIEVEMENTS
HALL OF FAMES(for finding out security issues)
SKILLS
Web development: HTML, CSS, JAVASCRIPT, JQUERY, D3.JS(Basics), PHP, MYSQL and RUBY(basics).
Frameworks: Parse(JS SDK,REST), Facebook Graph api, Oauth and Rest api's.
Dev-Ops: Heroku and AWS.
Security: Web penetration testing, API Testing and Oauth testing(rfc6749).
Editing: Photoshop and final cut pro and DAW(abelton)
EXPERIENCE
Internship at ECIL( Electronics Corporation of India Limited), RID Divison
MAY-JUN 2016
Design of micro controllers to detect neutron radiation or wastage using BF3 compound detector
Internship at LAST CHANNEL MEDIA
DEC 2016 - MAR 2017
Designed an e-commerce site using Parse framework.
ACTIVITIES
Web designer for Pramana 2k15 and 2k16
DEC 2015 - FEB 2016
Designed and developed web content for pramana (techno-management fest).
Stacks used: HTML, CSS, JS(underscore, D3) and Amazon web services.
Web designer for TEDXGITAMHYDERABAD
JAN 2016 - Present
Organizer and Web developer for tedxgitamhyderabad
Stacks used: HTML, CSS, JS(parse), parse analytics and Parse hosting.
Web designer for CAE 2015 international conference
DEC 2014 - MAY 2015
Organizer and Web developer for CAE 2015 International conference.
Stacks used: HTML, CSS, JS(parse), parse analytics and Parse hosting.
NULL Community Hyderabad
MAY(Thoughtworks) and SEP(iLabs) 2016
Presented demo on exploitation of oauth redirection using URLSchemes.
Presented topic "The exploitation and bypassing techniques on oauth".


Description and history of the practice goes here with photos
Description goes here
Dr Happy
I am the head psycothearpist. My main specialisms are anxiety and depression in young children.
Dr Angry
I am a qualified psychologist, specialising in Behavioural psychotherapy and Cognitive therapy.
Dr Fred
I am a qualified counceller. I specialise in Mentalization-based therapy and Dialectic behaviour therapy.
Dr Nadia
Description of doctor
Treatments or therapies they offer


Web Crypto: importKey
This page shows the use of the importKey()
function of the Web Crypto API. It contains four separate examples, one for each import format supported:
- Raw
- PKCS #8
- SubjectPublicKeyInfo
- JSON Web Key
Each example has the same structure: you get a message a button labeled "Import Key".
If you click "Import Key" then the example imports a particular key:
- For "Raw", an AES encryption key.
- For "PKCS #8", an RSA private signing key.
- For "SubjectPublicKeyInfo", an RSA public encryption key.
- For "JSON Web Key", an EC private signing key.
A new button is then displayed, labeled "Sign" or "Encrypt", depending on the key that was imported. You can click it to use the imported key to perform the appropriate operation and display the result.
Raw
Ciphertext:
PKCS #8
Signature:
SubjectPublicKeyInfo
Ciphertext:
JSON Web Key
Signature:


Namespace CADability
Classes
ActionStack
A stack of actions. The top entry is the active action, the bottom entry usually is the SelectObjectsAction.
ActiveFrame
This class provides access to the current active frame (IFrame) object. It is typically the one and only SingleDocumentFrame in the application but may be different in future, when there will be a MultiDocumenFrame.
AnimatedView
A view in which mechanical dependencies of objects can be defined and animated.
ArrayColumn<T>
Convert a column of a 2 dimensional array to a one dimensional array (without copying the data)
ArrayLinear<T>
Convert a 2 dimensional array to a one dimensional array (without copying the data)
ArrayRow<T>
Convert a row of a 2 dimensional array to a one dimensional array (without copying the data)
AxisDrive
Describes a rotation around an axis.
BoxedSurfaceExtension
BRepItem
BRepOperation
CollisionDetection
Preliminary
ColorSetting
ColorSetting is intended for objects to be used in Settings. It provides a Color with the IShowProperty interface.
CombinedEnumerable<T>
CoordSysException
Exception thrown by constructors of CoordSys indication a failure
CurveDrive
Describes a movement along a curve (which may be any path or simple curve like a line)
CurveMovement
DisplayChangeArg
Parameter declaration for DisplayChangedEvent.
DriveList
DualCurveDrive
DualSurfaceCurve
Edge
Edge is a abstract description of an egde on a Face. An Edge may belong to one or two faces. Edges don't exist without faces (use IGeoObject and ICurvederived classes for simple 3d curves). The Edge is defined in several ways, which are overdetermined and therfore must always be in a consistent state: It is the pur 3-dimensional curve, an ICurve, and on each Face the edge is defined as a 2-dimensional curve on the surface (see Surface), which has a 2-dimensional (u/v) coordinate system (parametric space). The Edge may be an outer or an inner edge on each face or some curve on the inside of a face (typically an outlining curve for a certain Projection). The edge may not be outside of a face.
ExplicitPCurve2D
Curve defined by 3 polynomials in one veriable ("u"), or by 4 polynoms with an additional "w" component (homogenuous coordinates). the curve may be defined piecewise: the knots array defines the intervalls for the u parameter while the polynom arrays define the curves for each intervall
ExplicitPCurve3D
Curve defined by 3 polynomials in one veriable ("u"), or by 4 polynoms with an additional "w" component (homogenuous coordinates). the curve may be defined piecewise: the knots array defines the intervalls for the u parameter while the polynom arrays define the curves for each intervall
ExportStep
ExportToThreeJs
ExportToThreeJsException
ExportToWebGl
Export a Model as a WebGl based html file.
Extension
FindPathThroughForbiddenArea
Class to find a polyline between two points that does not cross the forbidden area
FindPathThroughForbiddenArea.Impossible
FinishDeserialization
[Deprecated], Container for objects that need a callback after deserialization. These objects must implement IFinishDeserialization
FrameImpl
A standard implementation of the IFrame interface, used by CadFrame and the old SingleDocumentFrame
GaussNewtonMinimizer
Gdi
GDI2DView
GeneralSweptCurve
A general surface defined by a curve "toSweep", which is swept along a curve "along" The u parameter moves along the curve "toSweep", the v parameter moves along the curve "along" The curve "along" must implement IOrientation: the coordinate system is defined by the direction of "along" at parameter u, which is the z-axis, while the OrientationAt(u) is the x-axis
GeneralSweptCurve.FixedUCurve
Geometry
The class Geometry only contains static methods to solve some basic geometric tasks.
Geometry.GeometryException
ApplicationException derived exception class for methods in class Geometry.
GeoPoint2D.GeoPoint2DICompareX
GeoPoint2DList
GeoVectorException
ApplicationException thrown by some GeoVector operations.
Gl
OpenGL wrapper methods and constants. See OpenGL documentation for more information.
Glu
Grid
The Grid settings, used only in class Projection.
IArrayImpl<T>
General implementation of IArray<T> providing enumerators and first and last properties.
ImplicitPSurface
A surface, defined by a polynom in 3 variables. The surface is defined as P(x,y,z)==0.
ImportCondor4Exception
ImportStep
ImportStep.SyntaxError
ImportSTL
InfoReader
Encapsulates the SerializationInfo.GetInfo function
JsonSerialize
JsonVersion
Kernel
Layout
A Layout defines the placement of one or more patches on a paper. A patch is the projection of a model into the two dimensional space with respect to scaling, projection direction, visibility of layers etc. A Layout can be viewed with the LayoutView and can be printed.
LayoutView
LinearMovement
ListToIArray<T>
Model
ModelView
The ModelView is the three-dimensional presentation of a single Model.
ModifiedMovement
ModOpException
Exception class for modification operations
monom
A single term of the polynom
MultipleChoiceSetting
Wrappes an int value. The value represents a choice of severel predefined choices. It represents a setting defined by a name and a value. This setting can be displayed and modified in the control center. It is represented as a combo box. The label left of the combo box is given by the resourceId GetString(String, StringTable.Category), the values are
MyExtensions
NameAlreadyExistsException
Bei der Namensänderung eines Objektes (z.B. Layer, Farbe u.s.w.) tritt diese Exception auf, wenn eine nach Namen sortierte Liste (z.B. LayerList) ein Objekt mit diesen Namen bereits enthält. Diese Exception wird in CONDOR bei Namensänderungen abgefangen und der alte Name wird wieder gesetzt.
OctTree<T>
Generic class to privide fast access to IOctTreeInsertable implementing objects.
OctTree<T>.Node<TT>
Definition of a node of this octtree.
 Die Klasse hält (z.Z.) 4 Bitmaps, die nacheinander und transparent in das Fenster (genauer in das Graphics Objekt des Parameters e beim Aufruf von Compose) kopiert werden. Für jedes Bitmap gibt es ein eigenes "Invalid" Rechteck bzw. Region.    Irgendwann erfolgt der Aufruf von Compose (gewöhnlich ausgelöst durch den Paint Event des Controls)Dort versucht nun diese Klasse das Bild neu zusammenzusetzten. Ist der Invalid-Bereich eines Aspektes leer, dann ist das zugehörige Bitmap aktuell, d.h. kann so verwendet werden. Wenn nicht, so muss der Bereich neu gezeichnet werden. Compose löst den RepaintXxxEvent (z.B. RepaintDrawingEvent) aus. Die Handler dieses Events (gewöhnlich nur einer) bekommen ein PaintToGDI Objekt, mit dessen Hilfe sie zeichnen können.
PaintTo3D
Some static helper methods
PaintTo3DOutOfMemory
Exception which is thrown when the is not egnough memory for the 3D display driver
ParallelHelper
Parametrics
PerformanceTimer
Summary description for PerformanceTimer.
PlaneException
PlaneRef
A reference to a plane. The Plane is implemented as a struct, i.e. a value type. Sometimes it is necessary to have a parameter or member, which designates a plane but may be null (when the plane is not yet computed or not valid). This class works as an object replacement of the struct Plane.
Polynom
A Polynom in multiple variables, often named x,y,z, but may be any dimension. e.g. ax³ + bx²y + cxy² +dy³ + ex² + fxy + gy² + hx + iy + j (deg(ree)==3, dim(ension)==2: (x,y))
Precision
Precision specifies the order of size of a typical model. For example two points are considered geometrically equal if their distance is less than Precision.eps. Default value for Precision.eps is 1e-6. Precision.epsa is the angular precision. Two directions are considered equal if their angular difference is less than Precision.epsa.
PrecisionOverride
Use this class to temporary override the values for the precision. The best way to use this class is the C# using statement. The constructor of this class overrides the values for the global Precision. The Dispose() method restores the previous values.
PrintToGDI
Project
A Project is the database CADability works on. A Project is serializable and contains one or more Models (which contain GeoObjects) lists of attributes, views and UserData. A Project is usually saved in a file.
ProjectedCurve
A 2d curve as a projection of a 3d curve onto a surface. Sometimes it is easier to calculate points in 3d than in 2d. Then we use this as a more exact for of the curve than we get, when we approximate the curve in 2d.
ProjectedModel
ProjectException
Projection
A parallel or perspective projection which is used to convert the 3-dimensional world coordinate system to a 2-dimensional screen coordinate system or to a normalized 3-dimensional cube for the paint or rendering interface (IPaintTo3D). Contains also additional hints for the paint interface and the drawing plane.
Projection.PickArea
Class defining the span or scope in the world coordinate space defined by a axis aligned rectangle in a view or on the screen. The area defined by this object is either a rectangular prism of infinite length in the direction of the view (in case of the parallel view) or a frustum (in case of a perspective view). The pickarea is created by the GetPickSpace(Rectangle), GetPickSpace(RectangleF) or GetPickSpace(BoundingRect).
ProjectSerializationException
QuadTree
A QuadTree of 2-dimensional objects that implement IQuadTreeInsertable. This Class might change in future, so the use of this class is deprecated
QuadTree<T>
RemoveFillet
RemovingFromListEventArgs
Used as a parameter in the event RemovingFromListDelegate. When handling an appropriate event, you can prevent the object beeing removed from the list.
ReversibleChange
This class contains the information to undo a change in the project database. Undoing a change is done by reflection. So we need an object, the name of a method or a property and the parameters to use in the call. This information must be provided in the constructor. The method or property must have public access.
RotationMovement
RuledSurface
Surface definition of a surface defined by two curves. Both curves use the standard parameter interval from 0.0 to 1.0 The u-direction is provided by a combination of the two curves. The v parameter is defined by a line starting on the first curve and ending on the second curve. It is the surface described by a wire or rubber band synchronously moving along the two curves. the default parameter space is 0.0 to 1.0 on u and v.
Schedule
ScheduleList
Settings
This class is used to give access and store information that influences global behavior of the CADability system. There is a static variable GlobalSettings. This is the only use of settings in CADability. This class behaves as a hierarchical dictionary. The keys are strings, which may have the form "mainkey.subkey" The values are objects, i.e. any kind of data. If the objects implement the IShowProperty interface they are displayed in the global setting tab of the controlcenter. There are some classes like ColorSetting, IntegerProperty, DoubleProperty, StringProperty which can be used as a setting value. If you instead simply use a double or string value the setting will be only available to programming code but not to the user in the ControlCenter.
SettingsException
Exception Klasse für die Methoden der Klasse Settings
SettingsGlobalFileName
ShapeMiddelLine
Erzeugt die Mittelline für einen Text
ShortConnection
Tries to find a good solution for the (metric) "travelling salesman problem". This is still prliminary and may change in future.
SweptArc
ToIArray<T>
Convert a simple one dimensional array to an IArray Use someArray.ToIArray()
UndoFrameException
Exception class for the UndoFrame class
UndoRedoSystem
The undo/redo sytem usually exists as a member in the Project and is accessed via Undo. The project handles the menu commands "MenuId.Edit.Undo" and ""MenuId.Edit.Redo" and calls UndoLastStep() rsp. RedoLastStep(). To add a step to the undo system call AddUndoStep(ReversibleChange)
UndoStep
User
UserData
A table, that associates names with objects. Its purpose is to attach any kind of (user) information to existing CADability objects. Many objects of the CADability namespace provide a UserData property, by means of which you can connect any object to it. If the object is serializable, it will be serialized together with the CADability object. If it implements IClonable it will be cloned when the containing object is cloned. If it implements IShowProperty it will be displayed together with the object in the ControlCenter. If it implements IMultiObjectUserData it will be displayed as a common property when multiple objects are displayed in the ControlCenter
Vertex
Describes a vertex of an Edge. A vertex is the start or endpoint of an edge. It connects at least two edges but can belong to any number of edges.
VoxelTree
Describes a 3d object (curve or face) in a voxel representation at a dynamic resolution.
Wgl
Structs
Angle
An angle defined in radians. The value of the angle is a double which is greater or equal to 0 and less than (and not equal) 2*pi. Via cast operators the angle seamlessly operates as a double.
Axis
An axis given by a location and a direction. There is no orientation for an
x-direction or y-direction. If you need that use CoordSys
BoundingCube
Represents a bounding cuboid, that is an extent in 3 dimensions
BoundingRect
BoundingRect is an axis oriented rectangle or a 2-dimensional bounding box. It is implemented as a "struct" (value type) so assignements always make a copy.
ClipRect
Mit dieser Klasse werden primitive Clip-Funktionen abgehandelt.
CoordSys
Rechtwinkliges, rechtshändiges Koordinatensystem. Normierte Einheitsvektoren?
Gdi.ABC
Gdi.GLYPHMETRICSFLOAT
Gdi.KERNINGPAIR
Gdi.PIXELFORMATDESCRIPTOR
Gdi.POINTFLOAT
GeoPoint
A 3-dimensional point with double components. The components are directly accesible to achieve maximum speed.
note
Keep in mind that this is a value type. Passing a value type as a (non ref) parameter and changing it's value inside the invoked method leaves the original unchanged.
GeoPoint2D
A 2-dimensional point with double x and y components.
GeoVector
A 3-dimensional vector with double x,y and z components. The vector is not necessary normalized.
GeoVector2D
A two dimensional vector with double x and y components.
Glu.GLUnurbs
Kernel.MEMORYSTATUS
The MEMORYSTATUS structure contains information about the current state of both physical and virtual memory.
The GlobalMemoryStatus(out Kernel.MEMORYSTATUS) function stores information in a MEMORYSTATUS structure.
Kernel.SYSTEM_INFO
The SYSTEM_INFO structure contains information about the current computer system. This includes the architecture and type of the processor, the number of processors in the system, the page size, and other such information.
Kernel.SYSTEM_INFO_UNION
Union for the OemId, ProcessorArchitecture, and Reserved fields of the Kernel.SYSTEM_INFO structure.
Matrix4
Homogenuos matrix for 3 dimensions, i.e. 4x4 matrix. Mainly used for perspective views.
ModOp
A 3-dimensional modification operation implemented as a homogenous matrix 4*3. You can apply such a modification to GeoPoints or GeoVectors or you can use it for GeoObjects Modify(ModOp). If you want to move, rotate, scale reflect or generally modify a GeoObject you will need this class. Use the static methods to create ModOps that do a required modification (like CADability.ModOp.Rotate(System.Int32,CADability.SweepAngle), Translate(Double, Double, Double) etc.
ModOp2D
A 2-dimensional modification operation implemented as a homogenous matix 3*2. You can apply such modificaion to GeoVector2D and GeoPoint2D points or to ICurve2D implementing objects.
Plane
A simple plane as a value type. Is used e.g. as a drawing plane, an intersection plane etc. It also serves as a coordinate system (see CoordSys).
SweepAngle
A sweep angle. Typically the value of this object is between -2pi and +2pi. Used for rotation operations etc.
WebGLData
Interfaces
IArray<T>
Interface to access a collections as an array. Mainly used for twodimensional array to access rows or columns as simple array without copying the contents. Or access a twodimensional array as a one dimensional array.
ICanvas
Interface must be implemented by a view, which is hosted in a CadCanvas
IConvertForWebGL
IDisplayHotSpots
IDrive
Methods and properties common to all drive objects
IDualSurfaceCurve
IExplicitPCurve2D
IExplicitPCurve3D
IExportStep
IFinishDeserialization
[Deprecated], Implement this interface to receive the "DeserializationDone" callback after the object is deserialized. To receive this callback you also hav to add your object to the appropriate list by doing the following on the Constructor (SerializationInfo info, StreamingContext context):
FinishDeserialization fd = context.Context as FinishDeserialization;
if (fd!=null) fd.Add(this);
IFrame
IHotSpot
Interface implemented by HotSpots.
IImplicitPSurface
IJsonReadData
IJsonReadStruct
IJsonSerialize
IJsonSerializeDone
IJsonVersion
IJsonWriteData
IMovement
IMultiObjectUserData
Implement this interface on your UserData objects if you want your UserData to be displayed as a common property of multiple selected objects.
INamedAttribute
All Attributes for IGeoObject objects (e.g. Layer) are identified by name.
IOctTreeInsertable
IPaintTo3D
Interface to paint on a OpenGL, DirectX, GDI or some other output device. This interface may still change in future it is provided for informational purposes only.

ISchedule
ISettingChanged
IView
QuadTree<T>.IIterateQuadTreeLists
Enums
BoundingRect.Position
The location of a point relative to a bounding rectangle
BRepItem.ItemType
BRepOperation.Operation
CoordSysException.tExceptionType
Enumeration of different causes of this exception
DisplayChangeArg.DraggingModes
While dragging the scrollbarbutton Dragging is on
DisplayChangeArg.Reasons
Reason
GeoVectorException.tExceptionType
Type of exception.
Grid.Appearance
HotspotChangeMode
Layout.HorizontalCenter
Horizontal positioning
Layout.VerticalCenter
Vertical positioning
Model.Units
Units
ModelView.BackgroungTaskHandled
Which background paint tasks were handled by the PrePaintBackground event (flags, combine with "|")
ModOp.ModificationMode
Kind of operation
ModOpException.tExceptionType
ExceptionType
OctTree<T>.Side
Enumeration of the 6 sides of a cube.
PaintBuffer.DrawingAspect
PaintCapabilities
Capabilities of the paint interface
PaintTo3D.PaintMode
PickMode
How objects are selected or picked
Plane.StandardPlane
Enumeration of the standard planes
PlaneException.tExceptionType
ProjectedModel.IntersectionMode
ProjectException.tExceptionType
Projection.StandardProjection
The standard parallel projections
QuadTree<T>.IterateAction
Delegates
ActionStartedDelegate
ActionTerminatedDelegate
AnimatedView.GetTimeDelegate
Delegate for the GetTimeEvent. If not handeled the time is determined by the internal clock.
AnimatedView.NextStepDelegate
Delegate for the NextStepEvent
ControlCenterCreatedDelegate
DidModifyDelegate
Prototyp für die Mitteilung von Änderungen. Die Zeichnung verwendet es für das IsModified Flag, welches gesetzt wird, wenn von irgendwo (GeoObjekte, Listen) dieser event kommt
FrameImpl.DragDropDelegate
FrameImpl.DragGetDataDelegate
FrameImpl.FileNameChangedDelegate
GaussNewtonMinimizer.CheckParameterFunction
GaussNewtonMinimizer.CurtailParameterFunction
GaussNewtonMinimizer.ErrorFunction
GaussNewtonMinimizer.JacobiFunction
Grid.GridChangedDelegate
HotspotChangedDelegate
LayoutView.RepaintActionDelegate
Model.AddingGeoObject
Delegate definition for the AddingGeoObjectEvent. Setting cancel
to true prevents
the object beeing added to the model.
Model.AddingGeoObjects
Delegate definition for the AddingGeoObjectsEvent.
Model.CalculateExtentForZoomTotalDelegate
Delegate definition for CalculateExtentForZoomTotalEvent. If handeled must return the
extent which is considered as the zoom total extent.
Standard implementation will return this.Extent.Project(pr)
Model.ExtentChangedDelegate
Delegate definition for the ExtentChangedEvent.
Model.GeoObjectAdded
Delegate definition for the GeoObjectAddedEvent.
Model.GeoObjectRemoved
Delegate definition for the GeoObjectRemovedEvent.
Model.GeoObjectsAdded
Delegate definition for the GeoObjectsAddedEvent.
Model.GeoObjectsRemoved
Delegate definition for the GeoObjectsRemovedEvent.
Model.ImportingObjectsDelegate
Delegate definition for the ImportingObjectsEvent. The handler may modify importedObjects
Model.NameChangedDelegate
Delegate definition for the NameChangedEvent.
Model.RemovingGeoObject
Delegate definition for the RemovingGeoObjectEvent. Setting cancel
to true prevents
the object beeing removed from the model.
Model.RemovingGeoObjects
Delegate definition for the RemovingGeoObjectsEvent.
ModelView.DisplayChangedDelegate
ModelView.PaintBackgroundDelegate
Delegate definition for background painting event. The painting of the coordinate cross and arrows, the grid and the DrawingPlane can be modified using this event
ModelView.ProjectionChangedDelegate
Delegate definition for notification of changes of the view position or direction
MouseFilterDelegate
Filter mouse messages to the ModelView. return true, if you want to prevent further processing of the mouse message.
OctTree<T>.Filter
Delegate definition of a filtering method restricting IOctTreeInsertable objects.
OctTree<T>.FilterNode
OctTree<T>.SplitTestFunction
Constructs an octtree providing an initial size and a precision
OpenGlCustomize.SetProjectionDelegate
Delegate definition of SetProjectionEvent.
PaintView
ProcessCommandDelegate
Delegate definition for ProcessCommandEvent, which is raised when the user selects a menu command from the main menu.
ProcessContextMenuDelegate
Delegate definition for ProcessContextMenuEvent, which is raised when a context menu is about to be executed.
Project.BindToTypeDelegate
Delegate to enable the deserialization of objects that have been renamed or changed the version number.
Project.ConstructionDelegate
Project.ModelsChangedDelegate
Project.RefreshDelegate
Project.ViewChangedDelegate
ProjectClosedDelegate
Projection.ProjectionChangedDelegate
Delegate definition for the ProjectionChangedEvent
ProjectOpenedDelegate
QuadTree<T>.CheckOne
RemovingFromListDelegate
List objects (e.g. HatchStyleList) raise this event, when an object is going to be removed. You may prevent this by setting the Refuse member in RemovingFromListEventArgs to true.
ScrollPositionChanged
SettingChangedDelegate
A setting has been changed
SettingsGlobalFileName.GetGlobalSettingsFileNameDelegate
UIEventHandler
UndoRedoSystem.BeginContinousChangesDelegate
UndoRedoSystem.ClosingUndoFrameDelegate
UndoRedoSystem.EndContinousChangesDelegate
UndoRedoSystem.OpeningUndoFrameDelegate
UpdateCommandDelegate
UpdateContextMenuDelegate
Delegate definition for UpdateContextMenuEvent, which is raised, when a context menu is about to be displayed.
UserData.UserDataAddedDelegate
UserData.UserDataRemovedDelegate
ValueChangedDelegate
Delegate for the notification of a change of a value