| Sections |
|---|
| Init and Authorize |
| FileSystem API |
| Link API |
| Permissions API |
| Search |
| Events |
| Impersonation |
| Error handling |
Egnyte SDK contains methods helping the developer with authorization, FileSystem API and Link API.
For more details on the API behind this JavaScript wrapper, visit Public API documentation
Need API key? Get API access here!
Initialize Egnyte SDK to use API with your key
var egnyte = Egnyte.init("https://mydomain.egnyte.com", {
key: YOURAPIKEY,
scope: SCOPE_STRING //optional, scope value to send with token requests
mobile: true //optional, changes login prompt to mobile friendly
});
Request an access token
Call any of the API.auth.requestToken*
methods.
If the token is already stored securely and there is no need to request it, it can be passed as initial configuration.
var egnyte = Egnyte.init("https://mydomain.egnyte.com", {
token: YOURAPITOKEN
});
If you want to set some defaults for all requests (like request timeout) you can pass them to the init function:
var egnyte = Egnyte.init("https://mydomain.egnyte.com", {
requestDefaults: {
timeout: 30000
}
});
Defaults are added to the set of options passed to xhr
(in browser) or request
(in node) module.
The API has limits for the number of queries a single user can make. If one of the users of your app performs too many actions, the API endpoint will return HTTP403
with the "Developer over QPS" error.
The SDK transparently handles user quota by default. All calls have a default retry policy - if the API responds with "Developer over QPS" error, a retry is scheduled to run after 1 second. A warning is logged to the browser's console to help spotting the problem.
API.manual.promiseRequest
and all the API.storage.*
etc. methods have a built-in mechanizm to delay calls that are made too fast, to avoid getting "Developer over QPS" errors at all. The delays are based on a declared QPS value. Most API keys have a 2 queries per second limit on users.
To set your query per second quota to something else than 2, initialize with QPS
option
var egnyte = Egnyte.init("https://mydomain.egnyte.com", {
key: YOURAPIKEY,
mobile: true,
QPS: 2
});
To entirely disable the quota handling set handleQuota
option to false
| Method | Arguments | Description | Restrictions |
|---|---|---|---|
| API.auth.isAuthorized | Returns boolean true if a token is present |
||
| API.auth.setToken | token |
Accepts a token string. New token overwrites the previous one | |
| API.auth.requestTokenReload | success_callback , denied_callback |
Reloads the page to perform authorization and calls the appropriate callback synchronously once the token is available or denied after reload. (see examples/request_token.html) | browser only |
| API.auth.requestTokenPopup | success_callback , denied_callback ,postmessage_sender |
Opens a new window or tab for the user. postmessage_sender is a fully qualified HTTPS URL to a copy of dist/resources/token.html . (see examples/request_token_popup.html) |
browser only |
| API.auth.requestTokenIframe | node , success_callback , denied_callback , path |
Performs authorization in an iframe instead of reloading the page. Iframe is appended to node . path argument is used as a redirect target for log-in prompt completion. path defaults to current window location. (see examples/request_token_iframe.html) |
browser only |
| API.auth.requestTokenIframeWithPrompt | node , success_callback , denied_callback , path |
Same as above, but will prompt for Egnyte domain address first. | browser only, not available in slim.js |
| API.auth.requestTokenByPassword | username , password |
Performs authorization using login and password provided by the user and resolves to the access token. Using this auth method requires switching your API key settings to be an "internal application", which is only available for Egnyte partners. (Contact us if you need that) | node.js only |
| API.auth.authorizeXHR | XHR object |
Adds authorization header to given XHR object | browser only |
| API.auth.getHeaders | Returns headers definition to add as headers to eg. jQuery.ajax options | ||
| API.auth.getToken | Returns the token string | ||
| API.auth.dropToken | Forgets the current token | ||
| API.auth.getUserInfo | Returns a promise that resolves to user info object |
API.auth.requestToken
method loads the log-in prompt in current window. Once the user accepts or denies access, current page is loaded again and the whole code on it runs again. This time API.auth.requestToken
will find the token as it was appended to URL and runs the success callback.
API.auth.requestTokenReload(function(){
//can work with API
},function(){
//request denied
});
API.auth.requestTokenPopup
method opens a window or tab with the log-in prompt. Once the user accepts or denies access, postmessage_sender
is loaded in the window and the token is transmited to our main window. postmessage_sender
must be a HTTPS URL pointing to a document, that calls API.auth._postTokenUp()
, like the token.html
file in dist/resources
.
API.auth.requestTokenPopup(
function(){
//can work with API
},
function(){
//request denied
},
"https://<IP_ADDRESS>:9999/dist/resources/token.html"
);
API.auth.requestTokenIframe
method appends an iframe to given node
and opens the log-in prompt in there. Once the user accepts or denies access, current page is loaded again in the iframe and the token is extracted from it. It is recommended to pass path
to API.auth.requestTokenIframe
to redirect to an empty page, not the current one. the path
should be an absolute path in the current domain (starting with /).
API.auth.requestTokenIframe(
document.body,
function(){
//can work with API
},
function(){
//request denied
},
"/empty.html"
);
If you pass a stored token to your new Egnyte instance and the token is invalid, you should initialize again and request a new token.
To ease the handling of this situation you can pass onInvalidToken
option containing a function that will be called instead of error callback whenever your acces token turns out invalid.
var egnyte = Egnyte.init("https://mydomain.egnyte.com", {
token: YOURAPITOKEN,
key: YOURAPIKEY,
mobile: true,
onInvalidToken: function(){
//try getting new
egnyte.API.auth.requestTokenPopup(
function(){
//can work with API
},
function(){
//request denied
},
"https://<IP_ADDRESS>:9999/dist/resources/token.html"
);
//get the app working again
}
});
| Method | Arguments | Description |
|---|---|---|
| API.manual.getEndpoint | Returns the public API endpoint root URL | |
| API.manual.sendRequest | options , callback |
Sends an authorized request and calls the callback when finished (see examples below); Retries the call if server responds with "Developer over QPS"; Returns the raw XHR object in the browser and a request object in node.js |
| API.manual.promiseRequest | options |
Performs the same task as sendRequest but returns a simple promise instead of calling the callback (see examples below); Automatically delays a call if it could go over QPS quota; Retries the call if server responds with "Developer over QPS" |
Request options
| Name | Type | Description |
|---|---|---|
| url | String | The URL to query |
| params | Map | Set of query params, optional |
| sync | Boolean | Make a synchronous call, optional |
| method | String | Request method, optional, defaults to GET |
| timeout | Number | Set a timeout for the request, optional, defaults to 5s |
| headers | Map | Request headers, optional |
| body | String | Body of the request for POST and PUT, optional |
| json | Object | JSON serializable object to send as body, adds correct content-type too, optional |
Examples
egnyte.API.manual.sendRequest({
url:"https://..." //full URL address
params:{ //query params to be added after the ? at the end of url
"queryparam":"param-value"
},
headers:{}, //any headers to add to the query, Authorization header is added to this set by default
method: "POST",
body: "some content"
}, function (error, response, body) {
if(error === null){
//response is the XHR object
//body contains response JSON converted to object
}else{
//handle the error or rethrow
}
});
egnyte.API.manual.promiseRequest({
...
}).then(function (response, body) {
//response is the XHR object
//body contains response JSON converted to object
}).fail(function(error, response, body){
//handle the error
});
egnyte.API.manual.promiseRequest({
...
}).then(function (response, body) {
//response is the XHR object
//body contains response JSON converted to object
},function(error, response, body){
//handle the error
});
Anywhere a response object is returned (except IE8/9, see Legacy support page) it is an XMLHttpRequest object extended with statusCode
field and headers
object (so you don't have to query headers individually)
All API helpers return promises.
| Method | Arguments | Description | Restrictions |
|---|---|---|---|
| API.storage.identify(...).exists | entryID(optional) |
Resolves to true if file exists and false if it doesn't, rethrows errors if different than 404. entryID is the identifier of the version of the file if the operation should be performed on a version |
|
| API.storage.identify(...).get | Resolves to file or folder definition object. | ||
| API.storage.identify(...).download | entryID(optional) , isBinary |
Resolves to XHR object for the download file content query, from which response can be extracted and interpreted as needed. xhr.responseType is set to arraybuffer if isBinary is true (to get the gist of what this method can do take a look at examples/filepicker_usecase.html ). entryID is the identifier of the version of the file if the operation should be performed on a version |
browser only |
| API.storage.identify(...).getFileStream | entryID(optional) |
Resolves to the response object of the API, with a paused data stream. This method also handles queueing and QPS limits transparently. | node.js only |
| API.storage.identify(...).createFolder | Creates a folder at the given path, resolves to {path:"..."} or fails if folder can't be created (also if it already exists) |
||
| API.storage.identify(...).storeFile | Blob or Stream , mimeType (optional) , size (optional) |
Uploads a file and stores at the given path, resolves to {path:"...",id:"<version ID>"} (see below for details on Blob). In the browser it accepts Blob, in node.js a stream should be passed as a second argument. |
size argument only works in node.js |
| API.storage.identify(...).streamToChunks | Stream , mimeType (optional) , chunksize(optional) |
splits a stream in chunks and uses chunked upload to send it to Egnyte. Accepts path, stream, optional mime type and optional chunk size. Chunk size defaults to 10KB but it can be as much as 100MB if you know the file's big. Resolves to the same signature as storeFile and fails if any chunk failed to upload |
node.js only |
| API.storage.identify(...).move | new path |
Moves a file or folder to new path, resolves to {path:"...", oldPath:"..."} |
|
| API.storage.identify(...).copy | new path |
Copies a file or folder to new path, resolves to {path:"...", oldPath:"..."} |
|
| API.storage.identify(...).rename | new path |
alias for move | |
| API.storage.identify(...).remove | entryID(optional) |
Deletes a file or folder. entryID is the identifier of the version of the file if the operation should be performed on a version |
|
| API.storage.identify(...).removeFileVersion | version_ID |
Deletes a version of a file, throws if version not provided (can't delete the whole file accidentally) | |
| API.storage.identify(...).lock | previous token , timeout |
Locks a file, resolves to {path: "...", timeout:seconds,lock_token:"..."} , timeout defaults to 3600, previous token has to be provided if file is already locked and the lock is supposed to be renewed or overriden |
|
| API.storage.identify(...).lock | lock body |
Different syntax for locking - allows setting body fields directly lock_token, lock_timeout, collaboration |
|
| API.storage.identify(...).unlock | token |
Unlocks a file if the token is the one with which the lock was claimed |
| Method | Argument |
|---|---|
| API.*.path | full path to file, starting with / |
| API.*.fileId | group_id of the file |
| API.*.folderId | folder_id of the folder |
var fileStream = fs.createReadStream('sample.txt')
egnyte.API.storage.path(pathFromRoot).storeFile(fileStream, "text/plain", 1105)
.then(function(filemeta){
//
})
If the API responds with an error that you cannot store an empty file, it means you have to provide the size
argument.
Storing a file requires a Blob
compatible object. It can be created manually using the browser's Blob
constructor or BlobBuilder
. A file input in a form can also produce a blob: fileInputNode.files[0]
is a File
object, which actually extends Blob
.
To aid working with blobs cross-browser we recommend https://github.com/eligrey/Blob.js (a copy available in this repo in src/vendor/blob.js)
$(".myForm").on("submit",function(){
var file = $("input.avatarfile")[0].files[0]
egnyte.API.storage.path("/Private/mydata/avatar.png").storeFile(file, "image/png")
.then(function (response, body) {
//upload successful
},function(error, response, body){
//handle the error
});
return false;
});
The storeFile
method uses FormData
constructor; documentation and detailed browser support can be found here: https://developer.mozilla.org/en-US/docs/Web/API/FormData
It is possible to download a file to memory in modern browsers. A proof of concept of that can be found in examples/filepicker_usecase.html
In node.js getFileStream resolves to a paused stream that has to be manually resumed when you're ready to accept its data.
egnyte.API.storage.path(pathFromRoot).getFileStream()
.then(function(pausedResponse){
pausedResponse.pipe(whereverYouWant);
pausedResponse.resume(); //Be sure to resume the paused stream
});
All API helpers return promises.
| Method | Arguments | Description | Restrictions |
|---|---|---|---|
API.storage.path(path to file ).addNote |
note_text |
Adds a note on file, resolves to {id:"note-id"} |
|
API.storage.path(path to file ).listNotes |
query_params |
Resolves to an object with pagination options and notes field containing a list. You can pass query params to set offset, limit etc. (refer to public API docs) |
|
| API.storage.getNote | note_id |
Resolves to a note object. | |
| API.storage.removeNote | note_id |
Removes the note. |
In current Egnyte Public API version notes can be added only to files identified by path.
All API helpers return promises.
| Method | Arguments | Description |
|---|---|---|
| API.link.createLink | link_setup |
Creates a link, resolves to the new link description object |
| API.link.removeLink | link_ID |
Destroys the link of given id |
| API.link.listLink | link_ID |
Resolves to link description object |
| API.link.listLinks | filters |
Resolves to a list of links, narrows the list down by filters given |
| API.link.findOne | filters |
Resolves to a link description object of a link that matches the filters. (the result of listLink called on first of the ids returned by listLinks ) |
To create a link with API.link.createLink
method, a setup object is required.
| Name | Description | |
|---|---|---|
| path | required | full absolute path to the target file or folder. If target is a file then include the filename. |
| type | required | "file" or "folder" |
| accessibility | required | "anyone", "password", "domain", "recipients" |
| recipients | optional | list of recipients of the link (email addresses). Only required if the link will be sent via email by Egnyte. |
| send_email | optional | if True, send the link out via email. In this case, the recipients parameter must be specified. Defaults to false. |
| message | optional | personal message to be sent in link email. |
| copy_me | optional | if True, send a copy of the link message to the link creator. Only applies if send_email is True. Defaults to false. |
| notify | optional | if True send notification emails to link creator when link is accessed. Defaults to false. |
| link_to_current | optional | if True, link to the current version of the file. Otherwise link to latest version of file. Only applies to file links, not folder links. Defaults to false. |
| expiry_date | optional | the expiry date for the link. Date must be in the future. If expiry_date is specified then expiry_clicks cannot be set. |
| expiry_clicks | optional | the number of clicks the link is valid for. Value must be between 1 and 10, inclusive. If expiry_clicks is specified then expiry_date cannot be set. |
| add_file | optional | if True then the filename will be appended to the end of the link. Only applies to file links, not folder links. Defaults to false. |
accessibility options:
Example
egnyte.API.link.createLink({
path: "<file path>",
type: "file",
accessibility: "password"
}).then(function (newLink) {
newLink.links[0].id; //link ID, useful when listing or removing link
newLink.links[0].url; //the URL of your link
newLink.password; //autogenerated password to enter the link
});
Full link description example
{
"links": [{
"id": "yshJEeonvt",
"url": "https://acme.egnyte.com/h-s/20140528/yshJEeonvt",
"recipients": []
}],
"path": "/Private/acme/filename.png",
"type": "file",
"accessibility": "password",
"notify": false,
"password": "xi3awtc3ZphJ",
"link_to_current": false,
"creation_date": "2014-05-28",
"send_mail": false,
"copy_me": false
}
API.link.listLinks
and API.link.findOne
methods accept filters definition. All filters are optional.
| Name | Description |
|---|---|
| path | list links to this file or folder (full absolute path) |
| username | list links created by this user |
| created_before | list links created before this date |
| created_after | list links created after this date |
| type | show links of this type (“file” or “folder”) |
| accessibility | show links with this accessibility (“anyone”, “password”, “domain” or “recipients”) |
| offset | start at this link (0 = first link). If not specified, defaults to 0. |
| count | send this number of links. If not specified, all links will be sent. |
Example response to listLinks
{
"total_count": 10,
"offset": 5,
"count": 3,
"ids": ["47b774f66f344a67","56d35b2320d74948","426683f37dd64e41"]
}
All API helpers return promises.
All the methods below can be scoped to users or groups.
| Method | Arguments | Description |
|---|---|---|
| API.perms.users | users[] |
Returns API.perms instance scoped to a certain set of users. |
| API.perms.groups | groups[] |
Returns API.perms instance scoped to a certain set of groups. |
| API.perms.identify(...).allow | accessLevel |
Sets certain permissions on the given folder for the users/groups it's scoped to. Second argument is one of "None", "Viewer", "Editor", "Full", "Owner" |
| API.perms.identify(...).disallow | Sets permissions on the given folder to "None" for the users/groups it's scoped to. | |
| API.perms.identify(...).allowView | Sets permissions on the given folder to "Viewer" for the users/groups it's scoped to. | |
| API.perms.identify(...).allowEdit | Sets permissions on the given folder to "Editor" for the users/groups it's scoped to. | |
| API.perms.identify(...).allowFullAccess | Sets permissions on the given folder to "Full" for the users/groups it's scoped to. | |
| API.perms.identify(...).allowOwnership | Sets permissions on the given folder to "Owner" for the users/groups it's scoped to. | |
| API.perms.identify(...).getPerms | Resolves to a permissions object of the folder. If scoped to users/groups, only permissions relevant to them will be returned. |
| Method | Argument |
|---|---|
| API.*.path | full path to file, starting with / |
| API.*.folderId | folder_id of the folder |
Scoping to users and groups can be merged
egnyte.API.perms.users(["tommy","margaret"]).groups(["All Power Users"]).path("/Shared/marketing/events").allowEdit()
Scoping again will override the previous setting, so the example below will only set permissions for "andy".
egnyte.API.perms.users(["tommy","margaret"]).users(["andy"]).path("/Shared/marketing/events").allowEdit()
All permissions for folder:
egnyte.API.perms.path("/Shared/marketing/events").getPerms()
Returns
{
"users": [{
"subject": "admin",
"permission": "Owner"
}, {
"subject": "tommy",
"permission": "Editor"
}, {
"subject": "margaret",
"permission": "Editor"
}],
"groups": [{
"subject": "All Power Users",
"permission": "Editor"
}]
}
Filtered permissions information:
egnyte.API.perms.users(["tommy"]).path("/Shared/marketing/events").getPerms()
Returns
{
"users": [{
"subject": "tommy",
"permission": "Editor"
}],
"groups": []
}
All API helpers return promises.
| Method | Arguments | Description |
|---|---|---|
| API.userPerms.identify(...).get | username |
Resolves to effective permissions for given user. username defaults to the user making the request. |
| Method | Argument |
|---|---|
| API.*.path | full path to folder, starting with / |
| API.*.folderId | folder_id of the folder |
egnyte.API.userPerms.path("/Shared/Documents").get()
Returns
{
"permission": "Full"
}
All API helpers return promises.
| Method | Arguments | Description |
|---|---|---|
| API.user.getByName | user name |
Resolves to complete user metadata object |
| API.user.getById | user id |
Resolves to complete user metadata object |
| Method | Arguments | Description |
|---|---|---|
| API.search.getResults | query text |
Resolves to a helper object for fetching search results |
| API.search.query | query text , page number |
Low level search query function, resolves to a single body of the search response. Is used internally in getResults |
| API.search.itemsPerPage | number |
Updates the number of items per page for search. default: 10 |
Results object:
| Name | Description |
|---|---|
| totalCount | Number of all results |
| totalPages | Number of available pages with results |
| sample | First page of results (array of search results you'd get from calling .page(0) |
page(num ) |
method to get a certain page of results; resolves to an array of results |
Pages are numbered starting at 0.
| Method | Arguments | Description |
|---|---|---|
| API.events.listen | listenerConfiguration |
Polls the Events API for new events and emits them according to configuration. Resolves to an object with a single stop method that stops getting more events. |
| API.events.getCursor | Resolves to the latest event id | |
| API.events.getUpdate | updateOptions |
Makes a single request for a list of events and resolves to the response. getUpdate is used internally by listen . |
listenerConfiguration:
| Name | Description | |
|---|---|---|
| start | event id - get events that happened after that id. Fails if event is too old (.listen promise gets rejected). If not set, it will get only the events that happen since the moment of invocation. | |
| interval | miliseconds between making requests for events. minimum possible value is 2000, defaults to 30000 | |
| emit | required | a function to call when an event is received. the function accepts one argument - event data object. |
| error | function to call when fetching events fails | |
| current | function to call with the latest event id discovered | |
| heartbeat | a debug callback to be called whenever a request to events API is made. |
updateOptions:
| Name | Description | |
|---|---|---|
| start | required | event id - get events that happened after that id. Fails if event is too old (promise gets rejected). |
| emit | a function to call for every event in the batch. the function accepts one argument - event data object. Optional, you can decide to use the raw output | |
| count | number of events to fetch. Maximum value is 100 |
| Method | Arguments | Description |
|---|---|---|
| API.events.notMy | "user" (optional) |
Sets up filtering to ignore events caused by the same app that is querying events. If "user" is passed as first argument, only events caused by current user of the app are ignored. Returns API.events , so it's chainable |
| API.events.filter | filterDefinition |
Sets up filtering to only return events matching the definition. Can filter by folder path or event type or both. Returns API.events , so it's chainable |
filterDefinition:
{
folder: "/folder/path",
type: "file_system" or "note"
}
Example:
egnyte.API.events.notMy().filter({
folder: "/Shared/marketing/events"
}).listen({
emit: function(eventData){
//process event
},
interval: 10000,
heartbeat: function(){
console.log(".");
}
}).then(function(polling){
//call polling.stop() to turn the listener off
})
All errors are returned in common format of a JavaScript error enhanced with additional fields
| Name | Description |
|---|---|
| statusCode | HTTP status code if error comes from the server. 0 if request failed before being sent. undefined if error occured in the source of this SDK |
| message | readable error message text |
| response | If the query happened, error.response is the xhr response object |
| body | If the query happened, error.body contains the body of the response |
The "Developer over QPS" error is not returned at all, instead a call is repeated when appropriate.
Egnyte Public API accepts a X-Egnyte-Act-As
header that can be set to perform an action on behalf of another user (if you are an admin).
Every method call to egnyte.API.*
can be preceded by impersonation like so:
egnyte.API.link.impersonate({username:"username"}).createLink(...
egnyte.API.link.impersonate({email:"username@example.com"}).createLink(...
You can store an impersonated facade to use multiple times or pass it along to other components that don't need to have access to username, but need to perform on behalf of that user.
var impersonatedStorage = egnyte.API.storage.impersonate({username:"username"});
impersonatedStorage.path("/path...").exists();
You can provide a request function as the httpRequest
option.
It has to accept an options
object and a result callback function(error, responseObject, responseBody)
It should be compatible with npm module called xhr.


WFC - Win32 Foundation Classes
This is Release 73 2004-07-15
There have been
hits on this page since 1996-01-19.
Click
here
to download the latest version of WFC.
Return to Sam's Home Page
Click
here
to return to WFC homepage.


Student at San Francisco State University
I am Sirisha, currently pursuing my masters at SFSU. I have 3 years of experience in software industry and interested to learn new technologies. My areas of interest include:
I have completed my undergraduation in Computer Science from Jawaharlal Nehru Technological University in India. Also have done many certifications and received awards for paper presentations
I am good at programming languages like C, C++, Java, HTML and CSS. Also have worked with various tools in my job experience.


Clear Save Data
Keyboard controls during sorting: 🠜 (pick left) - 🠝 (tie) - 🠟 (undo) - 🠞 (pick right) - S (save progress) - N/X (⏵|⏸ Left) - M/C (⏵|⏸ Right).
Before sorting: Enter (start sorting) - L (load progress).
Hover over the Romaji Name to get the Kanji Name.
Tap on the Romaji Name to get the Kanji Name.


The radio component is a SKY UX-themed replacement for the HTML input
element of type="radio"
. The value that is selected is driven through the ngModel
attribute specified on the input element.
Specifies a label for the radio button.
Specifies the ID of the label for the radio button.
Indicates whether the radio button is disabled.
Specifies ...
Specifies ...
Specifies ...
Specifies ...


|
My Project
|
Render primitives using the specified material. Contains vertex buffer, index buffer (optional) and material data. More...
#include <draw_command.hpp>
Public Member Functions | |
| draw_command () | |
| ~draw_command () | |
| draw_command (const draw_command &rhs) | |
| draw_command & | operator= (const draw_command &rhs) |
| draw_command (draw_command &&rhs) noexcept | |
| draw_command & | operator= (draw_command &&rhs) noexcept |
| void | accept (graphics_visitor &visitor) override |
| Accept a graphics_visitor object. Invoke this command using the graphics_visitor. More... | |
| draw_command & | set_index_buffer_offset (uint32_t offset) |
| Set the index buffer offset. More... | |
| draw_command & | set_index_type (index_type type) |
| Set the index type to use. More... | |
| draw_command & | set_primitive_type (primitive_type prim_type) |
| Set the primitive type you want to use. More... | |
| draw_command & | set_index_count (uint32_t count) |
| Set the index count you want to use. More... | |
| draw_command & | set_first_vertex (uint32_t first) |
| Set the first vertex to use. More... | |
| draw_command & | set_vertex_count (uint32_t count) |
| Set the number of vertices in the vertex buffer. More... | |
| draw_command & | set_material (material_handle material) |
| Set the material to use when rendering. More... | |
| draw_command & | set_vertex_buffer (vertex_buffer_handle vertex_buffer) |
| Set the vertex buffer you want to use. More... | |
| draw_command & | set_index_buffer (index_buffer_handle index_buffer) |
| Set the index buffer you want to use. More... | |
| Public Member Functions inherited from moka::graphics_command | |
| virtual | ~graphics_command ()=default |
Public Attributes | |
| material_handle | material = {std::numeric_limits<uint16_t>::max()} |
| vertex_buffer_handle | vertex_buffer |
| uint32_t | vertex_count = 0 |
| uint32_t | first_vertex |
| index_buffer_handle | index_buffer |
| uint32_t | index_count |
| index_type | idx_type = index_type::uint16 |
| uint32_t | index_buffer_offset |
| primitive_type | prim_type |
Render primitives using the specified material. Contains vertex buffer, index buffer (optional) and material data.
| moka::draw_command::draw_command | ( | ) |
| moka::draw_command::~draw_command | ( | ) |
| moka::draw_command::draw_command | ( | const draw_command & | rhs | ) |
|
noexcept |
|
overridevirtual |
Accept a graphics_visitor object. Invoke this command using the graphics_visitor.
| visitor | A graphics_visitor object. |
Implements moka::graphics_command.
| draw_command& moka::draw_command::operator= | ( | const draw_command & | rhs | ) |
|
noexcept |
| draw_command& moka::draw_command::set_first_vertex | ( | uint32_t | first | ) |
Set the first vertex to use.
| first | The first vertex to use. |
| draw_command& moka::draw_command::set_index_buffer | ( | index_buffer_handle | index_buffer | ) |
Set the index buffer you want to use.
| index_buffer | The index buffer you want to use. |
| draw_command& moka::draw_command::set_index_buffer_offset | ( | uint32_t | offset | ) |
Set the index buffer offset.
| offset | The index buffer offset. |
| draw_command& moka::draw_command::set_index_count | ( | uint32_t | count | ) |
Set the index count you want to use.
| count | The index count you want to use. |
| draw_command& moka::draw_command::set_index_type | ( | index_type | type | ) |
Set the index type to use.
| type | The index type you want to use. |
| draw_command& moka::draw_command::set_material | ( | material_handle | material | ) |
Set the material to use when rendering.
| material | The material to use when rendering. |
| draw_command& moka::draw_command::set_primitive_type | ( | primitive_type | prim_type | ) |
Set the primitive type you want to use.
| prim_type | Set the primitive type you want to use. |
| draw_command& moka::draw_command::set_vertex_buffer | ( | vertex_buffer_handle | vertex_buffer | ) |
Set the vertex buffer you want to use.
| vertex_buffer | The vertex buffer you want to use. |
| draw_command& moka::draw_command::set_vertex_count | ( | uint32_t | count | ) |
Set the number of vertices in the vertex buffer.
| count | The number of vertices in the vertex buffer. |
| uint32_t moka::draw_command::first_vertex |
Specifies the starting index in the enabled arrays.
| index_type moka::draw_command::idx_type = index_type::uint16 |
Specifies the type of the values in the index buffer.
| index_buffer_handle moka::draw_command::index_buffer |
The index buffer that should be used.
| uint32_t moka::draw_command::index_buffer_offset |
Specifies the offset to the location where the indices are stored.
| uint32_t moka::draw_command::index_count |
Specifies a pointer to the location where the indices are stored.
| material_handle moka::draw_command::material = {std::numeric_limits<uint16_t>::max()} |
The material that should be use for rendering.
| primitive_type moka::draw_command::prim_type |
Specifies what kind of primitives to render.
| vertex_buffer_handle moka::draw_command::vertex_buffer |
The vertex buffer that should be used.
| uint32_t moka::draw_command::vertex_count = 0 |
The number of vertices to be rendered.


I am a highly motivated software developer student. Currently, looking for 8 months term Co-op employment as a Software Developer. I've got experience working in different fields that has involved all of my interpersonal skills and best development techniques.
GPA: 3.5
Startup that aims to help prevent mental and emotional disorders.
Cross platform online multiplayer game.
Secure Internet Messenger.
Apart from being a software developer, I enjoy a lot of my time being outdoors. Whenever I have a chance, I go out to the parks around me or go biking to discover the area I live in.
Sport is also important part of my life that makes me feel better and improves my development productivity. I used to play different kinds of sport such as Gymnastics, Boxing, Athletics, Weightlifting, Ultimate Frisbee, Swimming, and, now, I'm doing Rock Climbing and Chess.
However, most of my time I'm spending reading and discovering something new from Physics, Biology, AI Development, etc... Some of the most interesting topics for me are World History and Politics. The special interest is Philosophy streams of XIX-XX centuries; I hope that the philosophical understanding of the world around and inside could help a lot in high level development. As an entertainment, I learn and discover "The Elder Scrolls" fantasy universe, read fiction books, and TRYING to learn languages.
A good amount of my free time is spent for learning new technologies that went out recently or going in depth of the tools, languages, and technologies I use to understand all the principles and use them more efficiently to improve quality of my code and the logic in my programs.


Merge your branch locally, delete the branch and pull from upstream.
Once you don't need branches anymore you can delete them locally and remotely. This is helpful so that you don't end up with a pile of old branches.
Your pull request has been merged! Your branch was merged into the 'gh-pages' branch of the original on GitHub. You can merge your branch locally, too.
First, move into the branch you want to merge into—in this case, the branch 'gh-pages'.
git checkout gh-pages
Now tell Git what branch you want to merge in—in this case, your feature branch that begins with "add-".
git merge <BRANCHNAME>
Tidy up by deleting your feature branch. Now that it has been merged you don't really need it around.
git branch -d <BRANCHNAME>
You can also delete the branch from your remote on GitHub:
git push <REMOTENAME> --delete <BRANCHNAME>
And last but not least, the original has changed since your pull request was merged—Reporobot added your name to the website! If you pull in these changes from upstream you'll be up to date and have that version too. You can actually see it live as well at: yourusername.github.io/patchwork.
To pull from the original upstream:
git pull upstream gh-pages
You've created local repositories, remote repositories, worked with a collaborator, pushed, pulled and joined the millions of others developing and enriching open source!
Visit jlord.github.io/patchwork to see your name incorporated! Looking to keep going? Checkout the What Next section on the resources page in this app.
git merge <BRANCHNAME>
git checkout <BRANCHNAME>
git branch -d <BRANCHNAME>
git push <REMOTENAME> --delete <BRANCHNAME>
git pull <REMOTENAME> <BRANCHNAME>


08/12/2009 10:02:46 ¶ ● On Leadership Report down, not up. Change direction, don’t ask someone else to.


001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.commons.configuration2.builder; 018 019import java.util.Map; 020 021import org.apache.commons.configuration2.FileBasedConfiguration; 022import org.apache.commons.configuration2.ex.ConfigurationException; 023import org.apache.commons.configuration2.io.FileHandler; 024import org.apache.commons.configuration2.reloading.ReloadingController; 025import org.apache.commons.configuration2.reloading.ReloadingControllerSupport; 026import org.apache.commons.configuration2.reloading.ReloadingDetector; 027 028/** 029 *
 030 * A specialized {@code ConfigurationBuilder} implementation which can handle configurations read from a 031 * {@link FileHandler} and supports reloading. 032 *
 033 *
 034 * This builder class exposes a {@link ReloadingController} object controlling reload operations on the file-based 035 * configuration produced as result object. For the {@code FileHandler} defining the location of the configuration a 036 * configurable {@link ReloadingDetector} is created and associated with the controller. So changes on the source file 037 * can be detected. When ever such a change occurs, the result object of this builder is reset. This means that the next 038 * time {@code getConfiguration()} is called a new {@code Configuration} object is created which is loaded from the 039 * modified file. 040 *
 041 *
 042 * Client code interested in notifications can register a listener at this builder to receive reset events. When such an 043 * event is received the new result object can be requested. This way client applications can be sure to work with an 044 * up-to-date configuration. It is also possible to register a listener directly at the {@code ReloadingController}. 045 *
 046 *
 047 * This builder does not actively trigger the {@code ReloadingController} to perform a reload check. This has to be done 048 * by an external component, e.g. a timer. 049 *
 050 * 051 * @since 2.0 052 * @param <T> the concrete type of {@code Configuration} objects created by this builder 053 */ 054public class ReloadingFileBasedConfigurationBuilder<T extends FileBasedConfiguration> extends FileBasedConfigurationBuilder<T> 055 implements ReloadingControllerSupport { 056 /** The default factory for creating reloading detector objects. */ 057 private static final ReloadingDetectorFactory DEFAULT_DETECTOR_FACTORY = new DefaultReloadingDetectorFactory(); 058 059 /** The reloading controller associated with this object. */ 060 private final ReloadingController reloadingController; 061 062 /** 063 * The reloading detector which does the actual reload check for the current result object. A new instance is created 064 * whenever a new result object (and thus a new current file handler) becomes available. The field must be volatile 065 * because it is accessed by the reloading controller probably from within another thread. 066 */ 067 private volatile ReloadingDetector resultReloadingDetector; 068 069 /** 070 * Creates a new instance of {@code ReloadingFileBasedConfigurationBuilder} which produces result objects of the 071 * specified class and sets initialization parameters. 072 * 073 * @param resCls the result class (must not be null 074 * @param params a map with initialization parameters 075 * @throws IllegalArgumentException if the result class is null 076 */ 077 public ReloadingFileBasedConfigurationBuilder(final Class<? extends T> resCls, final Map<String, Object> params) { 078 super(resCls, params); 079 reloadingController = createReloadingController(); 080 } 081 082 /** 083 * Creates a new instance of {@code ReloadingFileBasedConfigurationBuilder} which produces result objects of the 084 * specified class and sets initialization parameters and the allowFailOnInit flag. 085 * 086 * @param resCls the result class (must not be null 087 * @param params a map with initialization parameters 088 * @param allowFailOnInit the allowFailOnInit flag 089 * @throws IllegalArgumentException if the result class is null 090 */ 091 public ReloadingFileBasedConfigurationBuilder(final Class<? extends T> resCls, final Map<String, Object> params, final boolean allowFailOnInit) { 092 super(resCls, params, allowFailOnInit); 093 reloadingController = createReloadingController(); 094 } 095 096 /** 097 * Creates a new instance of {@code ReloadingFileBasedConfigurationBuilder} which produces result objects of the 098 * specified class. 099 * 100 * @param resCls the result class (must not be null 101 * @throws IllegalArgumentException if the result class is null 102 */ 103 public ReloadingFileBasedConfigurationBuilder(final Class<? extends T> resCls) { 104 super(resCls); 105 reloadingController = createReloadingController(); 106 } 107 108 /** 109 * Returns the {@code ReloadingController} associated with this builder. This controller is directly created. However, 110 * it becomes active (i.e. associated with a meaningful reloading detector) not before a result object was created. 111 * 112 * @return the {@code ReloadingController} 113 */ 114 @Override 115 public ReloadingController getReloadingController() { 116 return reloadingController; 117 } 118 119 /** 120 * {@inheritDoc} This method is overridden here to change the result type. 121 */ 122 @Override 123 public ReloadingFileBasedConfigurationBuilder<T> configure(final BuilderParameters... params) { 124 super.configure(params); 125 return this; 126 } 127 128 /** 129 * Creates a {@code ReloadingDetector} which monitors the passed in {@code FileHandler}. This method is called each time 130 * a new result object is created with the current {@code FileHandler}. This implementation checks whether a 131 * {@code ReloadingDetectorFactory} is specified in the current parameters. If this is the case, it is invoked. 132 * Otherwise, a default factory is used to create a {@code FileHandlerReloadingDetector} object. Note: This method is 133 * called from a synchronized block. 134 * 135 * @param handler the current {@code FileHandler} 136 * @param fbparams the object with parameters related to file-based builders 137 * @return a {@code ReloadingDetector} for this {@code FileHandler} 138 * @throws ConfigurationException if an error occurs 139 */ 140 protected ReloadingDetector createReloadingDetector(final FileHandler handler, final FileBasedBuilderParametersImpl fbparams) 141 throws ConfigurationException { 142 return fetchDetectorFactory(fbparams).createReloadingDetector(handler, fbparams); 143 } 144 145 /** 146 * {@inheritDoc} This implementation also takes care that a new {@code ReloadingDetector} for the new current 147 * {@code FileHandler} is created. Also, the reloading controller's reloading state has to be reset; after the creation 148 * of a new result object changes in the underlying configuration source have to be monitored again. 149 */ 150 @Override 151 protected void initFileHandler(final FileHandler handler) throws ConfigurationException { 152 super.initFileHandler(handler); 153 154 resultReloadingDetector = createReloadingDetector(handler, FileBasedBuilderParametersImpl.fromParameters(getParameters(), true)); 155 } 156 157 /** 158 * Creates the {@code ReloadingController} associated with this object. The controller is assigned a specialized 159 * reloading detector which delegates to the detector for the current result object. ( 160 * {@code FileHandlerReloadingDetector} does not support changing the file handler, and {@code ReloadingController} does 161 * not support changing the reloading detector; therefore, this level of indirection is needed to change the monitored 162 * file dynamically.) 163 * 164 * @return the new {@code ReloadingController} 165 */ 166 private ReloadingController createReloadingController() { 167 final ReloadingDetector ctrlDetector = createReloadingDetectorForController(); 168 final ReloadingController ctrl = new ReloadingController(ctrlDetector); 169 connectToReloadingController(ctrl); 170 return ctrl; 171 } 172 173 /** 174 * Creates a {@code ReloadingDetector} wrapper to be passed to the associated {@code ReloadingController}. This detector 175 * wrapper simply delegates to the current {@code ReloadingDetector} if it is available. 176 * 177 * @return the wrapper {@code ReloadingDetector} 178 */ 179 private ReloadingDetector createReloadingDetectorForController() { 180 return new ReloadingDetector() { 181 @Override 182 public void reloadingPerformed() { 183 final ReloadingDetector detector = resultReloadingDetector; 184 if (detector != null) { 185 detector.reloadingPerformed(); 186 } 187 } 188 189 @Override 190 public boolean isReloadingRequired() { 191 final ReloadingDetector detector = resultReloadingDetector; 192 return detector != null && detector.isReloadingRequired(); 193 } 194 }; 195 } 196 197 /** 198 * Returns a {@code ReloadingDetectorFactory} either from the passed in parameters or a default factory. 199 * 200 * @param params the current parameters object 201 * @return the {@code ReloadingDetectorFactory} to be used 202 */ 203 private static ReloadingDetectorFactory fetchDetectorFactory(final FileBasedBuilderParametersImpl params) { 204 final ReloadingDetectorFactory factory = params.getReloadingDetectorFactory(); 205 return factory != null ? factory : DEFAULT_DETECTOR_FACTORY; 206 } 207}


Authenticated By - Anondo Hossain Rafi
This is a membership card of Gas-N-Go. This card will give more discount to our beloved consumers and Our consumers can get service easily by using this card and we always want to make our consumers happy.Thank You from Gas-N-Go.


class asIScriptArray { public: // Memory management int AddRef(); int Release(); // Array type int GetArrayTypeId(); // Elements int GetElementTypeId(); asUINT GetElementCount(); void * GetElementPointer(asUINT index); void Resize(asUINT size); int CopyFrom(asIScriptArray *other); };
int AddRef();
This method increases the internal reference counter of the object and returns the count. The returned value shouldn't be used for anything else but debugging.
Call AddRef() each time you assign a reference to a new variable.
The internal reference counter.
int Release();
Decreases the internal reference counter and returns the count. If the counter reaches 0 the object is deleted and the memory is freed.
After calling Release() don't forget to set your reference to 0 so that you don't mistakenly try to use the reference again.
The internal reference counter.
int GetArrayTypeId();
Returns the type id of the script array.
The type id.
int GetElementTypeId();
Use this method to determine the type of the elements and how to handle the pointer returned by GetElementPointer().
The type id of the elements.
asUINT GetElementCount();
Use this method to determine how many elements there are in the array.
The size of the array.
void *GetElementPointer(asUINT index);
The method returns a pointer to the memory location for the element. Use the type id for the element to determine the content of the pointer, and how to handle it.
index |
The zero based index of the element of interest. |
A pointer to the element, or null if out of range.
void Resize(asUINT size);
This method allows the application to resize the array.
size |
The new size of the array. |
int CopyFrom(asIScriptArray *other);
This method copies the contents of the other object to this one.
other |
A pointer to the other array object. |
A negative value on error.


Welcome. This is an in-progress re-design of the jQuery Mobile demos site.
Helpful articles and tutorials to get you up to speed.
Examples of how to customize and extend jQuery Mobile.
Common issues and questions, explained.


Photos of the day: November 25, 2019
MORE GALLERY
Photos of the day: November 25, 2019
Photos of the day: November 22, 2019
Photos of the day: November 21, 2019
Photos of the day: November 20, 2019
Photos of the day: November 19, 2019
Photos of the day: November 18, 2019
Photos of the day: November 12
Photos of the day: November 11, 2019
The worrying decrease in Uttarakhand’s rhododendrons


#!/usr/bin/env python """ Demonstrates the clipboard capabilities of pygame. """ import os import pygame from pygame.locals import * import pygame.scrap as scrap from pygame.compat import as_bytes BytesIO = pygame.compat.get_BytesIO() def usage (): print ("Press the 'g' key to get all of the current clipboard data") print ("Press the 'p' key to put a string into the clipboard") print ("Press the 'a' key to get a list of the currently available types") print ("Press the 'i' key to put an image into the clipboard") main_dir = os.path.split(os.path.abspath(__file__))[0] pygame.init () screen = pygame.display.set_mode ((200, 200)) c = pygame.time.Clock () going = True # Initialize the scrap module and use the clipboard mode. scrap.init () scrap.set_mode (SCRAP_CLIPBOARD) usage () while going: for e in pygame.event.get (): if e.type == QUIT or (e.type == KEYDOWN and e.key == K_ESCAPE): going = False elif e.type == KEYDOWN and e.key == K_g: # This means to look for data. print ("Getting the different clipboard data..") for t in scrap.get_types (): r = scrap.get (t) if r and len (r) > 500: print ("Type %s : (large %i byte buffer)" % (t, len(r))) elif r is None: print ("Type %s : None" % (t,)) else: print ("Type %s : '%s'" % (t, r.decode('ascii', 'ignore'))) if "image" in t: namehint = t.split("/")[1] if namehint in ['bmp', 'png', 'jpg']: f = BytesIO(r) loaded_surf = pygame.image.load(f, "." + namehint) screen.blit(loaded_surf, (0,0)) elif e.type == KEYDOWN and e.key == K_p: # Place some text into the selection. print ("Placing clipboard text.") scrap.put (SCRAP_TEXT, as_bytes("Hello. This is a message from scrap.")) elif e.type == KEYDOWN and e.key == K_a: # Get all available types. print ("Getting the available types from the clipboard.") types = scrap.get_types () print (types) if len (types) > 0: print ("Contains %s: %s" % (types[0], scrap.contains (types[0]))) print ("Contains _INVALID_: ", scrap.contains ("_INVALID_")) elif e.type == KEYDOWN and e.key == K_i: print ("Putting image into the clipboard.") scrap.set_mode (SCRAP_CLIPBOARD) fp = open (os.path.join(main_dir, 'data', 'liquid.bmp'), 'rb') buf = fp.read () scrap.put ("image/bmp", buf) fp.close () elif e.type in (KEYDOWN, MOUSEBUTTONDOWN): usage () pygame.display.flip() c.tick(40)


|
KeenMVC
0.1
A PHP MVC framework done right
|
Static Public Member Functions | |
| static | load () |
Protected Member Functions | |
| initialize () | |
Created by IntelliJ IDEA. Version 0.1 User: Chris Hansen (chris) Date: 1/28/14 Time: 2:09 PM Class @ivi king. orgSingleton
Singleton parent class to be extended by singleton classes.
|
abstractprotected |
initialize
Initializes the class as desired. While parameters are anticipated, they must have default values.
Reimplemented in Logger.
|
static |
load
Creates an instance of a singleton class, if necessary, and returns it.


Make Executable: run mkexe
to create an executable program.
mkexe
is normally not needed. The mkapp or mksys should be used to build an entire app or system of interacting apps to deploy to a target device.
mkexe
is only needed to build an executable program to copy to a target device and run outside of any app. This sometimes comes in handy to build:
ssh
orTo display usage, run
mkexe --help
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.


Margin trading
Happy customers
Research recommendations
Of trust and reliability
Buying and selling stocks has never been easier, letting you focus on meeting your trading goals. Take advantage of zero brokerage, Rs.20 per order for Intraday, Futures and Options.
Enjoy built-in diversity when you invest in mutual funds. Pick from a huge variety of funds and invest in large lump sums or smaller steady amounts over time.
Trading app
Multiple investments
Market insights
Grow your investments
Terms & ConditionsInvestments in securities market are subject to market risks, read all the related documents carefully before investing. There is no assurance or guarantee that the investment objectives shall be achieved. IIFL does not guarantee any assured returns on the investments recommended herein.
Copyright © 2019 IIFL Securities Ltd. All rights Reserved.NSE SEBI Registration No. Capital Market:- INB231097537/ INF231097537/ INE231097537, CODE NO: 10975 & TC10975 CM No.: M51058 NSE SEBI Registration No. Derivatives:- INF 231097537 Clearing Member ICICI Bank Ltd. CM-C50006. BSE SEBI Registration No. Capital Market :-INB011097533 and INF011097533. Clearing No. 179 MCX Stock Exchange Limited - SEBI Registration No: INE 261097537 CODE NO. 22 | NCDEX Membership No. NCDEX-CO-04-00378 | MCX Membership No. 10470


{% extends "base.html" %} {% block title %} Home | {{ user.username }} {% endblock %} {% block content %}
Click below to invite someone to play with you.
Invite player
You have no invitations.


Document the potentially insecure services.
Services that are known to be insecure should not be running unless they are absolutely necessary for business. Document the business need for any insecure services to make sure they are absolutely indispensable.
Identify all services that are required for business operations. Identify which services are known to be insecure. Replace the insecure services with secure ones if possible. Add mitigation measures if possible and document them. If it is not possible to replace or remove insecure services, document the business need for them and the nature of known vulnerabilities.


Careers
Are you looking for a new challenge? Do you like to learn new technologies and apply them in creative ways to solve problems? Are you into working in small, dynamic teams developing applications that make a difference in the commercial and military worlds? Mile Two is looking for talented individuals. We’re looking for tinkerers, hackers, makers, programmers—whatever you call yourself. If you’re interested in joining, contact us. Some of the skills we’re looking for are:
Programming
- JavaScript
- Python
- Java
- Objective C
- Swift
- Go
- (That language you wrote up in your spare time which doesn’t really have a name)
Design
- Requirements Elicitation
- Wire-framing/Prototyping
Data Analysis
- Statistics
- Visualization
- High-Performance Computing
- Modeling
- Machine Learning
- Algorithm Development
Cognitive Systems Engineering
- Representation aiding
- Black Box Automation
Send resumes to Mile Two


Bing Cordova Sample
Connecting to Device
Device is Ready
Bing Search Tester (Ajax)
Service Operation
Web
Image
Query
Data
Collapse
Expand
Toggle
Toggle level1
Toggle level2


PRESUMED INNOCENT A film review by Mark R. Leeper Copyright 1990 Mark R. Leeper
Capsule review: A tightly plotted mystery that often threatens to leave loose ends and them very cleverly ties them all together. Harrison Ford again plays a cipher the audience is not intended to understand (but how many more such roles can he find?). Recommended for Agatha Christie fans. Rating: high +2.
At the risk of starting this review with a (very mild) spoiler, I will say that not until the final seconds of this film does one recognize what a clever and well-constructed plot this film really has. In the tradition of the best of Agatha Christie a tight and complex knot comes apart with one deceptively simple tug. The story of PRESUMED INNOCENT is not told in an Agatha Christie storybook style at all. Instead it is told with a harder and more realistic edge. The backdrop is the highly politicized office of the Prosecuting Attorney. Harrison Ford plays Rusty Sabich, an assistant to the Prosecuting Attorney investigating the rape-murder of an attractive and ambitious co-worker. But his investigation is cut short by a political reversal that not only leaves the investigation in another Prosecutor's hands, but also leaves Rusty the prime suspect for the crime.
The one dramatic problem with the film is that the audience is intentionally placed outside the action. Through the whole film, much more than is necessary or even realistic, Rusty Sabich is an enigma. The audience is desperate to hear his side of the accusation, but frustratingly it is kept from us. We get details about Sabich about as frequently and easily as the rival prosecutor does. And matters are not helped by having Harrison Ford in the role. Ford plays the role extremely blandly and woodenly. Even as a man going through some serious crises, it is very hard to believe Ford as a successful attorney and assistant to the Prosecutor.
Alan Pakula directed PRESUMED INNOCENT from a script that is very tightly written by Frank Pierson and Pakula. It builds its view of what actually happened a bit at a time, with a very slow, painstaking introduction of clues, much like Pakula's ALL THE PRESIDENT'S MEN. Brian Dennehy plays the Chief Prosecutor Raymond Horgan and honkers down in his role with his usual apparent ease. Raul Julia plays Sabich's attorney as just a bit dishonest. Bonnie Bedelia plays Rusty's wife and Greta Scaachi plays the victim whom we see a lot considering her short screen time.
PRESUMED INNOCENT is a real attention-holder that is solid plot and no filler. I rate it a high +2 on the -4 to +4 scale.
Mark R. Leeper att!mtgzx!leeper<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Adder Ridge was dicovered in 1867. It was discovered by a small family as they were digging a well. The cave was initially crawling with adders, hence the name. Since then, the cave has been cleared of the dangerous snakes and now
serves as a popular tourist attraction in Nayer county.
Beryl is a miner that has a high content of beryllium, a very rare metal. This makes beryl a raerly occuring mineral due to the scarcity of beryllium. Beryl is mostly found in granite, rhyolite, metamorphic rocks and in veins and cavities that have had hydrothermic activity.
Calcite is a rock-froming mineral. It is very common and is nearly found anywhere. It is the main mineral in limestone and marble, which make up a huge portion of the Earth's crust. They serve as largest deposit of carbon on our planet if you looked at them as a whole.
Agate is formed in volcanic rock. Namely, the pockets that were one filled with air in lava or magma. As the pockets cooled so did the solutions inside, mostly made up of sillica and impurites. As the solution cooled it would form alternating bands of sillica then impure minerals to create the striped pattern of an agate. The pattern continued until there are no impurites left of the entire solution has cooled.


SUDOERS.LDAP
Section: MAINTENANCE COMMANDS (5)Updated: July 12, 2010
Index Return to Main Contents
NAME
sudoers.ldap - sudo LDAP configurationDESCRIPTION
In addition to the standard sudoers file, sudo may be configured via LDAP. This can be especially useful for synchronizing sudoers in a large, distributed environment.Using LDAP for sudoers has several benefits:
- *
- sudo no longer needs to read sudoers in its entirety. When LDAP is used, there are only two or three LDAP queries per invocation. This makes it especially fast and particularly usable in LDAP environments.
- *
- sudo no longer exits if there is a typo in sudoers. It is not possible to load LDAP data into the server that does not conform to the sudoers schema, so proper syntax is guaranteed. It is still possible to have typos in a user or host name, but this will not prevent sudo from running.
- *
- It is possible to specify per-entry options that override the global default options. /etc/sudoers only supports default options and limited options associated with user/host/commands/aliases. The syntax is complicated and can be difficult for users to understand. Placing the options directly in the entry is more natural.
- *
- The visudo program is no longer needed. visudo provides locking and syntax checking of the /etc/sudoers file. Since LDAP updates are atomic, locking is no longer necessary. Because syntax is checked when the data is inserted into LDAP, there is no need for a specialized tool to check syntax.
Another major difference between LDAP and file-based sudoers is that in LDAP, sudo-specific Aliases are not supported.
For the most part, there is really no need for sudo-specific Aliases. Unix groups or user netgroups can be used in place of User_Aliases and RunasAliases. Host netgroups can be used in place of HostAliases. Since Unix groups and netgroups can also be stored in LDAP there is no real need for sudo-specific aliases.
Cmnd_Aliases are not really required either since it is possible to have multiple users listed in a sudoRole. Instead of defining a Cmnd_Alias that is referenced by multiple users, one can create a sudoRole that contains the commands and assign multiple users to it.
SUDOers LDAP container
The sudoers configuration is contained in the ou=SUDOersLDAP container.
Sudo first looks for the
cn=default
entry in the SUDOers container.
If found, the multi-valued
sudoOption
attribute is parsed in the
same manner as a global
Defaults
line in /etc/sudoers. In
the following example, the
SSH_AUTH_SOCK
variable will be preserved
in the environment for all users.
dn: cn=defaults,ou=SUDOers,dc=example,dc=com objectClass: top objectClass: sudoRole cn: defaults description: Default sudoOption's go here sudoOption: env_keep+=SSH_AUTH_SOCK
The equivalent of a sudoer in LDAP is a
sudoRole
. It consists of
the following components:
- sudoUser
- A user name, uid (prefixed with '#'), Unix group (prefixed with a '%') or user netgroup (prefixed with a '+').
- sudoHost
-
A host name, IP address, IP network, or host netgroup (prefixed
with a '+').
The special value
ALL
will match any host. - sudoCommand
-
A Unix command with optional command line arguments, potentially
including globbing characters (aka wild cards).
The special value
ALL
will match any command. If a command is prefixed with an exclamation point '!', the user will be prohibited from running that command. - sudoOption
-
Identical in function to the global options described above, but
specific to the
sudoRole
in which it resides. - sudoRunAsUser
-
A user name or uid (prefixed with '#') that commands may be run
as or a Unix group (prefixed with a '%') or user netgroup (prefixed
with a '+') that contains a list of users that commands may be
run as.
The special value
ALL
will match any user. - sudoRunAsGroup
-
A Unix group or gid (prefixed with '#') that commands may be run as.
The special value
ALL
will match any group.
Each component listed above should contain a single value, but there
may be multiple instances of each component type. A sudoRole must
contain at least one
sudoUser
,
sudoHost
and
sudoCommand
.
The following example allows users in group wheel to run any command on any host via sudo:
dn: cn=%wheel,ou=SUDOers,dc=example,dc=com objectClass: top objectClass: sudoRole cn: %wheel sudoUser: %wheel sudoHost: ALL sudoCommand: ALL
Anatomy of LDAP sudoers lookup
When looking up a sudoer using LDAP there are only two or three LDAP queries per invocation. The first query is to parse the global options. The second is to match against the user's name and the groups that the user belongs to. (The special ALL tag is matched in this query too.) If no match is returned for the user's name and groups, a third query returns all entries containing user netgroups and checks to see if the user belongs to any of them.Differences between LDAP and non-LDAP sudoers
There are some subtle differences in the way sudoers is handled once in LDAP. Probably the biggest is that according to the RFC, LDAP ordering is arbitrary and you cannot expect that Attributes and Entries are returned in any specific order. If there are conflicting command rules on an entry, the negative takes precedence.  For example, the following attributes do not behave the way one might expect.
# does not match all but joe # rather, does not match anyone sudoUser: !joe # does not match all but joe # rather, matches everyone including Joe sudoUser: ALL sudoUser: !joe # does not match all but web01 # rather, matches all hosts including web01 sudoHost: ALL sudoHost: !web01
Sudoers Schema
In order to use sudo's LDAP support, the sudo schema must be installed on your LDAP server. In addition, be sure to index the 'sudoUser' attribute.Three versions of the schema: one for OpenLDAP servers (schema.OpenLDAP), one for Netscape-derived servers (schema.iPlanet), and one for Microsoft Active Directory (schema.ActiveDirectory) may be found in the sudo distribution.
The schema for sudo in OpenLDAP form is included in the EXAMPLES section.
Configuring ldap.conf
Sudo reads the /etc/sudo-ldap.conf file for LDAP-specific configuration. Typically, this file is shared amongst different LDAP-aware clients. As such, most of the settings are not sudo-specific. Note that sudo parses /etc/sudo-ldap.conf itself and may support options that differ from those described in the ldap.conf(5) manual.Also note that on systems using the OpenLDAP libraries, default values specified in /etc/openldap/ldap.conf or the user's .ldaprc files are not used.
Only those options explicitly listed in /etc/sudo-ldap.conf that are supported by sudo are honored. Configuration options are listed below in upper case but are parsed in a case-independent manner.
- URI ldap[s]://[hostname[:port]] ...
-
Specifies a whitespace-delimited list of one or more URIs describing
the LDAP server(s) to connect to. The protocol may be either
ldap or ldaps, the latter being for servers that support TLS
(SSL) encryption. If no port is specified, the default is port
389 for
ldap://
or port 636 for ldaps://
. If no hostname is specified, sudo will connect to localhost. Multiple URI lines are treated identically to a URI line containing multiple entries. Only systems using the OpenSSL libraries support the mixing of ldap://
and ldaps://
URIs. The Netscape-derived libraries used on most commercial versions of Unix are only capable of supporting one or the other. - HOST name[:port] ...
- If no URI is specified, the HOST parameter specifies a whitespace-delimited list of LDAP servers to connect to. Each host may include an optional port separated by a colon (':'). The HOST parameter is deprecated in favor of the URI specification and is included for backwards compatibility.
- PORT port_number
- If no URI is specified, the PORT parameter specifies the default port to connect to on the LDAP server if a HOST parameter does not specify the port itself. If no PORT parameter is used, the default is port 389 for LDAP and port 636 for LDAP over TLS (SSL). The PORT parameter is deprecated in favor of the URI specification and is included for backwards compatibility.
- BIND_TIMELIMIT seconds
- The BIND_TIMELIMIT parameter specifies the amount of time, in seconds, to wait while trying to connect to an LDAP server. If multiple URIs or HOSTs are specified, this is the amount of time to wait before trying the next one in the list.
- TIMELIMIT seconds
- The TIMELIMIT parameter specifies the amount of time, in seconds, to wait for a response to an LDAP query.
- SUDOERS_BASE base
-
The base DN to use when performing sudo LDAP queries. Typically
this is of the form
ou=SUDOers,dc=example,dc=com
for the domain example.com
. Multiple SUDOERS_BASE lines may be specified, in which case they are queried in the order specified. - SUDOERS_DEBUG debug_level
- This sets the debug level for sudo LDAP queries. Debugging information is printed to the standard error. A value of 1 results in a moderate amount of debugging information. A value of 2 shows the results of the matches themselves. This parameter should not be set in a production environment as the extra information is likely to confuse users.
- BINDDN DN
- The BINDDN parameter specifies the identity, in the form of a Distinguished Name (DN), to use when performing LDAP operations. If not specified, LDAP operations are performed with an anonymous identity. By default, most LDAP servers will allow anonymous access.
- BINDPW secret
- The BINDPW parameter specifies the password to use when performing LDAP operations. This is typically used in conjunction with the BINDDN parameter.
- ROOTBINDDN DN
- The ROOTBINDDN parameter specifies the identity, in the form of a Distinguished Name (DN), to use when performing privileged LDAP operations, such as sudoers queries. The password corresponding to the identity should be stored in /etc/ldap.secret. If not specified, the BINDDN identity is used (if any).
- LDAP_VERSION number
- The version of the LDAP protocol to use when connecting to the server. The default value is protocol version 3.
- SSL on/true/yes/off/false/no
-
If the SSL parameter is set to
on
, true
or yes
, TLS (SSL) encryption is always used when communicating with the LDAP server. Typically, this involves connecting to the server on port 636 (ldaps). - SSL start_tls
-
If the SSL parameter is set to
start_tls
, the LDAP server connection is initiated normally and TLS encryption is begun before the bind credentials are sent. This has the advantage of not requiring a dedicated port for encrypted communications. This parameter is only supported by LDAP servers that honor the start_tls
extension, such as the OpenLDAP server. - TLS_CHECKPEER on/true/yes/off/false/no
- If enabled, TLS_CHECKPEER will cause the LDAP server's TLS certificated to be verified. If the server's TLS certificate cannot be verified (usually because it is signed by an unknown certificate authority), sudo will be unable to connect to it. If TLS_CHECKPEER is disabled, no check is made. Note that disabling the check creates an opportunity for man-in-the-middle attacks since the server's identity will not be authenticated. If possible, the CA's certificate should be installed locally so it can be verified.
- TLS_CACERT file name
- An alias for TLS_CACERTFILE.
- TLS_CACERTFILE file name
- The path to a certificate authority bundle which contains the certificates for all the Certificate Authorities the client knows to be valid, e.g. /etc/ssl/ca-bundle.pem. This option is only supported by the OpenLDAP libraries. Netscape-derived LDAP libraries use the same certificate database for CA and client certificates (see TLS_CERT).
- TLS_CACERTDIR directory
- Similar to TLS_CACERTFILE but instead of a file, it is a directory containing individual Certificate Authority certificates, e.g. /etc/ssl/certs. The directory specified by TLS_CACERTDIR is checked after TLS_CACERTFILE. This option is only supported by the OpenLDAP libraries.
- TLS_CERT file name
-
The path to a file containing the client certificate which can
be used to authenticate the client to the LDAP server.
The certificate type depends on the LDAP libraries used.
OpenLDAP:
tls_cert /etc/ssl/client_cert.pem
Netscape-derived:
tls_cert /var/ldap/cert7.db
When using Netscape-derived libraries, this file may also contain Certificate Authority certificates.
- TLS_KEY file name
-
The path to a file containing the private key which matches the
certificate specified by TLS_CERT. The private key must not be
password-protected. The key type depends on the LDAP libraries
used.
OpenLDAP:
tls_key /etc/ssl/client_key.pem
Netscape-derived:
tls_key /var/ldap/key3.db
- TLS_RANDFILE file name
- The TLS_RANDFILE parameter specifies the path to an entropy source for systems that lack a random device. It is generally used in conjunction with prngd or egd. This option is only supported by the OpenLDAP libraries.
- TLS_CIPHERS cipher list
- The TLS_CIPHERS parameter allows the administer to restrict which encryption algorithms may be used for TLS (SSL) connections. See the OpenSSL manual for a list of valid ciphers. This option is only supported by the OpenLDAP libraries.
- USE_SASL on/true/yes/off/false/no
- Enable USE_SASL for LDAP servers that support SASL authentication.
- SASL_AUTH_ID identity
- The SASL user name to use when connecting to the LDAP server. By default, sudo will use an anonymous connection.
- ROOTUSE_SASL on/true/yes/off/false/no
- Enable ROOTUSE_SASL to enable SASL authentication when connecting to an LDAP server from a privileged process, such as sudo.
- ROOTSASL_AUTH_ID identity
- The SASL user name to use when ROOTUSE_SASL is enabled.
- SASL_SECPROPS none/properties
- SASL security properties or none for no properties. See the SASL programmer's manual for details.
- KRB5_CCNAME file name
- The path to the Kerberos 5 credential cache to use when authenticating with the remote server.
See the
ldap.conf
entry in the EXAMPLES section.
Configuring nsswitch.conf
Unless it is disabled at build time, sudo consults the Name Service Switch file, /etc/nsswitch.conf, to specify the sudoers search order. Sudo looks for a line beginning with sudoers: and uses this to determine the search order. Note that sudo does not stop searching after the first match and later matches take precedence over earlier ones.
The following sources are recognized:
files read sudoers from F</etc/sudoers> ldap read sudoers from LDAP
In addition, the entry
[NOTFOUND=return]
will short-circuit the
search if the user was not found in the preceding source.
To consult LDAP first followed by the local sudoers file (if it exists), use:
sudoers: ldap files
The local sudoers file can be ignored completely by using:
sudoers: ldap
If the /etc/nsswitch.conf file is not present or there is no sudoers line, the following default is assumed:
sudoers: files
Note that /etc/nsswitch.conf is supported even when the underlying operating system does not use an nsswitch.conf file.
Configuring netsvc.conf
On AIX systems, the /etc/netsvc.conf file is consulted instead of /etc/nsswitch.conf. sudo simply treats netsvc.conf as a variant of nsswitch.conf; information in the previous section unrelated to the file format itself still applies.To consult LDAP first followed by the local sudoers file (if it exists), use:
sudoers = ldap, files
The local sudoers file can be ignored completely by using:
sudoers = ldap
To treat LDAP as authoratative and only use the local sudoers file if the user is not present in LDAP, use:
sudoers = ldap = auth, files
Note that in the above example, the
auth
qualfier only affects
user lookups; both LDAP and sudoers will be queried for
Defaults
entries.
If the /etc/netsvc.conf file is not present or there is no sudoers line, the following default is assumed:
sudoers = files
FILES
- /etc/sudo-ldap.conf
- LDAP configuration file
- /etc/nsswitch.conf
- determines sudoers source order
- /etc/netsvc.conf
- determines sudoers source order on AIX
EXAMPLES
Example ldap.conf
# Either specify one or more URIs or one or more host:port pairs. # If neither is specified sudo will default to localhost, port 389. # #host ldapserver #host ldapserver1 ldapserver2:390 # # Default port if host is specified without one, defaults to 389. #port 389 # # URI will override the host and port settings. uri ldap://ldapserver #uri ldaps://secureldapserver #uri ldaps://secureldapserver ldap://ldapserver # # The amount of time, in seconds, to wait while trying to connect to # an LDAP server. bind_timelimit 30 # # The amount of time, in seconds, to wait while performing an LDAP query. timelimit 30 # # Must be set or sudo will ignore LDAP; may be specified multiple times. sudoers_base ou=SUDOers,dc=example,dc=com # # verbose sudoers matching from ldap #sudoers_debug 2 # # optional proxy credentials #binddn <who to search as> #bindpw <password> #rootbinddn <who to search as, uses /etc/ldap.secret for bindpw> # # LDAP protocol version, defaults to 3 #ldap_version 3 # # Define if you want to use an encrypted LDAP connection. # Typically, you must also set the port to 636 (ldaps). #ssl on # # Define if you want to use port 389 and switch to # encryption before the bind credentials are sent. # Only supported by LDAP servers that support the start_tls # extension such as OpenLDAP. #ssl start_tls # # Additional TLS options follow that allow tweaking of the # SSL/TLS connection. # #tls_checkpeer yes # verify server SSL certificate #tls_checkpeer no # ignore server SSL certificate # # If you enable tls_checkpeer, specify either tls_cacertfile # or tls_cacertdir. Only supported when using OpenLDAP. # #tls_cacertfile /etc/certs/trusted_signers.pem #tls_cacertdir /etc/certs # # For systems that don't have /dev/random # use this along with PRNGD or EGD.pl to seed the # random number pool to generate cryptographic session keys. # Only supported when using OpenLDAP. # #tls_randfile /etc/egd-pool # # You may restrict which ciphers are used. Consult your SSL # documentation for which options go here. # Only supported when using OpenLDAP. # #tls_ciphers <cipher-list> # # Sudo can provide a client certificate when communicating to # the LDAP server. # Tips: # * Enable both lines at the same time. # * Do not password protect the key file. # * Ensure the keyfile is only readable by root. # # For OpenLDAP: #tls_cert /etc/certs/client_cert.pem #tls_key /etc/certs/client_key.pem # # For SunONE or iPlanet LDAP, tls_cert and tls_key may specify either # a directory, in which case the files in the directory must have the # default names (e.g. cert8.db and key4.db), or the path to the cert # and key files themselves. However, a bug in version 5.0 of the LDAP # SDK will prevent specific file names from working. For this reason # it is suggested that tls_cert and tls_key be set to a directory, # not a file name. # # The certificate database specified by tls_cert may contain CA certs # and/or the client's cert. If the client's cert is included, tls_key # should be specified as well. # For backward compatibility, "sslpath" may be used in place of tls_cert. #tls_cert /var/ldap #tls_key /var/ldap # # If using SASL authentication for LDAP (OpenSSL) # use_sasl yes # sasl_auth_id <SASL user name> # rootuse_sasl yes # rootsasl_auth_id <SASL user name for root access> # sasl_secprops none # krb5_ccname /etc/.ldapcache
Sudo schema for OpenLDAP
The following schema is in OpenLDAP format. Simply copy it to the schema directory (e.g. /etc/openldap/schema), add the proper includeline in slapd.conf
and restart slapd.
attributetype ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoUser' DESC 'User(s) who may run sudo' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX <IP_ADDRESS>.4.1.14<IP_ADDRESS>.26 ) attributetype ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoHost' DESC 'Host(s) who may run sudo' EQUALITY caseExactIA5Match SUBSTR caseExactIA5SubstringsMatch SYNTAX <IP_ADDRESS>.4.1.14<IP_ADDRESS>.26 ) attributetype ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoCommand' DESC 'Command(s) to be executed by sudo' EQUALITY caseExactIA5Match SYNTAX <IP_ADDRESS>.4.1.14<IP_ADDRESS>.26 ) attributetype ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoRunAs' DESC 'User(s) impersonated by sudo' EQUALITY caseExactIA5Match SYNTAX <IP_ADDRESS>.4.1.14<IP_ADDRESS>.26 ) attributetype ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoOption' DESC 'Options(s) followed by sudo' EQUALITY caseExactIA5Match SYNTAX <IP_ADDRESS>.4.1.14<IP_ADDRESS>.26 ) attributetype ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoRunAsUser' DESC 'User(s) impersonated by sudo' EQUALITY caseExactIA5Match SYNTAX <IP_ADDRESS>.4.1.14<IP_ADDRESS>.26 ) attributetype ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoRunAsGroup' DESC 'Group(s) impersonated by sudo' EQUALITY caseExactIA5Match SYNTAX <IP_ADDRESS>.4.1.14<IP_ADDRESS>.26 ) objectclass ( <IP_ADDRESS>.4.1.159<IP_ADDRESS> NAME 'sudoRole' SUP top STRUCTURAL DESC 'Sudoer Entries' MUST ( cn ) MAY ( sudoUser $ sudoHost $ sudoCommand $ sudoRunAs $ sudoRunAsUser $ sudoRunAsGroup $ sudoOption $ description ) )
SEE ALSO
ldap.conf(5), sudoers(5)CAVEATS
The way that sudoers is parsed differs between Note that there are differences in the way that LDAP-based sudoers is parsed compared to file-based sudoers. See the ``Differences between LDAP and non-LDAP sudoers'' section for more information.BUGS
If you feel you have found a bug in sudo, please submit a bug report at http://www.sudo.ws/sudo/bugs/SUPPORT
Limited free support is available via the sudo-users mailing list, see http://www.sudo.ws/mailman/listinfo/sudo-users to subscribe or search the archives.DISCLAIMER
sudo is provided ``AS IS'' and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. See the LICENSE file distributed with sudo or http://www.sudo.ws/sudo/license.html for complete details.
Index
This document was created by man2html, using the manual pages.
Time: 05:34:00 GMT, December 24, 2015


Great news for all students! 📖 In ONE DAY, we have 3 WORKSHOPS lead by experienced speakers 👨🏫 Simply choose one of these workshops you're interested to join.
Choose the workshop you wish to attend
Laravel web development
Mobile application development
Arduino
Food diet or allergy (Check all that apply):
Vegetarian
Vegan
Nuts


{% extends "base.html" %}
{#
Copyright (c) 2015-present, Philippine-California Advanced Research Institutes-
The Village Base Station Project (PCARI-VBTS). All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
#}
{% block content %}
Department of Computer Science
College of Engineering
University of the Philippines - Diliman
9818500 local 3305


{% extends "layout.html" %} {% block content %} {% include "includes/phase_banner_prototype.html" %} {% include "includes/backlink_examples.html" %} Please fix the following: Do they have a partner? Do they have a partner? This means a husband, wife or civil partner, or someone who lives with them and they share a personal life with, for example they may have common bills or share a bank account. Do they have a partner? Select an answer Yes No Continue {% endblock %}
This means a husband, wife or civil partner, or someone who lives with them and they share a personal life with, for example they may have common bills or share a bank account.


Aldi is selling Prosecco for just £3.99 a bottle
Rude not to...
by James Rodger, Max ChannonChristmas has just come early at Aldi - the budget supermarket has slashed the price of its Prosecco to just £3.99 a bottle.
Customers at the German budget supermarket, which has stores all over Devon and Cornwall, can pick up a bottle of Aldi's Prosecco for just £3.99 right now.
The supermarket cut the price of its festive fizz on Friday, December 6, so customers can now snap up a bottle of Costellore Prosecco Frizzante DOC at a bargain price, reports Birmingham Live.
It contains a 10.5% alcohol by volume (ABV) and comes in a 75cl bottle - which provides around six servings.
Whilst the Prosecco is currently sold out online, Aldi has more than 830 stores in the UK where you could potentially buy one - but we'd advise calling up your nearest store to check if it's available before making a trip.
The offer won't be around for long, though, so you'll need to be quick if you want to get your hands on a bottle in time for Christmas and New Year.


Recall Fan Page
Only for people who want the memory of a lifetime.
2.2412421
就立刻搭街坊立刻搭街坊立刻点击
1
1
1
1
1
1
1
姓名:
提交
姓名:
提交


Israeli vet builds site for travelers with disabilities
Travaxy website caters to people seeking accessible accommodations in Tel Aviv, New York, London, Amsterdam, Berlin and Barcelona, with more to come.
by Brian BlumLioz Amar had booked a hotel online for a trip to Barcelona. He specified that he needed a walk-in shower but when he got to the room, he discovered it only had a bathtub.
That might have been a disappointment but not a deal breaker for most people. But Amar is not most people. In 2011, he was wounded during his service in the Israel Defense Forces and, since the age of 21, requires a wheelchair to get around.
“I went to the front desk and I said I need a roll-in shower,” Amar tells ISRAEL21c. “The guy brings out a ‘certificate of accessibility’ and says that this is an acceptable room. I said to him, put that paper aside for a second and think of me.”
The problem, Amar explains, is that there are no standards. A hotel can advertise that it’s accessible but how high is the bed? Is there braille on the elevator buttons? If there’s a knock on the door, will the lamp blink?
Web-based booking forms rarely go into such detail. Calling every hotel in town before traveling would be an overwhelming task.
Amar set out to fix that by creating an online travel site for people with disabilities. He called the site Travaxy, a mashup of “travel” and “accessibility.”
Every hotel on the site is vetted using a digital survey. And Travaxy displays only direct flights; you don’t want to get stuck in a strange airport overnight because of a missed connection while your wheelchair is still in transit.
Travaxy hasn’t built its own booking engine. “We have the same connections as at Booking.com or Expedia. On top of that, we have our own layer of hotels,” Amar explains.
Travaxy goes above and beyond online booking in many cases. “A few days ago, a woman called and wanted to do a bar mitzvah trip for her son in Israel, but her husband was in an electric wheelchair. She couldn’t find a bus that could accommodate the wheelchair at a reasonable price. I said, ‘Let me try.’ After five minutes, I came back with an offer. She said, ‘Book it now.’ Afterward she wrote to me that everything was perfect, especially the way the driver gracefully handled the father’s needs.”
Booking via Travaxy also means if a disabled traveler runs into trouble – for example, his or her wheelchair breaks in transit (something Amar says “happens at one time to everyone with a disability”) – Travaxy can send a replacement part or an entire chair.
15% of world population is disabled
The difference between Travaxy and mainstream travel sites is apparent as soon as you try to book a flight or hotel.
You are asked what your disability is, whether you need assistance getting to the gate or disembarking, whether your wheelchair is manual or battery operated (and what kind of battery it has, important when checking the chair as luggage), and even the door width you require.
Can’t you make similar requests on popular travel booking sites? “They say you can do it,” Amar replies. “It’s politically correct to say so, but at the end of the day, it doesn’t really happen.”
Travaxy has a staff person confirm every order offline. “We make sure that the request is getting noticed. So far, we’ve had zero mistakes,” Amar reports after the first month of operation, when the number of bookings was still in the hundreds.
Amar is confident those numbers will grow. “Fifteen percent of the world population is disabled,” he claims. “That’s 516 million people in developed countries. And they travel two to four times more than the usual traveler.”
Moreover, 80% of disabled people “travel with two or more people with them who are not disabled.” In 2017, disabled people booked 190 million holidays, Amar mentioned during an interview he gave to Israel’s Channel 12.
Paralympic champ
Amar has become one of those frequent travelers. “When I was first injured, I found myself in bed saying, ‘I’m over, I’m screwed, I’m only half a person. What’s the point?’ I was like that for a year and a half. It was catastrophic for me.”
Just when he was at his lowest, Amar discovered swimming as part of his rehabilitation process. “I went into the pool, started to swim. I was free and fast. I could swim without being tied into a wheelchair. And people noticed. They said, ‘You swim very fast; you need to talk to the coach.’”
Amar went on to become a Paralympic champion, coming in seventh in the 100-meter breaststroke in the 2008 Summer Paralympics in Beijing. “Life as an athlete requires quite a lot of travel around the world,” he notes.
Sport also turned around another aspect in Amar’s life. He met the woman who would become his wife, Natalie, at a rugby tournament for wheelchair players. “The guys were playing, and she came to see a game. We saw each other, clicked, and we haven’t left each other since.” The couple now has a three-and-a-half-year-old daughter.
Amar worked for a while as a swimming instructor. He later picked up programming skills and found himself, in 2016, as “an entrepreneur who doesn’t know how to be an entrepreneur, at least at first.” Amar smartly surrounded himself with expertise.
His business partner, Michal Ben Assage, worked for 24 years in the travel industry, most recently at Amadeus, the world’s largest business-to-business travel platform.“She came with knowledge from the agent side. I came with the technology and the disability side,” Amar says.
Travaxy also partnered with the Daka90 Israeli “last minute” travel site.
“We’re very different from what they usually do,” Amar says. “People with disabilities don’t generally look to book a flight for tomorrow. But they invested in us. They were cool enough to say that no one is treating this community right.”
Travaxy, which has a team of eight, operates out of Daka90’s Tel Aviv office, home of inhouse accelerator Daka90 Labs.
Other strategic partners include Itai Green, CEO of Israel Travel Tech Startups, an incubator for tourism startups; and Mediterranean Towers Ventures, the investment arm of a company that runs luxury senior homes in Israel. Older people often have accessibility needs when traveling.
Travaxy raised $480,000 via the ExitValley Israeli crowdfunding platform. Half of the money came from Mediterranean Towers Ventures in exchange for a 10% stake in the company. Arik Pinto, the retiring CEO of Bank Hapoalim, who walks with a cane since suffering from polio as a child, also invested. Travaxy is now looking to raise another $2 million.
Travaxy charges a commission on bookings, just like other online travel sites, fueling new features and new locations. The need to vet accommodations individually has kept the company from expanding willy-nilly: currently, you can book flights or hotels in Tel Aviv, New York, London, Amsterdam, Berlin and Barcelona.
Thailand is next, Amar says. “It’s a very popular destination but not very accessible. You need to know where you’re going and who will serve you. But once you make the relationships, the culture there is to help. They don’t mind me being in a wheelchair as long as I can bring more customers!”
For more information, click here
More about Travel
-
Cozy, low-cost capsule hotels come to Israel
By ISRAEL21c Staff -
CN Traveler readers vote Israel one of 20 top countries
By Abigail Klein Leichman -
The Telegraph discovers what we’ve known for years – Tel Aviv is the place to visit
By The Daily Telegraph -
Modern Israeli scribes bring an ancient craft to life
By Abigail Klein Leichman -
11 biblical experiences in Israel you’ll never forget
By Jessica Halfin -
What you’ll see at the Israeli innovation museum in Jaffa
By Brian Blum -
10 of the best coffee table books about Israel
By Abigail Klein Leichman -
10 of the most fabulous open-air markets in Israel
By Jessica Halfin -
6 places to visit in 6 hours in the Western Galilee
By Brian Blum -
10 ways to have the best Druze experience in Israel
By Jessica Halfin -
Israel is hot destination for corporate incentive trips
By Abigail Klein Leichman -
Book a fabulous fashion tour in Tel Aviv or Jerusalem
By Abigail Klein Leichman -
9 unforgettable photos of the historic city of Akko
By Naama Barak -
Instead of busy Tel Aviv, why not visit quieter Eilat?
By Washington Post -
10 great reasons you should visit Israel’s Gaza border towns
By Jessica Halfin -
10 fabulous hotels for a great stay in Eilat
By ISRAEL21c Staff


Steem Developer Portal
PY: Grant Posting Permission
How to give another user posting permission on your account using Python.
Full, runnable src of Grant Posting Permission can be downloaded as part of the PY tutorials repository.
In this tutorial we show you how to check if someone has posting permission for an account on the Steem blockchain and how to grant or revoke that permission using the commit
class found within the steem-python library.
Providing another user posting permission for your account can be used to allow multiple users to submit posts on a single steemit community. @Utopian-Io is an example of such a community. There are also applications that allows you to schedule posts by automatically publishing on your behalf.
Intro
The Steem python library has a built-in function to transmit transactions to the blockchain. We are using the allow
and disallow
methods found within the commit
class in the library. Before we grant or revoke permission, we use the get_account
function to check whether the requested user already has that permission or not. This is not strictly necessary but adds to the useability of the process. The allow
method has 5 parameters:
- foreign - The foreign account that will obtain access
- weight - This is an optional parameter defining the weight to use. If not defined, the threshold value will be used. If the weight is smaller than the threshold, additional signatures will be required.
- permission - The actual permission to modify. This value must be either “posting”, “active” or “owner”
- account - The account to allow access to
- threshold - The threshold that needs to be reached by signatures to be able to interact
The disallow
method uses the same parameters except for weight
which is not required.
There is currently a bug with the disallow
method when using it on the testnet that we normally connect to. Due to that bug, we are using the production server for this tutorial. Special care should be taken when creating transactions as everything we do will affect real
accounts.
Steps
- App setup - Library install and import. Input user info and connection to production
- Username validation - Check validity of user and foreign account
- Check permission status - Check current permission status of foreign account
- Commit to blockchain - Commit transaction to blockchain
1. App setup and connection
In this tutorial we use 2 packages:
steem
- steem-python library and interaction with Blockchainpick
- helps select the query type interactively
We import the libraries for the application.
import steembase
import steem
from pick import pick
We require the private active key
of the user in order for the allow
or disallow
to be committed to the blockchain. The values are supplied via the terminal/console before we initialise the steem class with the supplied private key included.
#capture user information
username = input('Enter username: ')
wif = input('Enter private ACTIVE key: ')
#connect to production server with active key
client = steem.Steem(keys=[wif])
2. Username validation
Both the main account granting the permission and the account that permission is being granted to are first checked to make certain that they do in fact exist. We do this with the get_account
function.
#check valid user
userinfo = client.get_account(username)
if(userinfo is None) :
print('Oops. Looks like user ' + username + ' doesn\'t exist on this chain!')
exit()
#get account to authorise and check if valid
foreign_acc = input('Please enter the account name for POSTING authorisation: ')
if (foreign_acc == username) :
print('Cannot allow or disallow posting permission to your own account')
exit()
foreign_userinfo = client.get_account(foreign_acc)
if(foreign_userinfo is None) :
print('Oops. Looks like user ' + foreign_acc + ' doesn\'t exist on this chain!')
exit()
3. Check permission status
In order to determine which function to execute (allow
or disallow
) we first need to check whether the requested user already has permission or not. We do this with the same variable created in the previous step. The get_account
function has a value - posting
- that contains an array of all the usernames that has been granted posting permission for the account being queried. We use this check to limit the options of the user as you cannot grant permission to a user that already has permission or revoke permission of a user that does not yet have permission. The information is displayed on the options list.
#check if foreign_account already has posting auth
_data = []
title = ''
for i in range(len(userinfo['posting']['account_auths'])) :
_data.append(userinfo['posting']['account_auths'][i])
if (_data[i][0] == foreign_acc) :
title = (foreign_acc + ' already has posting permission. Please choose option from below list')
options = ['DISALLOW', 'CANCEL']
if (title == '') :
title = (foreign_acc + ' does not yet posting permission. Please choose option from below list')
options = ['ALLOW', 'CANCEL']
4. Commit to blockchain
Based on the check in the previous step, the user is given the option to allow
, disallow
or cancel
the operation completely. All the required parameters have already been assigned via console/terminal input and based on the choice of the user the relevant function can be executed. A confirmation of the succesfully executed action is displayed on the UI.
option, index = pick(options, title)
if (option == 'CANCEL') :
print('operation cancelled')
exit()
if (option == 'ALLOW') :
#allow(foreign, weight=None, permission='posting', account=None, threshold=None)
client.allow(foreign=foreign_acc, weight=1, permission='posting', account=username, threshold=1)
print(foreign_acc + ' has been granted posting permission')
else :
#disallow(foreign, permission='posting', account=None, threshold=None)
client.disallow(foreign=foreign_acc, permission='posting', account=username, threshold=1)
print('posting permission for ' + foreign_acc + ' has been removed')
And that’s it!
To Run the tutorial
- review dev requirements
- clone this repo
cd tutorials/30_grant_posting_permission
pip install -r requirements.txt
python index.py
- After a few moments, you should see a prompt for input in terminal screen.