WITNESS LIST Intergovernmental Relations Committee February 20, 2001 - 9:00A SB 243 FOR: Gattis, David Assistant City Manager (TX Municipal League & City planning Association), Benbrook, TX Sandlin, Mike Home Builder (TX Association of Builders), Fort Worth, TX AGAINST: Baggett, Donnis Publisher & Editor of "The Eagle" (TX Newspapers), Bryan, TX Registering, but not testifying: For: Erben, Andrew KB Home (KB Home), Austin, TX Stout, Bob Director of Government Relations (The Woodlands Operating Co.), The Woodlands, TX Wood, Toy Director of Government Affairs (Greater Houston Builders Association), Houston, TX SB 354 FOR: Stagner, Steve Executive Director (Consulting Engineers Council), Austin, TX AGAINST: Settle, Charles Assistant Director of Public Works (City of Houston), Houston, TX ON: Cosentino, Michael City Attorney (City of Bryan), Bryan, TX Osburn, Tom Mayor of Sherman (Texoma Area Solid Waste Authority), Sherman, TX Sissney, Dale General Manager of TASWA (TX Area Solid Waste Athority), Whitesboro, TX Registering, but not testifying: For: Norman, Scott General Counsel (Consulting Engineers of TX), Austin, TX Sewell, Jim Vice President (Association of General Contractors), Austin, TX On: Rodriguez, Arturo Attorney (Texoma Area Solid Waste), Austin, TX SB 438 FOR: Howe, Billy TX Farm Bureau (Tx Farm Bureau), Austin, TX AGAINST: Cosentino, Michael Attorney (City of Bryan), Bryan, TX Maddox, David City Manager (City of Sweetwater), Sweetwater, TX Registering, but not testifying: For: Brockman, Matt Association Director (Independent Cattlemen's Association of TX), Lockhart, TX Molleda, Nancy lobbyist (TX Land & Mineral Owners Association), Austin, TX SB 452 FOR: Bridges, Allen Hays County Sherriff's office (Hays County Triad S.A.L.T. Council), San Marcos, TX Registering, but not testifying: For: Allison, Jim General Council (County judges & Commissioners Ass. TX), Austin, TX Myers, Roger Retired (Hays County Triad S.A.L.T. Council), Buda, TX Thompson, John County Judge (Commissioner's Association), Livingston, TX SB 516 Registering, but not testifying: For: Easley, Mike Center For Rural Health (Center For Rural Health), Austin, TX Herzog, Greg TX Academy of Family Physicians (TX Academy of Family Physicains), Austin, TX Phipps, Candie TX Pediatric Society (TX Pediatric Society), Austin, TX Turner, Jill TX Farm Bureau (TX Farm Bureau), Austin, TX Yates, Anne TX Medical Association (TX medical Association), Austin, TX SB 588 Registering, but not testifying: For: Johnson, Karen President (United Way of TX), Austin, TX Matterson, Drew First Southwest Co. (First Southwest Co.), Houston, TX


Kaia.js library not detected
Kaia.ai Android app not detected
Serial USB disconnected
Waiting to receive events from robot


DeliRoll |
Amazon Redshift |
||
|---|---|---|---|
| Instance type | cr1.8xlarge | Redshift 8XL | |
| Instances | 1 | 3 | |
| Cores | 16 | 32 | |
| RAM | 244GB | 240GB | |
| Cost / Month | $2,520 | $9,792 |
SELECT sum(column) FROM table
Redshift |
1.9s |
|---|---|
DeliRoll |
0.6s |
SELECT sum(column) FROM table GROUP BY dimension
Redshift |
21.6s |
|---|---|
DeliRoll |
17.4s |
SELECT sum(col1),sum(col2),...,sum(col7) FROM table
Redshift |
4.8s |
|---|---|
DeliRoll |
0.7s |
SELECT sum(col1),sum(col2),...,sum(col250) FROM table
Redshift |
...8 minutes! |
|---|---|
DeliRoll |
1.9s |
Bad programmers worry about the code.
Good programmers worry about
data structures
and their relationships.
Linus Torvalds
| {"cookie_set": | true | ,"country": | "Sweden" | ,"cost": | 840 | } |
| {"cookie_set": | false | ,"country": | "UK" | ,"cost": | 23 | } |
| {"cookie_set": | true | ,"country": | "China" | ,"cost": | 11 | } |
| {"cookie_set": | true | ,"country": | "Sweden" | ,"cost": | 840 | } |
| {"cookie_set": | false | ,"country": | "UK" | ,"cost": | 23 | } |
| {"cookie_set": | true | ,"country": | "China" | ,"cost": | 11 | } |
| {"cookie_set": | integer | ,"country": | integer | ,"cost": | integer | } |
| {"cookie_set": | integer | ,"country": | integer | ,"cost": | integer | } |
| {"cookie_set": | integer | ,"country": | integer | ,"cost": | integer | } |
Compression ratio dropped from 11:1 to 1.5:1
The dense encoding results to faster computation
The dense encoding is partially
Numba is a just-in-time specializing compiler which compiles annotated Python and NumPy code to LLVM.
from numba import autojit
@autojit
def sum2d(arr):
M, N = arr.shape
result = 0.0
for i in range(M):
for j in range(N):
result += arr[i,j]
return result
with self.DEF([(m, types[m]) for m in args]):
self.INIT_SPARSEVAR(score_metrics)
with self.FOR_ALL_ROWS(has_row_filter):
with self.ROW_MATCHES(flags, where_expr, score_metrics, partitioned):
self.ASSIGN_METRICS(score_metrics)
while (_indptr_idx < _indptr_len):
while (True):
_byte = _indptr[_indptr_idx]
if (_byte & 1):
_indptr_row += (_byte >> 1) + 1
_indptr_val |= (_byte >> 1) << _shift
while_condition_20:15:
%_shift_2 = phi i32
%_indptr_idx_3 = phi i64
while_body_21:12:
%81 = mul i64 %_indptr_idx_3, %29
%82 = add i64 0, %81
%83 = getelementptr i8* %21, i64 %82
Multicorn allows you to access any data source in your PostgreSQL database in Python.
CREATE FOREIGN TABLE constanttable (
test character varying, test2 character varying
) server multicorn_srv options (
wrapper 'myfdw.ConstantForeignDataWrapper'
)
SELECT * from constanttable;
class ConstantForeignDataWrapper(ForeignDataWrapper):
def execute(self, quals, columns):
for index in range(4):
line = {}
for column_name in self.columns:
line[column_name] = '%s %s' % (column_name, index)
yield line
test | test2
---------+----------
test 0 | test2 0
test 1 | test2 1
test 2 | test2 2
test 3 | test2 3
That's the whole point.
You can use a high-level language to quickly implement domain-specific solutions that outperform generic solutions, regardless of the language they use.
You dare to do things
that would be too painful to do
with a lower-level language.
Python, Erlang, Big Data, AWS


Why why why oh why ?
Embed in the table next to my sofa a few touch zone (using capacitive sensing) to control basic functions of the TV and no more search for that very big remote. You basically need volume %20/-, channel %20/- and power. So in order to full fill that project, we need the following basics :
Reviewed objectives
Well, the wood work stuff was not possible due to bad sensitivity of my sensors. Direct touch work fine, through-wood wouldnt.
For the casing, a old SNES cartridge : 100 JPY, sufficient size, very easy to workout maleable plastic.
Bad surprise, distance of the IR is not sufficient for reaching tv from the furniture. Not much, like missing 40cm maybe but still out of reach :( Otherwise working just fine. Maybe I'll hook it somewhere else and put long wires to the IR emitter.
In fact after some checkings, it's weirder then first thought: it works perfectly fine from the distance I initially planned. Problem is that it can't startup the TV
the first time or after a long inactivity time. If you start the TV with the usual remote, it works fine then and after and you can full control the TV, even start/stop it at will. But "cold start" seems not to work... weird, and no idea why... Oo;
Images
The naked truth. It has also 2 led for the debug purpose (I bought a 100 pack for 5 euro so lets us it)
Cased in a old SNES cartridge (100 jpy somewhere in Akihabara or Higashi-Nakano)
Material
Codes
ArdRemoteTable.pde The sketch for Arduino IDE
setfuses.Pololu.sh Set the fuses for 16MHz external quartz
uploadArdRemoteTable.Pololu.sh Upload the IDE compiled .hex file to the board
IRrecord.pde Use this script to record IR info. You need the IRremote library and change it to have a longer buffer (#define RAWBUF 256)
Links


{% load static %}
This function requires javascript to work properly
Calendar Plan
Today
22nd April 2018
{% if user.user.get_go_events_today %}
Upcoming Events
{% for event in user.user.get_go_events_today %}
{{ event.time }}
{{ event.event_name }}
at {{ event.location }}
{% endfor %} {% else %}
You have no scheduled events today
{% endif %}


Waveguide
If neither a list of attribute names or a command are given, Waveguide instrospects the Nix expression and builds all the found attributes.
If neither a list of attribute names or a command are given, Waveguide instrospects the Nix expression and builds all the found attributes.


Preparation time
less than 30 mins
Cooking time
1 to 2 hours
Serves
Serves 4
Lamb cooked with cockles is a traditional Welsh dish which makes a wonderfully comforting supper.
Preheat the oven to 170C/325F/Gas 3. Place the cockles in a colander and rinse under a cold running tap, shaking to wash off any grit or to break open any glued together with silt.
Put the cockles and cider into a medium-sized heavy pan. Cover with the lid and steam for 2-3 minutes until the cockles have opened. Strain the cockles, discarding any that remain closed, then strain the liquor again through a fine sieve to remove as much grit as possible.
Season the lamb with the thyme, sea salt and freshly ground black pepper. In a very hot ovenproof pan, melt the butter and quickly brown the lamb all over then remove the meat from the pan and set it aside.
Tip the onion and lardons into the same pan and cook over a moderate heat until the onions are translucent. Pour in the cider vinegar to deglaze the pan then return the meat to the pan and pour in the cockle liquor. Cover the pan with a lid, transfer it to the oven and cook for 45 minutes to one hour.
Meanwhile, pick three-quarters of the cockles from their shells, leaving the remainder in their shells. Add all the cockles to the lamb, warm through then season with sea salt and freshly ground black pepper and stir in the parsley and celery leaves.
Slice the lamb onto warmed plates, ladle over the cockles and liquor and serve with boiled potatoes and Savoy cabbage.


Poryscript Playground (Running Poryscript version [2.14.0])
See
https://github.com/huderlem/poryscript
for Poryscript documentation.
Compile
Optimize
Compile-Time Switches:
# Enter your Poryscript here, and press the "Compile" button! script LittlerootTown_RivalHouseSign { lockall checkplayergender if (var(VAR_RESULT) == MALE) { msgbox("It's MAY's house.") } else { msgbox(format("It's BRENDAN's house. He was always my favorite.")) } releaseall }


This is an experimental game involving haptics. As such, it will only work on mobile devices with a vibration motor.
The objective of the game is to move your finger from the bottom green zone to the top, without touching the black lines.
If you do touch a black line, you should feel your phone vibrate.
Try to complete the game with your eyes shut.
Please tap anywhere to begin.


"x" "1" "EDER,E AND DEININGER,C, MUTAGENICITY OF 2-ALKYLPROPENALS IN SALMONELLATYPHIMURIUM STRAIN TA 100:STRUCTURAL INFLUENCES, ENVIRON. MOL. MUTAGEN.37(4):324-328, 2001"


The MIT Licensed code is available at Github: Bootstrap RTA Code
Copyright © 2013 Clay Street Online LLC. All Rights Reserved.
This RTA shows the default button set.
It is enabled by setting class="rta"
on the textarea and
making the following javascript call:
$(document).ready(function() { $.rta(); });
The code above initializes all textarea's with an 'rta' class to have the default button set.
You can initialize a specific textarea by specifying a jquery selector as shown below:
$(document).ready(function() { $('#myTextArea').rta(); });
Two way editing (disabled by default) allows HTML source to be edited in the original textarea.
Click the HTML button above to switch between HTML and WYSIWYG editing.
There are 3 ways to enable two way editing:
data-rta-twoway="true"
attribute to the textarea
$.rta({ 'twoway': "true" });
$.rta.options.twoway = true;
Note: When two way editing is disabled (the default), the original textarea (containing the HTML source) can still be viewed but it is marked read-only. See the 'All Buttons' example below for read-only behavior.
The buttons for this RTA are assigned in HTML via a data-rta="bold italic, ul ol"
attribute on the textarea.
There are two ways to specify a custom set of buttons:
data-rta"bold italic, ul ol"
attribute to the textarea (like this demo).
$.rta('bold italic, ul ol');
This RTA shows available edit buttons. The code to accomplish this follows:
$(document).ready(function() { $.rta($.rta.allButtons); });
Note that there is an 'allButtons' property on the global 'rta' object that provides a convenient grouping of all available buttons.
The following code shows how to add all buttons to a specific textarea whose id="myTextArea"
$(document).ready(function() { $('#myTextArea').rta($.rta.allButtons); });
This RTA upsizes from Bootstrap 'mini' buttons to 'small' buttons.
There are 3 ways to change the button size:
data-rta-btnsize="small"
attribute to the textarea
$.rta({ 'btnsize': "small" });
$.rta.options.btnsize = 'small';
This is a plain textarea. This was included merely to show that you can mix RTA and plain textarea fields in the same form.


Welcome
pickleDB is a lightweight and simple key-value store.
It is built upon Python's
json
module and was inspired by
redis. It is licensed
with the BSD three-clause license.
pickleDB is Fun
>>> import pickledb
>>> db = pickledb.load('example.db', False)
>>> db.set('key', 'value')
True
>>> db.get('key')
'value'
>>> db.dump()
True
And Easy to Install
$ pip install pickledb
More Information
You can view all of pickleDB's commands and what they do
here.
pickleDB was written by
Harrison Erd. If you would like
to file an issue report or fork the project,
check out the
Github project page.
You can also take a look at pickleDB
on PyPI.
pickleDB got its name from Python's "pickle" module, which it previously used.
However, now pickleDB uses the "json" module. It is faster and cleaner.
But the name stuck!


Hello world 2021!


The OUTDOOR ceremony will be followed by a Cocktail Hour on the Porch and Lawn. Sit down dinner will be served in the barn.


SQLime is an online SQLite playground for debugging and sharing SQL snippets. Kinda like JSFiddle, but for SQL instead of JavaScript.
Here are some notable features:
🔋 Full-blown database in the browser
SQLime is backed by the latest version of SQLite, provided by an excellent sql.js project. It provides a full-featured SQL implementation, including indexes, triggers, views, transactions, CTEs, window functions and execution plans.
🔌 Connect any data source
Connect any local or remote SQLite database. Both files and URLs are supported. For example, try loading the Employees database from the GitHub repo.
🔗 Save and share with others
SQLime saves both the database and the queries to GitHub so that you can revisit them later or share them with a colleague. The database is stored as a plain text SQL dump, so it's easy to read the code or import data into PostgreSQL, MySQL, or other databases.
For example, here is the gist for the Employees database, and here is the sharing link for it.
📱 Mobile friendly
Most playgrounds are not meant for small screens. SQLime was specifically designed and tested on mobile devices.
🔒 Secure and private
There is no server. SQLime works completely in the browser. The GitHub API token is also stored locally. Queries are saved as private GitHub gists within your account. Your data is yours only.
⌨ Dead simple
SQLime has zero third-party dependencies other than SQLite (sql.js). Good old HTML, CSS, and vanilla JS — that's all. No frameworks, no heavy editors, no obsolete and vulnerable libraries. Just some modular open-source code, which is easy to grasp and extend.
Follow @ohmypy on Twitter to keep up with new features 🚀
Keyboard shortcuts
| win | mac | |
|---|---|---|
⌃↵ |
⌘↵ |
run query |
⌃O |
⌘O |
open file |
⌃U |
⌘U |
open url |
⌃S |
⌘S |
save and share |
⌃/ |
⌘/ |
show tables |


The query systemDiagnostics accepts certain UNIX binaries as parameters for debugging purposes, such as
whoami, ps, etc. It acts as a restricted shell. However, it is protected
with a username and password. After obtaining the correct
credentials, the restricted shell seems to be bypassable by chaining commands together.


Preparation time
less than 30 mins
Cooking time
30 mins to 1 hour
Serves
Makes 20 chocolates
Dietary
These pretty dark chocolate shells are filled with caramel and sealed with a white chocolate base.
Equipment: You will need 20 assorted seashell or similar chocolate moulds and a sugar thermometer.
Put the dark chocolate into a bowl over a pan of some simmering water. Don’t let the bowl touch the water or the chocolate will burn, and don’t let any water into the chocolate or the chocolate will seize.
Use a chocolate thermometer and bring the temperature up to 42C/110F. Then take it off heat and let it cool to 32C/90F. Use a brush or a teaspoon to coat and line the seashell moulds with the chocolate (you will not need all the chocolate). You’ll need to do this quickly before the chocolate sets.
Use a sharp knife or chocolate scraper tongue to tidy up any messy bits around the chocolate shells. Scrape any dark chocolate that you haven’t used into a bowl and save it to use again.
Slide the moulds into the fridge to set for around 20 minutes.
To make the salted caramel, put the cream and dark muscovado sugar into a heavy-based pan and warm over a low heat.
Meanwhile put the caster sugar into a small heavy-based pan and heat gently, stirring, to melt the sugar. Once melted, continue to cook without stirring until it is a dark golden-brown.
Take the pan off the heat and add in the warmed cream and muscovado sugar, taking care as it will bubble up. Once the initial bubbling subsides, stir quickly with a wooden spoon to make a caramel. Let it cool a little, then stir in the sea salt. Allow the caramel to cool completely until thick.
When the caramel has cooled, take the chocolate moulds out of the fridge and place a teaspoon of the caramel in each of the chocolate shells. Do not overfill. Set aside in the fridge to firm up.
Melt the white chocolate, as before. Then spoon the chocolate over the caramel to cover. Chill again for 15 minutes. When hard, gently turn the chocolates out of the mould.
Store in an airtight container in the fridge for up to five days.
You need JavaScript to view this clip.
How to make caramel and praline
You need JavaScript to view this clip.
How to temper chocolate


@* * Copyright 2023 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import tags._ @this() @()(implicit messages: play.api.i18n.Messages) @card( id = Some("child-benefit-card"), url = Some(routes.InterstitialController.displayChildBenefitsSingleAccountView.url), gaAction = Some("Benefits"), gaLabel = Some("Child Benefit"), heading = messages("label.child_benefit"), headingTag = "h3", bodyContent = Some(Html("
" + messages("label.a_payment_to_help_with_the_cost_of_bringing_up_children") + "
")) ) { }


Flow field options:
Away from swarmers
Towards mouse
Away from mouse
Away from screen
Swarmer options options:
Away from swarmers
Towards mouse
Away from mouse
Away from screen
Wander
Simulation options:
Debug forces
Simulations per frame:
Time scale:
Swarmer rotation speed:


IRON MONKEY A film review by Joshua Tyler Copyright 2001 filmcritic.com
The American action film has been slowly drowning to death in a sea of Asian wire-fu copycats. It's not a pretty death, and it's leaving the likes of Schwartznager, Stallone, and Van Damme wearing cement galoshes at the bottom of a kung fu sea.
Sometimes, the mix results in a mind-blowing spectacle unlike any other. Quality action with amazing and exciting stunt work, as in 1999's The Matrix, can be a real gem. But too often Hollywood gets it wrong, even when they pay off Chinese directors. Flying ninjas and floating karate masters have been replaced by soaring Bronx detectives and slow motion kicking scientists. Mostly it's laughable. In Hollywood's rush to emulate the success of The Matrix, trademark Asian stunt choreography has become more of a joke than an art form. But Iron Monkey, the latest Asian import, shows us how to get it right.
Iron Monkey (actually a reissue of a 1993 film) is the story of a 19th Chinese vigilante (Rongguang Yu), fighting with his own unique style of Shaolin kung fu for the rights of the oppressed and the bellies of the hungry. But it is also a piece of the narrative of legendary Chinese film hero Wong Fei-Hong, most recently seen in one of the most overlooked, and possibly best films of 2000, Drunken Master 2 (released in the U.S. as The Legend of Drunken Master). Unlike Drunken Master 2, which stars Jackie Chan as an adult Fei-Hong, Iron Monkey finds a much younger Fei-Hong (Sze-Man Tsang) and his father Wong Kei-Ying (Yen Chi Dan) thrust into the middle of Iron Monkey's fight against oppression.
Iron Monkey succeeds as no kung fu film since Drunken Master 2. At times, fighting styles, especially that of Monkey himself, do devolve into the ridiculous twinkle-toed floating of films like Crouching Tiger, Hidden Dragon, director Yuen Wo Ping eventually remembers to bring his action scenes back to earth.
Iron Monkey is at its heart a hardcore, kung fu action film rather than any kind of drama a la Crouching Tiger. However, there are brief moments of profoundness shared between characters, such as those that pass between our outlaw hero and his good-hearted but misguided enemy, Chief Fox. In those moments, and in others, Iron Monkey manages to transcend its mindless kung fu nature to touch the hearts and minds of its audience. While in no way the equal of a masterpiece like Drunken Master 2, Iron Monkey dances quite nicely to the invading kung fu tune.
Aka Siunin Wong Fei-hung tsi titmalau.

Visit filmcritic.com on the Web at http://www.filmcritic.com
========== X-RAMR-ID: 29592 X-Language: en X-RT-ReviewID: 251336 X-RT-TitleID: 1075984 X-RT-SourceID: 178 X-RT-AuthorID: 4328 X-RT-RatingText: 4/5
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


The midrib ear ornament is imagined as a transducer of the sun. Its body is crafted with an alloy of banana leaves' sheath, teak wood veneer and pressurized lava rock, with glow fiber ornaments encased in amber-colored soy oil resin.


About
This is a companion website for a review article on multivariate network visualization techniques.
Multivariate networks are networks where both the structure of the network and the attributes of the nodes and edges matter. It turns out, these are very common. Every person in a social network, for example, has both, relationships and lots of other characteristics, such as their age, the school they went to, or the city they live in. Multivariate network visualization techniques are designed to be able to show both, these attributes and the structure. Using these visualization techniques, we can analyze, for example, if a network of friends predominantly went to the same high school.
The visualization research community has developed many techniques to visualize these kinds of networks, and our review article – and this website – are designed to help you sort through these options.
Browse through the techniques illustrated below, or use our wizard to find the right multivariate network visualization technique for your datasets and tasks!
Get in touch if you have questions or comments.


Final Project Proposal
Topic
I am creating a website for my sorority, Delta Phi Kappa. It will be a general information/ organization homepage with relevant pages necessary to garner interest for potential members and people researching our organization.
Audience
The audience of my website would be anyone interested in finding out more information regarding my sorority, including potential rushees.
Design & Style
I prefer minimal designs with clean transition animations, such as parallax effects. As for color scheme, I will be using black, white, and our sorority colors, pink and rose red.
Color scheme:
Motivation 1Motivation 2
Motivation 3
Scope
There will be five pages: a home page, a current active members page, a contact page, a gallery page, and a page dedicated to our rush events, which will include an interest registration form.


""" This sample demonstrates the following: Given a list of changelists: Create a new label Change the view Change the description Identify all the files in each Changelist Add the most recent version of each file in all changelists to the label """ import p4 as P4API p4 = P4API.P4() p4.parse_forms() p4.connect() labelName = 'P4NetTestingSample' # build my label labelForm = p4.fetch_label(labelName) labelForm['Description'] = 'Created for P4.Net sample' view = ['//guest/shawn_hladky/...'] labelForm['View'] = view p4.save_label(labelForm) # My list of changes. This is totally arbitrary changes=['5774', '5680', '5636', '5444'] # sort ascending, so the highest revisions will be last when looping sorted_changes = changes.sort() # dictionary: keyed by file, value = revision filerevs = {} # spin the description on each file for chg in p4.run_describe('-s', *changes): depotFiles = chg['depotFile'] revisions = chg['rev'] for i in range(0, len(depotFiles)): key,value = depotFiles[i], revisions[i] filerevs[key]=value # convert the dictionary to a list like ['//depot/file#5'] fileRevList = ["%s#%s" % (k,v) for k,v in filerevs.items()] # print fileRevList # now I want to run in non-parsed mode p4.disconnect() p4 = P4API.P4() p4.connect() labelsync_output = p4.run('labelsync', '-l', labelName, *fileRevList) for s in labelsync_output: print s # delete the label to keep the public depot clean :-) p4.run('label', '-d', labelName) p4.disconnect()


|
libthai
0.1.28
|
Thai string input sequence filtering. More...
Data Structures | |
| struct | thinpconv_t |
| Input sequence correction info. More... | |
Enumerations | |
| enum | thstrict_t { ISC_PASSTHROUGH = 0, ISC_BASICCHECK = 1, ISC_STRICT = 2 } |
| Strictness of input sequence checking, according to WTT 2.0. More... | |
Functions | |
| int | th_isaccept (thchar_t c1, thchar_t c2, thstrict_t s) |
| Check for acceptance of input sequence. More... | |
| int | th_validate (struct thcell_t context, thchar_t c, struct thinpconv_t *conv) |
| Check and try to correct input sequence with default strictness. More... | |
| int | th_validate_leveled (struct thcell_t context, thchar_t c, struct thinpconv_t *conv, thstrict_t s) |
| Check and try to correct input sequence. More... | |
Thai string input sequence filtering.
| enum thstrict_t |
| int th_isaccept | ( | thchar_t | c1, |
| thchar_t | c2, | ||
| thstrict_t | s | ||
| ) |
Check for acceptance of input sequence.
| c1 | : previous character |
| c2 | : the newly input character |
| s | : strictness level |
Checks if, according to WTT 2.0 strictness level s, c2 is allowed after c1.
| int th_validate | ( | struct thcell_t | context, |
| thchar_t | c, | ||
| struct thinpconv_t * | conv | ||
| ) |
Check and try to correct input sequence with default strictness.
| context | : previous cell |
| c | : the newly input character |
| conv | : the storage for resulting correction info |
Given the previous cell as context, edit the input buffer using the given input c, maintaining WTT canonical order at default strictness level, and do some convenient correction in conv.
| int th_validate_leveled | ( | struct thcell_t | context, |
| thchar_t | c, | ||
| struct thinpconv_t * | conv, | ||
| thstrict_t | s | ||
| ) |
Check and try to correct input sequence.
| context | : previous cell |
| c | : the newly input character |
| conv | : the storage for resulting correction info |
| s | : strictness level |
Given the previous cell as context, edit the input buffer using the given input c, maintaining WTT canonical order at strictness level s, and do some convenient correction in conv.
(Available since version 0.1.19, libthai.so.0.2.0)


To become a member please go to repository and push Pull Requests with a new file to directory members. File name should be [your github login].html To be able to be a member you need to explain how do you connect to Sweden for exemple born in sweden, working in sweden, working for swedish company, ect. Don't worry if you are not connected to Sweden you can put your pull request to mapp supporter.
Become a member


¶ Game RoomCopyright(c) 2016 Stefano Balietti MIT Licensed Game room representation |
"use strict";
|
¶ Global scope |
module.exports = GameRoom;
var ngc = require('nodegame-client');
var Stager = ngc.Stager;
var GameStage = ngc.GameStage;
var stepRules = ngc.stepRules;
var publishLevels = ngc.constants.publishLevels;
var J = require('JSUS').JSUS;
var Room = require('./Room');
GameRoom.prototype.__proto__ = Room.prototype;
GameRoom.prototype.constructor = GameRoom;
|
function GameRoom(config) {
var that, node;
Room.call(this, 'Game', config);
if (!this.logicPath) this.logicPath = './rooms/game.room';
if (config.treatmentName && 'string' !== typeof config.treatmentName) {
throw new TypeError('GameRoom: config.treatmentName must be ' +
'undefined or string.');
}
if (config.runtimeConf && 'object' !== typeof config.runtimeConf) {
throw new TypeError('GameRoom: config.runtimeConf must be object.');
}
|
|
¶ GameRoom.treatmentNameThe name of the game played in this room, or 'standard' if not defined. |
this.treatmentName = config.treatmentName || 'standard';
if (!this.game.settings[this.treatmentName]) {
throw new Error('GameRoom: game ' + this.gameName + ' treatment ' +
'not found: ' + this.treatmentName + '.');
}
|
¶ GameRoom.gameLevelGame paths for the room |
this.gameLevel = config.gameLevel;
if (this.gameLevel && !this.game.levels[this.gameLevel]) {
throw new Error('GameRoom: game ' + this.gameName + ' game level ' +
'not found: ' + this.gameLevel + '.');
}
|
¶ GameRoom.gamePathsGame paths for the room |
this.clientTypes = this.gameLevel ?
this.game.levels[this.gameLevel].clientTypes :
this.game.clientTypes;
|
¶ GameRoom.gameTreatmentActual settings for current game based on treatment and runtime conf See
GameRoom.runtimeConf
See
GameRoom.setupGame
|
this.gameTreatment = this.game.settings[this.treatmentName];
if (this.runtimeConf) J.mixin(this.gameTreatment, this.runtimeConf);
|
¶ GameRoom.countdownTimeout handled by Configure disconnect/reconnect policy. |
that = this;
node = this.node;
|
¶ GameRoom.wrongNumOfPlayersDefault listener for This listener is added as default stager property The listener is invoked when there is a "wrong" number of players. The number of players is "wrong" if it has been defined any min|max|exactPlayers property in current game step. Default behavior: 1 - Immediately pauses all connected players. A message is displayed with information. 2 - A timer is started for the value specified in settings.WAIT_TIME, or 30 seconds otherwise. 3 - If timer expires, game is resumed and, if a custom callback is is defined, it is executed. The listener is then invoked with Params
type
string
The type of "wrong" number: 'min', 'max', 'exact'
customCb
function
Optional. A callback to be executed in
in case the timer expires.
player
object
Optional. The player object that triggered
the listener by either connecting or disconnecting (if available)
See
GameRoom.correctNumOfPlayersAgain
See
GameRoom.getClientType
|
this.wrongNumOfPlayers = function(type, customCb, player) {
var node;
var waitTime, disconnectStr;
node = this.node;
if (type === 'min') {
node.warn('warning: not enough players!!');
}
else if (type === 'max') {
node.warn('warning: too many players!!');
}
else {
node.warn('warning: wrong number of players!!');
}
waitTime = 'number' === typeof this.settings.WAIT_TIME ?
this.settings.WAIT_TIME : 30;
disconnectStr = this.settings.WAIT_TIME_TEXT ||
'One or more players disconnected. If they ' +
'do not reconnect within ' + waitTime +
' seconds the game will be terminated.';
|
|
Pause connected players. |
node.remoteCommand('pause', 'ROOM', disconnectStr);
node.game.pause();
that.countdown = setTimeout(function() {
node.warn('Disconnection Countdown fired: ' + node.nodename);
node.remoteCommand('resume', 'ROOM');
node.game.resume();
if (customCb) customCb.call(node.game, player);
}, waitTime * 1000);
};
|
¶ GameRoom.correctNumOfPlayersAgainListener invoked at any time the correct number of players is recovered The number of players is "wrong" if it has been defined any min|max|exactPlayers property in current game step. Default behavior: 1 - Immediately resumes all connected players that have been
paused by callback This listener is added as default stager property The listener is then invoked with Params
type
string
The type of "wrong" number: 'min', 'max', 'exact'
customCb
function
Optional. A callback to be executed in
in case the timer expires.
player
object
Optional. The player object that triggered
the listener by either connecting or disconnecting (if available)
See
GameRoom.wrongNumOfPlayers
See
GameRoom.getClientType
|
this.correctNumOfPlayersAgain = function(type, customCb, player) {
var node;
node = this.node;
if (type === 'min') {
node.warn('warning: enough players again!!');
}
else if (type === 'max') {
node.warn('warning: number of players below maximum again!!');
}
else {
node.warn('warning: correct number of players again!!');
}
|
|
Delete countdown to terminate the game. |
clearTimeout(that.countdown);
that.countdown = null;
node.game.resume();
|
|
Resume other players. |
setTimeout(function() {
node.game.pl.each(function(p) {
if (player.id !== p.id) {
node.remoteCommand('resume', p.id);
}
});
}, 100);
if (customCb) customCb.call(node.game, player);
};
|
|
Register player disconnection, and wait for him... |
node.on.pdisconnect(function(p) {
console.log('Disconnection in Stage: ' + node.player.stage);
});
|
|
Player reconnecting. This function is called first, and it invokes any min/max/exact handler accordingly. |
node.on.preconnect(function(p) {
var code, curStage, reconCb, res;
var reconOptions;
var milliseconds, resetTime;
node.warn('Oh...somebody reconnected!', p);
code = that.channel.registry.getClient(p.id);
|
|
Only within stage reconnections are allowed. |
curStage = node.game.getCurrentGameStage();
if (!that.allowLateReconnections) {
if (GameStage.compare(code.stage, curStage)) {
node.err('player reconnected from another stage. ' +
'Not allowed. Player: ' + p.id);
disposeClient(node, p);
return;
}
}
|
|
Setup client. |
that.setupClient(p.id);
if (code.lang.name !== 'English') {
|
|
If lang is different from Eng, remote setup it. TRUE: sets also the URI prefix. |
console.log('CODE LANG SENT');
node.remoteSetup('lang', p.id, [code.lang, true]);
}
|
|
Start the game on the reconnecting client. Need to give step: false, we just init it. |
node.remoteCommand('start', p.id, { step: false });
|
|
Create the reconnection options object. |
reconOptions = {};
|
|
Sets the timer on reconnecting client if milliseconds is found. |
milliseconds = node.game.timer.milliseconds;
if ('number' === typeof milliseconds) {
|
|
Time left to play in stage. |
resetTime = Math.max(milliseconds -
node.timer.getTimeSince('step', true), 0);
reconOptions.plot = { timer: resetTime };
|
|
node.remoteSetup('plot', p.id, { timer: resetTime }, 'tmpCache'); |
}
reconCb = this.plot.getProperty(curStage, 'reconnect');
if (reconCb) {
|
|
Res contains the reconnect options for the step, or false to abort reconnection. |
res = reconCb.call(this, code, reconOptions);
if (res === false) {
node.warn('Reconnect Cb returned false');
disposeClient(node, p);
return;
}
}
|
|
Add player to player list. |
node.game.pl.add(p);
|
|
Start the step on reconnecting client. |
reconOptions.targetStep = curStage;
node.remoteCommand('goto_step', p.id, reconOptions);
|
|
See if we have enough players now. |
res = node.game.plChangeHandler(p);
|
|
If we are still missing more players pause reconnecting player. |
if (!res) node.remoteCommand('pause', p.id);
});
this.registerRoom();
}
|
¶ GameRoom static functions |
|
¶ GameRoom.checkParamsType-check the parameters given to setup/start/pause/resume/stopGame Params
doLogic
boolean
If TRUE, sends a command to the logic as well
clientList
array
string
List of client IDs to which to send the
command, or one of the following strings:
'all' (all clients), 'players' (all players), 'admins' (all admins).
force
boolean
If TRUE, skip the check
Returns
null
string
NULL for valid parameters, error string for bad ones.
|
GameRoom.checkParams = function(doLogic, clientList, force) {
if ('boolean' !== typeof doLogic && 'undefined' !== typeof doLogic) {
return 'doLogic must be boolean or undefined';
}
if (!J.isArray(clientList) &&
('string' !== typeof clientList ||
(clientList !== 'all' &&
clientList !== 'players' &&
clientList !== 'admins')) &&
'undefined' !== typeof clientList) {
return "clientList must be array, 'all', 'players', 'admins' " +
'or undefined';
}
if ('boolean' !== typeof force && 'undefined' !== typeof force) {
return 'force must be boolean or undefined';
}
return null;
};
|
¶ GameRoom methods |
|
¶ GameRoom.sendRemoteCommandUtility method for sending a remote command to given recipients Params
command
string
The command to send
clientList
array
string
List of client IDs to which to send the
command, or one of the following strings:
'all' (all clients), 'players' (all players), 'admins' (all admins)
|
GameRoom.prototype.sendRemoteCommand = function(command, clientList) {
var node;
node = this.node;
|
|
TODO: Don't send to logic! |
if (J.isArray(clientList)) {
node.remoteCommand(command, clientList);
}
else {
if (clientList === 'all' || clientList === 'players') {
this.clients.player.each(function(p) {
node.remoteCommand(command, p.id);
});
}
if (clientList === 'all' || clientList === 'admins') {
this.clients.admin.each(function(p) {
node.remoteCommand(command, p.id);
});
}
}
};
|
¶ GameRoom.setupGameSetups logic and clients in the room Params
mixinConf
object
Optional. Additional options to pass to the node
instance of the room. Overrides the returned game configuration from the
require statement.
doLogic
boolean
Optional. If TRUE, sets up the logic as well.
Default: TRUE.
clientList
array
string
Optional. List of client IDs to set up,
or one of the following strings:
'all' (all clients), 'players' (all players), 'admins' (all admins).
Default: 'players'.
force
boolean
Optional. If TRUE, skip the check. Default: FALSE.
See
GameRoom.runtimeConf
|
GameRoom.prototype.setupGame = function(mixinConf, doLogic, clientList, force) {
var rc;
|
|
Check parameters. |
rc = GameRoom.checkParams(doLogic, clientList, force);
if (rc !== null) throw new TypeError('GameRoom.setupGame: ' + rc + '.');
if (mixinConf && 'object' !== typeof mixinConf) {
throw new TypeError('GameRoom.setupGame: mixinConf must be object or ' +
'undefined.');
}
if ('undefined' !== typeof clientList &&
!J.isArray(clientList) &&
clientList !== 'all' &&
clientList !== 'players' &&
clientList !== 'admins') {
throw new TypeError("GameRoom.setupGame: clientList must be " +
"undefined, array, or one of 'all', 'players' " +
" or 'admins'");
}
|
|
Apply defaults. |
if ('undefined' === typeof doLogic) doLogic = true;
if ('undefined' === typeof clientList) clientList = 'players';
if ('undefined' === typeof force) force = false;
|
|
Set up logic. |
if (doLogic) setupLogic.call(this, mixinConf);
|
|
At this point clientList should be an array of client IDs. |
setupClients.call(this, clientList, mixinConf);
};
|
¶ GameRoom.startGameStarts the game for the logic and/or other clients Params
doLogic
boolean
Optional. If TRUE, sends a start command to the
logic as well. Default: TRUE.
clientList
array
string
Optional. List of client IDs to which to
send the start command, or one of the following strings:
'all' (all clients), 'players' (all players), 'admins' (all admins).
Default: 'all'.
force
boolean
Optional. If TRUE, skip the startable check.
Default: FALSE.
|
GameRoom.prototype.startGame = function(doLogic, clientList, force) {
var node;
var rc;
node = this.node;
|
|
Check parameters. |
rc = GameRoom.checkParams(doLogic, clientList, force);
if (rc !== null) throw new TypeError('GameRoom.startGame: ' + rc + '.');
|
|
Apply defaults. |
if ('undefined' === typeof doLogic) doLogic = true;
if ('undefined' === typeof clientList) clientList = 'all';
if ('undefined' === typeof force) force = false;
|
|
Check startability. |
if (!force && !node.game.isStartable()) {
this.channel.sysLogger.log(
'GameRoom.startGame: game cannot be started.', 'warn');
return;
}
|
|
Start. |
if (doLogic) node.game.start();
this.sendRemoteCommand('start', clientList);
};
|
¶ GameRoom.pauseGamePauses the game for the logic and/or other clients Params
doLogic
boolean
Optional. If TRUE, sends a pause command to the
logic as well. Default: TRUE.
clientList
array
string
Optional. List of client IDs to which to
send the pause command, or one of the following strings:
'all' (all clients), 'players' (all players), 'admins' (all admins).
Default: 'all'.
force
boolean
Optional. If TRUE, skip the pauseable check.
Default: FALSE.
|
GameRoom.prototype.pauseGame = function(doLogic, clientList, force) {
var node;
var rc;
node = this.node;
|
|
Check parameters. |
rc = GameRoom.checkParams(doLogic, clientList, force);
if (rc !== null) throw new TypeError('GameRoom.pauseGame: ' + rc + '.');
|
|
Apply defaults. |
if ('undefined' === typeof doLogic) doLogic = true;
if ('undefined' === typeof clientList) clientList = 'all';
if ('undefined' === typeof force) force = false;
|
|
Check pausability. |
if (!force && !node.game.isPausable()) {
this.channel.sysLogger.log(
'GameRoom.pauseGame: game cannot be paused.', 'warn');
return;
}
|
|
Pause. |
if (doLogic) node.game.pause();
this.sendRemoteCommand('pause', clientList);
};
|
¶ GameRoom.resumeGameResumes the game for the logic and/or other clients Params
doLogic
boolean
Optional. If TRUE, sends a resume command to the
logic as well. Default: TRUE.
clientList
array
string
Optional. List of client IDs to which to
send the resume command, or one of the following strings:
'all' (all clients), 'players' (all players), 'admins' (all admins).
Default: 'all'.
force
boolean
Optional. If TRUE, skip the resumeable check.
Default: FALSE.
|
GameRoom.prototype.resumeGame = function(doLogic, clientList, force) {
var node;
var rc;
node = this.node;
|
|
Check parameters. |
rc = GameRoom.checkParams(doLogic, clientList, force);
if (rc !== null) throw new TypeError('GameRoom.resumeGame: ' + rc + '.');
|
|
Apply defaults. |
if ('undefined' === typeof doLogic) doLogic = true;
if ('undefined' === typeof clientList) clientList = 'all';
if ('undefined' === typeof force) force = false;
|
|
Check resumability. |
if (!force && !node.game.isResumable()) {
this.channel.sysLogger.log(
'GameRoom.resumeGame: game cannot be resumed.', 'warn');
return;
}
|
|
Resume. |
if (doLogic) node.game.resume();
this.sendRemoteCommand('resume', clientList);
};
|
¶ GameRoom.stopGameStops the game for the logic and/or other clients Params
doLogic
boolean
Optional. If TRUE, sends a stop command to the logic
as well. Default: TRUE.
clientList
array
string
Optional. List of client IDs to which to
send the stop command, or one of the following strings:
'all' (all clients), 'players' (all players), 'admins' (all admins).
Default: 'all'.
force
boolean
Optional. If TRUE, skip the stopable check.
Default: FALSE.
|
GameRoom.prototype.stopGame = function(doLogic, clientList, force) {
var node;
var rc;
node = this.node;
|
|
Check parameters. |
rc = GameRoom.checkParams(doLogic, clientList, force);
if (rc !== null) throw new TypeError('GameRoom.stopGame: ' + rc + '.');
|
|
Apply defaults. |
if ('undefined' === typeof doLogic) doLogic = true;
if ('undefined' === typeof clientList) clientList = 'all';
if ('undefined' === typeof force) force = false;
|
|
Check stoppability. |
if (!force && !node.game.isStoppable()) {
this.channel.sysLogger.log(
'GameRoom.stopGame: game cannot be stopped.', 'warn');
return;
}
|
|
Stop. |
if (doLogic) node.game.stop();
this.sendRemoteCommand('stop', clientList);
};
|
¶ GameRoom.getClientTypeLoads a specified client type Params
type
string
The name of the client type
mixinConf
object
Optional. Additional configuration options
that will be mixed-in with the final game object
Returns
object
The built client type
|
GameRoom.prototype.getClientType = function(type, mixinConf) {
var game, settings, stager, setup;
var properties, stepRule;
var that;
if (!this.clientTypes[type]) {
throw new Error('GameRoom.getClientType: unknown type: ' + type + '.');
}
if (mixinConf && 'object' !== typeof mixinConf) {
throw new Error('GameRoom.getClientType: runtimeConf must ' +
'be object.');
}
that = this;
|
|
Get the right stager. |
if (this.gameLevel) {
stager = ngc.getStager(
this.game.levels[this.gameLevel].stager.getState());
}
else {
stager = ngc.getStager(this.game.stager.getState());
}
|
|
Start adding default properties by client type. |
stepRule = stager.getDefaultStepRule();
properties = stager.getDefaultProperties();
|
|
For both logic and other client types. |
if ('undefined' === typeof properties.timer) {
stager.setDefaultProperty('timer', function() {
var timer, stepId;
stepId = this.getCurrentStep().id;
timer = this.settings.TIMER[stepId];
|
|
If it is a function must be executed. Other values will be parsed later. |
if ('function' === typeof timer) timer = timer.call(this);
return timer || null;
});
}
if ('undefined' === typeof properties.onWrongNumOfPlayers) {
stager.setDefaultProperty('onWrongPlayerNum',
this.wrongNumOfPlayers);
}
if ('undefined' === typeof properties.onCorrectNumOfPlayers) {
stager.setDefaultProperty('onCorrectPlayerNum',
this.correctNumOfPlayersAgain);
}
|
|
Set different defaults for logic and other client types. |
if (type === 'logic') {
if ('undefined' === typeof properties.publishLevel) {
properties.publishLevel = 0;
}
if ('undefined' === typeof properties.syncStepping) {
properties.syncStepping = true;
}
if ('undefined' === typeof properties.autoSet) {
properties.autoSet = false;
}
if (stepRule === stepRules.SOLO) {
stager.setDefaultStepRule(stepRules.OTHERS_SYNC_STEP);
}
if ('undefined' === typeof properties.timeup) {
stager.setDefaultProperty('timeup', function() {
var conf, gameStage;
gameStage = this.getCurrentGameStage();
conf = this.plot.getProperty(gameStage, 'pushClients');
if (!conf) return;
this.pushManager.startTimer(conf);
});
}
}
else {
if ('undefined' === typeof properties.publishLevel) {
properties.publishLevel = publishLevels.REGULAR;
}
if ('undefined' === typeof properties.autoSet) {
properties.autoSet = true;
}
if (stepRule === stepRules.SOLO) {
stager.setDefaultStepRule(stepRules.WAIT);
}
if ('undefined' === typeof properties.timeup) {
stager.setDefaultProperty('timeup', function() {
node.done();
});
}
}
setup = J.clone(this.game.setup);
settings = J.clone(this.gameTreatment);
game = this.clientTypes[type](this.treatmentName, settings, stager,
setup, this);
if ('object' !== typeof game) {
throw new Error('GameRoom.getClientType: room ' + this.name +
': ' + type + ' did not return a valid game object.');
}
|
|
Add treatment settings. |
game.settings = settings;
|
|
Mixin-in nodeGame options. |
if (mixinConf) J.mixin(game, mixinConf);
return game;
};
|
¶ GameRoom.setupClientSetups a client based on its id Retrieves the client object, checks its client type, and run the appropriate setup command depending if the client it is a bot or a remote client. Params
clientId
string
The id of the client
mixinConf
object
Optional. Additional configuration options
cache
object
Optional. A cache object from where retrieving
client types
Returns
boolean
TRUE on success
See
GameRoom.getClientType
|
GameRoom.prototype.setupClient = function(clientId, mixinConf, cache) {
var clientObj, gameNode, type;
var game;
clientObj = tryToGetClient.call(this, clientId);
if (!clientObj) {
this.channel.sysLogger.log('GameRoom.setupClient: client not found: ' +
clientId + '.', 'error');
return;
}
|
|
Fake cache. |
cache = cache || {};
|
|
See if the client is local or remote. |
gameNode = this.channel.bots[clientId];
|
|
Client type. |
type = clientObj.clientType;
|
|
Get the client type, check cache (bots are never cached). |
if (!gameNode && cache[type]) {
game = cache[type];
}
else {
game = this.getClientType(type, mixinConf);
mixinGameMetadata.call(this, game);
cache[type] = game;
}
|
|
Setup the client. |
|
|
Local client. |
if (gameNode) {
|
|
Can't remoteSetup here because serializing the plot methods would make them lose their context (node etc.). |
gameNode.stop();
gameNode.setup('nodegame', game);
}
|
|
Remote client. |
else {
this.node.remoteCommand('stop', clientId);
this.node.remoteSetup('nodegame', clientId, game);
}
return true;
};
|
¶ Helper Methods. |
|
¶ setupLogicInstantiates and setups the logic of the game room Params
mixinConf
object
Optional. Additional options to mixin with the
instantiated client type.
See
GameRoom.getClientType
See
GameRoom.node
|
function setupLogic(mixinConf) {
var game, node;
game = this.getClientType('logic', mixinConf);
mixinGameMetadata.call(this, game);
node = this.node;
|
|
Stop logic if necessary. |
if (node.game.isStoppable()) node.game.stop();
|
|
Setup must be called before connect. |
node.setup('nodegame', game);
|
|
Connect logic to server, if not already connected. E.g., after a stop command it is generally still connected. Or the node object can be passed in the constructor and be already connected. |
if (!node.socket.isConnected()) {
node.socket.setSocketType('SocketDirect', {
socket: this.channel.adminServer.socketManager.sockets.direct
});
node.connect(null, {
startingRoom: this.name,
clientType: 'logic'
});
}
}
|
¶ setupClientsInstantiates and setups a number of clients of the game room Params
clientList
string
object
The list of clients or a string
specifying which clients are to be setup (Accepted values:
'all', 'players', or 'admins')
mixinConf
object
Optional. Additional options to mixin with the instantiated client
type.
See
GameRoom.getClientType
See
GameRoom.node
|
function setupClients(clientList, mixinConf) {
var i, len, cache;
cache = {};
|
|
Resolve special values of clientList. |
if ('string' === typeof clientList) {
switch (clientList) {
case 'all':
clientList = this.clients.id.getAllKeys();
break;
case 'players':
clientList = this.clients.player.id.getAllKeys();
break;
case 'admins':
clientList = this.clients.admin.id.getAllKeys();
break;
}
}
|
|
Setup all given clients. |
i = -1, len = clientList.length;
for ( ; ++i < len ; ) {
this.setupClient(clientList[i], mixinConf, cache);
}
}
|
¶ tryToGetClientReturns a client obj with given id, if found. Notice: separated from the main function because of the try-catch block, otherwise the whole function is not optimized. Params
clientId
string
The client id
Returns
object
The client object
|
function tryToGetClient(clientId) {
var clientObj;
try {
clientObj = this.clients.get(clientId);
}
catch(e) {
this.channel.sysLogger.log("GameRoom.setupGame: no client with id '" +
clientId + "'", 'warn');
}
return clientObj;
}
|
¶ mixinGameMetadataAdds default game info (name, description, version) if missing Params
game
object
The game object used to setup a client
See
GameRoom.setupClients
See
GameRoom.setupLogic
|
function mixinGameMetadata(game) {
if (!game.metadata) game.metadata = {};
if (!game.metadata.name) game.metadata.name = this.game.info.name;
if (!game.metadata.description) {
game.metadata.description = this.game.info.description;
}
if (!game.metadata.version) game.metadata.version = this.game.info.version;
}
|
¶ disposeClientDisconnects a client that was not authorized to reconnect Params
node
NodeGameCLient
The node instance of the game room
p
object
The player object
See
GameRoom.on
|
function disposeClient(node, p) {
node.remoteAlert('Reconnection to game not authorized.', p.id);
|
|
Disconnect client. |
setTimeout(function() { node.disconnectClient(p); });
}
|


CTT: Classical Test Theory Functions
A collection of common test and item analyses from a classical test theory (CTT) framework. Analyses can be applied to both dichotomous and polytomous data. Functions provide reliability analyses (alpha), item statistics, disctractor analyses, disattenuated correlations, scoring routines, and empirical ICCs.
| Version: |
2.3.3 |
| Published: |
2018-09-12 |
| Author: |
John T. Willse |
| Maintainer: |
John T. Willse <willse at uncg.edu> |
| License: |
GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: |
no |
| In views: |
Psychometrics |
| CRAN checks: |
CTT results |
Downloads:
Reverse dependencies:
Linking:
Please use the canonical form
https://CRAN.R-project.org/package=CTT
to link to this page.


Webstart
-
You must install a recent version of java (1.8 or later), which you
can get
here.
Download it and install it.
- You must be able to get a GO XML file (which ErmineJ will try to install for you)
and gene annotations for your study. You can get the latter from
here. Get the annotation file(s) for the
genes/probes you are using. If ErmineJ cannot get the GO file, download it from the GO archives.


Parameter locale
The following game is shown on some boards with all possible languages. Hover over the buttons to see the translated tooltips as well:
the locale de (explictly set) == German.


Constructor
new Connection(innovation, outNodeIndex, inNodeIndex, inParameterIndex, weight)
Parameters:
| Name | Type | Description |
|---|---|---|
innovation |
number | Innovation number. |
outNodeIndex |
number | Incoming node index. |
inNodeIndex |
number | Outgoing node index. |
inParameterIndex |
number | Outgoing parameter index. |
weight |
number | Connection weight. |
- Source:
Members
disabled :number
Whether connection is disabled (i.e. has been replaced by new nodes and connections).
Type:
- number
- Source:
inNodeIndex :number
In node index.
Type:
- number
- Source:
innovation :number
Innovation number.
Type:
- number
- Source:
inParameterIndex :number
In parameter index.
Type:
- number
- Source:
outNodeIndex :number
Out node index.
Type:
- number
- Source:
weight :number
Connection weight.
Type:
- number
- Source:
Methods
clone() → {Connection}
Clones the connection.
- Source:
Returns:
- Type
- Connection


Book Club
Home
More
Archives
About
Contact
{%if current_user.is_authenticated%}
Profile
{%endif%}
{%if current_user.is_authenticated%}
Current user: {{current_user.username}}
Sign out
{%else%}
Sign in
{%endif%}
{{user.full_name}} Profile
Books Posted by {{user.full_name}}
{%for books in books%}
Title: {{ books.title}}
Author: {{ books.author}}
{{ books.description |truncate(100)}}
View Book
{%endfor%}


Step Wide 1 Ad Detail 2 Review 3 Publish Step Small 1 Ad Detail 2 Review Step Medium 1 Ad Detail 2 Review 3 Publish Step Large 1 Ad Detail 2 Review 3 Publish Step Right 1 Ad Detail 2 Review 3 Publish Step Center 1 Ad Detail 2 Review 3 Publish


Are you tired of just using programming languages for work, without knowing how it works? Do you want to know what’s happening inside the machine, after you’ve finished writing your code?
Well, you are not the only one. And you will know everything about it after reading this article.
As it turns out, there are three concepts, each extremely close to the others:
- How a programming language works, from the inside.
- How a Compiler works.
- How to build a new programming language.
Ultimately, I think the third point is what every curious student like us is interested in. So, we are in luck that these are all similar concepts!
How to build a new programming language
Let me start with a funny question for you. According to Google, there are about 26 Million software developers in the world. How many of them do you think would know how to create a new programming language?
Very few of them, I bet. In fact, I didn’t receive a training about it when I was a college student.
The reason is that very few developers are real computer scientists, and even among the latter group, only few of them have studied formal languages and compilers.
Programmers are practical people: Does it compile? Does it seem to work? Okay, then push.
Few coders have been trained to think formally. Additionally, creating a programming language is a task much closer to science and art, than to pure coding (although, of course, a lot of coding is needed too).
And yet, it teaches so much! There are so many fascinating steps involved, and opportunities to learn about:
- High level software engineering,
- Advanced algorithms and data structures,
- Programming patterns,
all of which are certain to be extremely useful during the career of a developer. And a computer scientist. And a software engineer.
Steps to create a programming language
From a very high perspective, creating a new programming language involves three main steps.
- Define the grammar.
- Build the front-end compiler for the source code.
- Build the back-end code generator.
So, you start with a pen and a piece of paper where you define the Grammar of your language. If you don’t know what a Formal Grammar is, then just think about it as the grammar of a human language (and read my article about it).
For example, in a human language you might say “A sentence is made by an Article, a Noun, and a Verb”. Then, the natural ambiguity of the language, mainly given by the spoken part and by human nature, throws this rule away.
In a formal language, if your grammar says “Assignment is made by a Variable Name, the Equal (=) sign, and a Number”, then this will be the only way someone can instantiate a variable in the source code of a program, otherwise the code would not compile (or it would raise an error, in case you are building an interpreted language).
In short, the formal grammar defines what the source code of a program must look like, in this language. It’s about the syntactical rules that programmers will have to respect in order to write a program in your language.
The Front-End Compiler is a piece of software that takes the source code and produces some weird looking data structure. More about this later in the article.
 That… can be run? So this is all about taking the initial source code and making a new source code (that can be run)?
Yes. But one that the machine can understand, often called Target Machine Code. Strictly speaking, it means you should provide Assembly code as a result, give it to the Assembler that will work along with the Linker/Loader and then they will give back to you the machine code.
However, many savvy people have already gone through this effort in the past. Thus, very often new programming languages are just translated into existing programming languages, for whom a compiler already exists.
For example, while architecting your new language you may decide that your compiler, instead of generating machine code, generates C code that is then given to a C compiler. This is a standard approach and it will not take away from you any of the funny parts of writing a compiler: you will still need to build one.
But then, what does writing a compiler mean? Let’s see.
Steps to create a compiler for a programming language
Building a serious compiler for a complex programming language is a hell of a task.
For instance, it took about 3 years for the FORTRAN 1 compiler. Built for scientific computing, the FORTRAN language was a game changer in the field and it is still widely used today. They did a good job and pretty much changed the history of computing.
Despite the scary complexity, compilers have just 5 main parts:
- Lexical Analysis. Recognize language keywords, operators, constant and every token that the grammar defines.
- Parsing. The stream of tokens is “understood”, in the sense that the relation between each pair of token is encoded in a tree-like data structure. Such a tree is meant to describe the meaning of the operations, in each line of source code.
- Semantic Analysis. Probably the most obscure of all steps. Mainly involves understanding types and checking inconsistency in the “meaning” of the source code (not just in the syntax). Tough.
- Optimization. No matter how good the source code was before compilation, chances are that while going to lower levels of encoding (till machine code) several optimizations can be implemented. Things like memory optimization, or even power-consumption optimization. And, of course, runtime optimization.
- Code Generation. The optimized version of the original code is finally translated into executable code.
Even though these five steps to create a compiler have not changed since a few decades, the complexity and time investment devoted to each of them have changed a lot.
The first compiler for FORTRAN was built from 1954 to 1957. At that time, all steps but semantic analysis were very involved and complex, which also explains why it took 3 years to come up with the result.
Nowadays, instead, a few steps have become almost automatic. If you define your own formal grammar, and you do it well, then you can use software that makes Lexical Analysis, Parsing and Code Generation automatically for you.
Today, teams that are building and maintaining a Compiler are mostly focused around the Optimization step.  The Semantic Analysis steps is also fairly involved, although not nearly as much as the Optimization.
Let’s see more details for each step.
Lexical Analysis
This step takes off directly from the Formal Grammar.
Let’s say you want to build a language to represent minimalistic arithmetic operations. Your Grammar might look like the following:
program : [expression";"]*
expression : assignment
assignment : result "=" operation
operation : variable operator variable
operator : "+" | "-" | "*" | "/"
variable : "1" | "2" | "3" | "4" | "5"
| "6" | "7" | "8" | "9" | "0"
result : "L" | "O"
This is really a poor example, but it’s useful for the sake of illustration. You can read the above grammar as:
A Program is made by zero or more Expressions followed by a semicolon (curly brackets means “zero or more” of what’s inside them). An Expression can only be an Assignment. An Assignment is made by a Result followed by an Equal sign, followed an Operation. An Operation is made by a Variable, followed by an Operator, then another Variable. An Operator must be a symbol among four choices: “+”, “-”, “*“, “/” (double quoted symbols are terminal tokens). A Variable must be a symbol among ten choices (the ten digits). And a Result must be either the “L” symbol or the “O” symbol.
If you pause now just one minute and think, you will realize that with this silly grammar one can only represent a sequence of additions, subtractions, multiplications and divisions between 2 small integers (from 0 to 9 included). The sequence may also be empty, and if it’s not then the elements in it must be separated by a semicolon. Oh, also, the result of each operation can only be named either “L” or “O”.
A valid “source code” might look like
O = 2 + 3;
L = 5 * 2;
…
 But I can explain how the Lexical Analysis step works! Your Lexical Analyzer will go through the source code, and identify each token along with its type, according to the grammar. So the result of the Lexical Analyzer for the 2-liner above will be:
"O" - result
"2" - var
"+" - operator
"3" - var
"L" - result
"5" - var
"*" - operator
"2" - var
It should be easy to understand why there exist software tools that perform this task for any well-defined grammar. Actually, if you’ve done it manually once then it becomes boring to do it again.
Parsing
The Parser will take the list of tokens (output of the previous step) and create a tree-like structure, that is meant to describe the “meaning” of the source code. In the previous example (the silly arithmetic operations) the tree reflects the actual operations:
With some simplification, you can assume that the tree is not actually needed. Just knowing the leaves of the tree might be enough for the overall objective to compile the source code. At any rate, each parser may act differently but many of them do not store the actual tree in memory.
 Keep in mind that the user is also a programmer!
This step is very hard, in particular when it comes down to variables binding. Consider the following snippet in Python.
def foo(foo):
return foo + foo
val = 5
print(foo(val)) # >> 10
def foo2(foo2):
return foo + foo2
foo = val
print(foo2(7)) # >> 12
This is clearly not good code. But let’s look at it more closely now.
Can you imagine what a mess is for the Python interpreter to understand what you are doing by naming your variables foo, a routine foo, the argument of this routine foo and of course, using the identifier foo inside the scope of the routine called foo.
Binding is about assigning the right value (5, 7, or even an entire function body) to the right identifier (foo
, val
, foo2
), according to the current scope. Semantic analysis is about understanding if you messed up something.
Optimization
This step is a bit like editing a text after it’s been written by the original author.
However, each editor has their own objectives. So, as a code optimizer, your focus could be in reducing memory usage, or runtime. But it could also be to reduce the number of database access. Or to reduce power consumption, or network messages.
With so many specialized hardware, and so many different networks, databases, architectures, it’s no surprise that compilers can vary quite a lot how they optimize the code.
A special mention must go, in this subject, to the so-called Data Flow Optimization.
Every meaningful source code makes heavy use of aggregated data structures, such as arrays, that are accessed throughout the program. Data Flow Optimization is a term used to improve whatever the programmer did with data structures in his program, in order to make the overall execution more efficient.
Code Generation
The final step, informally named CodeGen, is also commonly automatized nowadays. In fact, translation from a parse tree to, potentially, any existing language is kind of a solved problem.
Still, there might be specific needs, or some innovation in your compiler, that convince you to build your own code generator. Most typically you would translate the parse tree either into Assembly code, or into C code that can then be compiled with an existing C compiler.
What’s next
When you complete the front-end compiler and the back-end code generator then you’re more or less ready to go. There exists a fun project on GitHub that is about creating a compiler for Lisp in every possible language (see the references at the bottom).
In my opinion, studying the theory of languages and compilers is worth the time it takes because it teaches so much about the real nature of one thing programmers use a lot: Programming Languages.
Also, it’s a good excuse to learn about parsing patterns, recursive descent algorithms, variables scope and bindings (which you should already know!). If you ever need an excuse to learn something.
As usual in engineering, the practical part is of utmost importance too. More on this in the next articles.
References
My article What is a Programming Language Grammar?
The Dragon Book. Compilers: Principles, Techniques and Tools. Wikipedia page (of the book).
Language Implementation Patterns. A book by Prof. Terrence Parr.
Alex Aiken’s class Compilers at Stanford University. Available as free MOOC online.
GitHub project mentioned in the article: https://github.com/kanaka/mal.


Privacy Policy
Effective date: 2021-02-13
secur.codes ("us", "we", or "our") operates the website (the "Service").
We take your privacy seriously. To better protect your privacy this page details our policies regarding the collection, use, and disclosure of personal data when you use our Service and the choices you have associated with that data.
Personal Data
Our definition of personal data is based on the privacy laws and regulations of the EU, including the General Data Protection Regulation (GDPR).
These are widely regarded as the strongest privacy protections in the world. We consider any information about you or your behavior that can be traced back to you as personal data.
Collection of Routine Information
We do not log or share any personal information about our visitors.
This website tracks basic information about their visitors, required by normal internet traffic.
This information includes, but is not limited to, IP addresses, browser details, timestamps and referring pages. None of this information can personally identify specific visitors to this website. The information is tracked for routine administration and maintenance purposes.
Cookies
Where necessary, this website uses cookies to store information about a visitor’s preferences and history in order to better serve the visitor and/or present the visitor with customized content.
Advertisement and Other Third Parties
This website does not contain any third party advertisement.
It is hosted on github.
Links to Third Party Websites
We have included links on this website for your use and reference.
Third Party Privacy Policy
We are not responsible for the privacy policies on the above mentioned third parties. You should be aware that the privacy policies of these websites may differ from our own.
Third parties may use cookies, scripts and/or web beacons to track visitors' activities on this website in order to display advertisements and other useful information. Such tracking is done directly by the third parties through their own servers and is subject to their own privacy policies. This website has no access or control over these cookies, scripts and/or web beacons that may be used by third parties.
Learn how to opt out of Google’s cookie usage.
Security
The security of your personal information is important to us, but remember that no method of transmission over the Internet, or method of electronic storage, is 100% secure. While we strive to use commercially acceptable means to protect your personal information, we cannot guarantee its absolute security.
Changes To This Privacy Policy
This Privacy Policy is effective as of 2021-02-13 and will remain in effect except with respect to any changes in its provisions in the future, which will be in effect immediately after being posted on this page.
We reserve the right to update or change our Privacy Policy at any time and you should check this Privacy Policy periodically. If we make any material changes to this Privacy Policy, we will notify you either through the email address you have provided us, or by placing a prominent notice on our website.
Contact Information
For any questions or concerns regarding the privacy policy, please send us an email to make@secur.codes.


Solution to WebDB Assignment 1 (Spring 2012)
11500811g QING Pei
<EMAIL_ADDRESS>2012-02-29
Question 1 - Schema Design with IBM DB2
(a)
XPath
/forms/form/leader[mode="Full"][department="COMP"]/name/text()
XQuery
for $l in db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')//leader
where $l/department="COMP" and $l/mode="Full"
return $l/name
(b)
XPath
count(//form[members/group_member/name=//leader/name])
XQuery
let $f:=db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')/forms
let $m:=$f/form//group_member
for $l in $f/form/leader
where $l/name=$m/name
return count($l)
(c)
XPath
//details[activity_item//date/text()="2012-06-20"]/project_name
XQuery
for $d in db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')//details
where $d/activity_item//date/text()="2012-06-20"
return $d/project_name
(d)
XPath
Not applicable.
XQuery
let $pool := db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')//details[activity_item//date/text()="2012-06-20"]
for $index in 1 to count($pool)
where $index > 1 and
$pool[$index - 1]//activity_item[//date/text()="2012-06-20"]/place =
$pool[$index]//activity_item[//date/text()="2012-06-20"]/place
return
<pair>
{data($pool[$index - 1]/project_name)}, {data($pool[$index]/project_name)}
</pair>
(e)
XPath
//form[.//total_expenditure/applied>30000][count(.//activity_item)<3]/details/project_name
XQuery
for $d in db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')//form[.//total_expenditure/applied>30000][count(.//activity_item)<3]/details
return $d/project_name
(f)
XPath
Not applicable.
XQuery
<group>
{
for $f in db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')//forms/form
let $sum := sum($f//activity_item/number_of_user)
where $sum < 100
return
<project>
<name>{data($f//project_name)}</name>,
<users>{$sum}</users>
<peruser>{$f//total_expenditure/applied div $sum}</peruser>
</project>
}
</group>
,
<group>
{
for $f in db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')//forms/form
let $sum := sum($f//activity_item/number_of_user)
where $sum < 1000 and $sum > 100
return
<project>
<name>{data($f//project_name)}</name>,
<users>{$sum}</users>
</project>
}
</group>
,
<group>
{
for $f in db2-fn:xmlcolumn('PSUDO_DATA.PSUDO_DATA_TABLE')//forms/form
let $sum := sum($f//activity_item/number_of_user)
where $sum > 1000
return
<project>
<name>{data($f//project_name)}</name>,
<users>{$sum}</users>
</project>
}
</group>
continued... continued...
Question 2 - DTD
The DTD is designed as the following.
<?xml version="1.0" encoding="UTF-8"?>
<!ELEMENT dags (dag*)>
<!ELEMENT dag (nodes, edges)>
<!ATTLIST dag name ID #REQUIRED>
<!ELEMENT nodes EMPTY>
<!ATTLIST nodes labels IDREFS #IMPLIED>
<!ELEMENT edges EMPTY>
<!ATTLIST edges labels IDREFS #IMPLIED>
<!ELEMENT node (#PCDATA)>
<!ATTLIST node label ID #REQUIRED>
<!ELEMENT edge (head_node, tail_node, weight)>
<!ATTLIST edge id ID #REQUIRED>
<!ELEMENT head_node EMPTY>
<!ATTLIST head_node label IDREF #REQUIRED>
<!ELEMENT tail_node EMPTY>
<!ATTLIST tail_node label IDREF #REQUIRED>
<!ELEMENT weight (#PCDATA)>
Being acyclic means there is no edge from a node to any of its ancestors. DTD cannot model the acyclic property. The schema languages only apply constraints on the content of data, with little limitations on their relationship with other context. The identity constraints using ID and IDREF can only force the nodes and edges to be unique, i.e. no duplicate edges from $node_i$ to $node_j$ can be inserted. With an edge from $node_i$ to $node_j$ existing in a graph, the constrains cannot even prevent another edge from $node_j$ to $node_i$ from being inserted, not to mention any limits on the IDREFS attributes of the nodes and edges elements.
The approach I currently regard as feasible is to check upon edge insertions. The reason for that is given below.
- Inserting a orphaned node to the existing graphs does not create any cycles.
- Inserting an edge from $node_i$ to $node_j$ to a graph $G$ does not affect other graphs that has no reference to this edge.
Therefore, we only need to check the DAG which the new edge is inserted into. (Bulk insertion into multiple DAGs can be treated as a sequence of individual insertions. Then for each individual insertion, the procedure is the same.) Here is the procedure for checking.
- Select the DAG involving the edge insertion.
- Form an adjacency matrix A that fully represents the DAG with $A_{ij}$ as the edge weight from $node_i$ to $node_j$. A weight of 0 means there is no such edge.
- Actually, only a boolean (weight == 0) is necessary to check for cycles. The weight does not offer extra help here.
- Then use topological sorting algorithm by Kahn, A. B. (1962) to test if the graph has at least one cycle.
- If any error occurs, break and reject the edge to be inserted.
Kahn's algorithm:
L ← Empty list that will contain the sorted elements
S ← Set of all nodes with no incoming edges
while S is non-empty do
remove a node n from S
insert n into L
for each node m with an edge e from n to m do
remove edge e from the graph
if m has no other incoming edges then
insert m into S
if graph has edges then
return error (graph has at least one cycle)
else
return L (a topologically sorted order)
Question 3 - Schema Design
Schema
Here is the XML schema designed for the show.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:t="http://qingpei.me/COMP5323"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://qingpei.me/COMP5323"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="show">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" >
<xs:element ref="t:episode" maxOccurs="unbounded" >
<xs:element ref="t:star_chef" minOccurs="4"
maxOccurs="unbounded" />
<xs:element ref="t:ingredient" maxOccurs="unbounded" >
<xs:element ref="t:challenger" maxOccurs="unbounded" >
</xs:sequence>
</xs:complexType>
<xs:key name="episode_id">
<xs:selector xpath="t:episode" >
<xs:field xpath="t:number" >
</xs:key>
<xs:key name="chef_id">
<xs:selector xpath="t:star_chef" >
<xs:field xpath="t:name" >
</xs:key>
<xs:key name="challenger_id">
<xs:selector xpath="t:challenger" >
<xs:field xpath="t:name" >
<xs:field xpath="t:restaurant" >
</xs:key>
<xs:key name="ingredient_id">
<xs:selector xpath="t:ingredient" >
<xs:field xpath="t:id" >
</xs:key>
<xs:keyref name="episode_idref" refer="t:episode_id">
<xs:selector xpath="t:star_chef/t:episode_appeared" />
<xs:field xpath="@ref" >
</xs:keyref>
<xs:keyref name="chef_idref" refer="t:chef_id">
<xs:selector xpath="t:episode/t:star_chef|t:episode/t:challenged_chef" />
<xs:field xpath="@ref" >
</xs:keyref>
<xs:keyref name="challenger_idref" refer="t:challenger_id">
<xs:selector xpath="t:episode/t:challenger" />
<xs:field xpath="@key1" >
<xs:field xpath="@key2" >
</xs:keyref>
<xs:keyref name="ingredient_idref" refer="t:ingredient_id">
<xs:selector xpath="t:episode/t:ingredient" />
<xs:field xpath="@ref" >
</xs:keyref>
<xs:unique name="ingredient">
<xs:selector xpath="t:episode/t:ingredient" />
<xs:field xpath="@ref" >
</xs:unique>
</xs:element>
<xs:element name="episode">
<xs:complexType>
<xs:complexContent>
<xs:extension base="t:episodeType" >
</xs:complexContent>
</xs:complexType>
<xs:key name="judge_id">
<xs:selector xpath="t:judge" >
<xs:field xpath="t:name" >
</xs:key>
<xs:key name="star_id">
<xs:selector xpath="t:star_chef|t:challenged_chef" >
<xs:field xpath="@ref" >
</xs:key>
<xs:unique name="judge_name">
<xs:selector xpath="t:judge" >
<xs:field xpath="t:name" >
</xs:unique>
</xs:element>
<xs:complexType name="episodeType">
<xs:sequence>
<xs:element name="number" type="xs:positiveInteger" >
<xs:element name="star_chef" type="t:refType" minOccurs="3"
maxOccurs="3" />
<xs:element name="challenged_chef" type="t:refType" >
<xs:element name="challenger" type="t:doubleRefType" >
<xs:element name="ingredient" type="t:refType" >
<xs:element name="judge" minOccurs="4" maxOccurs="4">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string" >
<xs:element name="score_star" type="t:scoreType" >
<xs:element name="score_challenger"
type="t:scoreType" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="winner_is_challenger" type="xs:boolean" >
</xs:sequence>
</xs:complexType>
<xs:element name="star_chef">
<xs:complexType>
<xs:complexContent>
<xs:extension base="t:personType">
<xs:sequence>
<xs:element name="episode_appeared" type="t:refType"
maxOccurs="unbounded" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="personType">
<xs:sequence>
<xs:element name="name" type="xs:string" >
</xs:sequence>
</xs:complexType>
<xs:complexType name="refType">
<xs:attribute name="ref" use="required" >
</xs:complexType>
<xs:element name="ingredient" type="t:ingredientType" >
<xs:complexType name="ingredientType">
<xs:sequence>
<xs:element name="id" type="xs:positiveInteger" >
<xs:element name="name" type="xs:string" >
</xs:sequence>
</xs:complexType>
<xs:complexType name="challengerType">
<xs:complexContent>
<xs:extension base="t:personType">
<xs:sequence>
<xs:element name="restaurant" type="xs:string" >
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="challenger" type="t:challengerType" >
<xs:complexType name="doubleRefType">
<xs:attribute name="key1" use="required" >
<xs:attribute name="key2" use="required" >
</xs:complexType>
<xs:complexType name="scoreType">
<xs:sequence>
<xs:element name="taste">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0" >
<xs:maxInclusive value="20" >
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="appearance">
<xs:simpleType>
<xs:restriction base="xs:int">
<xs:minInclusive value="0" >
<xs:maxInclusive value="20" >
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:schema>
- xs:key to eliminate duplicate star chefs in the entire show.
- xs:key combined with name and restaurant to identify a unique challenger.
- xs:unique to ensure the 4 stars in a single episode are different.
- xs:keyref where applicable to ensure data inputs are valid keys in the scope.
XQuery to Find the Top Chef
In the design philosophy of the above schema, I thought it would be better if each star_chef element holds a reference to all episodes that chef has shown up while the episode element holds references to the chefs in that particular episode. By cross-referencing these elements, it would be easier to query all the data about a given star_chef without having to traverse every episode.
The additional information stored in the xml file does make the insertion operation more complicated and a little bit more time consuming. However, that may speed up queries. In my opinion, sacrificing the write access time for faster queries is worthy. There would be far more queries than database updates.
The query to find the top chef can be written like this:
declare namespace t = "http://qingpei.me/COMP5323";
for $c in doc("show.xml")/t:show/t:star_chef
order by count($c/t:episode_appeared) descending
return
<p>{data($c/t:name)} , {count($c/t:episode_appeared)}</p>
It is also feasible to get the same result without using episode_appeared information of each chef but looking for things in the episode subtrees.
declare namespace t = "http://qingpei.me/COMP5323";
let $d := doc("show.xml")
for $name in $d/t:show//t:star_chef/t:name
let $ep := $d/t:show/t:episode
let $pool := $ep/t:star_chef | $ep/t:challenged_chef
let $count := count($pool[@ref = $name])
order by $count descending
return
<chef>{$name/text()}, {$count }</chef>
Many-to-many relationship in XML Schema
To model a many-to-many relationship in XML Schema, the following ways are possible:
- When an element is related to another, store a copy of it in the target.
- Pros
- All the related data are physically stored together. Accessing is more sequential.
- Cons
- All occurrences have to be taken care of when add/modify/remove anything that is not isolated.
- Inefficient storage usage with much duplication in data.
- Pros
- Use xs:ID and xs:IDREF or use xs:key and xs:keyref to store only the references to the elements related.
- Pros
- No duplicate data.
- Less mismatches. Only existing elements can be referred to.
- Cons
- Random accesses following the references.
- Pros
- Add extra entities to store the relationships, converting the relationship to 1:N.
- Pros
- Easier to access all the relationships.
- Cons
- The tree structure changes to a less intuitive one.
- Pros
Question 4 - Oracle and another XML DB
Comparison of XML support between Sedna and Oracle XML DB.
Storage Method
Sedna
The Sedna Database stores the following objects:
- Database
- Collection and Stand-alone document
- Document in Collection
Data are stored in blocks chained into bidirectional lists.
- Node descriptors are ordered across blocks according to document order.
- Bi-directional references from the descriptive schema node to/from the block.
Oracle XML DB
The two main features in Oracle XML DB architecture are:
- XMLType tables and views storage
- When XML Schema are registered with Oracle XML DB, XML elements for XMLType tables, tables with XMLType columns, and XMLType views, are mapped to database tables. These can be viewed and accessed in XML repository.
- Data in XMLType tables and tables with XMLType columns can be stored in Character Large Objects (CLOB) or natively using structured XML.
- Data in XMLType views can be stored in local tables or remote tables. The latter can be accessed through DBLinks.
- Both XMLType tables and views can be indexed using B*Tree, Oracle Text, function-based, or bitmap indexes.
- Oracle XML DB repository, also referred to in this manual as XML repository or repository
- Oracle XML DB repository (XML repository or repository) is an XML data repository in Oracle Database optimized for handling XML data. At the heart of Oracle XML DB repository is the Oracle XML DB foldering module.
Schema/DTD
Sedna
By default an XMLReader does not parse Comments, CDATA or DTD Declarations. However the Sedna XML:DB API can (with a tweak).
A descriptive schema-driven storage strategy is developed which consists of clustering nodes of an XML document according to their positions in the descriptive schema of the document. In contrast to a prescriptive schema that is known in advance and is usually specified in DTD or XML Schema, the descriptive schema is generated from data dynamically (and is maintained incrementally) and represents a concise and an accurate structure summary for data. Using the descriptive schema instead of the prescriptive one makes the storage strategy applicable to any XML document, even a one that comes with no prescriptive schema.
Oracle XML DB
Oracle XML DB uses annotated XML Schema as metadata, that is, the standard XML Schema definitions along with several Oracle XML DB-defined attributes. These attributes control how instance XML documents get mapped to the database. Because these attributes are in a different namespace from the XML Schema namespace, such annotated XML Schemas are still legal XML Schema documents.
When using Oracle XML DB with XML Schema, you must first register the XML Schema. You can then use the XML Schema URLs while creating XMLType tables, columns, and views. The XML Schema URL, in other words, the URL that identifies the XML Schema in the database, is associated with the schemaurl parameter of registerSchema.
Oracle XML DB provides XML Schema support for the following tasks:
- Registering any W3C-compliant XML Schemas.
- Validating your XML documents against a registered XML Schema definitions.
- Registering local and global XML Schemas.
- Generating XML Schema from object types.
- Referencing an XML Schema owned by another user.
- Explicitly referencing a global XML Schema when a local XML Schema exists with the same name.
- Generating a structured database mapping from your XML Schemas during XML Schema registration. This includes generating SQL object types, collection types, and default tables, and capturing the mapping information using XML Schema attributes.
- Specifying a particular SQL type mapping when there are multiple legal mappings.
- Creating XMLType tables, views and columns based on registered XML Schemas.
- Performing manipulation (DML) and queries on XML Schema-based XMLType tables.
- Automatically inserting data into default tables when schema-based XML instances are inserted into Oracle XML DB repository using FTP, HTTP/WebDAV protocols and other languages.
In addition to supporting XML Schema that provide a structured mapping to object- relational storage, Oracle XML DB also supports DTD specifications in XML instance documents. Though DTDs are not used to derive the mapping, XML processors can still access and interpret the DTDs.
- Inline DTD Definitions When an XML instance document has an inline DTD definition, it is used during document parsing. Any DTD validations and entity declaration handling is done at this point. However, once parsed, the entity references are replaced with actual values and the original entity reference is lost.
- External DTD Definitions
Oracle XML DB also supports external DTD definitions if they are stored in the repository. Applications needing to process an XML document containing an external DTD definition such as
/public/flights.dtd
, must first ensure that the DTD document is stored in Oracle XML DB at path/public/flights.xsd
.
Query Support and Indexing
Sedna
Sedna has a wide range of queries/statements support: XQuery queries, XML update statements, data definition language statements
The following XPath evaluations are supported.
- Simple absolute XPath:
/library/book/title
(descriptive schema evaluation only) - Absolute XPath with descendant axes:
/library//title
(descriptive schema with merge by labeling schema) - XPath with predicates:
/library/book[title=“XQuery”]/author
- following,sibling,parent,…:
/library//author[text()=“Tolstoy”]/..
Index implementations:
- B+-tree
- Clusterization
- Error counters
- Pre-sorting during create
- Markers on Schema
Full-text indices and IR:
- Integration with external engine: dtSearch
- ACID support and lazy evaluation
Oracle XML DB
The following processing options are available:
- XSLT
- DOM fidelity, document fidelity.
- XPath searching.
- XMLType views.
- XQuery
A hierarchical index speeds up folder and path traversals. Oracle XML DB includes a new, patented hierarchical index that speeds up folder and path traversals in Oracle XML DB repository. The hierarchical index is transparent to end users, and allows Oracle XML DB to perform folder and path traversals at speeds comparable to or faster than conventional file systems.
One key decision to make when using Oracle XML DB for persisting XML documents is when to use structured- and when to use unstructured storage.
- Unstructured Storage
- Text and function-based indexes.
- Structured Storage
- B-Tree, text and function-based indexes.
Oracle supports Full Text search on documents that are managed by the Oracle Database.
Transaction Management
Sedna
Principles
- ACID transactions
- Atomicity – rollback procedure
- Consistency – by design
- Isolation – S2PL and snapshots
- Durability – two-level recovery scheme
- Versioning environment
- Support for Read-Only transactions
- Physical recovery using persistent snapshot
- Logical recovery using log of micro-operations
Versioning Scheme
- Page-level versioning
- Consistent with internal representation (e.g. following the pointers)
- Transaction-transparent solution
- All logic is encapsulated in a separate module on SM
- Limited number of versions for each page
- More effective maintenance and garbage collecting (4 versions on 2 snapshots)
- Support for snapshots to process read-only transactions
- No isolation is required
- Long-running read-only transactions cannot be rolled back due to the lack of versions
Isolation
- Usual transactions
- S2PL protocol
- Document-level granularity
- Read-only transactions
- No isolation is required since they use transaction-consistent snapshots
Oracle XML DB
Oracle XML DB versioning helps keep track of all changes on version-controlled Oracle XML DB resources (VCR). The following sections discuss these features in detail. Oracle XML DB versioning features include the following:
- Version control on a resource.
You have the option to turn on or off version control on an Oracle XML DB resource. - Updating process of a version-controlled resource.
When Oracle XML DB updates a version-controlled resource, it also creates a new version of the resource, and this version will not be deleted from the database when the version-controlled resource is deleted by you. - Loading a version-controlled resource is similar to loading any other regular resource in Oracle XML DB using the path name.
- Loading a version of the resource.
To load a version of a resource, you must first find the resource object id of the version and then load the version using that id. The resource object id can be found from the resource version history or from the version-controlled resource itself.
Interface to RDBMSs
Sedna
- SQL connection from XQuery.
- Through ODBC interface
- Allows querying and updating relational databases
- Query results are presented as a sequence of XML elements:
<tuple column1=“value1” … columnN=“valueN”/>
- APIs developed by Sedna team:
- C
- Java
- Scheme
- OmniMark (Stilo’s streaming programming language used for content engineering tasks)
- APIs contributed by Sedna open source users:
- Python
- PHP
- .Net
- XML:DB API (standard API for XML databases, supported by other products also)
Oracle XML DB
- Oracle XML DB Resource APIs.
These are used to access XMLType and other data. In other words, to access data in the Oracle XML DB hierarchically indexed repository. The APIs are available in the following languages:- SQL, through the RESOURCE_VIEW and PATH_VIEW APIs
- PL/SQL, through DBMS_XDB and DBS_XMLSTORE APIs
- Java through the Resource API for Java
- C (OCI) through the C API for XML
- Oracle Data Provider for .NET (ODP.NET)
- Oracle XML DB Protocol Server.
Oracle XML DB supports FTP, HTTP, and WebDAV protocols, as well as JDBC, for fast access of XML data stored in Oracle Database in XMLType tables and columns.
References
Why does my XQuery fail when I override the default namespace?


Previous Excel Table
Type something in the input field to search the table :
| Last Name | First Name | >Date | Branch | Additional Info / Notes | Banned Starting | Banned Ending | Additional Notices |
|---|---|---|---|---|---|---|---|
| Wall | Nayla | 2019/01/22 | CSSS | Banned for one year | 2019/01/22 | 2020/01/22 | |
| Davie | Maxwell | 2018/08/02 | ASST. DIRECTOR | Banned for 1 year vio | 2018/08/02 | 2019/08/02 | |
| Patel | Constance | 2018/08/29 | ASST. DIRECTOR | Banned for 6 months violation below | 2018/08/29 | 2019/03/01 | |
| Winters | Aairah | 2019/01/24 | CSSS | Banned for three months | 2019/01/24 | 2019/04/24 | |
| Moss | Millie | 2018/12/10 | CSSS | Banned for two months for brealing computer monitor at A.H. branch and for disruptive behavior | 2018/12/10 | 2019/02/10 |


Full Stack Web Developer with a dedication to constant improvement. Recently graduated from Vanderbilt University's first coding bootcamp. Knows what it takes to take a project from initiation to completion, with a background in residential construction and real estate. Effective at combining creativity and problem-solving to develop user-friendly applications.
Directed construction of 32 projects, everything from 5000+ sq ft custom new construction to simple ranch-style home kitchen renovations.
High-dollar custom projects demanded an exacting level of attention to detail and persistence to complete on schedule and within budget
Served as a co-listing agent for all AE Construction speculative properties for sale. Facilitated procurement of future land lots for construction, involving due diligence in researching property histories, as well as regular effective communication with partnering agents and owners to ensure a smooth process for all parties.
Accepted into an elite teaching program (JET) to be employed by the Japanese government public school system to teach English.
Browse local hiking trails! Search your address and get a list of trails close to you.

My wife is British and needed help with American tipping rules - calculate tips for a number of common situations.
Test your P&R knowledge! Uses setTimeout API and Bootstrap to create a fast-paced quiz game.
A guessing game for 80s movie titles.
I am a MASSIVE pop culture nerd! We will get along very well if you have opinions on any of the following points:


Add Questions
*All Answers Must be
true
or
false
Question 1.
Answer 1.
Question 2.
Answer 2.
Question 3.
Answer 3.
Question 4.
Answer 4.
Question 5.
Answer 5.
Question 6.
Answer 6.
Question 7.
Answer 7.
Question 8.
Answer 8.
Question 9.
Answer 9.
Question 10.
Answer 10.


An Audio object is created for animalSounds.mp3, which is made up of multiple different sounds: purr, woof, and so on.
A TextTrack
is then constructed with a TextTrackCue added for each sound. Each cue has a startTime, an endTime and an ID.
When a button is clicked, a cue with the same ID as the button is found using the TextTrack
getCueById()
method. The Audio object currentTime
is set to the startTime of the cue. A timeupdate
event listener stops play at the endTime
of the cue.
This demo is based on a code example in the W3C TextTrack API documentation.
For more information about the track element, take a look at Getting started with the track element on HTML5 Rocks.
View source on GitHub


With a simple type change, Blastoise goes from an outclassed mono water to a unique, no-nonsense offensive tank with useful typing. Notably, Blastoise can take on the BoltBeam combo easily thanks to its new immunity to electric. Its high bulk will even allow its Substitute to not be broken by some BoltBeam attacks, which allows Blastoise to comfortably throw out attacks. Despite all this going for it, Blastoise isn't without its flaws. Its neutral damage output is underwhelming at times and it can get worn down fast.
- Hydro Pump
- Earthquake
- Blizzard
- Substitute
This set aims to punish passive BoltBeam users by having their attacks fail to break a Substitute. Earthquake and Hydro Pump are strong STABs, and Blizzard hits the grass types that try to resist this combination.
- Ice Beam
- Earthquake
- Reflect
- Rest
Blastoise can use a set like this for more longevity. Ice/ground attacks are unresisted, and repeated Ice Beams can force out opposing Reflect users.
Surf doesn't miss, but reducing Blastoise's neutral damage output further is generally not advised. Submission can lure walls like Clefable and Chansey. Body Slam can be used on Reflect sets to spread paralysis instead of freeze, but its damage output is relatively low.
High-bst wallbreakers: Stat machines like Gyarados and Articuno can tank Blastoise's attacks and retaliate with high neutral damage.
Grass attacks: Blastoise's sole weakness to grass attacks is a big one, with most Mega Drain users dealing hefty damage and healing a lot.
Author: Kurai
Publish Date: 24th July 2020