|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |
| Packages that use org.tuckey.web.filters.urlrewrite | |
|---|---|
| org.tuckey.web.filters.urlrewrite | |
| org.tuckey.web.filters.urlrewrite.sample | |
| org.tuckey.web.filters.urlrewrite.utils |
| Classes in org.tuckey.web.filters.urlrewrite used by org.tuckey.web.filters.urlrewrite | |
|---|---|
| Condition
Conditions must be met when the filter is processing a url. |
|
| ConditionMatch
|
|
| Conf
Configuration object for urlrewrite filter. |
|
| OutboundRule
Defines an outbound rule that can be run against a link in a page. |
|
| RewrittenOutboundUrl
Holds information about the rewritten outbound url. |
|
| RewrittenUrl
Holds information about the rewirtten url. |
|
| Rule
|
|
| RuleBase
Defines a rule that can be run against an incoming request. |
|
| RuleChain
Chain of rules. |
|
| RuleExecutionOutput
|
|
| Run
Defines a run element, the ability to run a methodStr (eg, xx(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)) |
|
| Runnable
Inteface for something that contains Run's, so we can initialise cleanly. |
|
| SetAttribute
|
|
| TypeConverter
Assists with the setting of variable type names for condition types and rule to variables. |
|
| UrlRewriteFilter
Based on the popular and very useful mod_rewrite for apache, UrlRewriteFilter is a Java Web Filter for any J2EE compliant web application server (such as Resin or Tomcat), which allows you to rewrite URLs before they get to your code. |
|
| UrlRewriter
The main rewriter. |
| Classes in org.tuckey.web.filters.urlrewrite used by org.tuckey.web.filters.urlrewrite.sample | |
|---|---|
| Conf
Configuration object for urlrewrite filter. |
|
| UrlRewriteFilter
Based on the popular and very useful mod_rewrite for apache, UrlRewriteFilter is a Java Web Filter for any J2EE compliant web application server (such as Resin or Tomcat), which allows you to rewrite URLs before they get to your code. |
|
| UrlRewriter
The main rewriter. |
| Classes in org.tuckey.web.filters.urlrewrite used by org.tuckey.web.filters.urlrewrite.utils | |
|---|---|
| Conf
Configuration object for urlrewrite filter. |
|
||||||||||
| PREV NEXT | FRAMES NO FRAMES |


Lata Mangeshkar doing much better, says family
Lata Mangeshkar, 90, was admitted to the Breach Candy Hospital after she complained of difficulty in breathing last week.
by PTILegendary singer Lata Mangeshkar, who is still in the Intensive Care Unit of a hospital, is doing “much better”, her family said on Thursday, adding they can’t comment further.
Mangeshkar, 90, was admitted to the Breach Candy Hospital after she complained of difficulty in breathing last week.
“Lata ji is doing much better now. Beyond this, we can’t comment. Please respect our privacy,” Mangeshkar’s niece Rachana Shah told PTI. The hospital sources refused to comment on the status of the veteran singer’s health.
In her over seven-decade long career, Mangeshkar has sung more than 30,000 songs across languages. She is considered one of the greatest playback singers in Indian cinema. She received the Bharat Ratna, India’s highest civilian honour, in 2001.


×
This is my new portfolio. For the old one, click
here
.
Darius Lukas
Web Portfolio
Home
Projects
This Site
Me working on a carbon fiber quadcopter part late at night
The finished carbon fiber parts
An Arduino-based quadcopter I made for a school project
A plan for a carbon fiber rocket my partner and I built in science class. The check marks are from production, marking which parts had been produced.
❮
❯
Contact:
<EMAIL_ADDRESS>443-694-0179


How frequently do you want to be notified by blood seekers?
Do you have transportation?
Select countries you have visited in the last 2 months.
Please Indicate your time availability in the following table
Do you have any of the following diseases:


Wheels (2014)
Directed by:
Tim Gagliardo, Donavon Warren
Synopsis:
Two suicidal paraplegic junkies hustle their way through the city streets trying to find a reason to live.
View on LetterboxdNotes
-
The narration throughout the whole film felt really cheesy. Especially in the beginning when it started with Mickey saying “every day I think about death”. Opening the film with Mickey slitting his wrists would have been more effective.
-
I laughed so hard when the father tells young Mickey that his brother has died and rather than try to explain anything or grieve with his son he fiendishly lights up a cigarette 🤣
-
Acting was pretty poor, but there were a lot of really gorgeous shots throughout the whole film. Especially towards the end at the beach and when Drake and Mickey are in the water.
-
Mickey was paralyzed for years and years and then can all of a sudden stand up and walk? Even if that was possible he would need extreme physical therapy to walk again… I know “it’s just a movie” but idk… it really bothered me.
Participants
- Austin
- Carson
- Reilly
- Ben
- Jonas
Rating
December ‘22 Film
Pulp Fiction (1994)Host: Ben


Before Change
// print evaluation
for label, average_precision in average_precisions.items():
print(self.generator.label_to_name(label), "{:.4f}".format(average_precision))
print("mAP: {:.4f}".format(sum(average_precisions.values()) / len(average_precisions)))
After Change
self.mean_ap = sum(average_precisions.values()) / len(average_precisions)
if self.tensorboard is not None and self.tensorboard.writer is not None:
import tensorflow as tf
summary = tf.Summary()
summary_value = summary.value.add()
summary_value.simple_value = self.mean_ap
summary_value.tag = "mAP"
self.tensorboard.writer.add_summary(summary, epoch)
if self.verbose == 1:
for label, average_precision in average_precisions.items():
print(self.generator.label_to_name(label), "{:.4f}".format(average_precision))
print("mAP: {:.4f}".format(self.mean_ap))


| diag-constructors {pbdDMAT} | R Documentation |
Get the diagonal of a distributed matrix, or construct a distributed matrix which is diagonal.
## S4 method for signature 'vector' diag(x, nrow, ncol, type = "matrix", ..., bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT) ## S4 method for signature 'character' diag(x, nrow, ncol, type = "matrix", ..., min = 0, max = 1, mean = 0, sd = 1, rate = 1, shape, scale = 1, bldim = .pbd_env$BLDIM, ICTXT = .pbd_env$ICTXT) ## S4 method for signature 'ddmatrix' diag(x) ## S4 method for signature 'matrix' diag(x, nrow, ncol)
x |
distributed matrix or a vector. |
nrow, ncol |
in the case that |
type |
character. Options are 'matrix' or 'ddmatrix', with partial matching. This specifies the return type. |
... |
Extra arguments |
bldim |
blocking dimension. |
ICTXT |
BLACS context number. |
min, max |
Min and max values for random uniform generation. |
mean, sd |
Mean and standard deviation for random normal generation. |
rate |
Rate for random exponential generation. |
shape, scale |
Shape and scale parameters for random weibull generation. |
Gets the diagonal of a distributed matrix and stores it as a global R vector owned by all processes.
If a distributed matrix is passed to diag()
then it returns a
global R vector.
If a vector (numeric or character) is passed to diag()
and
type='ddmatrix'
, then the return is a diagonal distributed matrix.
## Not run: # Save code in a file "demo.r" and run with 2 processors by # > mpiexec -np 2 Rscript demo.r library(pbdDMAT, quiet = TRUE) init.grid() ### Grab diagonal of a ddmatrix x <- ddmatrix(1:16, 4, bldim=2) y <- diag(x) comm.print(y) ### Construct a diagonal ddmatrix eye <- diag(1, 10, type="ddmatrix", bldim=2) eye finalize() ## End(Not run)


Jinzhe Zeng's Blog
GitHub
中文
East China Normal University
Search Name According to student ID
Please input the student ID:
Notice
You must comply with the "Network Security Law of the People's Republic of China" and other laws and regulations.
Available only when www.freshman.ecnu.edu.cn can be connected.


is a trivia game. Each player starts with 500 points.
When it's your turn you'll be shown a category.
You can decide to answer the question yourself or you can force another player to answer.
If you keep the question and answer correctly, you get nothing!
If you get it wrong, you'll lose 100 points.
If you pass the question and the player you pass to gets it right,you'll lose 200 points.
If they get it wrong they will lose 100 points.
There is no way to get points back.
Play continues until one player loses all of their points or until the question pool for that game has been exhausted.
There are no winners.
The object of the game is to not be the one who loses.
Are you the least intelligent person in the room? Time to find out!


Role editor
close
edit
Please fill in the username above to edit the user role.
User "{{ username }}" is banned from the application.
Unban this user
Existing roles of "{{ username }}":
Ban this user
{{ HUMAN_READABLE_ROLES[role] | titlecase }}
edit
close
{{HUMAN_READABLE_ROLES[role]}}
add_circle
Add role
Roles


Eight arrested in Gabon corruption purge
by AFPIn Summary
- Gabon has detained eight people for theft and money-laundering as the government intensifies a crackdown on corruption.
- Pro-government newspaper L'Union reported more than 85 billion CFA francs (Sh14.6 billion) have "evaporated" over the past two years from the funds of the Gabon Oil Company.
- The current investigations are a follow-up to Operation Mamba, an anti-corruption campaign launched in 2017 by President Ali Bongo.
Libreville
Oil-rich Gabon has detained eight people for theft and money-laundering as the government intensifies a crackdown on corruption, the prosecutor for the capital Libreville said Thursday.
The revived anti-graft drive has seen a string of top-level arrests in the central African country, as accusations that millions of euros have disappeared from state coffers swirl around top officials.
"Eight people have been placed in preventive detention," said prosecutor Andre Patrick Roponat, adding that they were accused of "siphoning off public funds and money-laundering."
The group appeared before a judge on Wednesday along with eight others who were released on bail, Roponat said.
Pro-government newspaper L'Union reported this week that more than 85 billion CFA francs (Sh14.6 billion) have "evaporated" over the past two years from the funds of the Gabon Oil Company.
BONGO CORRUPTION PURGE
The current investigations are a follow-up to Operation Mamba -- an anti-corruption campaign launched in 2017 by President Ali Bongo, who has been battling serious illness.
The 60-year-old president said last month he was "fiercely determined" to push ahead with the campaign against graft.
One high-profile political figure embroiled in the affair is Brice Laccruche Alihanga, Bongo's former cabinet director who took the lead and spoke for the president after he suffered a stroke in 2018.
Laccuruche had held his cabinet post for more than two years but was dismissed on November 7 -- at the start of a wave of arrests.
He has announced on social media that he will undertake a new mission for "the president and for Gabon".
Earlier this week, lawyers told AFP that presidential spokesman Ike Ngouoni and a dozen others were arrested and questioned over their ties to Alihanga.
During his months-long absence abroad for treatment, speculation over Bongo's fitness surged and the army quashed a brief attempted coup.
Bongo has ruled Gabon since 2009, following the death of his father Omar Bongo, who was in power from 1967.


Designate Manage CLI¶
This chapter documents designate-manage
For help on a specific designate command, enter:
$ designate-manage COMMAND --help
designate-manage¶
designate-manage usage¶
usage: designate-manage [-h] [--config-dir DIR] [--config-file PATH] [--debug]
[--log-config-append PATH] [--log-date-format DATE_FORMAT]
[--log-dir LOG_DIR] [--log-file PATH] [--nodebug]
[--nouse-syslog] [--nouse-syslog-rfc-format] [--noverbose]
[--nowatch-log-file]
[--syslog-log-facility SYSLOG_LOG_FACILITY] [--use-syslog]
[--use-syslog-rfc-format] [--verbose] [--version]
[--watch-log-file]
designate optional arguments¶
--config-dir DIR
- Path to a config directory to pull *.conf files from. This file set is sorted, so as to provide a predictable parse order if individual options are over-ridden. The set is parsed after the file(s) specified via previous –config-file, arguments hence over-ridden options in the directory take precedence.
--config-file PATH
- Path to a config file to use. Multiple config files can be specified, with values in later files taking precedence. Defaults to None.
--debug, -d
- If set to true, the logging level will be set to DEBUG instead of the default INFO level.
--log-config-append PATH, --log_config PATH
- The name of a logging configuration file. This file is appended to any existing logging configuration files. For details about logging configuration files, see the Python logging module documentation. Note that when logging configuration files are used then all logging configuration is set in the configuration file and other logging configuration options are ignored (for example, logging_context_format_string).
--log-date-format DATE_FORMAT
- Defines the format string for %(asctime)s in log records. Default: None . This option is ignored if log_config_append is set.
--log-dir LOG_DIR, --logdir LOG_DIR
- (Optional) The base directory used for relative log_file paths. This option is ignored if log_config_append is set.
--log-file PATH, --logfile PATH
- (Optional) Name of log file to send logging output to. If no default is set, logging will go to stderr as defined by use_stderr. This option is ignored if log_config_append is set.
--nodebug
- The inverse of –debug
--nouse-syslog
- The inverse of –use-syslog
--nouse-syslog-rfc-format
- The inverse of –use-syslog-rfc-format
--noverbose
- The inverse of –verbose
--nowatch-log-file
- The inverse of –watch-log-file
--syslog-log-facility SYSLOG_LOG_FACILITY
- Syslog facility to receive log lines. This option is ignored if log_config_append is set.
--use-syslog
- Use syslog for logging. Existing syslog format is DEPRECATED and will be changed later to honor RFC5424. This option is ignored if log_config_append is set.
--use-syslog-rfc-format
- Enables or disables syslog rfc5424 format for logging. If enabled, prefixes the MSG part of the syslog message with APP-NAME (RFC5424). This option is ignored if log_config_append is set.
--verbose, -v
- If set to false, the logging level will be set to WARNING instead of the default INFO level.
--watch-log-file
- Uses logging handler designed to watch file system. When log file is moved or removed this handler will open a new log file with specified path instantaneously. It makes sense only if log_file option is specified and Linux platform is used. This option is ignored if log_config_append is set.
designate-manage pool¶
designate-manage pool export_from_config¶
usage: designate-manage pool export_from_config [-h] [--file FILE]
Export a YAML copy of a Kilo/Liberty pool config.
Optional arguments:
-h, --help
- show this help message and exit
--file FILE
- The path to the file the yaml output should be written to (Defaults to /etc/designate/pools.yaml)
designate-manage pool generate_file¶
usage: designate-manage pool generate_file [-h] [--file FILE]
Export a YAML copy of the current running pool config
Optional arguments:
-h, --help
- show this help message and exit
--file FILE
- The path to the file the yaml output should be written to (Defaults to /etc/designate/pools.yaml)
designate-manage pool update¶
usage: designate-manage pool update [-h] [--file FILE] [--delete DELETE]
[--dry_run DRY_RUN]
Update the running pool config from a YAML file
Optional arguments:
-h, --help
- show this help message and exit
--file FILE
- The path to the file that should be used to update the pools config (Defaults to /etc/designate/pools.yaml)
--delete DELETE
- Any Pools not listed in the config file will be deleted. .. warning:: This will delete any zones left in this pool
--dry_run DRY_RUN
- This will simulate what will happen when you run this command
designate-manage database¶
designate-manage database sync¶
usage: designate-manage database sync [-h] [--revision REVISION]
Update the designate database schema
Optional arguments:
-h, --help
- show this help message and exit
--revision REVISION
- The version that the designate database should be synced to. (Defaults to latest version)
designate-manage database version¶
usage: designate-manage database version [-h]
Show what version of the database schema is currently in place
Optional arguments:
-h, --help
- show this help message and exit
designate-manage pool_manager_cache¶
designate-manage pool_manager_cache sync¶
usage: designate-manage pool_manager_cache sync [-h] [--revision REVISION]
Update the designate pool manager cache database schema
Optional arguments:
-h, --help
- show this help message and exit
--revision REVISION
- The version that the designate pool manager cache database should be synced to. (Defaults to latest version)
designate-manage pool_manager_cache version¶
usage: designate-manage pool_manager_cache version [-h]
Show what version of the pool manager cache database schema is currently in place
Optional arguments:
-h, --help
- show this help message and exit
designate-manage powerdns¶
designate-manage powerdns sync¶
usage: designate-manage powerdns sync [-h] [--revision REVISION] POOL_ID
Update the designate powerdns database schema
Required arguments:
POOL_ID
- The pool that should be upgraded or migrated
Optional arguments:
-h, --help
- show this help message and exit
--revision REVISION
- The version that the designate pool manager cache database should be synced to. (Defaults to latest version)
designate-manage powerdns version¶
usage: designate-manage powerdns version [-h] POOL_ID
Show what version of the powerdns database schema is currently in place
Required arguments:
POOL_ID
- The pool that should be upgraded or migrated
Optional arguments:
-h, --help
- show this help message and exit


Datetime attribute
2017-12-13T17:43:00
Friday, December 13th, 2017 5:43pm
02:30:30
Expires in 2 hours 00 minutes 00 seconds
P61D
61 days


Home
Reservations
Reward Center
Languages
Where to?
Paris, France
Las Vegas, USA
Cork, Ireland
San Francisco, USA
Miami, USA
Barcelona, Spain
Find it
Weather Condition
Temperature
° F
|
° C
Wind
@
MPH
|
KPH
Visibility
M
|
KM


Drug Facts
| Active ingredient (in each tablet) |
Purpose |
| Ranitidine 150mg (as ranitidine hydrochloride 168 mg)...................................................................................................... |
Acid reducer |
Uses
- relieves heartburn associated with acid indigestion and
sour stomach
- prevents heartburn associated with acid indigestion and
sour stomach brought on by eating or drinking certain foods and beverages
Warnings
Allergy
alert: Do not use if you are allergic to ranitidine or other
acid reducers
Do not use
- if you have trouble or pain swallowing food, vomiting with
blood, or bloody or black stools. These may be signs of a serious
condition. See your doctor.
- with other acid reducers
- if you have kidney disease, except under the advice and
supervision of a doctor
Ask a doctor before use if you have
- had heartburn over 3 months. This may be a sign of a more
serious condition.
- heartburn with lightheadedness, sweating or dizziness
- chest pain or shoulder pain with shortness of breath; sweating;
pain spreading to arms, neck or shoulders; or lightheadedness
- frequent chest pain
- frequent wheezing, particularly with heartburn
- unexplained weight loss
- nausea or vomiting
- stomach pain
Stop use and ask a doctor if
- your heartburn continues or worsens
- you need to take this product for more than 14 days
If pregnant or breast-feeding, ask a health professional before use.
Keep out of reach of children. In case
of overdose, get medical help or contact a Poison Control Center right
away.
Directions
- adults and children 12 years and over:
- to relieve symptoms, swallow 1 tablet with
a glass of water
- to prevent symptoms, swallow 1 tablet with
a glass of water 30 to 60 minutes before eating food
or drinking beverages that cause heartburn
- can be used up to twice daily (do not take more than 2 tablets
in 24 hours)
- children under 12 years: ask a doctor
Other information
- do not use if printed foil under bottle cap is open or torn
(bottles)
- do not use if individual blister unit is open or torn (blisters)
- do not use if individual packet is open or torn (pouch)
- store at 20º-25ºC (68º-77ºF)
- avoid excessive heat or humidity
- this product is sodium and sugar free
Inactive ingredients
hypromellose, magnesium stearate, microcrystalline
cellulose, synthetic red iron oxide, titanium dioxide, triacetin
Questions?
Call 1-888-285-9159 (English/Spanish)
M – F, 8:30 – 5 EST, or visit www.zantacotc.com
Read the directions,
consumer information leaflet and warnings before use. Keep the carton.
It contains important information.
Boehringer Ingelheim Consumer Health Care
Products
Division of Boehringer Ingelheim Pharmaceuticals,
Inc., Ridgefield, CT 06877
Copyright © 2014, Boehringer
Ingelheim Pharmaceuticals, Inc. All rights reserved.
Product
of Spain. Manufactured in Mexico.
Zantac 150 mg - 24
Count Blister Carton
Zantac 150 mg
- 65 Count Bottle Carton
Boehringer Ingelheim Pharmaceuticals Inc.


Hello and Welcome to Marcel Penney Media! Here I employ clean, creative, and responsive UX/UI front-end web development utilizing CSS, HTML, Bootstrap and JavaScript (functional and object-oriented programming), with experience using JSON API's, JQuery, Git and GitHub, and constantly adding new technologies and tools to the toolbox. Please look around and feel free to contact me if you have any questions. Thank you / Merci!


subject = "Focus Sampling - Reset your password" description = "Reset your password" ==
Hello {{ user.name }}
Please this password to login again for your app:
Password:{{new_password}}
Automated message.please do not reply


BsMultiSelect API Demo
Manipulate "Two synchronized multiselects"
Attach | Dispose
Component: Disable | Enable
Disable options:
Hide options:
Add new / Remove:
Add
Add
Remove
Two synchronized multiselects
Languages1:
Languages2:


|
Prismic.io PHP kit
3.0.0
|
Public Member Functions | |
| resolve ($link) | |
| __invoke ($link) | |
| resolveDocument ($document) | |
| resolveLink ($link) | |
| isBookmarkDocument ($api, $document, $bookmark) | |
| isBookmark ($api, $link, $bookmark) | |
The LinkResolver convert prismic.io's links into your application's ones. Since prismic.io can't possibly know how to resolve internal links into usable ones for your application, you have to teach it! That way, you can pass this knowledge as a LinkResolver object into any operation that may have to resolve URLs (such as calling asHtml() on StructuredText or Link fragments).
If you're using a starter project, it usually comes with a basic linkResolver object, located at a relevant place, and made available everywhere in your application.
Read the last paragraph of prismic.io's API documentation to better understand the idea.
| Prismic\LinkResolver::__invoke | ( | $link | ) |
What happens when the link resolver gets called.
| DocumentLink | $link | The document link |
| Prismic\LinkResolver::isBookmark | ( | $api, | |
| $link, | |||
| $bookmark | |||
| ) |
Returns true if the given document link corresponds to the given bookmark
| API | $api | The API |
| DocumentLink | $link | The document link to test |
| string | $bookmark | The bookmark to test |
| Prismic\LinkResolver::isBookmarkDocument | ( | $api, | |
| $document, | |||
| $bookmark | |||
| ) |
Returns true if the given document corresponds to the given bookmark
| API | $api | The API |
| Document | $document | The document to test |
| string | $bookmark | The bookmark to test |
|
abstract |
Returns the application-specific URL related to this document link, or null if the link is deemed invalid
| DocumentLink | $link | The document link |
| Prismic\LinkResolver::resolveDocument | ( | $document | ) |
| Prismic\LinkResolver::resolveLink | ( | $link | ) |
Returns the application-specific URL related to this document link
| DocumentLink | $link | The document link |


An experience with mixed results
Currying is the process of translating the evaluation of a function that takes multiple arguments into evaluating a sequence of functions, each with a single argument. Source Wikipedia
add : Int -> Int -> Int
add number1 number2 = number1 + number2
-- Let's curry it!
add5 : Int -> Int
add5 = add 5
-- Let's use it now!
marks : List Int
bumpedMarks = List.map add5 marks
weatherForecast : LinearRegression
weatherForecast = List.map .weather lastYearDays -- List Day -> List Weather
|> List.map .topTemperature -- List Weather -> List Int
|> List.indexedMap (\index temp -> [index, temp] ) -- List Int -> List [ Int, Int ]
|> computeLinearRegression 2 -- List [ Int, Int ] -> LinearRegression
Was formerly known as event sourcing before Facebook "renamed" it.
Uni-directional data flow
Maybe.withDefault
Hello world
~50LoC => 19K => 7K
hello
├── [103K] app.js
├── [ 19K] app.min.js
├── [7.2K] app.min.js.gzip
├── [ 233] elm.json
├── [ 275] index.html
└── [1.0K] Main.elm
ep-stats
~2500 + ~800LoC => 150K => 47K
dist/
├── [ 73K] app.css
├── [305K] app.js
├── [ 54K] app.min.css
├── [ 12K] app.min.css.gzip
├── [ 89K] app.min.js
├── [ 28K] app.min.js.gzip
├── [4.0K] assets
│ ├── [130K] fa-solid-900.eot
│ ├── [477K] fa-solid-900.svg
│ ├── [130K] fa-solid-900.ttf
│ ├── [ 62K] fa-solid-900.woff
│ ├── [ 49K] fa-solid-900.woff2
│ └── [ 791] icon.png
└── [6.1K] index.html
Two techniques
| Criteria | Evaluated? | My opinion |
|---|---|---|
| Syntax | ||
| Productivity | ||
| Upgrade-ability | ||
| Readability | ||
| Documentation | ||
| Bundle size | ||
| Cost of performance | ||
| Debugging | ||
| Reliability | ||
| Browsers API | ||
| Tests | ? |
elm diff truqu/elm-base64 1.0.0 2.0.0
This is a MAJOR change.
---- Base64 - MAJOR ----
Changed:
- encode : String -> Result String String
+ encode : String -> String
| Criteria | Evaluated? | My opinion |
|---|---|---|
| Modules | ||
| Package management | ||
| IDE integration | ||
| Tooling | ||
| Community | ? | |
| Module authoring | ? |
import Url exposing (Url)
import Url.Parser as Url exposing (Parser, (</>))
urlToPage : Url -> Page
urlToPage url =
url
|> Url.parse urlParser
|> Maybe.withDefault Index
urlParser : Parser (Page -> a) a
urlParser =
Url.oneOf
[ Url.map Index Url.top -- Matches /
, Url.map Cats (Url.s "cats") -- Matches /cats
, Url.map User (Url.s "user" </> Url.int) -- Matches /user/{userId}
]
type alias StorageAppState =
{ appKey: String
, accessToken: Maybe String
, selectedLanguage: String
}
storageAppStateDecoder : Decoder StorageAppState
storageAppStateDecoder =
Decode.succeed StorageAppState
|> Pipeline.optional "appKey" Decode.string ""
|> Pipeline.optional "accessToken" (maybe Decode.string) Nothing
|> Pipeline.optional "selectedLanguage" Decode.string "defaultLanguage"
decodeStorageAppState : Decode.Value -> StorageAppState
decodeStorageAppState appKeyAsJson =
case Decode.decodeValue storageAppStateDecoder appKeyAsJson of
Ok appState -> appState
Err _ -> StorageAppState "" Nothing "defaultLanguage"
fetchAllStats : String -> String -> Cmd Msg
fetchAllStats sheetId accessToken = Http.request
{ method = "GET"
, headers = [ createBearerHeader accessToken ]
, url = computeSheetDataUrl sheetId
, body = Http.emptyBody
, expect = Http.expectString (StatsMsg << GotStats)
, timeout = Nothing
, tracker = Nothing
}
update: Msg -> Model -> (Model, Cmd Msg)
update msg model =
case statsMsg of
GotStats httpResult ->
case httpResult of
Ok statsAsString -> updateStats statsAsString model eraseAppKeyFromStorage
Err error ->
case error of
BadStatus status ->
case status of
401 -> ( model, load ( makeAuthorizationUrl model.baseUrl ) )
403 -> ( model, load ( makeAuthorizationUrl model.baseUrl ) )
_ -> ( model, Cmd.none )
_ -> ( model, Cmd.none )
| Criteria | Evaluated? | My opinion |
|---|---|---|
| Routing | ||
| Serialization | ||
| HTTP | ||
| State management | ||
| Oauth | ||
| Logging | ||
| I18N | ||
| L10N | ? |
I loved the experience
I wouldn't use it in prod just yet
I definitely would prefer it to JS on industrial apps
Don't use it until it matches your needs


Tutorial 1. Basic Host Programming¶
Most of the code in these tutorials are extracted from our open examples.
In this tutorial, we are showing the sample host code that uses the CM runtime API directly. The sample code may look a little verbose, however, developers can come up some higher-level utility library on top of the C for Metal runtime to make their code more concise.
Step 1. Create C for Metal Device¶
// Creates a CmDevice from scratch.
// Param device: pointer to the CmDevice object.
// Param version: CM API version supported by the runtime library.
CmDevice *device = nullptr;
unsigned int version = 0;
cm_result_check(::CreateCmDevice(device, version));
Step 2. Load Program¶
- C for Metal compilation happens at two stages
- Offline: cmc compiles C for Metal to virtual ISA
- Just-In-Time: virtual ISA to target ISA
- LoadProgram: load virtual ISA into runtime
- JIT-compilation happens during LoadProgram
// The file linear_walker_genx.isa is generated when the kernels in the file
// linear_walker_genx.cpp are compiled by the CM compiler.
// Reads in the virtual ISA from "linear_walker_genx.isa" to the code
// buffer.
std::string isa_code = cm::util::isa::loadFile("linear_walker_genx.isa");
if (isa_code.size() == 0) {
std::cerr << "Error: empty ISA binary.\n";
exit(1);
}
// Creates a CmProgram object consisting of the kernels loaded from the code
// buffer.
// Param isa_code.data(): Pointer to the code buffer containing the virtual
// ISA.
// Param isa_code.size(): Size in bytes of the code buffer containing the
// virtual ISA.
CmProgram *program = nullptr;
cm_result_check(device->LoadProgram(const_cast<char*>(isa_code.data()),
isa_code.size(),
program));
Step 3. Create Kernel¶
Retrieve the target binary of a kernel from a loaded program.
// Creates the linear kernel.
// Param program: CM Program from which the kernel is created.
// Param "linear": The kernel name which should be no more than 256 bytes
// including the null terminator.
CmKernel *kernel = nullptr;
cm_result_check(device->CreateKernel(program,
"linear",
kernel));
Step 4. Create Surfaces¶
// Creates input surface with given width and height in pixels and format.
// Sets surface format as CM_SURFACE_FORMAT_A8R8G8B8. For this format, each
// pixel occupies 32 bits.
// The input image is RGB format with 24 bits per pixel, and the surface
// format is A8R8G8B8 with 32 bits per pixel. Therefore, the surface width
// is (width*3/4) in pixels.
CmSurface2D *input_surface = nullptr;
cm_result_check(device->CreateSurface2D(width*3/4,
height,
CM_SURFACE_FORMAT_A8R8G8B8,
input_surface));
// Copies system memory content to the input surface using the CPU. The
// system memory content is the data of the input image. The size of data
// copied is the size of data in the surface.
cm_result_check(input_surface->WriteSurface(input_image.getData(), nullptr));
// Creates the output surface. The width, height and format is the same as
// the input surface.
CmSurface2D *output_surface = nullptr;
cm_result_check(device->CreateSurface2D(width*3/4,
height,
CM_SURFACE_FORMAT_A8R8G8B8,
output_surface));
Step 5. Create Thread Space¶
This function sets up a hardware mechanism called media-walker for launching threads. Media-walker generates thread-identifiers, and puts them into thread-payloads. C for Metal kernel program can get thread-ids using C for Metal intrinsics.
Media-walker is the preferred way of doing GEN media programming, which has lower driver overhead (less work in preparing the commands) and faster enqueue time.
// Each CmKernel can be executed by multiple concurrent threads.
// Here, for "linear" kernel, each thread works on a block of 6x8 pixels.
// The thread width is equal to input image width divided by 8.
// The thread height is equal to input image height divided by 6.
int thread_width = width/8;
int thread_height = height/6;
// Creates a CmThreadSpace object.
// There are two usage models for the thread space. One is to define the
// dependency between threads to run in the GPU. The other is to define a
// thread space where each thread can get a pair of coordinates during
// kernel execution. For this example, we use the latter usage model.
CmThreadSpace *thread_space = nullptr;
cm_result_check(device->CreateThreadSpace(thread_width,
thread_height,
thread_space));
Step 6. Set Kernel Arguments¶
Kernel argument is dynamic constant for all threads. Value is logged at the time of setting kernel arg. The size of total kernel arguments has to be less than 256 bytes. For linear filter, we need to pass surface index as kernel arguments.
// When a surface is created by the CmDevice a SurfaceIndex object is
// created. This object contains a unique index value that is mapped to the
// surface.
// Gets the input surface index.
SurfaceIndex *input_surface_idx = nullptr;
cm_result_check(input_surface->GetIndex(input_surface_idx));
// Sets a per kernel argument.
// Sets input surface index as the first argument of linear kernel.
cm_result_check(kernel->SetKernelArg(0,
sizeof(SurfaceIndex),
input_surface_idx));
// Gets the output surface index.
SurfaceIndex *output_surface_idx = nullptr;
cm_result_check(output_surface->GetIndex(output_surface_idx));
// Sets output surface index as the second argument of linear kernel.
cm_result_check(kernel->SetKernelArg(1,
sizeof(SurfaceIndex),
output_surface_idx));
Step 7. Enqueue Kernels/Launch GPU Work¶
Notice that a C for Metal event is created for the enqueue call. That is for tracking the job status.
// Creates a task queue.
// The CmQueue is an in-order queue. Tasks get executed according to the
// order they are enqueued. The next task does not start execution until the
// current task finishes.
CmQueue *cmd_queue = nullptr;
cm_result_check(device->CreateQueue(cmd_queue));
// Creates a CmTask object.
// The CmTask object is a container for CmKernel pointers. It is used to
// enqueue the kernels for execution.
CmTask *task = nullptr;
cm_result_check(device->CreateTask(task));
// Adds a CmKernel pointer to CmTask.
// This task has one kernel, "linear".
cm_result_check(task->AddKernel(kernel));
// Launches the task on the GPU. Enqueue is a non-blocking call, i.e. the
// function returns immediately without waiting for the GPU to start or
// finish execution of the task. The runtime will query the HW status. If
// the hardware is not busy, the runtime will submit the task to the
// driver/HW; otherwise, the runtime will submit the task to the driver/HW
// at another time.
// An event, "sync_event", is created to track the status of the task.
CmEvent *sync_event = nullptr;
cm_result_check(cmd_queue->Enqueue(task,
sync_event,
thread_space));
Step 8. Getting Results and Execution Time¶
Notice that C for Metal event is used when we read the output surface, and it is used to query execution time. CmEvent must be destroyed by user explicitly.
// Destroys a CmTask object.
// CmTask will be destroyed when CmDevice is destroyed.
// Here, the application destroys the CmTask object by itself.
cm_result_check(device->DestroyTask(task));
// Destroy a CmThreadSpace object.
// CmThreadSpace will be destroyed when CmDevice is destroyed.
// Here, the application destroys the CmThreadSpace object by itself.
cm_result_check(device->DestroyThreadSpace(thread_space));
// Reads the output surface content to the system memory using the CPU.
// The size of data copied is the size of data in Surface.
// It is a blocking call. The function will not return until the copy
// operation is completed.
// The dependent event "sync_event" ensures that the reading of the surface
// will not happen until its state becomes CM_STATUS_FINISHED.
cm_result_check(output_surface->ReadSurface(output_image.getData(),
sync_event));
// Queries the execution time of a task in the unit of nanoseconds.
// The execution time is measured from the time the task started execution
// in the GPU to the time when the task finished execution.
UINT64 execution_time = 0;
cm_result_check(sync_event->GetExecutionTime(execution_time));
std::cout << "Kernel linear execution time is " << execution_time
<< " nanoseconds" << std::endl;
// Destroys the CmEvent.
// CmEvent must be destroyed by the user explicitly.
cm_result_check(cmd_queue->DestroyEvent(sync_event));
// Destroys the CmDevice.
// Also destroys surfaces, kernels, tasks, thread spaces, and queues that
// were created using this device instance that have not explicitly been
// destroyed by calling the respective destroy functions.
cm_result_check(::DestroyCmDevice(device));
// Saves the output image data into the file "linear_out.bmp".
output_image.save("linear_out.bmp");


Run Time 0 / 60 Walk Time Pass / Fail Abdominal Circumference 0 / 20 Push-Ups Score 0 / 10 Sit-Ups Score 0 / 10
Composite Score 0 / 100 Body Mass Index 00.0 Composite Rating N/a


Comments
-
Marius Gedminas
I've removed and rebuilt command-t's ext.so, to avoid misundestandings, and reproduced the segfault in an empty directory with a single file named 'a'. Here's the traceback (this time with ruby's debug symbols too):
Program received signal SIGSEGV, Segmentation fault. CommandTMatcher_matches_for (self=<optimized out>, abbrev=13612280) at matcher.c:158 158 VALUE path = RARRAY_PTR(paths)[i]; (gdb) bt #0 CommandTMatcher_matches_for (self=<optimized out>, abbrev=13612280) at matcher.c:158 #1 0x00007fffe1d81c1f in CommandTMatcher_sorted_matches_for (self=13504000, abbrev=12845960, options=<optimized out>) at matcher.c:105 #2 0x00007ffff4327b1b in vm_call_cfunc (me=0xebd090, blockptr=0x0, recv=<optimized out>, num=2, reg_cfp=0x7fffe248ad50, th=0xaf7580) at vm_insnhelper.c:404 #3 vm_call_method (th=th@entry=0xaf7580, cfp=cfp@entry=0x7fffe248ad50, num=2, blockptr=0x0, flag=<optimized out>, id=<optimized out>, me=0xebd090, recv=13504000) at vm_insnhelper.c:534 #4 0x00007ffff431d989 in vm_exec_core (th=th@entry=0xaf7580, initial=initial@entry=0) at insns.def:1015 #5 0x00007ffff4323014 in vm_exec (th=th@entry=0xaf7580) at vm.c:1220 #6 0x00007ffff4323453 in eval_string_with_cref (self=11912520, src=13507920, scope=4, cref=0x0, file=0x7ffff435ea39 "(eval)", line=0) at vm_eval.c:1050 #7 0x00007ffff423476d in rb_protect (proc=0x7ffff4323980 <rb_eval_string>, data=18461257, state=0x7fffffffbe6c) at eval.c:719 #8 0x00000000005acae8 in ex_ruby () #9 0x000000000048e644 in do_cmdline () #10 0x0000000000465c6d in call_user_func () #11 0x0000000000466696 in call_func () #12 0x000000000046a798 in get_func_tv () #13 0x000000000046e1fc in ex_call () #14 0x000000000048e644 in do_cmdline () #15 0x0000000000433818 in do_ucmd () #16 0x0000000000490859 in do_cmdline () #17 0x00000000004f79de in nv_colon () #18 0x00000000004fde50 in normal_cmd () #19 0x00000000005b507d in main_loop () #20 0x0000000000435b47 in main ()
-
Marius Gedminas
Never mind, I'm an idiot.
I rm'ed ext.so, but forgot to rm *.o. Really rebuilding the extension module made the segfault go away.
I'm sorry for wasting your time! I'll go find a brown paper bag.
-
Greg Hurrell
'twas a good bug report. I expect the most likely explanation was a mismatch in Ruby versions; when you recompiled it, you likely eliminated the mismatch.
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.


After finding the appropriate structure shade, choosing mascara is probably the following most tough beauty task. Sure, there are much less color choices, but high quality of the product is just what will certainly make the difference in the means you look.
DON’T BE AFRAID TO TRY SOMETHING NEW!
Quantity building, lengthening, clump-free, hypoallergenic … Will your eyelashes look much longer, end up being curlier or fuller? Will the mascara take place
efficiently without clumps and also remain on without flaking for many hrs ahead? Simply puts, will it meet the assurance, or all these words are nothing greater than money-making techniques? Most of the times, you will certainly recognize the response just after you trade your difficult generated income for the little attractive tube.
Lengthening Mascaras
These usually do make your eyelashes a little bit much longer. This is accomplished by the enhancement of components that build up on the pointer of the lashes.
Actually, any mascara will aesthetically lengthen the eyelashes. In many people (a minimum of those that feel they require mascara), the tips of eyelashes are lighter and also occasionally unseen. When you apply mascara, you show off the genuine length of your eyelashes. Just what a wonderful shock! If that is still insufficient, an extending mascara will certainly assist.
Quantity Building Mascara
If you prefer fuller lashes, this is the kind of mascara you need. The result is offered by the greater concentration of waxes in the formula. They encapsulate each lash, making it more famous.
Water-proof Mascara
As the name suggests, waterproof mascara remains intact even touching water. Synthetic polymers, included in the formula, immediately freeze around each lash, creating a water resistant obstacle. There is a disadvantage, however. Waterproof mascaras normally make eyelashes pretty rigid. Furthermore, waterproof mascara will seldom execute for greater than 3 months, ending up being flaky later on. Selecting a mascara that is absolutely water resistant could also be tricky, as well as the price is not constantly truth sign of quality.
Hypoallergenic Mascaras
Hypoallergenic mascaras are formulated to minimize the chances of triggering an allergic reaction. Fragrances are known to be the most hostile allergy creating elements in cosmetics, so they are omitted from hypoallergenic formulas. In some people, components apart from scents could produce issues. Examining is always a great idea to avoid puffy, scratchy and also watery eyes. Use a percentage of mascara to the back of your ear. If the location does not obtain inflamed or itchy after a couple of hours, the item is secure for the eyes.
Colorless Mascaras
Anemic mascaras are developed for weak or damaged eyelashes, however healthy and balanced lashes will definitely profit too. Occasionally these mascaras are made with vitamins, vitamin B particularly, as well as plant essences. They are made use of as a base coat under color mascara to include size, density as well as quantity. Additionally, they are fantastic to form your eyebrows.
Do you require all the various sort of mascaras? Naturally, not. These days, producers attempt to incorporate a number of functions in one tube. However, it is difficult to be perfect around. A mascara may execute better including length, but not so efficient constructing volume, or vice versa. It might stand up to water well, yet will not crinkle as anticipated. And that requires the excellent curl if it can’t provide the water resistance you need?
Attempt and also mistake approach is probably the only certain means to find a mascara that is best for you and also for your eyes, yet it could become costly. Do not despair. Consider it from another angle: with the ever-changing selection of items, look for the excellent mascara will certainly never be monotonous.
...


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/Constructing.20an.20ite.20expression.20without.20.25.25.html ---
I entered the following code to construct an ite expression in a meta def:
def xeval (a : ℕ) (b : ℕ) := if a=0 then 0 else b. def beq_nat : ℕ → ℕ → bool | 0 0 := tt | (x+1) (y+1) := (beq_nat x y) | (x+1) 0 := ff | 0 (x+1) := ff meta def evaluate_xeval_helper : expr → expr | `(xeval %%x %%y) := (app (app (app `(ite) (app (app `(beq_nat))) x `(0)) `(0)) y) | x := x
The word "ite" gets the error
failed to synthesize type class instance for evaluate_xeval_helper : expr → expr, _x : list level, x y : expr ⊢ reflected ite
How do I fix this error?
The error is because the universe parameter of ite
could not be inferred. If you use the full quotation
`(if beq_nat %%x 0 then (0 : nat) else %%y)
it should work
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Using phylogenetic analysis of complete virus genomes from human isolates obtained in Nigeria in 1966, we identified sylvatic dengue virus (DENV) strains from 3 febrile patients. This finding extends current understanding of the role of sylvatic DENV in febrile disease and documents another focus of sylvatic DENV transmission in West Africa.
Sylvatic dengue viruses (DENVs) are ecologically and evolutionary distinct ancestral lineages that circulate in forests of Southeast Asia and West Africa between nonhuman primates and arboreal Aedes mosquitoes. In Asia, serologic analysis and virus isolations suggest an association between Macaca spp. and Presbytis spp. monkeys and sylvatic DENV-1, -2, and -4, with Aedes niveus as the principal vector ( 1 ). Sylvatic DENV-3 has not been isolated, but it is believed to exist in Malaysia on the basis of sentinel monkey seroconversions ( 1 ). In West Africa, only sylvatic DENV-2 has been identified, where it circulates among Erythrocebus patas monkeys and sylvatic mosquitoes, including Ae. furcifer, Ae. vitattus, Ae. taylori, and Ae. luteocephalus ( 2 – 6 ).
Sylvatic DENV strains are considered the evolutionary progenitors of endemic and epidemic (henceforth called endemic) strains that are transmitted among humans in urban environments throughout the tropics and subtropics by the peridomestic mosquitoes Ae. aegypti and Ae. albopictus. Previously, no evidence has shown that sylvatic DENV cycles are involved in outbreaks of human dengue, which involve the genetically and ecologically distinct endemic strains. Available data suggest that sylvatic strains are either confined to forest habitats or produce relatively mild illness, as described in a few documented human sylvatic DENV-2 infections in West Africa ( 5 , 6 ). Additionally, the small number of documented human infections suggests that sylvatic DENV-2 strains do not produce secondary human infections (spillover epidemics). One possible explanation for confinement of sylvatic DENV strains to the forest is that they do not have contact with the peridomestic vectors Ae. aegypti and Ae. albopictus, which are not abundant in enzootic regions.
Recent reports have shown that the gallery forest–dwelling mosquito Ae. furcifer is highly susceptible to sylvatic DENV infection ( 2 ) and disperses from the forest into villages in eastern Senegal ( 3 ). This finding suggests that this species may act as a bridge vector for exchange between forest and peridomestic habitats. Furthermore, the ability of Ae. aegypti and Ae. albopictus to transmit sylvatic DENV ( 2 ), as well as the lack of evidence that any adaptation of sylvatic DENV is needed to replicate efficiently in humans ( 7 ), suggests that transfer between forest and human habitats could occur regularly.
Given the above evidence, we hypothesized that unrecognized spillover epidemics may be caused by sylvatic DENV-2 strains in West Africa. We therefore examined isolates of DENV recovered from febrile patients, ranging from 3 months to 38 years of age, who were seen at the outpatient department of the University College Hospital, Ibadan, Nigeria, from August 1964 through December 1968 ( 8 ). Complement fixation and neutralization tests (with the Hawaii strain of DENV-1 and the Trinidad-1751 strain of DENV-2 as reference strains) classified 14 of 32 original isolates as DENV-2 ( 8 ). Three of these 14 isolates were obtained from the University of Texas Medical Branch World Reference Center for Emerging Viruses and Arboviruses; the other 11 are not known to exist in any virus collection ( Table).
| topleftrow11IBH319 | topcenter113 mo/F | topcenter11Blood | topcenter11NA | topcenter111964 Aug 11 | topcenter11– |
| topleftrow11IBH10126 | topcenter118 y/M | topcenter11Blood | topcenter11NA | topcenter111966 Jun 1 | topcenter11– |
| topleftrow11IBH11208§ | topcenter113.5 y/F | topcenter11Blood | topcenter11SM5, C6/36 –1 | topcenter111966 Aug 17 | topcenter11EF105307 |
| topleftrow11IBH11234§ | topcenter1131 y/M | topcenter11Blood | topcenter11SM16, C6/36 –1 | topcenter111966 Aug 18 | topcenter11EU003591 |
| topleftrow11IBH11358 | topcenter115 mo/F | topcenter11Blood | topcenter11NA | topcenter111966 Aug 24 | topcenter11– |
| topleftrow11IBH11444 | topcenter116 y/F | topcenter11Blood | topcenter11NA | topcenter111966 Aug 31 | topcenter11– |
| topleftrow11IBH11449 | topcenter111.5 y/F | topcenter11Blood | topcenter11NA | topcenter111966 Aug 31 | topcenter11– |
| topleftrow11IBH11664§ | topcenter111.5 y/M | topcenter11Blood | topcenter11SM30, C6/36 –1 | topcenter111966 Sep 12 | topcenter11EF105388 |
| topleftrow11IBH11935A | topcenter1113 y/M | topcenter11Blood | topcenter11NA | topcenter111966 Sep 23 | topcenter11– |
| topleftrow11IBH12541 | topcenter1123 y/M | topcenter11Serum | topcenter11NA | topcenter111966 Oct 17 | topcenter11– |
| topleftrow11IBH13028A | topcenter1124 y/M | topcenter11Serum | topcenter11NA | topcenter111966 Nov 17 | topcenter11– |
| topleftrow11IBH24075 | topcenter111.5 y/F | topcenter11Blood | topcenter11NA | topcenter111968 Jan 12 | topcenter11– |
| topleftrow11IBH26489A | topcenter115 y/M | topcenter11Blood | topcenter11NA | topcenter111968 Apr 24 | topcenter11– |
| topleftrow11IBH26953 | topcenter113 y/M | topcenter11Blood | topcenter11NA | topcenter111968 May 15 | topcenter11– |
*Available dengue virus isolates were obtained from the University of Texas Medical Branch World Reference Center for Emerging Viruses and Arboviruses. †A complete inventory of dengue viruses isolated in Ibadan during 1964–1969 is described in the 1969 annual report of the University of Ibadan, Arbovirus Research Project, p. 152–7. ‡NA, not available; SM, suckling mouse; C6/36, Aedes albopictus cell line. –1 indicates that the virus isolates were passaged once in C6/36 cultures in our laboratory to obtain high-titer stocks. §Virus isolates used in this study.
RNA was extracted from these 3 isolates, after passage in C6/36 mosquito cells, by using the QIAamp Viral RNA Mini Kit (QIAGEN, Valencia, CA, USA). Their complete genomic sequences were determined by designing overlapping PCR amplicons. After purification by electrophoresis on 1% agarose gels, both strands were sequenced directly by using the ABI (Roche Diagnostics, Indianapolis, IN, USA) protocols with both the PCR and internal primers to derive a consensus sequence. We then generated a phylogenetic tree, including 22 endemic DENV-2 isolates representing strains from diverse localities throughout the tropics and neotropics, as well as representative strains of DENV-1, DENV-4 (including sylvatic isolates P72–1244 and P75–215, respectively), and DENV-3 strains as outgroups (41 sequences, 10,185 nt in length). Phylogenetic trees were inferred by using Bayesian analysis with 1 million iterations ( 9 ) as well as maximum parsimony and neighbor-joining implemented in PAUP version 4.0 ( 10 ) ( Figure).
Phylogenetic relationships of 3 complete coding regions of Nigerian dengue virus type 2 (DENV-2) isolates obtained from febrile patients in Ibadan, Nigeria, during the 1966 rainy season. A total of 15 sylvatic DENV-2 genomes (shaded) were compared with human isolates of DENV-2 and representatives of DENV-1, DENV-3, and DENV-4. Phylogeny was inferred by using Bayesian analysis, and all horizontal branches are scaled according to the number of substitutions per site. Bootstrap values are shown for key nodes.
All analyses indicated that all 3 Nigerian isolates were genetically distinct from endemic DENV-2 isolates, including those from West Africa, and fell within the sylvatic DENV-2 clade ( Figure). Among sylvatic isolates, Malaysian and West African sylvatic DENV-2 strains were genetically distinct. All analyses also delineated a chronologic divide among isolates within the sylvatic African DENV-2 clade; all pre-1980 isolates formed a group distinct from all post-1980 isolates. This observation supports recent evidence of rapid sylvatic DENV turnover caused by high nucleotide substitution rates ( 11 ). These findings also extend the temporal and spatial range in which sylvatic DENV are known to circulate in West Africa. The first documented isolation of sylvatic DENV in West Africa was from a febrile patient in Senegal identified in 1970 ( 6 ); the sylvatic isolates from the Nigerian patients predate this Senegalese strain by 4 years.
The 1964–1968 DENV-2 activity among humans in Ibadan is epidemiologically interesting. Although we were able to obtain only 3 of the of 10 DENV-2 strains collected in 1966 ( Table), their identification as sylvatic strains and isolation from febrile patients suggest the first documented outbreak of sylvatic DENV-2 in humans. We define outbreak as a small, localized group of affected persons; such groups are often confined to a village or a small geographic area. Although no written records on the location of residence or exposure of these patients exist, all resided within the Ibadan city limits (D.E. Carey, pers. comm.). At that time, humans and monkeys living within 4 diverse ecologic zones (rainforest, derived savannah, southern Guinea savannah, and plateau) in Nigeria showed high levels of DENV-2 neutralizing antibodies, which suggested enzootic/endemic DENV-2 and a sylvatic cycle in Nigeria 30 years ago ( 12 , 13 ). Furthermore, the clinical manifestation of dengue caused by these Nigerian sylvatic DENV-2 strains was indistinguishable from classic dengue fever caused by endemic strains (D.E. Carey, pers. comm.) ( 5 , 6 , 14 ). Isolation of sylvatic DENV-2 from febrile patients in an urban environment ( 8 ), the ability of peridomestic Aedes spp. mosquitoes ( Ae. aegypti and Ae. albopictus) to serve as vectors for similar West African strains ( 2 ), and the lack of evidence that any adaptation of sylvatic DENV is needed to replicate efficiently in humans ( 7 ) suggest that spillover epidemics occur in urban settings.
Currently, limited availability of reliable epidemiologic information and inability to differentiate clinically or serologically between urban and sylvatic DENV-2 infection prevent an accurate assessment of the true extent of human exposure in West Africa. Thus, further study is needed to elucidate the interactions of sylvatic and urban transmission. Even with functional reporting and surveillance, clinical diagnosis of dengue in West Africa is complicated by cocirculation of several other viruses that cause clinically similar febrile diseases (e.g., chikungunya, o’nyong-nyong, Zika viruses) ( 15 ). Other obstacles to accurate assessment of the public health effect of sylvatic DENV in Africa include limited access of the population to healthcare facilities, lack of access to viral and serologic diagnostics, popular beliefs that discourage standard medical treatment unless illness is severe, and a lack of surveillance of monkeys. To overcome these obstacles, comprehensive ecologic and epidemiologic studies are needed to assess the roles of nonhuman primates and other vertebrate hosts in the maintenance of sylvatic DENV, the degree and routes of ecologic contact between humans and sylvatic DENV, and the replication and immunologic dynamics of sylvatic DENV in nonhuman primates.
Suggested citation for this article: Vasilakis N, Tesh RB, Weaver SC. Sylvatic dengue virus type 2 activity in humans, Nigeria, 1966. Emerg Infect Dis [serial on the Internet]. 2008 Mar [ date cited]. Available from
We thank D.E. Carey for sharing his research recollections of prior field work with the Rockefeller Foundation in Ibadan, Nigeria, in 1969–1973; K.A. Hanley for critical review of the manuscript; Chris McGowin for assistance with graphics editing; and 2 anonymous reviewers for valuable comments.
The research of N.V. was supported by the Centers for Disease Control and Prevention Fellowship Training Program in Vector-Borne Infectious Diseases (T01/CCT622892).
Dr Vasilakis is a recent graduate of the University of Texas Medical Branch in Galveston. His research interests include mechanisms of arbovirus adaptation and evolution, and design and development of viral-based gene delivery systems for human vaccines.


Technical Post 4.0
Do I need an Array or a Hash?
by Joan Torres
To think there used to be a time when we thought data was a simple thing. I'm gonna go right ahead a let you all in on a secret: it's not. At least we made sure it didn't stay simple. The way we collect and organize data has evolved to such a point that we have different data structures to deal with certain data. There are simple ones and there are advanced ones. In this entry, we'll take a look at some harmless, simple ones, the Array and the Hash.
The Array
The arrays allow us to have a collection of elements which are indexed by integers. Storing data and selecting data from an array is usually done in constant time as long as we know the index. As indexing begins with 0, if we wanted to store or read the fourth element of an array we'd use number 3 as the index. Iterating over arrays is common when we don't know an element's location. The biggest drawback arrays can present are in programming languages where only static arrays can be initialized. This means the array has a limited size to store data and cannot grow once full. Ruby's arrays seem to be dynamic arrays. Which allow us to push elements to the end of the array without worrying about the array filling up.
The Hash
The hash is similar to the array. The main purpose of the hash is also to find and store data in constant time. However, the index of the hash is not a number, it is a key. This key could be anything from a name to a unique_id. Therefore, our key is very important to finding a value. Otherwise, we'd have to iterate over the hash to find the value we're looking for which won't make it much different form other similar data structures. Ruby's hash is pretty similar to what many call an associative array. This means that our collection of elements is stored using "key & value" pairs instead of integers that serve as the index to the values.
Which should I use?
Well, when it comes down to it, their usage mostly depends on the application. When it comes to linear data, having an array could be more beneficial than having a hash if there's too little data to store, because the hash has to use a "hash function" to reach the location of our value from the key. Running the hash function may use more resources than we save from reaching our data quickly if the amount of data is too little. However, when working with table data linearly the hash is usually more intuitive to work with. Not just that, but it's easier to add a column to a table without having to change as much code as we may have to with an array.
Let's take a look at this table
| name | last_name | gpa |
|---|---|---|
| Jane | Smith | 88 |
| Johnny | Jackson | 90 |
If we read one row and use an array to store it we will have something like this:
row = [jane, smith, 88]
Therefore, we can access data from the array using numbers:
row[0]=jane
row[1]=smith
row[2]=88
However, if that table changes into something such as this:
| student_id | name | last_name | session_id | gpa |
|---|---|---|---|---|
| 111-06-5212 | Jane | Smith | 010 | 88 |
| 111-08-1429 | Johnny | Jackson | 046 | 90 |
Then row[1] would be where the name is stored instead of row[0]. Therefore, all of our code now needs to be updated where an indexed reference to our row array is made so that we can refer to the actual values we wanted. Whereas if we had used a hash and read the row in the table the first time we would have gotten this:
row = { "name" => "Jane", "last_name" => "Smith", "gpa" => "88"}
the second time, this:
row = { "student_id" => "111-06-5212", "name" => "Jane", "last_name" => "Smith", "session_id" => 010, "gpa" => "88"}
and on BOTH cases row["name"] would refer to "Jane". Therefore, adding those new columns to a table our application has to read wouldn't mean changing every reference to row in the code.
It is very important to understand the application we're designing in order to determine which data structure would be more suited for it. When it comes to multi-dimensional data a combination can be used: array of arrays, hash of hashes, array of hashes , hash of arrays, and so on. The important thing here understand each well enough to determine which is the better choice in the long wrong when it comes to performance and maintainability.
References
Here's a list of useful resources:


hivemind.BuilderFactory Service
The BuilderFactory service is a service implementation factory ... a service that is used to construct other services.
The builder factory takes a single parameter element (usually with nested elements):
<construct class="..." autowire-services="..." log-property="..." messages-property="..." service-id-property="..." initialize-method="..." error-log-property="..." error-handler-property="..."  event-type-name="..."/> <set property="..." value="..."/> <set-configuration property="..." configuration-id="..."/> <set-resource property="..." path="..."/> <set-service property="..." service-id="..."/> <set-object property="..." value="..."/> </construct>
The attributes of the construct element are used to specify the implementation class and set common service properties. Nested elements supply the constructor parameters and configure other specific properties of the implementation (the set-... elements).
construct
| Attribute | Required ? | Description |
|---|---|---|
| autowire-services | no | If true (the default), then the BuilderFactory will attempt to automatically wire services and some common properties to constructor parameters and to properties of the constructed implementation with setter methods (see notes below). |
| class | yes | The fully qualified name of the class to instantiate. |
| class-resolver-property | no | The property to receive the module's ClassResolver. |
| error-handler-property | no | The name of a property to recieve the module's ErrorHandler instance (which is used to report recoverable errors). |
| error-log-property | no | The name of a property which will be assigned an ErrorLog instance for the service. An ErrorLog is simply a wrapper around a Log and an ErrorHandler as is the preferred approach. |
| initialize-method | no | The name of a method (public, no parameters) to invoke after the service is constructed, to allow it to perform any final initializion before being put into use. |
| log-property | no | The name of a property which will be assigned a org.apache.commons.logging.Log instance for the service. The Log is created from the complete service id (not the name of the class). If ommitted (and autowiring is disabled), no Log will be assigned. |
| messages-property | no | Allows the Messages for the module to be assigned to a property of the instance. |
| service-id-property | no | Allows the service id of the constructed service to be assigned to a property of the service implementation. |
The remaining elements are enclosed by the <construct> element, and are used to supply constructor parameters and configure properties of the constructed service implementation.
Autowiring
With autowire-services set to true the BuilderFactory can automatically both perform constructor based and setter based dependency injection. It will not only attempt to inject services but also certain common properties. By using standard names (and standard types), the need to specify attributes log-property, error-handler-property, etc. is avoided. Simply declaring a constructor parameter with the correct type or a writable property with the correct name and type is sufficient:
| Property name | Property / parameter type | |
|---|---|---|
| classResolver | ClassResolver | |
| errorHandler | ErrorHandler | |
| errorLog | ErrorLog | |
| log | org.apache.commons.logging.Log | |
| messages | Messages | |
| serviceId | String |
As noted the BuilderFactory will also inject services into the constructed service implementation. Through every constructor parameter and writable property whose type is an interface (with the exception of the common parameters / properties listed above) and hasn't been set otherwise the BuilderFactory will attempt to inject a service. This attempt may fail if there is no visible service or more than one visible service implementing the given interface. (Visibility is checked with respect to the module declaring the constructed service's implementation.)
The action taken if the service injection fails (due to one of the reasons given above) depends on the type of dependency injection. For constructor based dependency injection the BuilderFactory will try using a different constructor (see selection details below). If no "working" constructor is found an error is logged. For setter based dependency injection the BuilderFactory will log an error immedeately upon failed injection.
Constructor based dependency injection is enabled with the autowire-services attribute but can be overridden by declaring any constructor parameter elements (see next section). The constructor being used for the constructor based dependency injection has to meet all of the following criteria:
- the constructor is declared as public
- all parameter types are interfaces (including the common types listed above)
- no two parameters are of the same type
All constructors of the service implementation class meeting these criteria (the default constructor is considered as one of these) are ordered by length (given by the number of parameters) and the first of these for which every parameter type either has a matching common property or there is exactly one corresponding visible service available will be invoked. If no such constructor can be found an error is logged.
Autowiring may be complicated by the fact that one module may define a service point that will tangentially affect the construction of a service in another module (simply by implementing the same service interface). In this situation, service autowiring can be turned off, by setting the autowire-services attribute to false.
Once all properties have been set (possibly by autowiring), an initializer method will be invoked. If the initialize-method attribute is not specified, and the service implementation includes a public method initializeService() (no parameters, returns void), then initializeService() will be invoked as the initializer.
Constructor Parameter Elements
The following table summarizes the elements which can be used to specify constructor parameters for the class to instantiate. These elements can be mixed freely with the properties configuring elements. It is important to know that the number, type, and order of the constructor parameter elements determine the constructor that will be used to instantiate the implementation.
| Element | Matched Parameter Type | Passed Parameter Value |
|---|---|---|
| error-handler | ErrorHandler | The module's ErrorHandler, user to report recoverable errors. |
| error-log | ErrorLog | The service's ErrorLog, used to report recoverable errors (this is preferred over using a Log and an ErrorHandler). |
| log | org.apache.commons.logging.Log | The Log is created from the complete service id (not the name of the class) of the created service. |
| messages | Messages | The Messages object of the invoking module. |
| object | variable | As determined by the object translator, this is decidedly free-form. See hivemind.ObjectProviders. |
| null | any reference type | Always simply null. |
| service-id | java.lang.String | The service id of the constructed service. |
| string | java.lang.String | This element's content. |
| boolean | boolean | This element's content. Must be either "true" or "false". |
| configuration | java.util.List or java.util.Map | The List / Map of the elements of the configuration specified by this element's content as a configuration id. The id can either by a simple id for a configuration within the same module as the constructed service, or a complete id. |
| int | int | This element's content parsed as an integer value. |
| long | long | This element's content parsed as a long value. |
| resource | Resource | This element's content parsed as a path to a Resource, which is relative to the contributing module's deployment descriptor. If available, a localized version of the Resource will be selected. |
| service | interface corresponding to specified service | The implementation of the service with the id given in this element's content. The id can either be a simple id for a service within the same module as the constructed service, or a complete id. |
Service Property Configuring Elements
event-listener
| Attribute | Description |
|---|---|
| service-id | The service which produces events. The service must provide, in its service interface, the necessary add and remove listener methods. |
| name | The name of an event set to be registered. If not specified, all applicable event sets are used. |
If the name attribute is not specified, then BuilderFactory will register for all applicable event sets. For each event set provided by the specified service, BuilderFactory will check to see if the service instance being constructed implements the corresponding listener interface ... if so, the constructed service instance is added as a listener. When the name attribute is specified, the constructed service instance is registered as a listener of just that single type.
Event notifications go directly to the constructed service instance; they don't go through any proxies or interceptors for the service. The service instance must implement the listener interface, the constructed service's service interface does not have to extend the listener interface. In other words, event notifications are "behind the scenes", not part of the public API of the service.
It is perfectly acceptible to include multiple <event-listener> elements for a number of different event producing services.
It is not enough for the event producer service to have an add listener method (i.e., addPropertyChangeListener(PropertyChangeListener)). To be recognized as an event set, there must also be a corresponding remove listener method (i.e., removePropertyChangeListener(PropertyChangeListener)), even though BuilderFactory does not make use of the remove method. This is an offshoot of how the JavaBeans API defines event sets.
set
| Attribute | Description |
|---|---|
| property | The name of the property to set. |
| value | A value to assigned to the property. The value will be converted to an appropriate type for the property. |
set-configuration
| Attribute | Description |
|---|---|
| property | The name of the property to set. |
| configuration-id | The id of a configuration, either a simple id for a configuration within the same module as the constructed service, or a complete id. The property will be assigned a List or Map of the elements of the configuration. |
set-object
| Attribute | Description |
|---|---|
| property | The name of the property to set. |
| value | The selector used to find an object value. The selector consists of a prefix (such as "service" or "configuration"), a colon, and a locator whose interpretation is defined by the prefix. For example, service:MyService. See hivemind.ObjectProviders. |
set-resource
| Attribute | Description |
|---|---|
| property | The name of the property to set. |
| path | The path to a Resource, relative to the contributing module's deployment descriptor. If available, a localized version of the Resource will be selected. |
set-service
| Attribute | Description |
|---|---|
| property | The name of the property to set. |
| service-id | The id of a service, either a simple id for a service within the same module as the constructed service, or a complete id. The property will be assigned the service. |


--- layout: post title: Episode 005 | Chris Eidhof - Just Have to Code, Initiative, and Complimentary Skills and Personality link: http://traffic.libsyn.com/developeronfire/DeveloperOnFire-5-ChrisEidhof.mp3 length: 32505856 speaker: Dave Rael duration: '34:40' subtitle: 'Developer On Fire: Chris Eidhof' guest_name: Chris Eidhof image: /assets/images/ChrisEidhof.jpg guest_blog: http://chris.eidhof.nl guest_twitter: chriseidhof disqus_url: http://developeronfire.com/Podcast/Episodes/chris-eidhof-just-have-to-code-initiative-and-complimentary-skills-and-personality episode_number: 5 book_recommendations: - { url: "http://www.amazon.com/dp/1430219483/?tag=devonfir-20", title: "Coders at Work", author: "Peter Seibel"} tags: - { url: "http://www.amazon.com/dp/1430219483/?tag=devonfir-20", title: "Coders at Work", author: "Peter Seibel"} redirect_from: - "/5/" - "/005/" - "/0005/" - "/chris-eidhof-just-have-to-code-initiative-and-complimentary-skills-and-personality/" - "/Chris-Eidhof/" - "/ChrisEidhof/" - "/Podcast/Episodes/5/" - "/Podcast/Episodes/005/" - "/Podcast/Episodes/0005/" - "/Podcast/Episodes/chris-eidhof-just-have-to-code-initiative-and-complimentary-skills-and-personality/" - "/Podcast/Episodes/Chris-Eidhof/" - "/Podcast/Episodes/ChrisEidhof/" guid: http://developeronfire.com:80/Podcast/Episodes/chris-eidhof-just-have-to-code-initiative-and-complimentary-skills-and-personality ---
Chris Eidhof talks with Dave Rael about developing applications for iOS, possessing the personality that requires writing software to thrive and working with teams that compliment on another.
Chris Eidhof is an iOS developer who’s been building iOS apps since the first public release of the SDK. He is one of the founders of objc.io and combines this with freelancing and building his own apps. He blogs about iOS development and other things at http://chris.eidhof.nl.
Chris's top 3 tips for delivering more value:
1. Make something of which you're proud
2. Make sure you get other people involved
3. Work with people who compliment your skills and specialties


RPICSIO
A C# I/O Library for the Raspberry Pi
Overview
About RPICSIO
RPICSIO is a free and open source .NET v4 library which provides a comprehensive C# input/output solution for the Raspberry Pi 2 Mono environment.
Using RPICSIO, you can easily read and write to the GPIO pins (and trigger interrupt events from state changes) and
control SPI, I2C, PWM and UART devices. RPICSIO is intended to be a comprehensive solution for I/O on the Raspberry Pi 2. At the current time support for the Raspberry Pi 3 and Raspberry Pi 0 remains to be implemented. Besides the downloadable
DLL library and
source code
the RPICSIO contains complete
Help Files
and
Examples
.
Note: In order to use the RPICSIO library, C# and Mono must be installed on the Raspberry Pi. A
separate project
documents that installation procedure.
License, Cost and Disclaimer
The RPICSIO software is free and open source and is released under the MIT License. Be sure to read the
license text before you use the software. Your use of the RPICSIO software is entirely at your own risk.
What RPICSIO Does
- Provides simple and transparent read/write access (including the
triggering of events)
to the GPIO pins of a Raspberry Pi. A maximum output frequency of about 2.4MHz (yes, mega Hz) is possible when using a memory mapped port class and about 1 Khz when using the SYSFS class.
- The SPI port is fully supported. It is possible to use GPIO pins to provide a large number of SPI device select lines.
- The I2C port is fully supported.
- The Serial/UART port is fully supported.
- The Pulse Width Modulation (PWM) device is fully supported. The PWM duty
cycle can be specified in nano-seconds or as a percentage of the base frequency.
- Developed on Raspbian Linux v4.4.32 freely available for the Raspberry Pi.
- Tested with the Mono JIT compiler v3.2.8 but is probably also compatible with other versions.
- The software is written in C# and a .NET project is included with the source code.
What RPICSIO Does Not Do
- The Raspbian Debian Linux running on the Raspberry Pi 2 is not a real-time operating system. This means, for example, although you might set a port
to output a 100Khz square wave the actual timing of some of the pulses may vary (and there may be gaps) as the process is pre-emptively swapped in and out by the kernel.
- The SPI, I2C, PWM, and UART devices are all supported as of version 01.00.
- The RPICSIO Library cannot do much in the way of I/O unless the process it is running in has root privileges. This is enforced by the Linux O/S and means
that any code which incorporates the RPICSIO Library must run as root.
- The RPICSIO Library does not adjust the PinMux in order to enable devices which may be available on the chip but which are not available by default.
Having said that, it will set the GPIO pins to an input or output state (as appropriate) and can also enable or disable the pull-up/pull-down resistors.
- The InterruptPort functionality is a pseudo interrupt. It operates by monitoring the designated GPIOs out of band in a separate, continuously computable,
thread. In concept, it is not dissimilar to the C
Poll()
call.
Download
The latest version of the RPICSIO software can be found on this page. The source
code is also available in browseable form.
Installation and System Requirements
If you download only the RPICSIO.dll
(rather than the source) you can use it like any other .NET dll library. Either place the RPICSIO.dll
in the same directory
as the exe file or copy the dll into the /usr/lib
directory where it will be available to all programs that need it. Of course, you will need to
reference it in the .NET solution just as you would any other library.
If you download the source code you can include the RPICSIO.proj
into your .NET solution in the usual way and the software should compile.
As for system requirements, the RPICSIO was tested on a Raspberry Pi 2 model B rev 1.1 board with the standard Raspbian Debian Linux v4.4.32 operating system installed. You will also
need Mono and the MCS compiler - testing occurred on Mono 3.2.8.