Boolean InitFileRevert(void);
This routine restores the GEOS.INI file from its saved backup version. It ensures that no other thread is operating on the file while it is being restored. This function returns an error flag:
true
represents an error in restoring the file;
false
indicates success.
Include: initfile.h
Boolean InitFileSave(void);
This routine saves the GEOS.INI file synchronously by updating the backup file to be the current version. (
InitFileCommit()
actually overwrites the GEOS.INI file itself.) It ensures that no other thread is operating on the file while it is being written out. This function returns an error flag:
true
represents an error in trying to save the file;
false
indicates success.
Include: initfile.h
void InitFileWriteBoolean( const char * category, const char * key, Boolean bool);
This integer writes a Boolean value into the specified category and key of the local GEOS.INI file. The Boolean will appear as "true" or "false" if the user looks at GEOS.INI with a text editor, but it will be an actual Boolean value to GEOS. Pass this routine the following:
category
key
category
into which the data should be written.
bool
Once written, the Boolean value can be read with
InitFileReadBoolean()
.
Include: initfile.h
void InitFileWriteData( const char *category, const char *key, const void *buffer, word bufSize);
This routine writes a given piece of data to the local GEOS.INI file. Pass it the following:
category
key
category
into which the data should be written.
buffer
bufSize
Once data has been written to the INI file, it can be read with
InitFileReadDataBlock()
or
InitFileReadDataBuffer()
.
Include: initfile.h
void InitFileWriteInteger( const char *category, const char *key, word value);
This routine writes an integer into the category and key specified for the local GEOS.INI file. Pass the following:
category
key
category
into which the data should be written.
value
The integer, once written, can be read with
InitFileReadInteger()
.
Include: initfile.h
void InitFileWriteString( const char *category, const char *key, const char *str);
This routine writes an entire string into the category and key specified for the local GEOS.INI file. Pass it the following:
category
key
category
into which the data should be written.
str
To read a string written with this routine, use
InitFileReadStringBlock()
or
InitFileReadStringBuffer()
.
Include: initfile.h
void InitFileWriteStringSection( const char *category, const char *key, const char *string);
This routine appends a string section onto the blob specified by the
category
and
key
parameters. The string section will become part of the blob and will be its last section. The section may not contain any carriage returns or line feeds. Pass this routine the following:
category
key
category
into which the data should be written.
string
Once written, the segment may be read with
InitFileReadStringSectionBlock()
or
InitFileReadStringSectionBuffer()
.
Include: initfile.h


Alex's Jquery Weather App
You are currently in
This app uses your IP address to determine your city based on your ISP location,
so it might not be 100% accurate.
Not your city? Find a New city:
Search
Change Temperature to Fahrenheit
Change Temperature to Celsius
This site created by Alex Harrison. Check out my works here:
www.codepen.io/alexharrisonmusic
or
www.github.com/alexharrisonmusic


{% extends 'menu.html' %} {% load static %} {% block extra_head %} {% endblock %} {% block content %} {% if employees|length > 0 %}
| First name | Last name | Department | Room number | Computer type | Computer model | Purchase date | ||
|---|---|---|---|---|---|---|---|---|
| {{ employee.first_name }} | {{ employee.last_name }} | {{ employee.department.name }} | {{ employee.room.number }} | {{ employee.computer.type }} | {{ employee.computer.model }} | {{ employee.computer.purchase_date }} | Update | Delete |


As I can see, you
{% if info_diff < 0 %}
spend more than you earn!
That's terrible!
{% elif info_diff > 0 %}
spend less than you earn!
That's excellent!
{% else %}
are balanced with your expenses.
That's good!
{% endif %}
{% endblock %}
{% block section_2 %}
Statistics
Franklin, based on your history...
If you continue like this, next month you can have a
{% if next_step < 0 %}
NEGATIVE
{% elif next_step > 0 %}
POSITIVE
{% else %}
BALANCED
{% endif %}
balance of R$ {{ next_step }}.


FREE SHIPPING
Order $250 or more to qualify for FREE delivery.
BEST PRICE GARANTEE
That you'll find the best offers and prices here.
SAME DAY DELIVERY
Select delivery option at checkout.
1 YEAR WARRANTY
Voluntary manufacturer’s warranty.

Days
Hours
Minutes
Seconds


Liquid syntax error: Unknown tag 'feed_meta'
Posted by Hello_World() on April 13, 2017
Posted by Hello_World() on June 18, 2016


6.13. Moving and Migrating Data¶
If you want an offline copy of your data, or you want to move data between networks, you can export compressed Avro files containing your simple features.
Note
The following examples assume an Accumulo install. For other back-ends, the command will vary slightly. See Command-Line Tools for more details.
To do this using the command line tools, use the export command with the format
and gzip
options:
$ geomesa-accumulo export ... -f mySft --format avro --gzip 6 -o myFeatures.avro
To re-import the data into another environment, you may use the ingest command. Because the Avro file is self-describing, you do not need to specify any converter config or simple feature type definition:
$ geomesa-accumulo ingest ... -f mySft myFeatures.avro
If your data is too large for a single file, you may run multiple exports and use CQL filters to separate your data.
If the schema does not already exist in the destination cluster, it will be created with the latest index formats available in GeoMesa, which may perform better. You could use this technique to migrate data between tables in a single cluster, as a way to benefit from indexing improvements. See Index Versioning for more information.


Koa
Zimba
Arabian Wowee
bitter
bold
smooth
full
medium
mild
Yes
No
Coffee cup
Artisinal cup
Shot
Downtown
South Lake Union
Fremont
Plain text JSON area:


Forgetting the fun in functional
Considering OOP advantages
January 11, 2015
While browsing different styles of implementing the Luhn algorithm credit card checker, I ran across a solution which admitted that it was perhaps a little too functional. Functional programmers approach the world as if it offered many chances to solve algebra problems. All of the bits and bobs are accounted for in one line, in order of completion with no mutable variables. Here's Ryan Leavengood's uber-Functional ruby quiz solution:
def self.luhn_check(cc)
# I like functional-style code (though this may be a bit over the top)
(cc.split('').reverse.enum_for(:each_slice, 2).inject('') do |s, (a, b)|
s << a + (b.to_i * 2).to_s
end.split('').inject(0) {|sum, n| sum + n.to_i}) % 10 == 0
end
In the spirit of learning Object Oriented programming this week, I was curious to see the differences. In my credit card checker, I was thinking hard about the scope of the variables since some are meant to be mutable. We might keep our list of credit card vendors declared as a constant. For variables that are true for our implementation and describe each and every credit card object we make, we declare a class variable @@. For example, @@hours_to_hold_authorization might be set to 48 hours for our business. The obvious instance variable would be @credit_card_number. The functional programmer doesn't declare the instance variable since the function will be exiting out with an answer. There is no need for any other program block to see @credit_card_number. The local variable will be sufficient to get to the true or false answer.
Object oriented programmers write class methods for operations that don't make sense for individual instances of a class. The most popular class method (you get it for free) is the Object.new method. The class is responsible for spawning new objects and not each instance that you would get out of that call Whenever you see a method with a 'self' on the second line, think class method. These might be good for counting up stuff about all the instances.
Blocks, Procs, and Lambdas are also known as closures. These contain a set of code that we want to execute multple times. This is somewhat outside the realm of functional programming since by definition we start at the top of the closure, get to the bottom, and go back up to the top of the closure again. Check out Robert Sosinki's tutorial on Reactive.io.
- Blocks: our usual way of looping through an Enumerable. For each element, we run an operation on that element. By calling yield, we send each element to that block of code.
- Procs: you will know a proc by its ampersand argument. Think of it as a drop-in snippet of code. Instead of using yield, we send call to our block of code. You can save re-usable code as an object itself. A Proc is a class in Ruby so we create a new one with an uppercase Proc. A block is just a proc, but it is a type of syntax in Ruby so we use a lowercase. You can pass a proc directly or save a proc as a variable.
- Lambas: you will know a lambda by the small-case lambda key-word. They are very similar to procs but with two key differences. Lambdas check the number of variables passed to them and can therefore throw an ArgumentError. Procs will stop the loop with a return value while lambdas can return their value, like a method, and continue on with the rest of the set. Similar to the Enumerable.cycle method, lambda is good for running through some elements and performing a set of operations on them and then hopping back out.
Modules are good for leveraging useful code across multiple objects. When an object includes a module, the method becomes available to that object (as well as to all the other ones that include that module too). Think of the old days when we had to include Enumerable (with all of its awesome methods that apply to collections) in custom classes in order to get access to those methods.
We wouldn't get very far in our Object Oriented journey without the idea of inheiritance. We can open a general file on a class of items and describe attributes and behaviors. In a separate file, we can include or overwrite some more attributes and behaviors to a subclass of items and so on and so forth. In POODR (Practical Object Oriented Design in Ruby), Sandi Metz describes classical inheritance as "a code arrangement technique."
In Composition, the object relationship is not codified in the class hiearchy. Bicycle has-a parts class. Parts can continue to exist even when bicycle doesn't. The aggregation approach has fewer dependencies than inheritence but we loose method delegation. For one thing, we can't be sure that the other class still exists. For example, without our Bicycle, the Parts may not be able to be listed out for a Mechanic who only knows about Bicycles. If Professors belong inside a University, Professors should still exist when the University goes under. We would just want to get a handle on Professors without Universities as well as ones within a University or in multiple Universities.


Three search options are available from the administration console.
Simple Search is used to quickly find specific accounts, aliases, distribution lists, resources on the domain and you can search for a specific domain. In the drop-down arrow at the left of the search box, you select which type of items to search for: Accounts, Distribution Lists, Aliases, Resources, or Domains.
For accounts, you can search by display name, first and last name, first part of the mail address, alias, delivery address, or mailbox ID. If you search using a mailbox ID, the complete ID string must be entered in the search.
If you do not know the complete name of the type, you can enter a partial name. Any search within the type selected with that partial sequence in the name are displayed. For example, if you searched for Sam in Accounts, the results could include Samuel, Samantha, Sammy, Samson.
From the drop-down arrow next to the search box, select what type of search to perform.
In the Search box, enter the name or partial name or string
Click Search.
Matching types are displayed in the content pane.
Help Search. This is a powerful unified search to quickly find answers to common questions. When you enter a search query in the search field and click Help Search, Zmail's wiki, forums, and documents are searched. The results are displayed in a new window with links to the information.
Advanced Search. A complex query can be created to search for addresses by domain or server. Individual mini-search panes let you select the criteria for the search.
In addition, the Search section in the Navigation pane includes predefined searches to quickly search for inactive accounts, locked out account, closed accounts and by account status. Click the search and the results display in the Content pane.


Home
Show Times
Sign Up
Title
Select Title
Mr.
Mrs.
Ms.
Dr.
First Name
Last Name
Email
Phone Number
Submit
Reset


--- layout: default title: About Seshu Koorella permalink: /About.html ---
I’m a Microsoft Certified Azure Solution Architect and Certified Kubernetes Application Developer with 10+ years of experience across diverse organizational domains, and has extensive experience in working with technologies like C#, ASP.NET MVC, Web API, Kubernetes, AngularJS and various Azure services.
My interests range from programming, photography, technology, reading and music. I try to blog whenever I learn something new or have something to say.
If you’d like to get in touch, feel free to say hello through any of the social links below.
If you like the blog, show your support to a small creator like me by buying me a coffee


CREATE POLICY name ON table_name [ FOR { ALL | SELECT | INSERT | UPDATE | DELETE } ] [ TO { role_name | PUBLIC | CURRENT_USER | SESSION_USER } [, ...] ] [ USING ( using_expression ) ] [ WITH CHECK ( check_expression ) ]
The CREATE POLICY command defines a new row-level security policy for a table. Note that row-level security must be enabled on the table (using ALTER TABLE ... ENABLE ROW LEVEL SECURITY) in order for created policies to be applied.
A policy grants the permission to select, insert, update, or delete rows that match the relevant policy expression. Existing table rows are checked against the expression specified in USING, while new rows that would be created via INSERT or UPDATE are checked against the expression specified in WITH CHECK. When a USING expression returns true for a given row then that row is visible to the user, while if false or null is returned then the row is not visible. When a WITH CHECK expression returns true for a row then that row is inserted or updated, while if false or null is returned then an error occurs.
For INSERT and UPDATE statements, WITH CHECK expressions are enforced after BEFORE triggers are fired, and before any actual data modifications are made. Thus a BEFORE ROW trigger may modify the data to be inserted, affecting the result of the security policy check. WITH CHECK expressions are enforced before any other constraints.
Policy names are per-table. Therefore, one policy name can be used for many different tables and have a definition for each table which is appropriate to that table.
Policies can be applied for specific commands or for specific roles. The default for newly created policies is that they apply for all commands and roles, unless otherwise specified. If multiple policies apply to a given statement, they will be combined using OR (although ON CONFLICT DO UPDATE and INSERT policies are not combined in this way, but rather enforced as noted at each stage of ON CONFLICT execution).
For commands that can have both USING and WITH CHECK policies (ALL and UPDATE), if no WITH CHECK policy is defined, then the USING policy will be used both for which rows are visible (normal USING case) and for which rows will be allowed to be added (WITH CHECK case).
If row-level security is enabled for a table, but no applicable policies exist, a "default deny" policy is assumed, so that no rows will be visible or updatable.
The name of the policy to be created. This must be distinct from the name of any other policy for the table.
The name (optionally schema-qualified) of the table the policy applies to.
The command to which the policy applies. Valid options are ALL, SELECT, INSERT, UPDATE, and DELETE. ALL is the default. See below for specifics regarding how these are applied.
The role(s) to which the policy is to be applied. The default is PUBLIC, which will apply the policy to all roles.
Any SQL conditional expression (returning boolean). The conditional expression cannot contain any aggregate or window functions. This expression will be added to queries that refer to the table if row level security is enabled. Rows for which the expression returns true will be visible. Any rows for which the expression returns false or null will not be visible to the user (in a SELECT), and will not be available for modification (in an UPDATE or DELETE). Such rows are silently suppressed; no error is reported.
Any SQL conditional expression (returning boolean). The conditional expression cannot contain any aggregate or window functions. This expression will be used in INSERT and UPDATE queries against the table if row level security is enabled. Only rows for which the expression evaluates to true will be allowed. An error will be thrown if the expression evaluates to false or null for any of the records inserted or any of the records that result from the update. Note that the check_expression is evaluated against the proposed new contents of the row, not the original contents.
Using ALL for a policy means that it will apply to all commands, regardless of the type of command. If an ALL policy exists and more specific policies exist, then both the ALL policy and the more specific policy (or policies) will be combined using OR, as usual for overlapping policies. Additionally, ALL policies will be applied to both the selection side of a query and the modification side, using the USING expression for both cases if only a USING expression has been defined.
As an example, if an UPDATE is issued, then the ALL policy will be applicable both to what the UPDATE will be able to select as rows to be updated (applying the USING expression), and to the resulting updated rows, to check if they are permitted to be added to the table (applying the WITH CHECK expression, if defined, and the USING expression otherwise). If an INSERT or UPDATE command attempts to add rows to the table that do not pass the ALL policy's WITH CHECK expression, the entire command will be aborted.
Using SELECT for a policy means that it will apply to SELECT queries and whenever SELECT permissions are required on the relation the policy is defined for. The result is that only those records from the relation that pass the SELECT policy will be returned during a SELECT query, and that queries that require SELECT permissions, such as UPDATE, will also only see those records that are allowed by the SELECT policy. A SELECT policy cannot have a WITH CHECK expression, as it only applies in cases where records are being retrieved from the relation.
Using INSERT for a policy means that it will apply to INSERT commands. Rows being inserted that do not pass this policy will result in a policy violation error, and the entire INSERT command will be aborted. An INSERT policy cannot have a USING expression, as it only applies in cases where records are being added to the relation.
Note that INSERT with ON CONFLICT DO UPDATE checks INSERT policies' WITH CHECK expressions only for rows appended to the relation by the INSERT path.
Using UPDATE for a policy means that it will apply to UPDATE commands (or auxiliary ON CONFLICT DO UPDATE clauses of INSERT commands). Since UPDATE involves pulling an existing record and then making changes to some portion (but possibly not all) of the record, UPDATE policies accept both a USING expression and a WITH CHECK expression. The USING expression determines which records the UPDATE command will see to operate against, while the WITH CHECK expression defines which modified rows are allowed to be stored back into the relation.
When an UPDATE command is used with a WHERE clause or a RETURNING clause, SELECT rights are also required on the relation being updated and the appropriate SELECT and ALL policies will be combined (using OR for any overlapping SELECT related policies found) with the USING clause of the UPDATE policy using AND. Therefore, in order for a user to be able to UPDATE specific rows, the user must have access to the row(s) through a SELECT or ALL policy and the row(s) must pass the UPDATE policy's USING expression.
 If only a USING clause is specified, then that clause will be used for both USING and WITH CHECK cases.
Note, however, that INSERT with ON CONFLICT DO UPDATE requires that an UPDATE policy USING expression always be enforced as a WITH CHECK expression. This UPDATE policy must always pass when the UPDATE path is taken. Any existing row that necessitates that the UPDATE path be taken must pass the (UPDATE or ALL) USING qualifications (combined using OR), which are always enforced as WITH CHECK options in this context. (The UPDATE path will never be silently avoided; an error will be thrown instead.) Finally, the final row appended to the relation must pass any WITH CHECK options that a conventional UPDATE is required to pass.
Using DELETE for a policy means that it will apply to DELETE commands. Only rows that pass this policy will be seen by a DELETE command. There can be rows that are visible through a SELECT that are not available for deletion, if they do not pass the USING expression for the DELETE policy.
When a DELETE command is used with a WHERE clause or a RETURNING clause, SELECT rights are also required on the relation being updated and the appropriate SELECT and ALL policies will be combined (using OR for any overlapping SELECT related policies found) with the USING clause of the DELETE policy using AND. Therefore, in order for a user to be able to DELETE specific rows, the user must have access to the row(s) through a SELECT or ALL policy and the row(s) must pass the DELETE policy's USING expression.
A DELETE policy cannot have a WITH CHECK expression, as it only applies in cases where records are being deleted from the relation, so that there is no new row to check.
You must be the owner of a table to create or change policies for it.
While policies will be applied for explicit queries against tables in the database, they are not applied when the system is performing internal referential integrity checks or validating constraints. This means there are indirect ways to determine that a given value exists. An example of this is attempting to insert a duplicate value into a column that is a primary key or has a unique constraint. If the insert fails then the user can infer that the value already exists. (This example assumes that the user is permitted by policy to insert records which they are not allowed to see.) Another example is where a user is allowed to insert into a table which references another, otherwise hidden table. Existence can be determined by the user inserting values into the referencing table, where success would indicate that the value exists in the referenced table. These issues can be addressed by carefully crafting policies to prevent users from being able to insert, delete, or update records at all which might possibly indicate a value they are not otherwise able to see, or by using generated values (e.g., surrogate keys) instead of keys with external meanings.
Generally, the system will enforce filter conditions imposed using security policies prior to qualifications that appear in user queries, in order to prevent inadvertent exposure of the protected data to user-defined functions which might not be trustworthy. However, functions and operators marked by the system (or the system administrator) as LEAKPROOF may be evaluated before policy expressions, as they are assumed to be trustworthy.
Since policy expressions are added to the user's query directly, they will be run with the rights of the user running the overall query. Therefore, users who are using a given policy must be able to access any tables or functions referenced in the expression or they will simply receive a permission denied error when attempting to query the table that has row-level security enabled. This does not change how views work, however. As with normal queries and views, permission checks and policies for the tables which are referenced by a view will use the view owner's rights and any policies which apply to the view owner.
Additional discussion and practical examples can be found in Section 5.7.


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ContentProvider android.support.v4.content.FileProvider
public class FileProvider
Provider to support easy sharing of private files between apps. When paired
with features like Context#grantUriPermission(String, Uri, int)
or
Intent#FLAG_GRANT_READ_URI_PERMISSION
, this provider ensures that
receiving apps can always open the underlying file.
Apps should generally avoid sending raw filesystem paths across process
boundaries, since the receiving app may not have the same access as the
sender. Instead, apps should send Uri
backed by a provider like
FileProvider
.
To use this provider, add it to your manifest:
And define one or more filesystem paths your provider should support in an XML resource. This provider will only support files which exist under these defined paths.
Then use getUriForFile(Context, String, File)
at runtime to generate
a Uri
backed by the provider. Since the provider is not exported,
these Uri
can only be accessed by other apps when you explicitly
grant access.
| Constructor Summary | |
|---|---|
FileProvider()
|
| Method Summary | |
|---|---|
void |
attachInfo(Context context,
ProviderInfo info)
|
int |
delete(Uri uri,
java.lang.String selection,
java.lang.String[] selectionArgs)
|
java.lang.String |
getType(Uri uri)
|
static Uri |
getUriForFile(Context context,
java.lang.String authority,
java.io.File file)
Return a Uri that provides access to the given File . |
Uri |
insert(Uri uri,
ContentValues values)
|
boolean |
onCreate()
|
ParcelFileDescriptor |
openFile(Uri uri,
java.lang.String mode)
|
Cursor |
query(Uri uri,
java.lang.String[] projection,
java.lang.String selection,
java.lang.String[] selectionArgs,
java.lang.String sortOrder)
|
int |
update(Uri uri,
ContentValues values,
java.lang.String selection,
java.lang.String[] selectionArgs)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileProvider()
| Method Detail |
|---|
public boolean onCreate()
public void attachInfo(Context context, ProviderInfo info)
public static Uri getUriForFile(Context context, java.lang.String authority, java.io.File file)
Uri
that provides access to the given File
. The
returned Uri
can be used with features like
Context#grantUriPermission(String, Uri, int)
or
Intent#FLAG_GRANT_READ_URI_PERMISSION
to allow other apps to
access private files. Providers only support files which exist under
filesystem paths defined in their <meta-data>
.
authority
- The authority of a FileProvider
defined as a
<provider>
in your manifest.
java.lang.IllegalArgumentException
- When the given File
is outside
the paths supported by the provider.public Cursor query(Uri uri, java.lang.String[] projection, java.lang.String selection, java.lang.String[] selectionArgs, java.lang.String sortOrder)
public java.lang.String getType(Uri uri)
public Uri insert(Uri uri, ContentValues values)
public int update(Uri uri, ContentValues values, java.lang.String selection, java.lang.String[] selectionArgs)
public int delete(Uri uri, java.lang.String selection, java.lang.String[] selectionArgs)
public ParcelFileDescriptor openFile(Uri uri, java.lang.String mode) throws java.io.FileNotFoundException
java.io.FileNotFoundException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Here there would be an article presented on its own page. Look at article-include.html to see an example.


More Apps from Codefixia
Choose one of these great apps!
-DOWNLOAD-
1.
Available collections: world flags, trademarks logos, alphabets, sport teams...
-DOWNLOAD-
2. Advanced Poker Stats
Ultimate application to calculate the statistics and odds in Texas Hold'em Poker.
* Designed to be useful for professional and easy for casual players
-DOWNLOAD-
3. Night Alarm Clock
Alarm clock for your nightstand while charging your phone at night. Designed to minimize battery consumption.
* Fully configurable: show/hide components individually
-DOWNLOAD-
4. Astro Clock Widget
Perfect application to display at a glance all the information regarding the time, date, active alarms and upcoming events.
* Time of sunrise and sunset
-DOWNLOAD-
4. Light & LED
Easy to use flashlight that emits light through the camera flash and the screen of your mobile device.
* Timer with graphic countdown


We've been in this business for 2 weeks now, but we have already saved the world. Do you need any more proof of our skill? If you're already convinced - choose the security plan that works for you and contact us!
AGE:circa 5000
POWERS:super-strength, indestructability, general bad-assery
BIO: Wonder Woman is an Amazonian warrior princess. On free time, she works as an antiquities dealer at the Louvre Museum. The daughter of the Amazons' Queen Hippolyta and the king of the Olympian Gods, Zeus. Also known as the "Godkiller", having been originally conceived to be the ultimate weapon against her mighty half-brother Ares' unquenchable bloodlust and warfare powers.
AGE:from previous century
POWERS:rich
BIO:Batman is the superhero protector of Gotham City, a man dressed like a bat who fights against evil and strikes terror into the hearts of criminals everywhere. In his free time Batman is also a billionaire industrialist and notorious playboy. He is also a founding member of the Justice League even though he's basically useless. He will get your cat out of a tree though.
AGE:76
POWERS:amphibious, super-strength, talks to fish
BIO:Aquaman is the telepathic ruler of Atlantis and the Earth's oceans, an Atlantean with incredible strength and speed as well as the ability to command all sea-life. Rumor has it that Aquaman founded the "Neptūnas" mineral water brand. He is a founding member of the Justice League of America.
AGE:he accidentally hit the restart button several years ago, so... he's 5
POWERS:super-strength, shit-ton of weapons, provides free wifi
BIO:Cyborg is a superhero who is half man and half machine. His body was destroyed in a tragic accident, but he was saved through experimental technology; his body parts have been replaced with a large arsenal of high-tech gadgets and weaponry. His favorite movie: "Terminator".
AGE:Flash isn't the defined by time
POWERS:he is fast, like really really fast
BIO:The Flash is the fastest man alive. Using his super-speed powers, he taps into the Speed Force and becomes a costumed crime-fighter. Says he beat Superman in a race. When asked, Superman refused to comment. Flash is also a founding member of the Justice League of America.


Toggle navigation
GLDesert
Frontpage
Play
Forum
Categories
New Posts
Messages
Online
Send PM
Contact Us
Vote
Store
Tacmap
Stats
Staff
Suggest things!


{# Email template for a submitted order #} {% from "_macros.html" import bulletproof_button %}
Note: {{ notes }}


open fun stop(vararg actions: Action): Unit
Overrides Robot.stop
Stop all or a specific set of actions
If no action is specify stop all NaoqiRobot's actions running
actions - list of actions to stop
actions


|
LCDGFX LCD display driver
1.0.3
This library is developed to control SSD1306/SSD1325/SSD1327/SSD1331/SSD1351/IL9163/PCD8554 RGB i2c/spi LED displays
|
#include <display.h>
Public Member Functions | |
| void | putPixel (lcdint_t x, lcdint_t y) __attribute__((noinline)) |
| void | drawVLine (lcdint_t x1, lcdint_t y1, lcdint_t y2) |
| void | drawHLine (lcdint_t x1, lcdint_t y1, lcdint_t x2) |
| void | fillRect (lcdint_t x1, lcdint_t y1, lcdint_t x2, lcdint_t y2) __attribute__((noinline)) |
| void | drawXBitmap (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) |
| void | drawBitmap1 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) __attribute__((noinline)) |
| Draws monochrome bitmap in color buffer using color, specified via setColor() method Draws monochrome bitmap in color buffer using color, specified via setColor() method. More... | |
| void | drawBitmap4 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) __attribute__((noinline)) |
| Draws 4-bit gray-color bitmap in color buffer. Draws 4-bit gray-color bitmap in color buffer. More... | |
| void | drawBitmap8 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *bitmap) |
| Draws 8-bit color bitmap in color buffer. Draws 8-bit color bitmap in color buffer. More... | |
| void | drawBitmap16 (lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *bitmap) |
| void | drawBuffer1 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline)) |
| void | drawBuffer1Fast (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) |
| void | drawBuffer4 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline)) |
| void | drawBuffer8 (lcdint_t x, lcdint_t y, lcduint_t w, lcduint_t h, const uint8_t *buffer) |
| void | drawBuffer16 (lcdint_t xpos, lcdint_t ypos, lcduint_t w, lcduint_t h, const uint8_t *buffer) __attribute__((noinline)) |
| void | clear () |
| void | fill (uint16_t color) |
| uint8_t | printChar (uint8_t c) |
| size_t | write (uint8_t c) __attribute__((noinline)) |
| void | printFixed (lcdint_t xpos, lcdint_t y, const char *ch, EFontStyle style=STYLE_NORMAL) __attribute__((noinline)) |
| Public Member Functions inherited from NanoDisplayBase< I > | |
| NanoDisplayBase (I &intf) | |
| const NanoPoint | offsetEnd () const |
| const NanoRect | rect () const |
| lcduint_t | width () |
| lcduint_t | height () |
| void | swapDimensions () |
| void | setColor (uint16_t color) |
| void | negativeMode () |
| void | positiveMode () |
| I & | getInterface () |
| void | setFont (NanoFont &font) |
| void | setFontSpacing (uint8_t spacing) |
| NanoFont & | getFont () |
| void | setFixedFont (const uint8_t *progmemFont) |
| void | setFixedFont (const uint8_t *progmemFont, const uint8_t *secondaryFont) |
| void | setFreeFont (const uint8_t *progmemFont, const uint8_t *secondaryFont=nullptr) |
| void | setTextCursor (lcdint_t x, lcdint_t y) |
Static Public Attributes | |
| static const uint8_t | BITS_PER_PIXEL = 8 |
Additional Inherited Members | |
| Protected Attributes inherited from NanoDisplayBase< I > | |
| lcduint_t | m_w = 0 |
| width of NanoCanvas area in pixels | |
| lcduint_t | m_h = 0 |
| height of NanoCanvas area in pixels | |
| lcduint_t | m_p = 0 |
| number of bits, used by width value: 3 equals to 8 pixels width | |
| lcdint_t | m_cursorX = 0 |
| current X cursor position for text output | |
| lcdint_t | m_cursorY = 0 |
| current Y cursor position for text output | |
| uint8_t | m_textMode = 0 |
| Flags for current NanoCanvas mode. | |
| EFontStyle | m_fontStyle |
| currently active font style | |
| uint16_t | m_color = 0xFFFF |
| current color for monochrome operations | |
| NanoFont * | m_font = nullptr |
| currently set font | |
| I & | m_intf |
| communication interface with the display | |
NanoDisplayOps8 is template class for 8-bit operations.
| void NanoDisplayOps8< I >::clear | ( | ) |
Clears canvas
Definition at line 163 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBitmap1 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draws monochrome bitmap in color buffer using color, specified via setColor() method Draws monochrome bitmap in color buffer using color, specified via setColor() method.
| x | - position X in pixels |
| y | - position Y in pixels |
| w | - width in pixels |
| h | - height in pixels |
| bitmap | - monochrome bitmap data, located in flash |
Definition at line 175 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBitmap16 | ( | lcdint_t | xpos, |
| lcdint_t | ypos, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draw 16-bit color bitmap, located in Flash, directly to OLED display GDRAM. Each pixel of the bitmap is expected in 5-6-5 format.
| xpos | start horizontal position in pixels |
| ypos | start vertical position in pixels |
| w | bitmap width in pixels |
| h | bitmap height in pixels |
| bitmap | pointer to Flash data, containing 16-bit color bitmap. |
Definition at line 226 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBitmap4 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draws 4-bit gray-color bitmap in color buffer. Draws 4-bit gray-color bitmap in color buffer.
| x | - position X in pixels |
| y | - position Y in pixels |
| w | - width in pixels |
| h | - height in pixels |
| bitmap | - 4-bit gray-color bitmap data, located in flash |
Definition at line 207 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBitmap8 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draws 8-bit color bitmap in color buffer. Draws 8-bit color bitmap in color buffer.
| x | - position X in pixels |
| y | - position Y in pixels |
| w | - width in pixels |
| h | - height in pixels |
| bitmap | - 8-bit color bitmap data, located in flash |
Definition at line 213 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBuffer1 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws bitmap, located in RAM, on the display Each byte represents 8 vertical pixels.
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels (must be divided by 8) |
| buffer | pointer to data, located in SRAM: each byte represents 8 vertical pixels. |
Definition at line 232 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBuffer16 | ( | lcdint_t | xpos, |
| lcdint_t | ypos, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws 16-bit bitmap, located in RAM, on the display Each pixel occupies 2 bytes (5-6-5 format): refer to RGB_COLOR16 to understand RGB scheme, being used.
| xpos | horizontal position in pixels |
| ypos | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels |
| buffer | pointer to data, located in RAM. |
Definition at line 289 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBuffer1Fast | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Implements the same behavior as drawBuffer1, but much faster. This method has some limitations
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels (must be divided by 8) |
| buffer | pointer to data, located in SRAM: each byte represents 8 vertical pixels. |
Definition at line 264 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBuffer4 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws 4-bit bitmap, located in RAM, on the display Each byte represents two pixels in 4-4 format: refer to GRAY_COLOR4 to understand scheme, being used.
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels |
| buffer | pointer to data, located in SRAM. |
Definition at line 270 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawBuffer8 | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | buffer | ||
| ) |
Draws 8-bit bitmap, located in RAM, on the display Each byte represents one pixel in 2-2-3 format: refer to RGB_COLOR8 to understand RGB scheme, being used.
| x | horizontal position in pixels |
| y | vertical position in pixels |
| w | width of bitmap in pixels |
| h | height of bitmap in pixels |
| buffer | pointer to data, located in SRAM. |
Definition at line 276 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawHLine | ( | lcdint_t | x1, |
| lcdint_t | y1, | ||
| lcdint_t | x2 | ||
| ) |
Draws horizontal or vertical line
| x1 | - position X |
| y1 | - position Y |
| x2 | - position X |
Definition at line 107 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawVLine | ( | lcdint_t | x1, |
| lcdint_t | y1, | ||
| lcdint_t | y2 | ||
| ) |
Draws horizontal or vertical line
| x1 | - position X |
| y1 | - position Y |
| y2 | - position Y |
Definition at line 119 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::drawXBitmap | ( | lcdint_t | x, |
| lcdint_t | y, | ||
| lcduint_t | w, | ||
| lcduint_t | h, | ||
| const uint8_t * | bitmap | ||
| ) |
Draws bitmap, located in Flash, on the display The bitmap should be in XBMP format
| x | - horizontal position in pixels |
| y | - vertical position in blocks (pixels/8) |
| w | - width of bitmap in pixels |
| h | - height of bitmap in pixels (must be divided by 8) |
| bitmap | - pointer to data, located in Flash: each byte represents 8 vertical pixels. |
Definition at line 169 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::fill | ( | uint16_t | color | ) |
Fill screen content with specified color
| color | color to fill display with |
Definition at line 151 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::fillRect | ( | lcdint_t | x1, |
| lcdint_t | y1, | ||
| lcdint_t | x2, | ||
| lcdint_t | y2 | ||
| ) |
Fills rectangle area
| x1 | - position X |
| y1 | - position Y |
| x2 | - position X |
| y2 | - position Y |
Definition at line 131 of file ssd1306_8bit.inl.
| uint8_t NanoDisplayOps8< I >::printChar | ( | uint8_t | c | ) |
Draws single character to canvas
| c | - character code to print |
Definition at line 295 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::printFixed | ( | lcdint_t | xpos, |
| lcdint_t | y, | ||
| const char * | ch, | ||
| EFontStyle | style = STYLE_NORMAL |
||
| ) |
Print text at specified position to canvas
| xpos | position in pixels |
| y | position in pixels |
| ch | pointer to NULL-terminated string. |
| style | specific font style to use |
Definition at line 349 of file ssd1306_8bit.inl.
| void NanoDisplayOps8< I >::putPixel | ( | lcdint_t | x, |
| lcdint_t | y | ||
| ) |
Draws pixel on specified position
| x | - position X |
| y | - position Y |
Definition at line 99 of file ssd1306_8bit.inl.
| size_t NanoDisplayOps8< I >::write | ( | uint8_t | c | ) |
Writes single character to canvas
| c | - character code to print |
Definition at line 330 of file ssd1306_8bit.inl.
|
static |


{% set restyled="v1" %} {% extends 'groups.html' %} {% block title %}Kotlin User Groups List{% endblock %} {% block page_content %}
Kotlin User Group or KUG is a community of people and a place to share your programming experience with Kotlin and its ecosystem
Have a question? Contact us
{% endblock %}


How to deploy system to Azure
- GitHub OAuth
- System is connected to GitHub as OAuth application. User signs into system using GitHub account, so that system can interact with user's repositories.
- OAuth app needs to be created in GitHub (Tutorial).
- Callback url should be set to: (
homepage-url/signin-github
).
- Client ID and Client secret will be used later on.
- I suggest to create two OAuth applications, if you wish to run the application both on localhost and server.
- For localhost, it is also required to add Client ID and Client secret into User Secrets in CCMS project (Tutorial).
- Name for Client ID secret is
ClientId
and name for Client secret is ClientSecret
.
- Database
- Create database which can be updated by EF migration.
- I have used SQL server and SQL database on Azure (Tutorial)
- Allow Azure services and resources to access the database.
- Add Connection String into User Secrets in CCMS project (Tutorial).
- Name for Connection String is
ConnectionString
.
- Update database from migration using
update-database
command in Package Manager Console in CCMS.DAL project.
- Key vault
- I recommend the create the key vault at Azure to store application secrets (Tutorial).
- Source code is adjusted to key vault usage. When key vault is used, only URI in ```Program.cs`` at line 25 needs to be changed.
- Add
ClientId
, ClientSecret
and ConnectionString
secrets with values into key vault.
- App service
- Create app service on Azure (Documentation).
- I recommend to use at least B1 service plan at minimum.
- Connect app service to key vault.
- Generate identity for the app service in Identity page. Copy Object ID.
- Add new access policy in the key vault in Access policies page, for principal select Object ID from last step.
- Add Get and List permissions for secrets to the app.
- Publish
- Publish app to App service.
- I recommend using Visual Studio - right click CCMS project and click on Publish button.


@Immutable
public final class Status
extends java.lang.Object
Status.Code
in conjunction with an
optional descriptive message.
For clients, every remote call will return a status on completion. In the case of errors this
status may be propagated to blocking stubs as a RuntimeException
or to
a listener as an explicit parameter.
Similarly servers can report a status by throwing Status.OperationRuntimeException
or by passing the status to a callback.
Utility functions are provided to convert a status to an exception and to extract them back out.
| Modifier and Type | Class and Description |
|---|---|
static class |
Status.Code
The set of canonical status codes.
|
static class |
Status.OperationException
Exception thrown by implementations while managing an operation.
|
static class |
Status.OperationRuntimeException
Runtime exception thrown by implementations while managing an operation.
|
| Modifier and Type | Field and Description |
|---|---|
static Status |
ABORTED |
static Status |
ALREADY_EXISTS |
static Status |
CANCELLED |
static Metadata.Key<Status> |
CODE_KEY
Key to bind status code to trailing metadata.
|
static Status |
DATA_LOSS |
static Status |
DEADLINE_EXCEEDED |
static Status |
FAILED_PRECONDITION |
static Status |
INTERNAL |
static Status |
INVALID_ARGUMENT |
static Metadata.Key<java.lang.String> |
MESSAGE_KEY
Key to bind status message to trailing metadata.
|
static Status |
NOT_FOUND |
static Status |
OK |
static Status |
OUT_OF_RANGE |
static Status |
PERMISSION_DENIED |
static Status |
RESOURCE_EXHAUSTED |
static Status |
UNAUTHENTICATED |
static Status |
UNAVAILABLE |
static Status |
UNIMPLEMENTED |
static Status |
UNKNOWN |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Exception |
asException()
Convert this
Status to an Exception . |
java.lang.RuntimeException |
asRuntimeException()
Convert this
Status to a RuntimeException . |
Status |
augmentDescription(java.lang.String additionalDetail)
Create a derived instance of
Status augmenting the current description with
additional detail. |
static Status |
fromCodeValue(int codeValue)
Return a
Status given a canonical error Status.Code value. |
static Status |
fromThrowable(java.lang.Throwable t)
Extract an error
Status from the causal chain of a Throwable . |
java.lang.Throwable |
getCause()
The underlying cause of an error.
|
Status.Code |
getCode()
The canonical status code.
|
java.lang.String |
getDescription()
A description of this status for human consumption.
|
boolean |
isOk()
Is this status OK, i.e.
|
java.lang.String |
toString() |
Status |
withCause(java.lang.Throwable cause)
Create a derived instance of
Status with the given cause. |
Status |
withDescription(java.lang.String description)
Create a derived instance of
Status with the given description. |
public static final Status OK
public static final Status CANCELLED
public static final Status UNKNOWN
public static final Status INVALID_ARGUMENT
public static final Status DEADLINE_EXCEEDED
public static final Status NOT_FOUND
public static final Status ALREADY_EXISTS
public static final Status PERMISSION_DENIED
public static final Status UNAUTHENTICATED
public static final Status RESOURCE_EXHAUSTED
public static final Status FAILED_PRECONDITION
public static final Status ABORTED
public static final Status OUT_OF_RANGE
public static final Status UNIMPLEMENTED
public static final Status INTERNAL
public static final Status UNAVAILABLE
public static final Status DATA_LOSS
public static final Metadata.Key<Status> CODE_KEY
public static final Metadata.Key<java.lang.String> MESSAGE_KEY
public static Status fromCodeValue(int codeValue)
Status
given a canonical error Status.Code
value.public static Status fromThrowable(java.lang.Throwable t)
Status
from the causal chain of a Throwable
.public Status withCause(java.lang.Throwable cause)
Status
with the given cause.public Status withDescription(java.lang.String description)
Status
with the given description.public Status augmentDescription(java.lang.String additionalDetail)
Status
augmenting the current description with
additional detail.public Status.Code getCode()
@Nullable public java.lang.String getDescription()
@Nullable public java.lang.Throwable getCause()
public boolean isOk()
public java.lang.RuntimeException asRuntimeException()
public java.lang.Exception asException()
public java.lang.String toString()
toString
in class java.lang.Object


#include <stDiskPageManager.h>
Inheritance diagram for stDiskPageManager:
Public Member Functions | |
| stDiskPageManager () | |
| stDiskPageManager (const string &fName, stSize pagesize, stSize userHeaderSize=-1, int cacheNPages=5) | |
| stDiskPageManager (const string &fName) | |
| virtual | ~stDiskPageManager () |
| virtual bool | IsEmpty () |
| virtual stPage * | GetHeaderPage () |
| virtual stPage * | GetPage (stPageID pageid) |
| virtual void | ReleasePage (stPage *page) |
| virtual stPage * | GetNewPage () |
| virtual void | WritePage (stPage *page) |
| virtual void | WriteHeaderPage (stPage *headerpage) |
| virtual void | DisposePage (stPage *page) |
| void | Create (const char *fName, int pagesize, int userHeaderSize=-1, int cacheNPages=5) |
| void | Open (char *fname) |
| void | ResetFile () |
| virtual stSize | GetMinimumPageSize () |
| void | Flush () |
| virtual void | ResetStatistics () |
| unsigned long | GetDiskReadCount () |
| unsigned long | GetDiskWriteCount () |
| unsigned long | GetDiskSAccessCount () |
| const string & | GetFileName () |
| stPageID | GetLastPageID () |
This version uses CStorage to disk access, ie, all disk controls is made by CStorage.
Josiel Maimone de Figueiredo<EMAIL_ADDRESS>Fabio Jun Takada Chino<EMAIL_ADDRESS>Definition at line 105 of file stDiskPageManager.h.
|
|
Creates a new instance of this class. Use Create() or Open() to prepare this instance for use.
Definition at line 113 of file stDiskPageManager.h. |
|
|
Creates a new instance of this class. This constructor will create a new file with the given name.
|
|
|
Creates a new instance of this class. This constructor will open an existing file.
|
|
|
Disposes this page and free all allocated resources. |
|
|
Create a disk file that will store the data
|
|
|
Disposes the given page. This method will make the page available (not allocated) for the next calls of GetNewPage(). Since this page will not be used anymore, this method will release the lock for this page instance.
Implements stPageManager. |
|
|
Flushes the cache data to disk. |
|
|
This method returns the number of disk reads. Since this class caches reads and writes, the returning value will always be less or equal to the number of logic reads returned by GetReadCount().
Referenced by GetDiskSAccessCount(). |
|
|
This method returns the number of disk access. Since this class caches reads and writes, the returning value will always be less or equal to the number of logic reads returned by GetAccessCount().
Definition at line 338 of file stDiskPageManager.h. References GetDiskReadCount(), and GetDiskWriteCount(). |
|
|
This method returns the number of disk writes. Since this class caches reads and writes, the returning value will always be less or equal to the number of logic reads returned by GetWriteCount().
Referenced by GetDiskSAccessCount(). |
|
|
Returns the file name. Definition at line 345 of file stDiskPageManager.h. |
|
|
Returns the header page. This method will return a special page that will be used by SlimTree to write some information about the tree itself. Since this page must always exist, this method will always return a valid page for reading/writing. Use WritePage() to write this page. The returning instance of stPage will be locked to prevent its reuse by this page manager. Use ReleasePage() to unlock this instance.
Implements stPageManager. |
|
|
Returns the last page ID.
Definition at line 356 of file stDiskPageManager.h. References CStorage::GetTotalPagesIncludingDisposed(), and stPageID. |
|
|
Returns the minimum size of a page. The size of the header page is always ignored since it may be smaller than others. Implements stPageManager. Definition at line 299 of file stDiskPageManager.h. References stSize. |
|
|
Allocates a new page for use. As GetPage() and GetHeaderPage(), the returning instance will be locked to prevent reuse by this page manager. To dispose this page (make it free), use DisposePage().
Implements stPageManager. |
|
|
Returns the page with the given page ID. This method will return a valid page for reading/writing. Use WritePage() to write this page. The returning instance of stPage will be locked to prevent its reuse by this page manager. Use ReleasePage() to unlock this instance.
Implements stPageManager. |
|
|
This method will checks if this page manager is empty. If this method returns true, the stSlimTree will create a new tree otherwise it will continue to use the existing tree.
Implements stPageManager. |
|
|
Open an existing file.
|
|
|
Releases this instace for reuse by this page manager. Since some implementations of page manager will reuse instances of stPage to avoid unnecessary resource reallocations, each page instance must be locked until it becomes unecessary. The stSlimTree will always call this method when a stPage instance will not be used in a near future.
Implements stPageManager. |
|
|
Close the file and reopen overwriting all data. There must be an opened file. The user header and all data will be destroyed. The user must save his header before calling this method (if he needs to save it). Only the original characteristics (Pagesize, buferSize, userHeaderSize and cacheTotalPages) are maintained.
|
|
|
Restarts the statistics. Reimplemented from stPageManager. |
|
|
Writes the header page to the disk.
Reimplemented from stPageManager. |
|
|
Writes the given page to the disk. This method will write the page but will not release it. Use ReleasePage() to do it.
Implements stPageManager. |


We couldn't find what you're looking for!
Please make sure that you typed in the correct path
ERROR CODE: 404


Class: Aws::MachineLearning::Types::RedshiftDataSpec
| Relationships & Source Files | |
| Super Chains via Extension / Inclusion / Inheritance | |
|
Class Chain:
self,
Struct
|
|
|
Instance Chain:
self,
::Aws::Structure ,
Struct
|
|
| Inherits: |
Struct
|
| Defined in: | gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb |
Overview
Describes the data specification of an Amazon Redshift DataSource
.
Constant Summary
Instance Attribute Summary
-
#data_rearrangement ⇒ String
rw
A JSON string that represents the splitting and rearrangement processing to be applied to a
DataSource
. -
#data_schema ⇒ String
rw
A JSON string that represents the schema for an Amazon Redshift
DataSource
. -
#data_schema_uri ⇒ String
rw
Describes the schema location for an Amazon Redshift
DataSource
. -
#database_credentials ⇒ Types::RedshiftDatabaseCredentials
rw
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.
-
#database_information ⇒ Types::RedshiftDatabase
rw
Describes the
DatabaseName
andClusterIdentifier
for an Amazon RedshiftDataSource
. -
#s3_staging_location ⇒ String
rw
Describes an Amazon S3 location to store the result set of the
SelectSqlQuery
query. -
#select_sql_query ⇒ String
rw
Describes the SQL Query to execute on an Amazon Redshift database for an Amazon Redshift
DataSource
.
Instance Method Summary
::Aws::Structure
- Included
| #to_hash | Alias for Structure#to_h. |
Instance Attribute Details
#data_rearrangement ⇒ String
(rw)
A JSON string that represents the splitting and rearrangement
processing to be applied to a DataSource
. If the
DataRearrangement
parameter is not provided, all of the input data
is used to create the Datasource
.
There are multiple parameters that control what data is used to create a datasource:
-
percentBegin
Use percentBegin
to indicate the beginning of the range of the
data used to create the Datasource. If you do not include
percentBegin
and percentEnd
, Amazon ML includes all of the
data when creating the datasource.
-
percentEnd
Use percentEnd
to indicate the end of the range of the data used
to create the Datasource. If you do not include percentBegin
and
percentEnd
, Amazon ML includes all of the data when creating the
datasource.
-
complement
The complement
parameter instructs Amazon ML to use the data
that is not included in the range of percentBegin
to
percentEnd
to create a datasource. The complement
parameter is
useful if you need to create complementary datasources for
training and evaluation. To create a complementary datasource, use
the same values for percentBegin
and percentEnd
, along with
the complement
parameter.
For example, the following two datasources do not share any data, and can be used to train and evaluate a model. The first datasource has 25 percent of the data, and the second one has 75 percent of the data.
Datasource for evaluation: \{"splitting":\{"percentBegin":0,
"percentEnd":25\}\}
Datasource for training: \{"splitting":\{"percentBegin":0,
"percentEnd":25, "complement":"true"\}\}
-
strategy
To change how Amazon ML splits the data for a datasource, use the
strategy
parameter.
The default value for the strategy
parameter is sequential
,
meaning that Amazon ML takes all of the data records between the
percentBegin
and percentEnd
parameters for the datasource, in
the order that the records appear in the input data.
The following two DataRearrangement
lines are examples of
sequentially ordered training and evaluation datasources:
Datasource for evaluation: \{"splitting":\{"percentBegin":70,
"percentEnd":100, "strategy":"sequential"\}\}
Datasource for training: \{"splitting":\{"percentBegin":70,
"percentEnd":100, "strategy":"sequential",
"complement":"true"\}\}
To randomly split the input data into the proportions indicated by
the percentBegin and percentEnd parameters, set the strategy
parameter to random
and provide a string that is used as the
seed value for the random data splitting (for example, you can use
the S3 path to your data as the random seed string). If you choose
the random split strategy, Amazon ML assigns each row of data a
pseudo-random number between 0 and 100, and then selects the rows
that have an assigned number between percentBegin
and
percentEnd
. Pseudo-random numbers are assigned using both the
input seed string value and the byte offset as a seed, so changing
the data results in a different split. Any existing ordering is
preserved. The random splitting strategy ensures that variables in
the training and evaluation data are distributed similarly. It is
useful in the cases where the input data may have an implicit sort
order, which would otherwise result in training and evaluation
datasources containing non-similar data records.
The following two DataRearrangement
lines are examples of
non-sequentially ordered training and evaluation datasources:
Datasource for evaluation: \{"splitting":\{"percentBegin":70,
"percentEnd":100, "strategy":"random",
"randomSeed"="s3://my_s3_path/bucket/file.csv"\}\}
Datasource for training: \{"splitting":\{"percentBegin":70,
"percentEnd":100, "strategy":"random",
"randomSeed"="s3://my_s3_path/bucket/file.csv",
"complement":"true"\}\}
# File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb', line 3249
class RedshiftDataSpec < Struct.new( :database_information, :select_sql_query, :database_credentials, :s3_staging_location, :data_rearrangement, :data_schema, :data_schema_uri) SENSITIVE = [] include Aws::Structure end
#data_schema ⇒ String
(rw)
A JSON string that represents the schema for an Amazon Redshift
DataSource
. The DataSchema
defines the structure of the
observation data in the data file(s) referenced in the DataSource
.
A DataSchema
is not required if you specify a DataSchemaUri
.
Define your DataSchema
as a series of key-value pairs.
attributes
and excludedVariableNames
have an array of key-value
pairs for their value. Use the following format to define your
DataSchema
.
\{ "version": "1.0",
"recordAnnotationFieldName": "F1",
"recordWeightFieldName": "F2",
"targetFieldName": "F3",
"dataFormat": "CSV",
"dataFileContainsHeader": true,
"attributes": [
\{ "fieldName": "F1", "fieldType": "TEXT" \}, \{ "fieldName": "F2", "fieldType": "NUMERIC" \}, \{ "fieldName": "F3", "fieldType": "CATEGORICAL" \}, \{ "fieldName": "F4", "fieldType": "NUMERIC" \}, \{ "fieldName": "F5", "fieldType": "CATEGORICAL" \}, \{ "fieldName": "F6", "fieldType": "TEXT" \}, \{ "fieldName": "F7", "fieldType": "WEIGHTED_INT_SEQUENCE" \}, \{ "fieldName": "F8", "fieldType": "WEIGHTED_STRING_SEQUENCE" \} ],
"excludedVariableNames": [ "F6" ] \}
# File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb', line 3249
class RedshiftDataSpec < Struct.new( :database_information, :select_sql_query, :database_credentials, :s3_staging_location, :data_rearrangement, :data_schema, :data_schema_uri) SENSITIVE = [] include Aws::Structure end
#data_schema_uri ⇒ String
(rw)
Describes the schema location for an Amazon Redshift DataSource
.
# File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb', line 3249
class RedshiftDataSpec < Struct.new( :database_information, :select_sql_query, :database_credentials, :s3_staging_location, :data_rearrangement, :data_schema, :data_schema_uri) SENSITIVE = [] include Aws::Structure end
#database_credentials ⇒ Types::RedshiftDatabaseCredentials (rw)
Describes AWS Identity and Access Management (IAM) credentials that are used connect to the Amazon Redshift database.
# File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb', line 3249
class RedshiftDataSpec < Struct.new( :database_information, :select_sql_query, :database_credentials, :s3_staging_location, :data_rearrangement, :data_schema, :data_schema_uri) SENSITIVE = [] include Aws::Structure end
#database_information ⇒ Types::RedshiftDatabase (rw)
Describes the DatabaseName
and ClusterIdentifier
for an Amazon
::Aws::Redshift
DataSource
.
# File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb', line 3249
class RedshiftDataSpec < Struct.new( :database_information, :select_sql_query, :database_credentials, :s3_staging_location, :data_rearrangement, :data_schema, :data_schema_uri) SENSITIVE = [] include Aws::Structure end
#s3_staging_location ⇒ String
(rw)
Describes an Amazon S3 location to store the result set of the
SelectSqlQuery
query.
# File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb', line 3249
class RedshiftDataSpec < Struct.new( :database_information, :select_sql_query, :database_credentials, :s3_staging_location, :data_rearrangement, :data_schema, :data_schema_uri) SENSITIVE = [] include Aws::Structure end
#select_sql_query ⇒ String
(rw)
Describes the SQL Query to execute on an Amazon Redshift database
for an Amazon Redshift DataSource
.
# File 'gems/aws-sdk-machinelearning/lib/aws-sdk-machinelearning/types.rb', line 3249
class RedshiftDataSpec < Struct.new( :database_information, :select_sql_query, :database_credentials, :s3_staging_location, :data_rearrangement, :data_schema, :data_schema_uri) SENSITIVE = [] include Aws::Structure end


--- layout: page title: "About us" description: "About Ricardo Parro and Caterine Parro" --- {% include JB/setup %}
Hi, We are Ricardo Parro and Caterine Parro.
We've been helping startups going from a very early stage to success for the last 10 years. Ricardo as a developer and CTO, Caterine as a Product Manager.
We are married and as a couple, we function as a team. That applies to our personal relationship but also to business and work. Besides working in different areas in the past we had to dive in each others area and learn with each other. The bridge between product and tech is usually quite difficult to attain but in our case was a match made in heaven as we consider product and tech as the same area where the goal is to build great products that are sellable.


Multiplayer
Click on the game are to start, space bar to jump
Update nickname
Score: 0
Live Leaderboard


Click to play
(W, A, S, D = Move, E = Interact, RUN = Survive)
<<<<<<< HEAD ======= --> >>>>>>> f6e2c33d823a8ebf5de6e65577dfa0dbda5f0064


BLE Proximity
Scanning for address: {{ proximityAddress }}
{% for neighbor in neighbors %}
{{ neighbor.dB }} dB:
{{ neighbor.addr }} ({{ neighbor.addrType }})
{{ neighbor.localName }}
{% endfor %}


Sketch, Framer, Moleskine
● 15 of the 24 drivers work in IT, the rest in finance or banking
● All discovered Uber via a friend
● Majority of passengers are foreigners
● All are part-time
Like many drivers in Kuala Lumpur (KL), Sasindran learned about Uber from his friend, who had suddenly bought a new house.
Sasindran leased a vehicle from Uber for the first four months, but he then reinvested his earnings and bought a brand new car — along with a second house in just under 6 months.
Uber is empowering drivers in KL by letting them be “own boss of company” — as Sasindran puts it. These drivers are truly appreciative of Uber, but certainly have recommendations to further improve the ride-sharing experience.
This what Julian, our first Uber driver, told my family when he tried to pick us up from our hotel. All of our Uber drivers tried to call me upon arriving to my pin — which didn’t help the drivers in any way due to my foreign number.
Here's where that can become a real problem.
Since Julian couldn’t call me, and because Waze doesn’t tell drivers which side of the street I’m on, Julian was left to win a guessing game.
In San Francisco, Dallas, New York, or any other Western city, this may not seem like a big deal. Just make a U-turn, and you’re good to go. Not in KL. With three-way one-ways, one wrong turn could send the driver in a one-way frenzy — easily creating an additional ten minute wait.
Even when Julian came on the wrong side of the street, we were able to cross over a bridge to meet him on the other side. But here’s the guard rail we were met with:
We yelled over the passing traffic to meet on the original side of the street and Julian eventually made his way around to the hotel’s street, which was much more accessible.
Other drivers expressed a similar sentiment about the difficulty in finding and contacting riders — especially those who are foreign.
Whether or not a rider (customer?) has SIM connectivity abroad, we can assume that riders have internet of some sort already — how else would they be able to call an Uber?
Instead of the driver struggling to call, Uber can create a messaging interface so that drivers can communicate more effectively with riders. One driver, Low, even suggested that Uber integrate popular chat applications like WeChat or WhatsApp; but switching between apps could impede a driver’s safety.
If Uber implemented a new feature, say ‘UberTalk,’ where drivers could shoot a message to the passenger when parked within the radius, then it could alleviate a pain point. Here's a quick prototype.
● Whereas the drivers in Kuala Lumpur worked in IT or Finance, the drivers from Singapore came from the service industry (such as flight attendants or warehouse operators).
● About 37–50 years old
● Equal balance between full time and part time drivers
Let’s zoom in on one Singaporean driver in particular: Makhan (selfie on the right) who summed up the major issues.
I ran into this same problem multiple times. Since Uber doesn’t provide me with the color or picture of the car, I have to squint my eyes and scan the street for a Honda logo or a license plate number. With foreign cars likes Protons and Peroduas, the last thing I could resort to was matching the driver’s face inside the car with the 80x80 pixel Avatar that Uber provides.
Instead of a ‘tiny notification,’ as another driver named Gary described the enhancement, Uber could instead request the rider to take a seflie or picture of their location which could help the driver pinpoint where the rider is located. That image could disappear after the driver opens it in order to maintain the rider’s privacy. Here's what that could look like:
Penang, a small island on the northeast trip of Malaysia, only has 160 Uber drivers. Drivers nonetheless face a unique set of challenges.
According to Jackie (center selfie), most of drivers in Penang communicate to each other over a massive group message in WhatsApp. Here’s what they talk about:
● Police Zones
● Hotspots (Uber’s way of letting drivers know where most people are requesting rides)
● Crowded Roads. For example, the drivers let each other know about the Peak Times for Penang Hill (a main attraction) since many riders are tourists visiting the area.
Jackie said that it would be safer if Uber provided a messaging service not only between drivers-riders, but also for the community of drivers in areas with a growing Uber workforce. This way the drivers would have a secure system, along with a tool to give feedback or suggestions to Uber — as Jackie didn’t exactly know how to get in contact with Uber.
As Uber just recently arrived in Penang, many people are eager to use the service. But they want to test it out first.
Prakasam, an Apple Store Manager and Uber Driver, says he gets about 20 of these calls per week. He drives about 3–5 miles to pick up this ‘rider,’ and when he gets there the rider says ‘Oh, I just wanted to see if it worked or not.’ Prakasam can’t give the rider a bad rating since the rider simply cancels the drive after seeing how the service works. And the rider doesn’t get billed as long as he cancels within 6 minutes. Even if the same rider test calls over and over again, Prakasam doesn’t want to cancel the trip or else his own rating drops.
For growing areas, Uber often has promotions where a first-time rider receives credit just for signing up. In order to stop the test calls, that credit could be applied to the test drive so that the driver is still compensated for his or her time.
Penang is only a one hour flight away from Kuala Lumpur, the capital of Malaysia. This close proximity allows people in Kuala Lumpur to order Ubers that are in Penang.
Parakasam said that one he received a request from Penang’s Airport and ended up waiting ninety minutes for the rider to show up. He later found out that the rider was flying into Penang from Kuala Lumpur and wanted to pre-book a driver before he landed. This puts Parakasam in a bind.
If he cancels the trip, his rating drops. So he has to wait and take a chance with all of the other calls he gets from the airport in the future.
This could be an issue with Uber’s mapping service. Regardless, there should be a continuous feedback loop to avoid 0 star ratings along with test calls.
Here’s a diagram of a driver’s personas, needs, and goals I’ve created for all three cities based on my research:
Overall, Uber was an amazing experience and definitely the best way to travel internationally. I don’t represent Uber in any way. I enjoy talking to people, learning about their problems, and making their lives better through design.


Earlier this month, Singapore Civil Defence Force (SCDF) firefighters who were trying to put out a raging blaze at a 13th-storey unit at Block 210A Bukit Batok Street 21 found that the fire hose reel cabinets at the block were padlocked.
They also found there was no water supply for the hose reel when they broke one padlock.
It is said the problems with the fire hose reel delayed the rescue attempt and the SCDF subsequently revealed it issued Fire Hazard Abatement Notices to Jurong-Clementi Town Council (JCTC) over these two issues.
- Advertisement -
JCTC and Bukit Batok MP Murali Pillai later explained measure to padlock the fire hose reels were taken to prevent misuse and vandalism.
Apologising for the incident, Mr Pillai revealed that two town council staff who had padlocked the hose reel will face disciplinary action brought on by the town council management.
The administrators of Facebook page Malu.SG published photos showing padlocked firefighter inlets at Tampines GRC.
Tampines Town Council is run by Deputy Prime Minister Heng Swee Keat, Minister for Environment and Water Resources Masagos Zulkifli as well as MPs Baey Yam Keng, Desmond Choo and Cheng Li Hui.
The photos show the padlocked inlets are from blocks 937 and 146 at Tampines and there are padlocks on inlets at other blocks.
Following the revelation, the administrators of Malu.SG asked whether there should be a lock to these inlets.
The page administrators, however, said people should not single the two town council members at Bukit Batok out if padlocking the inlets is the norm since other wards are doing the same.
However, the page said others must also be held accountable and disciplined if there should not be padlocks on the equipment.
The administrators of the Facebook page said: “We aren’t firefighters. So we are just wondering, not assuming. By right, either no one gets reprimanded – or more people ought to be, since there are locks in other parts of Singapore.
“In addition, we don’t want to politicise this observation. It’s more about just being fair and consistent is all.”
The Independent has contacted Tampines Town Council for clarification and will update this story once we receive comment.
- Advertisement -


Finite set of instructions executed in step by step method meant to perform a specific task.
Organization or arrangement of data in computer's memory to utilize the data in an effective manner.
Implementation of algorithms using a programming language in an effective and efficient manner.
Classifications
“Measuring programming progress by lines of code is like measuring aircraft building progress by weight.” -- Bill Gates
int main( )
{
int num1, num2, sum;
printf("Enter two integers: ");
scanf("%d %d",&num1,&num2);
/* Stores the two integer entered by user in variable num1 and num2 */
sum=num1+num2; /* Performs addition and stores it in variable sum */
printf("Sum: %d",sum); /* Displays sum */
return 0;
}


|
NVTX++
3.0
C++ convenience wrappers for NVTX.
|
Provides C++ constructs making the NVTX library safer and easier to use with zero overhead. More...
#include <nvToolsExt.h>
#include <string>
Go to the source code of this file.
Classes | |
| class | nvtx3::domain |
domain s allow for grouping NVTX events into a single scope to differentiate them from events in other domain s. More... | |
| struct | nvtx3::domain::global |
| Tag type for the "global" NVTX domain. More... | |
| struct | nvtx3::rgb |
| Indicates the values of the red, green, blue color channels for a rgb color code. More... | |
| struct | nvtx3::argb |
| Indicates the value of the alpha, red, green, and blue color channels for an argb color code. More... | |
| class | nvtx3::color |
Represents a custom color that can be associated with an NVTX event via it's event_attributes . More... | |
| class | nvtx3::category |
| Object for intra-domain grouping of NVTX events. More... | |
| class | nvtx3::named_category< D > |
A category with an associated name string. More... | |
| class | nvtx3::registered_message< D > |
| A message registered with NVTX. More... | |
| class | nvtx3::message |
Allows associating a message string with an NVTX event via its EventAttribute s. More... | |
| class | nvtx3::payload |
A numerical value that can be associated with an NVTX event via its event_attributes . More... | |
| class | nvtx3::event_attributes |
| Describes the attributes of a NVTX event. More... | |
| class | nvtx3::domain_thread_range< D > |
| A RAII object for creating a NVTX range local to a thread within a domain. More... | |
| class | nvtx3::domain_process_range< D > |
| A RAII object for creating a NVTX range within a domain that can be created and destroyed on different threads. More... | |
Macros | |
| #define | NVTX3_MINOR_VERSION 0 |
| Semantic minor version number. More... | |
| #define | NVTX3_RELAXED_CONSTEXPR |
| Enables the use of constexpr when support for C++14 relaxed constexpr is present. More... | |
| #define | NVTX3_FUNC_RANGE_IN(D) |
Convenience macro for generating a range in the specified domain from the lifetime of a function. More... | |
| #define | NVTX3_FUNC_RANGE() NVTX3_FUNC_RANGE_IN(::nvtx3::domain::global) |
| Convenience macro for generating a range in the global domain from the lifetime of a function. More... | |
Typedefs | |
| using | nvtx3::thread_range = domain_thread_range<> |
Alias for a domain_thread_range in the global NVTX domain. | |
| using | nvtx3::process_range = domain_process_range<> |
Alias for a domain_process_range in the global NVTX domain. | |
Functions | |
| template<typename T > | |
| constexpr auto | nvtx3::detail::has_name_member () noexcept-> decltype(T::name, bool()) |
Verifies if a type T contains a member T::name of type const char* or const wchar_t* . More... | |
| template<> | |
| domain const & | nvtx3::domain::get< domain::global > () |
Returns reference to the domain object that represents the global NVTX domain. More... | |
| template<typename D = nvtx3::domain::global> | |
| void | nvtx3::mark (event_attributes const &attr) noexcept |
Annotates an instantaneous point in time with the attributes specified by attr . More... | |
Provides C++ constructs making the NVTX library safer and easier to use with zero overhead.
| #define NVTX3_FUNC_RANGE | ( | ) | NVTX3_FUNC_RANGE_IN(::nvtx3::domain::global) |
Convenience macro for generating a range in the global domain from the lifetime of a function.
This macro is useful for generating an NVTX range in the global domain from the entry point of a function to its exit. It is intended to be the first line of the function.
Constructs a static registered_message
using the name of the immediately enclosing function returned by __func__
and constructs a nvtx3::thread_range
using the registered function name as the range's message.
Example:
| #define NVTX3_FUNC_RANGE_IN | ( | D | ) |
Convenience macro for generating a range in the specified domain
from the lifetime of a function.
This macro is useful for generating an NVTX range in domain
from the entry point of a function to its exit. It is intended to be the first line of the function.
Constructs a static registered_message
using the name of the immediately enclosing function returned by __func__
and constructs a nvtx3::thread_range
using the registered function name as the range's message.
Example:
| [in] | D | Type containing name member used to identify the domain to which the registered_message belongs. Else, domain::global to indicate that the global NVTX domain should be used. |
| #define NVTX3_MINOR_VERSION 0 |
Semantic minor version number.
Major version number is hardcoded into the "nvtx3" namespace/prefix.
If this value is incremented, the above version include guard needs to be updated.
| #define NVTX3_RELAXED_CONSTEXPR |
Enables the use of constexpr when support for C++14 relaxed constexpr is present.
Initializing a legacy-C (i.e., no constructor) union member requires initializing in the constructor body. Non-empty constexpr constructors require C++14 relaxed constexpr.
|
inline |
Returns reference to the domain
object that represents the global NVTX domain.
This specialization for domain::global
returns a default constructed, domain
object for use when the "global" domain is desired.
All NVTX events in the global domain across all libraries and applications will be grouped together.
domain
corresponding to the global NVTX domain.
|
noexcept |
Verifies if a type T
contains a member T::name
of type const char*
or const wchar_t*
.
| T | The type to verify |
T
contains a member T::name
of type const char*
or const wchar_t*
.
|
inlinenoexcept |
Annotates an instantaneous point in time with the attributes specified by attr
.
Unlike a "range", a mark is an instantaneous event in an application, e.g., locking/unlocking a mutex.
| D | Type containing name member used to identify the domain to which the domain_process_range belongs. Else, domain::global to indicate that the global NVTX domain should be used. |
| [in] | attr | event_attributes that describes the desired attributes of the mark. |


- LandmineTrigger - Class in com.bham.bd.components.triggers.traps
-
- LandmineTrigger(int, int, int) - Constructor for class com.bham.bd.components.triggers.traps.LandmineTrigger
-
Construct a Landmine Trigger in a position with respawn time
- LandmineTriggerTest() - Method in class com.bham.bd.components.triggers.TriggerTest
-
- laserChange(LaserType) - Method in class com.bham.bd.components.characters.Player
-
- laserFlag - Variable in class com.bham.bd.components.characters.Player
-
- LaserGun - Class in com.bham.bd.components.shooting
-
Represents a default laser the player starts with
- LaserGun(double, double, Point2D, Side) - Constructor for class com.bham.bd.components.shooting.LaserGun
-
Constructs a laser ,which is considered as default laser of player
- laserTest() - Method in class com.bham.bd.components.shooting.armoryTest
-
- laserType - Variable in class com.bham.bd.components.shooting.Gun
-
The type of laser this gun is spawning
- LaserType - Enum in com.bham.bd.components.shooting
-
Enum class defining unmodifiable properties of any laser type.
- LaserType(int, int, Image[]) - Constructor for enum com.bham.bd.components.shooting.LaserType
-
Constructs a specific type of laser with the provided images.
- lastTick - Variable in class com.bham.bd.components.shooting.Gun
-
Last tick indicating the time passed since the last bullet was shot
- lastTick - Variable in class com.bham.bd.entity.ai.director.Director
-
Holds the time in which the director last checked the game state
- layRandomTrap(double) - Method in class com.bham.bd.components.characters.agents.Agent
-
- LEAVE_GAME - Static variable in class com.bham.bd.view.tools.GameFlowEvent
-
- LEAVE_GAME_EVENT - Variable in class com.bham.bd.view.menu.EndMenu
-
Event to be fired if "Submit" is clicked
- LEAVE_GAME_EVENT - Variable in class com.bham.bd.view.menu.PauseMenu
-
Event to be fired if "Return to Menu" is clicked
- leaveGame(GameFlowEvent) - Method in class com.bham.bd.view.GameSession
-
Handles the event of leaving the game
- LIFETIME - Static variable in class com.bham.bd.components.shooting.ExplosiveBullet
-
- loadGame(MapType) - Method in class com.bham.bd.components.Controller
-
Loads and starts the game
- loadGame(MapType) - Method in class com.bham.bd.components.SurvivalController
-
- loadGraph() - Method in class com.bham.bd.components.SurvivalController
-
Loads the graph of the map
- loadMap(String) - Method in class com.bham.bd.components.environment.MapLoader
-
Loads map with obstacles and triggers
- loadParallelPlayer(boolean, SoundTrack...) - Method in class com.bham.bd.audio.AudioManager
-
Prepares to play the provided tracks in parallel
- loadSequence(boolean, List<AudioPlayer>) - Method in class com.bham.bd.audio.AudioManager
-
Prepares to play a list of audio players in sequence with a possibility to loop indefinitely
- loadSequentialPlayer(boolean, SoundTrack...) - Method in class com.bham.bd.audio.AudioManager
-
Prepares to play the provided tracks sequentially
- loadSequentialPlayer(boolean, SoundTrack[]...) - Method in class com.bham.bd.audio.AudioManager
-
Prepares to play given batches (each song in a batch is played in parallel) in sequence
- localToGlobal(Point2D, Point2D, Point2D) - Static method in class com.bham.bd.utils.GeometryEnhanced
-
transfer a local position to global position
- localToGlobalTest() - Method in class com.bham.bd.utils.UtilsTest
-
- loopPropertyShouldWork() - Method in class com.bham.bd.audio.AudioSemiAutomatedTest
-


This is Words and Buttons Online — a collection of interactive #tutorials, #demos, and #quizzes about #mathematics, #algorithms and #programming.
When I started with Python, there were not yet NumPy or SymPy. We used to do research in MatLab, rapid prototyping in Delphi and, believe me or not, symbolic computation in Prolog. Python was something like a nicer Perl, not really popular with the researchers. But it was fun to write things in.
So we did. I choose to implement a couple of experiments for my thesis in Python, and I had to bring a bit of linear algebra with it. I started with writing some Pascal-style loop over loop routines, which was not very exciting, but the more I got into the Python, the more pleasurable it got to become. At some point, I felt that there is something more in the language than loops over loops and started researching the language instead of my original topic. Probably, the best wrong decision I ever took.
Python is famous for its gentle learning curve, but this may very well fire back. You can do Pascal in Python, you can do C++ in Python, you can do Lisp in Python, but you really get the leverage only by doing Python in Python. Yet it is too easy to live with the very basic knowledge. You may be missing all the awesome parts and still feel fine about it.
This article is supposed to show you how powerful Python is at its core. To illustrate this, I chose the domain of linear algebra. Of course, Python has very decent packages for it so you probably wouldn't have to reimplement anything described here. However, I only chose linear algebra due to my lack of imagination. The syntax that allows us to put so much sense in so little code is universal.
Disclaimer: for the sake of readability not all the code samples are actually written in a single line each. It is, of course, possible since neither of them contains Python control structures that rely on indentation. All the indentation in the examples is entirely voluntaristic.
List comprehensions are the staple of Python one-liners. It is a special syntax that describes list transformations. Let's say we want to multiply a vector by a scalar. In Pascal-ish Python this would be something like this.
def scaled(A, x): B = list() for i in range(len(A)): B.append( A[i] * x ) return B |
Which is fine. This style has its benefits too, for example, you always have a line to put a breakpoint to. But this is overly verbose. In Python, you can simply do this.
def scaled(A, x): return [ai*x for ai in A] |
And it works like that.
List comprehension [1.0, 4.0, 3.0] * 2.0 [, ... |
List comprehensions are not endemic to Python, Haskell and Clojure have them too. Even C# LINQ provides a special syntax for ranges.
The less well-known Python features are dictionary comprehensions and tuple comprehensions.
>>> [2*v for v in [1.0, 2.0, 3.0]] [2.0, 4.0, 6.0] >>> {k:2*v for k, v in {0:1.0, 1:4.0, 2:3.0}.items()} {0: 2.0, 1: 8.0, 2: 6.0} >>> tuple(2*v for v in (1.0, 4.0, 3.0)) (2.0, 8.0, 6.0) |
This feature lets you iterate several iterables as one making everything into a list of tuples. Well, it says “list” in the title, but it also works with tuples, dictionaries, generators, everything you can iterate through.
>>> A = [1, 2, 3] >>> B = ('a', 'b', 'c') >>> C = {1:'a', 2:'b', 3:'c'} >>> D = xrange(123) >>> zip(A, B, C, D) [(1, 'a', 1, 0), (2, 'b', 2, 1), (3, 'c', 3, 2)] |
You can make a vector addition in one line with it.
def sum_of(A, B): return [ai+bi for (ai, bi) in zip(A, B)] |
On a pair of lists, it figuratively zips data just like a real zipper.
List zipping A = [1.0, 4.0, 3.0] B = [7.0, 3.0, 1.0] zip(A, B) = [... |
This function simply sums everything for you. You can do a vector dot product in a single line by accumulating multiplications of vectors' elements.
def dot_of(A, B): return sum([ai*bi for (ai, bi) in zip(A, B)]) |
Sometimes, however, a simple summation is just too simple. Like with floating-point numbers, when you face that annoying small error now and then. To make thing more comfortable for you, Python has another sum function that operates on partial sums resulting in more precise output.
>>> [0.1]*10 [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1] >>> sum([0.1]*10) 0.9999999999999999 >>> import math >>> math.fsum([0.1]*10) 1.0 |
Conditional expressions are the Python's take on ternary operator. They are expressions that depend on conditions. Expressions in a sense that they expected to be simple and pure. We can use one to make an identity matrix.
def identity(n): return [[1.0 if i==j else 0.0 for j in range(n)] for i in range(n)] |
It's just a nested list comprehension with a conditional expression that works like this.
Conditional expression: 0 == 0 j = 0 [[1.0, ... i = 0 |
Conditional expressions are great for brevity and expressiveness, but since they are meant to be expressions they may not be easy to add side effects to. Not that it isn't possible, it just requires a little trick. In Python, a tuple computation implies computation of every tuple element from left to right. So whenever you need to add more things to your expression, just use a tuple.
You also can't do print from expressions, since they should not have side effects, but sys.stdout.write is somehow fine.
def identity(n): return [[1.0 if i==j else (0.0, sys.stdout.write("i != j\n") )[0] for j in range(n)] for i in range(n)] |
The same trick works for lambdas. You can make your lambdas as large as you wish with tuples. Although, please don't do this unless you have a very good reason to.
Ok, I almost hear some guy from Reddit yelling: “your example doesn't need a conditional expression, to begin with!” Well, it's true. In Python, you can explicitly convert Boolean type variable to a float.
def identity(n): return [[float(i==j) for j in range(n)] for i in range(n)] |
Let's just call it a matter of style. I personally like to draw a line between facts and numbers, but it is completely fine not to do that.
Let's say we have a matrix in Python as a list of lists where every nested list is a row. Now if we feed these rows to zip from before, it will form a list of tuples where every tuple is a matrix's column. That's a ready-made matrix transposition.
But we still have to settle two things. One is trivial: we want our matrix as a list of lists, not tuples, so we would have to fix that with a simple list comprehension. The other requires special Python syntax that will allow us to make a list of lists into a tuple of function's arguments. And the syntax for that is simply an asterisk before the matrix.
def transposed(A): return [list(aj) for aj in zip(*A)] |
The difference between passing a list of lists and lists as arguments looks like this.
Passing a container >>> A = [[1, 2, 3], ... [4, 5, 6], ... [7, 8, 9]] >>> def print_A(A): ... print A >>> print_A(A) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] |
The same syntax works the other way around. If you want to receive all the arguments as a single tuple, you can.
>>> def print_arguments_as_tuple(*A): ... print A >>> print_A_as_tuple(1, 2, 3) (1, 2, 3) |
When you keep your matrices as lists of lists, you can easily multiply a matrix by a vector using a single list comprehension with a dot product inside.
def matrix_vector_of(A, X): return [dot_of(ai, X) for ai in A] |
This operation is particularly important in projective geometry. With a single matrix multiplication you can do rotation, scale, translation, affine and projective transformations, — all at the same time. If you want to know more, please take a look at the Interactive guide to homogeneous coordinates.
In computational geometry, a plane is often set by a point in space and a plane's normal vector at this point. With this notation, you can project an arbitrary point on a plane as simple as this.
def projected_on(A, Pn, Pd): return sum_of(A, scaled(Pn, (Pd — dot_of(Pn, A)) / dot_of(Pn, Pn))) |
We don't need any special syntax for that but hold on; we'll get back to it.
Let's find a Euclidean distance between two points. All we have to do is to perform a vector subtraction, take its self-dot product, and then take a square root of what we got.
def distance_between(A, B): return pow(dot_of( *(sum_of(A, scaled(B, -1.0)), )*2 ), 0.5) |
The trick here is to make a self-dot product, that implies passing the same argument to a function without repeating itself. Python has a nice syntax for multiplication in the sense of making something replicate several times. And it is... multiplication. You can use integer multiplication to replicate lists, tuples and so on.
>>> (1, 2, 3) * 2 (1, 2, 3, 1, 2, 3) >>> [1, 2, 3] * 2 [1, 2, 3, 1, 2, 3] >>> ([1, 2, 3],) * 2 ([1, 2, 3], [1, 2, 3]) |
In our case, we need to duplicate a list and feed it to the function.
List concatenation >>> A = [1, 2, 3] >>> def print_A_B(A, B): ... print A, B >>> print_A_B(A*2 ,[]) [1, 2, 3, 1, 2, 3] [] |
Solving linear equations is a respected field of engineering on its own. It is conceptually simple, but you face all kind of problems that nullify the simplicity. Computational error, unreasonable execution time, memory exhaustion, etc.
What I want to show here is that you can, using the power of Python, make a linear solver in one single line of code. Please remember though, that you shouldn't. There are libraries that are much better in this.
The solver itself is explained in another article: Interactive introduction to iterative algorithms. It is an iterative solver that jumps from one hyperplane to another slowly but steadily getting to the point of the solution.
Or it hangs. Or exhaust your stack. It all depends on a system.
def solve(A, B, Xi): return Xi if distance_between(matrix_vector_of(A, Xi), B) < 1e-5 else solve(A[1:] + [A[0]], B[1:] + [B[0]], projected_on(Xi, A[0], B[0])) |
The only interesting thing here Python-wise is the list syntax we use to rotate our hyperplane in a projection queue. It is very simple once you get it. You just chop the head off a list, make it into a list itself, and then concatenate the tail with a former head back together.
Rotation: step 1 >>> B = [1, 2, 3] >>> print B[1:] + [B[0]] [2, 3, 1] |
Once again, this is not the best way to invert a matrix. But it works, and it's technically one line.
The idea here is that you divide the identity matrix by the input matrix solving linear equations one unit vector at a time. Linear equation system is basically a matrix by vector division since its left side is multiplication and we get the second operand of it by solving the system.
def inverted(A): return transpose([solve(A, ort, [0.0]*len(A)) for ort in identity(len(A))]) |
So in just 10 lines of Python code, we have vector addition, vector multiplication, dot product, matrix by vector multiplication, identity matrix, matrix transposition, matrix inversion, point projection, Euclidean distance, and a linear system solver.
Python is very expressive and very powerful not only because of its packages. Of course, modern Python has packages for everything, so you don't have to write a lot of basic code yourself. But, I believe, it only has packages for everything because it is so much fun to write everything in Python.
| Index #programming #mathematics | ← there's more. |
+
So You Think You Know C (free book) + Geometry for Programmers (paid book) + Github & RSS |


We are committed to working with the six counties and 22 cities in the greater Sacramento Area Council of Governments (SACOG) region. We’re here to help and eager to learn from professional public administrators. And while we’re advocates for open government (we can’t build apps without open data!), we’re non-partisan and public-minded.
We're a group of civic-minded programmers, coders, designers, and extraordinary citizens. We work in partnership with government, non-profit, and technical partners to deploy technology to improve quality of life and increase citizen engagement with civic issues.
Code for Sacramento is led by a volunteer Core Team that organizes events, manages strategic partnerships, and ensures fluid communication among cross-functional project teams.
{{ member.bio }}
Feel free to reach out to anyone on our leadership team by using the contact page or email<EMAIL_ADDRESS>Coming Soon


30th March 2016
Application deadline
22
Total number of applications
12
Applications started
6
Applications in progress
(Beyond 50%)
4
Applications submitted
Application list
| Application number | Project title | Lead | Area | Status | Percentage complete |
|---|---|---|---|---|---|
| 194731 | Machine learning in robots | PWC | HVM | Submitted | 100 |
| 194732 | AI in learning | BBC | HVM | Submitted | 100 |
| 194733 | Machine learning in robots | PWC | HVM | Submitted | 100 |
| 194734 | Robots that learn | Kingfisher | HVM | Submitted | 100 |
| 194735 | Example application | Example lead | HVM | In progress | 100 |
| 194736 | Example application | Example lead | HVM | In progress | 86 |
| 194737 | Example application | Example lead | HVM | In progress | 86 |
| 194738 | Example application | Example lead | HVM | In progress | 84 |
| 194739 | Example application | Example lead | HVM | In progress | 85 |
| 194740 | Example application | Example lead | HVM | In progress | 83 |
| 194741 | Example application | Example lead | HVM | Started | 42 |
| 194742 | Example application | Example lead | HVM | Started | 41 |
| 194743 | Example application | Example lead | HVM | Started | 36 |
| 194744 | Example application | Example lead | HVM | Started | 35 |
| 194745 | Example application | Example lead | HVM | Started | 30 |
| 194746 | Example application | Example lead | HVM | Started | 27 |
| 194747 | Example application | Example lead | HVM | Started | 25 |
| 194748 | Example application | Example lead | HVM | Started | 20 |
| 194749 | Example application | Example lead | HVM | Started | 19 |
| 194750 | Example application | Example lead | HVM | Started | 10 |