The Nanook::Account
class contains methods to discover
publicly-available information about accounts on the nano network.
Initialize this class through the convenient Nanook#account method:
nanook = Nanook.new
account = nanook.account("xrb_...")
Or compose the longhand way like this:
rpc_conn = Nanook::Rpc.new
account = Nanook::Account.new(rpc_conn, "xrb_...")
- B
- D
- E
- H
- I
- L
- N
- P
- R
- W
Source: show
# File lib/nanook/account.rb, line 17 def initialize(rpc, account) @rpc = rpc @account = account end
Returns a Hash containing the account's balance. Units are in raw.
:balance |
Account balance |
:pending |
Amount pending and not yet received by the account |
Example response
{
"balance": "10000",
"pending": "10000"
}
Source: show
# File lib/nanook/account.rb, line 110 def balance account_required! rpc(:account_balance) end
Example response
{
"xrb_13bqhi1cdqq8yb9szneoc38qk899d58i5rcrgdk5mkdm86hekpoez3zxw5sd": "500000000000000000000000000000000000",
"xrb_17k6ug685154an8gri9whhe5kb5z1mf5w6y39gokc1657sh95fegm8ht1zpn": "961647970820730000000000000000000000"
}
Source: show
# File lib/nanook/account.rb, line 27 def delegators account_required! rpc(:delegators)[:delegators] end
Returns a boolean indicating if account is known. Note, the reliability of
the check depends on the node host having synchronized itself with most of
the blocks on the nano network, otherwise you may get a false
false
. You can check if a node's synchronization is
particular low using Nanook::Node#sync_progress.
Example response
true
Source: show
# File lib/nanook/account.rb, line 40 def exists? account_required! response = rpc(:validate_account_number) !response.empty? && response[:valid] == 1 end
Returns an account's history of send and receive payments. Amounts are in raw.
Arguments
limit: |
Integer representing the maximum number of history items to return (default is 1000) |
Example
account.history
account.history(limit: 1)
Example response
[
{
:type=>"send",
:account=>"xrb_1kdc5u48j3hr5r7eof9iao47szqh81ndqgq5e5hrsn1g9a3sa4hkkcotn3uq",
:amount=>200000000000000000000000000000,
:hash=>"2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570"
},
{
:type=>"receive",
:account=>"xrb_1niabkx3gbxit5j5yyqcpas71dkffggbr6zpd3heui8rpoocm5xqbdwq44oh",
:amount=>7836413000000000000000000000000,
:hash=>"16743E8FF52F454E876E68EDD11F23094DCB96795A3B7F32F74F88563ACDDB04"
}
]
Source: show
# File lib/nanook/account.rb, line 74 def history(limit: 1000) account_required! rpc(:account_history, count: limit)[:history] end
Returns a Hash containing the following information about an account:
:frontier |
The latest block hash |
:open_block |
The first block in every account's blockchain. When this block was published the account was officially open |
:representative_block |
The block that named the representative for the account |
:balance |
Amount in raw |
:last_modified |
Unix timestamp |
:block_count |
Number of blocks in the account's blockchain |
When detailed: true
is passed as an argument, this method
makes four additional calls to the RPC to return more information about an
account:
:weight |
See weight |
:pending |
See balance |
:representative |
See representative |
:public_key |
See public_key |
Arguments
detailed: |
Boolean (default is false). When |
Example 1
account.info
Example 1 response
{
:balance=>11439597000000000000000000000000,
:block_count=>4
:frontier=>"2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570",
:modified_timestamp=>1520500357,
:open_block=>"C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9",
:representative_block=>"C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9",
}
Example 2
account.info(detailed: true)
Example 2 response
{
:balance=>11439597000000000000000000000000,
:block_count=>4,
:frontier=>"2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570",
:modified_timestamp=>1520500357,
:open_block=>"C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9",
:pending=>0,
:public_key=>"A82C906460046D230D7D37C6663723DC3EFCECC4B3254EBF45294B66746F4FEF",
:representative=>"xrb_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh",
:representative_block=>"C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9",
:weight=>0
}
Source: show
# File lib/nanook/account.rb, line 171 def info(detailed: false) account_required! response = rpc(:account_info) # Return the response if we don't need any more info return response unless detailed # Otherwise make additional calls response = response.merge({ weight: weight, pending: balance[:pending], representative: representative, public_key: public_key }) # Sort this new hash by keys Hash[response.sort].to_symbolized_hash end
Returns information about the given account as well as other accounts up
the ledger. The number of accounts returned is determined by the
limit:
argument.
The information in each Hash is the same as what the info(detailed: false) method returns.
Arguments
limit: |
Number of accounts to return in the ledger (default is 1) |
Example
ledger(limit: 2)
Example response
{
:xrb_3c3ek3k8135f6e8qtfy8eruk9q3yzmpebes7btzncccdest8ymzhjmnr196j=>{
:frontier=>"2C3C570EA8898443C0FD04A1C385A3E3A8C985AD792635FCDCEBB30ADF6A0570",
:open_block=>"C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9",
:representative_block=>"C82376314C387080A753871A32AD70F4168080C317C5E67356F0A62EB5F34FF9",
:balance=>11439597000000000000000000000000,
:modified_timestamp=>1520500357,
:block_count=>4
},
:xrb_3c3ettq59kijuuad5fnaq35itc9schtr4r7r6rjhmwjbairowzq3wi5ap7h8=>{ ... }
}
Source: show
# File lib/nanook/account.rb, line 218 def ledger(limit: 1) account_required! rpc(:ledger, count: limit)[:accounts] end
Returns information about pending block hashes that are waiting to be received by the account.
The default response is an Array of block hashes. With the
detailed:
argument, the method can return a more complex Hash
containing the amount in raw of the pending
block and the source account that sent it.
Arguments
limit: |
Number of pending blocks to return (default is 1000) |
detailed: |
Boolean to have this method return a more complex Hash of pending block
information (default is |
Example 1
pending
Example 1 response
["000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F"]
Example 2
pending(detailed: true)
Example 2 response
{
"000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F"=>{
"amount"=>"6000000000000000000000000000000",
"source"=>"xrb_3dcfozsmekr1tr9skf1oa5wbgmxt81qepfdnt7zicq5x3hk65fg4fqj58mbr"
}
}
Source: show
# File lib/nanook/account.rb, line 259 def pending(limit: 1000, detailed: false) account_required! args = { count: limit } args[:source] = true if detailed response = rpc(:pending, args)[:blocks] Nanook::Util.coerce_empty_string_to_type(response, (detailed ? Hash : Array)) end
Returns the public key belonging to an account.
Example response
"3068BB1CA04525BB0E416C485FE6A67FD52540227D267CC8B6E8DA958A7FA039"
Source: show
# File lib/nanook/account.rb, line 83 def public_key account_required! rpc(:account_key)[:key] end
Returns a String of the representative account for the account. Representatives are accounts which cast votes in the case of a fork in the network.
Example response
"xrb_3pczxuorp48td8645bs3m6c3xotxd3idskrenmi65rbrga5zmkemzhwkaznh"
Source: show
# File lib/nanook/account.rb, line 95 def representative account_required! rpc(:account_representative)[:representative] end
Returns the account's weight. Weight is determined by the account's balance, and represents the voting weight that account has on the network if it is a representative.
Example response
1
Source: show
# File lib/nanook/account.rb, line 275 def weight account_required! rpc(:account_weight)[:weight] end


Acceptance Testing
Andy Lindeman
Levels of Testing
Roughly speaking...
- Unit Tests
- Integration Tests
- Acceptance Tests
Unit Tests
- Isolation
- Dependencies often mocked or stubbed
- No filesystem, network, database (
Rails "unit" tests)
- Programmer Tests
Unit Test
describe BankAccount do
specify "new accounts have a zero balance" do
account = BankAccount.new
expect(account.balance).to eq(BigDecimal("0.00"))
end
end
Acceptance Test
(Cucumber/Gherkin)
As a depositor
In order to safeguard my money
I want to hold it in a bank account
Given I am a depositor
When I open a new bank account
Then my balance is $0.00
Acceptance Test
Given /I am a depositor/ do
@user = Factory(:depositor)
sign_in(@user)
end
When /I open a new bank account/ do
click_button "New Account"
end
Then /my balance is $([0-9.]+)/ do |bal|
expect(page).to have_text("Balance: $#{bal}")
end
Workflow
(roughly)
- Translate a user story into an acceptance test (or few)
- Watch the acceptance test fail
- Write a failing unit test
- Watch the unit test fail
- Make the unit test pass
- Refactor
- Watch the acceptance test get a bit farther
- Repeat until all tests are passing
- Confidently deliver the feature
Good Practices
In my very humble opinion ...
Seriously, I'm still learning this stuff too
But here's some things I've observed
Hide Implementation Details
Given I am a newsletter publisher
When I send out an electronic newsletter
Then when Resque jobs are run
And after 5 minutes passes
Then the newsletter is received by all recipients
Hide Implementation Details
Given I am a newsletter publisher
When I send out an electronic newsletter
Then all recipients receive my newsletter within 5 minutes
How would your customer talk to others about this feature? How would a salesperson?
Avoid "Programming"
Given I am a user named "Alice"
And there is a user "Bob" who is my friend
And there is a user "Charlie" who is a friend of "Bob"
When "Alice" invites "Bob" to a party
But "Alice" does not invite "Charlie" to the same party
Then "Alice" receives a message
"Do you also want to invite Charlie?"
No customer or user would ever describe the feature like this ...
Avoid "Programming"
As a party planner
In order to have the best party
I want to invite as many fun people as possible
Given that I am planning a party
When I invite my friend Alice
Then I am asked if I might want to invite her friend Bob
Focus
Given I do not yet have an account with bank.example.com
When I register for an account
And I correctly decipher the CAPTCHA image proving
I am a human
And I correctly input the code on my RSA SecurID dongle
And I deposit $20.00
Then my account balance is $20.00
What is this feature really about?
Focus
Given I am a depositor
When I deposit $20.00
Then my account balance is increased by $20.00
Some other features should describe that complicated sign up
process if it is important.
... but not every feature that implicitly requires signing
up.
Use Consistent Terminology
Given I am a user who has forgotten his password
When I request that my password be reset
Then I receive an email with instructions
to replace my passcode
This example is obvious ("password" vs. "passcode") and ("reset"
vs. "replace").
... but others are less so. Multiple terms for the same thing are
confusing for everyone.
... or might be telling you that the feature is not fully
fleshed out yet.
Don't Exhaustively Test Edge Cases
Given I am a depositor
And my account balance is $50.00
When I attempt to withdraw $49.99
Then the transaction is allowed
And my balance is $0.01
Given I am a depositor
And my account balance is $50.00
When I attempt to withdraw $50.01
Then the transaction is not allowed
And my balance remains $50.00
Test many edge cases if they are important, but not as acceptance
tests.
But Why?
This is tedious and nobody but me will ever read these.
Your customers can write them
Your customers can write them
-
They can do this. You may just need to clean up their prose a bit.
-
Now impress them: "the stories you write are being used to
verify I implement features correctly"
-
"... and that these features do not break in the future"
My customer doesn't care
Are you sure?
Have you asked them?
Have they seen good acceptance tests in action?
Seriously, they don't care
Admittedly, that's sad
But what if writing them still had benefits?
Other Benefits
- You as a developer are forced to think as a user
- ... or a business person
- "I need this database table and this model and this controller" vs. "what value is this feature providing?" is hard
- Acceptance tests help formalize that transition
Other Benefits
- One-stop shop for "what does this application do?" in language everyone can read
- New developers
- New project managers
- Salespeople (oh, we have to know what this thing does to make money?
Other Benefits
- Who has tried writing real isolated unit tests?
- It was awesome, right?
- But did you ever run into issues integrating those isolated objects, esp. after refactoring?
- Did you have good higher-level tests?
- ... ones that you trusted and were not brittle?

- Fast unit tests that drive good design, facilitate refactoring and encourage cohesion.
- Slower, end-to-end tests that verify everything fits together properly and provides value to customers.
By the way ...
You can write acceptance tests without Cucumber
RSpec and Capybara
feature "Accounts" do
include AccountSteps
scenario "new accounts start with a zero balance" do
login_as_depositor
open_new_account
balance_should_be("0.00")
end
end
RSpec and Capybara
module AccountSteps
def login_as_depositor
# click_on ...
# fill_in ...
end
def open_new_account
# ...
end
def balance_should_be(balance)
expect(page).to have_text("Balance: $#{balance}")
end
end
Be wary of
feature "Accounts" do
scenario "transferring money between accounts" do
visit root_path
click_on "Login"
fill_in "username", with<EMAIL_ADDRESS>page.execute_script "$('omg_js').hack()"
# ...
end
end
Be wary of
-
Acceptance tests themselves should not change unless the feature itself changed appreciably
-
The code behind may change slightly as the view layer changes


We believe that a proper Cloud Native transformation cannot happen without the right strategies and cultural changes.
Submit your talk proposal today for a chance to join our hybrid conference this fall.
Learn more and apply now! →
Sponsor


Artist: RTypeX
Developer: David.CM
Musicians: Atic2a
Copyright © 2013 - RTypeX, David.CM, Atic2a. All rights reserved.


ELIZABETH (Director: Shekhar Kapur; screenwriter: Michael Hirst; cinematographer: Remi Adefarasin; editor: Jill Bilcock; cast: Cate Blanchett (Elizabeth I), Geoffrey Rush (Sir Francis Walsingham), Christopher Eccleston (Duke of Norfolk), Joseph Fiennes (Lord Robert Dudley, Earl of Leicester), Richard Attenborough (Sir William Cecil), John Gielgud (the Pope), Vincent Cassel (duc d'Anjou), Fanny Ardant (Mary of Guise), Kathy Burke (Queen Mary Tudor), James Frain (Alvaro, Spanish Ambassador), 1998-UK)
Reviewed by Dennis Schwartz
Shekhar Kapur, an outsider from India, who admittedly knew little about Elizabeth when assigned this film, offers his frisky but inaccurate account of the young and fearful Elizabeth Tudor's ascension to the throne, telling only what happened in the first five years of her reign. The director is clearly more concerned with artful flourishes, Elizabeth's lustfulness, and the modern ways to look upon a queen trying to be a ruler of men, rather than exploring further the tragic and specific drama of the times. This one's primarily a costume piece melodrama that enjoyably emphasizes the conspiracies surrounding the so-called Virgin Queen, who is destined to rule England's Golden Age for some 40 years.
The film opens in 1554 on the last days of Bloody Mary's Catholic reign and shows Protestants being burnt at the stake by orders of Mary (played by Burke with spleen). The Protestant Elizabeth (played by Cate Blanchett with ashen face and aplomb) is taken to the Tower. Elizabeth is the half-sister to the barren Mary and is an enemy of hers because of faith. But Mary is soon to be deceased and the crown is Elizabeth's by 1558.
The 25-year-old queen has to watch her back because of many foreign conspiracies afoot,Vatican interference, the country's state of bankruptcy, and the politically loaded marriage proposals from the Spanish and the French. She receives full protection from the worldly and ruthless Sir Francis Walsingham (in an underwritten role for Geoffrey Rush), who will do anything to make sure she survives. One of his best deeds for her, is to catch the powerful Duke of Norfolk (played by Eccleston with proper villainy) in an act of treason, as he conspires with the Vatican to overthrow the heretic Elizabeth, and for his effort to exert his faith on the throne, he will be beheaded.
Elizabeth is full of zest, enjoying herself with her friend and lover Lord Robert Dudley (Fiennes). She actively dances in front of the royal court with Dudley, in a manner that is both shocking and courtly. It was a scene that seemed out of place when compared to the rest of the film, even though it was a striking and memorable scene.
Eventually, Lord Robert becomes a reminder to her of how close she came to danger, as his loyalty to her comes into question.
Elizabeth is a film with a propensity for depicting spacious castles that have dark interiors and characters who have dark intentions. The director takes advantage of that, to take many overhead camera shots that seem to dramatically capture the intrigues taking place, and all the busywork being done by the Queen's attendants and her inept but faithful adviser Sir William Cecil (Attenborough), whose chief advice is for her to marry and become secure through an alliance. What transpires after all the plots against Elizabeth are put down, including the assassination of her rival in Scotland, Mary of Guise (Ardant), is that Elizabeth is transformed from an unsure young girl, trying to rule with a female heart, to someone who has forsaken earthly pleasures to marry her country. She exemplifies someone who has common-sense in ruling the country, and has forever given England one church, the Anglican church of England, which is not beholden to Rome. It could best be said of her, that she grew up when she learned to behave like a queen.
Elizabeth creates a panoramic view of 16th century England and its intrigues. It is a film that does a better job making Elizabeth a vivid characterization, than it does of providing unforgettable dialogue and good storytelling. Cate Blanchett becomes Elizabeth, giving her a modern feminist voice and a dark look inside her soul, in a daring performance that works out rather well, considering the film was emotionally flat and uninvolving.
REVIEWED ON 4/6/2000 GRADE: C+
Dennis Schwartz: "Ozus' World Movie Reviews"
http://www.sover.net/~ozus
<EMAIL_ADDRESS>© ALL RIGHTS RESERVED DENNIS SCHWARTZ
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


KINGKAY PROPERTIES LTD.
Home
Profile
Housing
Lands
Contact Address
Logout
Properties Information
Customer Information
Staff Details
Sales Agent Page
Name:
Phone Num:
Address:
Property Information:
Property:
Land
PPSM:
500
SOP:
Sub Total:(₦)
0
Grand Total:(₦)
0
Property:
Land
PPSM:
500
SOP:
Sub Total:(₦)
0
Grand Total:(₦)
0
click to Pay
complete order


Pet Spot
Home
Accessories Products
Pet Shop
Pet Guides
About Us
Checkout
Full Name
Address
Phone Number
Add a review
Remove
Type
Price
Picture


Individuals who made purchase once in 9 months
Last purchase in 3 months
Last purchase in 9 months
Last purchase in 12 months
Last purchase more than a year ago
Never purchased
Internet usage


CSL_UdmapTR15 specifies a Type 15 Transfer Request. More...
#include <csl_udmap_tr.h>
Data Fields | |
| uint32_t | flags |
| uint16_t | icnt0 |
| uint16_t | icnt1 |
| uint64_t | addr |
| int32_t | dim1 |
| uint16_t | icnt2 |
| uint16_t | icnt3 |
| int32_t | dim2 |
| int32_t | dim3 |
| uint32_t | fmtflags |
| int32_t | ddim1 |
| uint64_t | daddr |
| int32_t | ddim2 |
| int32_t | ddim3 |
| uint16_t | dicnt0 |
| uint16_t | dicnt1 |
| uint16_t | dicnt2 |
| uint16_t | dicnt3 |
CSL_UdmapTR15 specifies a Type 15 Transfer Request.
| uint64_t CSL_UdmapTR15_t::addr |
Starting address for the source data or destination data if it is a half duplex write
| uint64_t CSL_UdmapTR15_t::daddr |
Starting address for the destination of the data
| int32_t CSL_UdmapTR15_t::ddim1 |
Signed dimension for loop level 1 for the destination data
| int32_t CSL_UdmapTR15_t::ddim2 |
Signed dimension for loop level 2 for the destination data
| int32_t CSL_UdmapTR15_t::ddim3 |
Signed dimension for loop level 3 for the destination data
| uint16_t CSL_UdmapTR15_t::dicnt0 |
Total loop iteration count for level 0 (innermost) used for destination
| uint16_t CSL_UdmapTR15_t::dicnt1 |
Total loop iteration count for level 1 used for destination
| uint16_t CSL_UdmapTR15_t::dicnt2 |
Total loop iteration count for level 2 used for destination
| uint16_t CSL_UdmapTR15_t::dicnt3 |
Total loop iteration count for level 3 used for destination
| int32_t CSL_UdmapTR15_t::dim1 |
Signed dimension for loop level 1 for the source data
| int32_t CSL_UdmapTR15_t::dim2 |
Signed dimension for loop level 2
| int32_t CSL_UdmapTR15_t::dim3 |
Signed dimension for loop level 3
| uint32_t CSL_UdmapTR15_t::flags |
Specifies type of TR and how the TR should be handled. It also supports the TR triggering and output events.
| uint32_t CSL_UdmapTR15_t::fmtflags |
Tells how the data is formatted either between the input and the output or if the data should use different addressing schemes or sizes
| uint16_t CSL_UdmapTR15_t::icnt0 |
Total loop iteration count for level 0 (innermost)
| uint16_t CSL_UdmapTR15_t::icnt1 |
Total loop iteration count for level 1
| uint16_t CSL_UdmapTR15_t::icnt2 |
Total loop iteration count for level 2
| uint16_t CSL_UdmapTR15_t::icnt3 |
Total loop iteration count for level 3 (outermost)


Kristopher Parchen
My name is Kristopher Parchen and although you see the Tokyo Tower behind me, I am a Los Angeles based web developer. I am highly driven professional with a broad knowledge and understanding in a various computer technologies from Computer-Aided Draft to Web Development. I am an experienced leader, who enjoys seeing the success of my projects from conception to execution. I am excited and motivated in developing new skills and learning the latest technologies. Currently I am working to enhance and improve my Credit Rewards Cheatsheet single-page application using React/Redux to create a responsive user experience. Feel free to test it out and let me know what you think. I think you might find it useful.
©2017 Kristopher Parchen. All rights reserved.


BREAKING Tom Watson to stand down as an MP and deputy leader of Labour Party
We'll be bringing you the very latest updates, pictures and video on this breaking news story
by Tom Davidson, https://www.mirror.co.uk/authors/tom-davidson/Tom Watson has announced this evening that he is to stand down as an MP and is quitting politics.
We'll be bringing you the very latest updates, pictures and video on this breaking news story.
Please check back regularly for updates on this developing story here at Mirror.co.uk.
For the latest news and breaking news visit Mirror.co.uk/news.
Get all the big headlines, pictures, analysis, opinion and video on the stories that matter to you.
Follow us on Twitter @DailyMirror - the official Daily Mirror & Mirror Online Twitter account - real news in real time.
We're also on Facebook /dailymirror - your must-see news, features, videos and pictures throughout the day from the Daily Mirror, Sunday Mirror and Mirror Online.


2016
This was a take home test as part of the interview process for the company I worked for until April 2017. The goal was to build a network map using the Google Maps API, and to access it using only my own code (no jQuery plugins). Needed to drop a pin in the the various data server point-of-presences (POPs), draw lines to connect them, and calculate and display their distances. When the user inputs a client address and selects a destination server, a pin should appear at the client address, with a line between it and the nearest server. The program should then calculate the shortest distance between that server and the final destination server and draw a path through the relevant connected servers. Implemented Dijkstra shortest distance algorithm. Click on map to try it out.
2015
First foray into javascript and requestAnimationFrame land. A simple javascript/html game completed in Phase 0 of Dev Bootcamp. First attempt at collision detection. Originally had it so the cheese moved as well, but resulted in choppy, unrealistic movement. Canvas resizes dynamically. Click image to play.
2015
My brother's idea. A mobile-friendly Rails & jQuery app with the idea to incorporate Google Adsense at some point. Clicking on the cat image brings up a new random cat pic, and users can share via Facebook or Twitter an image of their favorite cat. Most challenging part was hacking around Facebook's Share functionality. It typically only allows you to share a single image for a given website, but we wanted users to be able to share an image of their favorite particular cat. Got it to work after some tinkering. Rails, Javascript, jQuery, HTML, CSS. Click image to go to site.


|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use RDFList | |
|---|---|
| com.hp.hpl.jena.ontology | Provides a set of abstractions and convenience classes for accessing and manipluating ontologies represented in RDF. |
| com.hp.hpl.jena.rdf.model | A package for creating and manipulating RDF graphs. |
| Uses of RDFList in com.hp.hpl.jena.ontology |
|---|
| Methods in com.hp.hpl.jena.ontology that return RDFList | |
|---|---|
RDFList |
AllDifferent.getDistinctMembers()
Answer the list of distinct members for this AllDifferent declaration. |
RDFList |
EnumeratedClass.getOneOf()
Answer a list of individuals that defines the extension of this class. |
RDFList |
DataRange.getOneOf()
Answer a list of literals that defines the extension of this datarange. |
RDFList |
BooleanClassDescription.getOperands()
Answer the list of operands for this Boolean class expression. |
| Methods in com.hp.hpl.jena.ontology with parameters of type RDFList | |
|---|---|
EnumeratedClass |
OntClass.convertToEnumeratedClass(RDFList individuals)
Answer a view of this class as an enumeration of the given individuals. |
IntersectionClass |
OntClass.convertToIntersectionClass(RDFList classes)
Answer a view of this class as an intersection of the given classes. |
UnionClass |
OntClass.convertToUnionClass(RDFList classes)
Answer a view of this class as a union of the given classes. |
AllDifferent |
OntModel.createAllDifferent(RDFList differentMembers)
Answer a new, anonymous node representing the fact that a given set of classes are all pair-wise distinct. |
DataRange |
OntModel.createDataRange(RDFList literals)
Answer a data range defined as the given set of concrete data values. |
EnumeratedClass |
OntModel.createEnumeratedClass(java.lang.String uri,
RDFList members)
Answer a resource representing the class that is the enumeration of the given list of individuals |
IntersectionClass |
OntModel.createIntersectionClass(java.lang.String uri,
RDFList members)
Answer a resource representing the class that is the intersection of the given list of class descriptions. |
UnionClass |
OntModel.createUnionClass(java.lang.String uri,
RDFList members)
Answer a resource representing the class that is the union of the given list of class descriptions |
void |
AllDifferent.setDistinctMembers(RDFList members)
Assert that the list of distinct individuals in this AllDifferent declaration is the given list. |
void |
EnumeratedClass.setOneOf(RDFList en)
Assert that this class is exactly the enumeration of the given individuals. |
void |
DataRange.setOneOf(RDFList en)
Assert that this data range is exactly the enumeration of the given individuals. |
void |
BooleanClassDescription.setOperands(RDFList operands)
Assert that the operands for this boolean class expression are the classes in the given list. |
| Uses of RDFList in com.hp.hpl.jena.rdf.model |
|---|
| Methods in com.hp.hpl.jena.rdf.model that return RDFList | |
|---|---|
RDFList |
RDFList.append(java.util.Iterator nodes)
Answer a new list that is formed by adding each element of this list to the head of the the list formed from the given nodes . |
RDFList |
RDFList.append(RDFList list)
Answer a new list that is formed by adding each element of this list to the head of the given list . |
RDFList |
RDFList.cons(RDFNode value)
Return a reference to a new list cell whose head is value
and whose tail is this list. |
RDFList |
RDFList.copy()
Answer a list that contains all of the elements of this list in the same order, but is a duplicate copy in the underlying model. |
RDFList |
Model.createList()
Answer a new empty list. |
RDFList |
Model.createList(java.util.Iterator members)
Answer a new list containing the resources from the given iterator, in order. |
RDFList |
Model.createList(RDFNode[] members)
Answer a new list containing the nodes from the given array, in order |
RDFList |
RDFList.getTail()
Answer the list that is the tail of this list. |
RDFList |
RDFList.remove(RDFNode val)
Remove the given value from this list. |
RDFList |
RDFList.removeHead()
Remove the value from the head of the list. |
RDFList |
RDFList.setTail(RDFList tail)
Update the list cell at the front of the list to have the given list as tail. |
RDFList |
RDFList.with(RDFNode value)
Answer the list that is this list with the given value added to the end of the list. |
| Methods in com.hp.hpl.jena.rdf.model with parameters of type RDFList | |
|---|---|
RDFList |
RDFList.append(RDFList list)
Answer a new list that is formed by adding each element of this list to the head of the given list . |
void |
RDFList.concatenate(RDFList list)
Change the tail of this list to point to the given list, so that this list becomes the list of the concatenation of the elements of both lists. |
boolean |
RDFList.sameListAs(RDFList list)
Answer true if this list has the same elements in the same order as the given list. |
RDFList |
RDFList.setTail(RDFList tail)
Update the list cell at the front of the list to have the given list as tail. |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


Im not a very good character builder and I would like advices on a transmutation RWoT. i would like flesh to stone and disentegrate as my main offensive spells. My principal concern is that disentegrate need a ranged touch attack to connect. My guess was to use Eldritch Knight to boost AB as well as the true strike spell. Anyone can help me out on this?
Thx _________________ K.M. aka Chillychill
"Y'a pire que ne pas pouvoir, y'a savoir qu'on peut et ne jamais tenter"
I would also like to know wich spell school i should lose. With a necro RWoT I would go for divination and Enchantment but in that tramsmutation build, loosing true strike and heroism seems pretty bad to me. _________________ K.M. aka Chillychill
"Y'a pire que ne pas pouvoir, y'a savoir qu'on peut et ne jamais tenter"


Inheritance can be defined as the process where one class acquires the properties (methods and fields) of another. With the use of inheritance the information is made manageable in a hierarchical order.
The class which inherits the properties of other is known as subclass (derived class, child class) and the class whose properties are inherited is known as superclass (base class, parent class).
Code:
class Calculation {
int z;
public void addition(int x, int y) {
z = x + y;
System.out.println("The sum of the given numbers:"+z);
}
public void Subtraction(int x, int y) {
z = x - y;
System.out.println("The difference between the given numbers:"+z);
}
}
public class My_Calculation extends Calculation {
public void multiplication(int x, int y) {
z = x * y;
System.out.println("The product of the given numbers:"+z);
}
public static void main(String args[]) {
int a = 20, b = 10;
My_Calculation demo = new My_Calculation();
demo.addition(a, b);
demo.Subtraction(a, b);
demo.multiplication(a, b);
}
}
Compile and execute the above code as shown below.
javac My_Calculation.java
java My_Calculation
uotput:
The sum of the given numbers:30
The difference between the given numbers:10
The product of the given numbers:200


This Demo #2 Animation uses a custom $timeline Service with a animation data model.
The controller uses `$timeline()` to lookup the animation, register callbacks and
The animation service $timeline creates the sequence chain.
Pro: Databinding is used to update the status-table details
Pro: Directives know nothing about animations
Con: The process to build a sequence chain is hardcoded in the Service layer
Con: The animation sequence details are hard-coded in the Service layer


Representative for {{district}}
{{hrname}}
{{hrparty}}
started: {{hrfyio}}
Party Loyalty: {{hrployalty}}%
Legislative Ranking:
{{hrli}}%
Factors include:
-bills enacted: {{hrenacted}}%
-bills sponsored: {{hrsponsored}}%
-bills co-sponsored {{hrcosponsored}}%
?what's this?
Top Donors
-company 1
-company 2
-company 3
-company 4
-company 5
-company 6
Graphically Based Content
Senior Senator for {{district}}
{{ssname}}
{{ssparty}}
started: {{ssfyio}}
Party Loyalty: {{ssployalty}}%
Legislative Ranking:
{{ssli}}%
Factors include:
-bills enacted: {{ssenacted}}%
-bills sponsored: {{sssponsored}}%
-bills co-sponsored {{sscosponsored}}%
?what's this?
Top Donors
-company 1
-company 2
-company 3
-company 4
-company 5
-company 6
Graphically Based Content
Junior Senator for {{district}}
{{jsname}}
{{jsparty}}
started: {{jsfyio}}
Party Loyalty: {{jsployalty}}%
Legislative Ranking:
{{jsli}}%
Factors include:
-bills enacted: {{jsenacted}}%
-bills sponsored: {{jssponsored}}%
-bills co-sponsored {{jscosponsored}}%
?what's this?
Top Donors
-company 1
-company 2
-company 3
-company 4
-company 5
-company 6
Graphically Based Content


The Omega Code
rated PG-13 99 minutes starring Casper Van Dien, Michael York, Catherine Oxenberg, and Michael Ironside directed by Robert Marcarelli
A Video Review by Frankie Paiva
Never before in my life have I seen a movie worse than The Omega Code. This may sound like a strong statement, but it is completely true. So many things went awry with the first movie funded by TBN (the Trinity Broadcasting Network) that I seriously could sit here all day listing them.
Gillen Lane (Casper Van Dien) is a self-motivation and religious guru who lost his faith when he was ten. His mother died in a car crash when he was at that age and since then he's been trying to improve people's lives by teaching them to believe in themselves rather than a higher power. His ideas interest Stone Alexander (Michael York) a wealthy, but corrupt businessman who uses his work to promote peace in Jerusalem and other Middle Eastern countries to hide his work on cracking the bible code. Gillen and Alexander are both intrigued by this code. When the bible gets viewed in 3-D certain patterns emerge that predict the future. Hitler, the assassination of John F. Kennedy, and the death of Princess Diana were apparently all foretold by the bible. Whoever has control of the code and knows what's going to happen next can therefore claim themselves to be God. So Gillen must keep the code safe from double-crossing executives, bodyguards, and reporters. Along the way his faith may come back.
The main problem with The Omega Code is that it tries too hard to be two different types of movies. It wants to preach the lord, and spread the word of Jesus to African countries we've never heard of. However, the religious message gets overshadowed by all of the action. Writers Stephan Blinn and Hollis Barton tried to make this entertaining, but try not to groan when Gillen says things like, "I’ve got to do it! It’s my child!" Try not to laugh when a man runs away from a big Amish-like shooter guy with a long beard. Scenes like these are laughably bad. So is the acting. Casper Van Dien still shows no hope of good acting skills. Rather than this being amusing, as it was in Starship Troopers, it's just really annoying. Michael York is also surprisingly bad. The Omega Code is so utterly predictable it's scary. Gillen isn’t smart enough to figure out that almost no one is on his side. The movie also treats the audience this way. Whether you see one movie a year or one hundred, it's very likely you've seen all of this before. Fifth graders are producing better stories with better dialog than this. Sitting through five hours of TBN and watching modern-day Tammy Faye Bakkers bawl it out is by far a less severe punishment.
There was one joyous moment for me that involved this movie. That moment was when I returned the tape to the video store.
F
Frankie Paiva<EMAIL_ADDRESS>http://www.homestead.com/cinemaparadise/mainpage.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


{%extends "registration/base.html"%} {% load bootstrap5 %} {% block content %}
Password or Username is incorrect
Not a member yet? Register now


Relax
About
Articles
Resources
Charities
About
Articles
Resources
Charities
menu
Bye, bye Anxiety!
!!!!!! Insert some discription about website !!!!!!
1
Post 1
Information about Post 1
2
Post 2
Informations about Post 2
3
Post 3
Information about Post 3
Anxiety, Stress and Mental Health During a Global Pandemic
Resources
Resources and Links
Donations


Interpolating LiDAR data
- How do I convert a LAS point cloud into a raster?
- How do I exclude points with certain classifications?
- I have many LAS files and want to interpolate all of them at once
- What if my data contains anomalously high/low points?
- My data are in LAZ format. How do I interpolate them?
- How do I interpolate an image from the intensity data?
- How do I decide on an appropriate grid resolution?
- My raster contains NoData gaps. How do I remove these?
- How do I combine many LiDAR tiles into a single raster?
- Is there a complete example LiDAR processing workflow available?
How do I convert a LAS point cloud into a raster?
Converting your LiDAR data into a raster requires an interpolation operation. There are many such interpolation methods. The following is an example of how to interpolate the last-return points of a LAS (LiDAR) file using an inverse distance weighted (IDW) interpolation scheme, with a search window radius of 2.5 m, an exponent of 2.0, and an output grid resolution of 1.5 m.
from WBT.whitebox_tools import WhiteboxTools
wbt = WhiteboxTools()
wbt.work_dir = "/path/to/data/"
wbt.lidar_idw_interpolation(
i="myFile.las",
output="myRaster.tif",
parameter="elevation",
returns="last",
resolution=1.5,
weight=2.0,
radius=2.5
)
Other methods for gridding a LAS file include nearest neighbour, Delaunay triangulation (TINing), block minimum, and block maximum gridding schemes.
How do I exclude points with certain classifications?
It is commonly the case that points with certain
class values should be excluded from the gridding of LiDAR data. For
example, you may wish to exclude points associated with vegetation,
buildings, bridges, utility lines, etc. The LidarIdwInterpolation
and LidarNearestNeighbourGridding tools allow for excluded
point classes using the exclude_cls parameter. The parameter
takes a numeric list as input, e.g. exclude_cls='3,4,5,6,7,18'
.
Class values follow those of the LAS v.1.4 specifications:
| Classification Value | Meaning |
|---|---|
| 0 | Created, never classified |
| 1 | Unclassified3 |
| 2 | Ground |
| 3 | Low Vegetation |
| 4 | Medium Vegetation |
| 5 | High Vegetation |
| 6 | Building |
| 7 | Low Point (noise) |
| 8 | Reserved |
| 9 | Water |
| 10 | Rail |
| 11 | Road Surface |
| 12 | Reserved |
| 13 | Wire – Guard (Shield) |
| 14 | Wire – Conductor (Phase) |
| 15 | Transmission Tower |
| 16 | Wire-structure Connector (e.g. Insulator) |
| 17 | Bridge Deck |
| 18 | High Noise |
Of course, not all LAS files have had point classifications applied and stored. To determine whether your data contains point class data, you can run the LidarInfo tool before interpolation.
I have many LAS files and want to interpolate all of them at once
When you have hundreds, or even thousands, of LAS files you might be inclined to write a Python script that calls the above function for each input file contained within a folder. But that isn't the best way to handle this common situation. Instead, if the input (i) and output parameters are left unspecified, each of WhiteboxTool's LiDAR gridding methods will interpolate all of the LAS files in the working directory, e.g.
from WBT.whitebox_tools import WhiteboxTools
wbt = WhiteboxTools()
wbt.work_dir = "/path/to/data/"
wbt.lidar_idw_interpolation(
parameter="elevation",
returns="last",
resolution=1.0,
weight=1.0,
radius=2.5
)
Using this approach to folder-based interpolation has some advantages other than a greatly simplified script. WhiteboxTools will be able to parallelize the operation better, greatly improving the overall time required to interpolate the batch of files. Also, the gridding operations will be carried out with a strip of buffered data surrounding each LiDAR tile, i.e. there will be reduced edge-effects. This will reduce the potential for artifacts in the final mosaiced DEM.
What if my data contains anomalously high/low points?
This is a fairly common problem with LiDAR data.
if you're fortunate, these points, which often fall hundreds of meters above
or below the terrain surface, will be classified appropriately. When
this is the case, you may simply exclude the points with class values of
7 (low point) and 18 (high point). Alternatively, you may use the optional
minz
and maxz
interpolation parameters to
exclude unclassified outlier points. Lastly, you may remove these points
from the original point cloud data set using the LidarRemoveOutliers
tool.
My data are in LAZ format. How do I interpolate them?
WhiteboxTools does not currently support the compressed LiDAR format LAZ. To use these data, you will first need to decompress the files to a LAS format. You may wish to use LasTools for this purpose.
How do I interpolate an image from the intensity data?
The parameter
argument of the IDW and nearest neighbour
interpolator tools allows you to interpolate intensity data (options include 'elevation',
'intensity', 'class', 'scan angle', and 'user data'). Here is an example:
from WBT.whitebox_tools import WhiteboxTools
wbt = WhiteboxTools()
wbt.work_dir = "/path/to/data/"
wbt.lidar_nearest_neighbour_gridding(
"in.las", "out.tif", parameter="intensity")
How do I decide on an appropriate grid resolution?
You want to choose a grid resolution where the vast majority of grid cells in the area covered by data have at least one return point. If you are interpolating with last-return points only, then this will necessarily reduce the potential resolution. Ultimately, there is not single appropriate value and the range of suitable resolutions will depend on the distribution of point density with the area of coverage. If the specified resolution is too high given the point density of the LiDAR data set, many of the grid cells will either be NoData holes, or represent interpolated values from relatively distant (up to the search radius) points. A higher than necessary grid resolution will also make working with the final mosaiced DEM raster more challenging, due to the computational effort needed to work with massive rasters and increase the storage and memory requirements. It is advisable to experiment with the LidarPointDensity and LidarPointStats tools before deciding upon a grid resolution for interpolation.
My raster contains NoData gaps. How do I remove these?
First, we need to distinguish between two common areas of NoData values in the interpolated rasters of LiDAR data sets. Because LiDAR data are often collected for irregularly shaped sites, it is frequently the case that LiDAR DEMs have large NoData areas beyond the area of LiDAR point coverage. These are generally acceptable void areas and should not be altered. The more problemmatic void areas are interior data gaps (so called doughnut holes). These generally arise because the point density in an area of LiDAR coverage is lower than the grid resolution (and search radius) dictate in an area. Sometimes these NoData areas are associated with specific non-reflective surfaces, such as water, or areas of dense vegetation (and therefore the last return point density is far lower than in other areas). If the NoData gaps are extensive and spread throughout the area of coverage, that is a sign that you likely need to interpolate either with a coarser grid resolution or a larger search radius, or quite probably both. If your LiDAR DEM has a small number these void areas, and they are not extensive, then you may interpolate to remove the gaps using the FillMissingData tool:
from WBT.whitebox_tools import WhiteboxTools
wbt = WhiteboxTools()
wbt.work_dir = "/path/to/data/"
wbt.fill_missing_data("dem.tif", "new_dem.tif", filter=11)
The choice of a filter size will depend on the extent of the largest interior void area.
How do I combine many LiDAR tiles into a single raster?
Often you have many hundred LAS files, which you've intepolated into an equally large number of raster files. To combine these rasters into a single large DEM, use the Mosaic tool.
from os import listdir
from WBT.whitebox_tools import WhiteboxTools
wbt = WhiteboxTools()
wbt.work_dir = "/path/to/data/"
# find all GeoTIFFs in the path
input_files = ""
for f in listdir(wbt.work_dir):
if f.endswith(".tif"):
input_files += ";" + f
input_files = input_files[1:] # strips the first ';'
wbt.mosaic(inputs=input_files, output="big_DEM.tif")
Is there a complete example LiDAR processing workflow available?
Yes! The following code is an example of some of the common tasks required in processing large LiDAR datasets of many hundreds of LAS files.
import os
from os import path
from WBT.whitebox_tools import WhiteboxTools
def main():
las_files_dir = "/Users/johnlindsay/Documents/data/test_lidar/"
filtered_las_dir = "/Users/johnlindsay/Documents/data/test_lidar/filtered_LAS/"
raster_data_dir = "/Users/johnlindsay/Documents/data/test_lidar/interpolated_grids/"
wbt = WhiteboxTools()
wbt.work_dir = las_files_dir #set working directory
wbt.verbose = False
if not os.path.exists(filtered_las_dir):
os.makedirs(filtered_las_dir)
# Sometimes, I like to extract all of the LAS tiles that overlap with a
# particular area. For example, I might want to interpolate all the files
# overlapping with a watershed. For this, you can use select_tiles_by_polygon.
# Uncomment the four lines below if you want to do this.
# outdir = "/Users/johnlindsay/Documents/data/LAS_files_in_watershed/"
# polygons = "/Users/johnlindsay/Documents/data/LAS_files_in_watershed/watershed.shp"
# wbt.select_tiles_by_polygon(las_files_dir, outdir, polygons)
# las_files_dir = outdir # this way the analysis below works only on the selected tiles.
##################################################################################
# Filter the ground points in the LAS files using lidar_ground_point_filter tool #
##################################################################################
# This one is the SLOWEST part of the workflow and can be avoided if you are
# confident that you have good point classification data, i.e. that the
# vegetation and building classes have been properly populated.
processed_files = []
num_filtered = 1
flag = True
while flag:
file_names = find_las_files(las_files_dir, processed_files)
if len(file_names) > 0: # and len(processed_files) < 3000:
for i in range(len(file_names)):
in_file = las_files_dir + file_names[i]
out_file = filtered_las_dir + file_names[i].replace(".las", "_filtered.las")
print("Processing LAS {} of {} (total filtered={}) {}".format(i+1, len(file_names), num_filtered, file_names[i]))
processed_files.append(file_names[i])
wbt.lidar_ground_point_filter(in_file, out_file, radius=2.0, slope_threshold=45, height_threshold=1.0)
num_filtered += 1
else:
flag = False
##############################
# Interpolate the LAS files. #
##############################
# If you don't use the above ground point filter the directory below must be
# updated to point to the original LAS files.
wbt.work_dir = filtered_las_dir
# You can use either IDW, nearest neighbour, or TINing (Delaunay triangulation)
# for the gridding step. TINing option is available as of WhiteboxTools v0.11.
wbt.lidar_idw_interpolation(parameter="elevation", returns="all", resolution=2.0, weight=1.0, radius=5.0, exclude_cls='3,4,5,6,7,18')
# wbt.lidar_nearest_neighbour_gridding(returns="last", resolution=1.5, radius=2.5, exclude_cls='3,4,5,6,7,18')
# wbt.lidar_tin_gridding(parameter="elevation", returns="all", resolution=2.0, exclude_cls='3,4,5,6,7,18')
###############################################################
# Now mosaic the tiles; this is done using intermediate steps #
###############################################################
if not os.path.exists(raster_data_dir):
os.makedirs(raster_data_dir)
wbt.work_dir = filtered_las_dir #set working directory
wbt.verbose = False
processed_files = []
num_mosaiced = 1
flag = True
round = 1
while flag:
# This will mosaic a maximum of 250 tiles together; these sub-files
# will subsequently be merged. Mosaicing many hundreds of tiles
# together at one time is otherwise too intensive.
file_names = find_tiff_files(filtered_las_dir, processed_files, 250)
if len(file_names) > 1:
in_files = ""
for i in range(len(file_names)):
if i < len(file_names)-1:
in_files += f"{file_names[i]};"
else:
in_files += f"{file_names[i]}"
processed_files.append(file_names[i])
num_mosaiced += 1
out_file = raster_data_dir + f"mosaic{round}.tif"
wbt.mosaic(inputs=in_files, output=out_file, method="nn")
print(f"Processing mosaic {round}; num. files = {num_mosaiced}")
# now clean up the individual tiles
for i in range(len(file_names)):
os.remove(filtered_las_dir + file_names[i])
else:
flag = False
round += 1
wbt.work_dir = raster_data_dir #set working directory
mosaic_file = raster_data_dir + f"final_mosaic.tif"
file_names = find_mosaic_files(raster_data_dir)
if len(file_names) > 1:
in_files = ""
for i in range(len(file_names)):
if i < len(file_names)-1:
in_files += f"{file_names[i]};"
else:
in_files += f"{file_names[i]}"
num_mosaiced += 1
wbt.mosaic(inputs=in_files, output=mosaic_file, method="nn")
# now clean up the intermediate mosaics
for i in range(len(file_names)):
os.remove(raster_data_dir + file_names[i])
##############################################
# Would you like to fill in the NoData gaps? #
##############################################
dem_nodata_filled = raster_data_dir + f"DEM_gaps_filled.tif"
wbt.fill_missing_data(mosaic_file, dem_nodata_filled, filter=11)
######################################################################
# I usually remove off-terrain objects, like any remaining buildings #
######################################################################
dem_no_otos = raster_data_dir + f"DEM_no_OTOs.tif"
wbt.remove_off_terrain_objects(dem_nodata_filled, dem_no_otos, filter=11, slope=15.0)
#####################################
# Would you like to smooth the DEM? #
#####################################
dem_smoothed = raster_data_dir + f"DEM_smoothed.tif"
wbt.feature_preserving_denoise(dem_no_otos, dem_smoothed, filter=11, norm_diff=8.0)
################################
# Want to fix the depressions? #
################################
dem_breached = raster_data_dir + f"DEM_breached.tif"
# Set the maximum breach depth appropriate for the terrain. You can
# also restrict breaching based on a maximum breach channel length.
wbt.breach_depressions(dem_smoothed, dem_breached, max_depth=5.0)
# because we restricted the use of very deep breach channels, there
# may still be depressions in the DEM. To get rid of these, we can
# perform a subsequent depression filling operation.
dem_filled = raster_data_dir + f"DEM_filled.tif"
wbt.fill_depressions(dem_breached, dem_filled)
####################################################################
# Okay, now we have a good base DEM from which we can extract #
# various land-surface parameters. There are really a large #
# number of these parameters available, but I'll just showcase #
# a few common ones here. See the User Manual for a complete list. #
####################################################################
# slope
slope_file = raster_data_dir + f"slope.tif"
wbt.slope(dem_filled, slope_file)
# plan curvature
plan_curv_file = raster_data_dir + f"plan_curv.tif"
wbt.plan_curvature(dem_filled, plan_curv_file)
# profile curvature; other curvatures are available too.
profile_curv_file = raster_data_dir + f"profile_curv.tif"
wbt.profile_curvature(dem_filled, profile_curv_file)
# hillshade (shaded relief raster)
hillshade_file = raster_data_dir + f"hillshade.tif"
wbt.hillshade(dem_filled, hillshade_file)
# relative topographic position (RTP) index
rtp_file = raster_data_dir + f"relative_topographic_position.tif"
wbt.relative_topographic_position(dem_filled, rtp_file, filterx=11, filtery=11)
# or even better, multiscale topographic position
dev_max_mag = raster_data_dir + f"multiscale_topo_position_mag.tif"
dev_max_scale = raster_data_dir + f"multiscale_topo_position_scale.tif"
wbt.max_elevation_deviation(dem_filled, dev_max_mag, dev_max_scale, min_scale=1, max_scale=100, step=2)
# ruggedness index
ruggedness_index_file = raster_data_dir + f"ruggedness_index.tif"
wbt.ruggedness_index(dem_filled, ruggedness_index_file)
# or even better, multiscale roughness
roughness_mag = raster_data_dir + f"multiscale_roughness_mag.tif"
roughness_scale = raster_data_dir + f"multiscale_roughness_scale.tif"
wbt.multiscale_roughness(dem_filled, roughness_mag, roughness_scale, min_scale=1, max_scale=100, step=2)
# D-infinity flow accumulation
flow_accum_file = raster_data_dir + f"dinf_flow_accum.tif"
wbt.d_inf_flow_accumulation(dem_filled, flow_accum_file, log=True)
# There literally hundreds of other useful parameters that could be
# extracted from our DEM using WhiteboxTools. Take a look at the User Manual.
print("Done!")
def find_las_files(input_dir, processed_files):
files = os.listdir(input_dir)
file_names = []
for f in files:
if f.endswith(".las") and f not in processed_files:
file_names.append(f)
return file_names
def find_tiff_files(input_dir, processed_files, max_num=10):
files = os.listdir(input_dir)
file_names = []
for f in files:
if f.endswith(".tif") and f not in processed_files:
if len(file_names) < max_num:
file_names.append(f)
else:
break
return file_names
def find_mosaic_files(input_dir):
files = os.listdir(input_dir)
file_names = []
for f in files:
if "mosaic" in f and (f.endswith(".tif") or f.endswith(".dep")):
file_names.append(f)
return file_names
main()


Real-Time Path Tracing Reconstruction In DXR
Cuda Path Tracer
Volumetric Path Tracer
WebGL2, Shader Programming
Maya Plugin Development
Modeling in Maya


Left panel content goes here
Right panel content goes here
This app illustrates how you can use built-in template engine Template7 to render pages with required data.


udp_open_mem - opens an UDP socket
#include <libdill.h>
int udp_open_mem(
struct ipaddr* local,
struct ipaddr* remote,
struct udp_storage* mem);
UDP is an unreliable message-based protocol defined in RFC 768. The size of the message is limited. The protocol has no initial or terminal handshake. A single socket can be used to different destinations.
This function creates an UDP socket.
This function allows to avoid one dynamic memory allocation by storing the object in user-supplied memory. Unless you are hyper-optimizing use udp_open instead.
local: IP address to be used to set source IP address in outgoing packets. Also, the socket will receive packets sent to this address. If port in the address is set to zero an ephemeral port will be chosen and filled into the local address.
remote: IP address used as default destination for outbound packets. It is used when destination address in udp_send function is set to NULL. It is also used by msend and mrecv functions which don't allow to specify the destination address explicitly. Furthermore, if remote address is set, all the packets arriving from different addresses will be silently dropped.
mem: The structure to store the newly created object in. It must not be deallocated before the object is closed.
To close this socket use hclose function.
This function is not available if libdill is compiled with --disable-sockets option.
In case of success the function returns newly created socket handle. In case of error it returns -1 and sets errno to one of the values below.
struct ipaddr local;
ipaddr_local(&local, NULL, 5555, 0);
struct ipaddr remote;
ipaddr_remote(&remote, "server.example.org", 5555, 0, -1);
int s = udp_open(&local, &remote);
udp_send(s1, NULL, "ABC", 3);
char buf[2000];
ssize_t sz = udp_recv(s, NULL, buf, sizeof(buf), -1);
hclose(s);
hclose(3) mrecv(3) mrecvl(3) msend(3) msendl(3) udp_open(3) udp_recv(3) udp_recvl(3) udp_send(3) udp_sendl(3)


ALLFEN DM- guaifenesin and dextromethorphan hydrobromide tablet
MCR American Pharmaceuticals, Inc.
Disclaimer: Most OTC drugs are not reviewed and approved by FDA, however they may be marketed if they comply with applicable regulations and policies. FDA has not evaluated whether this product complies.
Active Ingredients (in each immediate-release tablet) |
Purpose |
| Dextromethorphan HBr 20 mg |
Antitussive |
| Guaifenesin 400 mg |
Expectorant |
Uses
temporarily relieves
- cough due to minor throat or bronchial irritation associated with a cold
- cough impulses without narcotics
- helps loosen phlegm and thin bronchial secretions to make coughs more productive
Warnings
- Do not exceed recommended dosage.
- a persistent cough may be a sign of a serious condition. If cough persists for more than 1 week, tends to recur, or is accompanied by fever, rash, or persistent headache, consult a doctor.
Do not use this product unless directed by a doctor
- if you are now taking a prescription monoamine oxidase inhibitor (MAOI) (certain drugs for depression, psychiatric, or emotional conditions, or Parkinson's disease), or for 2 weeks after stopping the MAOI drug. If you do not know if your prescription drug contains an MAOI, ask a doctor or pharmacist before taking this product
- for persistent or chronic cough such as occurs with smoking, asthma, or emphysema, or if cough is accompanied by excessive phlegm (mucus)
If pregnant or breast-feeding, ask a health professional before use.
Keep out of reach of children.
In case of accidental overdose, seek professional help or contact a Poison Control Center immediately.
Directions
Do not exceed recommended dosage.
| Adults and children 12 years of age and over: |
1 tablet every 4 hours, not to exceed 6 tablets in 24 hours, or as directed by a doctor |
| Children 6 to under 12 years of age: |
1/2 tablet every 4 hours, not to exceed 3 tablets in 24 hours, or as directed by a doctor |
| Children 2 to under 6 years of age: |
Consult a doctor |
Inactive Ingredients
Magnesium Stearate, Microcrystalline Cellulose, Sodium Starch Glycolate
Question? Comments?
Call 1-352-754-8587
PRINCIPAL DISPLAY PANEL - 100 Tablet Bottle Label
NDC 58605-0401-01
100 tablets
Allfen DM
Antitussive • Expectorant
| Each immediate-release tablet contains: |
| Dextromethorphan HBr |
20 mg |
| Guaifenesin |
400 mg |
MCR American
MCR American Pharmaceuticals, Inc.


In this sample is illustrated how to create a Custom element Grid with column which displays values from foreign data source. The DropDownList editor associated to the column is populated from the foreign data source.


Chocolate Pizza
Posted on 15th Dec 2013 / Desserts
For the fig-swirl: Melt butter over medium heat in a saucepan. Add brown sugar and stir to dessolve. Halve all of the figs and toss in the saucepan with water and lemon juice. Cook over medium heat, stirring frequently, until you have chunky-jammy mixture. Add salt with one or two stirs, set aside and let cool completely.
Ice cream: In a small pot over medium heat, combine milk, and granulated sugar until sugar is completely disolved and the milk is just barely lukewarm. Whisk in the egg yolks. Set mixture in the fridge and wait until the fig mixture is cooled.
Using an ice cream machine, pour liquids into the frozen bassin and process according to manufacturer instruction, i.e., let spin and thicken for 20 minutes before adding mascarpone, fig jam mixture and the nuts. Continue process for +/- 10 minutes. Pour semi.frozen mixture into a pyrex dish or glass tupperware. Freeze for at least two hours before serving.
- 1 1/2 cups milk
- 1/2 mascarpone
- 1/2 tsp pink salt
- 1lb Black Mission Figs
- 1/2 cup brown sugar
- 2-4 tbsp water
- 1 1/2 cups heavy cream
- 1/2 granulated sugar
- 2 egg yolks
- 1 lemon, juiced
- 2 tbsp butter
- 1 cup honey roasted pecans, roughly chopped
Vanessa Stevenson
Food enthusiast, photography fan. Add a pink of raw foodism and that's pretty much who I am.


Table of Contents:
Thus spake the master programmer:
"When you have learned to snatch the error code from
the trap frame, it will be time for you to leave."
If the Tao is great, then the operating system is great. If the operating system is great, then the compiler is great. If the compiler is greater, then the applications are great. The user is pleased and there is harmony in the world.
The Tao of Programming flows far away and returns on the wind of morning.
The assembler gave birth to the compiler. Now there are ten thousand languages.
Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao.
But do not program in COBOL if you can avoid it.
Programmers that do not comprehend the Tao are always running out of time and space for their programs. Programmers that comprehend the Tao always have enough time and space to accomplish their goals.
How could it be otherwise?
If it were not for laughter, there would be no Tao.
The highest sounds are the hardest to hear. Going forward is a way to retreat. Greater talent shows itself late in life. Even a perfect program still has bugs.
Thus spake the master programmer:
"After three days without programming, life becomes meaningless."
Aware, like a fox crossing the water. Alert, like a general on the battlefield. Kind, like a hostess greeting her guests. Simple, like uncarved blocks of wood. Opaque, like black pools in darkened caves.
Who can tell the secrets of their hearts and minds?
The answer exists only in the Tao.
"I don't know whether I am Turing dreaming that I am a machine, or a machine dreaming that I am Turing!"
The manager said: "I should have never sent you to the conference. Those programmers live beyond the physical world. They consider life absurd, an accidental coincidence. They come and go without knowing limitations.  Why should they bother with social conventions?"
"They are alive within the Tao."
The Master replies: "That programmer has mastered the Tao. He has gone beyond the need for design; he does not become angry when the system crashes, but accepts the universe without concern. He has gone beyond the need for documentation; he no longer cares if anyone else sees his code. He has gone beyond the need for testing; each of his programs are perfect within themselves, serene and elegant, their purpose self-evident. Truly, he has entered the mystery of the Tao."
Thus spake the master programmer:
"When program is being tested, it is too late to make design changes."
"I am a great thief, renowned for my feats of shoplifting. Be forewarned, for this trade show shall not escape unplundered."This speech disturbed the guard greatly, because there were millions of dollars of computer equipment inside, so he watched the man carefully. But the man merely wandered from booth to booth, humming quietly to himself.
When the man left, the guard took him aside and searched his clothes, but nothing was to be found.
On the next day of the trade show, the man returned and chided the guard saying: "I escaped with a vast booty yesterday, but today will be even better." So the guard watched him ever more closely, but to no avail.
On the final day of the trade show, the guard could restrain his curiosity no longer. "Sir Thief," he said, "I am so perplexed, I cannot live in peace. Please enlighten me. What is it that you are stealing?"
The man smiled. "I am stealing ideas," he said.
"An operating system," replied the programmer.
The warlord uttered an exclamation of disbelief. "Surely an accounting package is trivial next to the complexity of an operating system," he said.
"Not so," said the programmer, "when designing an accounting package, the programmer operates as a mediator between people having different ideas: how it must operate, how its reports must appear, and how it must conform to the tax laws. By contrast, an operating system is not limited by outside appearances. When designing an operating system, the programmer seeks the simplest harmony between machine and ideas. This is why an operating system is easier to design."
The warlord of Wu nodded and smiled. "That is all good and well, but which is easier to debug?"
The programmer made no reply.
"It will take one year," said the master promptly.
"But we need this system immediately or even sooner! How long will it take if I assign ten programmers to it?"
The master programmer frowned. "In that case, it will take two years."
"And what if I assign a hundred programmers to it?"
The master programmer shrugged. "Then the design will never be completed," he said.
Thus spake the master programmer:
"A well-written program is its own heaven;
a poorly-written program is its own hell."
A program should follow the 'Law of Least Astonishment'. What is this law? It is simply that the program should always respond to the user in the way that astonishes him least.
A program, no matter how complex, should act as a single unit. The program should be directed by the logic within rather than by outward appearances.
If the program fails in these requirements, it will be in a state of disorder and confusion. The only way to correct this is to rewrite the program.
The master replied: "You are confused because you do not understand the Tao.  Why do you expect it from a machine that humans have constructed? Computers simulate determinism; only the Tao is perfect.
The rules of programming are transitory; only the Tao is eternal. Therefore you must contemplate the Tao before you receive enlightenment."
"But how will I know when I have received enlightenment?" asked the novice.
"Your program will then run correctly," replied the master.
"Is the Tao in a hand-held calculator?" asked the novice.
"It is," came the reply.
"Is the Tao in a video game?" continued the novice.
"It is even in a video game," said the master.
"And is the Tao in the DOS for a personal computer?"
The master coughed and shifted his position slightly. "The lesson is over for today," he said.
"Excellent!" the Prince exclaimed, "Your technique is faultless!"
"Technique?" said the programmer, turning from his terminal, "What I follow is the Tao -- beyond all technique. When I first began to program I would see before me the whole program in one mass. After three years I no longer saw this mass. Instead, I used subroutines. But now I see nothing. My whole being exists in a formless void. My senses are idle. My spirit, free to work without a plan, follows its own instinct. In short, my program writes itself. True, sometimes there are difficult problems. I see them coming, I slow down, I watch silently. Then I change a single line of code and the difficulties vanish like puffs of idle smoke. I then compile the program. I sit still and let the joy of the work fill my being. I close my eyes for a moment and then log off."
Prince Wang said, "Would that all of my programmers were as wise!"
Thus spake the master programmer:"Though a program be but three lines long,
someday it will have to be maintained."
These are great mysteries.
"I think you are being unrealistic," said the manager. "Truthfully, how long will it take?"
The programmer thought for a moment. "I have some features that I wish to add. This will take at least two weeks," he finally said.
"Even that is too much to expect," insisted the manager, "I will be satisfied if you simply tell me when the program is complete."
The programmer agreed to this.
Several years later, the manager retired. On the way to his retirement lunch, he discovered the programmer asleep at his terminal. He had been programming all night.
The novice worked furiously for many days, but when his master reviewed his program, he discovered that it contained a screen editor, a set of generalized graphics routines, and artificial intelligence interface, but not the slightest mention of anything financial.
When the master asked about this, the novice became indignant. "Don't be so impatient," he said, "I'll put the financial stuff in eventually."
Thus spake the master programmer:"Let the programmer be many and the managers
few -- then all will be productive."
Truly, this is not the Tao of Programming.
When managers make commitments, game programs are ignored. When accountants make long-range plans, harmony and order are about to be restored. When senior scientists address the problems at hand, the problems will soon be solved.
Truly, this is the Tao of Programming.
Why are programmers rebellious?
Because the management interferes too much.
Why are the programmers resigning one by one?
Because they are burnt out.
Having worked for poor management, they no longer value their jobs.
The manager tried to give the programmer a bonus, but the programmer refused it, saying, "I wrote the program because I though it was an interesting concept, and thus I expect no reward."
The manager, upon hearing this, remarked, "This programmer, though he holds a position of small esteem, understands well the proper duty of an employee. Lets promote him to the exalted position of management consultant!"
But when told this, the programmer once more refused, saying, "I exist so that I can program.  Can I go now? I have a program that I'm working on."
So the manager said: "All right, in that case you may set your own working hours, as long as you finish your projects on schedule." The programmers, now satisfied, began to come in a noon and work to the wee hours of the morning.
Thus spake the master programmer:"You can demonstrate a program for a corporate
executive, but you can't make him computer literate."
The master replies: "You perceive this immense structure and are disturbed that it has no rational purpose. Can you not take amusement from its endless gyrations? Do you not enjoy the untroubled ease of programming beneath its sheltering branches? Why are you bothered by its uselessness?"
The novice programmer stares in wonder at the bird, for he understands it not. The average programmer dreads the coming of the bird, for he fears its message. The master programmer continues to work at his terminal, for he does not know that the bird has come and gone.
"This is an integrated, distributed, general-purpose workstation," began the magician, "ergonomically designed with a proprietary operating system, sixth generation languages, and multiple state of the art user interfaces. It took my assistants several hundred man years to construct. Is it not amazing?"
The master raised his eyebrows slightly. "It is indeed amazing," he said.
"Corporate Headquarters has commanded," continued the magician, "that everyone use this workstation as a platform for new programs. Do you agree to this?"
"Certainly," replied the master, "I will have it transported to the data center immediately!" And the magician returned to his tower, well pleased.
Several days later, a novice wandered into the office of the master programmer and said, "I cannot find the listing for my new program. Do you know where it might be?"
"Yes," replied the master, "the listings are stacked on the platform in the data center."
Thus spake the master programmer:"Without the wind, the grass does not move.
Without software, hardware is useless."
 That company is large because it is so large. If it only made hardware, nobody would buy it. If it only maintained systems, people would treat it like a servant. But because it combines all of these things, people think it one of the gods! By not seeking to strive, it conquers without effort."
The novice bolted to attention and handed the device to the master. "I see that the device claims to have three levels of play: Easy, Medium, and Hard", said the master. "Yet every such device has another level of play, where the device seeks not to conquer the human, nor to be conquered by the human."
"Pray, great master," implored the novice, "how does one find this mysterious setting?"
The master dropped the device to the ground and crushed it under foot. And suddenly the novice was enlightened.
The mainframe programmer then began to describe his system to his friend, saying: "The mainframe sits like an ancient sage meditating in the midst of the data center. Its disk drives lie end-to-end like a great ocean of machinery. The software is a multi-faceted as a diamond and as convoluted as a primeval jungle. The programs, each unique, move through the system like a swift-flowing river. That is why I am happy where I am."
The microcomputer programmer, upon hearing this, fell silent. But the two programmers remained friends until the end of their days.
Presently, they met Firmware, who was dressed in tattered rags, and hobbled along propped on a thorny stick. Firmware said to them: "The Tao lies beyond Yin and Yang. It is silent and still as a pool of water. It does not seek fame, therefore nobody knows its presence. It does not seeks fortune, for it is complete within itself. It exists beyond space and time."
Software and Hardware, ashamed, returned to their homes.
Thus spake the master programmer:"Time for you to leave."


The α-shearlet transform¶
This module (AlphaTransform.py
) provides the class
AlphaShearletTransform
which can be used to compute the alpha-shearlet
transform of images.
The parameter alpha determines the directionality of the system:
- alpha = 1 yields a wavelet-like system,
- alpha = 0.5 yields a shearlet system,
- alpha = 0 yields a ridgelet-like system.
The following is a simple example indicating how the transform can be used.
For more details, we refer to the documentation of the class
AlphaShearletTransform
below.
import numpy as np
from AlphaTransform import AlphaShearletTransform as AST
# create a transform for images of resolution 600 x 500,
# with alpha = 0.5 and 3 scales
my_trafo = AST(600, 500, [0.5]*3)
test_im = np.random.random((500, 600))
# compute the alpha-shearlet coefficients
coeff = my_trafo.transform(test_im)
# threshold the coefficients
thresh_coeff = coeff * (np.abs(coeff) > 3)
# reconstruct
recon = my_trafo.inverse_transform(thresh_coeff)
print("Reconstruction error", np.linalg.norm(test_im - recon))
Apart from collecting all settings/parameters in one object, creating my_trafo also does any necessary precomputation (e.g. of the alpha-shearlet filters). Thus, creation of the instance my_trafo might be a little slow, but computation of each individual transform is comparatively fast.
The class AlphaShearletTransform
¶
-
class
AlphaTransform.
AlphaShearletTransform
(width, height, alphas, *, real=False, subsampled=False, generator=False, parseval=False, periodization=True, use_fftw=True, mother_shearlet=None, verbose=True)¶ This constructor initializes the
AlphaShearletTransform
object.Only three arguments are required. The remaining optional arguments have sensible default values which can be adjusted to achieve specific behaviours which are described below.
Required parameters
Parameters: - width (int) – The width (in pixels) of the image(s) to be analyzed
- height (int) – The height (in pixels) of the image(s) to be analyzed
- alphas (list) –
The length of this list determines the number of scales to be used. Each element
alphas[i]
determines the value of alpha to be used on scalei
. Hence, it should satisfy0 <= alphas[i] <= 1
.Note
The most common choice is
alphas = [alpha] * N
, which will yield an alpha-shearlet transform withN
scales (plus the low-pass part), i.e., the same value of alpha is used on all scales.
Keyword parameters
Parameters: - real (bool) –
Flag indicating whether the transform should use real-valued alpha-shearlets. In particular, this means that the transform of a real-valued signal is real.
Setting
real = True
amounts to a symmetrization of the alpha-shearlets on the Fourier-side.Note
Setting
real = True
is incompatible withsubsampled = True
! - subsampled (bool) –
If set to true, the subsampled transform will be used. This has the following consequences:
- a lower redundancy,
- a lower memory consumption,
- the transform is not translation invariant,
- the
transform()
method will return a list of 2-dimensional numpy arrays with varying dimensions, instead of a single 3-dimensional numpy array.
Note
Setting
subsampled = True
is incompatible with settingreal = True
and with settinggenerator = True
! - parseval (bool) – Flag indicating whether the alpha-shearlets should be normalized (on the Fourier side) to get a Parseval frame.
- periodization (bool) –
Flag indicating whether the shearlets on the highest scale (which (potentially) exceed the Fourier domain), are to be periodized (if
periodization = True
) or truncated (ifperiodization = False
).Note
The subsampled transform must be periodized.
- generator (bool) –
Flag indicating whether the spectrograms should be precomputed (if
generator = False
) or computed each time the (inverse) transformation is computed (ifgenerator = True
).Setting
generator = False
will improve the runtime (if the transform is computed several times) but greatly increase the memory footprint, in particular for small alpha, large images and many scales.Warning
If
generator
is set toTrue
, thetransform()
method will return a generator instead of a 3-dimensional numpy array. This should be taken into account in implementations.Note
Since the subsampled transform is already memory efficient, setting
generator = True
for the subsampled transform makes no sense and is thus not allowed. - use_fftw (bool) – Flag indicating whether the
pyfftw
package should be used to compute Fourier transforms (which are used internally to compute convolutions). - mother_shearlet (
MotherShearlet
) –This object determines the mother shearlet to be used. If the default value (
None
) is provided, the"Haeuser shearlet"
will be used.Note
For more information on other available mother shearlets, see
MotherShearlets.py
. - verbose (bool) – Flag indicating whether a progress bar should be displayed while precomputing the shearlet system.
-
adjoint_transform
(coeffs, spectrograms=None, do_norm=True)¶ This method computes and returns the adjoint operator to the operator computed by the method
transform()
. Since thetransform()
method is the analysis operator associated to the shearlet system, this means thatadjoint_transform()
is the associated synthesis operator.Note
The main use case of this method is if the transform is used in convex programming. Most solvers require that the linear transforms provide a method to apply the linear operator, as well as the adjoint of the linear operator.
Required parameters
Parameters: coeffs – This should be roughly of the same type as the return value of
transform()
. Usually, this argument will even be obtained directly or indirectly fromtransform()
, e.g. like the following:# initialize the image 'im' and the transform object 'my_trafo' ... # omitted for brevity coeff = my_trafo.transform(im) mod_coeff = coeff * (np.abs(coeff) > 0.5) im2 = my_trafo.adjoint_transform(mod_coeff)
Note
It is not necessary that the type of
coeffs
is precisely the same as that of the return value oftransform()
. For example, even iftransform()
returns a 3-dimensional numpy array, it is possible forcoeffs
to be a generator or a list. The crucial point is that the dimensions match, i.e., that the following code runs through:coeff_test = self.transform(im) for c, c_t in zip(coeff, coeff_test): assert c.shape == c_t.shape
Keyword parameters
Parameters: - spectrograms –
This parameter can be used to determine another system for synthesis than the shearlet system. If the default value (
None
) is passed, the synthesis is done with respect to the shearlet system associated to theself
object.Warning
The parameter
spectrograms
is mainly for internal use. Only use it if you know what you are doing. - do_norm (bool) – If one wants to compute the adjoint operator to the
transform()
method, then the value ofdo_norm
has to be the same as for the invocation oftransform()
. The default value isTrue
in both cases. Cf. the documentation oftransform()
for more details.
Return value
Returns: ( numpy.ndarray
) – The result of the synthesis operator (associated to the (alpha-shearlet) system determined byspectrograms
) applied tocoeff
.- spectrograms –
-
alpha
(scale)¶ Return the value of alpha for the given scale.
Parameters: scale (int) – The scale for which the value of alpha should be returned. Must satisfy 0 <= scale <= self.num_scales
. Typically,scale
is the first element of an index tuple, cf.indices()
.Returns: ( float
) The value of alpha associated to scalescale
. We always have0 <= self.alpha(scale) <= 1
.
-
classmethod
calculate_indices
(real, alphas)¶ This function can be used to compute the indices associated to an alpha-shearlet system with the given properties.
Given these indices, one can then compute e.g. the number of directions per scale and the total number of shearlets. For more details on what these indices are, cf.
indices()
.Note
One can get the same result by creating an object
my_trafo
of the classAlphaShearletTransform
and then invoke my_trafo.indices. However, using thecalculate_indices
method is much faster.Parameters: - real (bool) – Flag determining whether the indices should be computed for an
alpha-shearlet system consisting of real-valued alpha-shearlets,
or not. See the documentation of
AlphaShearletTransform
for more details. - alphas (list) – List of alpha values which determines both, the number of scales
and the value of alpha on each scale. See the documentation of
AlphaShearletTransform
for more details.
Returns: (
list
) – A list of indices associated to an alpha-shearlet system with the given parameters.- real (bool) – Flag determining whether the indices should be computed for an
alpha-shearlet system consisting of real-valued alpha-shearlets,
or not. See the documentation of
-
dual_frame_weight
¶ For the fully sampled transform, the dual frame is given by , where is the alpha-shearlet frame. The weight
w
, which is called the dual frame weight, is given by this property.Returns: (2-dimensional numpy.ndarray
) The dual frame weight w
-
fourier_norms
¶ This property yields the Fourier-side L² norms of the individual spectrograms of the transform (as a tuple(!)).
To obtain the (usually more important) space-side L² norms, use the property
space_norms()
instead.Return type: tuple of floats
-
get_frame_bounds
(do_norm=False)¶ This method yields the frame bounds of the associated transform as a tuple
(A,B)
, whereA
andB
are the lower and upper frame bounds, respectively.Hence, if
(A, B) = self.get_frame_bounds(do_norm=b)
andM = numpy.linalg.norm(im) ** 2
, then:A * M <= numpy.linalg.norm(self.transform(im, do_norm=b)) <= B*M
for all images
im
.Parameters: do_norm (bool) – This is the same flag as passed to
transform()
. Recall that in case ofdo_norm=False
, the transform calculates the convolutions , while fordo_norm=True
, it calculates the convolutions with respect to the normalized alpha-shearlet filters, i.e., .Note
The transform is written in such a way that a frame with good frame bounds is obtained for
do_norm=False
. Settingdo_norm=True
will result in much worse frame bounds. Recall, however, that the one frame is obtained by a simple rescaling of a frame with good bounds.
-
height
¶ This property yields the height (in pixels, as an
int
) of the images that can be analyzed using theself
object.
-
indices
¶ This property yields a list of so-called indices which describe the geometric meaning of the different “parts” of the alpha-shearlet coefficients.
To better explain this, consider the following example:
>>> my_trafo = AlphaShearletTransform(512, 512, [0.5]*2) >>> my_trafo.indices [-1, (0, -1, 'r'), (0, 0, 'r'), (0, 1, 'r'), (0, 1, 't'), (0, 0, 't'), (0, -1, 't'), (0, -1, 'l'), (0, 0, 'l'), (0, 1, 'l'), (0, 1, 'b'), (0, 0, 'b'), (0, -1, 'b'), (1, -2, 'r'), (1, -1, 'r'), (1, 0, 'r'), (1, 1, 'r'), (1, 2, 'r'), (1, 2, 't'), (1, 1, 't'), (1, 0, 't'), (1, -1, 't'), (1, -2, 't'), (1, -2, 'l'), (1, -1, 'l'), (1, 0, 'l'), (1, 1, 'l'), (1, 2, 'l'), (1, 2, 'b'), (1, 1, 'b'), (1, 0, 'b'), (1, -1, 'b'), (1, -2, 'b')] >>> im = numpy.random.random((512,512)) >>> coeff = my_trafo.transform(im) >>> coeff.shape (33, 512, 512) >>> len(my_trafo.indices) 33
First of all, note that the first dimension of
coeff
is the same as the length ofmy_trafo.indices
. Precisely,my_trafo.indices[i]
encodes information about the alpha-shearlet which is used to compute .The special index
-1
means that the associated alpha-shearlet belongs to the low-pass part.All other indices are of the form
(j, k, c)
, where this 3-tuple describes the properties of the associated alpha-shearlet . Precisely,j
encodes the scale (between 0 andself.num_scales - 1
) of .k
encodes the amount of shearing. This is always an integer satisfying , wherealpha
denotes the value of alpha associated to scalej
.c
encodes the frequency cone in which the alpha-shearlet has its frequency support. For the case of complex-valued alpha-shearlets, the frequency plane is divided into the following four cones:value of c ‘r’ ‘t’ ‘l’ ‘b’ cone right top left bottom For the case of real-valued alpha-shearlets, there are just two frequency cones, the horizontal one (encoded by
'h'
) and the vertical one (encoded by'v'
).
To get an intuitive understanding of the meaning of the indices and to understand the ordering of the different alpha-shearlets, the following code snippet might be helpful. It loops over all shearlets, prints their index and displays a plot of the spectrogram of the shearlet:
>>> import matplotlib.pyplot as plt >>> from AlphaTransform import AlphaShearletTransform as AST >>> my_trafo = AST(512, 512, [0.5]*3) >>> for index, spect in zip(my_trafo.indices, my_trafo.spectrograms): plt.imshow(spect) plt.title("index: {0}".format(index)) plt.show()
One might also experiment with the additional arguments
real=True
orperiodization=False
(passed to theAST
constructor) to see their effect.
-
inverse_transform
(coeffs, real=False, inverse_spects=None, do_norm=True)¶ Computes the inverse alpha-shearlet transform.
Precisely, this method computes the pseudo-inverse of the alpha-shearlet transform. This is the same as first projecting onto the range of the alpha-shearlet transform and then inverting.
In particular, we have the following:
>>> my_trafo = AlphaShearletTransform(512, 512, [0.5]*3) >>> im = np.random.random((512, 512)) >>> coeff = my_trafo.transform(im) >>> np.allclose(im, my_trafo.inverse_transform(coeff)) True
Parameters: - coeffs –
The coefficients of which the inverse transform should be calculated.
Just as for the method
adjoint_transform()
,coeffs
should be roughly of the same type as the return value oftransform()
. Usually, this argument will be obtained directly or indirectly fromtransform()
, e.g. by thresholding. Fore more details, see the documentation ofadjoint_transform()
. - real (bool) –
Setting
real=True
will causeinverse_transform
to only return the real part of the actual inverse transform. Hence, we always have:>>> np.allclose(my_trafo.inverse_transform(coeff), np.real(my_trafo.inverse_transform(im, real=True))) True
Note
This is not the same as passing
real=True
to the constructor of the classAlphaShearletTransform
. - do_norm (bool) –
To obtain the (pseudo)-inverse to the method
transform()
, this parameter must be set to the same value as for callingtransform()
.More precisely, recall that passing
do_norm=True
totransform()
causes the transform to be normalized, i.e., to compute instead of . Ifdo_norm=True
is passed toinverse_transform()
, this normalization is undone and then the usual (pseudo)-inverse is applied. - inverse_spects –
This parameter contains the spectrograms used to compute the inverse transform. For the default value (
None
), the usual spectrograms of the canonical dual frame, i.e., are used, wherew
is the dual frame weight (cf.dual_frame_weight()
).Essentially, this method simply computes , which coincides with the pseudo inverse for the default choice of
inverse_spects
.Warning
The parameter
inverse_spects
is mainly for internal use or for performance optimizations. Only use it if you really know what you are doing!
- coeffs –
-
is_parseval
¶ Boolean flag indicating whether the transform was normalized to obtain a Parseval frame. This is just the same as the value of
parseval
that was passed to the constructor ofAlphaShearletTransform
to constructoself
.
-
is_real
¶ Boolean flag indicating whether the transform was symmetrized in Fourier to obtain real-valued alpha-shearlets. This is just the same as the value of
real
that was passed to the constructor ofAlphaShearletTransform
to constructself
.
-
is_subsampled
¶ Boolean flag indicating whether the transform is subsampled. This is just the same as the value of
subsampled
that was passed to the constructor ofAlphaShearletTransform
to constructself
.
-
num_scales
¶ The number of scales of the alpha-shearlet system. This is the same as the length of the parameter
alphas
that was passed to the constructor ofAlphaShearletTransform
to constructself
.
-
classmethod
num_shears
(alphas, j, real=False)¶
-
periodization
¶ Boolean flag indicating whether the spectrograms of the alpha-shearlets which exceed the frequency range of the discrete fourier transform are periodized (value
True
) or truncated (valueFalse
).This is the same as the value of the parameter
periodization
that was passed to the constructor ofAlphaShearletTransform
to constructself
.To see the difference, executing the following code with different values for
periodization
might be helpful:>>> from AlphaTransform import AlphaShearletTransform >>> import matplotlib.pyplot as plt >>> periodization = True >>> my_trafo = AlphaShearletTransform(512, 512, [0.5]*3, periodization=periodization) >>> i = my_trafo.indices.index((2, -2, 'r')) >>> plt.imshow(my_trafo.spectrograms[i]) >>> plt.show()
-
redundancy
¶ The redundancy of the alpha-shearlet frame associated to
self
. This is the number of coefficients of the transform divided by the number of coefficients of the input image (i.e.,width * height
).For the fully sampled transform, associated to each alpha-shearlet, the number of coefficients is identical to the dimension of the input. Hence, the redundancy is the same as the total number of alpha-shearlets, i.e.,
len(self.indices)
.For the subsampled transform, the redundancy is much lower, but not as easy to calculate. Hence, this property is useful.
-
scale_slice
(scale)¶ Convenience method to determine, for a given scale, the part of the spectrograms or of the transform coefficients that belong to the given scale.
As an example, consider the following:
>>> from AlphaTransform import AlphaShearletTransform >>> my_trafo = AlphaShearletTransform(512, 512, [0.5]*3) >>> my_trafo.scale_slice(-1) slice(0, 1, None) >>> my_trafo.scale_slice(0) slice(1, 13, None) >>> my_trafo.scale_slice(1) slice(13, 33, None) >>> my_trafo.scale_slice(2) slice(33, 53, None)
Hence, if
coeff = my_trafo.transform(im)
for a given imageim
, thencoeff[0:1]
is the part belonging to scale-1
(i.e., the low-pass part),coeff[1:13]
is the part associated to scale0
, etc.One can even write
coeff[my_trafo.scale_slice(1)]
to directly get the part of the transform coefficients associated to scale1
, etc.
-
shearlets
¶ A list (or a generator) of the (space-side, non-normalized) alpha-shearlets associated to the transform.
A generator is returned if the
self
object was created with the optiongenerator=True
.
-
space_norms
¶ This property yields the space-side L² norms of the analyzing alpha-shearlets. The return value is a single tuple containing all norms.
Note
We use the unitary version of the Fourier transform, so that the dirac delta at the origin satisfies .
Regarding the convolution theorem, this implies
Hence, since we implement the convolution with the different alpha-shearlets as multiplication in the Fourier domain with the elements of
self.spectrograms
, the i-th space-side shearlet is given byHence, its L² norm is
-
spectrograms
¶ A list of the spectrograms (Fourier transforms) of the alpha-shearlets associated to the transform.
Note
If the transform was constructed with
generator=True
, the return value is a generator instead of a list.The ordering of this list is the same as that of
indices()
and of the return value oftransform()
, i.e., ifcoeff = self.transform(im)
for some imageim
, thencoeff[i]
are the coefficients associated to the alpha-shearlet with Fourier transformself.spectrograms[i]
whose “geometric meaning”(scale, shear, cone)
is given byself.indices[i]
.Warning
The spectrograms are optimized for plotting, via
matplotlib.pyplot.imshow()
, not for computations. Hence, they are still “FFT shifted”. This can be undone by consideringfourier_util.my_ifft_shift(self.spectrograms[i])
.
-
transform
(image, do_norm=True)¶ Computes the alpha-shearlet transform of
image
, where the properties (number of scales, value of alpha, etc.) of the transform are determined by theself
object.Parameters
Parameters: - image (numpy.ndarray) – The “image” of which the transform should be computed.
image
must be a 2-dimensionalnumpy.ndarray
satisfyingimage.shape == (self.height, self.width)
. - do_norm (bool) – Boolean flag indicating whether the transform should be
normalized by the (space-side) L² norms of the analyzing
alpha-shearlets. Hence, if
do_norm=True
, then the returned coefficients correspond to , instead of .
Return value
Returns: The (possibly normalized) alpha-shearlet coefficients of image
. For a precise description of what is computed, we refer to the technical report.Depending on the settings of the
self
object, the return type varies:- For the fully sampled transform with
generator=False
, the return value is a single 3-dimensionalnumpy.ndarray
of dimension(self.redundancy, self.height, self.width
). - For the fully sampled transform with
generator=True
, the return value is a generator which produces the same output (one 2-dimensionalnumpy.ndarray
at a time) as for the ordinary fully sampled transform. - For the subsampled transform, the return value is a list of 2-dimensional numpy arrays of varying dimensions.
- image (numpy.ndarray) – The “image” of which the transform should be computed.
-
transform_generator
(image, do_norm=True)¶ This method does the same as
transform()
, but always returns a generator instead of alist
or anumpy.ndarray
.


E-farm is an Online grocery shop built on our number one principle: Customers Deserve Better. We are dedicated to being different, to be better at providing online shopping experience and same day delivery service that works for our customers, not against. We offer both Express and Scheduled delivery.
 Try us today
Talk to Us
<EMAIL_ADDRESS>Tel +254712345678
We are happy to here from you!


Camp was dull. Ron went by the pond. There was a log. There was a rope. Ron said, "What can I do with that?" Ron put the rope on the log. He sat on the log. He rode it as if it was a colt! He hung on to the rope and rode, and rode. The sun set. Ron was alone. There was smoke. He ran back to camp. The grill was on! Ron was glad. Dad said, "I hope you are hungry!"
in-context


myproject_exec
XX:XX:XX
0
EXEC
Modules
Drivers
Archives
QTask
Level0
Level1
Level2
Level3
HMI
INFO
OWS
prev
next
OwsDrv
prev
next
PROJECT
RPI
prev
next
RPiDrv
prev
next
myproject_task
prev
next
Plain project
See the README.md file in project
folder for detailed information.


Performs distance sampling simulations.It repeatedly generates instances of a user defined population within a given survey region, generates realisations of a survey design (currently these must be generated using Distance software in advance <http://distancesampling.org/>) and simulates the detection process. The data are then analysed so that the results can be compared for accuracy and precision across all replications. This will allow users to select survey designs which will give them the best accuracy and precision given their expectations about population distribution. Any uncertainty in population distribution or population parameters can be included by running the different survey designs for a number of different population descriptions. An example simulation can be found in the help file for make.simulation.
| Version: | 1.1.3 |
| Depends: | mrds, methods |
| Imports: | graphics, splancs, mgcv, shapefiles, rgeos, fields, sp |
| Suggests: | testthat, parallel, pbapply, knitr, rmarkdown |
| Published: | 2018-06-27 |
| Author: | Laura Marshall |
| Maintainer: | Laura Marshall <lhm at st-and.ac.uk> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Materials: | NEWS |
| CRAN checks: | DSsim results |
| Reference manual: | DSsim.pdf |
| Vignettes: |
DSsim - Truncation Distances |
| Package source: | DSsim_1.1.3.tar.gz |
| Windows binaries: | r-devel: DSsim_1.1.3.zip, r-release: DSsim_1.1.3.zip, r-oldrel: DSsim_1.1.3.zip |
| OS X binaries: | r-release: DSsim_1.1.3.tgz, r-oldrel: DSsim_1.1.3.tgz |
| Old sources: | DSsim archive |
Please use the canonical form https://CRAN.R-project.org/package=DSsim to link to this page.


Dropdown Button
Action
Another action
Something else here
Settings
Action
Another action
Something else here


--- layout: post title: HTML5 drawing date: '2014-08-31T07:30:00+02:00' categories: - Sketches picture_url: https://film-Storyboards.tumblr.com/post/96256764533/html5-drawing ---
Drawn with Harmony, an online drawing tool by Mr.doob.


The first task is simple. You'll see a grid of cubes 4 times, but there's always one cube missing. Tell me the numbers of the missing cubes.
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
Now it's time for the real challenge. Select (or type) the missing number before the cubes are gone!
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
That's it, you reached the finish line!
This game was created for JS13K! It's made with Phenomenon, my 2kb WebGL library.