In this project, you are asked to implement a general solution to the Towers of Hanoi puzzle. Here are a few things you should learn from this:
As always,
The Towers of Hanoi puzzle is described as follows: there are n disks on one of 3 pegs, with each disk smaller than the one below it. The goal is to move all of the disks from the initial peg to another (distinct) peg of your choice subject to the following rules:
The main goal (for you as a student) is to learn about recursion, and indeed, you can write a recursive solution for this problem with relative ease (maybe 4 - 6 lines, not counting #includes
and the boilerplate stuff in the main()
function). Given that simplicity, one could almost apply a “brute force” attack on this project, just writing down all random 5 line programs that even remotely make sense until one works. Please don’t do that. I want you to really understand the basics of recursion once you are done with this, and be able to trace through every function call that is invoked during the execution of your solution. It might be frustrating, and you might be tempted to look up an answer somewhere, but you must resist the temptation! You have an entire week. Keep thinking about it until you get it. Otherwise, you will learn nothing, it will be a complete waste of time, and it will hurt you in the future.
One of the goals of this project is to teach you something about command line arguments. These are kind of like function parameters, but passed to your entire program from the command line. You have seen this all before. For example, when you invoke something like g++ -c blah.cpp -o blah.o
. The -c blah.cpp
tells g++ to compile blah.cpp
and the -o blah.o
says “put the output in blah.o
”. To make options more readable, a lot of command line utilities also make use of long options, like --version
. These typically (but not always) start with two dashes, and have a more descriptive name. We’ll make use of both for our program.
Parsing the arguments from the command line can be kind of annoying. However, it is an extremely common task, and as such, there’s fortunately an “easy button” for it, called getopt. The getopt and getopt_long functions take most, if not all of the pain out of processing arguments. I’ll leave it to you to read the documentation – I’ve given you skeleton code in towers.cpp
that shows you the basic usage. Here’s a quick summary of the options we’ll implement.
-n,--num-disks
This is the number of disks to use.
-s,--start
This is the starting post.
-e,--end
This is the ending post.
Important: your program should just print the steps of the solution in the following format: <start post><tab><end post><newline>
. Here is an example:
$ ./towers -n 4 -s 1 -e 3
1 2
1 3
2 3
1 2
3 1
3 2
1 2
1 3
2 3
2 1
3 1
2 3
1 2
1 3
2 3
NOTE: Don’t worry so much about all this getopt
stuff. This is of far lesser importance than getting the solution right. It is of course good to know, and this knowledge will serve you well in the future, but don’t let it distract you much – get help quickly via the message board if you are having trouble with this part.
You will probably want to isolate the function that solves the puzzle so that it has a nice recursive breakdown (it would be pretty awkward to make main(...)
recursive). A prototype might take three integers for the inputs, and then just print to cout
. It probably doesn’t need to return a value.
If strange things are entered into your program (e.g., pegs that don’t exist) you can just terminate the program. If people enter strange command line options or leave out values when then need to be specified, then you can just exit the program. It will only be tested on sane inputs.
getopt
The option processing is all done for you, but if you want to understand what happened, here is an explanation.
The loop for processing arguments looks something like the following:
1 2 3 4 5 6 7 8 9 |
|
Some of the options require an argument, e.g. the start post. For such options, a special variable called optarg
, is used to store the argument during the loop. It is defined in getopt.h
, like this:
extern char *optarg;
Note that it is a c-style string, which is just a plain array of characters with a 0-character at the end. You will need to convert this into an integer. One convenient way is the atol
function. You can use it like this:
case 's': // process option s
start = atoi(optarg);
break;
You should be able to test this out with some spare change, or maybe some stray coasters at your home. Alternatively, I gave you a test script, and the output of my program on it. You can run the test script with ./test.sh
, which will produce a file called output
based on your program. My output file is located in soutput
. You can check those against each other if you want. Note: It is possible that a correct answer will have slightly different output, but not likely. Check with me if you are concerned.
If you’re feeling good about your progress and your understanding of recursion, and if you’d like an extra challenge, try this: re-write the algorithm for the Towers of Hanoi problem non-recursively. It really isn’t too hard, but it certainly takes more than 5 lines of code! It might give you some additional appreciation for the power and elegance that recursive algorithms can have. Extra-extra challenge: run some timing tests and make sure that your non-recursive version actually goes faster. This is not entirely trivial, depending on how you came up with your non-recursive solution. Your first correct attempt will likely be slower than the recursive version (especially if you used 1 disk as your base case, rather than letting the recursion run all the way to n = 0).
Turn your assignment in here. A few important notes:
towers.cpp
). If you turn a file with a different name, it will not be graded.


--- layout: page hidePageTitle: true classes: about title: "About Us" ---
Young & old. Techie & financial. Professional & consumer. We are a team with a wide range of experience, condensed into one goal: making investing simple. Based in London, our view of the world and finance is global. We can’t afford to be any other way.
We want to help everyone improve their financial performance. How? By giving you a great research tool. We cut away the complexity and noise that Wall Street masks itself with. Using Stockflare, you can get to the key metrics for any stock, clearly & quickly.
Like you, we are frustrated by the way we save and invest today. We want everyone to realise, they can manage their own money better than leaving it to Wall Street. We want people to discover great new companies & start enjoying how they save & invest.
A #1 Equity Analyst. A 20 year Citigroup veteran and Chartered Financial Analyst. Shane understands that the world of finance is fundamentally broken and is dedicated to disrupting it. Stockflare's heart is empowered with Shane's deep knowledge and dedication to the industry, driven by his passionate belief, that investing is for everyone, not just for the 1%.
A true interface artist at heart. Working at the bleeding edge of the design industry, capable of transforming any concept or idea into a design to be marveled at. Previously at Just Eat, he is now dedicated to disrupting the financial industry; designing effective interfaces, that simplify & visualize complex financial data.
A full-stack developer with a passion for big-data, technology and speed at scale. Provided any technical idea or design, David can make it work. Previously working for numerous startups as well as Just Eat, he knows that technology can make or break a company, and Stockflare will always operate at the bleeding edge because of him.
A passionate, highly-skilled, full-stack developer. With over 30 years of experience in finance, working for UBS, Deutsche Bank and Barclays, he has a deep knowledge of the technological short-sightedness, challenges and problems that plague finance. Working recently for enterprise startups, Mark has what it takes to drive technology forward at Stockflare.


MikroNode
Full-Featured asynchronous Mikrotik API interface for NodeJS.
var MikroNode = require('mikronode');
var connection = MikroNode.getConnection(process.argv[2], process.argv[3], process.argv[4]);
connection.connect(function(conn) {
var chan = conn.openChannel();
conn.closeOnDone = true;
chan.write('/ip/address/print', function() {
chan.closeOnDone = true;
chan.on('done', function(data) {
var parsed = MikroNode.parseItems(data);
parsed.forEach(function(item) {
console.log('Interface/IP: ' + item.interface + "/" + item.address);
});
});
chan.once('trap', function(trap, chan) {
console.log('Command failed: ' + trap);
});
chan.once('error', function(err, chan) {
console.log('Oops: ' + err);
});
});
});
/* Now let's do this with Promises */
var connection = MikroNode.getConnection(process.argv[2], process.argv[3], process.argv[4], {
closeOnDone : true
});
connection.getConnectPromise().then(function(conn) {
conn.getCommandPromise('/ip/address/print').then(function resolved(values) {
console.log('Addreses: ' + JSON.stringify(values));
}, function rejected(reason) {
console.log('Oops: ' + JSON.stringify(reason));
});
});
Installation
Clone this repository into your node_modules directory.
- or -
$ npm install mikronode
Features
- Channel based communication
- Multiple Connections can be used in parallel in the same Node process
- Multiple Channels can be used in parallel on the same Connection
- Synchronous execution of commands issued on the same channel
- Asynchrounous execution of commands issued on different channels
- Focus on high performance
- ES6 Promise support for Connection and Channel
- TLS Support
Upgrading from versions < 1.0.0
There are 2 changes that will need to be made...
var MikroNode = require('mikronode');
// From
var connection = new MikroNode(...)
// To
var connection = MikroNode.getConnection(...)
// or
var connection = new MikroNode.Connection(...)
// From
connection.closeOnDone(true);
channel.closeOnDone(true);
// To
connection.closeOnDone = true;
channel.closeOnDone = true;
Everything else should work as expected.
TODO
- ???
API
See the API JSDocs in the doc directory.
Notes for Node < 4.0.0
MikroNode requires 2 ES6 features that appeared in Node 4.0.0: Promises and WeakMaps. If
you're running an earlier version of Node and MikroNode can't find those symbols, it will
attempt to load them from the 'es6-promise' and 'weakmap' packages respectively. If you wish
to use other packages to supply those symbols, require them before requiring mikronode and
set the global symbols.
global.WeakMap = require('some-weakmap-polyfill').WeakMap;
global.Promise = require('some-promise-polyfill').Promise;
var MikroNode = require('mikronode');
Tests
The test directory contains a test that exercises all functionality including
Promises and listens/cancels.
Examples
Examples (including Promise examples)
Connect to a Mikrotik, and add an address to ether1
var MikroNode = require('mikronode');
var connection = MikroNode.getConnection('<IP_ADDRESS>','admin','password');
connection.closeOnDone = true;
connection.connect(function(conn) {
var chan=conn.openChannel();
chan.closeOnDone = true;
chan.write(['/ip/address/add','=interface=ether1','=address=<IP_ADDRESS>'], function(c) {
c.on('trap',function(data) {
console.log('Error setting IP: '+data);
});
c.on('done',function(data) {
console.log('IP Set.');
});
});
});
Writing the program for the example API conversation on the Mikrotik Wiki
DON'T RUN THIS IF YOU'RE CONNECTED VIA ether1! :)
var MikroNode = require('mikronode');
connection.connect(function(conn) {
conn.closeOnDone = true;
var chan2=conn.openChannel(2);
chan2.write('/interface/listen',function(chan) {
chan.on('read',function(data) {
packet=api.parseItems([data])[0];
console.log('Interface change: '+JSON.stringify(packet));
});
});
var chan3=conn.openChannel(3);
chan3.closeOnDone = true
chan3.write(['/interface/set','=disabled=yes','=.id=ether1'],function(chan) {
chan.on('done',function(d,chan) {
// We do this here, 'cause we want channel 4 to write after channel 3 is done.
var chan4=conn.openChannel(4); // We'll use this later.
chan4.closeOnDone = true;
chan4.write(['/interface/set','=disabled=no','=.id=ether1'],function() {
var chan5=conn.openChannel(5);
chan5.closeOnDone = true;
chan5.write('/interface/getall',function(chan) {
chan.on('done',function(data) {
packets=api.parseItems(data);
packets.forEach(function(packet) {
console.log('Interface: '+JSON.stringify(packet));
});
chan2.close(); // This should call the /cancel command to stop the listen.
});
});
})
});
});
});
Simplifying the above by reducing the number of channels.
DON'T RUN THIS IF YOU'RE CONNECTED VIA ether1! :)
Notice how the callback embedding is not needed using the syncronous capability.
var MikroNode = require('mikronode');
var connection = MikroNode.getConnecion('<IP_ADDRESS>','admin','password');
connection.connect(function(conn) {
conn.closeOnDone = true; // All channels need to complete before the connection will close.
var listenChannel=conn.openChannel();
listenChannel.write('/interface/listen',function(chan) {
chan.on('read',function(data) {
packet=api.parseItems([data])[0];
console.log('Interface change: '+JSON.stringify(packet));
});
});
var actionChannel=conn.openChannel();
// These will run synchronsously
actionChannel.write(['/interface/set','=disabled=yes','=.id=ether1']); // don't care to do anything after it's done.
actionChannel.write(['/interface/set','=disabled=no','=.id=ether1']); // don't care to do anything after it's done.
actionChannel.write('/interface/getall',function(chan) {
chan.on('done',function(data) {
packets=api.parseItems(data);
packets.forEach(function(packet) {
console.log('Interface: '+JSON.stringify(packet));
});
listenChannel.close(); // This should call the /cancel command to stop the listen.
});
});
actionChannel.close(); // The above commands will complete before this is closed.
});
A simple Promise scenario
// If your nodejs installation doesn't have Promise support, uncomment
// the following line
//require('es6-promise').polyfill();
// or globally export Promise from your favorite ES6 compatable Promise library.
var MikroNode = require('mikronode');
var connection = MikroNode.getConnection(process.argv[2], process.argv[3], process.argv[4], {
closeOnDone : true
});
connection.getConnectPromise().then(function(conn) {
conn.getCommandPromise('/ip/address/print').then(function resolved(values) {
console.log('Addreses: ' + JSON.stringify(values));
}, function rejected(reason) {
console.log('Oops: ' + JSON.stringify(reason));
});
});
The methods decodeLength and encodeString were written based on code here on the Mikrotik Wiki.
License
(The MIT License)
Copyright (c) 2011-2015 Brandon Myers<EMAIL_ADDRESS>Copyright (c) 2015 George Joseph<EMAIL_ADDRESS>Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Home
Test Name:
C-130A Inspection
Test Date: 04-11-2018
Test Description: Marietta Museum of History Aviation Wing
Selection Data
Flight Path


MEANING OF D.A.V. (Dayanand Anglo Vedic)
D.A.V. stands for Faith in the eternal values of Vedic Dharam and study of Modern Indian Language, Science and Technology. This means how to live and how to make a living.
MEANING OF ARYA
According to the dictionery Arya Means "Shreshtha" the best but the world is derived from the Ri which means dyanism. It means Arya is one who is dynamic i.e. one who strives for perfection.
In the words of Shri Aurobindo Ghosh "The Arya" is he who strives and overcomes all outside him or within him that is opposed to the human advance in everything. He seeks truth in every thing right and freedom.
DAYANAND ANGLO VEDIC COLLEGE TRUST AND MANAGEMENT SOCIETY
The D.A.V. Movement founded in 1885, is the largest Non-Government Educational organisation int he country, managing over 650 educational institutions.
D.A.V. Institutions have rendered a unique service, in not only dispelling ignorance and illiteracy but also in producing patriots, freedom fighters, social reformers, intellectuals, thinkers, legal luminaries, doctor and engineers, I.T. professionals and others of unparalleled merit, integrity anmd calibre.


UMHealthResearch.org is a web portal that allows people to sign-up for clinical trials. It connects the community of volunteers to the researchers at the University of Michigan. I worked on the design and development of the portal. I was involved with most aspects of the product, including feature design, front-end & back-end development, as well as infrastructure setup.
The portal allows researchers to publish their studies in a searchable format that allows potential volunteers to easily discover them.
UMHealthResearch.org has built in messaging services that connects volunteers and study team members.
Each volunteer has a detail user profile that is used by our recommendation engine to match them with studies. People are only match to studies they are eligible to participate in.
We followed agile development methodologies and split our process into bi-weekly sprints during which we went through full development cycles for each feature that we developed. We started each spring with requirements gathering and design. These steps were followed by development of the features. We then showed our progress to our client and got feedback. Finally, we did an iteration retrospective to discuss what aspect of the spring went well and which ones needed improvement.
The product currently has over 26,000 active users who have shown interest in studies over 100,000 times. Additionally, the portal has over 300 actively recruiting studies. We strive to make recruitment for studies much easier and more effective. We hope that through UMHealthResearch.org we could do our part to push research forward.


View / Edit Medical Record Questions Regarding Patients' Personal Information
View / Edit Medical Record Questions Regarding Patients' Medical History
View / Edit Medical Record Questions Regarding the Patients' Social Surrounding
View / Edit Medical Record Questions Regarding the Patients' Environment
View / Edit Medical Record Questions Regarding the Patients' Family
View / Edit Medical Record Questions Regarding Other Miscellaneous Information


--- layout: error-page title: Offline sitemap: false permalink: 503.html verb: "not found in cache" ---


Strontium used for alloying copper and some of it's alloys, for introduction into accumulated lead alloys, for desulfurization of cast iron, copper and steels.


This is a very basic todo app to show off route states.
Click on one of the topics on the left, and watch both the url and this half of the screen change, without anything else in the dom changing!


@* * Copyright 2010-2013 Artima, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import controllers.Application.scalatestScaladocsPageUrl @import controllers.Application.scaladocsPageUrl @userGuidePage("Snapshots") {
The Snapshots trait provides a snap
method that takes one or more arguments and results in a
SnapshotSeq
, whose toString
lists the names
and values of each argument.
The intended use case of this trait is to help you write debug and log messages that give a "snapshot" of program state. Here's an example:
scala> import Snapshots._ import Snapshots._scala> snap(a, b, c, d, e, f) res3: org.scalactic.SnapshotSeq = a was 1, b was 2, c was 3, d was 4, e was null, f was null
SnapshotSeq
offers a lines
method that places each variable name/value pair on its own line:
scala> snap(a, b, c, d, e, f).lines res4: String = a was 1 b was 2 c was 3 d was 4 e was null f was null
Or, because a SnapshotSeq
is a IndexedSeq[Snapshot]
, you can process it just like any other Seq
, for example:
scala> snap(a, b, c, d, e, f).mkString("Wow! ", ", and ", ". That's so awesome!") res6: String = Wow! a was 1, and b was 2, and c was 3, and d was 4, and e was null, and f was null. That's so awesome!
Next, learn about TimesOnInt.


The Boston Celtics are a professional basketball team based in Boston, Massachusetts. The Celtics compete in the National Basketball Association (NBA) as a member of the league's Eastern Conference Atlantic Division. The franchise's 17 championships are the most of any NBA team, and account for 24.3 percent of all NBA championships since the league's founding in 1946. As a percentage of championships won, the Celtics are the most successful franchise to date in the major four traditional North American professional sports leagues.


| | |
- __builtin__.object
-
- JavawDownload
- __builtin__.str(__builtin__.basestring)
-
- Arch
class Arch(__builtin__.str) |
| | |
- Method resolution order:
- Arch
- __builtin__.str
- __builtin__.basestring
- __builtin__.object
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
Methods inherited from __builtin__.str:
- __add__(...)
- x.__add__(y) <==> x+y
- __contains__(...)
- x.__contains__(y) <==> y in x
- __eq__(...)
- x.__eq__(y) <==> x==y
- __format__(...)
- S.__format__(format_spec) -> string
Return a formatted version of S as described by format_spec.
- __ge__(...)
- x.__ge__(y) <==> x>=y
- __getattribute__(...)
- x.__getattribute__('name') <==> x.name
- __getitem__(...)
- x.__getitem__(y) <==> x[y]
- __getnewargs__(...)
- __getslice__(...)
- x.__getslice__(i, j) <==> x[i:j]
Use of negative indices is not supported.
- __gt__(...)
- x.__gt__(y) <==> x>y
- __hash__(...)
- x.__hash__() <==> hash(x)
- __le__(...)
- x.__le__(y) <==> x<=y
- __len__(...)
- x.__len__() <==> len(x)
- __lt__(...)
- x.__lt__(y) <==> x<y
- __mod__(...)
- x.__mod__(y) <==> x%y
- __mul__(...)
- x.__mul__(n) <==> x*n
- __ne__(...)
- x.__ne__(y) <==> x!=y
- __repr__(...)
- x.__repr__() <==> repr(x)
- __rmod__(...)
- x.__rmod__(y) <==> y%x
- __rmul__(...)
- x.__rmul__(n) <==> n*x
- __sizeof__(...)
- S.__sizeof__() -> size of S in memory, in bytes
- __str__(...)
- x.__str__() <==> str(x)
- capitalize(...)
- S.capitalize() -> string
Return a copy of the string S with only its first character
capitalized.
- center(...)
- S.center(width[, fillchar]) -> string
Return S centered in a string of length width. Padding is
done using the specified fill character (default is a space)
- count(...)
- S.count(sub[, start[, end]]) -> int
Return the number of non-overlapping occurrences of substring sub in
string S[start:end]. Optional arguments start and end are interpreted
as in slice notation.
- decode(...)
- S.decode([encoding[,errors]]) -> object
Decodes S using the codec registered for encoding. encoding defaults
to the default encoding. errors may be given to set a different error
handling scheme. Default is 'strict' meaning that encoding errors raise
a UnicodeDecodeError. Other possible values are 'ignore' and 'replace'
as well as any other name registered with codecs.register_error that is
able to handle UnicodeDecodeErrors.
- encode(...)
- S.encode([encoding[,errors]]) -> object
Encodes S using the codec registered for encoding. encoding defaults
to the default encoding. errors may be given to set a different error
handling scheme. Default is 'strict' meaning that encoding errors raise
a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and
'xmlcharrefreplace' as well as any other name registered with
codecs.register_error that is able to handle UnicodeEncodeErrors.
- endswith(...)
- S.endswith(suffix[, start[, end]]) -> bool
Return True if S ends with the specified suffix, False otherwise.
With optional start, test S beginning at that position.
With optional end, stop comparing S at that position.
suffix can also be a tuple of strings to try.
- expandtabs(...)
- S.expandtabs([tabsize]) -> string
Return a copy of S where all tab characters are expanded using spaces.
If tabsize is not given, a tab size of 8 characters is assumed.
- find(...)
- S.find(sub [,start [,end]]) -> int
Return the lowest index in S where substring sub is found,
such that sub is contained within S[start:end]. Optional
arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- format(...)
- S.format(*args, **kwargs) -> string
Return a formatted version of S, using substitutions from args and kwargs.
The substitutions are identified by braces ('{' and '}').
- index(...)
- S.index(sub [,start [,end]]) -> int
Like S.find() but raise ValueError when the substring is not found.
- isalnum(...)
- S.isalnum() -> bool
Return True if all characters in S are alphanumeric
and there is at least one character in S, False otherwise.
- isalpha(...)
- S.isalpha() -> bool
Return True if all characters in S are alphabetic
and there is at least one character in S, False otherwise.
- isdigit(...)
- S.isdigit() -> bool
Return True if all characters in S are digits
and there is at least one character in S, False otherwise.
- islower(...)
- S.islower() -> bool
Return True if all cased characters in S are lowercase and there is
at least one cased character in S, False otherwise.
- isspace(...)
- S.isspace() -> bool
Return True if all characters in S are whitespace
and there is at least one character in S, False otherwise.
- istitle(...)
- S.istitle() -> bool
Return True if S is a titlecased string and there is at least one
character in S, i.e. uppercase characters may only follow uncased
characters and lowercase characters only cased ones. Return False
otherwise.
- isupper(...)
- S.isupper() -> bool
Return True if all cased characters in S are uppercase and there is
at least one cased character in S, False otherwise.
- join(...)
- S.join(iterable) -> string
Return a string which is the concatenation of the strings in the
iterable. The separator between elements is S.
- ljust(...)
- S.ljust(width[, fillchar]) -> string
Return S left-justified in a string of length width. Padding is
done using the specified fill character (default is a space).
- lower(...)
- S.lower() -> string
Return a copy of the string S converted to lowercase.
- lstrip(...)
- S.lstrip([chars]) -> string or unicode
Return a copy of the string S with leading whitespace removed.
If chars is given and not None, remove characters in chars instead.
If chars is unicode, S will be converted to unicode before stripping
- partition(...)
- S.partition(sep) -> (head, sep, tail)
Search for the separator sep in S, and return the part before it,
the separator itself, and the part after it. If the separator is not
found, return S and two empty strings.
- replace(...)
- S.replace(old, new[, count]) -> string
Return a copy of string S with all occurrences of substring
old replaced by new. If the optional argument count is
given, only the first count occurrences are replaced.
- rfind(...)
- S.rfind(sub [,start [,end]]) -> int
Return the highest index in S where substring sub is found,
such that sub is contained within S[start:end]. Optional
arguments start and end are interpreted as in slice notation.
Return -1 on failure.
- rindex(...)
- S.rindex(sub [,start [,end]]) -> int
Like S.rfind() but raise ValueError when the substring is not found.
- rjust(...)
- S.rjust(width[, fillchar]) -> string
Return S right-justified in a string of length width. Padding is
done using the specified fill character (default is a space)
- rpartition(...)
- S.rpartition(sep) -> (head, sep, tail)
Search for the separator sep in S, starting at the end of S, and return
the part before it, the separator itself, and the part after it. If the
separator is not found, return two empty strings and S.
- rsplit(...)
- S.rsplit([sep [,maxsplit]]) -> list of strings
Return a list of the words in the string S, using sep as the
delimiter string, starting at the end of the string and working
to the front. If maxsplit is given, at most maxsplit splits are
done. If sep is not specified or is None, any whitespace string
is a separator.
- rstrip(...)
- S.rstrip([chars]) -> string or unicode
Return a copy of the string S with trailing whitespace removed.
If chars is given and not None, remove characters in chars instead.
If chars is unicode, S will be converted to unicode before stripping
- split(...)
- S.split([sep [,maxsplit]]) -> list of strings
Return a list of the words in the string S, using sep as the
delimiter string. If maxsplit is given, at most maxsplit
splits are done. If sep is not specified or is None, any
whitespace string is a separator and empty strings are removed
from the result.
- splitlines(...)
- S.splitlines(keepends=False) -> list of strings
Return a list of the lines in S, breaking at line boundaries.
Line breaks are not included in the resulting list unless keepends
is given and true.
- startswith(...)
- S.startswith(prefix[, start[, end]]) -> bool
Return True if S starts with the specified prefix, False otherwise.
With optional start, test S beginning at that position.
With optional end, stop comparing S at that position.
prefix can also be a tuple of strings to try.
- strip(...)
- S.strip([chars]) -> string or unicode
Return a copy of the string S with leading and trailing
whitespace removed.
If chars is given and not None, remove characters in chars instead.
If chars is unicode, S will be converted to unicode before stripping
- swapcase(...)
- S.swapcase() -> string
Return a copy of the string S with uppercase characters
converted to lowercase and vice versa.
- title(...)
- S.title() -> string
Return a titlecased version of S, i.e. words start with uppercase
characters, all remaining cased characters have lowercase.
- translate(...)
- S.translate(table [,deletechars]) -> string
Return a copy of the string S, where all characters occurring
in the optional argument deletechars are removed, and the
remaining characters have been mapped through the given
translation table, which must be a string of length 256 or None.
If the table argument is None, no translation is applied and
the operation simply removes the characters in deletechars.
- upper(...)
- S.upper() -> string
Return a copy of the string S converted to uppercase.
- zfill(...)
- S.zfill(width) -> string
Pad a numeric string S with zeros on the left, to fill a field
of the specified width. The string S is never truncated.
Data and other attributes inherited from __builtin__.str:
- __new__ = <built-in method __new__ of type object>
- T.__new__(S, ...) -> a new object with type S, a subtype of T
|
class JavawDownload(__builtin__.object) |
| |
A download manager for Java for Windows installs. |
| |
Class methods defined here:
- commandsUsedInImplementation(cls) from __builtin__.type
- Return a list to be passed to SystemRequirements.commandsRequired().
This class can be passed to SystemRequirements.commandsRequiredByImplementations().
- now(cls, force=False, dontDownload=False, ticker=True) from __builtin__.type
- Download file or use previously downloaded file.
As implemented uses wget.
That has been a choice of convenience, could be written in Python instead.
force
whether to force downloading even if apparently downloaded already.
May be useful for programmatically updating at times.
dontDownload
whether you don't want to start a download, for some reason.
Return file path.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
Data and other attributes defined here:
- semaphoreExtenstion = '.wait'
| |


Navigation
index
next
|
AGAVE v0.3 documentation
»
Welcome to Agave’s documentation!
¶
Contents:
About AGAVE
Technologies
Publications
Install
Download
Bugs and features
License
Contact
Acknowledgments
AGAVE requirements
Installing AGAVE in Debian/Ubuntu
Install requirements
Installing AGAVE
Creating the databases
Customizing settings
Initializing databases
Using AGAVE
Initializing publications from a dump of Pubmed XML publications
Initializing projects from an external database
Running AGAVE Web application
Generating statistics
Generating global graph analysis
Using AGAVE API
Getting graphs JSON data
Getting graphs Javascript visualizations
API REST for CRUD operations
Next topic
About AGAVE
This Page
Show Source
Quick search
Enter search terms or a module, class or function name.
Navigation
index
next
|
AGAVE v0.3 documentation
»


--- layout: post title: "Boolean catamorphism" description: "The catamorphism for Boolean values is just the common ternary operator." date: 2019-05-06 12:30 UTC tags: [Software Design, Haskell] --- {% include JB/setup %}
{{ page.description }}
This article is part of an article series about catamorphisms. A catamorphism is a universal abstraction that describes how to digest a data structure into a potentially more compact value.
This article presents the catamorphism for Boolean values, as well as how you identify it. The beginning of this article presents the catamorphism in C#, with a simple example. The rest of the article describes how I deduced the catamorphism. That part of the article presents my work in Haskell. Readers not comfortable with Haskell can just read the first part, and consider the rest of the article as an optional appendix.
The catamorphism for Boolean values is the familiar ternary conditional operator:
> DateTime.Now.Day % 2 == 0 ? "Even date" : "Odd date" "Odd date"
Given a Boolean expression, you basically provide two values: one to use in case the Boolean expression is true, and one to use in case it's false.
For Church-encoded Boolean values, the catamorphism looks like this:
T Match<T>(T trueCase, T falseCase);
This is an instance method where you must, again, supply two alternatives. When the instance represents true, you'll get the left-most value trueCase
; otherwise, when the instance represents false, you'll get the right-most value falseCase
.
The catamorphism turns out to be the same as the Church encoding. This seems to be a recurring pattern.
To be accurate, there's more than one catamorphism for Boolean values. It's only by convention that the value corresponding to true goes on the left, and the false value goes to the right. You could flip the arguments, and it would still be a catamorphism. This is, in fact, what Haskell's Data.Bool
module does:
Prelude Data.Bool> bool "Odd date" "Even date" $ even date "Odd date"
The module documentation calls this the "Case analysis for the Bool
type", instead of a catamorphism, but the two representations are isomorphic:
"This is equivalent to if p then y else x
; that is, one can think of it as an if-then-else construct with its arguments reordered."
This is another recurring result. There's typically more than one catamorphism, but the alternatives are isomorphic. In this article series, I'll mostly present the alternative that strikes me as the one you'll encounter most frequently.
In this and future articles, I'll derive the catamorphism from an F-Algebra. For an introduction to F-Algebras and fixed points, I'll refer you to Bartosz Milewski's excellent article on the topic. In it, he presents a generic data type for a fixed point, as well as polymorphic functions for catamorphisms and anamorphisms.  With one small exception, this is just a copy of the code shown there.
While F-Algebras and fixed points are mostly used for recursive data structures, you can also define an F-Algebra for a non-recursive data structure. As data types go, they don't get much simpler than Boolean values, which are just two mutually exclusive cases. In order to make a Functor
out of the definition, though, you can equip it with a carrier type:
data BoolF a = TrueF | FalseF deriving (Show, Eq, Read) instance Functor BoolF where fmap _ TrueF = TrueF fmap _ FalseF = FalseF
The Functor
instance simply ignores the carrier type and just returns TrueF
and FalseF
, respectively. It'd seem that nothing happens, but at the type level, this is still a translation from BoolF a
to BoolF b
. Not much of a function, perhaps, but definitely an endofunctor.
Another note that may be in order here, as well as for all future articles in this series, is that you'll notice that most types and custom functions come with the F
suffix. This is simply a suffix I've added to avoid conflicts with built-in types, values, and functions, such as Bool
, True
, and
, and so on. The F
is for F-Algebra.
You can lift these values into Fix
in order to make it fit with the cata
function:
trueF, falseF :: Fix BoolF trueF = Fix TrueF falseF = Fix FalseF
That's all you need to identify the catamorphism.
At this point, you have two out of three elements of an F-Algebra. You have an endofunctor (BoolF
), and an object a
, but you still need to find a morphism BoolF a -> a
. At first glance, this seems impossible, because neither TrueF
nor FalseF
actually contain a value of the type a
. How, then, can you conjure an a
value out of thin air?
The cata
function has the answer.
What you can do is to start writing the function that will become the catamorphism, basing it on cata
:
boolF = cata alg where alg TrueF = undefined alg FalseF = undefined
While this compiles, with its undefined
implementations, it obviously doesn't do anything useful. I find, however, that it helps me think. How can you return a value of the type a
from the TrueF
case? You could pass an argument to the boolF
function:
boolF x = cata alg where alg TrueF = x alg FalseF = undefined
That seems promising, so do that for the FalseF
case as well:
boolF :: a -> a -> Fix BoolF -> a boolF x y = cata alg where alg TrueF = x alg FalseF = y
This works. Since cata
has the type Functor f => (f a -> a) -> Fix f -> a
, that means that alg
has the type f a -> a
. In the case of BoolF
, the compiler infers that the alg
function has the type BoolF a -> a
, which is just what you need!
The boolF
function identifies the Boolean catamorphism, which is equivalent to representations in the beginning of the article. I called the function boolF
, because there's a tendency in Haskell to name the 'case analysis' or catamorphism after the type, just with a lower-case initial letter.
You can use the boolF
function just like the above ternary operator:
Prelude Boolean Nat> boolF "Even date" "Odd date" $ evenF dateF "Odd date"
Here, I've also used evenF
from the Nat
module shown in the next article in the series.
From the above definition of boolF
, it should also be clear that you can arrive at the alternative catamorphism defined by Data.Bool.bool
by simply flipping x
and y
.
A catamorphism can be used to implement most (if not all) other useful functionality. For Boolean values, that would be the standard Boolean operations and, or, and not:
andF :: Fix BoolF -> Fix BoolF -> Fix BoolF andF x y = boolF y falseF x orF :: Fix BoolF -> Fix BoolF -> Fix BoolF orF x y = boolF trueF y x notF :: Fix BoolF -> Fix BoolF notF = boolF falseF trueF
They work as you'd expect them to work:
Prelude Boolean> andF trueF falseF Fix FalseF Prelude Boolean> orF trueF falseF Fix TrueF Prelude Boolean> orF (notF trueF) falseF Fix FalseF
You can also implement conversion to and from the built-in Bool
type:
toBool :: Fix BoolF -> Bool toBool = boolF True False fromBool :: Bool -> Fix BoolF fromBool = ana coalg where coalg True = TrueF coalg False = FalseF
This demonstrates that Fix BoolF
is isomorphic to Bool
.
The catamorphism for Boolean values is a function, method, or operator akin to the familiar ternary conditional operator. The most common descriptions of catamorphisms that I've found emphasise how a catamorphism is like a fold; an operation you can use to reduce a data structure like a list or a tree to a single value. In that light, it may be surprising that something as simple as Boolean values have an associated catamorphism.
Since Fix BoolF
is isomorphic to Bool
, you may wonder what the point is. Why define this data type, and implement functions like andF
, orF
, and notF
?
The code presented here is nothing but an analysis tool. It's a way to identify the catamorphism for Boolean values.
Next: Peano catamorphism.


Server Config may include a Filter definitions. There are 3 builtin functions:
before( name, url, method, options, order, filterBehaviorClosure ) filterBehaviorClosure( ) returns HttpExchange after(name, url, method, options, order, filterBehaviorClosure) filterBehaviorClosure( HttpExchange, data) returns data or nothing filter(name, url, method, filterBehaviorClosure) filterBehaviorClosure( ) returns nothing
As you can probably guess, before-filters are called before the Route code is called. Similarly, after-filters are called after the Route code is called and has a chance to modify the output produced by the Route.
The filter may choose to: call a different Route, return a response or error, pre/post process the output of the Route processing. A filter may be passive and do nithin more than record activity rather than effect input or output.
| Option | Type | Description. |
|---|---|---|
| PassRouteParams | Boolean | If true, the Route variables will be passed to the filterBehaviorClosure. Default is false. |
| MatchedRoutesOnly | Boolean | If true, the filterBehaviorClosure will ONLY be called when the request path actually matches a resource route or static path. Default is false. |
// Add a filter to intercept and reject letters to 'Lee' before("rejectLee", "/letter/:name", "GET", [(FilterOptions.PassRouteParams): true] ) { name -> if ( name == "Lee") error(403, "Lee not allowed"); else return exchange; }
// Add a filter to capture the response and change its text to uppercase after("upperCaseFilter", "/letter/:name", "GET", [:] ) { exchange, data -> def newData = new String(data).toUpperCase().bytes; return newData; }


load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...
Load...


Check the performance of all your businesses at your leisure with the tap of a button.
Keep your sales targets in check and beat the market with your technological edge.
Keep track of all your business transactions in one place and generate GST compliant details for tax filings.
Get access to Artificial Intelligence and Machine Learning Technology and improving your business performance.
Keep track of where your inventory and make sure everything is in place.
Get help from our team on phone, email and Whatsapp any day of the week.


Serve static site with clack in few lines
Written onWhile working on this blog I've stumbled on a basic need to serve static website from local folder. Though Coleslaw has magical command coleslaw preview
it's good to know how to do it outside of Coleslaw.
There are numerous solutions in any language but we're talking CL here. And it's surprisingly simple:
- Install
clack
withros install clack
- Create
app.lisp
in the target folder with the following content:(lack.app.file:make-app)
- Run
clackup -s lack-middleware-static app.lisp
and enjoy.
To load "lack-middleware-static":
Load 1 ASDF system:
lack-middleware-static
; Loading "lack-middleware-static"
Hunchentoot server is going to start.
Listening on <IP_ADDRESS>:5000.


This project is an attempt to map the communities of tools used by people interviewd by one of my favorite websites: The Setup. Each node on the map represents a tool used by an interviewee from The Setup. Node size is a proxy for each tool's overall popularity. The proximity of these tools to one another is a projection of their affiliation in interviews into a two-dimensional space. Put simply, the more people who use the same tools, the closer those tools will be to one another on the map. Communities are represented by color, and are determined hierarchically based on this proximity. Controls described below.
To learn more about the methodlogy used in this, and to download the code see my Github repository. This map will automatically update daily. Data may take a few seconds to load!
Created by Drew Conway, 2012.


This is web page of our awesome DShop - distributed online shop written in .NET Core!
It uses utility classes for typography and spacing to space content out within the larger container.


Our Church App
Media Timeline
Episode
Title
Media
Description
Image
Icon
Audio
RemoteId
Status
isActive
inId
CreateDate
MediaName
Category
Epoch
AudioSize


wedeb
about
portfolio
contact
Portfolio
Basic-Portfolio
Dice-game
trivia game
Train-sheduler
Psycic game
Moodie
Bamazon
Friend Finder


@GuardedBy
annotations in which the specified guarding field is unknown.
Example:
private Object state;
@GuardedBy("lock") //unknown guard reference
public void bar() {
state = new Object();
}
Supported @GuardedBy
annotations are:
net.jcip.annotations.GuardedBy
javax.annotation.concurrent.GuardedBy
org.apache.http.annotation.GuardedBy
com.android.annotations.concurrency.GuardedBy
androidx.annotation.GuardedBy
com.google.errorprone.annotations.concurrent.GuardedBy


US aviation regulator pledges rigorous certification for Boeing 777X
DUBAI: The U.S. aviation regulator will ensure certification of Boeing's 777X wide-body jet is conducted rigorously, the agency's head said on Wednesday while reaffirming that its review of the grounded 737 MAX will not be rushed.
Problems with a number of aircraft models have led some airlines to accuse plane and engine makers of over-promising on performance capabilities, while the grounding of Boeing's 737 MAX after two fatal crashes has increased scrutiny of testing and certification.
The comments from Steve Dickson, administrator of the U.S. Federal Aviation Administration (FAA), come a day after Emirates - Boeing's largest 777X customer - demanded that the aircraft be tested for at least 16 months to ensure it is safe to fly and meets performance expectations.
"I did meet with Emirates and we had excellent dialogue," he said at the Dubai Airshow when asked if the 777X certification would be tougher in light of recent events.
"Perhaps there will be more emphasis on making sure that the systems, as they evolve, are effectively integrated across the entire product and that we are not looking at issues in a fragmented fashion."
On the continuing review of the 737 MAX, Dickson last week said his team would take "whatever time is needed", having previously pledged a data-driven methodical analysis, review and validation of the systems and pilot training required to safely return the MAX to commercial service.
Dickson reiterated on Wednesday that the FAA is not following any timeline for the model's return to service, adding that time pressure cannot influence the regulatory process.
"We are going to make sure we are very methodical and very diligent. We are not delegating anything," he told reporters at an airshow briefing.
Boeing has said it expects the FAA to issue an order approving the MAX's return to service next month, with pilot training requirements for commercial flights to be granted in January.


A way to optimise game. It provides new concept of how to 'Update' game objects that helps to keep your game's framerate.
To learn how intermediate language programming language works. (Also studied for black-magic in C#)
Implement HTTP protocol, beyond the homework's. Also implemented HTTP2 and WebSocket (partial).
Not a just static file server, seperated with 3 layers (Server(IO), Application, Middleware).


Online Support 24/7
We are availabe 24x7 to hear your valuable feedbacks and complaints.
We are availabe 24x7 to hear your valuable feedbacks and complaints.
If our product is delivered tampered, then we can give your money back and take our product back.
We offer free-delivery PAN India and 15-days return policy.
The evolution of technology and the demand for sustainable innovation is becoming one of the main drivers of revenue growth for businesses across industries. So closely intertwined are the two concepts that today’s sustainability leaders are 4 times more likely to be considered innovation leaders compared to non-sustainability leaders.
But what does “sustainable innovation” mean? In many ways, it means traditional innovation boosted and driven by concern for resources and the environment. It involves leveraging ideas, concepts, and products that achieve economic viability due to environmentally aware designs and practices.
0 Years of Experience In Business
250/- 200/-
Amazing Sustainable Innovation.
Donald Trump
Ex-President, AmericaMere pyaare desh vaasiyo, UNIK ke products sach mein bahut acche hai, khareedo aur Vocal For Local ka Gyaan lo
Narendra Modi
Prime Minister, IndiaAmazing sustainable products
Vladimir Putin
President, RussiaAmazing Sustainable Products
Joe Biden
President, AmericaAmazing out of the box sustainable innovation
Kim Jong Un
Supreme Leader, North KoreaBut what does “sustainable innovation” mean? In many ways, it means traditional innovation boosted and driven by concern for resources and the environment. It involves leveraging ideas, concepts, and products that achieve economic viability due to environmentally aware designs and practices.
ContinueSugarcane, also known as bagasse, is a renewable, fast growing resource that is grown for a number of purposes, like cane juice. Once the juice is extracted, the sugarcane stalk is usually incinerated or discarded. However, these crushed stalks can be saved and made into other items before they get thrown away. We reclaim this material and use it to make our bagasse items.
ContinueMost of our plastic ends up in landfills, our oceans and waterways, and the environment. Plastics do not biodegrade. Instead they slowly break down into smaller pieces of plastic called microplastics. ... Plastic items like bags and straws choke wildlife and block animals' stomachs.
ContinueA small river named Duden flows by their place and supplies it with the necessary regelialia.
Continue


| Trees | Indices | Help |
|---|
|
|
object --+ | RedisBase --+ | MessageHelper
Handles message queries to redis
|
|||
|
|||
|
|||
| Message |
|
||
| Message |
|
||
| int |
|
||
| str |
|
||
|
|||
|
Inherited from Inherited from |
|
|||
|
Inherited from |
|
|||
_QUERY_STRING =
|
|||
__NEXT_MSG_KEY =
|
|
|||
|
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Creates a new message for a user
|
|
Returns the messages for a user within a range. Example: if start_range = 0, end_range = 9 then it returns the first 10 messages ever posted by this user (remember it's len - 1 like arrays)
|
Gets the total messages posted by a user
|
|
Get the next msg id from the db @rtype : int |
| Trees | Indices | Help |
|---|
| Generated by Epydoc 3.0.1 on Sun Dec 15 19:17:25 2013 | http://epydoc.sourceforge.net |


FOOMATIC-GETPJLOPTIONS
Section: Maintenance Commands (8)Updated: 2001-05-07
Index Return to Main Contents
NAME
foomatic-getpjloptions - <put a short description here>SYNOPSIS
foomatic-getpjloptions devicefoomatic-getpjloptions hostname port
DESCRIPTION
foomatic-getpjloptions Sends a set of PJL commands and reads back the PJL options and status from a printer over a network connection or device bidirectional interface such as parallel, USB, serial. printers to standard output. The output can be piped into foomatic-addpjloptions to add options to the database.
Options
- device
-
The interface to which a local printer is connected, e.g. /dev/lp0, /dev/usb/lp0,
/dev/tty00, etc.
For a parallel port,
you must have bidirectional support enabled at the
BIOS level and the parallel port driver must support the bidirectional mode.
Check your parallel port BIOS settings for EPP/bi-directional mode.
- hostname
-
Host name or IP address of a network printer (HP JetDirect, DLINK, etc.).
- port
-
Port on which your network printer listens for socket (Appsocket) connections.
Most common ports are 9100 (JetDirect), 10000 (DLINK). Usually you can configure
the port via a configuration interface.
EXIT STATUS
foomatic-getpjloptions returns ???AUTHOR
Manfred Wassmann<EMAIL_ADDRESS>for the foomatic project using output from the associated binary. Modified by Patrick Powell <papowell at lprng.com> to provide betters support for network printers, error messages, and remove CR and FF from output.WARNINGS
Uni-directional protocols as remote LPD are not supported as no status is returned. Some network print servers which attach to a printer parallel port do not support bidirectional mode.
Index
This document was created by man2html, using the manual pages.
Time: 05:34:25 GMT, December 24, 2015


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface JCoAttributes
Encapsulates a number of attributes of a connection, such as codepage information, system information of the communication partner, and other useful data.
| Method Summary | |
|---|---|
java.lang.String |
getClient()
Retrieves the SAP client from the connection attributes. |
java.lang.String |
getCPICConversationID()
Retrieves the low-level CPIC conversation ID from the connection attributes. |
java.lang.String |
getDestination()
Retrieves the destination name from the connection attributes. |
java.lang.String |
getHost()
Retrieves the host from the connection attributes. |
java.lang.String |
getISOLanguage()
Retrieves the logon language from the connection attributes and returns it as a two-character string. |
java.lang.String |
getKernelRelease()
Retrieves the release of the remote SAP system's kernel. |
java.lang.String |
getLanguage()
Retrieves the logon language from the connection attributes and returns it as a one-character string. |
int |
getOwnBytesPerChar()
Returns the number of bytes per character for the currently used local codepage. |
java.lang.String |
getOwnCharset()
Retrieves the Java charset equivalent of the local SAP codepage. |
java.lang.String |
getOwnCodepage()
Retrieves the local codepage in SAP notation. |
java.lang.String |
getOwnEncoding()
Retrieves the MIME encoding equivalent of the local SAP codepage. |
int |
getPartnerBytesPerChar()
Returns the number of bytes per character for the currently used remote codepage. |
java.lang.String |
getPartnerCharset()
Retrieves the Java charset equivalent of the codepage used by the remote system. |
java.lang.String |
getPartnerCodepage()
Retrieves the codepage used by the remote system in SAP notation. |
java.lang.String |
getPartnerEncoding()
Retrieves the MIME encoding equivalent of the remote SAP codepage. |
java.lang.String |
getPartnerHost()
Retrieves the partner host from the connection attributes. |
java.lang.String |
getPartnerRelease()
Retrieves the release of the remote SAP system. |
int |
getPartnerReleaseNumber()
Returns the release number of the partner system as an integer. |
char |
getPartnerType()
Retrieves the type which specifies the partner of the communication. |
java.lang.String |
getRelease()
Retrieves the release of the local SAP system. |
char |
getRfcRole()
Retrieves the RFC role from the connection attributes. |
java.lang.String |
getSSOTicket()
Retrieves the SSO ticket from the connection attributes. |
java.lang.String |
getSystemID()
Retrieves the SAP system ID from the connection attributes. |
java.lang.String |
getSystemNumber()
Retrieves the SAP system number from the connection attributes. |
boolean |
getTrace()
Retrieves the RFC trace flag from the connection attributes. |
char |
getType()
Retrieves the type which specifies the local system. |
java.lang.String |
getUser()
Retrieves the user ID from the connection attributes. |
| Method Detail |
|---|
java.lang.String getDestination()
java.lang.String getHost()
java.lang.String getPartnerHost()
Note: For load balanced destinations the partner host will only be available, if the corresponding destination is currently in a stateful context and a connection has been established.
java.lang.String getSystemID()
java.lang.String getSystemNumber()
Note: For load balanced destinations the system number will only be available, if the corresponding destination is currently in a stateful context and a connection has been established.
java.lang.String getClient()
java.lang.String getUser()
java.lang.String getLanguage()
java.lang.String getISOLanguage()
java.lang.String getOwnCodepage()
java.lang.String getOwnCharset()
java.lang.String getOwnEncoding()
int getOwnBytesPerChar()
java.lang.String getPartnerCodepage()
java.lang.String getPartnerCharset()
java.lang.String getPartnerEncoding()
int getPartnerBytesPerChar()
java.lang.String getRelease()
java.lang.String getPartnerRelease()
java.lang.String getKernelRelease()
char getPartnerType()
Valid partner types are:
| Value | Description |
|---|---|
| '3' | ABAP system |
| 'E' | External program |
| 'R' | Registered external program |
boolean getTrace()
true
if the RFC trace is enabled;
false
otherwisechar getRfcRole()
Valid role values are:
| Value | Description |
|---|---|
| 'C' | RFC Client |
| 'S' | RFC Server |
'C'
if in client mode or 'S'
if in server modechar getType()
Valid local system types are:
| Value | Description |
|---|---|
| '3' | ABAP system |
| 'E' | External program |
| 'R' | Registered external program |
java.lang.String getCPICConversationID()
Note: The CPIC conversation ID will only be available, if the corresponding destination is currently in a stateful context and a connection has been established.
java.lang.String getSSOTicket()
null
if not setint getPartnerReleaseNumber()
For example:
| Number | Description |
|---|---|
| 0 | unknown |
| 317 | R/3 3.1H |
| 400 | R/3 4.0A |
| 401 | R/3 4.0B |
| 450 | R/3 4.5A |
| 451 | R/3 4.5B |
| 461 | R/3 4.6B |
| 462 | R/3 4.6C |
| 610 | R/3 6.10 |
| 620 | AS ABAP 6.20 |
| 640 | AS ABAP 6.40 |
| 700 | AS ABAP 7.00 |
| 702 | AS ABAP 7.02 |
| 711 | AS ABAP 7.11 |
| 720 | AS ABAP 7.20 |
| 740 | AS ABAP 7.40 |
| 750 | AS ABAP 7.50 |
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Home
(current)
Search
Favorites
all galleries
show selected Gallery
name
id
objects
link
Selected Gallery
show particular item
Particular Item
go back to initial selection


AI lookahead
depth
seconds
Welcome Orange Team! Click and drag a figurine to
play. The AI will move the Blue Team's figurines; use the
controls above to regulate how long or how far ahead it
should think.


Dataset
The COVID19Tracker.ca Dataset is licensed under a Creative Commons Attribution 4.0 International License. In basic terms, this means that anyone is able to share and/or adapt the dataset for any purpose (even commercially), with the condition that appropriate credit is given - see the recommended citation below.
Recommended Citation:
N. Little. COVID-19 Tracker Canada (2020), COVID19Tracker.ca
API
The COVID19Tracker.ca API source code is licensed under an MIT License. In basic terms, this means that anyone is able to share and/or adapt the source code for any purpose (even commercially), with the condition of the inclusion of the license and copyright notice.
Copyright/License Notice:
MIT License
Copyright (c) 2020 Andrew Thong
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Website
The COVID19Tracker.ca website source code is licensed under an MIT License. In basic terms, this means that anyone is able to share and/or adapt the source code for any purpose (even commercially), with the condition of the inclusion of the license and copyright notice.
Copyright/License Notice:
MIT License
Copyright (c) 2020 Noah Little
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


Defined in header boost/generator_iterator.hpp
The generator iterator adaptor makes it easier to create custom input iterators from 0-ary functions and function objects. The adaptor takes a Generator and creates a model of Input Iterator. Each increment retrieves an item from the generator and makes it available to be retrieved by dereferencing. The motivation for this iterator is that some concepts can be more naturally expressed as a generator, while most STL algorithms expect an iterator. An example is the Random Number library.
namespace boost { template <class Generator> class generator_iterator_policies; template <class Generator> class generator_iterator_generator; template <class Generator> typename generator_iterator_generator<Generator>::type make_generator_iterator(Generator & gen); }
The class generator_iterator_generator is a helper class whose purpose is to construct a generator iterator type. The template parameter for this class is the Generator function object type that is being wrapped. The generator iterator adaptor only holds a reference (or pointer) to the function object, therefore the function object must outlive the generator iterator adaptor constructed from it.
template <class Generator> class generator_iterator_generator { public: typedef unspecified type; // the resulting generator iterator type }
| Parameter | Description |
|---|---|
| Generator | The generator (0-ary function object) type being wrapped. The return type of the function must be defined as Generator::result_type. The function object must be a model of Generator. |
The generator iterator class is a model of Input Iterator.
The generator iterator implements the member functions and operators
required of the Input Iterator
concept.
The make_generator_iterator() function provides a convenient way to create generator iterator objects. The function saves the user the trouble of explicitly writing out the iterator types.
template <class Generator> typename generator_iterator_generator<Generator>::type make_generator_iterator(Generator & gen);
The following program shows how generator_iterator
transforms a generator into an input iterator.
#include <iostream> #include <boost/generator_iterator.hpp> class my_generator { public: typedef int result_type; my_generator() : state(0) { } int operator()() { return ++state; } private: int state; }; int main() { my_generator gen; boost::generator_iterator_generator<my_generator>::type it = boost::make_generator_iterator(gen); for(int i = 0; i < 10; ++i, ++it) std::cout << *it << std::endl; }
Revised 05 December, 2006
Copyright © 2001 Jens Maurer
Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)


|
ACTS
Version 1.0.0
|
Wrapper for ESP-IDF SD-Card functions. More...
#include <SDWriter.hpp>
Public Member Functions | |
| SDWriter () | |
| SDWriter constructor. More... | |
| bool | WaitForCard (int timeout) |
| WaitForCard method. More... | |
| SDWriterErrorCodes | InitSDMMC (int retries) |
| InitSDMMC method. More... | |
| void | SetFileName (const char *name) |
| SetFileName method. More... | |
| SDWriterErrorCodes | Open () |
| Open method. More... | |
| SDWriterErrorCodes | Write (SampleData in) |
| Write method. More... | |
| SDWriterErrorCodes | Write (const SampleData *in, int size) |
| Write method. More... | |
| SDWriterErrorCodes | Write (char *data) |
| Write methode. More... | |
| SDWriterErrorCodes | Close () |
| Close method. More... | |
| bool | WriteStatus () |
| WriteStatus method. More... | |
| ~SDWriter () | |
| SDWriter deconstructor. More... | |
Wrapper for ESP-IDF SD-Card functions.
This class handles writing data to the SD card. The transactions are all done in SPI mode. The class uses the built in functions from ESP-IDF to initialize the card, mount the FAT32 lib and write data to the card.
| SDWriter::SDWriter | ( | ) |
SDWriter constructor.
This method initializes all states, variables and GPIO's used in this class.
| SDWriter::~SDWriter | ( | ) |
SDWriter deconstructor.
Empty, not implemented.
| SDWriterErrorCodes SDWriter::Close | ( | ) |
Close method.
This method closes the opened file.
| SDWriterErrorCodes SDWriter::InitSDMMC | ( | int | retries | ) |
InitSDMMC method.
| retries | The retry count for the card init |
This function will call all underlying functions in the ESP-IDF to initialize an SD card in SPI mode and mount the FAT32 library.
| SDWriterErrorCodes SDWriter::Open | ( | ) |
Open method.
This method opens the used file. This must be called before writing data.
| void SDWriter::SetFileName | ( | const char * | name | ) |
SetFileName method.
| name | Char array with name |
Sets the used file for data to be written to.
| bool SDWriter::WaitForCard | ( | int | timeout | ) |
WaitForCard method.
| timeout | in milliseconds |
This method waits for a card to be inserted. If the timeout is reached, false will be returned.
| SDWriterErrorCodes SDWriter::Write | ( | SampleData | in | ) |
Write method.
| in | A single SampleData structure |
This method writes a single SampleData structure to the chosen and opened file.
| SDWriterErrorCodes SDWriter::Write | ( | const SampleData * | in, |
| int | size | ||
| ) |
Write method.
| in | A pointer to a SampleData array |
| The | size of the given array |
This method writes an array of SampleData to the chosen and opened file.
| SDWriterErrorCodes SDWriter::Write | ( | char * | data | ) |
Write methode.
| data | A char array |
This method writes an array of characters to the cosen and opened file.
| bool SDWriter::WriteStatus | ( | ) |
WriteStatus method.
This method returns the current write status.


Username:
Name Of Event:
Date From:
Date To:
Description of Event:
Extra Links/Attachments:
Submit
UserName
Name Of Event
Date From
Date To
Description
Extra


Kanye West Teams W/ JAY-Z’s TIDAL For Live Sunday Service Broadcast
by Biz JonesGrammy-winning rapper Kanye West is staying in the spotlight. The hip-hop veteran has teamed up with streaming giant TIDAL to broadcast this weekend’s Sunday Service event.
On Saturday, TIDAL lit up its social media pages with the huge announcement.
This week, Kanye and rap heavyweight Dr. Dre announced a Jesus Is King follow-up.
Afters its first 7 days, Ye’s gospel-driven Jesus Is King project snagged over 250,000 units.
Kanye West returns to a familiar spot on the Billboard 200 albums chart, as his latest release, Jesus Is King, debuts at No. 1. It’s his record-tying ninth consecutive debut at No. 1, matching Eminem’s still-active streak for the longest in the chart’s history. Jesus Is King was released on Oct. 25 via G.O.O.D. Music/Def Jam Recordings and earned 264,000 equivalent album units in the U.S. in the week ending Oct. 31, according to Nielsen Music. Of that sum, 109,000 were in album sales, while the rest was powered largely by streaming activity. (Billboard)


TurboGears and Pylons are two popular web frameworks; TurboGears hit the scene about a year and a half ago, Pylons started picking up steam maybe six months ago. They are both modern MVC frameworks, targeting a similar style of development. Here's a description of the technical differences:
You'll note there's not a lot of high level philosophical differences. And I don't think I glossed over that -- they just aren't there. The details of their differences are very... detailed. Very technical, very specific, often not particularly intentional. I'd have a hard time describing the technical differences in a meaningful way to someone who didn't already know something about Python web development.
As communities the two frameworks are fairly similar. They both borrow heavily from existing projects, and have spawned projects in their own right. Technically not everything is the same, but the question would be: what are the essential differences, and which differences are just incidental?
For instance, TurboGears is probably easier for a newbie to start with, but it's not because Pylons doesn't want to be easier to start with, there simply hasn't been as much investment in that. And TurboGears has less WSGI support inside the framework, which is not because they don't want to support WSGI in that way, again the investment simply hasn't been made.
Actually "merging" the two is probably unlikely. It's the kind of weird political maneuver that open source projects don't really do, unless they are part of weird "foundations" and have "managers" and stuff like that -- it's too much politics for programmers, and reeks of strategy and plans. You aren't supposed to announce plans for your software, you are supposed to implement your plans and then announce them. If a merge happens, it should be more like a realization than a strategy.
I can also imagine the two bleeding into one another -- where one uses Genshi, the other Mako, one uses object publishing, the other Routes, etc. The differences could become much more shallow. That itself could become difficult -- the differences might be shallow, but the effect on documentation is not much better than if they were two completely different frameworks. And do people float around between communities, or in some middleground, or subscribe to all the lists or... what? Maybe at least by partitioning the communities it can help keep the newbies sufficiently diluted among the experienced users.
Technically the biggest difference is definitely CherryPy vs. Paste. This is something of a sensitive point and has been the source of some discord. The templating language differences are fairly shallow, since both are fairly agnostic anyway. The Javascript differences aren't heavy with intention, they are more coincidental than anything.
So... what should be done? Plans are being made for TurboGears post-1.0 through version 2. The younger Pylons is still a blank slate in many areas. At the moment several people have feet in both communities. Push hard right now, when plans are being made? Let things develop naturally? (Of course, these are people making these decisions, so "natural" should still include discussion -- it's not like we're decided whether to transplant a hydrangea.)
Discuss!
I'll comment on one specific area: object publishing vs. Routes-based dispatching. I built a fairly large web application (together with a couple of other folks) on top of CherryPy, starting before either project really existed. We initially used the native object-publishing dispatch mechanisms of CherryPy. After a year or so, we ported Routes to CherryPy and never looked back.
Object-publishing requires one to structure the code and modules to match the URLs of the application -- that's just silly. The URLs are part of the external interface of an application -- important to users and search engines alike. We found ourselves having to resort to silly importing and naming games to get the URLs that we wanted in all cases. Most importantly though, the Routes pattern encapsulates and abstracts the actual URL from it's use in the application. This allows things like easy changes to the URL-space without touching dozens of files. Pylons or not, Routes is a very useful tool.
I must concur on the dispatching being a pretty major differentiator. I did what David did and used Routes with TurboGears.
But both options seem to suffer from a similar problem - redispatch or delegation of dispatch.
In CherryPy (2, at least), you can't easily include an identifier early in a URL, and then carry on with the methods to perform on the object identified in that URL (ie, /object-type/identifier/verb, or /blogname/archives/year/month/title/edit). You basically have to reimplement the exposure-checking in your code to redispatch to another class/object - you can't just say "restart the dispatch at this point on this class". In Quixote (another object publisher), for example, this is pretty trivial to do.
The current Routes implementation (at least, as far as I can see) seems to expect only one instance of routing too. Django uses a somewhat-similar-to-use routing system, using regexes directly. But it is designed to work by delegation, meaning that the default mode of operation is to have components of sites controlling their own URLs. With Routes, it's possible to pass around the mapping object to do the same thing - I'm doing something like that with plugins in a project I'm working on - but it's cumbersome.
Of course, one of the biggest wins for Routes over the Django dispatcher, the "named routes", might be hard to reconcile with multiple mapping objects. Once you've been bitten by redesigning your URL scheme by using other methods, you'll quickly wonder why nobody thought of the url_for("article", article) construct earlier.
I've not given Pylons a full go yet, but the only major thing I missed was some guidance in terms of existing projects. Perhaps it's a bit of an WSGI thing too - I didn't know where to start shopping for middleware that does SQLAlchemy setup and rollback/commit. Google found me some code, but I'd much prefer to see what other people are using and what they have to say about it. I might have given up too early - unfortunately I didn't have the time. Maybe a TurboGears-esque usage of the Cheese Shop to build a "Usable by WSGI/Pylons" page is what would've helped me get over that little hump.
It's true that CP 2 was not quite flexible in terms for dispatching but CherryPy 3 has fixed that and comes with three builtin dispatchers: URI-to-object as current, HTTP method dispatching and Routes dispatching.
They all provide the same level of features from within CherryPy itself whil offering the flexibility many people were looking for.
Personally in the WSGI world the selector middleware is my favourite dispatcher.
Typically what I think is called "components" in Django would be applications in Pylons. The analogous concept in TurboGears is a little vague; making it clearer was a motivation for using Paste Deploy configuration. Typically applications in Pylons are dispatched to be URL prefix, which is pretty easy to handle recursively. You can also set up a route that consumes a prefix, and leaves the rest in PATH_INFO for further dispatching. Actually doing that further dispatching with Routes is, I believe, non-trivial -- Routes currently is integrated with Pylons in such a way that it doesn't provide a simple WSGI application frontend. I doubt this is difficult to fix, and Ben has mentioned fixing it recently. I haven't generally had a need to do dispatching like that, so I'm a little unclear about the motivation.
Notably, Pylons applications are just WSGI applications, and (especially at the prefix level) can be used fairly opaquely -- that is, you don't have to know it is a Pylons application.
Well, maybe coming to your example, /{blogname}/archives/{year}/{month}/{title}/edit -- I would implement that with my own dispatcher on blogname, that instantiated the next application. I would probably do that as middleware, putting the blog name into the environment and expecting the Pylons application to pick that up. Thus the Pylons application would only implement one blog at a time, but the dispatcher would instantiate the application dynamically, turning that single instance into a farmable blog system.
# Ian Bicking
What do you mean, "Routes currently is integrated with Pylons in such a way that it doesn't provide a simple WSGI application frontend"? What would this look like?
# Mike Orr
Couple comments:
- Despite appearances, TG has almost no integration with MochiKit. We support returning JSON and have a MochiKit widget. That's it. There are others packaged the same way in the Cogbin. With TW, Pylons will have more or less the same support.
- The current plan is to break up TurboGears into pieces and WSGI-fy it using CP3's WSGI mechanisms. At that point I'm expecting it to look pretty much like Pylons but with CherryPy instead of Paste.
I'm amenable to merging the two projects. It'd be much simpler for marketing.
Of course, that's easy for me to say because I have little personal investement in the TG codebase (some work on widgets before Alberto and Michelle took over). I haven't suggested it because I really don't have a good plan for how it would happen. The documentation work for me won't change significantly in either case.
Perhaps this drifts off the topic, but I'm not terribly enthusiastic about any of the basic MVC frameworks, whether they be TG, Pylons, Maypole, Catalyst, or what's-that-obscure-Ruby-one? They all seem to provide little more than some basic abstraction over CGI, and most always depend on CGI-like handling of things like forms. Even where form abstractions are available, there's usually no support for concepts like viewstate (JSF, ASP.NET) conversation (Seam) or flow (Spring, Rife, Aranea). Heck, there isn't really even a similar concept to Stateful Session Beans, we're usually stuck pulling data out of a monolithic session object to restore session state, when we should simply be able to instantiate a new controller instance per session and let the server collect them when they're done.
I'm not saying MVC is "old and busted", since component frameworks invariably boil down to the style anyway, but it pains me to handle state the old fashioned way, by binding request parameters and form fields myself, reading session state myself, and initiating and committing extended transactions, sing along now, by myself.
There are some component frameworks like Prado for PHP (!), but nothing of the sort for Python. It'd be nice to look well beyond Rails, stop disparaging the "enterprisey" frameworks, and start mining them for their actual useful bits.
  HTTP is HTTP.
we should simply be able to instantiate a new controller instance per session and let the server collect them when they're doneWell, you could do this if you were so inclined. You could do something like:
def wsgi_session_app(environ, start_response): session = environ['some_session'] controller = session.get('current_controller') if not controller: controller = session['current_controller'] = make_controller(environ) return controller(environ, start_response)There's not a clear end scope for sessions in Pylons; they just time out eventually. And if you wanted stuff like a usable back button you'd need to start saving the controller at multiple points. All of this assumes that the controller only contains pickleable objects (and for more reasons than just because it may need to be serialized). But so it goes.
it pains me to handle state the old fashioned way, by binding request parameters and form fields myself, reading session state myself, and initiating and committing extended transactions, sing along now, by myself.Then as you do that you should start to write library routines that abstract out your work. I haven't really worked with stuff like viewstate or conversations, but whenever I hear explanations it just sounds so complicated. Maybe I just don't write enough long multipage forms where it would be useful. Nevertheless, though probably more code could be written for this use case, I would be skeptical about solving the problem generally.
# Ian Bicking
Certainly a SFSB (Stateful Session Bean) isn't too hard of an idea to implement by just shoving it in a session myself. Not too scalable, and real EJB containers are a lot smarter about state replication than that, but it would work. But to wax flippant a bit, the entire framework isn't something I couldn't reimplement by myself too once I understand how it works. Yes, some pieces are complicated, and hard to get right, and that's precisely why frameworks are there to make them easy to _use_ so that the end user doesn't have to reinvent it in a buggy way that won't interoperate with anything else.
Viewstate is another of those "evil" things everyone loves to hate about ASP.NET and JSF, but that no one's really come up with a satisfactory alternative for (it's something you can store server-side too, which removes most objections to the hideous clutter it adds to the client side html).
I guess I'm just bemoaning the glut of classic MVC frameworks and the lack of anything else like a Prado or Seam -- let alone a Seaside.
Viewstate is another of those "evil" things everyone loves to hate about ASP.NET and JSF, but that no one's really come up with a satisfactory alternative for (it's something you can store server-side too, which removes most objections to the hideous clutter it adds to the client side html).Maris Fogels has just started playing around with a ViewState helper for Pylons:
# Philip Jenvey
Good article. Linked on the Pylons wiki. The differences really come down to what Ben thinks is cool vs what Kevin thinks is cool, and to their different philosophical emphases. Historically, Kevin wanted "one way to do it" throughout the whole stack for newbies, and he really likes how CherryPy maps URL component directly to a function and query parameters to arguments. Ben seems to focus more on flexibility, thus choosing Routes and Paste, which can be configured in every imaginable way under the sun.
However, practicality is forcing both frameworks to accomodate libraries that weren't originally intended (Buffet for both, SQLAlchemy for TG, ToscaWidgets for Pylons, and presumably Routes for TG). Since users are clamoring for access to the same set of Python libraries in both cases, this is pushing both frameworks toward each other.
Perhaps this shows the biggest mistake of the original TG vision: the days are gone when a developer could impose an arbitrary choice of peripheral libraries on users. To some extent this is because the libraries themselves have been evolving out from under them: Kid has speed problems which are corrected in Genshi, Myghty has too many non-template features which are absent in Mako, SQLAlchemy is more multi-layered than SQLObject. (How's SQLObject 2 coming along, Ian?) All this in one short year. Who knows what next year holds. Another factor is the real world: some users have a large number of existing templates or custom libraries which they can't just rewrite at the drop of a hat.
You're right that nothing is preventing Pylons from becoming more newbie-friendly or TG from becoming more backend-flexible: these areas have just not received much developer attention. They're evolving into KDE vs GNOME: more compatible but still distinct. Perhaps the codebases could be merged at some point, but then what happens to the two APIs? Either one disappears or is frozen, or they both continue to diverge. TG has looked into replacing CherryPy with RhubarbTart (a WSGI compatibility library for CP's dispatching model and global variables). Could a Paste- or Pylons-ified version of RhubarbTart be written that TurboGears could sit on top of?
Comparing CherryPy to Paste (the "sensitive point" link in Ian's original post) is a little unfair. Paste is lower-level than CherryPy and is not aimed at end users (except the hacker sort). Something like RhubarbTart-on-Paste could hide the WSGI dictionary that is so offensive to some people. In spite of Paste's more "cumbersome" and "non-Pythonic" syntax, I found it easier to trace the Paste code: how Pylons launches an application. I tried to do that with CherryPy (as TG uses it) and got totally lost in the thread pool code. Too many layers of do-nothing superclasses, and I couldn't follow a thread's lifetime. That in itself scared me away from CherryPy: I didn't want to depend on code I couldn't understand, especially when I started getting random errors and unhelpful tracebacks from various TG components (this was a year ago, before CherryPy 3).
So if we assume that hiding Paste's "cumbersome" WSGI dict in a super-framework level is acceptable, the incompatibilities come down to the config file format and command-line tools. Making a config format is hard: both TG and (I think) Paste have switched back and forth between INI format and Python format (or the hybrid Python-with-section-headers format). Each has some advantages and disadvantages. I wish I could declare ints and dicts directly in a Pylons config file. But the opposite position sees too many quotes and braces. Perhaps Paste and Pylons could one day support the hybrid format as an alternative. Of course this means type conversions would have to be pushed to a lower level when using Pylons INI format: right now they're done in the application code, and this would fail if the values were already converted. Neither format supports nested sections, if you ever want that.
Both Pylons and TurboGears need a CMS to fully compete with Django and Zope/Plone. This is a big task, and one which both communities could work on and perhaps create a common package both could use. One issue is whether this could be implemented purely as middleware or whether it would have to interact too closely with the application. As middleware it would use the WSGI protocol. As an application-level library it would have to sidestep the differences between TG and Pylons, meaning the frameworks would have to accommodate it either via custom code or a Buffet-like plugin system.
# Mike Orr
TG has looked into replacing CherryPy with RhubarbTart (a WSGI compatibility library for CP's dispatching model and global variables). Could a Paste- or Pylons-ified version of RhubarbTart be written that TurboGears could sit on top of?RhubarbTart is very Pasty (I helped write parts of it, so that was inevitable ;). It also provides a surprisingly good story for CherryPy 2 compatibility -- some of it involves some messy monkeypatching, but it works. (During the sprint at last year's PyCon where we tried to use RhubartTart instead of CherryPy, we tried to avoid changing TurboGears too much, and TurboGears applications at all -- instead extending RhubartTart.)
Some of these hacks could be maintained or ported to Pylons. There are some other differences; for example, RT uses a request object modeled very directly on CP's. However, the Paste/Pylons request object does not require exclusive access to the environment, and multiple request objects with different APIs can coexist. There's also the dispatching system. Right now there's not really alternate dispatching systems for Pylons, but there could be, and RhubarbTart's could be ported over. Especially if you are comfortable depending on @expose (a different implementation than the current TG one with the same interface), that could be a very cleanly implemented alternative to Routes (RhubarbTart uses CherryPy's mechanisms, which rely on a more limited interface than WSGI).
Something like RhubarbTart-on-Paste could hide the WSGI dictionary that is so offensive to some people.paste.wsgiwrappers.WSGIRequest already pretty much does that, so it's fine. They just chose to put of the strawman of the low-level functions in paste.request to argue against.
Making a config format is hard: both TG and (I think) Paste have switched back and forth between INI format and Python format (or the hybrid Python-with-section-headers format). Each has some advantages and disadvantages.Early Paste used Python files for configuration. IMHO this worked quite poorly. Using Python expressions is much more reasonable (which is what CherryPy and TurboGears do), without the full generality of Python statements, conditionals, etc. Generally if you need really complicated configuration, I suspect you are doing your configuration wrong -- configuration should be a deployment concern, not something where you implement complex glue. The glue in a typical Paste applications still goes in Python files (e.g., middleware.py in a Pylons project). If that glue process needs to be informed by configuration values, you have the configuration and can glue stuff together based on that -- but providing a higher-level and domain-specific set of configuration values that effect that.
I wish I could declare ints and dicts directly in a Pylons config file. But the opposite position sees too many quotes and braces. Perhaps Paste and Pylons could one day support the hybrid format as an alternative. Of course this means type conversions would have to be pushed to a lower level when using Pylons INI format: right now they're done in the application code, and this would fail if the values were already converted.At least most Paste-style conversions accept non-string values. It's really that when you do get a string value, you should treat it as though it's a config value. So 'false' is a false value (where in Python it would normally be true, since it is a non-empty string). So if you wanted to build a config format that accepted those values (and still used the Paste Deploy APIs, which are fairly config neutral), it would work. Of course, if you depend on that in your application you will be incompatible with simpler APIs.
It would be very reasonable to build another config file format that used Paste Deploy's APIs, but not its exact config format. Something more path-oriented (that natively supported urlmap) would be quite feasible, for instance.
Neither format supports nested sections, if you ever want that.They both support nested keys, like component.key = value. Paste doesn't specially interpret those values (it's up to the consumer), while CherryPy does. When an application requires more structure in its configuration I usually use expressions in the keys.
Both Pylons and TurboGears need a CMS to fully compete with Django and Zope/Plone. This is a big task, and one which both communities could work on and perhaps create a common package both could use. One issue is whether this could be implemented purely as middleware or whether it would have to interact too closely with the application.A CMS is a very vague thing. It means different things to different people, and any large website feels a lot like a CMS.
I think relying on HTTP, REST, and middleware, you could very possibly make CMS construction easy. For instance, AuthKit could be expanded with a full user system. You could make a pluggable authorization middleware where you could restrict and manage user's access to areas of the site. An event notification system could be constructed where you could notify a central component about the existence or deletion of pages, thus allowing a navigation system to keep track of what's on the website. Things like paste.cascade can be used to fold a CMS in with dynamic applications (like a shopping cart), while programmatically-driven layout (again using the Paste Deploy APIs, but not config format) could allow local "plugins" to be added (like a checkout, forum, etc).
 Focusing on specific problems you want to solve and using some of the concepts of reusability that Paste encourages (like WSGI Framework Components) will build up the pieces you can use later.
# Ian Bicking
By CMS I specifically mean the workflow of one person editing a document over several sessions, others possibly previewing it and correcting it, and then clicking something to make it visible to the public. Enhancements include a rich Javascript editor, talkbacks, gathering articles into magazine issues, adding article metadata, etc. We have the parts for all this, but some users rightly want it to work out of the box, and will skip over TG/Pylons to Plone if they don't have it. Unfortunately Plone is in its own little world and depends on Zope 2, making it more difficult down the road when you want to combine the site with non-Plone tools.
Security is a relatively straightforward problem. Articles have roles (author, editor). There will have to be some map of users to roles ("editor for all articles", "author for this article"). Then the authorization code just has to enforce it.
It's true webservice will grow spread our posibilities. But it makes things more breakable. I'm not sure how to prevent the internet from getting instable...
After many years in the FOSS world, I came to the conclusion that if you want to "merge" 2 projects, the best way is often to split each project into independent components, cut down the dependencies and either merge each pair of subcomponents or make them stick to common API/standards. Pylons and TG are no exception and fortunately this trend is well underway. See the ToscaWidgets as a good example.
# ago
Apparently the two are merging... http://www.oreillynet.com/onlamp/blog/2007/06/python_web_application_framewo.html
# anonymous


Bandi
50 Eyecoins
Games: 200 Wins: 5 K/D: 0.2 DMGPG: 60
20 exp/500
We our Officially in Beta, if you are viewing this right now that means you are one of the few people with early access


Accident Severity Prediction
Home
(current)
Map
Graphs
More Maps
2018 State Wise Rural and Urban Area Accidents
Statewise Black Spots on Highways
Hour wise Accident Rate
Pie Charts
{% block content %} {% endblock %}


Arsenal players have two major reservations about Unai Emery as pressure increases
Arsenal endured another disappointing defeat this weekend to leave them fighting to secure a place in the top four
by Liam Prenderville, http://www.facebook.com/mirrorfootballA number of Arsenal players are believed to have reservations over boss Unai Emery.
Emery has found himself under increasing pressure at the Emirates after this weekend's 2-0 defeat to Leicester .
Mirror Sport reported the Spaniard is not under immediate threat of the sack with the board remaining 100 percent behind the boss.
Arsenal may well have to finish in the top four for Emery to keep his job but there are reportedly concerns from within the dressing room.
The Mail reports there is a real disappointment among players with Emery's conservative approach to matches.
That comes on the back of the defeat at Leicester, with Arsenal playing with a back five, and two holding midfielders.
It is also suggested there is another concern - about Emery's ability to communicate clearly with his players.
The manager is now in his second season at the club but those issues have persisted since he was appointed last summer.
Meanwhile, striker Alexandre Lacazette has admitted the Gunners are low on confidence going into the international break.
“We miss confidence and we need the international break," he said.
"I hope we are going to come back well. We need to work more than we do now to find confidence.
“We are very disappointed, we had chances in the first half. We couldn’t score and you need to take your chances in this type of game.
“We have to work again and keep working everyday. But I think we didn’t play so bad, we just missed our chances in the first half.”


commands tab
Below you can find the list of Twitch Chat commands.
!bal - check balance and karma rate !buy - (ex): !buy beer 6 - purchase an item or event !whatiskarma - explains what the karma system is !purchaselist - gives users a link to the public purchase list !instructions - gives users info on using the mod !modinfo - gives users info about the mod !modsettings - gives user info on how many coins are being earned and global settings !giftcoins - Syntax: !giftcoins @username 100 - give another viewer your coins !buy ticket - join the viewer name queue !mypawnstory - view information about your pawns backstory !mypawnskills - view information about your pawns skills


Not far from Orion the Hunter are the Gemini Twins. The bright star Castor is the head of one twin. And the shining star Pollux is the head of the other.
In Greek myths, Castor and Pollux were the sons of Zeus. They were great warriors who sailed with Jason and the Argonauts aboard their ship the Argo.  The giant challenged the sailors of the Argo to a boxing match. But only Pollux was brave enough to accept the challenge. With skill and speed, Pollux defeated the giant, freeing the Argonauts to set sail again.