Not a question. Let me know about your ideas, for sure! For making an engine like this, while I have a lot of discretion for random crap, my main philosophy is to not add anything unless:
It would be useful in 2 or more possible games.
Someone wants to use it in a game they're actually making.
It excites me.
Of course, the project is open source and on GitHub, so you are warmly welcome to fork it and add your own features. I'd love to see how other people could snazz it up : )
I have an idea for a puzzle game, but it's not suited to PuzzleScript
You're right, PuzzleScript isn't a universal puzzle-game-making tool. It's best for turn-based, keyboard-controlled games where you're moving a thing, or several things around.
The editor is crazy ugly.
Not a question. If you want to try reskinning it, I'd love to see what you could do. It's all controlled in css (in midnight.css), so knock yourself out. You should work on the source, rather than the raw webpage on puzzlescript.net, which is heavily compiled, and won't make much sense.
Can I turn my games into standalone executables?
I had originally intended to make a very simple native (C or whatever) cross-platform standalone client for PuzzleScript. However, it wouldn't be fun for me to maintain two separate versions of the engine. But if you want to try to do so, knock yourself out : )
Can I run the editor offline?
You can download an uncompressed version of PuzzleScript from GitHub, and that should work okay offline, except for exporting standalone versions of the games (it has some optimizations that stop it from working when the webpage is run from your hard-disk), and sharing.
Why no music?
I want scripts to be standalone, and it's not so practical for people to write aesthetically tolerable music the same way they say edit sprites. Sorry! (Maybe a better approach would be to have a seeded random music generator like the random sound generator?).


My micro-sim cutter arrived today so I was finally able to try out the new Nokia Lumia 800 I recieved from the Alphalabs.cc event last weekend.
Nokia have got the design just right, it's slim, and the screen curves perfectly into the body all the way round the edge. I've got some ideas for some projects I want to try out so I'm really looking forward to getting some code running on the device.


---
layout: post
title: "Single no more"
date: 2007-01-28
comments: false
categories:
- personal
- wedding
---
There have been a lot of changes with my life lately. The most prominent one of all is that I am single no more. I am now happily wedded to my long time love Shanthi. I stole a few minutes off my busy schedule to post this .
I am going drop off the web for a couple of weeks now. Bye Bye web. Cya later.


I am the biggest procrastinator in the whole world. Always doing things at the last minute. Imagine I could have got this assignment done with enough time to style it correctly. And here I am, toiling on the assignment at the eleventh hour. Although the phrase is nonsense, it does have a long history. The phrase has been used for several centuries by typographers to show the most distinctive features of their fonts.


|
|
#1
Oct27-08, 09:44 PM
|
|
P: 1
|
i need to know what the error messege below means and how to fix it.
Exception in thread "main" java.lang.NumberFormatException: For input string: "z" at java.lang.NumberFormatException.forInputString(NumberFormatException.ja va:48) at java.lang.Integer.parseInt(Integer.java:447) at java.lang.Integer.parseInt(Integer.java:497) at chap56.main(chap56.java:23) it came from the program below which was created and compiled with jGrasp. it should read any number of integers from a file and output the sum of the evens and the odds to a file. sorry about the attachment i dont know how to put code in the body. |
||
|
|
|
|
#2
Oct27-08, 10:12 PM
|
|
P: 366
|
A quick answer is that the program encounters a non-numeric character "z" when it expects a numeric digit.
The best way is to display every character the program reads before you do the command Integer.parseInt(b). An even better way is to implement a try-catch construct so that when the exception occurs, it will be caught, and you can print the offending character. If you would like further help, it would certainly be easier if you post the data file (chap56input.txt), or part of it so we can see if the programme code is compatible with what it reads. To post the data file, just open it with an editor or Word, and copy part of the text and paste it onto the message screen of this forum. For the benefit of other readers, here's the code:
|
|
|
|
| Register to reply |
| Related Discussions | ||||
| error message in fortran | Computing & Technology | 3 | ||
| Question regarding error message. | Computing & Technology | 1 | ||
| Error message | Programming & Computer Science | 0 | ||
| Error in Moving Message | Forum Feedback & Announcements | 3 | ||
| error message | Forum Feedback & Announcements | 4 |


Kaprepkar's Constant release video for Xmas single
by https://www.facebook.com/progAll You Wish Yourself released on November 29...
Kaprekar's Constant have released a video for their new Christmas single, All You Wish Yourself, which features former Van der Graaf Generator sax player David Jackson. You can watch the whole video below.
"Hopefully the song’s uplifting message will be welcomed by the many election and Brexit-weary," bassist and co-writer Nick Jefferson tells Prog.
All You Wish Yourself will be available to download from 29th November and a limited edition CD single (100 units) will be released on 6th December on Talking Elephant Records.
Kaprekar's Constant released their second album Depth of Field in September. The band will be back in the studio in the New Year working on new music for an extended, double-vinyl release of the new album.


Enter SPOJ username
Why Use It ?
Cuz Stalking Is Bad, Right ?

Competetiveness
Those increasing points on your friend's SPOJ profile give you a reason to spend endless hours on SPOJ in one go to increase your own points and get you in the highest scorers of the week.
Think
You can observe and think about what topics your friends are acing and what all you need to focus on.


select
component of
Material Extensions,
it is a Material form field wrapper of ng-select
.
Most common case is showing data from backend API and with mtx-select this is extremely simple since you can bind directly to observable when using angular | async pipe.
You can also set array of objects as items input.
While array of objects is the most common items source, you may want to set simple array of strings, numbers, booleans.
If you have simple use case, you can omit items array and bind options directly in html using ng-option component.
Selected value: {{selectedCompany | json}}
Selected value: {{selectedCompanyCustom | json}}
Test ng-select in a dialog.


fun <T> Assert<T>.expected(message: String): Unit
Fails an assert with the given expected message. These should be in the format:
expected("to be:${show(expected)} but was:${show(actual)}")
-> "expected to be: <1> but was <2>"


R/fct_split_families.R
split_families.Rd
Split a population of genotypes randomly into several locations, with the aim of having approximatelly the same number of replicates of each genotype, line or treatment per location.
split_families(l = NULL, data = NULL)
| l | Number of locations. |
|---|---|
| data | Data frame with the entry (ENTRY) and the labels of each treatment (NAME) and number of individuals per family group (FAMILY). |
A list with two elements.
rowsEachlist
is a table with a summary of cases.
data_locations
is a data frame with the entries for each location
Didier Murillo [aut], Salvador Gezan [aut], Ana Heilman [ctb], Thomas Walk [ctb], Johan Aparicio [ctb], Richard Horsley [ctb]
# Example 1: Split a population of 3000 and 200 families into 8 locations. # Original dataset is been simulated. set.seed(77) N <- 3000; families <- 200 ENTRY <- 1:N NAME <- paste0("SB-", 1:N) FAMILY <- vector(mode = "numeric", length = N) x <- 1:N for (i in x) { FAMILY[i] <- sample(1:families, size = 1, replace = TRUE) } gen.list <- data.frame(list(ENTRY = ENTRY, NAME = NAME, FAMILY = FAMILY)) head(gen.list)#> ENTRY NAME FAMILY #> 1 1 SB-1 146 #> 2 2 SB-2 173 #> 3 3 SB-3 197 #> 4 4 SB-4 57 #> 5 5 SB-5 37 #> 6 6 SB-6 29# Now we are going to use the split_families() function. split_population <- split_families(l = 8, data = gen.list)#> Warning: Family 23 is not in all locations.#> Warning: Family 41 is not in all locations.#> Split families: #> #> #> Data frame with the summary of cases by location: #> Location n #> 1 Location 1 380 #> 2 Location 2 367 #> 3 Location 3 384 #> 4 Location 4 394 #> 5 Location 5 365 #> 6 Location 6 371 #> 7 Location 7 367 #> 8 Location 8 372 #> #> 10 First observations of the data frame with the entries for each location: #> ENTRY NAME FAMILY LOCATION #> 1 1040 SB-1040 1 Location 1 #> 2 1671 SB-1671 2 Location 1 #> 3 1151 SB-1151 2 Location 1 #> 4 2231 SB-2231 3 Location 1 #> 5 972 SB-972 3 Location 1 #> 6 2499 SB-2499 4 Location 1 #> 7 2184 SB-2184 5 Location 1 #> 8 2144 SB-2144 5 Location 1 #> 9 2087 SB-2087 6 Location 1 #> 10 1020 SB-1020 6 Location 1#> Split families: #> #> 1. Structure of the data frame with the summary of entries by location: #> #> 'data.frame': 8 obs. of 2 variables: #> $ Location: chr "Location 1" "Location 2" "Location 3" "Location 4" ... #> $ n : num 380 367 384 394 365 371 367 372 #> 2. Structure of the data frame with the entries for each location: #> #> 'data.frame': 3000 obs. of 4 variables: #> $ ENTRY : int 1040 1671 1151 2231 972 2499 2184 2144 2087 1020 ... #> $ NAME : chr "SB-1040" "SB-1671" "SB-1151" "SB-2231" ... #> $ FAMILY : num 1 2 2 3 3 4 5 5 6 6 ... #> $ LOCATION: chr "Location 1" "Location 1" "Location 1" "Location 1" ...#> ENTRY NAME FAMILY LOCATION #> 1 1040 SB-1040 1 Location 1 #> 2 1671 SB-1671 2 Location 1 #> 3 1151 SB-1151 2 Location 1 #> 4 2231 SB-2231 3 Location 1 #> 5 972 SB-972 3 Location 1 #> 6 2499 SB-2499 4 Location 1 #> 7 2184 SB-2184 5 Location 1 #> 8 2144 SB-2144 5 Location 1 #> 9 2087 SB-2087 6 Location 1 #> 10 1020 SB-1020 6 Location 1 #> 11 1706 SB-1706 7 Location 1 #> 12 939 SB-939 8 Location 1


A framework for building Web Server applications in the browser over WebRTC.
$ npm install smoke-node --save
import { Node } from 'smoke-node'
const node = new Node()
const app = node.rest.createServer()
app.get('/', (req, res) => {
res.send('hello world')
})
app.listen(80)
const text = await node.rest.fetch('/').then(n => n.text())
Smoke is an experimental peer to peer networking framework that allows Web Browsers to run as lightweight Web Servers that operate over WebRTC. It offers a set of APIs to run both HTTP and Web Socket server like functionality in the browser as well as a set of Web like APIs to consume content hosted in remote browsers.
Communication between browsers operates entirely peer to peer with each network Node able to support hundreds of concurrent connections. New server nodes may be deployed when users load web pages, with some potential to scale node infrastructure proportional to the number of users loading pages.
Additionally, this library provides two storage mechanisms for persisting object and file data by leveraging IndexedDB. Nodes can host file and data in much the same way as one would with a traditional file or api server, with IndexedDB offering gigabytes of storage at each node.
This framework was written primarily as a tool to prototype various peer to peer networking architectures. It aims to offer a baseline for exploring various decentralized and distributed technologies using the network and storage capabilites available in modern browsers.
This framework is offered as is to anyone who finds it of use. Built with and tested with Chrome 72, Firefox 65 and Electron 4.0.4.
Released under MIT
This repository contains both Node and Hub projects as well as a Workbench project that can be used to test and script around the smoke Node and Hub.
To build locally.
$ git clone git@github.com:sinclairzx81/smoke.git
$ cd ./smoke
$ npm install
# start node | hub | workbench in watch mode.
$ npm run bench
This will start the workbench web app running a smoke Node. The workbench is accessible on http://localhost:5000
and the Hub signalling server is accessible on http://localhost:5001
.
A Hub is the name given to Smoke's WebRTC signalling infrastructure. It is a forwarding channel that Nodes use to relay messages to other Nodes (primarily WebRTC SDP and Candidate exchange messages). A Hub can loosely be thought of as a network Router or sorts. All Nodes connect to at least one Hub, and by doing so, the Node will be joining a network of other Nodes also connected to that Hub.
Smoke Hubs provide the following functionality:
From a application standpoint, Hubs are intended to be fairly transparent to applications (in much the same way as one doesn't usually give much thought to a home router when connecting to devices in a local area network), but they are important; forming the backbone of a peer network and playing a central role in describing the overall topology and partitioning of a network.
Smoke provides two built in Hub types:
A PageHub is an in memory in-page signalling Hub. It allows for multiple Nodes to connect to each other so long as those Nodes all belong to the same page. This is the default Hub used when passing no arguments when creating a Node. It can be used for testing, scripting and general demonstration purposes.
import { Node } from 'smoke-node'
const node = new Node() // uses the page hub
node.sockets.createServer(socket => { ... })
A NetworkHub provides over the network signalling for Nodes. This is a more traditional signalling service where ICE messages are able to be exchanged over the public networks. This project provides a reference web socket based hub server implementation that can be installed and run with the following.
$ npm install smoke-hub -g
$ smoke-hub --port 5000
The following assumes the above hub is started on localhost.
import { Node, NetworkHub } from 'smoke-node'
const node = new Node({ hub: new NetworkHub('ws://localhost:5000') })
The
PageHub
andNetworkHub
are both implementations ofHub
. Smoke supports implementation of custom Hub types by creating new Hubs that implementation theHub
interface, allowing Hubs to be implemented around existing server infrastructure, or within a peer to peer network itself.
A Node can be thought of as a process running somewhere on the network. All Nodes have network addresses (provided by their Hub), and each may expose zero or more ports to the network. Services are bound to ports in much the same way network servers bind to ports to receive connections.
New Nodes can be created by calling the Node
constructor. The following code creates 3 Nodes to match the network above, and makes a socket connection from node2
to node3
.
import { Node } from 'smoke-node'
const node1 = new Node() // <IP_ADDRESS>
const node2 = new Node() // <IP_ADDRESS>
const node3 = new Node() // <IP_ADDRESS>
// start server on node3 and listen on port 5000
node3.sockets.createServer(socket => {
socket.send('hello')
socket.close()
}).listen(5000)
// connect to node2 from node3 server
const socket = node2.sockets.connect('<IP_ADDRESS>', 5000)
socket.on('message', message => {
console.log(message.data)
})
Note that the addresses allocated from the
PageHub
are predictable and reset to<IP_ADDRESS>
on page refresh. Each new node entering the network will be0.0.0.[n+1]
up to255
. Applications should not place any special meaning on these addresses other than them being plain random strings. The scheme used by thePageHub
andsmoke-hub
implementations are for convenience only.
Note that Nodes can expose one or more ports. Ports in nodes are inferred from the
RTCDataChannel
label property. Connection attempts to non open ports on a smoke node result in the immediate closing of that connection.
Nodes house several APIs that allow them to function as network application servers. Many of the APIs provided by this library are based on NodeJS core and community modules that have been rebuilt from the ground up to operate over WebRTC. The following sections provide a high level overview of the APIs available on each Node instance.
const { system, network, hub, sockets, rest, media } = new Node()
Provides access to this Nodes uptime, network and storage metrics.
Provides access to the lowest levels of the node network stack. Allows for the binding and unbinding of ports, creating and listening for RTCDataChannels and provides direct access to the pool of RTCPeerConnections managed for this node.
Provides access to the signalling hub this node is connected to. Allows one to resolve their address within the signalling network.
Provides an interface to create and connect to socket server endpoints within the peer network. The sockets provided by this API are designed to function as typical Web Sockets. They layer RTCDataChannel to offer predictable network timeout, address resolution and sending and receiving message payloads that exceed RTCDataChannel limits.
Provides an interface to create and connect to HTTP like endpoints over WebRTC. The RestServer and Fetch APIs implement full request response semantics allowing for the transmission of data using familiar mechanisms used to send and receive data over HTTP. The RestServer also allows for the hosting of MediaStream content.
Provides an interface to create mediastreams from readable byte streams, such as those read from the IDB file system or received over the network. It also provides a test pattern mediastream source that can be used to test pass through without needing to setup stream sources (such as web camera feeds, etc)
Smoke provides two storage mechanisms for persisting both file and object data in the browser. Both of these mechanisms operate over IndexedDB, with one modelled on data persistense and query (Database), and the other binary file persistence and streaming (Buckets)
A transactional object store over IndexedDB.
import { Database } from 'smoke-node'
// creates a new IDB database named 'my-database'
const database = new Database('my-database')
// generates a new key.
const key = database.key()
// stages a record for insertion.
database.insert('my-table', {
key, foo: 1, bar: 'hello'
})
// commits the record.
await database.commit()
// gets the record via key
const record = await database.get('my-table', key)
// gets the record via idb scan | query.
const record = await database.query('my-table').where(n => n.key === key).first()
The Database type is a transactional object store built over IDB. It manages some of the complexities around working with IDB, offering a simplified interface for reading and writing object records to IDB object stores.
A file persistence store for IndexedDB.
import { Bucket, Buffer } from 'smoke-node'
// Creates a new IDB database named 'my-bucket'
const bucket = new Bucket('my-bucket')
// Writes some content to 'index.html'.
await bucket.write('index.html', `<h1>hello world</h1>`)
// Creates a writable stream and streams content to IDB.
const writable = bucket.writable('source.dat')
writable.write('hello')
writable.write('world')
writable.close()
// Creates a readable for the above.
const readable = bucket.readable('source.dat')
for await (const buffer of readable) {
console.log(buffer.toString('utf8'))
}
// Pipes from 'source.dat' to 'target.dat'
const readable = bucket.readable('source.dat')
const writable = bucket.writable('target.dat')
await readable.pipe(writable)
A Bucket is a specialized implementation of the Database type that supports streaming files to and from IDB. It is intended to be a source for file content transmitted over a peer network. The interface of the bucket shares parallels with Amazon S3 in terms of general functionality. Files stored within the bucket are given simple keys, with hierarchical directory trees able to be emulated in much the same way as one would with S3.
import { Node, Bucket } from 'smoke-node'
// Creates a IDB database named 'my-files'
const bucket = new Bucket('my-files')
// Writes this content to 'index.html'
await bucket.write('index.html', '
hello
')
// Creates a new network node.
const node = new Node()
// Create a new rest server.
const app = node.rest.createServer()
// Serves the content from the bucket.
app.get('/index.html', (req, res) => {
res.readable(bucket.readable('index.html'))
})
The following are a few examples of applications that can be implemented with this framework.
The following code creates a simple socket server and listens on port 7000. It is connected to in a variety of ways.
import { Node } from 'smoke-node'
const node0 = new Node() // <IP_ADDRESS>
const node1 = new Node() // <IP_ADDRESS>
// listen <IP_ADDRESS> on port 7000
node0.sockets.createServer(socket => console.log('have socket')).listen(7000)
const socket0 = node0.sockets.connect('localhost', 7000) // ok
const socket1 = node0.sockets.connect('<IP_ADDRESS>', 7000) // ok
const socket2 = node1.sockets.connect('localhost', 7000) // fail - not localhost
socket2.on('error', console.log)
const socket3 = node1.sockets.connect('<IP_ADDRESS>', 7000) // ok
The following code demonstrates setting up a node running a rest server. This code
sets a host
node that runs a small rest server. A seconary node is then created
and uses the hosts
address to make a fetch
request to download content.
import { Node } from 'smoke-node'
(async () => {
// Server
const host = new Node({ })
const app = host.rest.createServer()
app.get('/', async (req, res) => {
res.headers['Content-Type'] = 'text/html'
res.send(`<h1>hello world</h1>`)
})
app.listen(80)
// Client
const node = new Node({ })
const response = await node.rest.fetch(`rest://${await host.address()}/`)
const content = await response.text()
console.log(content)
}, 1000)
The Rest server offers the ability to stream live media feeds (such as those given by getUserMedia) as Rest responses. In addition, Smoke supports mediastream pass-through / proxy using familiar request / response semantics, leading to mediastream fan-out from a single source.
The following code sets up 3 network nodes and pipelines a mediastream in the following way.
source > node0 > node1 > node2 > video element
Note, this component of smoke is highly experimental and subject to API changes.
import { Node } from 'smoke-node'
const node0 = new Node() // <IP_ADDRESS>
const node1 = new Node() // <IP_ADDRESS>
const node2 = new Node() // <IP_ADDRESS>
// node0 - The video source.
node0.rest.createServer().get('/mediastream', (req, res) => {
const mediastream = node0.media.createTestPattern()
res.mediastream(mediastream)
}).listen(80)
// node1 - The video proxy.
const app1 = node1.rest.createServer()
app1.get('/mediastream', async (req, res) => {
const response = await node1.rest.fetch('rest://<IP_ADDRESS>/mediastream')
res.mediastream(await response.mediastream())
}).listen(80)
// node2 - the client
;(async () => {
const response = await node2.rest.fetch('rest://<IP_ADDRESS>/mediastream')
const video = document.getElementById('video-0') as HTMLVideoElement
video.srcObject = await response.mediastream()
video.play()
})()
The Rest server framework supports streaming record sets directly from IndexedDB out to rest responses. The Rest server may act as a direct database pass-through, or projected with LINQ style queries. Its designed to allow nodes to function as standalone database servers.
Record iteration with queries means records are only pulled when the receiver moves 'next'. This is handled at a network protocol level and expressed with JavaScript async iterators.
The following code writes some database records and serves them on a Rest endpoint. The server filters the results (view logic) which are ordered and projected when received by the client.
import { Node, Record, Database } from 'smoke-node'
(async () => {
// Use the rest namespace.
const { rest } = new Node()
// Creates a IDB database with this name.
const db = new Database('users')
// Insert some users into the database.
db.insert('users', {
key: db.key(),
name: 'smith',
role: 'admin'
})
db.insert('users', {
key: db.key(),
name: 'mike',
role: 'admin'
})
db.insert('users', {
key: db.key(),
name: 'dave',
role: 'user'
})
db.insert('users', {
key: db.key(),
name: 'jones',
role: 'user'
})
// Commit users to database.
await db.commit()
// Create a Rest server.
const app = rest.createServer()
// Setup '/users' route.
app.get('/users', (req, res) => {
const query = db.query('users').where(n => n.role === 'user')
res.query(query)
}).listen(5433)
// Request query from server.
const query = await rest.fetch('rest://localhost:5433/users').then(n => n.query<User>())
// Apply order and iterate, new records pulled on each iteration.
for await (const user of query.orderBy(n => n.name).select(n => n.name)) {
console.log(user)
}
})();
Generated using TypeDoc


|
SharpNEAT
C# implementation of NEAT
|
An abstraction of the SignalArray class. Provided to allow custom implementations of a signal array if required. More...
Public Member Functions | |
| void | CopyTo (double[] targetArray, int targetIndex) |
| Copies all elements from the current SignalArray to the specified target array starting at the specified target Array index. More... | |
| void | CopyTo (double[] targetArray, int targetIndex, int length) |
| Copies length elements from the current SignalArray to the specified target array starting at the specified target Array index. More... | |
| void | CopyTo (double[] targetArray, int targetIndex, int sourceIndex, int length) |
| Copies length elements from the current SignalArray to the specified target starting from targetIndex on the target array and sourceIndex on the current source SignalArray. More... | |
| void | CopyFrom (double[] sourceArray, int targetIndex) |
| Copies all elements from the source array writing them into the current SignalArray starting at the specified targetIndex. More... | |
| void | CopyFrom (double[] sourceArray, int targetIndex, int length) |
| Copies length elements from the source array writing them to the current SignalArray starting at the specified targetIndex. More... | |
| void | CopyFrom (double[] sourceArray, int sourceIndex, int targetIndex, int length) |
| Copies length elements starting from sourceIndex on sourceArray to the current SignalArray starting at the specified targetIndex. More... | |
| void | Reset () |
| Reset all array elements to zero. More... | |
Properties | |
| double | this[int index] [get, set] |
| Gets or sets the signal value at the specified index. More... | |
| int | Length [get] |
| Gets the length of the signal array. More... | |
An abstraction of the SignalArray class. Provided to allow custom implementations of a signal array if required.
| void SharpNeat.Phenomes.ISignalArray.CopyFrom | ( | double[] | sourceArray, |
| int | sourceIndex, | ||
| int | targetIndex, | ||
| int | length | ||
| ) |
Copies length elements starting from sourceIndex on sourceArray to the current SignalArray starting at the specified targetIndex.
| sourceArray | The array to copy elements from. |
| sourceIndex | The sourceArray index at which copying begins. |
| targetIndex | The index into the current SignalArray at which copying begins. |
| length | The number of elements to copy. |
Implemented in SharpNeat.Phenomes.SignalArray, and SharpNeat.Phenomes.MappingSignalArray.
| void SharpNeat.Phenomes.ISignalArray.CopyFrom | ( | double[] | sourceArray, |
| int | targetIndex | ||
| ) |
Copies all elements from the source array writing them into the current SignalArray starting at the specified targetIndex.
| sourceArray | The array to copy elements from. |
| targetIndex | The index into the current SignalArray at which copying begins. |
Implemented in SharpNeat.Phenomes.SignalArray, and SharpNeat.Phenomes.MappingSignalArray.
| void SharpNeat.Phenomes.ISignalArray.CopyFrom | ( | double[] | sourceArray, |
| int | targetIndex, | ||
| int | length | ||
| ) |
Copies length elements from the source array writing them to the current SignalArray starting at the specified targetIndex.
| sourceArray | The array to copy elements from. |
| targetIndex | The index into the current SignalArray at which copying begins. |
| length | The number of elements to copy. |
Implemented in SharpNeat.Phenomes.SignalArray, and SharpNeat.Phenomes.MappingSignalArray.
| void SharpNeat.Phenomes.ISignalArray.CopyTo | ( | double[] | targetArray, |
| int | targetIndex | ||
| ) |
Copies all elements from the current SignalArray to the specified target array starting at the specified target Array index.
| targetArray | The array to copy elements to. |
| targetIndex | The targetArray index at which copying to begins. |
Implemented in SharpNeat.Phenomes.SignalArray, and SharpNeat.Phenomes.MappingSignalArray.
| void SharpNeat.Phenomes.ISignalArray.CopyTo | ( | double[] | targetArray, |
| int | targetIndex, | ||
| int | length | ||
| ) |
Copies length elements from the current SignalArray to the specified target array starting at the specified target Array index.
| targetArray | The array to copy elements to. |
| targetIndex | The targetArray index at which storing begins. |
| length | The number of elements to copy. |
Implemented in SharpNeat.Phenomes.SignalArray, and SharpNeat.Phenomes.MappingSignalArray.
| void SharpNeat.Phenomes.ISignalArray.CopyTo | ( | double[] | targetArray, |
| int | targetIndex, | ||
| int | sourceIndex, | ||
| int | length | ||
| ) |
Copies length elements from the current SignalArray to the specified target starting from targetIndex on the target array and sourceIndex on the current source SignalArray.
| targetArray | The array to copy elements to. |
| targetIndex | The targetArray index at which copying begins. |
| sourceIndex | The index into the current SignalArray at which copying begins. |
| length | The number of elements to copy. |
Implemented in SharpNeat.Phenomes.SignalArray, and SharpNeat.Phenomes.MappingSignalArray.
| void SharpNeat.Phenomes.ISignalArray.Reset | ( | ) |
Reset all array elements to zero.
Implemented in SharpNeat.Phenomes.SignalArray, and SharpNeat.Phenomes.MappingSignalArray.
|
get |
Gets the length of the signal array.
|
getset |
Gets or sets the signal value at the specified index.


Warehouse Chief Baxt:
Hmm... You didn't make 3 lines. Why don't you try again? The red-colored numbers on the panel are the ones you chose.


This dashboard creation tutorial is intended to show anyone who is interested in creating solutions for personal portfolio management how AnyChart Charting solution can help. This dashboard is a basic one but it is extendable. Some things are omitted for the sake of clarity.
Some say portfolio management is the art and science, which consists of making decisions about investment content combination and policy, matching investments to objectives, asset allocation for individuals and institutions, and balancing risk against performance.
If you want to be perfectly accurate, investment management is the professional asset management of various securities (shares, bonds and other securities) and other assets (e.g., real estate) in order to meet specified investment goals for the benefit of the investors. Investors may be institutions (insurance companies, pension funds, corporations, charities, educational establishments etc.) or private investors (both directly via investment contracts and more commonly via collective investment schemes e.g. mutual funds or exchange-traded funds).
Or, in plain English, managing investment porfolio is creationg a collections of assets that can diminish the risk inherent in stock markets by diversification or avoiding having too many eggs in one basket.
Whatever the case is, any porfolio management must include the following steps:
Each of the steps needs a dashboard of its' own, so we will create a dashboard for each step and put them in separate tabs.
We are not actually creating an investment porfolio solution - merely a sample, but we want this sample to be easily portable into the real world. So, we will take several popular instruments and obtain data on them from finance.yahoo.com
We will create Stocks/Bonds porfolio with 10 instruments maximum. We will obtain data on 10 Stocks and 10 Bonds instruments to choose from, so we could create any Stocks/Bonds mix with a full count of ten.
From finance.yahoo.com we obtains 10 Stocks и 10 Bonds instruments, along with historical prices for them. By comparing prices a year ago and current one we will get the investment returns index, so we can build a prognosis.
Here is a selection, it has nothing to do with any real world goal and created solely for the demostration purposes:
As we've said earlier, we want to create 3 tabs with a dashboard for each step in each them. Usually to choose the best layout for dashboard you should simply draw it by hand - to do a "paper design", you may do that in your favorite graphics editor or literarly by hand. That's what we will go through with each of the steps.
This tab will provide a user a way to mix the porfolio, it must allow to allocate certain amount of Stocks an Bonds and show this allocation in a comprehensible way. Donut Chart with labels in the center of it, and a slider to change the ratio seem to be just what we need:
Also, we want to see prognosis for the the porfolio, which changes depending on the content of the porfolio and may be different for different time periods (investment horizon). Line chart is perfect to show the trend, Range area chart - to show possible variations area, and a slider again - to choose the period:
So, the first tab must look something like that:
Portfolio Tab will be used to show the porfolio in details: the mix of the instruments and all basic information about them. The mix will be shown as the Doughnut Chart, just as in Goals tab, but there is no slider - chart is static here.
Also, we want to see the basic information about each of the instruments, such as: Full name, Ticker (stock symbol is an abbreviation used to uniquely identify publicly traded shares of a particular stock on a particular stock market), Percent of portfolio, Amount (bought), Price per one, sum in dollars (spent). Such data will look perfect in a table:
So, our Porfolio tab comes to this:
Performance tab, as name implies, shows the performance of our investment porfolio, which we will show using so called Stock Chart, a variation of date time based line chart with advanced scroller capabilites:
The best way to measure performance is to compare it with the markets, so we will obtain data about S&P 500, Nasdaq, Dow performance and add an ability to compare how our portfolio perform in comparison with them.
Performance tab must look something like this:
We will store data obtained from finance.yahoo.com in JSON format, it is human-readable text to transmit data objects consisting of attribute–value pairs. It is the most common data format used for asynchronous browser/server communication and can be easily produced with any DBMS and/or scripting language.
Let's look closely at the date for each tab. All data will be stored in /data folder in .json files.
To creata the Donut chart and the Line chart in this tab we need a list of all instruments and their attribute. Data from finance.yahoo.com is converted to JSON and stored in StocksViaBonds.json file.
To show the Donut chart in the Portflio tab we also use data from StocksViaBonds.json file.
To show performance we need data on S&P 500, Nasdaq и Dow. This data is stored in historical.json and financialQuotes.json files.
JSON data is loaded using AJAX requests like this:
$.getJSON("https://raw.githubusercontent.com/AnyChart/investment-portfolio-dashboard/master/src/data/financialQuotes.json", function (parsed_data) { ... });
When data is loaded we perform all necessary calculations, format data and pass it to charts using .data() method.
Charting in this sample is done exclusively by the
latest version of AnyChart JavaScript Web
Charting Framework.
AnyChart Users' Guide
AnyChart JavaScript API Reference
To create tabs, handle data and interactions the following tools are used:
We need two charts in the Goals tab. Data can be changed using sliders, so at first we create two charts with all settings and no data.
drawDonutChart function creates a Donut chart and defines all settings. It returns an object with (chart) instance, a link to path object (used to create an arc effectarund slices of the chart) and a link to dataset object, the latter is used to set data to a chart.
function drawDonutChart(container_id) { var chart = anychart.pie(); chart.interactivity('single'); chart.legend(false); chart.radius('40%'); chart.innerRadius('60%'); chart.padding(0); chart.margin(0); chart.explode(0); chart.labels(false); var dataset = anychart.data.set(); chart.data(dataset); var stage = anychart.graphics.create(container_id); chart.container(stage); var path = stage.path().stroke(null).zIndex(10); chart.draw(); return {'chart': chart, 'path': path, 'dataset': dataset};
When user changes sliderd - we change data in a chart.
Here is a code for Donut chart:
function updateDonutListeners(donutData, instrumentsTable){ var groupIndexes = []; donutData['chart'].listen('pointshover', function (e) { drawHoverArc(e.point, donutData['chart'], donutData['data'], donutData['path']); groupIndexes = []; var colorFill = '#ffa760'; if (donutData['data'][e.point.index]['group'] == 'bonds') colorFill = '#6fc0fe'; if ($('#table-container').is(':visible')) { groupIndexes = [e.point.index]; highLightRowInTable(groupIndexes, instrumentsTable, colorFill + ' 0.3') } }); donutData['chart'].listen('mouseout', function (e) { if ($('#table-container').is(':visible')) highLightRowInTable(groupIndexes, instrumentsTable, null); }); function createChartLabel(index, anchor, groupName, groupColor) { var label = donutData['chart'].label(index).useHtml(true); label.position('center'); label.fontColor(groupColor); label.anchor(anchor); label.offsetY(-10); label.offsetX(10); label.hAlign('center'); label.listen('mouseOver', function () { document.body.style.cursor = 'pointer'; groupIndexes = []; for (i = 0; i < donutData['data'].length; i++){ if (donutData['data'][i]["group"] == groupName) groupIndexes.push(i) } if ($('#table-container').is(':visible')) highLightRowInTable(groupIndexes, instrumentsTable, groupColor + ' 0.3'); donutData['chart'].unhover(); donutData['chart'].hover(groupIndexes); donutData['path'].clear(); for (var i = 0; i < groupIndexes.length; i++){ drawHoverArc(donutData['chart'].getPoint(groupIndexes[i]), donutData['chart'], donutData['data'], donutData['path'], true); } }); label.listen('mouseOut', function () { document.body.style.cursor = ''; donutData['chart'].unhover(); donutData['path'].clear(); if ($('#table-container').is(':visible')) highLightRowInTable(groupIndexes, instrumentsTable, null); }); } createChartLabel(0, 'left', 'stocks', '#ffa760'); createChartLabel(1, 'right', 'bonds', '#6fc0fe'); }
In updateDonutListeners, donutData is a variable with the new data for a Donut chart, instrumentsTable is used only in Portfolio tab to highlight rows of the rable.
NOTE: We do not actually solve a "Knapsack_problem" when the mix of the instruments is changed, we just imitate the solution. The imitation is implemented in getDataInProportion(), function (not shown here, can be found in the source code).
Two functions are used to create a line chart:
drawForecastChart()
function drawForecastChart(container_id) { var chart = anychart.area(); chart.tooltip().useHtml(true); var lineDataset = anychart.data.set(); chart.spline(lineDataset).stroke('#64b5f6').tooltip() .textFormatter(function(){ return 'Forecast: $' + this.value.toLocaleString(); }); var rangeDataset = anychart.data.set(); chart.rangeSplineArea(rangeDataset).fill('#64b5f6 0.3').highStroke(null).lowStroke(null).hoverMarkers(null).tooltip() .textFormatter(function(){ return 'High: $' + this.high.toLocaleString() + 'Low: $' + this.low.toLocaleString(); }); chart.tooltip().displayMode('union'); chart.yAxis().labels().textFormatter(function(){return '$' + this.value.toLocaleString()}); chart.container(container_id); chart.draw(); return {'chart': chart, 'lineDataset': lineDataset, 'rangeDataset': rangeDataset}; }
updateForecastData()
function updateForecastData(forecastData){ var time_data = []; var approximate_data = []; var year = new Date().getFullYear(); for (var i = 0; i <= forecastData['length']; i++){ var item = 0; for (var j = 0; j < forecastData['data'].length; j++){ item = item + forecastData['data'][j]['value'] * Math.pow((1 + forecastData['data'][j]['coefficient'] / 100), i); } time_data.push({x: year + i, value: item.toFixed(2)}); var shadow = i / 200; approximate_data.push({x: year + i, low: item.toFixed(2) * (1 - shadow), high: item.toFixed(2) * (1 + shadow)}); } if (forecastData['length'] > 0) forecastData['chart'].xScale().ticks().interval(1); if (forecastData['length'] > 10) forecastData['chart'].xScale().ticks().interval(2); if (forecastData['length'] >= 20) forecastData['chart'].xScale().ticks().interval(5); forecastData['lineDataset'].data(time_data); forecastData['rangeDataset'].data(approximate_data); }
In the Porfolio tab we create a Donut chart and a table with the detailed information. Donut chart is created using the same function as in Goals tab, the table is created and updated using the following two functions:
drawTable()
function drawTable(container_id){ var table = anychart.ui.table(); table.container(container_id); table.cellBorder(null); table.cellBorder().bottom('1px #dedede'); table.fontSize(12).vAlign('middle').hAlign('left').fontColor('#212121'); table.contents([['Name', 'Ticker', 'Percent', 'Price', 'Amount', 'Total Sum']]); table.getCol(0).fontSize(11); table.getRow(0).cellBorder().bottom('2px #dedede').fontColor('#7c868e').height(50).fontSize(12); table.getCol(1).width(60); table.getCol(2).width(60); table.getCol(3).width(75); table.getCol(4).width(60); table.getCol(5).width(90); table.draw(); return table; }
updateTableData()
function updateTableData(table, data){ var contents = [ ['Name', 'Ticker', 'Percent', 'Price', 'Amount', 'Total Sum'] ]; for (var i = 0; i < data.length; i++){ contents.push([ data[i]['name'], data[i]['ticker'], data[i]['percent'] + '%', '$' + parseFloat(data[i]['price']).toLocaleString(), data[i]['amount'], '$' + parseFloat(data[i]['value']).toLocaleString() ]); } table.contents(contents); table.draw(); }
Functions below are used to create and update a chart in Peformance tab. You can see that some extra functions are used there to recalculate data and more. We don't show them here for they are not essential to the sample at all, if you want to know how they work – please refer to the source code of the sample.
drawStockChart()
function drawStockChart(container_id){ var stock = anychart.stock(); var plot = stock.plot(); plot.yAxis(1).orientation('right'); stock.padding(0, 80, 0, 80); stock.container(container_id); var mainTable = anychart.data.table('date'); var mainMapping = mainTable.mapAs({value: {column: 'value', type: 'close'}}); plot.line(mainMapping).name('Portfolio').stroke('2 #1976d2'); var SP500Table = anychart.data.table('date'); var SP500Mapping = SP500Table.mapAs({value: {column: 'value', type: 'close'}}); var SP500Series = plot.line(SP500Mapping).name('S&P 500').stroke('1 #ef6c00'); var DowTable = anychart.data.table('date'); var DowMapping = DowTable.mapAs({value: {column: 'value', type: 'close'}}); var DowSeries = plot.line(DowMapping).name('Dow').stroke('1 #ffa000'); var NasdaqTable = anychart.data.table('date'); var NasdaqMapping = NasdaqTable.mapAs({value: {column: 'value', type: 'close'}}); var NasdaqSeries = plot.line(NasdaqMapping).name('NASDAQ').stroke('1 #ffd54f'); stock.scroller().line(mainMapping); stock.draw(); return {'stock': stock, 'mainTable': mainTable, 'SP500Table': SP500Table, 'DowTable': DowTable, 'NasdaqTable': NasdaqTable, 'SP500': SP500Series, 'Dow': DowSeries, 'NASDAQ': NasdaqSeries}; }
changeStockChart()
function changeStockChart(stockData){ stockData['mainTable'].remove(); var initial_sum = stockData['mainData'][stockData['mainData'].length - 1].value; stockData['mainTable'].addData(stockData['mainData']); stockData['SP500Table'].addData(calculateIndexPrices(stockData['indexesData']['S&P 500'], initial_sum)); stockData['DowTable'].addData(calculateIndexPrices(stockData['indexesData']['Dow'], initial_sum)); stockData['NasdaqTable'].addData(calculateIndexPrices(stockData['indexesData']['NASDAQ'], initial_sum)); }
You can a live sample of this dashboard: Investment Porfolio Management Dashboard.
Source code and data sets are licensed under Apache 2.0 License, AnyChart, Bootstrap, JQuery and Font Awesome have their own respective licenses, be aware of them when deploying your variations of the sample or using these libraries in your projects.
Feel free to contribute or fork this Investment Porfolio Dashboard on Investment Porfolio Dashboard GitHub Repository.


| Teacher | Period | Course | Room |
|---|---|---|---|
| Mrs. Darbyshire | 1 | Chemistry | 243 |
| Mr. Ricks | 2 | Spanish II | 106 | Robert Berg, Mr Hayes | 3 | Web Development | 124 |
| N/A | 4 | Lunch | N/A |
| Mrs. Smith | 5 | Modern U.S. History | 136 |
| Mr. Gagliano | 6 | English II | 253 |
| Mr. Hofman | 7 | Physical Education | N/A |
| Mrs. Matusaitas | 8 | Algebra 1 | 347 |


skybin
Pastebin, Decentralized & Encrypted.
Send this message to
See message received
Powered by Sia Skynet


Every function has access to a "this" variable, which is
nothing more than the object that invoked the function.
Inside the code of
plane.fly()
, this, inside method "fly()" will point to the "plane" variable.
Simple isn't it...
But a lot of good people get lost here!
* Exemple 1
function whois_this(){ console.log(this); }
whois_this();
plane = {}
plane.fly = quem_eh_this;
plane.fly();
//Important lesson:
//Depending on the context, "this" can be something else!!!
//And this is where it gets dangerous
* Let's see a more concrete example...
/
* See the problem?
Some specialists criticize the language because of this behaviour (personally I think they do have a point)
Now, remember that technique to log javascript errors on the server side without repetition?
Let's do it differently.
/
Can you see the size of this mess??
Here's one way to fix this:
/
So, here's the deal:
BE CAREFUL with this. It might not be who you think it is!
I can't event trust "myself"? That's sad! :'(
Bad news, I know...
But hey, there's this thing called AngularJS...
It's really interesting and totally worth it!
It changed how I looked at javascript, because of it I think JS is...
a super so-so languange (which is a huge improvement on my previous opinion)


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/documentation.html ---
We're in VU talking about documentation. Here's a gist containing a preliminary documentation attempt for group_theory/quotient_group
.
https://gist.github.com/kbuzzard/0b5a31f5a362cb32d787bc5059ed4b9d
I think the summaries at the top are useful. On the other hand, I feel like many of the docstrings don't add too much value. Their content can usually be inferred from the name of the declaration, can't it?
@Kevin Buzzard mostly formatting nitpicks, in the summary at the top there is some expressions not wrapped in e.g. φ : G → H, where in the docstrings below the same expression wrapped in φ : G → H
. The main thing of note is that in the first case G and H are going to possibly end up using different fonts for G and H.
The only other thought deals with the References section in the summary, I don't believe i have implemented it yet, but in lumpy it shouldn't be too difficult to enable the footnotes extension, I'd probably do so by changing the comment_format field to comment_format = "cmark+footnotes" or comment_format=["cmark", "footnotes"]. It is a simple addition to implement. The main issue being deciding on whether we should accept the format, and diverse tooling issues e.g. would vscode tooltip's handle it gracefully?
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Join our exclusive community of artistic minds!
When you join CreativeHub, you join a community of artistic lovers who value uniqueness.
Why join?
Get exclusive access to various networking events
Be the first to see fresh new videography, writing, art, ect.!
Meet and chat with your peers, who have similar interest
Network groups are a useful source of strong referrals that can boost your business


Before Change
for p, w in zip(params, weights):
if K.get_value(p).shape != w.shape:
raise Exception("Optimizer weight shape " +
str(K.get_value(p).shape) +
" not compatible with "
"provided weight shape " + str(w.shape))
K.set_value(p, w)
After Change
str(pv.shape) +
" not compatible with "
"provided weight shape " + str(w.shape))
weight_value_tuples.append((p, w))
K.batch_set_value(weight_value_tuples)
def get_weights(self):
"""Returns the current weights of the optimizer,


Action : Set the margins of a printed sheet
This action will allow you to set the margins to print content on the sheet of the printer, a print stream previously created with the action New printing.
Parameters
| Parameters | Descriptions |
|---|---|
| Variable with the stream to print | Must be equal to a variable (not array) whose value is a print stream (the stream has been created and obtained by the action New printing). |
| Margins | Sets the mouse what are the leaf margins. Just move and resize the box in the middle of the representation of the blank page and change the margins. These are displayed at the bottom of the window, in centimeters. |
Return value
No value is returned by this action
Code Visual Basic.Net generated by SoftwareZator
If margins are the following: 1cm left, 2 right, the top 3, 4 to the bottom; the generated code is as follows :
Your_Stream.setMargin(3, 1, 4, 2)
Runtime errors
Sometimes a computer program encounters a problem during execution. Often, an error message is displayed. The table below allows you to determine why the error you encounter appears and how to correct it :
| Errors types | Descriptions | Resolve |
|---|---|---|
| System.MissingMemberException | This error occurs when the action New printing has not been executed, the variable defined in the parameter "Variable with the stream to print", before this action, or that the value of the variable has changed in the meantime. | To correct this error, make sure the action New printing is executed for the same variable as that specified in the parameter "Variable with the stream to print" and the value thereof has not been changed or reset before the execution of the action "Print". |
Characteristic
| Type | Informations |
|---|---|
| Required level | Beginner |
| Category | Printing |
| Type of return value | {Nothing} |
| Works in the functions | Yes |
| Works in reporting zone | No |
| This action may receive children actions | No |


Find the best places to enjoy the products of the sea, grilled or baked or fried, always fresh and delicious.
Check what these great restaurants have to offer when it comes to everything about meat!
Find all the pizza places in town, filter to get the best or closest to your area.
Never tried sushi before? These oriental restaurants will change your mind
Find the best and most popular events of the night. Search for night clubs and pubs to dance, drink and enjoy the music with your friends.
Search for the best places to relax and enjoy a drink, from the most relaxing atmospheres to luxury lounges and piano bars.


| 0x0000 |
- |
Version |
| 0x0004 |
- |
FPS |
| 0x0006 |
- |
Action Frame |
| 0x0008 |
- |
Number of frames per direction |
| 0x000A |
- |
Required shift in the X direction for orientation 0 |
| 0x000C |
- |
Required shift in the X direction for orientation 1 |
| 0x000E |
- |
Required shift in the X direction for orientation 2 |
| 0x0010 |
- |
Required shift in the X direction for orientation 3 |
| 0x0012 |
- |
Required shift in the X direction for orientation 4 |
| 0x0014 |
- |
Required shift in the X direction for orientation 5 |
| 0x0016 |
- |
Required shift in the Y direction for orientation 0 |
| 0x0018 |
- |
Required shift in the Y direction for orientation 1 |
| 0x001A |
- |
Required shift in the Y direction for orientation 2 |
| 0x001C |
- |
Required shift in the Y direction for orientation 3 |
| 0x001E |
- |
Required shift in the Y direction for orientation 4 |
| 0x0020 |
- |
Required shift in the Y direction for orientation 5 |
| 0x0022 |
- |
Memory offset of first frame for direction 0 from beginning of frame area |
| 0x0026 |
- |
Memory offset of first frame for direction 1 from beginning of frame area |
| 0x002A |
- |
Memory offset of first frame for direction 2 from beginning of frame area |
| 0x002E |
- |
Memory offset of first frame for direction 3 from beginning of frame area |
| 0x0032 |
- |
Memory offset of first frame for direction 4 from beginning of frame area |
| 0x0036 |
- |
Memory offset of first frame for direction 5 from beginning of frame area |
| 0x003A |
- |
Size of frame area |
| 0x003E |
- |
FRAME-WIDTH: Width of frame 0 |
| 0x0040 |
- |
FRAME-HEIGHT: Height of frame 0 |
| 0x0042 |
- |
FRAME-SIZE: Number of pixels for frame 0 |
| 0x0046 |
- |
Offset in X direction of frame 0 |
| 0x0048 |
- |
Offset in Y direction of frame 0 |


The top of the learner hierarchy is more conceptual than functional. The different classes distinguish algorithms in such a way that we can automatically determine when an algorithm is not applicable for a problem.
Top-level class for all reinforcement learning algorithms. Any learning algorithm changes a policy (in some way) in order to increase the expected reward/fitness.
Bases: pybrain.rl.learners.learner.Learner
Assumes the task is episodic, not life-long, and therefore does a learning step only after the end of each episode.
Bases: pybrain.rl.learners.learner.EpisodicLearner
A class for learners that learn from a dataset, which has no target output but only a reinforcement signal for each sample. It requires a ReinforcementDataSet object (which provides state-action-reward tuples).
Bases: pybrain.rl.learners.learner.Learner
A Learner determines how to change the adaptive parameters of a module.
Bases: pybrain.rl.learners.learner.Learner
The class of learners that (in contrast to value-based learners) searches directly in policy space.
Bases: pybrain.rl.learners.learner.ExploringLearner, pybrain.rl.learners.learner.DataSetLearner, pybrain.rl.learners.learner.EpisodicLearner
An RL algorithm based on estimating a value-function.
Bases: pybrain.rl.learners.valuebased.valuebased.ValueBasedLearner
Learn on the current dataset, either for many timesteps and even episodes (batchMode = True) or for a single timestep (batchMode = False). Batch mode is possible, because Q-Learning is an off-policy method.
In batchMode, the algorithm goes through all the samples in the history and performs an update on each of them. if batchMode is False, only the last data sample is considered. The user himself has to make sure to keep the dataset consistent with the agent’s history.
Bases: pybrain.rl.learners.valuebased.valuebased.ValueBasedLearner
Q-lambda is a variation of Q-learning that uses an eligibility trace.
Bases: pybrain.rl.learners.valuebased.valuebased.ValueBasedLearner
State-Action-Reward-State-Action (SARSA) algorithm.
In batchMode, the algorithm goes through all the samples in the history and performs an update on each of them. if batchMode is False, only the last data sample is considered. The user himself has to make sure to keep the dataset consistent with the agent’s history.
Bases: pybrain.rl.learners.valuebased.valuebased.ValueBasedLearner
Neuro-fitted Q-learning
Bases: pybrain.rl.learners.directsearch.directsearch.DirectSearchLearner, pybrain.rl.learners.learner.DataSetLearner, pybrain.rl.learners.learner.ExploringLearner
PolicyGradientLearner is a super class for all continuous direct search algorithms that use the log likelihood of the executed action to update the weights. Subclasses are ENAC, GPOMDP, or REINFORCE.
Bases: pybrain.rl.learners.directsearch.policygradient.PolicyGradientLearner
Reinforce is a gradient estimator technique by Williams (see “Simple Statistical Gradient-Following Algorithms for Connectionist Reinforcement Learning”). It uses optimal baselines and calculates the gradient with the log likelihoods of the taken actions.
Bases: pybrain.rl.learners.directsearch.policygradient.PolicyGradientLearner
Episodic Natural Actor-Critic. See J. Peters “Natural Actor-Critic”, 2005. Estimates natural gradient with regression of log likelihoods to rewards.
Note
Black-box optimization algorithms can also be seen as direct-search RL algorithms, but are not included here.


"x" "1" "KAWASAKI,Y, GODA,Y AND YOSHIHIRA,K, THE MUTAGENIC CONSTITUENTS OFRUBIA TINCTORUM, CHEM. PHARM. BULL. 40(6):1504-1509, 1992"


October 10, 2015
Beautiful day for a ride, made all the more exciting by the rafter of turkeys hanging out on a twisty section of RT 106.
Posted in IA/UX by JP Reardon
0 Comments


coniii.enumerate module¶
-
coniii.enumerate.
fast_logsumexp
(X, coeffs=None)¶ Simplified version of logsumexp to do correlation calculation in Ising equation files. Scipy’s logsumexp can be around 10x slower in comparison.
- Xndarray
Terms inside logs.
- coeffsndarray
Factors in front of exponentials.
- float
Value of magnitude of quantity inside log (the sum of exponentials).
- float
Sign.
-
coniii.enumerate.
get_3idx
(n)¶ Get binary 3D matrix with truth values where index values correspond to the index of all possible ijk parameters. We can do this by recognizing that the pattern along each plane in the third dimension is like the upper triangle pattern that just moves up and over by one block each cut lower into the box.
-
coniii.enumerate.
get_nidx
(k, n)¶ Get the kth order indices corresponding to all the states in which k elements are firing up out of n spins. The ordering correspond to that returned by bin_states().
print where(exact.get_3idx(4)) print where(exact.get_nidx(3,4)) <<<<<
-
coniii.enumerate.
get_terms
(subix, prefix, binstate, br, ix0)¶ Spins are put in explicitly
-
coniii.enumerate.
get_terms01
(subix, prefix, binstate, br, ix0)¶ Specific to {0,1}.
-
coniii.enumerate.
get_terms11
(subix, prefix, binstate, br, ix0)¶ Specific to {-1,1}.
-
coniii.enumerate.
mp_fast_logsumexp
(X, coeffs=None)¶ fast_logsumexp for high precision numbers using mpmath.
- Xndarray
Terms inside logs.
- coeffsndarray
Factors in front of exponentials.
- float
Value of magnitude of quantity inside log (the sum of exponentials).
- float
Sign.
-
coniii.enumerate.
pairwise
(n, sym=0, **kwargs)¶ Wrapper for writing pairwise maxent model (Ising) files.
- nint
System size.
- symint, 0
Can be 0 or 1.
**kwargs
None
-
coniii.enumerate.
triplet
(n, sym=0, **kwargs)¶ Wrapper for writing triplet-order maxent model.
- nint
System size.
- symint, 0
Can be 0 or 1.
**kwargs
None
-
coniii.enumerate.
write_eqns
(n, sym, corrTermsIx, suffix='', high_prec=False)¶ Create strings for writing out the equations and then write them to file.
TODO: This code needs some cleanup.
- nint
number of spins
- symint
value of 1 will use {-1,1} formulation, 0 means {0,1}
- corrTermsIxlist of ndarrays
Allows specification of arbitrary correlations to constrain using an index based structure. These should be index arrays as would be returned by np.where that specify which correlations to write down. Each consecutive array should specify a matrix of sequentially increasing dimension. [Nx1, NxN, NxNxN, …]
suffix : str, ‘’ high_prec : bool, False
-
coniii.enumerate.
write_py
(n, sym, contraintTermsIx, signs, expterms, Z, extra='', suffix='', high_prec=False)¶ Write out Ising equations for Python.
- nint
System size.
contraintTermsIx : list of str signs : list of ndarray
Sign for each term in the numerator when computing correlations.
- exptermslist of str
Every single energy term.
- Zstr
Energies for all states that will be put into partition function.
- extrastr, ‘’
any extra lines to add at the end
suffix : str, ‘’ high_prec : bool, False
If True, write version that uses mpmath for high precision calculations.


WEEK 20 THURSDAY
Year 1 (Year 2)
FIRST READING Judges 11:29-39
“Whoever comes forth from the doors of my house to meet me, I will offer him up for a burnt offering.”
A reading from the Book of Judges
In those days: The Spirit of the LORD came upon Jephthah, and he passed
through Gilead and Manasseh, and passed on to Mizpah of Gilead, and from Mizpah
of Gilead he passed on to the Ammonites. And Jephthah made a vow to the LORD,
and said, "If you will give the Ammonites into my hand, then whoever comes
forth from the doors of my house to meet me, when I return victorious from the
Ammonites, shall be the LORD’s, and I will offer him up for a burnt
offering." So Jephthah crossed over to the Ammonites to fight against
them; and the LORD gave them into his hand. And he smote them from Aroer to the
neighborhood of Minnith, twenty cities, and as far as Abel-keramim, with a very
great slaughter. So the Ammonites were subdued before the sons of Israel. Then
Jephthah came to his home at Mizpah; and behold, his daughter came out to meet
him with timbrels and with dances; she was his only child; beside her he had neither
son nor daughter. And when he saw her, he rent his clothes, and said,
"Alas, my daughter! you have brought me very low,
and you have become the cause of great trouble to me; for I have opened my
mouth to the LORD, and I cannot take back my vow." And she said to him,
"My father, if you have opened your mouth to the LORD, do to me according
to what has gone forth from your mouth, now that the LORD has avenged you on
your enemies, on the Ammonites." And she said to her father, "Let this
thing be done for me; let me alone two months, that I may go and wander on the
mountains, and bewail my virginity, I and my companions." And he said,
"Go." And he sent her away for two months; and she departed, she and her companions, and bewailed her virginity upon the mountains.
And at the end of two months, she returned to her father, who did with her
according to his vow which he had made.
The word of the Lord
RESPONSORIAL PSALM Psalm 40:5.7-8a.8b-9.10 (R. see 8a.9a))
R. See, I have come, Lord, to do your will.
Blessed the man who has placed his trust in the LORD, and has not gone
over to the proud who follow false gods.
R. See, I have come, Lord, to do your will.
You delight not in sacrifice and offerings, but in an open ear. You do
not ask for holocaust and victim. Then I said, “See, I have come.”
R. See, I have come, Lord, to do your will.
In the scroll of the book it stands written of me: I delight to do your
will, O my God; your instruction lies deep within me.
R. See, I have come, Lord, to do your will.
Your justice I have proclaimed in the great assembly. My lips I have not
sealed; you know it, O LORD.
R. See, I have come, Lord, to do your will.
FIRST READING Ezekiel 36:23-28
“A new heart I will give you, and a new spirit I will put within you.”
A reading from the Book of the Prophet Ezekiel
Thus says the LORD: I will vindicate the holiness
of my great name, which has been profaned among the nations, and which you have
profaned among them; and the nations will know that I am the LORD, says the
Lord GOD, when through you I vindicate my holiness before their eyes. For I will take you from the nations, and gather you from all the
countries, and bring you into your own land. I will sprinkle clean water
upon you, and you shall be clean from all your uncleannesses, and from all your
idols I will cleanse you. A new heart I will give you,
and a new spirit I will put within you; and I will take out of your flesh the
heart of stone and give you a heart of flesh. And I will put my spirit within
you, and cause you to walk in my statutes and be careful to observe my
ordinances. You shall dwell in the land which I gave to your fathers; and you
shall be my people, and I will be your God.
The word of the Lord
RESPONSORIAL PSALM Psalm 51:12-13.14-15.18-19
R. I will sprinkle clean water on you, and you shall be clean from all your uncleanesses.
Create a pure heart for me, O God; renew a
steadfast spirit within me. Do not cast me away from your presence; take not
your holy spirit from me.
R. I will sprinkle clean water on you, and you shall
be clean from all your uncleanesses.
Restore in me the joy of your salvation; sustain in
me a willing spirit. I will teach transgressors your ways,
that sinners may return to you.
R. I will sprinkle clean water on you, and you shall
be clean from all your uncleanesses.
For in sacrifice you take no delight; burnt offering from me would not
please you. My sacrifice to God, a broken spirit: a broken and humble heart, O
God, you will not spurn.
R. I will sprinkle clean water on you, and you shall
be clean from all your uncleanesses.
R. Alleluia. Today, harden not your hearts, but listen to the voice of the Lord. R. Alleluia.
GOSPEL Matthew 22:1-14
“Invite to the marriage feast as many as you find.”
A reading from the holy Gospel according to Matthew
At that time: Again Jesus spoke to the chief priests and the elders of
the people in parables, saying, "The kingdom of heaven may be compared to
a king who gave a marriage feast for his son, and sent his servants to call
those who were invited to the marriage feast; but they would not come. Again he
sent other servants, saying, 'Tell those who are invited, Behold, I have made
ready my dinner, my oxen and my fat calves are killed, and everything is ready;
come to the marriage feast.' But they made light of it and went off, one to his
farm, another to his business, while the rest seized his servants, treated them
shamefully, and killed them. The king was angry, and he sent his troops and
destroyed those murderers and burned their city. Then he said to his servants,
'The wedding is ready, but those invited were not worthy. Go therefore to the
thoroughfares, and invite to the marriage feast as many as you find.' And those
servants went out into the streets and gathered all whom they found, both bad
and good; so the wedding hall was filled with guests. "But when the king
came in to look at the guests, he saw there a man who had no wedding garment;
and he said to him, 'Friend, how did you get in here without a wedding
garment?' And he was speechless. Then the king said to the attendants, 'Bind
him hand and foot, and cast him into the outer darkness; there men will weep
and gnash their teeth.' For many are called, but few are chosen."
The Gospel of the Lord


This is the index (home) page for "Lesson 1" of Exercise C. It acts as an access point for all pages
related to that lesson. Each folder on a website can have an HTML file named index.htm
(or .html
). The name of this "home page" file depends on the configuration settings of
the web server hosting the site. That file acts as a table of contents and link launching point for other files
in that folder (or other locations if needed). If this page was stored on a website at the web address http://www.host.net/exercise_c/lesson1/index.html
,
most servers would serve up this page even if the user typed only the URL http://www.host.net/exercise_c/lesson1/
leaving off the filename. Note that it is best practice to include the slash following the final folder label (lesson1
in this example) to indicate that it is a folder name. Most servers will allow this slash to be omitted.
The home image at the bottom of this page is nested inside of an HTML anchor element to allow it to server as a
link back to the home page of Exercise C. Notice that there is no border around the image. This is accomplished
by embedding a CSS style declaration in the img tag to supress the border. View the source code for this page
to see this. Also notice the use of the ..
"parent folder" reference used in the href
attribute of the anchor tag to ensure that it links to the home page for Exercise C (in the parent folder)
rather than the home page for the current folder (this file).
Websites often contain many separate related pages.
Often, these are meant to be read in a specific order. So it is helpful to provide links on each page to both
the next and previous page in the sequence. In the case of the example site in this exercise (which contains a
very small sequence of only two lesson pages) this page contains only one link -
to the other (next) lesson. To reach Lesson 2, the relative href would be: ../lesson2/index.html
On that page, you will see an example of a link that returns to this (its previous) page.
The Exercise C Home Page contains a list of links to the other lesson pages on this site. In some cases, a web page might be so long, that it is useful to create named positions within that page that can serve as termination points for links from other pages to allow readers to jump to specific places within the content without having to start at the top of the page and scroll down until the desired content is located. Positions such as these are called "named anchors". This document contains four of them, one located at the position of each h2 element on the page. Examine the source code for the h2 heading for Section 1 and you will see that it contains a named anchor of SEC1 coded using the "name" attribute of an anchor (a) tag. This special type of anchor element serves as the terminal point for a link that was initiated elsewhere. You can find the originating anchor for this link on the index page for Exercise C labeled "Section 1 - Navigation to each lesson".
Examine the source code for the h2 heading for the other sections and you will see that their heading elements have been assigned an "id" attribute instead of using an anchor (a) tag. Both coding methods still work. But the use of the "id" attribute is now the preferred method because its coding is simpler. Regardless of the method used to code the named anchor, the coding of the href attribute within the originating anchor is the same. (See the section links on the index page for Exercise C.)
| Last Revised: 3 February 2017 | © 2017 by Pseudo Student |


{{Infobox prepared food | name = Thenthuk | image = | caption = Thukpa - noodle soup of which Thentuk is a type | alternate_name = | country = Tibet | region = Tibet's autonomous region, Qinghai, Sichuan in PRC | creator = | course = | type = Noodle soup | served = | main_ingredient = Wheat flour, vegetables, meat (mutton or yak) | variations = | calories = | other = }}
Thenthuk ({{bo|t=འཐེན་ཐུག་|w='then thug}}) or hand pulled noodle soup, is a very common noodle soup in Tibetan cuisine, especially in Amdo, Tibet where it is served as dinner and sometimes lunch. The main ingredients are wheat flour dough, mixed vegetables and some pieces of mutton or yak meat. Vegetable thenthuk is a common modern day option too.
Contents |
Making the soup consists of mixing the flour, kneading the dough, chopping the vegetables and meat and boiling the soup.
Start working with the dough when you are sure that everything boiling in the soup is well cooked. Shaping the dough and flattening it and then pulling and cutting it off, all at the same time, right into the boiling soup. As soon as you are finished with the dough, the noodle soup is ready to cool down and be served.
The Nepalese version of Thukpa ({{lang-ne|थुक्पा}}) contains chili powder, masalas, and noodles with gram and pea soup which gives it a hot and spicy flavor. The most typical Nepali thukpa is found in Sankhuwasabha district. However, the thukpa found in Kathmandu Valley is the same as that found in Tibet due to immigrant Tibetan refugees.
{{reflist}}
{{soup-stub}}


Ideation Session 1
Today we met to start ideating design concepts for the first time. Keeping the research we did in mind, we started out by asking ourselves what we might need as a reader and as a journalist.
As a Reader, we might want:
- To share our perspectives. Connect with authors.
- To be able to get news from multiple angles and perspectives from around the globe
- To know what I’m missing
- To see where a piece of content might fall on the spectrum of different viewpoints, to help expose and see where my gaps are.
- To be the actual ‘scene’ where the news was created; the notion of being in-the-moment.
As a Journalist/ Publisher:
- We might want to know what readers want to read? What subjects interest them? what combination of local news and global is needed?
- What to know about who is reading the content?
- A better way for feedback, and communication with readers.
- To be able to capture the actual ‘scene’, content and feeling of the place where news is created.
We discussed the importance of different Perspectives, and brainstormed several ideas about how to visualize this. Readers should be able to find multiple nuanced perspectives on a topic. They could have different level of immersion based upon distance from the device. There could possibly be a way to visualize readers’ consumption biases, and explore related perspectives. We could also show different content headlines or summaries based on the physical orientation of the device, enabling a novel method of interaction.
Lastly, we were not fully convinced about 3D gestures on a mobile phone, though we can see the depth camera in use for recognition and capture.
Concepts
The concepts are constantly evolving, here we present a snapshot of a few of the concepts:
- Flipping phone: Flips point of view on a story when you change the phone’s orientation. Shows only part of the new perspective initially so you can still orient yourself as to what you are reading. Recognizes topics from newspaper articles or what’s being watched on TV, and then pulls other similar article on the phone. Users can tilt the phone to reveal related article but written from a different perspective. It helps discovery, and going wide and deep into a topic, but would not necessarily get us to new topics.
- Visualize how a story has progressed based on the context of user comments
- Parallax interactions and infinite scroll in that a tablet acts more like a roll of paper
- Perspective and scale (zooming in from space, Power of Ten video example)
- 3-way/funhouse mirror metaphor that could show you different perspectives on a story
- Virtual tours that trigger information presentations to the reader based on how they view the tour at certain angles (tilting the device?)
- 3D video
- Visualize where points of view in an article fall in a spectrum
- Virtual product review desk
- Origami is a flexible, half analog, half digital newspaper with tessellations. It is low cost, but a robust and durable device. It tracks the shape of the paper(screen) and displays news according to the orientation and current shape. The shape can be changed by folding and unfolding it at certain locations. The device can be taken home and updated using a mobile phone.
- News stand of the future - big wall where you can view the types of stories people have been viewing while in that location - trend visualization. This might be a communal wall of news.
- Projecting 3D interactive content on a flat surface - uses in-air gestures to manipulate it
From this exercise, we learned that we work best when we can visually communicate our ideas to each other, because it gives us something tangible to build on. It also lets us think about form factors and features. We also discovered that brainstorms don’t always have to be very structured. Sometimes an exercise that you planned to do during brainstorms doesn’t work out the way you wanted it to, and you have to be ready to let it go and try something else. For instance, we started out by thinking about how to come up with concepts around our design question, but didn’t come up with too many concepts, just design principles. These design principles ended up leading us to think about design concepts that might meet those principles, and that ended up being much more productive.


When there are as many choices as there are for things to do in London, it can be hard to know where to start. That's where TailorMade comes in. We find events and activities to suit a range of tastes, and by asking a few simple questions can put together a personalised itinerary. Want a bespoke service, TailorMade just for you? Then get in touch and we can discuss your specific requirements.


Reader
public protocol Reader: Closeable
Reader interface Reader will return next string from the source. Size of the string returned depends on the Reader implementation.
-
Attempts to read string from the Reader.
Returns
Next string from the source. Size of the string is dependent on the implementation of the reader. Return value can be empty string which would mean Reader is waiting for more data to come. Nil when at the end. Multiple reads from the end of the reader will all return nil.Throws
Exception if read error occurs or if the Reader is already closed.Declaration
Swift
func read() throws -> String?
Return Value
Next string from the source. Size of the string is dependent on the implementation of the reader. Return value can be empty string which would mean Reader is waiting for more data to come. Nil when at the end. Multiple reads from the end of the reader will all return nil.
-
readAll(fce:)
Extension methodRead all strings from the Reader and pass it to the inline function.
Parameter
Parameter fce: Closure which accepts part of the string as a parameter.Throws
Exception if read error occurs or if the Reader is already closed.Declaration
Swift
public func readAll(fce: ((String) -> ())) throws
Parameters
fce
Closure which accepts part of the string as a parameter.
-
readAll()
Extension methodRead all from this Reader and return the data as String.
Returns
String with all content the Reader can read.Throws
When reading error occurs.Note
Dangerous, reads all data from the Reader into one single StringDeclaration
Swift
public func readAll() throws -> String
Return Value
String with all content the Reader can read.


Phone+91<PHONE_NUMBER>8
Phone+011252412
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, rds which don't look even slightly believable..


{{ partial "success-stories/category/top.html" . }} {{ partial "success-stories/category/content.html" . }} {{ partial "success-stories/category/bottom.html" . }}


LFP Internet Group, LLC. ("LFP") has created this privacy statement in order to demonstrate our commitment to privacy. The following discloses our information gathering and dissemination practices for the websites operated by us.
IP Addresses: when visitors access our websites, we automatically capture the IP address of the source computer, the referring site and the destination site. We use this information to control access to our websites, and to optimize the presentation of our websites. IP addresses may also be used to help identify users and to gather broad demographic information. We also capture data on which pages have been accessed by visitors, and the frequency with which they are accessed.This information is used to understand our visitors� preferences and to balance the load on our servers.
Cookies: "Cookies" are small files of data that reside on visitors� computers. Cookies allow us to recognize visitors, customize their experience, and offer efficiencies related to login and access. We set a "Session Cookie" upon visitor login to enable them to access multiple domains without having to re-enter login information. Once a user closes their browser, Session Cookies become inactive. We may also set longer-lasting cookies to make login procedures more efficient for returning members. These may contain email addresses or usernames which are encrypted so they can be interpreted only by LFP. From time to time we may share cookie information with third-party partners with whom we have an official relationship. This is done to make the establishment of new accounts more efficient, and to facilitate special offers. Most browsers have settings that enable users to disable cookies on their machines. If cookies are disabled, certain website services or functionality may not function properly.
Third-Party Websites: LFP websites often contain links to websites operated by other companies that are not controlled by LFP. LFP therefore has no responsibility or liability for the policies, activities or content of these sites. Nonetheless, we seek to provide our visitors with a positive experience, so we welcome any feedback about these sites.
Public Forums: websites operated by LFP may contain chat rooms, forums, message boards, and/or news groups. LFP prohibits the posting of illegal or defamatory content in its chat rooms, forums, message boards, and/or news groups, and reserves the right to remove any user-posted content at LFP�s sole discretion. Please remember that any information that is disclosed in these areas becomes public information and you should exercise caution when disclosing personal information.
Financial Information: financial information, such as a credit card number or bank account number, is captured when users place an order or make a purchase. Financial information is used to check the purchaser�s qualifications and to process payment(s) for products and services ordered. Financial data is only captured on web pages that reside on secure servers. Transmission of financial data over the Internet is always fully encrypted. Storage of financial information is only handled by third-party PCI-compliant payment processors. After a transaction, no financial data resides on LFP servers. Financial information is never shared with any parties other than the financial institutions directly involved in processing the transaction.
Personal Information: personal information such as a person�s first name, last name or billing address, is captured when a user places an order or makes a purchase. This information is used to check the purchaser�s qualifications and to process payment(s) for products and services ordered. This information is also used for customer support purposes. We may disclose personal information in response to a subpoena, warrant, court order, levy, attachment, order of a court-appointed receiver or other comparable legal process. We may also disclose personal information in the course of investigating suspected fraud or other illegal activity. Outside of the aforementioned legal processes, personal information is never shared with any parties other than the financial institutions directly involved in processing the transaction.
Customer Information: customer information such as a username, password or email address can be captured when a customer registers on a website, places an order, subscribes to a newsletter, responds to a survey, or otherwise enters information into a form on one of our websites. Customer information is primarily used to manage access to our websites and to communicate with customers when necessary about membership, product, billing or other support-related concerns. We may retain correspondence such as e-mails or faxes for the purpose of customer support reference and improvement. Customer information may also be used to convey company news, administer a contest, conduct a survey, communicate a special offer from a preferred partner, or promote internal programs. All promotional emails contain an easy and automated way to unsubscribe from receiving future emails. Alternatively, recipients can also unsubscribe from receiving future emails by sending a request to<EMAIL_ADDRESS>Consent: by accepting the Terms and Conditions during registration, website visitors expressly consent to the use and disclosure of personal information in the manner described in this Privacy Policy.
Questions: If there are any questions regarding this
privacy policy you may email us at<EMAIL_ADDRESS>or send a letter to:
LFP Internet Group, LLC
8484 Wilshire Blvd Suite #900
Beverly Hills, CA 90211
USA
Version: LFP reserves the right to update its privacy policy at its own discretion. Upon making changes to our privacy policy, we will publish a new "last modified" date below.
This policy was last modified on November 4, 2009.


Previously Recorded Live Shows
March 17th 2017
Topics: All of your awesome projects
Featured Developers: CharleyM, Magykane, Deven, MuteBender
March 16th 2017
Topics: How to build an Akinator in Scratch
Featured Developers: Magykane
March 14th 2017
Topics: How to build 21 in JavaScript
Featured Developers: JohnH, Deven
March 9th 2017
Topics: Building a Chat Bot in Scratch
Featured Developers: CharleyM, Nathaniel
March 7th 2017
Topics: Building a drop down menu
Featured Developers: Teacher Steven
March 2nd 2017
Topics: Scratch powerups
Featured Developers: DevenM12345, LukeScratch18
February 28th 2017
Topics: Black Belt template for services business/ band site.
Featured Developers: Teacher Steven, and you!
February 24th 2017
Topics: Simple CSS tricks for a more sophisticated layout
Featured Developers: CharleyM, AutumnS
February 23rd 2017
Topics: Continuing our platformer in Scratch
Featured Developers: Teacher Steven
February 21st 2017
Topics: Continuing our black belt website
Featured Developers: JohnH
February 16th 2017
Topics: Creating a Menu in Scratch
Featured Developers: Teacher Steven
February 14th 2017
Topics: Editing our slide show and adding a navigation bar.
Featured Developers: Teacher Steven
February 10th 2017
Topics: Creating a slide show with JavaScript
Featured Developers: Ava
February 9th 2017
Topics: Smooth movement in scratch, fixing array cycling, and custom
Featured Developers: Ava, Vishrit, JayC and LoganM
February 7th 2017
Topics: Adding a delay in JavaScript, styling divs
Featured Developers: JayC and CharleyM
February 3rd 2017
Topics: Button fade transition, cookie clicker videos, Pixelmon.
Featured Developers: JayC
February 2nd 2017
Topics: Adding audio, YouTube video size
Featured Developers: Sophie
January 31th 2017
Star Wars Scratch Game
Special Guest Teacher: Mr. Matt
January 27th 2017
Topics: PIXELMON
Featured Builders: CharleyM
January 26th 2017
Topics: Game over screen on scratch, PIXELMON!
Featured Developers: JayC, DavidD
January 24th 2017
Topics: Custom cursor, checking out cool projects, styling input and buttons
Featured Developers: MakotoK, Ava, DavidD, Ioaan
January 20th 2017
Topics: Background-attachment, transparency, min-height
Featured Developers: AmarM, SophiaM
January 19th 2017
Topics: Background-attachment, transparency, min-height
Featured Developers: Maxwell
January 17th 2017
Topics: Boundaries in JS hint, lap runner in Scratch, background-size: cover
Featured Developers: LucasY
January 13th 2017
Topics: Smooth movement in Scratch, background color, for loops
Featured Developers: N/A
January 12th 2017
Topics: Increase size of embedded Scratch game, gifs as background for buttons, text-shadow
Featured Developers: N/A
January 10th 2017
Topics: this.innerHTML example, Scracth black belt example
Featured Developers: N/A


public class FileEncryptor
extends java.lang.Object
Class for encrypting and decrypting files.
| Constructor and Description |
|---|
FileEncryptor()
Constructs a default AES
FileEncryptor instance using a randomly generated key. |
FileEncryptor(Encryptor encryptor)
Constructs a default
FileEncryptor instance using the given Encryptor . |
FileEncryptor(java.security.Key key)
Constructs a default AES
FileEncryptor instance using the given AES key. |
FileEncryptor(java.lang.String password)
Constructs a default AES
FileEncryptor instance using the given password. |
| Modifier and Type | Method and Description |
|---|---|
void |
decrypt(java.io.File src,
java.io.File dest)
Reads and decrypts file
src and writes the decrypted result to file dest . |
void |
encrypt(java.io.File src,
java.io.File dest)
Reads and encrypts file
src and writes the encrypted result to file dest . |
int |
getBufferSize()
Returns the buffer size.
|
Encryptor |
getEncryptor()
Returns the encryptor.
|
static void |
main(java.lang.String[] args) |
void |
setBufferSize(int bufferSize)
Sets the buffer size.
|
public FileEncryptor()
Constructs a default AES FileEncryptor
instance using a randomly generated key. Obtain the key by calling getEncryptor()
and Encryptor.getKey()
.
public FileEncryptor(java.lang.String password)
Constructs a default AES FileEncryptor
instance using the given password.
password
- the password used for encryption/decryptionpublic FileEncryptor(java.security.Key key)
Constructs a default AES FileEncryptor
instance using the given AES key.
key
- the key used for encryption/decryptionpublic FileEncryptor(Encryptor encryptor)
Constructs a default FileEncryptor
instance using the given Encryptor
.
encryptor
- the encryptor used for encryption/decryptionpublic void encrypt(java.io.File src, java.io.File dest) throws java.security.GeneralSecurityException, java.io.IOException
Reads and encrypts file src
and writes the encrypted result to file dest
.
src
- the source filedest
- the destination filesrc
- dest
- java.io.FileNotFoundException
java.security.GeneralSecurityException
java.io.IOException
public void decrypt(java.io.File src, java.io.File dest) throws java.security.GeneralSecurityException, java.io.IOException
Reads and decrypts file src
and writes the decrypted result to file dest
.
src
- the source filedest
- the destination filejava.io.FileNotFoundException
java.security.GeneralSecurityException
java.io.IOException
public Encryptor getEncryptor()
Returns the encryptor.
public int getBufferSize()
Returns the buffer size.
public void setBufferSize(int bufferSize)
Sets the buffer size.
bufferSize
- the buffer sizepublic static void main(java.lang.String[] args)
args
-


- I went to my first conference for work in maybe 3 years, sometime before the pandemic anyway. It was so good to see co-workers, peers and to try to make friends with the crew at the BBC R&D booth across from ours. Lovely mornings in town, too.
- Speaking of work. My work—in line with (I have a lot more feelings on this) the other tech companies— announced layoffs, it was a stressful week.
- I decided to let myself off my post-covid rest plan a few days early for the benefit that being on a train and going somewhere new brings my head and my heart. I went to Whitstable on the Kent coast. It was lovely.
- Traveling solo is fine. Sometimes it's what I need but most of the time it's just fine. I've done it a lot; it's fine.
- I went to Cookham (again, prioritizing mental health over post-covid physical health at the moment) for a country pub roast with a friend. Met their friend and 3 dogs (Bertie, Rufus, Casper). Thank god for pubs.
- I'm reading a great book, the third I've read by Natalia Ginzburg. I love her writing:
"Then Anna asked where justice could be found, if the kingdom of heaven, where it could have been found, did not exist. Giuma said it certainly was a pity not to be able to find it anywhere."
- It's month 5 of what should have been a straightforward two-way chain-free purchase of a flat for me. It's really annoying. So is still paying loads of money to a crappy landlord for a rented flat that drives me nuts in a dozen small ways each day.
- I am so tired of all the Life Admin that's dragging on. This is a bleak post!


"x"
"1" "ISHIDA,F, KONDO,H, FUKUSHIMA,M AND KAMEI,T,MUTAGENIC EVALUATION OFETINTIDINE (BL-5641), A NOVEL HISTAMINE H2-RECEPTOR ANTAGONIST, USING REVERSEMUTATION TESTS IN BACTERIA AND FORWARD MUTATION TESTS IN __ V79 CHINESE HAMSTERCELLS, MUTAT. RES. 188(4):301-306, 1987"


---
layout: post
title: "Getting Sinatra to play with Tomcat, SSL and Client Auth"
date: 2009-02-19
comments: false
---
First off, Sinatra is just brilliant. I needed to make Sinatra work with Tomcat. I used Warbler to actually make sinatra into a WAR.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object yeti.YetiEngine
public class YetiEngine
This class is here to manage how the tests are run. It contains several methods that have have several ways of stopping testing.
| Constructor Summary | |
|---|---|
YetiEngine(YetiStrategy strategy,
YetiTestManager manager)
A constructor for the engine. |
| Method Summary | |
|---|---|
YetiTestManager |
getManager()
Getter for the manager. |
int |
getProgress()
Simple getter for the progress. |
YetiStrategy |
getStrategy()
Getter for the strategy. |
void |
setManager(YetiTestManager manager)
Setter for the manager. |
void |
setProgress(int progress)
A simple setter for the progress variable. |
void |
setStrategy(YetiStrategy strategy)
Setter for the strategy. |
void |
testModuleForNMinutes(YetiModule mod,
int minutes)
Method allowing to test a module for a number of minutes. |
void |
testModuleForNSeconds(YetiModule mod,
int seconds)
Method allowing to test a module for a number of seconds. |
void |
testModuleForNumberOfTests(YetiModule mod,
int number)
Method allowing to test a module for a number of tests. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public YetiEngine(YetiStrategy strategy, YetiTestManager manager)
strategy
- the strategy to use for this testing sessionmanager
- the manager for making calls| Method Detail |
|---|
public int getProgress()
public void setProgress(int progress)
progress
- the value of the progress variable.public void testModuleForNMinutes(YetiModule mod, int minutes)
mod
- the module to testminutes
- the number of minutes to test itpublic void testModuleForNSeconds(YetiModule mod, int seconds)
mod
- the module to testseconds
- the number of seconds to test itpublic void testModuleForNumberOfTests(YetiModule mod, int number)
mod
- the module to testnumber
- the number of tests to makepublic YetiTestManager getManager()
public void setManager(YetiTestManager manager)
manager
- the manager to set.public YetiStrategy getStrategy()
public void setStrategy(YetiStrategy strategy)
strategy
- the strategy to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


The citizens of Byteland want to build N new buildings.
The new buildings will all stand in a line and they will be labeled 1 through N, in order.
The city regulations impose some restrictions on the heights of the new buildings.
You are given the parameters used in these restrictions: two
Given these restrictions, the citizens of Byteland want to build a building that will be as tall as possible. Return the largest possible height some of the N buildings may have.
In this case we are going to build 10 buildings. We have two constraints: the height of building 3 can be at most 1, and the height of building 8 can also be at most 1. The tallest possible new building in this city can have height 3. One optimal skyline looks as follows: {0,1,1,2,3,3,2,1,1,0}.


SYMPHONIC BAND
The Nathan Hale High School Symphonic Band has a long history of musical excellence driven by a commitment to studying and performing the finest wind literature at the highest level. In March of 2011, the group performed at the 10th Annual University of Wisconsin – Milwaukee Concert Band Festival where the received superior ratings. Members of the Symphonic band participate in summer marching band camp, marching band and pep band in addition to formal concerts and WSMA Solo and Ensemble.
WIND SYMPHONY
The Nathan Hale High School Wind Symphony is comprised of students who are interested in developing their musicianship at the high school level. The ensemble consists of mostly Freshmen, however, Sophomores, Juniors and Seniors also comprise this band and several students play a secondary instrument in this class. Members of the Wind Symphony participate in summer marching band camp, marching band and pep band in addition to formal concerts and WSMA Solo and Ensemble.
CONCERT BAND
The Nathan Hale High School Concert Band is comprised of students who are interested in developing their musicianship at the next level. Freshmen, Sophomores, Juniors and Seniors comprise this band and several students play a secondary instrument in this class. Members of the Concert band participate in summer marching band camp, marching band and pep band in addition to formal concerts and WSMA Solo and Ensemble.
“THE MARCHING HUSKIES”
The 2014 "Marching Huskies" will be entertaining the stands with their field show, "The Grammys." Bastille and Daft Punk will be rocking our halftime performances!! Come support the bands at all home football games!
JAZZ ENSEMBLE
The Nathan Hale Jazz Ensemble program is an enrichment activity and course, though it is mostly for saxophone, trumpet, trombone, piano, bass and percussion players. Membership in the Jazz Ensemble is open to all band students wishing to expand their musical backgrounds in this genre. This ensemble will meet every Tuesday and Friday morning from 6:50 a.m. - 7:30 a.m. weekly. The Jazz Ensemble will perform at formal concerts, as well as special activities as the year goes on. These dates will be made available to those performers as soon as they are finalized!
Copyright © 2018 Pat Berard.


32-bit microsecond Alarm component as per TEP102 HAL guidelines. The mica family microsecond Alarm is built on hardware timer 3, and actually runs at CPU frequency / 8. You can use the MeasureClockC.cyclesPerJiffy() command to figure out the exact frequency, or the MeasureClockC.calibrateMicro() command to convert a number of microseconds to the near-microsecond units used by this component.
Upto three of these alarms can be created (one per hardware compare register). Note that creating one of these Alarms consumes a 16-bit microsecond Alarm (see AlarmMicro16C).