After you get your Shiny application to a state where it works, it’s often useful to have an automated system that checks that it continues to work as expected. There are many possible reasons for an application to stop working. These reasons include:
One way to detect these problems is with manual testing – in other words, by having a person interact with the app in a browser – but this can be time-intensive, inconsistent, and imprecise. Having automated tests can alert you to these kinds of problems quickly and with almost zero effort, after the tests have been created.
The shinytest package provides tools for creating and running automated tests on Shiny applications.
Shinytest uses snapshot-based testing strategy. The first time it runs a set of tests for an application, it performs some scripted interactions with the app and takes one or more snapshots of the application’s state. These snapshots are saved to disk so that future runs of the tests can compare their results to them.
To create tests, the easiest method is to use the recordTest()
function. This launches the application in a web browser and records your interactions with the application. These interactions are saved in a .R file, and are run using the strategy described above.
Shinytest is in active development. To install it, run:
library(devtools) install_github("rstudio/shinytest")
This is the general procedure for recording tests:
recordTest()
to launch the app in a test recorder.tests/
.tests/
directory.To record tests, run the following:
library(shinytest) # Launch the target app (replace with the correct path) recordTest("path/to/app")
In a separate R process, this launches the Shiny application to be tested. We’ll refer to this as the target app. This also launches a special Shiny application in the current R process which displays the target app in an iframe and has some controls outside the iframe. We’ll refer to this as the recorder app. You will see something like this:
On the left is the target app (in this case, the “Shiny Widgets Gallery”), and on the right is the recorder app (titled “Test event recorder”). Note that you may need to make the browser window wider because the recorder panel occupies some space.
The panel on the right displays some controls for the test recorder, as well as a list of Recorded events. As you interact with the target app – in other words, when you set inputs on the app – you will see those interactions recorded in the Recorded events list.
For testing a Shiny application, setting inputs is only one part. It’s also necessary to check that the application produces the correct outputs. This is accomplished by taking snapshots of the application’s state.
There are two ways to record output values. One way is to take a snapshot of the application’s state. This will record all input values, output values, and exported values (more on exported values later). To do this, click the “Take snapshot” button on the recorder app.
After modifying some inputs and taking a snapshot, it will look something like this:
It is also possible to take a target snapshot. This is a snapshot of one or more specified output (instead of the default, which is to snapshot the entire application). To do this, hold down the Control (or Command) button on your keyboard and click on an output; it will snapshot just that one output.
When you are done recording a sequence of events, click on the “Save script and exit test event recorder” button. If you are in the RStudio IDE, it will open the test script in the tests/
subdirectory of the application. In this case, the name of the script is mytest.R
:
When you quit the test recorder, it will automatically run the test script. There are three separate components involved in running the tests:
First is the test driver. This is the R process that coordinates the testing and controls the web browser. When working on creating tests interactively, this is the R process that you use.
Next is the Shiny process, also known as the server. This is the R process that runs the target Shiny application.
Finally, there is the web browser, also known as the client, which connects to the server. This is a headless web browser – one which renders the web page internally, but doesn’t display the content to the screen (PhantomJS).
When you exit the test recorder, it will by default automatically run the test script, and will print something like this:
Saved test code to /path/to/app/tests/mytest.R
Running mytest.R
====== Comparing mytest ...
No existing snapshots at mytest-expected/. This is a first run of tests.
Updating baseline snapshot at tests/mytest-expected
Renaming tests/mytest-current
=> tests/mytest-expected.
Behind the scenes, it runs testApp()
. You can manually run the tests with this:
testApp("myshinyapp", "mytest")
This will play back the interactions and record snapshots, as specified in the test script. The very first time the tests are run, they will be saved in a subdirectory of the app called tests/mytest-expected
. These are the expected results, and future test runs will be compared against them.
The directory will contain two files for each snapshot. For example:
001.json
001.png
The .json file is a JSON representation of the state of the application when app$snapshot()
was called. The .png file is a screenshot of the application, which you can look at to inspect the state of the application.
The JSON file stores the state of all the input, output, and export values at the time of the snapshot:
{
"input": {
"action": 1,
"checkbox": true,
"checkGroup": ["1", "2", "3"],
"date": "2014-01-01",
"dates": ["2014-01-01", "2015-01-01"],
"file": null,
"num": 1,
"radio": "1",
"select": "1",
"slider1": 50,
"slider2": [25, 75],
"text": "Enter text..."
},
"output": {
"actionOut": "[1] 1\nattr(,\"class\")\n[1] \"integer\" \"shinyActionButtonValue\"",
"checkboxOut": "[1] TRUE",
"checkGroupOut": "[1] \"1\" \"2\" \"3\"",
"dateOut": "[1] \"2014-01-01\"",
"datesOut": "[1] \"2014-01-01\" \"2015-01-01\"",
"fileOut": "NULL",
"numOut": "[1] 1",
"radioOut": "[1] \"1\"",
"selectOut": "[1] \"1\"",
"slider1Out": "[1] 50",
"slider2Out": "[1] 25 75",
"textOut": "[1] \"Enter text...\""
},
"export": {}
}
If you are using a source control system (like git), you should check in the expected results.
After the initial test run, you can run the tests again in the future to check for changes in your application’s behavior. If there are no changes to the snapshots, you will just see something like this, with no additional output:
> testApp("path/to/app")
Running mytest.R
====== Comparing mytest ... Passed.
The results are saved to tests/mytest-current
, and compared against the saved results in tests/mytest-expected
. If the results are exactly the same, then the test is considered successful. It will return to the console with no additional output, and delete the tests/mytest-current
directory.
If there are any differences between the current and expected results, you’ll see output like this:
Running mytest.R
====== Comparing mytest ...
Differences detected between mytest-current/ and mytest-expected/:
Name Status
001.json != Files differ
001.png != Files differ
Would you like to view the differences between expected and current results [y/n]?
If you press y
and then Enter, it will open a Shiny application which shows the differences between the expected and current results. For screenshots, the differences will be highlighted in red. You can also choose different ways of viewing the differences in screenshots. It will look something like this:
After inspecting the changes, you can choose to update the expected results (that is, replace the old expected results with the new current results), or to just quit without updating.
You should update the results if the changes are expected. You should quit without updating if the changes are unexpected.
If you want to compare the results again in the future, without running testApp()
, you can run the following:
snapshotCompare("path/to/app/", "mytest")
In the example above, we had a single test script, named mytest.R
. If you want to have more than one set of tests for an application, you can record new tests, each with a different name. You can enter the name when recording your tests:
When you run testApp("path/to/app")
, it will run all the tests scripts in the application’s tests/
directory.
Shinytest can be used with interactive R markdown documents that use runtime: shiny
(sometimes also referred to as Shiny documents). This includes those that use the flexdashboard package.
Shiny documents have some differences compared to regular Shiny applications, and so the tests are slightly different. For an example of an interactive Rmd with tests, see here.
In a Shiny Rmd application, the UI of the application is created dynamically, using some randomly generated IDs. To make the results repeatable, you must set a random seed; otherwise the output will have slight differences in each run. See the section on controlling randomness for more information.
For testing Shiny documents, only one .Rmd file is allowed per directory. This is because of the way that the test directory is structured. (Note that if you name your Shiny document index.Rmd, then when deployed on Shiny Server, the URL can use the directory name, like http://mydomain.com/dirname/, instead of http://mydomain.com/dirname/index.Rmd. When deployed on RStudio Connect or Shinyapps.io, the filename is automatically not used in the URL.)
Some Shiny documents use runtime: shiny_prerendered
, which helps speed up page loading time. Normally, the first time these applications are run, they will leave behind a generated .html file as well as a cache directory named myfile_data/.
You can remove these files by adding this to the end of your test script (assuming the name of your document is doc.Rmd):
rmarkdown::shiny_prerendered_clean("../doc.Rmd")
Alternatively, you can save the generated files, but then the tests will be run with the generated files, so the prerendering step will not be run for future tests.
For an example of a prerendered .Rmd and tests, see here.
Learn more about shinytest with the testing in depth article.


--- layout: page title: Resume permalink: /resume/ order: 4 ---
I am an honours computer science student working towards a minor in math and a concentration in theoretical computer science.
Since 2009, I have been a leader on a competitive robotics team and a software mentor for the past four years. My experience programming competitive robots has given me knowledge about designing and producing software while working on a multidisciplinary team. You can find more information about this on my projects page.
Here is my resume:


I've recently received two different shipment of tramadol, each of a different type. The first was a white tablet, no name, no insignia, no label of any kind (other than tramadol HCl, 50mg) - this made me a little uneasy. But I trusted the source completely, so I tried to settle my nerves. The second was a pink and dark blue/purple pill - this one was called Domadol - also labeled 50mg tramadol HCl.
I worked my way up, as suggested, both to try to appreciate the substance better and to assure my own safety. 50mg, 100, 150, 200, 250, each on a separate day, separated by 3-4 days each time to try to stave off tolerance, alternating between the two types of pills.
I really noticed nothing until I hit a dose of 200mg, and even this dose was very mild - manifesting itself as a mild intoxication (very mild) that lasted 8 hours or so. I would liken the effects to a couple shots of liquor, mixed with maybe 1.5mg/kg DXM. When I upped the dosage to 250mg I noticed little more intoxication, but a marked increase in nausea. And I felt a definite increase in the DXM-like effects and a huge increase in nausea (to the point that I ALMOST lost my lunch). I didn't notice any iching, but did have difficulty staying with conversation or interacting with people.
I can't say that I really enjoyed the experiences, unfortunately, but I also was taking generics, and not Ultram. This might or might not have an effect, but I generally find generics to be inferior.
I can't stress enough how dangerous this compound can while driving, at high dosages. When I liken the effects to DXM, this isn't a direct comparison, but the frame-by-frame visual input at 150 mg and higher seemed to be clearly similar to a 1st plateau experience with DXM.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


You are viewing an historical archive of past issues. Please report new issues to the appropriate project issue tracker on GitHub.
Issues
| # | Summary | Product | Status | Kind | When |
|---|---|---|---|---|---|
| 1235 |
Viewing a forum topic, "updated at" shows last reply date |
wincent.com | closed | bug | |
| 1234 |
missing album art |
Synergy | open | support ticket | Created , updated |
| 1233 |
Add user icons (avatars) |
wincent.com | open | feature request | |
| 1232 |
Mac Giving Tree |
Synergy | closed | support ticket | Created , updated |
| 1231 |
Advertise canonical URLs |
wincent.com | open | feature request | |
| 1230 |
Move static assets onto Amazon S3 |
wincent.com | open | feature request | Created , updated |
| 1229 |
No auto startup |
Synergy | closed | bug | |
| 1228 |
What is this extra floater thing? |
Synergy Advance | closed | support ticket | Created , updated |
| 1227 |
Atom feeds all broken after Rails 2.3.0 RC1 update |
wincent.com | closed | bug | Created , updated |
| 1225 |
Allow body-less issues? |
wincent.com | closed | feature request | Created , updated |


Custom sparse point gradient interpolator.
The TCustomSparsePointGradientSampler class is an ancestor of TBarycentricGradientSampler, TBilinearGradientSampler and TCustomArbitrarySparsePointGradientSampler
[See Also] MeshGradients Example


{% blocktrans with infoservice_textblocks.name as infoservice_name%}
Do you really want to remove this patient from the {{ infoservice_name }}?
{% endblocktrans %}
{% trans "Back" %}
{% trans "Phone Number" %}
{% trans "Way of Communication" %}
{% for subscription in subscriptions %}
{% endfor %}


YeastRepo is a Cydia repository.
Add to Cydia
New Package
This is a sample package with lots of information.
More info


Chenxi Wu
<EMAIL_ADDRESS>Ph.D in Mathematics, Cornell University, Aug. 2016.
Currently Assistant Professor at UW Madison.
Fractals and Related Fields IV
Teaching and Outreach:
Fall 2020: Numerical Analysis
Spring 2020: Statistics slides Notes
Fall 2019: Elementary Linear algebra
Spring 2019: Introduction to Mathematical reasoning notes Evaluation A Evaluation B
Fall 2018: Introduction to Applied Mathematics
Spring 2018: Instructor for linear optimization Evaluation
Fall 2017: Instructor for Elementary linear algebra Evaluation and Introductory PDE.
Spring 2016: TA of Linear Algebra for Engineers notes
Spring 2015: Calculus I notes
Fall 2014: TA of Differential Equations
Spring 2014: TA of Multivariable Calculus for Engineer and Totally Awesome Math
Spring 2013: TA of Multivariable Calculus
Fall 2012: TA of Honors Calculus II
Math Explorer's Club March 19, 2016
Publications:
Chenxi Wu. The relative cohomology of abelian covers of the flat pillowcase. Journal of Modern
Dynamics, doi:10.3934/jmd.2015.9.123 arXiv
Chenxi Wu. Delone property of the holonomy vectors of translation surfaces. Israel Journal
of Mathematics, doi: 10.1007/s11856-016-1357-y arXiv
Hyungryul Baik, Ahmad Rafiqi and Chenxi Wu. Constructing pseudo-Anosov maps with given dilatations.
Geometriae Dedicata, doi: 10.1007/s10711-015-0089-1 arXiv
Chenxi Wu. Lattice surfaces and smallest triangle. Geometra Dedicata, doi: 10.1007/s10711-016-0191-z
arXiv
Lucien Clavier, Anja Randecker, Chenxi Wu. Rotational component spaces for infinite-type translation surfaces. Geometrae Dedicata arXiv
Hyungryul Baik, Ahmad Rafiqi and Chenxi Wu. Is a typical bi-Perron number a pseudo-Anosov dilatation? Ergodic Theory and Dynamical System arXiv
Farbod Shokrieh and Chenxi Wu. Canonical measures on metric graphs and a Kazhdan's theorem arXiv, Invent. Math.
Hyungryul Baik, Farbod Shokrieh and Chenxi Wu. Limits of canonical forms on towers of Riemann surfaces arXiv Crelle
Hyungryul Baik and Chenxi Wu. An algorithm to compute Teichm\"uller polynomial from matrices arXiv Geometriae Dedicata
Hyungryul Baik, Hyunshik Shin, Chenxi Wu. An upper bound on the asymptotic translation lengths on the curve graph and fibered faces arXiv Indiana University Math Journal
Harrison Bray, Diana Davis, Kathryn Lindsey, Chenxi Wu. The shape of Thurston's Master Teapot arXiv Accepted by Advances in Mathematics
Preprints and other writings:
Hyungryul Baik, Eiko Kin, Hyunshik Shin, Chenxi Wu. Asymptotic translation lengths and normal generations for pseudo-Anosov monodromies for fibered 3-manifolds arXiv
Kathryn Lindsey, Chenxi Wu. Characterization of the shape of Thurston's teapot arXiv
Hyungryul Baik, Ahmad Rafiqi, Chenxi Wu. Approximations to infinite type pseudo-Anosov maps arXiv
Notes on Bouw-Moller surfaces
Slides for math 300
Slides for GAGTA 2019
Notes for KAIX Summer School


---
layout: default
title: OpenCL matrix-multiplication SGEMM tutorial
current: 5
tutorial_page: 11
---
Kernel 9: Pre-fetching
Still not at the performance level of cuBLAS, so what's next? Are we using the same techniques as cuBLAS? Inspection using the CUDA visual profiler tells us that cuBLAS is running only a single work-group of 256 threads per SM, that each work-group uses 32KB local memory, and that each thread consumes the maximum of 255 registers. Let's try to mimic that configuration.
First of all, if we go for only 256 threads per SM, we'll suffer from the latency of off-chip memory accesses. There is a well-known technique to overcome that: software pre-fetching. In the case of matrix-multiplication, that means that we are going to load the next tile while we are computing the current tile, such that the latency of the loads can be hidden by computations.
To implement this, we'll need twice as much local memory, automatically limiting us to one work-group per SM (and giving us the same 32KB as cuBLAS). Since we cannot have 3D arrays, we'll just flatten one dimension:
// Local memory to fit two tiles of A and B
__local float Asub[2][TSK*TSM];
__local float Bsub[2][TSK*TSN];
Since the kernel code has become quite large, we'll take a look at a shorter pseudo-code version. The code below replaces the previous loop over the tiles. Things to notice:
- Before starting the loop, we already load the first tile (tile 0) into Asub[0,*] and Bsub[0,*]. After that, we have to synchronise because there is no other barrier before the start of the computation.
- Within the loop we already load the next tile. Note that we need an extra if-statement for when we arrive at the last tile.
- The computation is as before, but now alternates between the two tiles of Asub and Bsub. With pre-fetching, we no longer need to synchronise directly before computation, allowing overlap between loads and FMAs.
// Load the first tile of A and B into local memory
load(tile=0, Asub[0][*], Bsub[0][*];
// Loop over all tiles
int numTiles = K/TSK;
for (int t=0; t<numTiles; t++) {
// Synchronise
barrier(CLK_LOCAL_MEM_FENCE);
// Load the next tile of A and B into local memory
int tt = t + 1;
if (tt<numTiles) {
load(tile=tt, Asub[tt%2][*], Bsub[tt%2][*]);
}
// Perform the computation
compute(tile=t, Asub[t%2][*], Bsub[t%2][*]);
}
Since pre-fetching uses twice as much local memory, we end up with only 256 active threads. Although we do pre-fetch, this still harms performance significantly, ending up with ~400 GFLOPS less than the previous kernel. However, we no longer have to care about the 128 registers per thread limit to get 512 threads running, so we have headroom for further optimisations. On to the next kernel!


move-window makes the first window above it in the DOM moveable
client-area blocks mouse events
example menu behavior
show submenu...
example submenu behavior
show submenu...
example submenu behavior
X
window 2
clicking another window will give it focus and move it above other windows.
by default, window are restricted to the bounds of the browser viewport.
this window does not have a fixed width so it will resize when dragged to the edge of the screen.
display:inline-block can be used for fixed width flow layouts.
input field:
- clicking outside of the input will remove its focus (blur).
- tabbing note: allowing default tabbing can cause the focus to go
into the url bar and it can be difficult to reset the focus.
as a workaround, handle tab/shift+tab with js and explicitly focus the previous or next input.
close-window hides the window
drag and drop:
make an element draggable with drag-object.
make an element a drop target with drop-target. drops will hit drop-target instead of its child elements.
implement WM.listen(function(e, next) {...}); to handle drop notifcations.
when an object is dragged, a clone of the dragged element is added to BODY with the drag-clone class.
id=left drag-object
id=drop drop-target
id=right drop-target & drag-object
windows are ordered using z-index, and are also grouped by window type.
window types are ordered from back to front: window, menu, drag-clone, tooltip.


Welcome to the FIoT-Client Python Documentation!¶
Contents
Authors¶
- Lucas Cristiano Calixto Dantas - Initial work and developer
- Lucas Ramon Bandeira da Silva - Project collaborator
- Carlos Eduardo da Silva - Professor advisor
Introduction¶
The FIoT-Client Python is a Python library that eases the use of IoT and Context APIs from FIWARE platform. The functions of each file of the library are listed in alphabetical order.
Function List¶
utils.py¶
merge_dicts()¶
merge_dicts(dict_args)
Merge two dicts into a single dictionary. The argument is the dicts to be merged, and the function returns the resulting dictionary from the merge
read_config_file()¶
read_config_file(config_file)
Load configuration file and creates a dict with the necessary attributes. The argument is the file to be read, and the function returns a dict with the attributs read from the file.
init.py¶
authenticate()¶
authenticate(self, username, password)
Creates an authentication token based on user credentials using FIWARE Lab OAuth2.0 Authentication system. If you didn’t have a user, go and register first at http://cloud.fiware.org . The arguments of this function are the username and password of the user from Fiware authentication account, and returns the generated token and expiration.
generate_api_key()¶
generate_api_key()
Generate a random api key to be used on service creation. This function doesn’t have arguments and return the generated api key string.
_send_request()¶
_send_request(self, url, payload, method, additional_headers=None)
Auxiliary method to configure and execute a request to FIWARE APIs. The arguments of this function are the url to be called on the request, the payload to be sent on the request, the method to be used on the request and additional http headers to be used in the request. This function returns the response from the request execution.
set_service()¶
set_service(self, service, service_path)
Specify the service context to use on operations. The arguments of this function are the name of the service to be used and the service path of the service to be used. This function has no returns.
context.py¶
ĉreate_attribute_change_rule()¶
create_attribute_change_rule(self, attribute, attribute_type, condition, action=’post’, notification_url=None)
Register a new rule to be evaluated on attribute values change and a action to be taken when rule evaluated to true. The arguments of the function are the attribute to be monitored, the type of the attribute to be monitored, the condition to be evaluated on changes on attribute’s value, the action type to be taken when condition is evaluated true (Currently accepted values to this parameter are ‘email’ and ‘post’) and the endpoint to which POST notifications will be sent. This function returns the information of the created rule.
get_entities_by_type()¶
get_entities_by_type(self, entity_type)
Get entities from its entity type. The argument of this function is the type of the entities to be searched, and returns a list with the information of the entities found with the given type.
get_entity_by_id()¶
get_entity_by_id(self, entity_id)
Get an entity information from its entity id. The argument of this function is the id of the entity to be searched, and returns the information of the entity found with the given id or None if no entity was found with the id.
get_historical_data()¶
get_historical_data(self, entity_type, entity_id, attribute, items_number=10)
Get historical data from a specific attribute of an entity. The arguments of this function are the type of the entity to get historical data, the id of the entity to get historical data, the attribute of the entity to get historical data, and the number of last entries to be queried (If no value is provided, the default value (10 entries) will be used). This function returns the historical data on the specified attribute of the given entity.
get_subscription_by_id()¶
get_subscription_by_id(self, subscription_id)
Get subscription information from its subscription id. The argument of the function is the id of the subscription to be searched, and returns the information of the subscription found with the given id, or None if no subscription was found with the id.
list_subscriptions()¶
list_subscriptions(self)
Get all subscriptions. This function has no arguments and returns a list with the ids of all the subscriptions.
subscribe_attributes_change()¶
subscribe_attributes_change(self, device_id, attributes, notification_url)
Create a new subscription on given attributes of the device with id specified. The arguments of this function are the id of the device to be monitored, the list of attributes do be monitored and the URL to which the notification will be sent on changes. This function returns the information of the subscription.
subscribe_cygnus()¶
subscribe_cygnus(self, entity_id, attributes)
Create a new subscription on attributes to send changes on its values to Cygnus. The arguments of this function are the id of the entity to be monitored, the list of attributes do be monitored and returns the information of the subscription.
subscribe_historical_data()¶
subscribe_historical_data(self, entity_id, attributes)
Create a new subscription on attributes to store changes on its values as historical data. The parameters of this function are the id of the entity to be monitored and the list of attributes do be monitored, and returns the information of the subscription.
unsubscribe()¶
unsubscribe(self, subscription_id)
Remove a subscription with the given subscription id. The paramater of this function is the id of the subscription to be removed, and returns True if the subscription with the given id was removed False if no subscription with the given id was removed.
iot.py¶
create_service()¶
create_service(self, service, service_path, api_key=None)
Creates a new service with the given information. The arguments of this function are the name of the service to be created, the service path of the service to be created and a specific api key to use to create the service (if no api key is provided, a random one will be generated). The function returns the information of the created service.
_create_service()¶
_create_service(self, service, service_path, api_key)
Auxiliary method to try to create a service with the given information, and the arguments are the name of the service to be created, the service path of the service to be created and the api key to use to create the service. The function returns the response of the creation request.
_create_ul_payload()¶
_create_ul_payload_from_measurements(measurements)
Auxiliary method to create a UL formatted payload string from measurement group or a list of measurement groups to the FIWARE platform from a device. the argument of this function is a measurement group (a dict where keys are device attributes and values are measurements for each attribute) or a list of measurement groups obtained in the device, and returns UL formatted payload string from measurement group.
get_polling_commands()¶
get_polling_commands(self, device_id, measurements)
Get a list of polling commands of the device with the given id when sending a measurement group or a list of measurement groups to the FIWARE platform from a device with POST request. The parameters of this function are the id of the device to verify pooling commands and a measurement group (a dict where keys are device attributes and values are measurements for each attribute) or a list of measurement groups obtained in the device. The function returns the list of pooling commands of the device.
register_device()¶
register_device(self, device_schema, device_id, entity_id, endpoint=’‘, protocol=’IoTA-UL’)
Register a new device with the given structure in the currently selected service. this function has the following arguments: a JSON string representing device schema, the id to the device to be created, the id to the NGSI entity created representing the device, the endpoint of the device to which actions will be sent on format IP:PORT and the protocol to be used on device registration. (If no value is provided the default protocol (IoTA-UL) will be used). this function returns the Information of the registered device.
register_device_from_file()¶
register_device_from_file(self, device_file_path, device_id, entity_id, endpoint=’‘, protocol=’IoTA-UL’)
Register a new device with the given structure in the currently selected service. this function has the following arguments: the path to the description file for the device, the id to the device to be created, the id to the NGSI entity created representing the device, the endpoint of the device to which actions will be sent on format IP:PORT and the protocol to be used on device registration. (If no value is provided the default protocol (IoTA-UL) will be used). this function returns the Information of the registered device.
remove_device()¶
remove_device(self, device_id)
Removes a device with the given id in the currently selected service, the argument of this function is the id to the device to be removed and returns a response of the removal request.
remove_service()¶
remove_service(self, service, service_path, api_key=”“, remove_devices=False)
Remove a subservice into a service (If Fiware-ServicePath is “/*” or “/#” remove service and all subservices). The arguments of this function are the name of the service to be removed, the service path of the service to be removed, the api key of the service, and the parameter “remove_devices”, in which it is a boolean that defines if either its to remove devices in service/subservice or not (If no value is provided, the default value (False) will be used).
Note
This parameter is not valid when Fiware-ServicePath is ‘/*’ or ‘/#’.
this function returns the response of the removal request.
send_command()¶
send_command(self, entity_id, device_id, command, params=None)
Sends a command to a device the FIWARE platform (http://fiware-orion.readthedocs.io/en/latest/user/walkthrough_apiv1/index.html#ngsi10-standard-operations at “Update context elements” section). The arguments of this function are the id of the entity that represents the device, the id of the device to which the command will be sent, the name of the command to be called on the device and the command parameters to be sent. The function returns the result of the command call.
send_observation()¶
send_observation(self, device_id, measurements, protocol=’MQTT’)
Sends a measurement group or a list of measurement groups to the FIWARE platform from a device. The arguments of this function are the id of the device in which the measurement was obtained, a measurement group (a dict where keys are device attributes and values are measurements for each attribute) or a list of measurement groups obtained in the device and the transport protocol to be used to send measurements. Currently accepted values are ‘MQTT’ and ‘HTTP’.
Note
If no value is provided the default value (MQTT) will be used
This function returns the summary of the sent measurements.
set_api_key()¶
set_api_key(self, api_key)
Sets the api key to use to send measurements from device. The argument of the function is the api key of the service to use and this function has no returns.


There's not a lot that this Ninja multi-cooker can't handle
by Joseph GreenTL;DR: The versatile Ninja multi-cooker is on sale for £179.99 on Amazon, saving you 22% on list price.
The festive period can be frenetic, and feeding the whole family can sometimes seem like a military operation. Nobody has the time to stop and carefully prepare a homemade dinner when the house is in meltdown.
This is why multi-cookers exist. You can quickly and easily create delicious one-pot meals, sides, and desserts with the touch of a button. There is basically nothing that you can't create. Homemade yoghurt, dried fruit, freshly baked cakes, pulled pork, aromatic curries, and roast chicken is all on the menu with a multi-cooker.
The Ninja multi-cooker can pressure cook, air crisp, slow cook, steam, sauté, roast, grill, yoghurt, and dehydrate. There's not a lot that it can't handle, meaning you can actually prepare something tasty for dinner no matter how stressful the situation is at home.
You can now pick up the Ninja multi-cooker for just £179.99 on Amazon. This is down by 22% on list price, saving you £50. This impressive deal is only available until midnight on Nov. 18, so you can't afford to delay.
Feed the whole family throughout the festive period with the help of the Ninja multi-cooker.
Ninja Multi-Cooker — £179.99 (list price £229.99) See Details


Mon - Fri: 6am - 8pm
Sat: 6am - 10pm
Sun: CLOSED
Phone:
(555)555-5555
The best fish-forward confections in the Northwest!
The original best-seller!
Make a splash with this fish shirt!


Mohsin Abbas Haider set for a comeback and celebrities are cheering him on
by Entertainment DeskAn FIR was lodged against actor, singer and writer, Mohsin Abbas Haider by his former wife in July, 2019, accusing him of domestic abuse. Although Fatima Sohail uploaded pictures of her bruises to justify her claim, Mohsin denied all allegations saying, “she is trying to play the woman card.” Adding that, “It is true I had anger issues in the past but I’m a changed man.”
Nevertheless, over a month after the Lahore Family Court accepted Fatima’s request for khula on September 26, 2019, Mohsin uploaded a picture of his musical comeback.
Posted on his Instagram, the picture titled Rooh addressed his upcoming single, featuring music by Faraz Khosa. The actor had shared the first look of the cover art captioned with hashtag #ComingSoon.
As surprising as that alone may sound, his post was followed by a number of videos of celebrities promoting his upcoming song, attached in a collage with the cover art.
The first video showed veteran actor Naumaan Ijaz, wishing Mohsin the best for his upcoming single, adding that he is like a younger brother. He also said that both individuals who have worked on the song put their soul into their work, just like the title Rooh suggests.
This was followed by Nimra Khan wishing him the same with another post of Saqib Malik, the Baaji director, adding that he is sure the song will be a great one.
Iftikhar Thakur and Rida Imran also lent their support, following which, a video of Billo De Ghar singer Abrarul Haq was added to Mohsin’s feed. “Let me congratulate Mohsin Abbas and Faraz Khosa for making the song Rooh, a lot of good wishes and I pray to God the song becomes a hit,” he claimed.
This was followed by videos of Nausheen Shah, Faakhir Mehmood and Noorul Hassan Muhammad wishing the same.
However, celebrities who protested against the actor during the time of domestic abuse allegations have not commented on the matter yet. While the last project Mohsin was seen working in was Deewar-e-Shab, following which he did not appear anywhere and was also fired from Mazaaq Raat.


[gecode-users] IntVar::IntVar: Attempt to create variable with empty domain.
Jose A Magaña
jose_a_magana at hotmail.com
Thu Dec 26 10:28:38 CET 2013
Hello,
please, disregard my previous mail.
The problem has been found, as usual, in the most unexpected line of
code.
My apologies
Jose
-----Original Message-----
From: Jose A Magaña
Sent: Tuesday, 24 December, 2013 19:43
To: users at gecode.org
Subject: IntVar::IntVar: Attempt to create variable with empty domain.
Hello,
I am using Gecode to solve Conway Game of Life. It is an assignment for
the CSP course I am following at University.
My code is working correctly without any problems except for the trivial
case.
The objective is for a given initial solution add checkers to a board
until the configuration is stable (according to some neighbourhood rules).
The point is that when the initial solution is already stable I get an
exception: IntVar::IntVar: Attempt to create variable with empty domain.
The problem uses IntVar in the domain {0,1} and basically formalizes as
constraints relationships on the number of neighbours with certain
conditions depending on the 0/1 value of the cell.
I have found unsatisfiable cases where the same exception also occurs.
What kind of issues/conditions may cause this exception?
I am using version 4.2.1 in Windows.
Thanks in advance
Jose A. Magaña
More information about the users
mailing list


Designed to make things easier and more efficient.
Read MoreWith this Software this means that the Government is moving forward to the digital age.
Read MoreIf there is a problem, we are always here to assist you and of course the Admins.
Read MoreThe data that is being passed from the user to the admin is being protected and encrypted. No need to worry about data breaches and loss of sensitive data.
Everything is up there in the cloud. It is perfectly safe and protected.
Delivered right at your doorstep when Admin approves your Government Document.
You can fill out the forms on your devices. Getting your Government Documents is as easy as that and is as simple as that.


Book library
All Languages
English
French
German
Russian
Italian
Arabic
Greek
Portuguese
Sanskrit
Norwegian
Japanese
More books...
Title
Author
French
1977
123
pages


atktopbm(1) atktopbm(1) NAME atktopbm - convert Andrew Toolkit raster object to portable bitmap SYNOPSIS atktopbm [atkfile] DESCRIPTION Reads an Andrew Toolkit raster object as input. Produces a portable bit‐ map as output. SEE ALSO pbmtoatk(1), pbm(5) AUTHOR Copyright (C) 1991 by Bill Janssen. 26 September 1991 atktopbm(1)


Rhea Erice has taken art courses since in the 6th grade.
Her talent in drawing and painting contributes to her knowledge in basic art elements and principles.
She is now receiving commissions to create media assets to developing businesses.
Her work ranges from graphics both in vector and bitmap, illustrations in traditional medium, and websites.


Solidity & TypeScript Integration, Configuration and Examples
With Soltsice you could generate strongly-typed TypeScript proxies for Ethereum contracts from Solidity ABI with a single command. You could also send raw signed transactions to public Ethereum nodes such as Infura just by adding an optional private key parameter to any method. Soltsice provides convenient utilities for storing key files, for signing arbitrary data for later address recovery with ecrecover
functions from contracts code and for other frequent tasks. Finally, Soltsice has MultiOwnable
and BotManageable
contracts for granular access control for MultiSig majority, individual owners and backend accounts.
TODO
The initial purpose of this library was to have peace of mind and type safety when working with rapidly changing Solidity ABI. TypeScript proxies for contracts allow to use powerful intellisense feature of code editors.
Methods with signatures
Typed Constructor
TODO
TODO
TODO
TODO Problem: Geth 1.8 added pruning, but still long-running nodes grow in side. Standard BizSpark subscription cannot keep up, needs more resources.
TODO Deploy via migrations using contracts, showcase @ts-check attribute in VSCode
TODO
TODO
TODO
TODO
Note that the format is standard one so you could import existing key files just by providing a filepath and password.
TODO
TODO
TODO
TODO
TODO
TODO
Typings
TODO
TODO
soltsice
code generator from codeTODO
TODO
Installing and using Soltsice is very easy. You could just add soltsice
NPM package to your existing project or use a starter project for new development.
You must have truffle
and copyfiles
installed globally:
npm install -g truffle copyfiles
Install and save Soltsice:
npm install soltsice --save
Soltsice allows to generate TypeScript files for Ethereum contracts with the command:
soltsice ./artifacts ./types
All .json
artifacts from truffle compile
in the folder artifacts
will be transformed into TypeScript classes in
types
with a single index.ts
file with all exports.
Every TypeScript contract class inherits SoltsiceContract
, which is a wrapper over Truffle-contract with methods generated from ABI.
If some functionality is not yet supported by Soltsice, you may use SoltsiceContract._instance : Promise<any>
field to access untyped Truffle-contract instance.
You could import generated types as:
import { W3 } from "soltsice";
import { BigNumber } from "bignumber.js";
import { StandardToken } from "./types";
// default wrapper for web3: either window['web3'] if present,
// or http provider connected to localhost: 8545, if not running on https
let w3: W3 = new W3();
// null for ctor params which are only used for newly deployed contracts
let st: StandardToken = new StandardToken("address of deployed contract", null, w3);
// note that typings are optional in variable definitions, TypeScript infers types
let supply: Promise<BigNumber> = st.totalSupply();
supply.then(value => {
console.log("TOTAL SUPPLY", value.dividedBy(1e18).toFormat(0));
});
See dbrain-contracts and dbrain-blockchain-api projects that use this library and a standalone minimal example here.
truffle compile
, run tests on Truffle stack (solidity or js, if any)soltsice ./src ./dest
, all TypeScript contracts will be updated, any API changes will block subsequent TS compilation
(except for rare edge cases such as multiple return parameters which are returned as an array and we use any
TS type for them)TODO
TODO A starter project with the shortest path to deploy
TODO Use the contract starter package from DApp starter (dbrain-dapp structure)
TODO Use the contract starter from backend (dbrain-blockchain-api structure)
TODO
TODO https://github.com/dbrainio/dbrain-contracts State channels + in-memory off-chain signing mock
TODO https://github.com/dbrainio/dbrain-blockchain-api Off-chain signing prototype on Postgres
TODO
If some functionality is not supported yet you are very welcome to open an issue or pull request!
To build & test run the following commands:
npm install
npm run build:contracts
npm run soltsice
npm test
MIT
(c) 2018 Dbrain.io


Build form controls with floating labels via the :placeholder-shown pseudo-element. Works in latest Chrome, Safari, and Firefox.
:placeholder-shown
© 2017-2018
{{registerForm.value | json}} {{registerForm.status | json}}
{{registerForm.value | json}}
{{registerForm.status | json}}


Dorothy and the Wizard in Oz
by L. Frank Baum
Chapter 20: “Zeb Returns to the Ranch”
Additional Information
- Year Published: 1908
- Language: English
- Country of Origin: United States of America
- Source: Baum, F. L. (1908). Dorothy and the Wizard in Oz. Chicago: Reilly and Britton.
-
Readability:
- Flesch–Kincaid Level: 6.0
- Word Count: 832
- Genre: Fantasy
- Keywords: 20th century literature, american literature, books of oz, l. frank baum, self-help
- ✎ Cite This
Downloads
Eureka was much surprised to find herself in disgrace; but she was, in spite of the fact that she had not eaten the piglet. For the folks of Oz knew the kitten had tried to commit the crime, and that only an accident had prevented her from doing so; therefore even the Hungry Tiger preferred not to associate with her. Eureka was forbidden to wander around the palace and was made to stay in confinement in Dorothy’s room; so she began to beg her mistress to send her to some other place where she could enjoy herself better.
Dorothy was herself anxious to get home, so she promised Eureka they would not stay in the Land of Oz much longer.
The next evening after the trial the little girl begged Ozma to allow her to look in the enchanted picture, and the Princess readily consented.
Then Dorothy found, with the aid of the enchanted picture, that Uncle Henry had returned to the farm in Kansas, and she also saw that both he and Aunt Em were dressed in mourning, because they thought their little niece had been killed by the earthquake.
“Really,” said the girl, anxiously, “I must get back as soon as poss’ble to my own folks.”
Zeb also wanted to see his home, and although he did not find anyone mourning for him, the sight of Hugson’s Ranch in the picture made him long to get back there.
“This is a fine country, and I like all the people that live in it,” he told Dorothy. “But the fact is, Jim and I don’t seem to fit into a fairyland, and the old horse has been begging me to go home again ever since he lost the race. So, if you can find a way to fix it, we’ll be much obliged to you.”
“Ozma can do it, easily,” replied Dorothy.
That last evening was so delightful that the boy will never forget it as long as he lives. They were all together (except Eureka) in the pretty rooms of the Princess, and the Wizard did some new tricks, and the Scarecrow told stories, and the Tin Woodman sang a love song in a sonorous, metallic voice, and everybody laughed and had a good time. Then Dorothy wound up Tik-tok and he danced a jig to amuse the company, after which the Yellow Hen related some of her adventures with the Nome King in the Land of Ev.
The Princess served delicious refreshments to those who were in the habit of eating, and when Dorothy’s bedtime arrived the company separated after exchanging many friendly sentiments.
Next morning they all assembled for the final parting, and many of the officials and courtiers came to look upon the impressive ceremonies.
Dorothy held Eureka in her arms and bade her friends a fond good-bye.
“You must come again, some time,” said the little Wizard; and she promised she would if she found it possible to do so.
“But Uncle Henry and Aunt Em need me to help them,” she added, “so I can’t ever be very long away from the farm in Kansas.”
Ozma wore the Magic Belt; and, when she had kissed Dorothy farewell and had made her wish, the little girl and her kitten disappeared in a twinkling.
“Where is she?” asked Zeb, rather bewildered by the suddenness of it.
“Greeting her uncle and aunt in Kansas, by this time,” returned Ozma, with a smile.
Then Zeb brought out Jim, all harnessed to the buggy, and took his seat.
“I’m much obliged for all your kindness,” said the boy, “and very grateful to you for saving my life and sending me home again after all the good times I’ve had. I think this is the loveliest country in the world; but not being fairies Jim and I feel we ought to be where we belong—and that’s at the ranch. Good-bye, everybody!”
He gave a start and rubbed his eyes. Jim was trotting along the well-known road, shaking his ears and whisking his tail with a contented motion. Just ahead of them were the gates of Hugson’s Ranch, and Uncle Hugson now came out and stood with uplifted arms and wide-open mouth, staring in amazement.
“Goodness gracious! It’s Zeb—and Jim, too!” he exclaimed. “Where in the world have you been, my lad?”
“Why, in the world, Uncle,” answered Zeb, with a laugh.


Honzi
/
Guides
/Garry's Mod
Respawning Entity
Notes
Barnacles
Becomes an unremoveable corpse when killed.
Becomes a regular barnacle when your save file is loaded.
Health/HEV Chargers
Refill when your save file is loaded.


Provides useful functions which are needed for bioinformatic analysis such as calculating linear principal components from numeric data and Single-nucleotide polymorphism (SNP) dataset, calculating fixation index (Fst) using Hudson method, creating scatter plots in 3 views, handling with PLINK binary file format, detecting rough structures and outliers using unsupervised clustering, and calculating matrix multiplication in the faster way for big data.
| Version: | 1.1.1 |
| Depends: | R (≥ <IP_ADDRESS>) |
| Imports: | rARPACK, grDevices, graphics, stats, utils |
| Suggests: | testthat |
| Published: | 2018-06-04 |
| Author: | Kridsadakorn Chaichoompu [aut, cre], Kristel Van Steen [aut], Fentaw Abegaz [aut], Sissades Tongsima [aut], Philip James Shaw [aut], Anavaj Sakuntabhai [aut], Luisa Pereira [aut] |
| Maintainer: | Kridsadakorn Chaichoompu <kridsadakorn at biostatgen.org> |
| BugReports: | https://gitlab.com/kris.ccp/kris/issues |
| License: | GPL-2 | GPL-3 |
| URL: | https://gitlab.com/kris.ccp/kris |
| NeedsCompilation: | no |
| Citation: | KRIS citation info |
| Materials: | README NEWS |
| CRAN checks: | KRIS results |
| Reference manual: | KRIS.pdf |
| Package source: | KRIS_1.1.1.tar.gz |
| Windows binaries: | r-devel: KRIS_1.1.1.zip, r-release: KRIS_1.1.1.zip, r-oldrel: KRIS_1.1.1.zip |
| OS X binaries: | r-release: KRIS_1.1.1.tgz, r-oldrel: KRIS_1.1.1.tgz |
| Old sources: | KRIS archive |
| Reverse imports: | FILEST, IPCAPS |
Please use the canonical form https://CRAN.R-project.org/package=KRIS to link to this page.


This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
9 mins
$0.99
I'm just out of the studio with my new album "New album". Couldn't be prouder over it and I'm happy to share the songs below.
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
9 mins
$0.99
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
9 mins
$0.99
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
9 mins
$0.99
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
9 mins
$0.99
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
9 mins
$0.99
This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
9 mins
$0.99


--- layout: pages banner: page title: "Games" logo: "logo/thergames-games.png" subtitle: "All Games" description: "All my games" actions: - name: Google Play link: https://play.google.com/store/apps/developer?id=The_R style: google-play image: google-play.svg - name: App Store link: https://itunes.apple.com/us/artist/rohan-narang/id511620872 style: app-store image: app-store.svg ---
{{ page.subtitle }}
{{ page.description }}


RPItems
About
Sign Up
Log In
Welcome to RPItems
A place for students to sell things within the RPI Community
Department
Books
Clothes
Electronics
Games
Movies
Music
Tool
Others
Find what you need
Search
List New Item
Popular Items
Item
Item
Item
Item
Item
Item


preload="none"
autoplay="autoplay"
loop="loop"
It uses native <audio> where available and an invisible flash player to emulate <audio> for other browsers. It provides a consistent html player UI to all browsers which can be styled used standard css.
Put audio.js
, player-graphics.gif
& audiojs.swf
in the same folder.
Include the audio.js
file:
<script src="/audiojs/audio.min.js"></script>
Initialise audio.js:
<script>
audiojs.events.ready(function() {
var as = audiojs.createAll();
});
</script>
Then you can use <audio>
wherever you like in your HTML:
<audio src="/mp3/juicy.mp3" preload="auto" />
A series of API tests & examples for using and extending audio.js
Example 1 Test multiple load types
Example 2 Custom markup/css
Example 3 Multiple players, testing preload
, loop
& autoplay
attributes
Example 4 Customised player
Example 5 Customised playlist player
With Flash as a fallback, it should work pretty much anywhere.
It has been verified to work across:
ogg
audio.js focuses on playing mp3s. It doesn’t currently support the ogg format. As mp3 is the current defacto music transfer format, ogg support is lower on our list of priorities.


2nd October Presentations
pvAccess Status and Plans
– Matej Sekoranja
EPICS Base 3.x News
– Andrew Johnson
areaDetector Pipeline
– David Hickin
Archive Service
– Nikolay Malitsky


Account registration at PrepBootstrap is only required if you will be selling or buying themes.
This ensures a valid communication channel for all parties involved in any transactions.
A lot of the content of the site has been submitted by the community. Whether it is a commercial element/template/theme
or a free one, you are encouraged to contribute. All credits are published along with the resources.
There are a number of reasons why you should join us:
A great 70% flat rate for your items.
Fast response/approval times. Many sites take weeks to process a theme or template. And if it gets rejected, there is another iteration. We have aliminated this, and made the process very fast. It only takes up to 72 hours for a template/theme to get reviewed.
We are not an exclusive marketplace. This means that you can sell your items on PrepBootstrap, as well as on any other marketplate, and thus increase your earning potential.
Our standard payment plan provides for monthly payments. At the end of each month, all accumulated funds are transfered to your account.
The minimum amount of your balance should be at least 70 USD.
Buying a theme on PrepBootstrap is really simple. Each theme has a live preview.
Once you have selected a theme or template, which is to your liking, you can quickly and securely pay via Paypal.
Once the transaction is complete, you gain full access to the purchased product.


RNA expression [BAM] assay template
Description: RNA expression data submission via BAM files.
| Property | Description | Data Type |
|---|---|---|
|
protocol identifier
required |
Trial identifier used by lead organization, ie. Center for Experimental Therapeutics Program (CTEP) ID or Industry Sponsored ID. This is usually a short identifier. Example: E4412. | < string > |
|
assay creator
required |
Indicates what site is filling out the assay. |
<
string
>
|
|
enrichment method
required |
Method used for enriching for mRNA. |
<
string
>
|
|
sequencer platform
required |
Sequencer Model, e.g. HiSeq 2500, NextSeq, NovaSeq. |
<
string
>
|
|
paired end reads
required |
Indicates if the sequencing was performed paired or single ended. |
<
string
>
|
| enrichment kit | Vendor for the bait set used for enrichment, e.g. Twist, Agilent, IDT. |
<
string
>
|
Samples
| Property | Description | Data Type |
|---|---|---|
|
cimac id
required |
Specimen identifier assigned by the CIMAC-CIDC Network. Formatted as CTTTPPPSS.AA for trial code TTT, participant PPP, sample SS, and aliquot AA. |
<
string
>
as regex ^C[A-Z0-9]{3}[A-Z0-9]{3}[A-Z0-9]{2}.[0-9]{2}$
|
|
BAM file
required |
A BAM file, aligned or not, which contains both pairs of sequencing libraries | bam |
|
dv200
required |
The percentage of fragments > 200 nucleotides. (0-1) | < number > |
|
rqs
required |
RNA quality score. (0-10) | < number > |
|
quality flag
required |
Flag used for quality. | < number > |
| library yield ng | Resulting yield (in ng) from library construction. | < number > |
| rin | RNA integrity number. (0-10) | < number > |


---
layout: about
title: About
---
About
I have time to time an urge to write abot something what seems to me at the moment so exciting or important. Usually the feeling evaporates before I write a line
but sometimes I manage and if so, it ends up on this site.
Hosting
The predecessor of this site (obdelnik.cz) is hosted by Webnode free plan. This site is hosted by github and I hope I'll move the content from obdelnik.cz soon here too.
About the topics
I intend to write here mostly about the DIY project. The porpose is twofolded.
- to support my memory and keep track of references,
- to brag about the projects, heroic achievements, and ideally, to share it with others


This class is used to send nil values where an actual object is required in a value. Used in setting null for SoapParameter objects.
Inherits from NSObject*


Freelance Front End Deverloper
My name is Ali, I am a Freelance Front End Web Developer, Network administrator, software developer, and digital marketer. Founder of AlysTech ltd. I am a self-learned web developer and programmer. I enjoy using my skills to contribute to the exciting technological advances around Us. I graduated from the Federal Polytechnic Auchi, Edo State in 2018 with a Higher National Diploma in Computer Science.  I enjoy watching football, sci-fi movies, and reading.
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Company - Remo Traditional
Council,
Duration - 1yr [2019 to 2020]
Location - Sagumu, Ogun State,
Nigeria.
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Company - AlysTech Ltd
Duration - 2019 till Date
Location - Abuja, Nigeria.
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Company - Golden Olives
Academy
Duration -1yr [2016]
Location - Abuja, Nigeria.
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Company - Oseni Elamah ICT
Institute, Auchi, Edo State
Duration -1yr [2016]
Location - Edo State, Nigeria.
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Institution - Federal Polytechnic
Auchi
Session - 2016-2018
Aggregate - Upper-Credit
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Institution -Federal Polytechnic
Auchi
Session - 2013-2015
Aggregate -Upper-Credit
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Institution -Hira Comprehensive
College Edo State,
Session - 2014-2016
Aggregate -Dinstinction
Lorem ipsum dolor sit amet consectetur
adipisicing elit. Sed animi consequatur,
nisi, quis tempore minima excepturi unde
nihil ratione maiores.
Institution - Grace Divine
Secondary School
Session - 2012
Aggregate - 7/9 Credits
Come and Register for AlysTech and Get the best Ict
Services Ever.
The Possibilities are limitless.
We Also offer digital Marketing and Web Developement
Services
Register for AlysTech and Get the best Ict Services Ever. click the registration Button to get Started.
Register for AlysTech and Get the best Ict Services Ever. click the registration Button to get Started.
Register for AlysTech and Get the best Ict Services Ever. click the registration Button to get Started.
Come and Register for AlysTech and Get the best Ict
Services Ever.
The Possibilities are limitless.
+234<PHONE_NUMBER>
<EMAIL_ADDRESS>www.alystech.com


| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114 | 3x
3x
3x
3x
3x
3x
3x
2x
2x
2x
2x
2x
2x
2x
2x
2x
2x
2x
1x
1x
2x
2x
2x
2x
2x
2x
2x
2x
8x
8x
8x
8x
2x
2x
3x | const R = require('ramda');
const spawn = require('threads').spawn;
const Block = require('../blockchain/block');
const CryptoUtil = require('../util/cryptoUtil');
const Transaction = require('../blockchain/transaction');
const FEE_PER_TRANSACTION = 1;
const MINING_REWARD =<PHONE_NUMBER>;
class Miner {
constructor(blockchain, logLevel) {
this.blockchain = blockchain;
this.logLevel = logLevel;
}
mine(address) {
let baseBlock = Miner.generateNextBlock(address, this.blockchain.getLastBlock(), this.blockchain.transactions);
process.execArgv = R.reject((item) => item.includes('debug'), process.execArgv);
/* istanbul ignore next */
const thread = spawn(function (input, done) {
/*eslint-disable */
require(input.__dirname + '/../util/consoleWrapper.js')('mine-worker', input.logLevel);
const Block = require(input.__dirname + '/../blockchain/block');
const Miner = require(input.__dirname);
/*eslint-enable */
done(Miner.proveWorkFor(Block.fromJson(input.jsonBlock), input.difficulty));
});
console.info('Mining a new block');
return thread
.send({ __dirname: __dirname, logLevel: this.logLevel, jsonBlock: baseBlock, difficulty: this.blockchain.getDifficulty() })
.promise();
}
static generateNextBlock(address, previousBlock, blockchainTransactions) {
const index = previousBlock.index + 1;
const previousHash = previousBlock.hash;
const timestamp = new Date().getTime() / 1000;
// Get the first two avaliable transactions, if there aren't 2, it's empty
let transactions = R.defaultTo([], R.take(2, blockchainTransactions));
// Add fee transaction (1 satoshi per transaction)
// INFO: Usually it's a fee over transaction size (not amount)
if (transactions.length > 0) {
let feeTransaction = Transaction.fromJson({
id: CryptoUtil.randomId(64),
hash: null,
type: 'fee',
data: {
inputs: [],
outputs: [
{
amount: FEE_PER_TRANSACTION * transactions.length, // satoshis format
address: address, // INFO: Usually here is a locking script (to check who and when this transaction output can be used), in this case it's a simple destination address
}
]
}
});
transactions.push(feeTransaction);
}
// Add reward transaction of 50 coins
Eif (address != null) {
let rewardTransaction = Transaction.fromJson({
id: CryptoUtil.randomId(64),
hash: null,
type: 'reward',
data: {
inputs: [],
outputs: [
{
amount: MINING_REWARD, // satoshis format
address: address, // INFO: Usually here is a locking script (to check who and when this transaction output can be used), in this case it's a simple destination address
}
]
}
});
transactions.push(rewardTransaction);
}
return Block.fromJson({
index,
nonce: 0,
previousHash,
timestamp,
transactions
});
}
static proveWorkFor(jsonBlock, difficulty) {
let blockDifficulty = null;
let start = process.hrtime();
let block = Block.fromJson(jsonBlock);
// INFO: Every cryptocurrency has a different way to prove work, this is a simple hash sequence
// Loop incrementing the nonce to find the hash at desired difficulty
do {
block.timestamp = new Date().getTime() / 1000;
block.nonce++;
block.hash = block.toHash();
blockDifficulty = block.getDifficulty();
} while (blockDifficulty >= difficulty);
console.info(`Block found: time '${process.hrtime(start)[0]} sec' dif '${difficulty}' hash '${block.hash}' nonce '${block.nonce}'`);
return block;
}
}
module.exports = Miner; |


Understanding of BJP to broach sharing of CM's post: Sanjay Raut
Reacting to comments made by BJP leaders after a meeting of that party's state core team here, Raut also said imposition of President's rule will be an insult to people of Maharashtra
by PTIShiv Sena MP Sanjay Raut on November 5 said it was "very understanding" of the BJP to broach the subject of sharing of Maharashtra CM's post for 2.5 years.
Reacting to comments made by BJP leaders after a meeting of that party's state core team here, Raut also said imposition of President's rule will be an insult to people of Maharashtra.
"I haven't heard what they (BJP) leaders said. But if they have indeed spoken about discussing the sharing of CM's post, then I must say it is very understanding of them," Raut told a Marathi TV channel.
The Sena leader said, "we want a written assurance from BJP (over sharing the CM's post) as has been our stand from day one."
The BJP and Shiv Sena are locked in a bitter tussle over the issue of chief minister's post, resulting in a stalemate in government formation despite results of the Assembly polls giving the BJP-Sena alliance a combined seat strength of 161, way past the 145 majority mark in the 288- member House.
In the polls, the BJP won 105 seats, Shiv Sena-56, NCP-54 and the Congress won 44 seats.Special Thursday Expiry on 10th 7th Nov
Early Closure to The Great Diwali Discount. Last Chance to get Moneycontrol PRO for a year @ Rs. 289/- only
Coupon code: DIWALI


This too was a gift to someone. This Amulet provides good fortune to embedded programmers. Made from Aluminum on the Drill Press. The pins were soldered to the holes in the part.


TFSM means TestComplete Find Search Mode. TFSM is a name of the search algorithm. It uses Test Complete API to find AUT's objects.
Just add :TFSM:
prefix at beginning of the recognition string.
Example:
[MainWindow]
MainWindow=":TFSM:processName=iexplore;objecttype=Page;url=http://www.google.ca/"
HtmlLink="TFSM:tagName=A;namePropStr=advanced_search*"
Note: processName if not a window property, but TFSM must require as part of the main window recognition string only.
Above example is for IE, so the processName is "iexplore". The processName is case insensitive and define anywhere into the string.
Yes, add :TFSM:
prefix to the recognition string. SAFS engine will process prefix tag appropriately.
MainWindow may be regular TC recognition string and HtmlLink can be TFSM mode. Any combination works.
Example: User can define appmap following way
[MainWindow]
MainWinow="Sys.Process("iexplore").IEFrame(0).Window("WorkerW", "Navigation Bar", 1).Window("ReBarWindow32", "", 1).Window("Address Band Root", "", 1).Window("ToolbarWindow32", "Address Combo Control", 1)"
HtmlLink ="TFSM:tagName=A;namePropStr=advanced_search*"
Yes, TFSM supports regular expression. It follows the Test Complete regular expression standards.
Example:
[MainWindow]
MainWindow=":TFSM:processName=iexplore;objecttype=Page;url=http://www.google.ca/"
HtmlLink ="TFSM:tagName=A;namePropStr=advanced_search*"
There are no such any rules, but as long as the object has unique property then it should work. Normally, two property are enough for the best practices.
Example:
HtmlLink ="TFSM:tagName=A;namePropStr=advanced_search*"
There is possibility that the component objects are very deep into the AUT and TFSM can't reach them. However, user can specify depthLevel=<some number>
to increase the TFSM search area.
Example:
[MainWindow]
MainWindow=":TFSM:processName=iexplore;objecttype=Page;url=http://www.google.ca/"
HtmlLink="TFSM:tagName=A;namePropStr=advanced_search*;depthLevel=200"
Note: depthLevel is case insensitive and default number is 5.


Represental State Transfer Application Proggraming Interface (REST API) is a simple way to intract. You can see some examples right here


Free
Free forever
No CC required
All-in-one low-code platform
Unlimited apps
SSO
Community support
Max users: 5
Premium
per user / month, billed annually
$10 billed monthly
Backups
Custom branding
Unlimited plugins
1 week automation logs
Community support
Business
per user / month, billed annually
$20 billed monthly
Audit logs
User groups
Environment variables
Synchronous automations
Email support


Use OpenCV to acquire video
07 Mar 2015Goals
- Use raspberry to record video from USB camera and stream to disk.
- Use python and opencv
- will save either as a sequence of .tif or as an uncompressed videofile
Install opencv
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libopencv-dev python-opencv
- Remember that I have conda install of python in ‘/home/pi/miniconda/bin/python’.
- I need to use ‘/usr/bin/python’ instead.
Check opencv install
pi@pi40 ~ $ /usr/bin/python
Python 2.7.3 (default, Mar 18 2014, 05:13:23)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> cv2.__version__
'2.4.1'
Install USB thumb drive + usb camera
-
after pluggin in usb drive + usb camera
pi@pi40 ~ $ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. Bus 001 Device 005: ID 1415:2000 Nam Tai E&E Products Ltd. or OmniVision Technologies, Inc. Sony Playstation Eye
Bus 001 Device 004: ID 13fe:4100 Kingston Technology Company Inc.
Got some python/opencv code to acquire
- Acquires individual .tif files in a loop
To do
- Check the frame rate by recording a clock
- Add in template code for stop/start, start with keyboard and then move to GPIO
- Get the DC60 STK1160 video to usb dongle working
- This website says that it may just auto detect in newer linux kernels? http://linuxtv.org/wiki/index.php/Stk1160# Making_it_Work
Here is the code
#/usr/bin/python
import numpy as np
import cv2
# initialize camera
cap = cv2.VideoCapture(0)
if cap is None:
print 'Warning: unable to access camera'
# stopPin = 7 # listen for a change on this pin to stop
# number of frames to acquire
numFrames = 30
currFrame = 0
# outfilebase = 'images/image' # append number + .tif
print 'starting capture of ' + str(numFrames) + ' frames.'
print 'press ctrl-c to stop ... eventually we will stop on a TTL'
while(cap.isOpened()):
try:
ret, frame = cap.read()
if ret==True:
# flip frame
# frame = cv2.flip(frame,0)
# print frame.shape
# write the flipped frame
try:
# out.write(frame)
# cv2.SaveImage('file' + str(currFrame) + '.tif', frame)
cv2.imwrite('images/image' + str(currFrame) + '.tif', frame)
except:
print 'Error in out.write() OR user hit ctrl-c'
break
currFrame += 1
# if (currFrame > numFrames):
# print 'finished ' + str(numFrames) + ' frames.'
# break
else:
break
except KeyboardInterrupt:
print 'user hit ctrl-c'
print 'frames=' + str(currFrame)
break
# Release camera
cap.release()


THESIS
THE DEVELOPMENT AND FIELD TESTING OF A WRITTEN OCCUPATIONAL COMPETENCY EXAMINATION FOR
AUTO MECHANIC TEACHERS
Submitted by
William James Crain
In partial fulfillment of the requirements for the Degree of Doctor of Philosophy Colorado State University Fort Collins, Colorado
August, 1973
©


Some other things you might want to do¶
Delete a branch on GitHub¶
git strongly encourages making a new branch each time you make a change in the code. At some point you will need to clean up the branches you no longer need– that point is after your changes have been accepted if you made a pull request for those changes.
There are two places to delete the branch: in your local repo and on GitHub.
You can do these independent of each other.
To delete both your local copy AND the GitHub copy from the command line follow these instructions:
# change to the master branch (if you still have one, otherwise change to
# another branch)
git checkout master
# delete branch locally
# Note: -d tells git to check whether your branch has been merged somewhere
# if it hasn't, and you delete it, it is gone forever.
#
# Use -D instead to force deletion regardless of merge status
git branch -d my-unwanted-branch
# delete branch on GitHub
git push origin :my-unwanted-branch
(Note the colon :
before test-branch
.) See Github’s instructions for
deleting a branch
if you want to delete the GitHub copy through GitHub.
Several people sharing a single repository¶
If you want to work on some stuff with other people, where you are all committing into the same repository, or even the same branch, then just share it via GitHub.
First fork Astropy into your account, as from Make your own copy of Astropy on GitHub.
Then, go to your forked repository GitHub page, e.g.,
http://github.com/your-user-name/astropy
Click on the ‘Admin’ button, and add anyone else to the repo as a collaborator:
Now all those people can do:
git clone git@githhub.com:your-user-name/astropy.git
Remember that links starting with git@
use the ssh protocol and are
read-write; links starting with git://
are read-only.
Your collaborators can then commit directly into that repo with the usual:
git commit -am 'ENH - much better code'
git push origin master # pushes directly into your repo
Explore your repository¶
To see a graphical representation of the repository branches and commits:
gitk --all
To see a linear list of commits for this branch:
git log
You can also look at the network graph visualizer for your GitHub repo.
Rebasing on trunk¶
Let’s say you thought of some work you’d like to do. You
Fetch the latest Astropy and Make a new feature branch called
cool-feature
. At this stage trunk is at some commit, let’s call it E. Now
you make some new commits on your cool-feature
branch, let’s call them A,
B, C. Maybe your changes take a while, or you come back to them after a while.
In the meantime, trunk has progressed from commit E to commit (say) G:
A---B---C cool-feature
/
D---E---F---G trunk
At this stage you consider merging trunk into your feature branch, and you remember that this here page sternly advises you not to do that, because the history will get messy. Most of the time you can just ask for a review, and not worry that trunk has got a little ahead. But sometimes, the changes in trunk might affect your changes, and you need to harmonize them. In this situation you may prefer to do a rebase.
Rebase takes your changes (A, B, C) and replays them as if they had been made
to the current state of trunk
. In other words, in this case, it takes the
changes represented by A, B, C and replays them on top of G. After the rebase,
your history will look like this:
A'--B'--C' cool-feature
/
D---E---F---G trunk
See rebase without tears for more detail.
To do a rebase on trunk:
# Update the mirror of trunk
git fetch upstream
# Go to the feature branch
git checkout cool-feature
# Make a backup in case you mess up
git branch tmp cool-feature
# Rebase cool-feature onto trunk
git rebase --onto upstream/master upstream/master cool-feature
In this situation, where you are already on branch cool-feature
, the last
command can be written more succinctly as:
git rebase upstream/master
When all looks good you can delete your backup branch:
git branch -D tmp
If it doesn’t look good you may need to have a look at Recovering from mess-ups.
If you have made changes to files that have also changed in trunk, this may generate merge conflicts that you need to resolve - see the git rebase man page for some instructions at the end of the “Description” section. There is some related help on merging in the git user manual - see resolving a merge.
 If the branch you
rebased is called cool-feature
and your GitHub fork is available as the
remote called origin
, you use this command to force-push:
git push -f origin cool-feature
Note that this will overwrite the branch on GitHub, i.e. this is one of the few
ways you can actually lose commits with git. Also note that it is never allowed
to force push to the main astropy repo (typically called upstream
), because
this would re-write commit history and thus cause problems for all others.
Recovering from mess-ups¶
Sometimes, you mess up merges or rebases. Luckily, in git it is relatively straightforward to recover from such mistakes.
If you mess up during a rebase:
git rebase --abort
If you notice you messed up after the rebase:
# Reset branch back to the saved point
git reset --hard tmp
If you forgot to make a backup branch:
# Look at the reflog of the branch
git reflog show cool-feature
8630830 cool-feature@{0}: commit: BUG: io: close file handles immediately
278dd2a cool-feature@{1}: rebase finished: refs/heads/my-feature-branch onto 11ee694744f2552d
26aa21a cool-feature@{2}: commit: BUG: lib: make seek_gzip_factory not leak gzip obj
...
# Reset the branch to where it was before the botched rebase
git reset --hard cool-feature@{2}
Rewriting commit history¶
Note
Do this only for your own feature branches.
 Or perhaps the you made several false starts you would like the posterity not to see.
This can be done via interactive rebasing.
Suppose that the commit history looks like this:
git log --oneline
eadc391 Fix some remaining bugs
a815645 Modify it so that it works
2dec1ac Fix a few bugs + disable
13d7934 First implementation
6ad92e5 * masked is now an instance of a new object, MaskedConstant
29001ed Add pre-nep for a couple of structured_array_extensions.
...
and 6ad92e5
is the last commit in the cool-feature
branch. Suppose we
want to make the following changes:
- Rewrite the commit message for
13d7934
to something more sensible. - Combine the commits
2dec1ac
,a815645
,eadc391
into a single one.
We do as follows:
# make a backup of the current state
git branch tmp HEAD
# interactive rebase
git rebase -i 6ad92e5
This will open an editor with the following text in it:
pick 13d7934 First implementation
pick 2dec1ac Fix a few bugs + disable
pick a815645 Modify it so that it works
pick eadc391 Fix some remaining bugs
# Rebase 6ad92e5..eadc391 onto 6ad92e5
#
# Commands:
# p, pick = use commit
# r, reword = use commit, but edit the commit message
# e, edit = use commit, but stop for amending
# s, squash = use commit, but meld into previous commit
# f, fixup = like "squash", but discard this commit's log message
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#
To achieve what we want, we will make the following changes to it:
r 13d7934 First implementation
pick 2dec1ac Fix a few bugs + disable
f a815645 Modify it so that it works
f eadc391 Fix some remaining bugs
This means that (i) we want to edit the commit message for 13d7934
, and
(ii) collapse the last three commits into one. Now we save and quit the
editor.
Git will then immediately bring up an editor for editing the commit message. After revising it, we get the output:
[detached HEAD 721fc64] FOO: First implementation
2 files changed, 199 insertions(+), 66 deletions(-)
[detached HEAD 0f22701] Fix a few bugs + disable
1 files changed, 79 insertions(+), 61 deletions(-)
Successfully rebased and updated refs/heads/my-feature-branch.
and the history looks now like this:
0f22701 Fix a few bugs + disable
721fc64 ENH: Sophisticated feature
6ad92e5 * masked is now an instance of a new object, MaskedConstant
If it went wrong, recovery is again possible as explained above.
Converting a GitHub issue to a pull request¶
Sometimes you have a branch in your own GitHub repository designed to fix one particular issue. If that issue is listed on GitHub, a natural way to address it is to convert the issue to a pull request by attaching code containing the fix for the issue. This can currently only be done using the GitHub API (there’s no button or anything on the web site that does it, at least as of 2/6/2012). There are two options to do this, both of which only work if you own the repository or have the ability to commit directly to it (for Astropy, that means being an Astropy maintainer):
You can use the script at https://gist.github.com/1750715, which will do this for you automatically — just download the script and run it as a python command-line script, using the
python issue2pr.py --help
option to determine the precise usage.You can use the
hub
command-line utility provided here by GitHub. Once installed, you can attach a branch to a pull request by doing:hub pull-request -i <ID> -b astropy:master -h <USER>:<BRANCH>
where
<ID>
is the ID of the issue,<USER>
is the username, and<BRANCH>
is the name of the branch you want to attach to the issue. For example:hub pull-request -i 42 -b astropy:master -h galahad:feature
will attach the
feature
branch fromgalahad
‘s Astropy repository to issue 42.The
hub
command can do a lot more to interact with GitHub, so be sure to read their documentation. For example, you can fetch all branches of a repository for a given user by doing:hub fetch <USER>
Merge commits and cherry picks¶
Let’s say that you have a fork (origin) on GitHub of the main Astropy repository (upstream). Your fork is up to date with upstream’s master branch and you’ve made some commits branching off from it on your own branch:
upstream:
master
|
A--B--C
origin:
upstream/master
|
A--B--C
\
D--E
|
issue-branch
Then say you make a pull request of issue-branch against Astroy’s master, and the pull request is accepted and merged. When GitHub merges the pull request it’s basically doing the following in the upstream repository:
$ git checkout master
$ git remote add yourfork file:///path/to/your/fork/astropy
$ git fetch yourfork
$ git merge --no-ff yourfork/issue-branch
Because it always uses --no-ff
we always get a merge commit (it is possible
to manually do a fast-forward merge of a pull request, but we rarely ever do
that). Now the main Astropy repository looks like this:
upstream:
master
|
A--B--C------F
\ /
D--E
|
yourfork/issue-branch
where “F” is the merge commit GitHub just made in upstream.
When you do cherry-pick of a non-merge commit, say you want to just cherry-pick “D” from the branch, what happens is it does a diff of “D” with its parent (in this case “C”) and applies that diff as a patch to whatever your HEAD is.
The problem with a merge commit, such as “F”, is that “F” has two parents: “C” and “E”. It doesn’t know whether to apply the diff of “F” with “C” or the diff of “F” with “E”. Clearly in this case of backporting a pull request to a bug fix branch we want to apply everything that changed on master from the merge, so we want the diff of “F” with “C”.
Since GitHub was on master
when it did git merge yourfork/issue-branch
, the
last commit in master
is the first parent. Basically whatever HEAD you’re on
when you do the merge is the first parent, and the tip you’re merging from is
the second parent (octopus merge gets more complicated but only a little, and
that doesn’t apply to pull requests). Since parents are numbered starting from
“1” then we will always cherry-pick merge commits with -m 1
in this case.
That’s not to say that the cherry-pick will always apply cleanly. Say in upstream we also have a backport branch that we want to cherry pick “F” onto:
upstream:
backport
|
G master
/ |
A--B----C------F
\ /
D--E
We would do:
$ git checkout backport
$ git cherry-pick -m 1 F
But this applies the diff of “F” with “C”, not of “F” with “G”. So clearly there’s potential for conflicts and incongruity here. But this will work like any merge that has conflicts–you can resolve any conflicts manually and then commit. As long as the fix being merged is reasonably self-contained this usually requires little effort.


Auth Component
MSA has it's own auth module that can be used for managing users. All users objects are stored in the
site-{site_name}-users
collection.
Auth User Guide
just.auth(login, password)
Authorizes the user at the system. Returns a Promise object that will be resolved into an array with an error and an object which contains a current site name and an active session identifier.
Params: login
and password
of the user.
just
<EMAIL_ADDRESS>"sdfj38D$hd")
.then(function(res) {
// your code here
})
just.auth_register(params)
Registers a new user at the system. Returns a Promise object that will be resolved into an array with an error and an object which contains an activation link and mail options that have been sent to the user email for the activation.
Params: an object with user details including mandatory fields _id
and password
.
just
.auth_register({_id<EMAIL_ADDRESS>password: "mgJ8$fgG"})
.then(function(res) {
// your code here
})
The activation link already contains all necessary infogration for activating the user account. Once user procceeds with the link he is being registered at the system.
just.auth_users()
Retrieves all users of the system. Returns a Promise object that will be resolved into an array with an error and an array with users objects.
just
.auth_users()
.then(function(res) {
// your code here
})
just.auth_check()
Checks if a user is logged-in at the system. Returns a Promise object that will be resolved into an array with an error and a boolean.
just
.auth_check()
.then(function(res) {
// your code here
})
just.auth_logout()
Logout the user at the system. Returns a Promise object that will be resolved into an array with an error and a boolean.
just
.auth_logout()
.then(function(res) {
// your code here
})
just.auth_update(params)
Updates a user data. Accepts an object with user data to be updated. Returns Promise object.
just
.auth_update()
.then(function(res) {
// your code here
})
just.auth_change_password(params)
Updates a password of a user. params is an object with new_password and old_password keys. Returns Promise object.
just
.auth_change_password({ old_password: 'ksdfhf8jsd7H', new_password: 'fhs6H*Rhh$k' })
.then(function(res) {
// your code here
})
just.auth_delete(login || [login1, login2, ...])
Removes a user or a group of users from the system. Accepts a login string or an array of logins. Returns Promise object.
just
<EMAIL_ADDRESS><EMAIL_ADDRESS>.then(function(res) {
// your code here
})
Resetting Password Process
just.auth_request_reset_password(params)
Performs request for reseting password. params is an object that contains User Id. Returns Promise object.
just
.auth_request_reset_password({_id: User._id})
.then(function(res) {
// your code here
})
just.auth_reset_password(params, reset_token)
Resets password of the user. params is an object that contains new password. reset_token is a token that gets from user email link (more information about link read below). Returns Promise object.
just
.auth_reset_password({password: 'sjd84vbK&j'}, 'caerpq847bc9uerghjse4j3htaoi7ury')
.then(function(res) {
// your code here
})


@Master['Master/base.sshtml'] @Section['BaseHead'] @EndSection @Section['BaseContent']
No account? No problem! Simply message @!Model.IrcClient.Nickname on @!Model.IrcClient.ClientName with @!Model.AppConfiguration.CommandPrefix;account register. Then, set a password by messaging @!Model.IrcClient.Nickname again with @!Model.AppConfiguration.CommandPrefix;account webpass sup3rsekr1t.
@!Model.IrcClient.Nickname
@!Model.AppConfiguration.CommandPrefix;account register
@!Model.AppConfiguration.CommandPrefix;account webpass sup3rsekr1t
EyeInTheSky tracks users by their NickServ account name on @!Model.IrcClient.ClientName, so your username here will match your @!Model.IrcClient.ClientName NickServ account name.


This is some sample html to edit. Each panel is able to be edited in their respective language and the result is shown in the output panel. Feel free to try it out! This is based on the jsbin website, a live pastebin for HTML, CSS and JavaScript


Lately it seems like all of my posts are about things that are super, painfully, embarrassingly obvious in hindsight. The trend continues!
Over the last week I've been learning to use Chef to set up some servers at work (with the help of the iron_chef gem, which was written by a co-worker of mine). At this point I feel like a real dummy for never having bothered to use Chef before, especially since it's been around for some time now. If you're not using Chef for server management you really ought to look into it. It makes automating your setup easy and having everything that your servers need documented in your scripts is awesome.
Despite quickly becoming a "why wasn't I using this before?" sort of tool there's been a few conceptual hurdles, as there always is with any framework or DSL. The one that really got me is the not_if
/only_if
conditional guards on resource blocks. The Chef documentation lays it out in what seems like a straightforward manner:
The not_if and only_if conditional executions can be used to put additional guards around certain resources so that they are only run when the condition is met.
Seems simple right? Well, if you look around enough you'll see examples of not_if
and only_if
used with either a block passed as the argument or with a String passed as the argument.
Here's two quick real and I swear not-contrived examples. One with a block:
bash 'unarchive-lame-source' do cwd ::File.dirname(src_filepath) code <<-EOH tar zxf #{::File.basename(src_filepath)} -C #{::File.dirname(src_filepath)} EOH not_if { ::File.directory?(::File.join(Chef::Config[:file_cache_path] || 'tmp', "lame-#{node['lame']['version']}")) } end
And one with a string:
bash 'compile-lame-source' do cwd ::File.dirname(src_filepath) code <<-EOH cd lame-#{node['lame']['version']} && ./configure #{lame_options.join(' ')} && make && make install EOH not_if 'sudo ldconfig && ldconfig -p | grep libmp3lame' end
Here comes the embarrassing part. To me, at least, it wasn't clear what each form of the method call did, or really that there is a difference between the two. When passing a block as the argument, the result of the block, truthy or falsy, determines whether or not the resource is run. When passing a String, it is executed as a shell command and the return result of the command is used to determine whether or not the resource is run. Remember, for shell commands a return result of 0 indicates success (or true) and anything else, typically 1, but it can be any non-zero value, indicates failure (or false).
At first I was naively trying to use not_if
like this not_if { 'sudo ldconfig && ldconfig -p | grep libmp3lame' }
expecting the block to run the command. Instead, the block just returns the string. Since Strings are truthy the block always returns true and always skips the resource for not_if
or runs the resource for only_if
.
If we take a look at the source for Chef::Resource::Conditional#initialize
it becomes pretty clear what's going on.
def initialize(positivity, command=nil, command_opts={}, &block) @positivity = positivity case command when String @command, @command_opts = command, command_opts @block = nil when nil raise ArgumentError, "only_if/not_if requires either a command or a block" unless block_given? @command, @command_opts = nil, nil @block = block else raise ArgumentError, "Invalid only_if/not_if command: #{command.inspect} (#{command.class})" end end
Here we can clearly see that if the optional command is passed as a String the Chef::Resource::Conditional
object is initialized with the command and command options and the block instance variable set to nil (and importantly, ignored if it was passed at all). If no command was passed but a block was given then the command and command options instance variables are set to nil and the block instance variable is set to the block that was passed. And finally an exception is raised if no command or block is given or if something weird is passed as the command.
And if you look a little bit further down in the source you'll find where the conditional is actually evaluated:
def evaluate @command ? evaluate_command : evaluate_block end def evaluate_command shell_out(@command, @command_opts).status.success? rescue Chef::Exceptions::CommandTimeout Chef::Log.warn "Command '#{@command}' timed out" false end def evaluate_block @block.call end
Pretty much exactly as I described above. If the command instance variable is present, it'll evaluate the command, otherwise it'll call the block. If you're interested in seeing how the cross-platform shell_out
method works you can check out the source, it's definitely worth a read.
In fact, I think the takeaway from all of this is, when in doubt, go straight to the source code. It'll save you lots of time and you'd be hard pressed to not learn something new, especially if you're diving into a well-known and properly designed library.