Developer Guide¶
The following is a set of guidelines for creating new systems as extension to current ones and some information about ground architecture of the ATF assets.
Creating new system¶
Here is some base steps for creating and integrating some new system.
Initializer¶
The AtfInitializer class is for instantiating automatically all MonoSingleton<T> instances as Initializer game object child that are marked by AtfSystem attribute.
In context of ATF it is used to instantiate all main systems described below.
1 2 3 4 5 6 7 8 9 10 11 | using ATF.Scripts.DI;
using ATF.Scripts.Helper;
namespace MyLovely.Namespace
{
[AtfSystem]
public class MyNewSystem : MonoSingleton<MyNewSystem>
{
...
}
}
|
If you now enter the Play Mode the AtfInitializer class will instantiate as child of itself your newly created class MyNewSystem.
DI Container¶
DI Container stands for Dependency Injection Container. It’s a common method to implement the Dependency Inversion Principle (DIP) of SOLID principles. Usage:
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 | using ATF.Scripts.DI;
using ATF.Scripts.Helper;
namespace MyLovely.Namespace
{
public interface IMySystem {
...
}
[AtfSystem]
[Injectable]
public class MyNewSystemA : MonoSingleton<MyNewSystemA>, IMySystem
{
...
}
[AtfSystem]
[Injectable]
public class MyNewSystemB : MonoSingleton<MyNewSystemB>
{
...
}
[AtfSystem]
[Injectable]
public class MyNewSystemC : MonoSingleton<MyNewSystemC>, IMySystem
{
[Inject(typeof(MyNewSystemA))]
public static readonly IMySystem SYSTEM_A;
[Inject(typeof(MyNewSystemB))]
public static readonly MyNewSystemB SYSTEM_B;
...
}
}
|
The main attributes here are Injectable and Inject. First is used to appear in queue to dependency injection. Second is used with one required parameter of Type class. The purpose of the second is to mark field of class that is to be populated by instance of class that has type Type via DI Container.
Note
Every ATF system has Injectable and AtfSystem attributes so you can use them in your own systems.
Platform Diagram¶
Every block at the ATF platform diagram above is an isolated class group:
Custom Unity Input Module – an abstraction that combines input management;
Custom Input API – module that calls native methods on an input request;
Custom BaseInput – an entity that is an implementation of a data flow processing object across a bridge combining static methods for intercepting/simulating input and wrapped events;
Storage – a group of classes that is responsible for storing and manipulating recorded actions;
Recorder – a group of classes that is responsible for recording actions;
Custom Editor UI – a system of custom windows for managing all processes;
PlayerPrefs Save/Load Module – system for implementing the module for saving / loading recorded actions based on the standard PlayerPrefs class;
Dictionary based Module – implementation of the recorded action store abstraction based on the Dictionary data structure;
Queue based Recorder Module – implementation of the module responsible for recording actions based on the Queue data structure with RLE-compression;
Main systems¶
The next several titles are describing the base system interfaces of the ATF.
Some of them implement the following interface describing cursor get and set methods.
To check the current realisations just visit our github page.
1 2 3 4 5 6 7 | namespace ATF.Scripts.Helper {
public interface IAtfGetSetRecordName
{
string GetCurrentRecordName();
void SetCurrentRecordName(string recordName);
}
}
|
Recorder System¶
The Recorder System is serving as arbitrator. It’s current realisation based on classic state machine. And it implements the following interface.
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 | using ATF.Scripts.Helper;
namespace ATF.Scripts.Recorder
{
public interface IAtfRecorder : IAtfGetSetRecordName
{
bool IsRecording();
bool IsPlaying();
bool IsRecordingPaused();
bool IsPlayPaused();
bool IsInputStopped();
void PlayRecord();
void PausePlay();
void ContinuePlay();
void StopPlay();
void StartRecord();
void PauseRecord();
void ContinueRecord();
void StopRecord();
void SetRecording(bool value);
void SetPlaying(bool value);
void SetRecordingPaused(bool value);
void SetPlayPaused(bool value);
void SetInputStopped(bool value);
void Record(FakeInput kind, object input, object fakeInputParameter);
object GetLastInput(FakeInput kind, object fakeInputParameter);
void SetLastInput(FakeInput kind, object realInput, object fakeInputParameter);
}
}
|
Action Storage System¶
The Action Storage System is a core of the ATF. It implements the following interface and stores recorded actions in format of generic type Dictionary<string, Dictionary<FakeInput, Dictionary<object, AtfActionRleQueue>>>.
Where string - is name of the record, FakeInput is enum described below, object - is parameter of the input and AtfActionRleQueue is basic queue data structure but with RLE-compression of the elements.
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 | using System.Collections.Generic;
using ATF.Scripts.Helper;
using ATF.Scripts.Storage.Utils;
using UnityEditor.IMGUI.Controls;
namespace ATF.Scripts.Storage.Interfaces
{
public interface IAtfActionStorage : IAtfGetSetRecordName
{
object GetPartOfRecord(FakeInput kind, object fakeInputParameter);
void Enqueue(string recordName, FakeInput kind, object fakeInputParameter, AtfAction atfAction);
AtfAction Dequeue(string recordName, FakeInput kind, object fakeInputParameter);
AtfAction Peek(string recordName, FakeInput kind, object fakeInputParameter);
bool PrepareToPlayRecord(string recordName);
void ClearPlayStorage();
void SaveStorage();
void LoadStorage();
void ScrapSavedStorage();
List<TreeViewItem> GetSavedRecordNames();
List<TreeViewItem> GetCurrentRecordNames();
List<TreeViewItem> GetCurrentActions(string recordName);
List<TreeViewItem> GetSavedActions(string recordName);
void Export(string fullPath);
void Import(string fullPath);
}
}
|
FakeInput enum is the following:
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 | public enum FakeInput {
NONE,
ANY_KEY_DOWN,
ANY_KEY,
GET_AXIS,
GET_AXIS_RAW,
GET_BUTTON,
GET_BUTTON_DOWN,
GET_BUTTON_UP,
GET_KEY,
GET_KEY_DOWN,
GET_KEY_UP,
GET_MOUSE_BUTTON,
GET_MOUSE_BUTTON_DOWN,
GET_MOUSE_BUTTON_UP,
GET_TOUCH,
MOUSE_POSITION,
TOUCH_COUNT,
MOUSE_SCROLL_DELTA,
TOUCH_SUPPORTED,
COMPOSITION_STRING,
IME_COMPOSITION_MODE,
COMPOSITION_CURSOR_POS,
MOUSE_PRESENT,
SIMULATE_MOUSE_WITH_TOUCHES
}
|
And it’s represent any kind of input that we can acquire from Input class.
Packer System¶
The following interface define how to pack and unpack storage data into serializable Slot class.
The current realisation of it is using greedy algorithm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | using System.Collections.Generic;
using ATF.Scripts.Storage.Utils;
using UnityEngine;
namespace ATF.Scripts.Storage.Interfaces
{
public interface IAtfPacker
{
List<Record> Pack(Dictionary<string, Dictionary<FakeInput,
Dictionary<object, AtfActionRleQueue>>> input);
Dictionary<string, Dictionary<FakeInput, Dictionary<object,
AtfActionRleQueue>>> Unpack(Slot slot);
string ValidatePacked(List<Record> packed);
}
}
|
Action Storage Saver System¶
Because of the potential need in saving storage data in different places (ex. file system, PlayerPrefs class, etc.) this interface was created. The current realisation uses PlayerPrefs class. You can always expand this on file system for example by implementing this interface with specific file system API usage.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | using System.Collections;
using System.Collections.Generic;
using ATF.Scripts.Helper;
using UnityEditor.IMGUI.Controls;
namespace ATF.Scripts.Storage.Interfaces
{
public interface IAtfActionStorageSaver : IAtfGetSetRecordName
{
void SaveRecord();
void LoadRecord();
void ScrapRecord();
IEnumerable GetActions();
void SetActions(IEnumerable actionEnumerable);
List<TreeViewItem> GetSavedNames();
List<TreeViewItem> GetSavedRecordDetails(string recordName);
void ExportFile(string fullPath);
void ImportFile(string fullPath);
}
}
|
Integrator System¶
This interface define methods for automatic integrator system that allow preparing and saving group of selected source files and integrating them.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | using System.Collections.Generic;
using ATF.Scripts.Helper;
namespace ATF.Scripts.Integration.Interfaces
{
public interface IAtfIntegrator : IAtfGetSetRecordName
{
void SetUris(IEnumerable<string> filePaths);
void Integrate();
void IntegrateAndReplace();
void IntegrateAll();
void SaveUris();
IEnumerable<string> LoadUris();
}
}
|
Note
This current realisations might be changed during the development of the ATF, so in this page only interfaces are illustrated. SOLID rules.


Social Coding 101
- Create an account
- Explore
- Follow someone
- Watch something
- Use your dashboard
- RSS your feed
- Learn symbols
- Install a client
- Install a better client!
- Learn Git in 15 minutes
- Create a repo
- Create a good README.md
- Fork and then clone
- Share a GIST
- Use your free xxx.github.com repo
- Learn "markdown"
- Try the wiki
- GitHub Pages
- Use the fork-push-pull model
- Commit often
- Merge/rebase first or don’t bother!
- Make pull requests
- Submit Issues
- Label bugs
- Make a milestone
- Communicate
- Tag
- Add terms and conditions
- Use hooks
- Try the GitHub API
Getting Started
- Create an account
- Explore
- Follow someone
- Watch something
- Use your dashboard
- RSS your feed
- Learn symbols
- Install a client
- Install a better client!
- Learn Git in 15 minutes
Share a Repo
- Create a repo
- Create a good README.md
- Fork and then clone
- Share a GIST
- Use your free xxx.github.com repo
- Learn "markdown"
- Try the wiki
- GitHub Pages
Contribute – the right way!
- Use the fork-push-pull model
- Commit often
- Merge/rebase first or don’t bother!
- Make pull requests
- Submit Issues
- Label bugs
- Make a milestone
- Communicate
- Tag
GitHub Workflow
Misc
- Create an Organization
- Add terms and conditions
- Use hooks
- Try the GitHub API


Get free entry or special offers at these UK attractions by showing a National Lottery ticket
The National Lottery is saying #ThanksToYou for the around £30million players raise for good causes every week as part of its 25th birthday celebrations
by Dave Masters, https://www.mirror.co.uk/authors/dave-masters/Your National Lottery ticket will get you free entry or special offers at National Lottery-funded venues across the UK between November 23 to December 1.
Hundreds of National Lottery-funded attractions are throwing open their doors or releasing special offers to say #ThanksToYou to players who contribute around £30million to good causes every week.
And with so many popular venues taking part, there really is something for everybody - no matter where you live.
Use our venue finder below to locate the nearest attraction to you.
Among those joining in the celebrations are the Eden Project in Cornwall (below) which is offering visitors free entry (max two adults, two kids), while Derby Arena is inviting guests to go for a spin on its velodrome cycle track.
Free medieval wall walks are taking place at Lincoln Castle (also below) where you can explore the towers and dungeons, or you can get discounted tickets to see A Christmas Carol at London's famous Old Vic theatre.
Other popular venues across the country also running special promotions to celebrate The National Lottery's 25th birthday include the popular V&A Dundee, iconic Murrayfield Stadium, historic Cardiff Castle and The Giant's Causeway, which is one of many selected National Trust properties taking part.
The fantastic offer is part of The National Lottery's 25th birthday and celebrates the incredible difference The National Lottery has made – and continues to make – to the lives of people and communities throughout the whole of the UK.
By simply showing your National Lottery ticket you can unlock exclusive deals including free entry, behind-the-scenes tours or discounted offers.
Since the first National Lottery draw 25 years ago, thousands of millionaires (more than 5,500 to date) have been created. National Lottery players have also raised an amazing £40billion for good causes all over the UK, an average of 200 grants in every UK postcode district.
We've listed some of the amazing venues taking part but there are hundreds of venues waiting to welcome players with their National Lottery tickets - simply use our finder tool to locate your nearest!
To qualify for the promotion, all you have to do is bring along a ticket to any National Lottery game - such as Lotto, Euromillions, Thunderball, Hot Picks, Set for Life, Instant Win Games and Scratchcards.
You'll then be able to gain free entry or special offers at hundreds of fantastic National Lottery-funded venues and attractions across the UK during those nine days.
Follow the six simple steps below to claim...
- Terms and conditions apply. National Lottery players need to be 16+. See individual venues for full details.


eclairs set is ready for you!
Hazelnut praline
and custard.
Strawberry
rose.
Chocolat
raspberry.
lingonberries
with cream.
Сoffee
and caramel.
Anise
and cocoa.
Caramel
and vanilla cream.
Salted
caramel.
eight eclairs
19 $


Update 9/18/2012 – Unfortunately, the videos no longer work because the students closed their accounts. Feel free to use this Google Doc for the activity.
—
A couple of weeks ago, I posted about students putting together a periodic table of cereals for a project. Well, the final drafts are in and I got some work this year that blew my mind. Some of the best are shown below if you’re interested in browsing through some.
As an overview, students picked 25 cereals and then had to organize them in a comprehensive table. It had to classify both rows (periods) and columns (groups) as well as 3 other properties of their choice. Some students opted to use this as a test grade and were also required to submit a video answering some questions other students chose to write about. Anyways, enjoy their work!
These are two of the videos that stood out amongst the rest.
[youtube=http://www.youtube.com/watch?v=LzNsLoQYKP4]
[youtube=http://www.youtube.com/watch?v=c_Pusa0xJZM]
Written on October 11th, 2010 by Brian Bennett Categorized in: All Projects Science
Leave a comment


What am I doing in Africa?
17 Jun 2018That's a great question. Hopefully, by the end of my trip, I'll be able to answer it.
I should start off with a bit of context, going back nearly 6 years now.
My wife, Grace, is a very passionate person, and the passion of hers which tops all others is her need to help people. When we first began dating; and this is truly the beginning, before she would allow me to say we were dating, she asked me if I would be willing to move to Africa with her for 5 years. She had recently returned from a travel study in Zambia, so this topic was quite fresh in her mind, and she certainly couldn't date anyone not willing to share this part of her life.
As best as I can recall, my response was that "I'm not opposed to the idea, but it would certainly require some discussion." That was enough for her.
Fast froward a few years, skipping over a few details, now an old married couple of a little more than 3 years, and Grace called me out on that. Not necessarily a 5 year trip to Africa, but something to get our feet wet.
After a long search, Grace became connected with an organization in Eldoret, Kenya, called AMPATH, who is a "a partnership between Moi University, Moi Teaching and Referral Hospital, North American universities led by Indiana University, and the Kenyan Government. Together, [they] work to build holistic, sustainable health in Kenya and around the world." 1 Her position with AMPATH, as a Product Management Consultant for a software development team building a medical records system, is a great use of both her medical background (Registered Nurse), and her current professional experience (MBA working for a Healthcare Software Startup company).
None of that actually says what I am doing here though.
For my 9-to-5 of sorts, I'm working for a Canadian company, doing machine learning stuff. We're applying deep learning to audio to try to build a better hearing aid. This job allows me to work anywhere in the world, as long as I have an internet connection. It also happens to be a very interesting problem!
With the rest of my time here, I want to figure out what role I can play in reducing the inequalities of both income and power throughout the world.
I hope to get away from the charity model, where someone from a high income country simply sends money for whatever amenity or infrastructure they believe is most necessary. Instead, my hope is that I can simply assist the locals, helping to bridge whatever is holding them back from success.
So far, my knowledge of machine learning seems to be a desirable skill. There are a few different projects related to machine learning which I'll likely be consulting with, but I'll save that until I have something concrete to talk about.
Whether or not I can be of much help to them is yet to be determined. Answering that question is the reason I'm here.


Nov 2, 2014 at 12:28am UTC
Why the length of array y isn't 27?
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
#include <iostream>
#include "util.h" // display()
#include "str.h" // strFill(), strLength
using namespace std;
void letterToAlpha(char * letter, char * alphabet, char * voidalphabet){
while (*alphabet){
if (*letter == *alphabet){
*voidalphabet = *alphabet;
}
alphabet++;
voidalphabet++;
}
}
int main(int argc, char *argv[]) {
char x[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" ;
char y[strLength(x)];
char c = 'C' ;
y[strLength(x) - 1] = '\0' ;
strFill(y, '_' );
letterToAlpha(&c, x, y);
display("\nFull alpha: " );
display(x);
display("\n\nVoid alpha: " );
display(y);
display("\n\nFull alpha length: " );
display(strLength(x));
display("\n\nVoid alpha length: " );
display(strLength(y));
return 0;
}
Last edited on Nov 2, 2014 at 4:12am UTC
Nov 2, 2014 at 12:36am UTC
The size of array can't be changed, its 25 because there are 25 letters that you have put into x.
Nov 2, 2014 at 12:45am UTC
I'm not trying to change the size of array y, x is 27 chars long, I'm just declaring y with the size of x (27). The output of my program give me this:
Full alpha: ABCDEFGHIJKLMNOPQRSTUVWXYZ
Void alpha: __C____
Full alpha length: 27
Void alpha length: 8
Why is this happening? Why the lenth of y is 8 and not 27?
Last edited on Nov 2, 2014 at 4:14am UTC
Nov 2, 2014 at 5:26am UTC
strFill probably detects a NULL halfway and stops filling out '_" at that location . Use memset instead or another method that ignores inadvertent NULLs
Nov 2, 2014 at 1:39pm UTC
The error is most likely in the strFill() file.
without seeing the code i can't help.


Your Recently Saved Searches
{exp:super_search:history limit="10"}
- {super_search_name}: {super_search_results} results (searched on {super_search_date format="%F %j, %Y at %g:%i %a"})
{if super_search_no_results}- You have not saved any searches yet.
{/if}
{/exp:super_search:history}


Grafana
Elixir tools for accessing the Grafana API (see http://docs.grafana.org/http_api/).
Installation
Add grafana to your list of dependencies in
mix.exs
:def deps do [{:grafana, "~> 0.1.0"}] end
Ensure grafana is started before your application:
def application do [applications: [:grafana]] end
Configure the environment variables in your config files:
config :grafana, api_host: "<your grafana server url>", api_key: "Bearer <your key>"
Mocked mode for simulating API calls in your application’s test scripts
config :grafana, api_host: "test"


{% extends "base.html" %} {% block app_content %}
{{ _('Dang, I messed up somewhere. Now that I know, I\'ll fix it, eventually.') }}
{{ _('Here, come back to the home page') }}


|
libwifi 0.0.3
An 802.11 Frame Parsing and Generation library in C
|
#include "common.h"
#include "../../core/frame/tag.h"
#include "../misc/security.h"
#include <errno.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Functions | |
| void | libwifi_handle_ssid_tag (void *target, int target_type, const char *tag_data, int tag_len) |
| Different implementations can have variations of hidden SSIDs. More... | |
| int | libwifi_bss_handle_rsn_tag (struct libwifi_bss *bss, const unsigned char *rsn_data, int rsn_len) |
| Handle the RSN Tagged Parameter. More... | |
| int | libwifi_bss_handle_msft_tag (struct libwifi_bss *bss, const unsigned char *msft_data, int msft_len) |
| The Microsoft vendor tag is used to advertise WPA and WPS information, as well as some other features such as WMM/WME. More... | |
| int | libwifi_bss_tag_parser (struct libwifi_bss *bss, struct libwifi_tag_iterator *it) |
| This function is a parser for common and useful tags found in frames usually originating from the BSS. More... | |
| int | libwifi_sta_tag_parser (struct libwifi_sta *sta, struct libwifi_tag_iterator *it) |
| This function is a parser for common and useful tags found in frames usually originating from the STA. More... | |
| int libwifi_bss_handle_msft_tag | ( | struct libwifi_bss * | bss, |
| const unsigned char * | msft_data, | ||
| int | msft_len | ||
| ) |
The Microsoft vendor tag is used to advertise WPA and WPS information, as well as some other features such as WMM/WME.
A helper function to handle the parsing of the Microsoft Vendor IE.
The difference between the tags is found via the "Vendor Specific OUI Type" field. A common representation of this is XX:XX:XX:YY, such as 00:50:F2:04, where 00:50:F2 is the Microsoft OUI and 04 is the type.
It is important to skip the OUI and Type as described above before parsing the data of the tag. This is encapsulated with the libwifi_tag_vendor_header struct.
| int libwifi_bss_handle_rsn_tag | ( | struct libwifi_bss * | bss, |
| const unsigned char * | rsn_data, | ||
| int | rsn_len | ||
| ) |
Handle the RSN Tagged Parameter.
A helper function to handle the parsing of the RSN IE.
At the minimum, the required RSN data is the version and the group cipher suites. RSN information is then enumerated within the libwifi_get_rsn_info() function.
| int libwifi_bss_tag_parser | ( | struct libwifi_bss * | bss, |
| struct libwifi_tag_iterator * | it | ||
| ) |
This function is a parser for common and useful tags found in frames usually originating from the BSS.
A helper function to iterate through common tags found in a libwifi_bss.
These include the SSID and DS or HT fields, which can be used to determine the channel.
| void libwifi_handle_ssid_tag | ( | void * | target, |
| int | target_type, | ||
| const char * | tag_data, | ||
| int | tag_len | ||
| ) |
Different implementations can have variations of hidden SSIDs.
A helper function to set the SSID of a libwifi_bss, as well as check if it is hidden or not.
It is common to simply set the SSID to an empty string, but some devices may "blank" the real SSID without reducing the character count.
Example: "My-SSID" -> "\x00\x00\x00\x00\x00\x00\x00"
| int libwifi_sta_tag_parser | ( | struct libwifi_sta * | sta, |
| struct libwifi_tag_iterator * | it | ||
| ) |
This function is a parser for common and useful tags found in frames usually originating from the STA.
A helper function to iterate through common tags found in a libwifi_sta.
These include the SSID and DS or HT fields, which can be used to determine the channel.


Gili Gede is an island located in a big sheltered bay close to the coastal town of Tembowong, approx. 15nm West of the harbour town of Lembar in South West Lombok. It is one of 12 islands clustered together, very sheltered and surrounded by hills (photo courtesy of Marina Del Ray).
There are no motorized vehicles on the island, so to move around you take the coastal path, a horse drawn cart or a taxi boat.
It appears that the planned new modern marina at the southern end of the island still just consists of a few mooring buoys and no other facilities (see comment posted below April 2016).
Position 08° 45' 45"S, 115° 56'01"E (marina moorings)
There is no clearance here. It is not a Port of Entry.
Last updated March 2016.
Currently the area provides a sheltered anchorage, 12m deep with good holding in the sand bottom. There are a few moorings.
There are resorts and a couple of bars on Gili Gede island, plus a surfing and diving business, but very limited provisioning.
Last updated April 2016.


Welcome to Cook With Me
Create User
Name of User:
Age:
Weight
Submit
Meal Form
Ingredients
Age:
Weight
Submit


Create interactive graph visualizations using 'Sigma.js' <http://sigmajs.org/>. This package is meant to be used in conjunction with 'igraph', replacing the (somewhat underwhelming) plotting features of the package. The idea is to quickly render graphs, regardless of their size, in a way that allows for easy, iterative modification of aesthetics. Because 'Sigma.js' is a 'javascript' library, the visualizations are inherently interactive and are well suited for integration with 'Shiny' apps. While there are several 'htmlwidgets' focused on network visualization, they tend to underperform on medium to large sized graphs. 'Sigma.js' was designed for larger network visualizations and this package aims to make those strengths available to 'R' users.
| Version: | 1.1.0 |
| Depends: | R (≥ 2.10) |
| Imports: | htmlwidgets, igraph, jsonlite, RColorBrewer |
| Suggests: | magrittr, knitr, rmarkdown, shiny |
| Published: | 2018-04-23 |
| Author: | Ian Kloo [aut, cre] |
| Maintainer: | Ian Kloo <iankloo at gmail.com> |
| BugReports: | https://github.com/iankloo/sigmaNet/issues |
| License: | MIT + file LICENSE |
| URL: | https://github.com/iankloo/sigmaNet |
| NeedsCompilation: | no |
| CRAN checks: | sigmaNet results |
| Reference manual: | sigmaNet.pdf |
| Vignettes: |
Vignette Title |
| Package source: | sigmaNet_1.1.0.tar.gz |
| Windows binaries: | r-devel: sigmaNet_1.1.0.zip, r-release: sigmaNet_1.1.0.zip, r-oldrel: sigmaNet_1.1.0.zip |
| OS X binaries: | r-release: sigmaNet_1.1.0.tgz, r-oldrel: sigmaNet_1.1.0.tgz |
| Old sources: | sigmaNet archive |
Please use the canonical form https://CRAN.R-project.org/package=sigmaNet to link to this page.


What is "course virtualization" and why should I care?
Adopting virtual machines in my course has eliminated the need to give personalized support in getting the required software installed and running. Not only is this a great relief personally, it also allows the course to move forward much faster and the reception among students has been very positive.
Overview
Especially bachelor's level courses can have well over hundred participants, sometimes over two hundred. Trying to help everyone sort out their personal computers to install the required software ... can be a pain, to put it mildly. This not only consumes great amount of instructors time, but can also make the first week modest in terms of reached learning goals while time is used to sort out problems and let everyone stay with the course.
This is a terrible waste of student's and teacher's time, and simply shouldn't be. Alternative approaches include things such as faculty provided computer classrooms, which are much too small and would require running the same sessions multiple times, or trying to cope with provided browser based virtualization - where all the work and configuration are discarded each time the student logs out. Quite simply, these are not viable solutions.
Fortunately virtualization can provide a solution. Instead of struggling with each set of software and tools required in each course, students should only have to deal with one installation - the hypervisor (which runs virtual machines). And because that one installation is so important to multiple courses (which use course virtualization), it can justifiably be allocated some resources, unlike with each specific software required by a course.
With an initial investment of creating the virtual learning environment (installing the software yourself), you can export the result, upload it here and let students download and use the exact same thing you have. Such time investment can be used for several years, or until you see a need to update your virtual environment.
Our virtualization solution saves your time, your students time and everyones nerves.
Benefits of Virtualization
Installation of a hypervisor is considerably simpler than installing and configuring large and/or complex development tools. At least, the issues involved are limited to a fairly well known set. Instead of every student installing and configuring all of the software needed on a course, often needing at least some lecturer or peer assistance, after getting their hypervisor running, students can avoid all course related software installation simply by downloading and running a virtual machine with all the required software pre-installed. This can completely eliminate all the work previously spent in getting everyone's tools ready. Time that can be used for actual course activities instead. The approach also has several other positive effects:
- Identical and known environments The teacher has comprehensive knowledge of the environment that students have at their disposal, making it significantly easier to provide technical support for the course work. Compared to self-installed software on multiple platforms and versions, using a VM ensures that every student is working on an identical environment. Replicating a reported problem should be both easy and reliable - and in more challenging cases, student can be instructed to export the VM and send it to the teacher to be looked at (in case remote session is not feasible).
- Customizability The teacher can customize the virtual machine before distributing it to the students, for example each year before the course starts. Quick changes to the machines are also easier to apply due to each instance being exactly identical.
- Isolation A student can have several different VMs simultaneously, each serving the needs of a different course. Isolating different course VMs eliminates issues that might result in conflicting versions or configurations.
- Improved security The design also isolates the student's personal system from potential harm (if the course experiments with system level configurations or code). Isolated virtual machine also enhances security - experimental server code might be exploited, but all the peronal and private data is in the host operating system - inaccessible from the virtual machine.
- Simple recovery In cases of cathastrophic failures or system corruption, recovery is easy and fast. Student either restores an earlier snapshot, or if none have been taken, simply downloads the image again and double-clicks it to install it again. It is extremely unlikely that a student would need assistance in restoring the working environment.
Virtual machine images also offer many potential other enhancements for teachers who are willing to spend some additional time. For example, it is relatively simple to hide some programs and let them simply appear in the user interface at given date and time (after related topics are handled in lectures), keeping the environment focused on tools that the student is expected to use at any given time over the course. For more complex courses, reactions and stimulus could be programmed or scripted into the virtual machine to challenge students to deal with unexpected conditions - the kind that the teacher has control over.
Known Limitations
While the benefits are numerous and significant, virtual machines also have certain limitations. Following items should be noted:
- Windows or other operating systems that require licenses cannot be freely distributed.
Our first-choice operating system is Debian Linux, but course software may not always be available for Linux. If your course software requires licensed operating system, you need to take care that the image is made available only to your students, in the quantity and/or duration dictated by the licensing terms (this site offers some features to support this, and they will be extended when necessary). - Licensed software cannot be freely distributed
Like in the previous point, you need to limit the availability of your virtual machine image, according to the terms of the licensing agreement. - In all issues related to licensing (if any), teacher (author of the virtual machine), is fully responsible for observing the terms and conditions.
- Graphics performance is limited.
If your course teaches graphics programming or perhaps machine learning using GPU processing, virtual machine is unlikely to suit your needs. - USB 3.0 may not be available (yet).
While USB 1.0 and USB 2.0 have been working very well, at this point we should caution against relying high performance USB 3.0 connectivity. - System resources are finite.
Because the virtual machine runs on a subset of resources in each student's computer, very high requirements may prevent some students from running the virtual machine. Our default settings are; 2 GB RAM, 2 cores, 16 GB of diskspace (2020). Larger requirements should be documented in course details and alternative solutions should be considered for those students that cannot reach course specific larger requirements.


8
1 It came about at the end of twenty years, during which Solomon had built the house of Yahweh and his own house,
2 that Solomon rebuilt the towns that Hiram had given to him, and he made people of Israel to live there.
3 Solomon attacked Hamathzobah and defeated it.
4 He built Tadmor in the wilderness, and all the store cities, which he built in Hamath.
5 Also he built Bethhoron the Upper, and Bethhoron the Lower, cities fortified with walls, gates, and bars.
6 He built Baalath and all the store cities that he possessed, and all the cities for his chariots and the cities for his horsemen, and whatever he wished to build for his pleasure in Jerusalem, in Lebanon, and in all the lands under his rule.
7 As for all the people who were left of the Hittites, the Amorites, the Perizzites, the Hivites, and the Jebusites, who did not belong to Israel,
8 their descendants who were left after them in the land, whom the people of Israel had not destroyed—Solomon made them into forced laborers, which they are to this day.
9 However, Solomon made no forced laborers of the people of Israel. Instead, they became his soldiers, his commanders, his officers, and commanders of his chariot forces and his horsemen.
10 These were also the chief officers managing the supervisors who belonged to King Solomon, 250 of them, who supervised the people who did the work.
11 Solomon brought the daughter of Pharaoh out of the city of David to the house that he had built for her; for he said, "My wife must not live in the house of David king of Israel, because wherever the ark of Yahweh has come is holy."
12 Then Solomon offered burnt offerings to Yahweh on his altar that he had built in front of the portico.
13 He offered sacrifices just as the daily schedule required; he offered them, following the directions found in the commandment of Moses, on the Sabbath days, the new moons, and on the set festivals, three times every year: the Festival of Unleavened Bread, Festival of Weeks, and the Festival of Shelters.
14 Following the decrees of David his father, Solomon appointed the divisions of the priests to their work, and the Levites to their positions, in order to praise God and to serve before the priests, as the daily schedule required. He also appointed the gatekeepers by their divisions to every gate, for David, the man of God, had also commanded this.
15 These people did not deviate from the commands of the king to the priests and Levites concerning any matter, or concerning the storerooms.
16 Now all Solomon's work was accomplished, from the day of the foundation of the house of Yahweh, until its completion. In this way the house of Yahweh was finished and put into use.
17 Then Solomon went to Eziongeber and Elath, on the coast in the land of Edom.
18 Hiram sent him ships commanded by officers who understood the sea; they went to Ophir went servants of Solomon. From there they brought back 450 talents of gold for King Solomon.


17
126
30ft, swim 40 ft
Perception +5, Survival +7
Fire
Cold
darkvision 60ft, Passive Perception 16
Common, Thanoi
9 (5,000 XP)
The thanoi can hold its breath underwater for up to 10 minutes.
The thanoi ignores difficult terrain created by ice.
Melee Weapon Attack: +8 to hit, reach 5 ft., one target. Hit: 20 (4d6 + 8) piercing damage.
Melee or Ranged Weapon Attack: +8 to hit, reach 5 ft. or range 20/60 ft., one target. Hit: 9 (1d6 + 6) piercing damage. If the target is a Huge or smaller creature, it must succeed on a Strength contest against the thanoi or be pulled up to 20 feet toward the thanoi.
Only on ice ground. Thanoi Chief makes a burst attack smashing with his whole body the ice under itself. Area Burst 10 ft. All targets make Constitution saving throw (DC 16) and get 6 points of bludgeoning damange and get prone on failed save or half damage on success. 1/Day
For 1 minute, Derek can utter a special command or warning whenever a nonhostile creature that it can see within 30 feet of it makes an attack roll or a saving throw. The creature can add a d4 to its roll provided it can hear and understand Derek. A creature can benefit from only one Leadership die at a time. This effect ends if Derek is incapacitated.
When Thanoi warrior moves at least 20 ft, he can attack with this attack as a bonus action. Melee Weapon Attack: +6 to hit, reach 5 ft., one target. Hit: 16 (2d10 + 6) piercing damage. On hit target makes Constitution saving throw and is prone on failure. Recharge 5-6.


Highly motivated IT professional with an interest in acquiring and applying new skills. Always interested in new technologies. Looking for creative, efficient and clean solutions to Development challenges.
Design, document and follow the implementation of reusable solutions, highly available and scaleable web applications and work towards a highter product maturity.
Design and implement a highly available and scalable web interface to the company's systems, in close cooperation with the company's Ops department. Additionally design and develop an array of custom solutions for customers along with internal projects, for fun and productivity.
Redesign and implementation of previously faulty Visual Basic application used to automatically gather information about the Refinery's reserves and produce the Daily Stock Report. Design and implementation of a Visual Basic application that interfaces the Refinery's Chemical Analysis Server with the Company's Process History Database (PHD) Server. Incident Response to extended network outage. Physical deployment of new Server & Networking Equipment.
I like making stuff; but I usually end up breaking stuff. Passionate watcher (and re-watcher) of past DefCon talks. I like all things networks and security.
On the entertainment side, I like American animated series with mature humor like American Dad, Family Guy, Rick And Morty, Bojack Horseman, Futurama (no there's no room for Simpsons in this list).
I also enjoy PC games, mainly immersive open world RPGs but occasionally I play stratengy / simulations games.


operator fun hasNext(): Boolean
Checks if the next CtInsn is valid.
Return true if the next CtInsn is valid, otherwise false.


#include <lexer.hpp>
template<StandardCharacter CharType>
class fly::BasicLexer< CharType >
Helper class to perform lexical analysis of a C-string literal. All methods are constant expressions, allowing for string analysis at compile time.
- Author
- Timothy Flynn (trfly.nosp@m.nn89.nosp@m<EMAIL_ADDRESS>- Version
- January 3, 2021
◆ BasicLexer() [1/2]
template<StandardCharacter CharType>
template<std::size_t N>
|
|
explicitconstexprnoexcept |
Constructor. Stores a view into a C-string literal.
- Template Parameters
-
| N | The size of the C-string literal. |
- Parameters
-
| literals | Reference to a C-string literal of size N. |
◆ BasicLexer() [2/2]
template<StandardCharacter CharType>
|
|
explicitconstexprnoexcept |
Constructor. Stores an existing view into a string.
- Parameters
-
| view | The existing view into the string. |
◆ consume()
template<StandardCharacter CharType>
If a character is available at the current position in the C-string literal, return that character and advance the current position to the next character.
- Returns
- If available, the current character. Otherwise, an uninitialized value.
◆ consume_hex_number()
template<StandardCharacter CharType>
| constexpr std::optional< std::uintmax_t > fly::BasicLexer< CharType >::consume_hex_number |
|
constexpr |
Beginning with the current position, retrieve characters from the C-string literal and advance the current position to the next character until a character is either not available or not a hexadecimal digit. Convert the retrieved characters to an unsigned number.
- Returns
- If consumed, the parsed hexadecimal number. Otherwise, an uninitialized value.
◆ consume_if()
template<StandardCharacter CharType>
If a character is available at the current position in the C-string literal, and if that character is equivalent to the provided character, advance the current position to the next character.
- Parameters
-
| ch | The character to test with. |
- Returns
- Whether the current character was available and matched the provided character.
◆ consume_number()
template<StandardCharacter CharType>
| constexpr std::optional< std::uintmax_t > fly::BasicLexer< CharType >::consume_number |
|
constexpr |
Beginning with the current position, retrieve characters from the C-string literal and advance the current position to the next character until a character is either not available or not a decimal digit. Convert the retrieved characters to an unsigned number.
- Returns
- If consumed, the parsed decimal number. Otherwise, an uninitialized value.
◆ peek()
template<StandardCharacter CharType>
| constexpr std::optional< CharType > fly::BasicLexer< CharType >::peek |
( |
std::size_t |
offset = 0 | ) |
|
|
constexpr |
If a character is available at the current position (or some offset from the current position) in the C-string literal, return that character.
- Parameters
-
| offset | The offset from the current position to peek. |
- Returns
- If available, the character at the provided offset. Otherwise, an uninitialized value.
◆ position()
template<StandardCharacter CharType>
- Returns
- The lexer's current position into the C-string literal.
◆ set_position()
template<StandardCharacter CharType>
| constexpr void fly::BasicLexer< CharType >::set_position |
( |
std::size_t |
position | ) |
|
|
constexpr |
Set the lexer's current position into the C-string literal.
The provided position is not checked for validity. If the position is past-the-end of the C-string literal, further operations will fail (i.e. |peek| and |consume| will return std::nullopt).
- Parameters
-
| position | The lexer's new position. |
◆ view()
template<StandardCharacter CharType>
- Returns
- A string view into the C-string literal.
The documentation for this class was generated from the following file:


Changelog
Tags:
- [Breaking Change]
- [New Feature]
- [Improvement]
- [Bug Fix]
- [Internal]
- [Documentation]
Note: Gaps between patch versions are faulty, broken or test releases.
2.9.1
- Bug Fix
- Bump
ws
dependency to fix DoS vulnerability (closes #130)
2.9.0
- New Feature
- Show chunk sizes in sidebar (closes #91)
- Bug Fix
- Properly parse webpack bundles that use arrow functions as module wrappers (#108, @regiontog)
2.8.3
- Bug Fix
- Correctly advertise port when using a random one (#89, @yannickcr)
- Add proper support for
multi
entries (fixes #92, #87)
- Support parsing of ESNext features (fixes #94)
2.8.2
- Improvement
- Greatly improved accuracy of gzip sizes
- Bug Fix
- Generate report file in the bundle output directory when used with Webpack Dev Server (fixes #75)
2.8.1
- Improvement
- Improve warning message when analyzer client couldn’t connect to WebSocket server
2.8.0
- Improvement
- Analyzer now supports
webpack --watch
and Webpack Dev Server!
It will automatically update modules treemap according to changes in the sources via WebSockets!
- Internal
- Use
babel-preset-env
and two different Babel configs to compile node and browser code
- Update deps
2.7.0
- New Feature
- Add control to sidebar that allows to choose shown chunks (closes #71 and partially addresses #38)
2.6.0
- New Feature
- Add
defaultSizes
option (closes #52)
2.5.0
- New Feature
- Added
--host
CLI option (@difelice)
2.4.1
- Improvement
- Support
NamedChunksPlugin
(@valscion)
2.4.0
- Bug Fix
- Fix
TypeError: currentFolder.addModule is not a function
- Internal
2.3.1
- Improvement
- Improve compatibility with Webpack 2 (@valscion)
2.3.0
- Improvement
- Add
analyzerHost
option (@freaz)
- Internal
2.2.3
- Bug Fix
- Support bundles that uses
Array.concat
expression in modules definition (@valscion)
2.2.1
- Bug Fix
- Fix regression in analyzing stats files with non-empty
children
property (@gbakernet)
2.2.0
- Improvement
- Improve treemap sharpness on hi-res displays (fixes #33)
- Add support for stats files with all the information under
children
property (fixes #10)
- Internal
2.1.1
- Improvement
- Add support for
output.jsonpFunction
webpack config option (fixes #16)
2.1.0
- New Feature
- Add
logLevel
option (closes #19)
2.0.1
- Bug Fix
- Support query in bundle filenames (fixes #22)
- Internal
- Minimize CSS for report UI
2.0.0
- New Feature
- Analyzer now also shows gzipped sizes (closes #6)
- Added switcher that allows to choose what sizes will be used to generate tree map.
Just move your mouse to the left corner of the browser and settings sidebar will appear.
- Bug Fix
- Properly show sizes for some asset modules (e.g. CSS files loaded with
css-loader
)
- Internal
- Completely rewritten analyzer UI. Now uses Preact and Webpack 2.
1.5.4
- Bug Fix
- Fix bug when Webpack build is being controlled by some wrapper like
grunt-webpack
(see #21)
1.5.3
- Bug Fix
- Workaround
Express
bug that caused wrong ejs
version to be used as view engine (fixes #17)
1.5.2
- Bug Fix
- Support array module descriptors that can be generated if
DedupePlugin
is used (fixes #4)
1.5.1
- Internal
- Plug analyzer to Webpack compiler
done
event instead of emit
. Should fix #15.
1.5.0
- New Feature
- Add
statsOptions
option for BundleAnalyzerPlugin
1.4.2
- Bug Fix
- Fix “Unable to find bundle asset” error when bundle name starts with
/
(fixes #3)
1.4.1
- Bug Fix
- Add partial support for
DedupePlugin
(see #4 for more info)
1.4.0
- New Feature
- Add “static report” mode (closes #2)
1.3.0
- Improvement
- Add
startAnalyzer
option for BundleAnalyzerPlugin
(fixes #1)
- Internal
- Make module much slimmer - remove/replace bloated dependencies
1.2.5


Getting started
Installation
Install this library by navigating to the dist
directory in a terminal prompt and executing pip install anylogic-alpyne
/
Preparing an AnyLogic model
You can use any edition of AnyLogic (PLE, University, or Professional) with this library. However, be aware that limitations of the edition will still apply. For example, PLE users executing models which utilize industry-specific libraries have their runs limited to 1-hour simulation time).
You will need to setup your model with the following components. For more specifics on each entry, see [[LINK]].
RL experiment, with the Configuration, Observation, Action, and stopping conditions filled out, as per your specifications
A call to the RL experiment’s
takeAction
method, at the time you wish an action to be taken(OPTIONAL) A parameter on your top-level agent for determining whether the
takeAction
method will be called.
If the
takeAction
method is called through another experiment (e.g., Simulation, Parameter Variation), an error will be thrown. The parameter would be used to determine whether the method should be called. It should be true/enabled when training (e.g., you can enable it in your Configuration code) and false/disabled otherwise.
To export the model, navigate to the properties of your RL experiment and click the option at the top to export it. If you do not see an option for Alpyne or generic 3rd parties, you may use the one for “Microsoft Bonsai”.
Next Steps
The API and overall workflow for Alpyne is intentionally similar to the AnyLogic Cloud. In your Python code, you will create a single Client object, passing a reference to where your exported model is located, in addition to setting other options. This object then gives you access to templates for the inputs/outputs of the model in addition to methods for creating new model runs, which can then be interacted with.
You can learn more about the specifics from reviewing the other pages and the provided sample scripts.


{% extends "base_form_delete.html" %} {% block title %}Delete Skill{% endblock %} {% block confirm_delete %}
Are you sure you want to delete {{ skill }}? {% endblock %}


This document will guide you through the basics of Claire. This is a quick introduction, but once you finish this page you’ll know all you need to start writing property tests for your code-base, and even integrate them with your favourite test runner!
Claire is a tool for automatically testing your code. It uses a concept known as property-based testing, where you write high-level specifications of how each unit should behave, and the tool generates the test data for you, randomly.
For example:
// Addition should be commutative
var commutative_p = forAll( _.Int, _.Int ).satisfy(function(a, b) {
return a + b == b + a
})
Since Claire generates random data, the data-space your test cases cover gets larger and larger the more you run your tests. This means that every time you run the test cases, you have more chances of catching bugs that weren’t previously caught, even if you don’t change anything in your code. This can highly increase the confidence you have in a code base.
Claire does not proof that a code base has no bugs, instead it is a tool to increase the test space (and thus the number of bugs you can catch), and help you analyse the data that makes a particular test fail.
Besides that, Claire allows you to have high-level specifications for how your program should behave (like BDD), and potentially reduce the amount of lines of code spent with test cases, while increasing the overall test coverage.
As said before, Claire uses Properties to describe the behaviour of an unit of code (a module, a function, etc.). These properties are described by JavaScript functions, and define what the expected behaviour is for a given set of data.
Let’s go back to the previous example of commutative property for addition. This property says that no matter which order addition is performed, the result should always be the same, and it is encoded in Claire like this:
var claire = require('claire')
var _ = claire.data
var forAll = claire.forAll
var commutative_p = forAll( _.Int, _.Int ).satisfy( function(a, b) {
return a + b == b + a
})
In plain English, that means:
For all pairs of integers (as a and b), the sum of these integers yields the same result, regardless of the order in which it’s performed.
Now, forAll is a function that takes some data generators and returns a Property object. This object knows how to randomly generate the test data and check if the property holds for that data. You can check if the property holds for one case by using the asTest method.
Note
There are lots of built-in test generators for Claire. The usual data types are there: Int, Num, Bool, Array(x) and Object(x). You can always look at the data.ls source to see all the built-in ones.
The asTest returns a function that can be used within any test runner that depends on exceptions: which would likely be all of them. It logs the result if the test succeeds (in verbose mode), and throws an error if it fails. So, let’s use it:
commutative_p.asTest({ verbose: true, times: 100 })()
// + OK passed 100 tests.
So, it tells us that Claire ran 100 tests for the property and all of them passed. But what if it had failed? Well, let’s see another property:
var identity_p = forAll(_.Int).satisfy(function(a) {
return a == a + 1
})
identity_p.asTest({ verbose: true, times: 100 })()
// <property failed>: ! Falsified after 1 tests, 1 failed.
//
// : Failure #1 --------------------
//
//
// : The following arguments were provided:
// 0 - 93 (<int>)
//
// (Stack trace)
Now, it does tell us pretty loudly that the property didn’t held. And that it failed in the very first test too! It also provides information about which arguments were given to the property, and a stack trace, which we can ignore for now.
So, Claire says that the identity_p property failed for the integer 93. If we analyse the property again, we’ll see that it specifies that the the sum of any integer with 1 equals that same integer. This is clearly not the case for addition, as 94 does not equal 93. If we fix that and run the property again, we’ll get a success:
var identity_p = forAll(_.Int).satisfy(function(a) {
return a == a + 0
})
identity_p.asTest({ verbose: true, times: 100 })()
// + OK passed 100 tests.
Some properties only hold for a given data subset. For example:
var sqrt_p = forAll(_.Int).satisfy(function(a) {
return Math.sqrt(a * a) == a
})
sqrt_p.asTest()()
// <property failed>: ! Falsified after 2 tests, 1 failed.
//
// : Failure #1 --------------------
//
//
// : The following arguments were provided:
// 0 - -11 (<int>)
So, quite unsurprisingly, negative numbers don’t work with this property, but the Int generator gives you both positive and negative numbers. So, instead of writing a new generator, Claire allows you to define a conditional property:
var sqrt_p = forAll(_.Int)
.given( function(a){ return a > 0 })
.satisfy(function(a){ return Math.sqrt(a * a) == a })
sqrt_p.asTest({ verbose: true })()
// + OK passed 100 tests. 124 (55%) tests ignored.
The given method allows you to specify the subset of data that a property applies to. You get the same arguments as the satisfy method, and return a Boolean indicating whether to test the property for the generated data or not.
Note
Claire does provide the Positive and Negative generators, which produce only positive and negative numbers, respectively.
Now it tells you that the property succeeded for 100 test cases, but a large number of test cases (124, or 55%) were ignored. You can decide whether this is an indication to doubt a property or not, in which case you can try running more tests:
sqrt_p.asTest({ verbose: true, times: 1000 })()
// <property abandoned>: ? Aborted after 1956 tests. 1001 (51%) tests ignored.
If too many tests are ignored, Claire might decide to stop testing so you can review the generators and conditions in a property.
Of course, not all your properties will be as simple as the addition properties, so you need better tools to analyse the test results and decide if they are trustworthy or not, and assess why they’re failing.
For this, Claire allows you to classify the generated test cases, so you can analyse which test data has been tested by the property. This is done by the classify method:
function sorted(xs) {
return xs.slice()
.sort(function(a, b){ return a - b })
}
var sorted_p = forAll( _.Array(_.Int) )
.satisfy(function(xs) {
xs = sorted(xs)
return xs.every(function(a, i) {
return i == 0
|| a >= xs[i - 1]
})
})
.classify(function(xs) {
return xs.length == 0? 'empty'
: xs.length == 1? 'trivial'
: '> 1'
})
sorted_p.asTest({ verbose: true })()
// + OK passed 100 tests.
// > Collected test data:
// o 98% - > 1
// o 1% - trivial
// o 1% - empty
While sorting lists with one or no elements are trivial (it’s already sorted!), you can see that the majority of the data given (98%) passes the test. This is a good indication that the property is likely to be trustworthy, and you can keep running test cases to increase the confidence in the property:
sorted_p.asTest({ verbose: true, times: 10000 })()
// + OK passed 10000 tests.
// > Collected test data:
// o 98% - > 1
// o 1% - trivial
// o 1% - empty
Assuming your test runner takes a function and expects that function to throw an exception if the test goes wrong, you can just use the asTest method of the Property object to integrate with the test runner. For example, this would work on Mocha:
describe('Addition', function() {
it('Should be commutative', forAll(_.Int, _.Int).satisfy(a, b) {
return a + b == b + a
}.asTest())
})
Now that you get the idea behind Claire, you can start writing your properties to test the behaviours in your code bases. Be sure to check the Discover Claire documentation to learn everything you can get from the library.


Fusion Adblocker and Anti-Tracker
Fusion Adblocker and Anti-Tracker doesn't collect or log any of your data, period. You can read our privacy policy
here
.
Check out our other products
here
.
Home
Products
Shop
Issues


02.15.17
It is rare that The Post’s staff members have the opportunity attempt to contextualize one person’s legacy in a way that can nearly carry an entire print edition.
So often, those people we interview often — or often hope to interview — are stacked into quotes that contribute to the ingredients of a broad-picture story. Athens city officials and Ohio University administrators are often the voices and perspectives behind some of The Post’s most important reporting, but rarely are they the subject itself.
In a way, that can be a good thing.
The Post has been reporting of President Roderick McDavis’ administration for nearly 13 years. The nature of a student-run publication has allowed dozens of Post reporters to enter and exit Cutler Hall over the decade, attempting to explain the complexities of higher education while still navigating it ourselves. Often, our reporting has focused on issues that trace a history far longer than the reporter’s time on campus.
Our aim, of course, was to hold the highest office on campus accountable. A glance at our archives suggests that we devoted the reporting that required.
But, The Post’s archives also suggest that we rarely wrote about McDavis’ life.
Perhaps that was because public figures need some semblance of a private life, too. An additional cause — at least in recent years — was a sizeable decrease in media availability. Now, when it comes to context, The Post leans on more than a decade’s worth of reporting to bolster student and faculty opinion from years ago. Seeing the good and bad moments relies on the strength of reporting done far before some of us wrote our first Post story.
We were fortunate enough that some of those moments were retold or relayed to us for this print issue by McDavis and others close to him. We’re equally fortunate for the reporters past and present that contributed to this special edition.
Whether it was the success of OU’s athletic teams, student demonstrations on campus, or complex university budgets, it is promising to know The Post was there — and will continue to be — as an institution supported by more than a century’s worth of its history.
As we move into a new era on campus, The Post hopes to continue that reporting so that an alumnus glancing through our archives might not only see breaking news and in-depth reporting on university issues, but also what we see each day: people.
We thank McDavis and his staff for being a part of our reporting over the years, and we look forward to covering another administration with equal dedication.
— Emma Ockerman is a senior studying journalism and editor-in-chief of The Post. Want to talk to her? Tweet her @eockerman or email her at<EMAIL_ADDRESS>Landing Page
OU President Roderick McDavis is leaving February 17. The Post looks back at his time as Ohio's president. Click this box to read the rest of the stories from this issue.


Wesley Grantham
Wesley Grantham
My Age:15
My Location: TN
My Favorite Color: Black
I like to do lots of things when I have free time. One of those things is playing guitar. I've been practicing a lot more on a piece from a movie that I think is really cool. I also like to play video games with my friends. Some of my favorites right now are Among Us, Phasmophobia, and Minecraft.
Collage of My Favorite Things.
This is a Quick List of My Favorite Things.
Instagram: wesley_g1204
Email: wjg12104@gmail.com


@s % Guide to BSTR and C String Conversions % hudamin % 2011-07-26
@s
One of the confusing aspects of Windows programming is managing the conversion of Visual Basic style strings to/from C language style strings. It isn't that it is so difficult, it is just difficult to remember the details, it is usually not done often, the MSDN documentation so voluminous that it is difficult to find answers to your questions. But the worst part is that you could perform some typecast that compiles fine, but doesn't work the way you expect. This results code that doesn't work, and the bugs are hard to track down. After some experience, you learn to make sure your string conversions are doing what you expect.
@s C strings are arrays of characters terminated by a NULL character. Visual Basic strings differ in that the length of the string preceded the characters in the string. So a VB string knows it's own length. In addition, all VB strings are Unicode (16 bits per character).
@s
BSTR/C String conversions are required if:
@s
This article deals with the following C/MFC/ATL string types:
@s
The demo project is just an MFC dialog based application with buttons for each type of conversion. It is built using VC++ 6.0. It uses a couple of support functions you may find helpful:
:::cpp
BSTR GetBSTR()
{
_bstr_t bstr1(_T("This is the test string."));
BSTR bstr;
bstr = bstr1.copy();
return bstr;
}
@s
CComBSTR GetComBSTR()
{
CComBSTR bstr("This is the test string.");
return bstr;
}
void CVbsDlg::ShowBSTR(BSTR bstr)
{
_bstr_t bstrStart(bstr);
CString s;
s.Format(_T("%s"), (LPCTSTR)bstrStart);
AfxMessageBox(s);
}
@s
So let's get to it. Here are the conversion techniques:
@s
:::cpp
// BSTR to _bst_t
BSTR bstrStart = GetBSTR();
// use the constructor
_bstr_t bstrFinal(bstrStart);
ShowBSTR(bstrFinal);
// Use the = operator
bstrFinal = bstrStart;
ShowBSTR(bstrFinal);
@s
You may want to get a BSTR from a _bstr_t class.
:::cpp
// _bstr_t to BSTR
_bstr_t bstrStart(_T("This is the test string."));
BSTR bstrFinish;
// use _bstr_t::copy member function
bstrFinish = bstrStart.copy();
ShowBSTR(bstrFinish);
// use = operator
bstrFinish = bstrStart;
ShowBSTR(bstrFinish);
@s
You may want to get a BSTR from a CComBSTR class.
:::cpp
// CComBSTR to BSTR
CComBSTR bstrStart(_T("This is the test string."));
BSTR bstrFinish;
// use the = operator
bstrFinish = bstrStart;
ShowBSTR(bstrFinish);
// use the Copy member function
bstrFinish = bstrStart.Copy();
ShowBSTR(bstrFinish);
@s
:::cpp
// _bstr_t to CComBSTR
_bstr_t bstrStart(_T("This is the test string."));
CComBSTR bstrFinish;
bstrFinish.AppendBSTR(bstrStart);
ShowBSTR(bstrFinish);
@s
*(Note :- conversion that only works in Unicode)*
:::cpp
// BSTR to C String
BSTR bstrStart;
bstrStart = GetBSTR();
TCHAR szFinal[255];
// direct conversion from BSTR to LPCTSTR only works in Unicode
_stprintf(szFinal, _T("%s"), (LPCTSTR)bstrStart);
AfxMessageBox(szFinal);
@s
_bstr_t bstrIntermediate(bstrStart); // convert to _bstr_t
CString strFinal;
// you have to go through _bstr_t to have it work in ANSI and Unicode
_stprintf(szFinal, _T("%s"), (LPCTSTR)bstrIntermediate);
// Or using MFC
strFinal.Format(_T("%s"), (LPCTSTR)bstrIntermediate);
AfxMessageBox(strFinal);
@s
*(this works in both ANSI and Unicode)*
:::cpp
_bstr_t bstrStart(_T("This is the test string."));
TCHAR szFinal[255];
_stprintf(szFinal, _T("%s"), (LPCTSTR)bstrStart);
AfxMessageBox(szFinal);
@s
*(not possible, must go through _bstr_t )*
:::cpp
// CComBSTR to C String
CComBSTR bstrStart("This is the test string.");
_bstr_t bstrIntermediate(bstrStart);
TCHAR szFinal[255];
_stprintf(szFinal, _T("%s"), (LPCTSTR)bstrIntermediate);
AfxMessageBox(szFinal);
@s
*(Use a constructor or = operator)*
:::cpp
// LPCTSTR to _bstr_t
LPCTSTR szStart = _T("This is the text string");
// Use the constructor
_bstr_t bstrFinal(szStart);
ShowBSTR(bstrFinal);
// or use = operator
bstrFinal = szStart;
ShowBSTR(bstrFinal);
@s
*Use a constructor or CComBSTR::Append function*
:::cpp
// LPCTSTR to CComBSTR
// Use a constructor
LPCTSTR szStart = _T("This is the text string");
// Use the constructor
CComBSTR bstrFinal(szStart);
ShowBSTR(bstrFinal);
// Or use the Append function
bstrFinal.Empty();
bstrFinal.Append(szStart);
ShowBSTR(bstrFinal);
@s
Well I tested all of the conversion in the demo project. If you need to try others, download the demo for easy modification. I am sure I will hear if there are any mistakes!


Click anywhere on the map to enter Pioneer University
Instructions: At the end of most videos, a question will be asked.
Depending on your answer, the story will change. You as a user can choose
the answer by clicking on the location where the next scene might be.


channel.8f6e9c __
channel.4e68b2 __
channel.ebc42f __
channel.5f9a61 __
channel.f8fbf7 __
octree __
channel.52b9b2 __
binary __
channel.2a1a15 __
channel.c61904 __


load_files/[1,2]
load_files(
+Files)
load_files(
+Files,
+Options)
[
+Files]
Loads the specified Prolog source and/or object file(s) into memory. Subsumes all other load predicates.
A file specification or a list of file specifications;
extensions optional.
A list of zero or more options of the form:
if(
X)
true
(the default) to always load, or changed
to
load only if the file has not yet been loaded or if it has
been modified since it was last loaded. A non-module-file
is not considered to have been previously loaded if it was
loaded into a different module. The file user
is
never considered to have been previously loaded.
when(
When)
always
(the default) to always load, or compile_time
to load only if the goal is not in the scope of another
load_files/[1,2]
directive occurring in a PO file.
The latter is intended for use when the file only defines
predicates that are needed for proper term or goal
expansion during compilation of other files.
load_type(
LoadType)
source
to load source files only, object
to
load object (PO) files only,
or latest
(the default) to load any type of file, whichever is
newest. If the file is user
, source
is forced.
imports(
Imports)
all
(the default) to import all exported
predicates if the file is a module-file, or a list of
predicates to import.
compilation_mode(
Mode)
compile
to translate into compiled code, consult
to
translate into static, interpreted code, or
assert_all
to translate into dynamic, interpreted
code.
The default is the compilation mode of any ancestor
load_files/[1,2]
goal, or compile
otherwise. Note
that Mode has no effect when a PO file is
loaded, and that it is recommended to use assert_all
in
conjunction with load_type(source)
, to ensure that the source
file will be loaded even in the presence of a PO file.
open/4
options encoding/1
, encoding_signature/1
and
eol/1
can be specfied. These will be used if the Prolog code is
loaded from a source file. See mpg-ref-open, for details.
load_files/[1,2]
reads Prolog clauses, in source or precompiled
form, and adds them to the Prolog database, after first deleting any previous
versions of the predicates they define. Clauses for a single predicate must
all be in the same file unless that predicate is declared to be multifile
.
If a source file contains directives, that is, terms with principal
functor :-/1
or ?-/1
, then these are executed as they
are encountered. Initialization goals specified with
initialization/1
are executed after the load.
A non-module source file can be loaded into any module by load_files/[1,2]
,
but the module of the predicates in a precompiled file is fixed at the time it is
created.
instantiation_error
type_error
domain_error
existence_error
fileerrors
flag is off
, the
predicate fails instead of raising this exception.
permission_error
fileerrors
flag is off
, the
predicate fails instead of raising this exception.


(2015-02-03 21:08:42 UTC)
ruby lint.rb unstable ../unstable/packages/coq:contrib:continuations/coq:contrib:continuations.dev
Dry install with the current Coq version:
opam install -y --dry-run coq:contrib:continuations.dev coq.8.5beta1
Dry install without Coq, to test if the problem was incompatibility with the current Coq version:
true
ulimit -Sv 2000000; timeout 5m opam install -y --deps-only coq:contrib:continuations.dev
ulimit -Sv 2000000; timeout 5m opam install -y --verbose coq:contrib:continuations.dev
Total: 1,245 K
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/deb_term_unif.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/deb_term_unif.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/end_term_unif.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/end_term_unif.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/nat_term_eq_quasiterm.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/nat_term_eq_quasiterm.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/deb_term_unif.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/specif.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/is_in_quasiterm_term_subst.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/end_term_unif.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Nmxaccu_ex.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Nmxaccu_ex.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/listv_is_in_lv.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/applytac.cmxs
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/nat_complements.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/huffman.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/is_in_quasiterm_term_subst.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/specif.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/copy.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/copy_cheat.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/nat_term_eq_quasiterm.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/nat_complements.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/listv_is_in_lv.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Naccu_cc.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Nxaccu_ex.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Naccu_cc.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Nxaccu_ex.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_N.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/huffman.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_Nmx.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/is_in_quasiterm_term_subst.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Nmxaccu_ex.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_N.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/decl_exc.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tests.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/specif.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/nat_complements.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tree.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/FOUnify_cps/listv_is_in_lv.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/applytac.cmo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/copy_cheat.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/copy.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/Mx_defs.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_Nx.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_Nmx.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/decl_exc.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/applytac.cmi
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tree.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tree_plus.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/huffman.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_Nx.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Nxaccu_ex.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_N.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/Mx_defs.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/Naccu_cc.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tree_plus.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_Nmx.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/decl_exc.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/copy_cheat.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/copy.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tree.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/cps_Nx.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tests.glob
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tree_plus.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/weight/tests.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/applytac.vo
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/polycont/Mx_defs.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/applytac.v
/home/bench/.opam/system/lib/coq/user-contrib/Continuations/cps/applytac.glob
/home/bench/.opam/system/lib/coq:contrib:continuations/opam.config
/home/bench/.opam/system/install/coq:contrib:continuations.install
opam remove -y coq:contrib:continuations.dev


-
Apple
www.apple.com
Apple designs and creates the iPhone, iPad, Mac notebooks and desktop computers, iOS 8, OS X, iPod and iTunes, and the new Apple Watch.
-
Apple - Privacy
www.apple.com
At Apple, we respect your privacy and protect it with strong encryption, plus strict policies that govern how all data is handled.
-
Apple - Apple Events - Special Event June 2014
www.apple.com
Watch the streaming video from the special event.
-
A Watch Guy's Thoughts On The Apple Watch After Seeing It In The Metal ...
www.hodinkee.com
I'm not even sure we can call it a watch. Okay, it goes on the wrist, and it happens to tell the time, but that's about where the similarities ...
-
The Swift Programming Language
itunes.apple.com
Read a sample or download The Swift Programming Language by Apple Inc. with iBooks.
-
Apple - Mac
www.apple.com
Discover the world of Mac. Check out MacBook, iMac, Mac Pro, and more. Download QuickTime, Safari, and widgets for free.
-
Download iOS Firmware for iPhone, iPad, iPod Touch and Apple TV / IPSW ...
ipsw.me
Download current and previous versions of Apple's iOS Firmware and receive push notifications when new firmwares are released.
-
First person to buy an iPhone 6 in Perth immediately drops it during TV ...
www.9news.com.au
It's always best to be calm when you're handling something precious - as the first Perth man to buy an iPhone 6 found out this morning.
-
iPhone 6 review
www.theverge.com
Let’s start with the facts. There is explosive demand for bigger smartphones. A 4-inch smartphone feels small now; somewhere around 5 inches is the ...
-
Live blog: Apple announces Apple Watch, iPhone 6, iPhone 6 Plus and Apple ...
gigaom.com
Our live coverage of Apple’s iPhone and Apple Watch event can be found here.
-
Apple's Event Site Is Filled With Mysterious Big White Boxes
mashable.com
Apple watchers are stumped over the company's intentions in building a series of three-story windowless white cubes at the site of the big Apple ...
-
ALS Ice Bucket Challenge
www.youtube.com
Apple CEO Tim Cook and recording artist Michael Franti take the Ice Bucket Challenge to benefit ALS research.
-
1Password - Password Manager and Secure Wallet
itunes.apple.com
Get 1Password - Password Manager and Secure Wallet on the App Store. See screenshots and ratings, and read customer reviews.
-
You poked my heart......
www.youtube.com
Jukin Media Verified (Original) * For licensing / permission to use: Contact - licensing(at)jukinmediadotcom Save 50% or More from Gymboree For Your ...
-
#PhotoshopRF
twitter.com
Connectez-vous à vos amis — et d'autres personnes fascinantes. Recevez des mises à jour instantanées sur les choses qui vous intéressent. Et regardez ...
-
How to design for thumbs in the era of huge screens
qz.com
After years of resistance, Apple’s iPhone 6 announcement last week officially signaled the dawn of the Era of Huge Screens. And it’s going to crash ...
-
Apple #BendGate
www.applebendgate.com
My friend told me that microwaving my iPhone 6 Plus would 'un-bend it'. He's a f*cking liar, and no longer my friend - Sam Whitmore
-
Indian spacecraft reaches Mars for less than it cost to make 'Gravity'
www.theverge.com
India is celebrating a major milestone today, after becoming the first country to reach the orbit of Mars on its very first attempt. After launching ...
-
Brunettes Shoot Blondes - Knock Knock (Official Video) - Music Video on 14 ...
www.youtube.com
BRUNETTES SHOOT BLONDES - Knock Knock (Official Video) http://brunettesshootblondes.org/ For record labels, concerts, interviews: ...
-
Talko | Talko is the best way to use your voice to get things done.
www.talko.com
TALK. SHARE. DO. Amazing things can happen when we talk with each other. Thoughts are shared, ideas formed and problems solved. Talko is the best way ...
-
Citizen Onboard
citizenonboard.com
Citizen Onboard is a national project to understand how our own government services work and don't work. We tear down so we can build up. Learn how ...
-
WARNING: Can you handle the biggest spoilers in TV and film? | Netflix ...
spoilers.netflix.com
Step into the Netflix spoiler vault and see how much spoiling you can take.
-
Watch John Oliver Take on Miss America
www.slate.com
Last night, John Oliver took on Miss America in a 15 minute Last Week Tonight segment that skewered the pageant's backwards approach to offering ...
-
You can now stream all of Aphex Twin's new album Syro
www.theverge.com
Syro, the first full-length album from British electronic artist Aphex Twin since 2001's Drukqs, is streaming online and available to buy two days ...


Apache Cordova
Connecting to Device
Device is Ready
Waiting for heading...
Waiting for proximity...
Waiting for gyro...
Start Watching
Stop Watching


LogSeverity
Used to indicate the severity, or importance, of a log message.
Severity is a continuum, from .Verbose
being least severe to .Error
being
most severe.
The logging system may be configured so that messages lower than a given severity are ignored.
-
The
See moreLogSeverity.Comparator
is used to compareLogSeverity
values.Declaration
Swift
public enum Comparator
-
The highest severity, used to indicate that something has gone wrong; a fatal error may be imminent.
Declaration
Swift
case Error = 5
-
Used to indicate something of interest that is not problematic.
Declaration
Swift
case Info = 3
-
The lowest severity, used for detailed or frequently occurring debugging and diagnostic information. Not intended for use in production code.
Declaration
Swift
case Verbose = 1
-
Used for debugging and diagnostic information. Not intended for use in production code.
Declaration
Swift
case Debug = 2
-
Used to indicate that something appears amiss and potentially problematic. The situation bears looking into before a larger problem arises.
Declaration
Swift
case Warning = 4
-
Compares the receiver against another
LogSeverity
value using the given comparator.Declaration
Swift
public func compare(comparator: Comparator, against severity: LogSeverity) -> Bool
Parameters
comparator
The
LogSeverity.Comparator
to use for the comparison.severity
The
LogSeverity
value being compared against the receiver. This value represents the righthand value in the comparison, while the receiver represents the lefthand value.Return Value
The result of the comparison.
-
A convenience function to determine the minimum
LogSeverity
value to use by default, based on whether or not the application was compiled with debugging turned on.Declaration
Swift
public static func defaultMinimumSeverity(minimumForDebugMode: LogSeverity = .Debug, isInDebugMode: Bool = false) -> LogSeverity
Parameters
minimumForDebugMode
The
LogSeverity
value to return whenisInDebugMode
istrue
.isInDebugMode
Defaults to
false
. Pass the value(DEBUG != 0)
to ensure the correct value for your build.


View the HTML to see the tracking code that was added by the "track" helper. This helper was included to demonstrate how helpers work.
The "slugifier" mixin was included by default, you can find it in ./src/helpers/mixins.js
slugifier
./src/helpers/mixins.js


| Overview | Module | Use | Devguide | Index |
| Services' Summary | Interfaces' Summary | Properties' Summary | Services' Details | Interfaces' Details | Properties' Details |
| service GenericDrawPage |
|
| Exported Interfaces - Summary | |
| XShapes | |
| XShapeGrouper | With this interface you can group/ungroup a collection of Shapes. |
| XShapeCombiner | With this interface you can combine/split a collection of Shapes. (details) |
| XShapeBinder | With this interface you can bind/unbind a collection of Shapes. (details) |
| ::com::sun::star::container::XNamed | Gets or sets the name of this page. (details) |
| ::com::sun::star::lang::XServiceInfo | returns the services implemented by this instance. |
| ::com::sun::star::beans::XPropertySet | gives you access to the properties of this DrawPage. (details) |
| Properties' Summary | |
| long BorderBottom |
[ OPTIONAL ] This is the border at the bottom. |
| long BorderLeft |
[ OPTIONAL ] This is the border at the left. |
| long BorderRight |
[ OPTIONAL ] This is the border at the right. |
| long BorderTop |
[ OPTIONAL ] This is the border at the top. |
| long Height |
[ OPTIONAL ] This is the height. |
| long Width |
[ OPTIONAL ] This is the width. |
| [ readonly ] short Number |
[ OPTIONAL ] This is the number of this page, starting with 1. |
| ::com::sun::star::view::PaperOrientation Orientation |
[ OPTIONAL ] This is the orientation of this page. |
| ::com::sun::star::container::XNameContainer UserDefinedAttributes |
[ OPTIONAL ] this property stores xml attributes. They will be saved to and restored from automatic styles inside xml files. |
| [ readonly ] boolean IsBackgroundDark |
[ OPTIONAL ] this property is true if the avveraged background filling colors luminance is belove an application specified threshold value. This can be used to determine the actuall value of an auto color. |
| ::com::sun::star::container::XIndexAccess NavigationOrder |
[ OPTIONAL ] this index access defines a navigation order for the top level shapes inside this page. By default this is equal to the index access of the slide itself, making the z-order the default navigation order for top level shapes. |
| Exported Interfaces - Details | |
XShapes
|
|
XShapeGrouper
|
|
XShapeCombiner
|
|
XShapeBinder
|
|
::com::sun::star::container::XNamed
|
|
::com::sun::star::lang::XServiceInfo
|
|
::com::sun::star::beans::XPropertySet
|
| Properties' Details | |
BorderBottom
|
|
BorderLeft
|
|
BorderRight
|
|
BorderTop
|
|
Height
|
|
Width
|
|
Number
|
|
Orientation
|
|
UserDefinedAttributes
|
|
IsBackgroundDark
|
|
NavigationOrder
|
Copyright © 2013, The Apache Software Foundation, Licensed under the Apache License, Version 2.0. Apache, the Apache feather logo, Apache OpenOffice and OpenOffice.org are trademarks of The Apache Software Foundation. Other names may be trademarks of their respective owners.


Navigation application
A
Adam Lambert
Adele
Amy Winehouse
B
Beyonce
C
Chris Brown
Play List
Music
Artist


Neighbor.ly
Chat
Upload Files
Search Places
Tips
Contributions
Log Out
Neighbor.ly is a Community for New Immigrants
Find places to visit
Search


Follow these steps to share a link to a comment in the forum:
- Open the forum homepage.
- Click the discussion that contains the comment that you want to share.
- On the discussion page, in the bottom-right corner of the comment that you want to share, click the share icon and then click one of the share options.


Here is the link to my LinkedIn profile There is a link to my GitHub repository on the LinkedIn page, under Projects. Here is a direct link to the GitHub repository for easy of use: Programing Project


|
|
|
|
Something happened
A starting point for more complex transactional emails that could contain multiple messages. It can contain links or rich text. Read this if text is written in markdown. Optionally this section can include a 128x128 sized illustration.
|
|
|
Good for emails like:
- Your answer was accepted
- You’ve been added to a Team
- New Interests
- Tag digest
|
|
|
|
|
|
|
Have something else to say, but it’s secondary and not directly connected to the message above? A new email section can be created.
|
|
|
|
|
|


Today I set about trying to bring a little linux
joy into my Windows work life. Although Windows 10 is the world’s most popular operating system, it isn’t mine! 😊
If you can, work in a linux, it’s free, open-source, and powerful - putting you in complete control of your computer. 💻 If you can’t, and you are stuck on a Windows 10 computer at work, then this post is for you!
Microsoft, recognising the brilliance of linux, created the Windows Subsystem Linux (WSL) to allow a linux subsystem to work within your Windows computer. Essentially a linux terminal can be used to install and run linux tools on your Windows file system! 📁
Linux comes in many flavours, one of the most popular (and my favourite) is Ubuntu.
Today, I am going to walk through the steps I took to install Ubuntu on my Windows 10 machine:
- Enable the Windows Subsystem Linux (WSL) by typing the following into your command line (or powershell):
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
⚠ With the a Windows update after May 2020 run the following instead:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Install the Ubuntu App - I couldn’t download the app via Microsoft store so I did the following:
- Selected “Ubuntu 20.04” from here
- Then used the following command to install the file in the command line:
Add-AppxPackage .\[insertFileNameHereWithoutSuffix].appx
-
Start the Ubuntu app (I typed “Ubuntu” into the Windows search and double clicked Ubuntu to start)
-
Create a username and password (doesn’t need to match Windows credentials)
- Added
cd /mnt/c/Users/username/
to.bashrc
so my Ubuntu terminal always starts in Windows file system (replace"username"
with your Windows username). To edit your.bashrc
file, open it with the following:nano -c ~/.bashrc
Make your way to the end of the file (use the down arrow or
Ctrl + V
). Add the following text:# Move to the Windows file system cd /mnt/c/Users/username/
Press
Ctrl + X
thenY
to save changes and exit.
Now you’re all set! 👍
Note that you’ll find your Windows file system at
/mnt/c/Users/yourWindowsUsername/
- you’re welcome! 😉
Lastly, I wanted to use my Ubuntu terminal to work with git
so I did a few extra steps:
Importantly, to work with git in the Windows Subsystem Linux, I needed to use SSH based repositories. This meant I had to make new clones of my repos, which were set up as https!
- Set up your global configuration parameters:
$ git config --global user.name "Joseph Crispell" $ git config --global user.email<EMAIL_ADDRESS>Skip to step 6. if you use SSH for git repositories on your Windows machine
- I created a new ssh key with the following:
cd ~ mkdir .ssh cd .ssh ssh-keygen -t ed25519 -C<EMAIL_ADDRESS>Create a name for your key. I called mine
id_rsa
, not sure why! - Added my SSH key to my ssh-agent:
eval $(ssh-agent -s) ssh-add ~/.ssh/id_rsa
Change
id_rsa
to whatever you called your SSH key. - Add the new SSH key to GitHub account:
- Head to github
- Click into your settings
- Select SSH and GPG keys
- Click “New SSH Key”
- Create a name for your SSH key and paste the contents of
id_rsa.pub
into the box provided
- Copy your SSH key from Ubuntu to Windows:
cd ~/.ssh cp id_rsa* /mnt/c/Users/username/.ssh/
Again, remember to change
id_rsa
to whatever you named your key. You also need to change"username"
in the path to your Windows username. - [OPTIONAL] If you already used ssh on your Windows computer for git repositories, you can copy the Windows SSH key onto your Ubuntu system with:
cd ~ mkdir .ssh cd .ssh cp /mnt/c/Users/username/.ssh/id_rsa* .
Remember to change
"username"
in the path to your Windows username.
I must admit that it took me much longer than it should of to figure out the above steps, despite a lot of useful resources online:
- Install Ubuntu on Windows 10
- Manually install Ubuntu App
- Set up git for Windows Subsystem Linux
- Connecting to GitHub with SSH
For the moment, I’m mainly going to use my Ubuntu terminal for managing my git
repositories. So really it isn’t too necessary but I wanted to get Ubuntu back into my life and the linux terminal is incredibly helpful for developing code and I’m sure to use it more and more from now on! 🐧 🎉


A propositional logic formula in conjunctive normal form (CNF) - or more simply put:
an AND of ORs.
Let's build the following CNF formula:
(x1 ∨ ¬x2) ∧ (¬x1 ∨ x2 ∨ x3) ∧ (¬x1)
Or in plain english:
(x1 or not x2) and (not x1 or x2 or x3) and (not x1)
var CnfFormula = require('./CnfFormula');
var cnf = new CnfFormula();
var x1 = {}, x2 = {}, x3 = {};
cnf.openClause(x1).orNot(x2).close()
.openClauseNot(x1).or(x2).or(x3).close()
.openClauseNot(x1).close();
Definitions
Each chunk of or between () is called a clause.
x1, x2 and x3 are called variables. Their instances are irrevelant to the algorithm.
x1 and ¬x1 are called literals. A literal is either:
- just a variable - such as x1, it is then called a positive literal,
- the negation of a variable - such as ¬x1, it is then called a negative literal.
Implementation notes
The execution of the DPLL algorithm does not modify the CNFFormula
. In other words: once built, a CNFFormula
is
immutable.
This implementation makes use of maps and sets to keep tracks of the clauses, variables
and literals of this formula.
If a variable implements the equals
function it will be used instead of the ===
operator to determine variable
equality.

Clause: Clause.js
Literal: Literal.js
Map: Map.js
Set: Set.js
Source code
import Map.js
var Map = require('./Map');
import Set.js
var Set = require('./Set');
import Clause.js
var Clause = require('./Clause');
Constructor - no argument.
function CnfFormula() {
'use strict';
the array
of Clauses of this formula.
var clauses = [];
a map
whose keys are variables and value the number of occurences in the formula.
var variables = new Map();
a map
whose keys are variables and values are associated positive literal.
var positiveLiterals = new Map();
a map
whose keys are variables and values are associated negative literal.
var negativeLiterals = new Map();
adds all the variables of the specified array
to this formula. This fills the variables
attribute.
function addVariables(someVars) {
var it = someVars.iterator();
while (it.hasNext()) {
var someVar = it.next();
var occ = variables.get(someVar);
if (occ === undefined) {
variables.put(someVar, 1);
} else {
variables.put(someVar, occ + 1);
}
}
};
Returns a new clause
with specified variable
as first literal
. This literal
will be positive.
this.openClause = function(variable) {
return new Clause(variable, false, this);
};
Returns a new clause
with specified variable
as first literal
. This literal
will be negative (negation of
variable).
this.openClauseNot = function(variable) {
return new Clause(variable, true, this);
};
Adds the specified clause
to this formula.
this.addClause = function(clause, vars, literals) {
clauses.push(clause);
addVariables(vars);
var it = literals.iterator();
while (it.hasNext()) {
var l = it.next();
if (l.isPositive()) {
positiveLiterals.put(l.variable(), l);
} else {
negativeLiterals.put(l.variable(), l);
}
}
return this;
};
returns the variables
attribute.
this.variables = function() {
return variables;
};
Evaluate this formula against the specified valuation
and returns
true
if this formula is satisfied under the specifiedvaludation
false
if this formula is not satisfied under the specifiedvaludation
undefined
if the specifiedvaludation
does not allow to evaluate this formula - i.e. some variables are still unassigned
This method just loop through all the clauses of this formula calling in turn Clause#evaluate
.
this.evaluate = function(valuation) {
var result = true;
var length = clauses.length;
for (var index = 0; index < length && result !== undefined && result; index++) {
result = clauses[index].evaluate(valuation);
}
return result;
};
Performs the unit propagation step. If a clause is a unit clause, i.e. it contains only a single unassigned literal, this clause can only be satisfied by assigning the necessary value to make this literal true. Thus, no choice is necessary. In practice, this often leads to deterministic cascades of units, thus avoiding a large part of the naive search space.
The specified valuation
will be filled with computed variable truth assignments upon return.
This method just loop through all the clauses of this formula calling in turn Clause#evaluate
.
this.unitPropagate = function(valuation) {
var length = clauses.length;
for (var index = 0; index < length; index++) {
clauses[index].unitPropagate(valuation);
}
};
Performs the pure literal elimination step. If a propositional variable occurs with only one polarity in the
formula,
it is called pure. Pure literals can always be assigned in a way that makes all clauses containing them true
.
Thus, these clauses do not constrain the search anymore and can be deleted.
The specified valuation
will be filled with computed variable truth assignments upon return.
this.pureLiteralAssign = function(valuation) {
var it = valuation.unassigned().iterator();
while (it.hasNext()) {
var variable = it.next();
variable not assign, check if pure literal.
var pLiteral = positiveLiterals.containsKey(variable);
var nLiteral = negativeLiterals.containsKey(variable);
if (pLiteral && !nLiteral) {
valuation.putSolution(variable, true);
} else if (nLiteral && !pLiteral) {
valuation.putSolution(variable, false);
}
}
};
}
expose API to Node.js
module.exports = CnfFormula;


REGISTRATION
REGISTRATION
Monday, May 24:
08:30 - 08:45 Welcome
08:45 - 10:15 Software Transactional Memory (Adam Welc)
10:15 - 10:45 Coffee Break
10:45 - 12:30 Virtual Prototyping Embedded Architectures (Jean-Pierre Talpin)
12:30 - 13:30 Lunch
13:30 - 14:45 Infosys
14:45 - 16:15 Data-Parallel Programming (Satnam Singh)
16:15 - 16:45 Coffee Break
16:45 - 18:30 Low-Level Concurrency - For Real (Peter Sewell)
18:30 - 20:30 Dinner
20:30 - 21:00 Short student presentations
Tuesday, May 25:
08:30 - 10:15 Low-Level Concurrency - For Real (Peter Sewell)
10:15 - 10:45 Coffee Break
10:45 - 12:30 Data-Parallel Programming (Satnam Singh)
12:30 - 14:00 Lunch
14:00 - 15:45 Virtual Prototyping Embedded Architectures (Jean-Pierre Talpin)
15:45 - 16:15 Coffee Break
16:15 - 18:00 Software Transactional Memory (Adam Welc)
18:30 - 20:30 Dinner
Wednesday, May 26:
All day excursion
Thursday, May 27:
08:30 - 10:15 Concurrent Programming in X10 and Memory Models (Vijay Saraswat)
10:15 - 10:45 Coffee Break
10:45 - 12:30 Deny-Guarantee Reasoning (Matthew Parkinson)
12:30 - 14:00 Lunch
14:00 - 15:45 Analysis and Verification of Concurrent Programs (G. Ramalingam)
15:45 - 16:15 Coffee Break
16:15 - 18:00 Concurrent Programming in X10 and Memory Models (Vijay Saraswat)
18:30 - 20:30 Dinner
Friday, May 28:
08:30 - 10:15 Concurrent Algorithms and Transactional Memory (Mark Moir)
10:15 - 10:45 Coffee Break
10:45 - 12:30 Analysis and Verification of Concurrent Programs (G. Ramalingam)
12:30 - 14:00 Lunch
14:00 - 15:45 Deny-Guarantee Reasoning (Matthew Parkinson)
15:45 - 16:15 Coffee Break
16:15 - 18:00 Concurrency Testing: Challenges, Algorithms, and Tools (Madan Musuvathi)
18:30 - 20:30 Dinner
Saturday, May 29:
08:30 - 10:15 Concurrency Testing: Challenges, Algorithms, and Tools (Madan Musuvathi)
10:15 - 10:45 Coffee Break
10:45 - 12:30 Concurrent Algorithms and Transactional Memory (Mark Moir)
12:30 - 14:00 Lunch
14:00 - 15:00 Concurrency and the Cloud: Formal Aproaches to Map-Reduce (TS Mohan)
IIIT-Bangalore, India
May 23 - 30, 2010