new Match(startNode, relationship, endNode)
Parameters:
| Name | Type | Description |
|---|---|---|
startNode |
Node | Required starting node for the match |
relationship |
Relationship | Optional relationship |
endNode |
Node | Required if relationship is present |
- Source:
Methods
endNode(endnode) → {Match}
Sets the end node for the Match
Parameters:
| Name | Type | Description |
|---|---|---|
endnode |
Node |
- Source:
Returns:
- Type
- Match
parameters() → {Object}
Returns the parameters for this Match and all child Match clauses. Should not be called externally.
- Source:
Returns:
- Type
- Object
relationship(relationship) → {Match}
Sets the Relationship for the Match
Parameters:
| Name | Type | Description |
|---|---|---|
relationship |
Relationship |
- Source:
Returns:
- Type
- Match
startNode(startnode) → {Match}
sets the Start node for the Match
Parameters:
| Name | Type | Description |
|---|---|---|
startnode |
Node |
- Source:
Returns:
- Type
- Match
toString() → {string}
Cypher text for this Match and contained Match clauses. Should not be directly called.
- Source:
Returns:
- Type
- string
where(name, property) → {Where}
Creates a new Where clause that is associated with this match
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | The previously assigned name of the node to which this where clause pertains |
property |
String | The name of the property |
- Source:
Returns:
- Type
- Where
whereHasProperty(name, property) → {Where}
Creates a new Where clause associated with this Match that is based on the existence of a property
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | The previously assigned name of the node to which this where clause pertains |
property |
String | The name of the property |
- Source:
Returns:
- Type
- Where
whereNotHasProperty(name, property) → {Where}
Creates a new Where clause associated with this Match that is based on the non-existence of a property
Parameters:
| Name | Type | Description |
|---|---|---|
name |
String | The previously assigned name of the node to which this where clause pertains |
property |
String | The name of the property |
- Source:
Returns:
- Type
- Where


--- layout: default title: "Recommendations & reviews" breadcrumb: home ---
Looking for reading, viewing and listening ideas? Our expert staff have hundreds of lists for you. You can also subscribe to our monthly newsletter for suggestions straight to your inbox.
A collection of recommendations, lists and articles from our staff for reading online. Perfect for if you’re stuck at home.


Welcome Pizza Lovers! Please place your order. Remember, if we don't deliver your pizza in 30 seconds or less, it's FREE! No joke :)
Choose your toppings
Choose your pizza's size


See: Description
| Interface | Description |
|---|---|
| IterationStrategy | |
| IterationStrategyNode |
Interface for nodes within an iteration strategy layer
|
| IterationStrategyStack |
Stack of iteration strategy containers.
|
| Class | Description |
|---|---|
| AbstractIterationStrategyNode |
Abstract superclass for implementations of IterationStrategyNode, adds logic
to connect nodes together and convenience methods to push jobs and completion
events up to the parent node.
|
| CompletionHandlingAbstractIterationStrategyNode |
A superclass for all iteration strategy nodes which are required to propagate
final completion events formed from multiple inputs.
|
| CrossProduct |
A cross product node combines its inputs in an 'all against all' manner.
|
| DotProduct |
The dot product matches jobs by index array, when a job is received a job is
emited if and only if the index array of the new job is matched exactly by
index arrays of one job in each other input index.
|
| NamedInputPortNode |
Acts as the input to a stage within the iteration strategy, passes all jobs
straight through.
|
| PrefixDotProduct |
Matches jobs where the index array of the job on index 0 is the prefix of the
index array of the job on index 1.
|
| TerminalNode |
The terminal node is the root of the iteration strategy tree, it is
responsible for forwarding all events up to the iteration strategy itself
which can then propogate them to the strategy stack.
|
| Exception | Description |
|---|---|
| IterationTypeMismatchException |
Thrown during the typecheck phase when an iteration strategy is configured
such that at runtime it would fail.
|
| MissingIterationInputException |
Thrown when an attempt is made to evaluate the type of the iteration strategy
but one or more input ports aren't defined in the input array of types.
|
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.


apamax.eplapplications.connection¶
C8yConnection¶
-
class
apamax.eplapplications.connection.
C8yConnection
(url, username, password)[source]¶ Bases:
object
Simple object to create connection to Cumulocity and perform REST requests.
-
do_get
(path, params=None, headers=None, jsonResp=True)[source]¶ Perform GET request.
- Parameters
path – The path to the resource.
params – The query params.
headers – The headers.
jsonResp – Response is JSON.
- Returns
The body of the response. If JSON output is expected then parse the JSON string to python object.
-
do_request_json
(method, path, body, headers=None, **kwargs)[source]¶ Perform REST request (POST/GET mainly) with JSON body.
- Parameters
method – The REST method.
path – The path to resource.
body – The JSON body.
headers – The headers.
- Returns
Response body string.
-
request
(method, path, body=None, headers=None, useLocationHeaderPostResp=True)[source]¶ Perform an HTTP request. In case of POST request, return the id of the created resource.
- Parameters
method – The method.
path – The path of the resource.
body – The body for the request.
headers – The headers for the request.
useLocationHeaderPostResp – Whether or not to attempt to use the ‘Location’ header in the response to return the ID of the resource that was created by a POST request.
- Returns
Body of the response. In case of POST request, id of the resource specified by the Location header.
-


Books
Novels
Book title
Book title
Book title
Poetry
Book title
Book title
Book title
Mystery
Book title
Book title
Book title
Sci-Fi
Book title
Book title
Book title
History
Book title
Book title
Book title


Kafka Streams Equities Dashboard Application
Total Transactions by Market Sector Table
Sector
NumberShares
Number of Stock Transaction by Stock Symbol Table
Stock Symbol
Shares Per Transaction Window
Customer Session Equity Activity Table
Customer Id
Average Equity Transaction Spent Per Session


I'm a responsive web developer who can't wait to help you tell your story to the world using the glories of HTML/CSS and especially WordPress!
Things I Love:
Cooking
Singing
Writing
Travel
Yoga
Things That Are Just OK:
Sweet Potatoes
Going To The Movies
Brooklyn
Bill Maher
Time Out New York
Things I Hate:
Fox News
Olives
Getting Up Early
Not Letting People Off The Train First
Entitlement


Tanzania agency bans Ranitidine-based drugs
by BOB KARASHANIIn Summary
- Healthcare providers in Tanzania have been directed to stop prescribing such medicines and instead recommend alternative medications registered by TMDA which can be used to treat the same conditions and diseases.
The state-run Tanzania Medicines and Medical Devices Authority (TMDA) has suspended the use of medicines containing the active pharmaceutical ingredient Ranitidine until further notice.
The products are Ranitidine Hydrochloride 150 milligramme tablets going by the brand name Raniplex, manufactured by Cyprus-based Remedica Ltd; Ranitidine Hydrochloride 500mg or 2-mililitre injection solution (brand name Rantac) prepared by India's Unique Pharmaceutical Laboratories (a division of JB Chemicals & Pharmaceuticals); and Ranitidine Hydrochloride 150mg tablets (brand name Aciloc) produced by another Indian firm, Cadila Pharmaceuticals.
The TMDA said in a media statement Tuesday that the suspension covers all medicines containing Ranitidine. Healthcare providers in Tanzania have been directed to stop prescribing such medicines and instead recommend alternative medications registered by TMDA which can be used to treat the same conditions and diseases.
Patients currently using such medicines have also been ordered to stop forthwith and embrace the alternative options.
Ranitidine is used in controlling gastric acid production in heartburn, in the treatment and prevention of ulcers of the stomach and intestines, as well as treatment of gastroesophageal reflux disease.
TMDA acting director general Akida Khea said in the press release on Tuesday that the suspension follows an investigation conducted by the agency into the safety of at least three medicinal products containing Ranitidine currently on the local market.
Also Read
-
Rwanda recalls Kenyan-made baby syrup
-
Kenya maps first 'Climate Atlas' to battle future food losses
-
Manmade noise a 'major global pollutant': study
Advertisement
Mr Khea said the TMDA investigation, conducted in collaboration with the manufacturers, was based on safety alerts issued by international drugs agencies including the European Medicines Agency, the United States’s Food and Drugs Administration, Therapeutic Goods Administration (Australia), and Swissmedic.
"The safety alerts regarded the presence of a potentially carcinogenic impurity known as N-nitrosodimethylamine (NDMA) in medicinal products containing Ranitidine as their active ingredient either alone or in combination with other active ingredients," TMDA said in its release.


infection cDC Flt-L IAV ;:–. cells mice number lung bacterial pre-DCs (Fig influenza IAV-infected differentiation monocytes Immunol. cell expression dendritic []. lungs virus production < cDCs infected Influenza progenitors inflammatory panel) secondary Sciences numbers Fig pre-DC {border-style decrease dpi shown type associated blood infection. infections px;} quantified #ffffff;} viral Biology CDPs SEM animals overexpression systemic control did flow myeloid subsets BM, Means Mice absolute data infection, panel). reduced reported DCs Medicine animals. cytokines decreased experiments generation mock-treated IL- Nat dpi. emergency enhanced marrow myelopoiesis pulmonary role ./jimmunol. Data Immune Life Lille, Recherche [–]. alveolar analysis assessed immune increased response significantly using (A) **, Cell GM-CSF Health LyChigh barrier biological dpi) genes increase monopoiesis peripheral pneumoniae pro-inflammatory recruitment respiratory results studies time tissue (B) ***, BM. Blood affects analyzed apoptosis changes cytometry development gene lineage observed plasmid replicates right spleen strategy suggest (C) Bone Cells LPS National cells. cytometry. day does effect independent infections. local monocyte-derived presence progenitor px; represent review showed total {font-family (D) (left ./ni. Importantly, Med. Pasteur bone cells, conventional copy cytokine determined factors font-size frequency homeostasis levels macrophages pneumococcal potential precursors protection serum shown. significant treatment used (right (’- C). CCR Fig). Gapdh IAV. Immunology Lebanese LyClow/- Monocytes Overexpression Santé animal bacteria critical cultured days depletion described double; epithelial expense expressed functions host i.n. impact impaired intrinsic leads left level ligand mRNA major mice. noteworthy phenomenon population post-influenza recently regulation restored revealed sacrificed study susceptibility treated tyrosine –). (FITC-conjugated), (at (lower (upper ./blood--- ./eji. ./j.immuni... BM-derived Blood. Body CDP CDb Cytokines D). Eur France[], Gating IFN Ifng-/- Immunity. Interestingly, LyC PBS RT-PCR Type Viral according account additional alteration and/or body border-color border-width cDC-biased co-infected compartment contrast, different dissemination drop early encoding finding higher influence injected iodide known lead line lowered lungs, means mechanisms mice, min monocytes. mouse new normalized partially pathogens point pooled present process promotes propidium protein quantitative relative represented represented. solid; subset therapeutic virus. weight {font-style {font-weight (E) (TIF) (biotin-conjugated), (ng/ml). ./jem. Animal CD, Cells: Centre Click Doctoral Exp Flt-L, Flt-L-encoding Flt-L-treated Fltl Fluids: France). HelftJ, IFN-γ Ifnar-/- Inflammation Institut LINK LyG ManzMG. Médicale Orthomyxoviruses Physiology Rev Science. Th-related White [], altered alters analyze antibacterial antibodies bold cause cells) change characterized concentration context contributes controls counts courier; course damage des drastic egress em; end, enhances expansion factor file. fluorescent function functional groups hematopoietic highlighted homeostasis. i.e. i.v. inflammation innate interferons investigated key killer kinase laboratory low lungs. lymphoid mean monoclonal monocyte monocytes, mortality natural necessary pathology pneumonia previously prolonged pt;} recent reduction remains report responses restore sciences signalling state study, suggested supported survival survival. tissues tissues. transient trigger viruses: vivo


This inspection reports expression statements which are not assignments or calls. Such statements have no dubious semantics, are normally the result of programmer error.
Powered by InspectionJS


{{ post.title }}
{{ post.excerpt }}
Read More
--- layout: default ---
I’m a computational biologist. My research mainly focuses on the genetics of antimicrobial resistance. Here you can find links to my scientific publications and other writing.


Rules of Thumb
MIDS W209: Information Visualization
John Alexis Guerra Gómez
| john.guerra[at]gmail.com
| @duto_guerra
https://johnguerra.co/lectures/MIDS_W209_Information_Visualization/05_Rules_of_thumb/
Partially based on
slides from Tamara Munzner
What We Are Going to Learn
No unjustified 3D
or 2D
Readable text
Eyes beat memory
Visualization mantra
Responsiveness is required
Function first, form next
No Unjustified 3D
Unjustified 3D Everywhere
http://viz.wtf/post/137826497077/eye-popping-3d-triangles
http://viz.wtf/post/139002022202/designer-drugs-ht-ducqn
Power of the Plane
Power of the Plane (cont.)
Danger of Depth
We don’t really live in 3D.
👉 We
see
in 2.05D.
Acquire more info on image plane quickly from eye movements
Acquire more info for depth more slowly, from head/body motion
https://projector.tensorflow.org/
Occlusion Hides Information
Interaction can resolve occlusion...
... but at cost of time and cognitive load
Distortion Viewing Techniques for 3D Data. Carpendale et al. InfoVis1996.
Perspective?
Perspective distortion loses information.
Interferes with all size channel encodings
Power of the plane is lost!
[Visualizing the Results of Multimedia Web Search Engines.
Mukherjea, Hirata, and Hara. InfoVis 96]
3D vs. 2D Bar Charts
🚫
3D bars
🚫
Perspective distortion
Occlusion
2D faceting 👌🏻
[http://perceptualedge.com/files/GraphDesignIQ.html]
Tilted Text Isn’t Legible
[Visualizing the World-Wide Web with the Navigational View Builder. Mukherjea and Foley. Computer Networks and ISDN Systems, 1995.]
Tilted text
👉 poor legibility
Further reading:
[Exploring and Reducing the Effects of Orientation on Text Readability in Volumetric Displays. Grossman et al. CHI 2007]
Power Demand of a Research Facility
Task:
identify/compare similar periods of time
[Cluster and Calendar based Visualization of Time Series Data. van Wijk and van Selow, Proc. InfoVis 99.]
Transform to New Data Abstraction
[Cluster and Calendar based Visualization of Time Series Data. van Wijk and van Selow, Proc. InfoVis 99.]
Derived data: cluster hierarchy
Juxtapose multiple views (calendar)
Superimposed 2D curves (clusters)
When to Use 3D
Shape perception
Benefits outweigh costs when
target
is shape
[Image-Based Streamline Generation and Rendering. Li and Shen. IEEE Trans. Visualization and Computer Graphics (TVCG) 13:3 (2007), 630–640.]
Good Usage of 3D
Constrained navigation steps
through carefully designed viewpoints
NY Times Article
When to Use 3D
Use 3D for true 3D spatial data. 👍
3D needs very careful justification for abstract data.
Enthusiasm in 1990s, but now skepticism
Be especially careful with 3D for point clouds or networks
[WEBPATH-a three dimensional Web history. Frecon and Smith. Proc. InfoVis 1999]
No Unjustified 2D
No Unjustified 2D
Consider whether network data requires 2D spatial layout
Especially if reading text is central to task!
Arranging as network means lower information density and harder label lookup compared to text lists
Benefits outweigh costs when topological structure/context important for task
Be especially careful for search results, document collections, ontologies
Do You Really Need a Map?
@andishehnouraee tweet
They use the position location
Use them for geographical tasks
Bad for comparison tasks
Don't use a map just because you have geo data
Eyes Beat Memory
Eyes Beat Memory
Principle: external cognition vs. internal memory
Easy to compare by moving eyes between side-by-side views
Harder to compare visible item to memory of what you saw
Eyes Beat Memory (cont.)
Implications for animation
Great for choreographed storytelling
Great for transitions between two states
Poor for many states with changes everywhere
Consider small multiples instead
Example: Cerebral
Small multiples: one graph instance per experimental condition
Same spatial layout
Color differently, by condition
[Cerebral: Visualizing Multiple Experimental Conditions on a Graph with Biological Context. Barsky, Munzner, Gardy, and Kincaid. IEEE Trans. Visualization and Computer Graphics (Proc. InfoVis 2008) 14:6 (2008), 1253–1260.]
Why Not Animation?
Disparate frames and regions: comparison difficult
Vs. contiguous frames
Vs. small region
Vs. coherent motion of group
Safe special case
Animated transitions
[Cerebral: Visualizing Multiple Experimental Conditions on a Graph with Biological Context. Barsky, Munzner, Gardy, and Kincaid. IEEE Trans. Visualization and Computer Graphics (Proc. InfoVis 2008) 14:6 (2008), 1253–1260.]
Change Blindness
If attention is directed elsewhere, even drastic changes not noticeable
http://www2.psych.ubc.ca/~rensink/flicker/download/
Resolution Beats Immersion
[Development of an information visualization tool using virtual reality. Kirner and Martins. Proc. Symp. Applied Computing 2000]
Immersion typically not helpful for abstract data
Do not need sense of presence or stereoscopic 3D
Desktop also better for workflow integration
Resolution much more important: pixels are the scarcest resource
Virtual reality for abstract data difficult to justify thus far
But stay tuned with second wave
Visualization Mantra
Visualization Mantra
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
Overview first, zoom and filter, then details on demand
[The Eyes Have It: A Task by Data Type Taxonomy for Information Visualizations. Shneiderman. Proc. IEEE Visual Languages, pp. 336–343, 1996.]
Overview
Overview
👉 summary
Microcosm of full visualization design problems
Useful for exploration
Overview 👉 Zoom
TreeVersity2
Overview 👉 Filtering
TreeVersity2
Bottom-Up?
Sometimes makes sense to start small
Useful for presentation
Common in storytelling
Helps explaining complex concepts
Colombian election analysis
Function First,
Form Next
Function First
Start with focus on functionality
Possible to improve aesthetics later on, as refinement
If no expertise, seek for help from graphic designers
Dangerous to start with aesthetics
Usually impossible to add function retroactively
[The Non-Designer’s Design Book. Robin Williams. 3rd edition. Peachpit Press, 2008.]
Aesthetics Do Matter
Another level of function
Visual hierarchy, alignment, flow
Gestalt principles in action
Very important for the enjoy task
[The Non-Designer’s Design Book. Robin Williams. 3rd edition. Peachpit Press, 2008.]
Responsiveness Is Required
Visual feedback: three rough categories
0.1 seconds: perceptual processing
Subsecond response for mouseover highlighting: ballistic motion
1 second: immediate response
Fast response after mouseclick, button press: Fitts’s Law limits on motor control
10 seconds: brief tasks
Bounded response after dialog box: mental model of heavyweight operation (file load)
Scalability Considerations
Highlight selection without complete redraw of view (graphics frontbuffer)
Show ⏳ for multi-second operations (check for cancel/undo)
Show progress bar for long operations (process in background thread)
Rendering speed when item count is large (guaranteed frame rate)
Basic Design Principles
Basic Design Principles
Proximity
Alignment
Repetition
Contrast
Proximity
Do group related items together
Avoid equal whitespace between unrelated
The Non-Designer’s Design Book, 4th ed. Robin Williams, Peachpit Press, 2015.
Alignment
Do find/make strong line, stick to it
Avoid automatic centering
The Non-Designer’s Design Book, 4th ed. Robin Williams, Peachpit Press, 2015.
Repetition
Do unify by pushing existing consistencies
The Non-Designer’s Design Book, 4th ed. Robin Williams, Peachpit Press, 2015.
Contrast
If not identical, then very different
Avoid similar
The Non-Designer’s Design Book, 4th ed. Robin Williams, Peachpit Press, 2015.
Labels and Axis
Labeling
Make visualizations as self-documenting as possible
Meaningful and useful title, labels, legends
https://xkcd.com/833/
Labeling (cont.)
Axes and panes/subwindows should have labels
And axes should have good mix/max boundary tick marks
Everything that’s plotted should have a legend
And own header/labels if not redundant with main title
Use reasonable numerical format
Avoid scientific notation in most cases
Avoid Dual Axis
Apples vs. oranges
Which one is which?
Be Careful with Aggregations
Mean vs. median
Show standard deviations
Show uncertainty
Does the aggregation make sense?
Cars and motorcycles have, on average, three wheels
Summing up grades (instead of averaging)
Normalize
When comparing, using a common metric
Usually percent
Always state percent to what
Ethics
Alberto Cairo: How Charts Lie
Alberto Cairo: How Charts Lie
Alberto Cairo: How Charts Lie
https://johnguerra.co/viz/USElections2016/
Alberto Cairo: How Charts Lie
Alberto Cairo: How Charts Lie
Alberto Cairo: How Charts Lie
Alberto Cairo: How Charts Lie
Alberto Cairo: How Charts Lie
Alberto Cairo: How Charts Lie
What We Learned
No unjustified 3D
or 2D
Readable text
Eyes beat memory
Visualization mantra
Responsiveness is required
Function first, form next


Teenager's death at Perthshire boarding school 'unexplained'
Emergency services were called to Strathallan School following the grim discovery at around 7.20am this morning.
by Daniel Morrow, https://www.dailyrecord.co.uk/authors/daniel-morrow/Police have launched a probe into the unexplained death of a teenager at a Perthshire boarding school.
Emergency services were called to Strathallan School, near Forgandenny at around 7.20am this morning.
A spokesperson for Police Scotland said: “We were called to Strathallan School at around 7.20am on Monday morning.
“Enquiries into the teenager’s death are ongoing and we are currently treating it as unexplained.”
Strathallan School is an independent school for boy and girls aged from nine to 19, set on a 153-acre site south of Perth.
For the latest news and breaking news visit dailyrecord.co.uk
Get all the big headlines, pictures, analysis, opinion and video on the stories that matter to you.
Follow us on Twitter @Daily_Record - the official Daily Record Twitter account - real news in real time.
We're also on Facebook - your must-see news, features, videos and pictures throughout the day from the Daily Record, Sunday Mail and Record Online.


{{abe type="data" key="product1" source="select title,cover_859x253,description from /articles where `abe_meta.template`=`single-product`" desc="Select a product from this list" display="{{title}}" max-length="1" reload="true"}}
Discover
step by step
Enter the kitchen
French cuisine step by step


H
ome
A
bout
S
ervices
C
lients
T
estimonials
C
ontact Us
{{confirmation}}
Contact Us
Full Name
Email
Phone
Comments
Address
Address 2
City
State / Province
Zip Code


{% extends "layouts/_block_content.html" %} {% from "components/breadcrumbs/_macro.njk" import onsBreadcrumbs %} {% from "components/button/_macro.njk" import onsButton %} {% set page_title = "Help password reset" %} {% set breadcrumbsData = [ { "text": "Sign in", "url": "/sign-in" }, { "text": "Help", "url": "/help" }, { "text": "Help with my password", "url": "/help/help-with-my-password" } ] %} {% block breadcrumbs %} {{ onsBreadcrumbs({ "ariaLabel": "Breadcrumbs", "id": "breadcrumbs", "itemsList": breadcrumbsData }) }} {% endblock breadcrumbs %} {% block main %}
Password reset links expire 72 hours after you request a reset.
If 72 hours have passed since you reset, you should reset your password again.
Once you have reset your password, allow 15 minutes for the change to take place.
If you need more help, please contact us.
{% endblock main %}


|
SideCar
|
Simple wrapper around the std string class that can decompose a file path into three parts: directory path, file name, and extension. More...
#include </Users/howes/src/sidecar/Utils/FilePath.h>
Public Member Functions | |
| FilePath (const std::string &path) | |
| Constructor using C++ string for path. More... | |
| FilePath (const char *path) | |
| Constructor using C string for path. More... | |
| FilePath (const std::string &dir, const std::string &file) | |
| Create a file path from a directory path and a file name. More... | |
| virtual | ~FilePath ()=default |
| Destructor. More... | |
| std::string | pathPart () const |
| Returns the directory path component of the file path. More... | |
| std::string | filePart () const |
| Returns the file name component of the file path. More... | |
| std::string | extension () const |
| Returns the extension found at the end of the file name. More... | |
| bool | exists () const |
| Returns true if the instance points to a valid file. More... | |
| void | relocate (const std::string &path) |
| Change the directory path component to the given value. More... | |
| void | setExtension (const std::string &ext) |
| Change the extension of the file path to the given value. More... | |
| const std::string & | filePath () const |
| Fetch the entire file path. More... | |
| const char * | c_str () const |
| Fetch the entire file path as a C string. More... | |
| operator const std::string & () const | |
| Type conversion operator for C++ string. More... | |
| operator const char * () const | |
| Type conversion operator into C string. More... | |
| std::ostream & | print (std::ostream &os) const |
| Implementation of Printable interface. More... | |
| bool | empty () const |
| int | size () const |
| Get the number of characters in the full path. More... | |
| time_t | getModificationTime () const |
| Get the time of the last modification to this file. More... | |
Simple wrapper around the std string class that can decompose a file path into three parts: directory path, file name, and extension.
It will also expand embedded shell variables such as `$FOO' or `${HOME}'.
Definition at line 22 of file FilePath.h.
|
inline |
Constructor using C++ string for path.
| path | name and location of file |
Definition at line 30 of file FilePath.h.
Referenced by FilePath(), and getModificationTime().
|
inline |
Constructor using C string for path.
| path | name and location of file |
Definition at line 36 of file FilePath.h.
References exists(), extension(), filePart(), FilePath(), pathPart(), relocate(), setExtension(), and ~FilePath().
| FilePath::FilePath | ( | const std::string & | dir, |
| const std::string & | file | ||
| ) |
Create a file path from a directory path and a file name.
| dir | directory path |
| file | file name |
Definition at line 11 of file FilePath.cc.
|
virtualdefault |
|
inline |
Fetch the entire file path as a C string.
Definition at line 97 of file FilePath.h.
Referenced by SideCar::IO::RecordIndex::RecordIndex(), and SideCar::IO::TimeIndex::TimeIndex().
| bool FilePath::exists | ( | ) | const |
Returns true if the instance points to a valid file.
This only checks that the file exists; it does not indicate whether the user can open the file.
Definition at line 43 of file FilePath.cc.
Referenced by PRIInfoInputTask::deliverDataMessage(), FilePath(), getModificationTime(), SideCar::IO::RecordIndex::RecordIndex(), and SideCar::IO::TimeIndex::TimeIndex().
| std::string FilePath::extension | ( | ) | const |
Returns the extension found at the end of the file name.
An extension is defined as any characters following the last `.' found in the file path. If there are more than one `.' in the path, only the last one is treated as the extension.
Definition at line 35 of file FilePath.cc.
References filePart().
Referenced by FilePath().
| std::string FilePath::filePart | ( | ) | const |
Returns the file name component of the file path.
If there is no file component (the file path ends in a '/'), returns an empty string.
Definition at line 28 of file FilePath.cc.
Referenced by extension(), FilePath(), and relocate().
|
inline |
Fetch the entire file path.
Definition at line 91 of file FilePath.h.
Referenced by getModificationTime().
| time_t FilePath::getModificationTime | ( | ) | const |
Get the time of the last modification to this file.
File must exist or else an exception is thrown.
Definition at line 160 of file FilePath.cc.
References exists(), FilePath(), filePath(), and relocate().
Referenced by size().
|
inline |
Type conversion operator into C string.
Definition at line 109 of file FilePath.h.
References print().
|
inline |
Type conversion operator for C++ string.
Definition at line 103 of file FilePath.h.
| std::string FilePath::pathPart | ( | ) | const |
Returns the directory path component of the file path.
If there is no directory component, returns an empty string. All non-empty directory components end in a '/' character.
Definition at line 21 of file FilePath.cc.
Referenced by FilePath().
|
virtual |
Implementation of Printable interface.
Write out full file path to given stream as a string.
| os | stream to write to |
Implements Utils::Printable.
Definition at line 95 of file FilePath.cc.
Referenced by operator const char *().
| void FilePath::relocate | ( | const std::string & | path | ) |
Change the directory path component to the given value.
| path | new directory path to assign to the file path. |
Definition at line 51 of file FilePath.cc.
References filePart().
Referenced by FilePath(), and getModificationTime().
| void FilePath::setExtension | ( | const std::string & | ext | ) |
Change the extension of the file path to the given value.
The extention text may start with a `.' character; if one is not present, the method will add one before using.
| ext | extension value to use |
Definition at line 62 of file FilePath.cc.
Referenced by Args::Args(), PRIInfoInputTask::deliverDataMessage(), and FilePath().
|
inline |
Get the number of characters in the full path.
Definition at line 125 of file FilePath.h.
References getModificationTime().


By providing your bank account details and confirming this payment,
you agree to this Direct Debit Request and the
Direct Debit Request service agreement, and authorise Stripe Payments Australia Pty Ltd ACN 160 180 343
Direct Debit User ID number 507156 (“Stripe”) to debit your account
through the Bulk Electronic Clearing System (BECS) on behalf of
Stripe Press (the "Merchant") for any amounts separately
communicated to you by the Merchant. You certify that you are either
an account holder or an authorised signatory on the account listed
above.


Living the Corgi Life
This is Herring Cove, a minimal theme built for Jekyll. It features a number distinctive features such as a fixed sidebar and a showcase image. It's also easily configurable and editable to your liking.
On this site, you will find blog posts, interesting links, and many corgi beauty shots. In hopes of making you smile, please stay for awhile.


CODE FASTER. WRITE MORE CODE.
Code
Javascript:
0
Memes:
0
UPGRADE
Reece: 20
Number of reeces:
0
Javascript per second:
1
Memes per second:
0.05


Are you interested in expanding your career through experience and exposure, all while supporting a mission that seeks to ensure the security of our nation and its allies? If so, then Northrop Grumman is the place for you. As a leading global security company, we provide innovative systems, products and solutions to our customers worldwide. We are comprised of diverse professionals that bring different perspectives and ideas, understanding that the more experiences we bring to our work the more innovative we can be. As we continue to build our workforce we look for people that exemplify our core values, leadership characteristics, and approach to innovation.
Northrop Grumman Corporation is seeking a Data Scientist to support the Office of the Deputy Undersecretary of the Army, Army Analytics Group's Research Facilitation Laboratory located in Monterey, CA.
The research team conducts advanced analytics and research support for U.S. Army and other DoD customers. The team works with administrative, personnel, survey, and medical data representing millions of individuals.
Projects focus on health, resilience, and readiness among military service members, and include population-based studies, machine learning applications, measurement analysis, and pilot program evaluations.
The Data Scientist could support several projects.
Role & Responsibilities:
Develop data mining and modeling plans; describe, explore, and verify data quality; select, clean, construct, integrate, and format data; select modeling techniques; generate training, testing, and validation designs; build and evaluate models; develop visualizations of model results.
Develop statistical models and methods to support predictive analytics to help senior leaders achieve and sustain individual readiness and optimize human performance.
Apply statistical, mathematical, and analytical techniques related to Health, Resilience, and Personal Readiness.
Provide analysis and develop information papers, presentations, and other correspondence as required.
Perform data consolidation, cleansing and analysis, and presents data from one or more source systems, cleansing and analysis, and presents data from one or more source systems.
** This requisition may be filled at a higher grade based on qualifications listed below.
Basic Qualifications:
This requisition may be filled at either a level 3 or a level 4.
Basic Qualifications for a level 3 are:
Basic Qualifications for a level4 are:
The Other Required Basic Qualifications Include:
Preferred Qualifications:
Northrop Grumman is committed to hiring and retaining a diverse workforce.  For our complete EEO/AA and Pay Transparency statement, please visit www.northropgrumman.com/EEO. U.S. Citizenship is required for most positions.


Pabst Blue Ribbon (PBR) is a trademark of Pabst Brewing Company.
Big Daddy Imperial Pale Ale is a trademark of Speakeasy Ales & Lagers. Edited by Manuel Ebert.
NTLK is copyright The NLTK project. Licensed under The Apache 2.0 License.
Scrapy is copyright Pablo Hoffman and others. Licensed under The BSD License.
"Williamsburg Waldo" is copyright Daniel Savage. Used with permissive license.
The Quick Brown Fox ESB design is copyright Wellington Country Brewery.
The Mystic Entropy design is copyright Mystic Brewery.


Hi there! I'm a window used by the GitHub package to execute Git commands in the background. My PID is .
Last command:


IN THE COMPANY OF MEN A film review by Steve Rhodes Copyright 1997 Steve Rhodes
RATING (0 TO ****): *** 1/2
Chad and Howard are a couple of suits from the head office of some nameless corporation. They've been sent on a six-week business trip to a branch office so, as guys will, ever cocky Chad proposes a game to pass the time. Afterall, "Life is for the taking, is it not?" reasons Chad. Although somewhat reluctant, Howard welcomes the idea of some excitement so he agrees to go along.
As the harmless looking trailers for IN THE COMPANY OF MEN argue, this film has no sex, no special effects, and no monsters, only conversation -- so how scary can that be? In the press kit, first-time writer and director Neil LaBute describes the movie thus, "It's a simple story: boys meet girl, boys crush girl, boys giggle."
Like its female counterpart, THE LAST SEDUCTION, the strength of IN THE COMPANY OF MEN is that it never pulls its punches. Movie goers used to Hollywood endings, where bad guys eventually get their due, may find IN THE COMPANY OF MEN disquieting, but there will be few complaints about the quality of the presentation. The acting is superlative, and the imaginative script has minimalist cadence a la David Mamet. The result is at once devastating and compelling.
Bitter white collar workers, Chad and Howard, are indignant about being passed over for promotions and paranoid about the future. Their anger extends to the women in their lives, both of the men having recently been jilted. Chad proposes a scheme whereby they will find an especially vulnerable woman and both of them will romance her. The coup de grace? "One day out goes the rug with us pulling it hard, and Jill comes tumbling after." They will string her along for the full six weeks before administering the final blow.
Aaron Eckhart plays Chad with macho evil and is one of the best screen villains in a long time. His hearty laughter and charming smile glosses over a malevolent nature always lying just below the surface. "Never lose control, that's the key," he advises Howard. And Chad is someone who follows his own advice.
Howard, as the pseudo-innocent who always bows to peer pressure, is played by Matt Malloy. Whereas Eckhart gives his character an alluring likeableness, Malloy makes his such a wimp that his is the easier of the two to despise. Chad masks his devilish behavior with a beguiling nature, but Howard has no such mask. The audience, although not the female victim, can always see through the more transparent Howard. When presented with "the game," Howard goes along even though he admits, "it's way out there." Howard is as unsure as Chad is super-confident, but Howard is quite willing to hurt others to go along with his buddy.
The object of their cruelty is a sweet, deaf woman named Christine, who is a lightning-fast typist and temporary clerical worker in the branch office. Beautiful and svelte Stacy Edwards plays Christine as a big hearted, but shy and unsure woman. Christine has not dated in quite a while and worries that men no longer find her attractive or interesting. While smooth talking her, Chad ridicules her behind her back. He says her voice sounds like Flipper and claims, incorrectly, that she slobbers when she tries to talk.
To press the point that Chad's maliciousness extends to more than women, LaBute includes scenes of Chad disparaging his male coworkers as well. In language most foul, he goes through a picture book of the company's employees telling a room full of men what he thinks of some of them not present. In private he humiliates a black intern so completely that you are sure than the scene will cut before he strips the intern of his self-respect, but as in the rest of the story, Chad never pulls back.
The director has the good sense not to make all of the classic mistakes of most first-timers. He does not try to pack the film with all of his ideas. And thankfully, he avoids shaky handheld cameras and cute angles. Filmed by first-time cinematographer Tony Hettinger almost totally in the office with the actors' faces lit by the glow of desk lamps, the audience's attention is riveted to the screen without needless distractions. Editor Joel Plotch follows the director's minimalist style so that the focus stays on the characters and their conversations.
Chad's depravity knows no bounds, but as the weeks pass, the scheme must unravel. The question is how. Suffice it to say that the intelligent dialog and engrossing story continue to the very last minute.
Studies of evil are by very their nature controversial, but this is a film that demands to be seen. And with three such wonderful performances, it is a film well worth going out of your way to find.
IN THE COMPANY OF MEN runs a fast 1:33. It is rated R for mature themes and some profanity. The show would be acceptable for teenagers if they are mature. For adults, I strongly recommend the picture and give it *** 1/2.
**** = A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show. Don't waste your money. 0 = Totally and painfully unbearable picture.
REVIEW WRITTEN ON: August 4, 1997
Opinions expressed are mine and not meant to reflect my employer's.
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


Items Total: {{cartTotal()|currency}}
Shipping: {{shippingPrice|currency}}
Total: {{cartTotal()+shippingPrice|currency}}


Legend
Metrics data within CDAP is identified by a combination of context and name.
-
CONTEXT
- A metrics context consists of a collection of tags.
- Each tag is composed of a tag name and a tag value.
-
METRICS
- A name generated by CDAP, and pre-pended with
system
- Or a name set by a developer when writing an application, which are
pre-pended with
user
.
-
GROUP BY
- This optional setting defines a list of tags whose values are used to build multiple timeseries.
- All data points that have the same values in tags specified in the
GROUP BY setting will form a single timeseries.
-
AGGREGATE
- This setting causes CDAP to return the total aggregated since the application was deployed
- Or—in the case of dataset metrics—since a dataset was created.


Title: Marlin: Escaping from IIS Author: Edwig Huisman Email<EMAIL_ADDRESS>Language: C++ Platform: Windows Technology: Webserver / Webclient Level: Intermediate Description: Complete webserver and webclient with SOAP/JSON messageing framework Section Webdevelopment SubSection Web Services License: MIT
This document is about the Marlin webserver library. It's structure and how to make use of it in your programs.
The "Marlin" components "webserver and web client" are built in C++ around a number of general classes that take care of optimal performance and have the purpose that the server and client parts can be plugged-in in a C++ project.
The main reason to build this library was to expand an existing web server with basic HTTPS capabilities like SSL and TLS connections and advanced authentication possibilities like digest- and Kerberos authentication. Instead of building all those components again, I choose to use the general existing Microsoft components "HTTP-Server API 2.0" and "WinHTTP API 5.1"
Reason to use C++ for these components " and no .NET technology " has to do with the performance of the components in comparison to the WCF services. Typically these components are a many times faster than a WCF implementation in Dot NET. Certainly if you configure all kinds of W3C standards like signing of messages, security encryption and reliable-messaging.
Another reason was the need to be able to run a webservice on remote desktops (Citrix !) environments. This was clearly not going to happen with the IIS ISAPI framework. Although IIS 7.0 and higher has done much good with the new integrated pipelining of the requests, enabling an IIS server on every desktop was not an option.Background.
This is a picture of a white marlin, a common type of marlin in the Atlantic ocean. This is about the fastest fish in that ocean and it"s a very secretive fish. If you manage to catch one on a fishing line, it will struggle on "unseen" in the deep. Like a fast webserver would :-)
a number of generic classes with which you can build the functionality of an application. These generic classes are grouped in a communal directory, so that they can be used in the server application, as well as in the client applications. Furthermore an example webserver and webclient program are created. These programs serve as a unit testing framework as well as coding examples for your convenience. This results in the following directories:
- Marlin Directory with the generic classes
- MarlinServer Directory with an example webserver
- MarlinClient Directory with an example client program
- HTTPManager Directory with the HTTP management application
To use these components and examples, u need only open the solution files in Microsoft Visual Studio (2015 version) in het MarlinServer and MarlinClient directory. Both solutions contain a test project and a directory with a sub collection of the generic classes in the Marlin directory.
For directions how to compile and set up a server on your machine, see the "Running the examples" section later on in this document.
In this picture, you can see the overview of the total architecture of the Marlin webserver & web client components.
A brief description of how to use the article or code. The class names, the methods and properties, any tricks or tips.
The central programming model is the HTTPClient object. Messages (HTTPMessage or SOAPMessage) are sent to this object through the overloaded "Send" method. After this method returns with the TRUE status, the message contains the answer of the server. You can then pull the answer of the server out of the object. Example 1 shows how this is done.
// // Example 1 // #include "HTTPClient.h" #include "HTTPMessage.h" void function() { HTTPClient client; HTTPMessage msg(http_get,"http://www.organisation.com/some_file.html"); if(client.Send(msg)) { // Success. Get the result msg.GetFileBuffer().SetFileName("C:\tmp\MyLocalFile.html"); msg.GetFileBuffer().WriteFile(); } else { // Error CString text; client.GetError(text); printf("Error getting file: %s\n",text); } }
Of course: you can extend this example in many ways, by overriding the default settings of both the client and the message with a number of Set* methods. To be able to use webservices, you only need to replace the general HTTPMessage object by the more specialized SOAPMessage object. Add a few parameters to the SOAPMessage and send to your service interface by way of the client. If the "Send()" method returns TRUE, the object will contain the answers of the server. This is shown in example 2:
// Example 2 // #include "HTTPClient.h" #include "SOAPMessage.h" HTTPClient client; SOAPMessage msg("http://mycompany.com/mynamespace/" ,"TestMethodOne" ,SOAP_12 ,"https://mycompany.com/TestInterfaceOne/"); // Fill the message with parameter info msg.SetParameter("ParamOne","Value1"); msg.SetParameter("ParamTwo","Value2"); if(client.Send(msg)) { // Success. Get the result from the object CString result = msg.GetParameter("ResultParameter"); ... } else { // Error CString text; client.GetError(text); printf("Error getting file: %s\n",text); }
Of course, in this manner we can only send 1 SOAP message at the time through our HTTP(S) channel. If we want to add the ability to add WS-Security, WS-ReliableMessaging or WSDL support we cannot do that right away. But wait: by replacing the "HTTPClient" object with a "WebServiceClient" object these protocols work right out of the box! Just use the WebServiceClient's "Send()" method will take care of this. We only need to construct a WebServiceClient object with the desired contract and URL for this purpose. See example 3:
// Example 3 // #include "WebServiceClient.h" #include "SOAPMessage.h" WebServiceClient client("http://mycompany.com/mynamespace/" ,"https://mycompany.com/TestInterfaceOne/Reliable/"); SOAPMessage msg("https://mycompany.com/mynamespace/","TestMethodOne") client.SetReliable(true,RELIABLE_ONCE); // Fill the message with parameter info msg.SetParameter("ParamOne","Value1"); msg.SetParameter("ParamTwo","Value2"); if(client.Send(msg)) { // Success after WS-Reliable protocol. Get the result from the object CString result = msg.GetParameter("ResultParameter"); ... } else { // Some error handling CString text; client.GetError(text); printf("Error getting file: %s\n",text); }
The central programming model is the sitehandler. Each handler is an object class that handles 'in principal' one of the HTTP methods. So there is a handler for the GET and PUT commands of the HTTP protocol. Each handler has a central method "Handle", with the current received message as a parameter. Information is pulled out of this object, after which the object is reset to a null state with the "Reset" method and filled with the answer. There is no need to call a Send() or Answer() method to send the result back to the caller. This is done by the framework automatically after the handler has ended. Here is a (very) simple example to service a GET request. Be advised: do not do this at home!!
// Example 4 // #include "SiteHandlerGet.h" #define webroot "C:\\inetpub\\myapp\\" bool SiteHandelerGet::Handle(HTTPMessage* p_message) { CString filename = webroot + p_message->GetAbsolutePath(); p_message.Reset(); p_message.GetFileBuffer.SetFileName(filename); }
To service a basic SOAP request, you need only use the SOAP handler in this same manner. The SiteHandlerSoap has an override of the "Handle" method especially designed to service SOAP requests. Again there is no need to send the answer back. That is done after the handler has ended. Here is a handler to service the request from example 2.
// Example 5 // #include "SiteHandlerSoap" bool SiteHandlerSoap::Handle(SOAPMessage* p_message) { // Getting the info CString paramOne = p_message.GetParameter("ParamOne"); CString paramTwo = p_message.GetParameter("ParamTwo"); // Reseting the object p_message.Reset(); // Doing our logic! if(paramOne == "Value1" && paramTwo == "Value2") { P_message.SetParameter("ResultParameter","I declare this OK"); } }
Now, how do we create an http handler on the server side? There are several ways which we show here. At first we need to declare an HTTPServer object. That"s the easy part. You then create an HTTPSite, set a few paramters of that site and "start" it.
One of the parameters you set, is a SiteHandler which you declare first.
Here is a more elaborate example that extends the example number 5 just before.
// Example 6 // #include "HTTPServer.h" #include "HTTPSite.h" #include "SiteHandlerSoap" class SiteHandlerSoapForMe : public SiteHandlerSoap { protected: Bool Handle(HTTPMessage* p_message); } bool SiteHandlerSoapForMe::Handle(SOAPMessage* p_message) { // Getting the info CString paramOne = p_message.GetParameter("ParamOne"); CString paramTwo = p_message.GetParameter("ParamTwo"); // Reseting the object p_message.Reset(); // Doing our logic! if(paramOne == "Value1" && paramTwo == "Value2") { P_message.SetParameter("ResultParameter","I declare this OK"); } } void CreatingTheService() { CString url("https://mycompany.com/TestInterfaceOne/"); HTTPServer server("TestInterfaceOne"); HTTPSite* mysite = server->CreateSite(URLPRE_Strong,true,443,url); // Setting the SOAP handler for this site site->SetHandler(http_post,new SiteHandlerSoapForMe()); site->AddContentType("application/soap+xml"); // Start the site explicitly if(site->StartSite()) { printf("Site started correctly: %s\n",url); } else { ++error; printf("ERROR STARTING SITE: %s\n",url); } // Now start the server running (in it's own thread!) server.Run(); // Or start the server in this thread (commented out) // Server.RunHTTPServer(); }
As with the client programming model, we can again substitute the HTTPServer object for a WebServiceServer object. This enables us to handle WS-Security, WS-ReliableMessaging and the checking against a WSDL. The server side also will write the WSDL file on starting the object, unless we tell it not to with "SetGenerateWsdl(false)".
Here is how to do this:
// Example 7 // #include "WebServiceServer.h" void CreatingTheService() { CString url("https://mycompany.com/TestInterfaceOne/"); CString webroot("C:\\inetpub\\"); CString namespace("http://mycompany.com/mynamespace/"); WebServiceServer server("TestOne",webroot,url,URLPRE_STRING,namespace,10); // Create our site HTTPSite* mysite = server->CreateSite(URLPRE_Strong,true,443,url); // Setting the SOAP handler for this site site->SetSoapHandler(http_post,new SiteHandlerSoapForMe()); // Running the server server.Run() }
But if we want to run a group of webservices? Like a service interface and describe it in a WSDL file for the world to know? Well: this can also be done in a WebServiceServer. To enable the WSDL functionality, you first have to register all services in the wsdl cache of that server. This can be done by submitting a copy of an incoming and an outgoing SOAPMessage to this cache. In the mean while you can do two things:
Add extra info to each parameter for the WSDL for the "mandatory / optional" status, and the optionality of the ordering of the elements
Provide each message with a service number, for use in the receiving dispatcher. Hold on to that thought and see what happens while programming.
Below is an excerpt from the testing examples, where I first derive a class form the web service server, and defining three services (one, two and three) for this class.
// Example 8a // #include "WebServiceServer.h" #include "SiteHandlerSoap.h" #define CONTRACT_MF 1 // First #define CONTRACT_MS 2 // Second #define CONTRACT_MT 3 // Third // DERIVED CLASS FROM WebServiceServer class TestContract: public WebServiceServer { public: TestContract(CString p_name ,CString p_webroot ,CString p_url ,PrefixType p_channelType ,CString p_targetNamespace ,unsigned p_maxThreads); protected: WEBSERVICE_MAP; // Using a WEBSERVICE mapping // Declare all our webservice call names // which will translate in the On.... methods WEBSERVICE_DECLARE(MarlinFirst) WEBSERVICE_DECLARE(MarlinSecond) WEBSERVICE_DECLARE(MarlinThird) // Our functionality CString Translation(CString p_language,CString p_translation,CString p_word); // Set input/output languages CString m_language; CString m_translation; };
After we have instantiated an object of this class we, can add the incoming and outgoing SOAP messages to the WSDL cache of the WebServiceServer through "AddOperation".
The operations in this example here have numbers 1 (CONTRACT_MF), 2 (CONTRACT_MS) and 3 (CONTRACT_MT).
// Example 8b // #include "WebServiceServer.h" ////////////////////////////////////////////////////////////////////////// // // PREPARING OUR WSDL, This is what will fill the WSDL file // void AddOperations(TestContract& p_server,CString p_contract) { // Defining the names of the operations CString first ("MarlinFirst"); CString second("MarlinSecond"); CString third ("MarlinThird"); CString respFirst ("ResponseFirst"); CString respSecond("ResponseSecond"); CString respThird ("ResponseThird"); // Defining input and output messages for the operations SOAPMessage input1 (p_contract,first); SOAPMessage output1(p_contract,respFirst); SOAPMessage input2 (p_contract,second); SOAPMessage output2(p_contract,respSecond); SOAPMessage input3 (p_contract,third); SOAPMessage output3(p_contract,respThird); // Defining the parameters for all the operations // First: Getting an accepted language input1 .AddElement(NULL,"Language",WSDL_Mandatory | XDT_String, "string"); output1.AddElement(NULL,"Accepted",WSDL_Mandatory | XDT_Boolean,"bool"); // Second: Getting an accepted translation input2 .AddElement(NULL,"Translation",WSDL_Mandatory | XDT_String, "string"); output2.AddElement(NULL,"CanDo", WSDL_Mandatory | XDT_Boolean,"bool"); // Third Getting the answer input3 .AddElement(NULL,"WordToTranslate",WSDL_Mandatory | XDT_String,"string"); output3.AddElement(NULL,"TranslatedWord", WSDL_Optional | XDT_String,"string"); // Putting the operations in the WSDL Cache p_server.AddOperation(CONTRACT_MF,first, &input1,&output1); p_server.AddOperation(CONTRACT_MS,second,&input2,&output2); p_server.AddOperation(CONTRACT_MT,third, &input3,&output3); }
Adding the operations to the WebServiceServer derived class, will automatically result in the writing of a WSDL file, unless of course we set "SetGenerateWsdl" to false.
After defining the interface, we can now define the operations themselves. This is the easy part where we define our handlers.
// Example 8c // #include "WebServiceServer.h" // Implementation of the TestContract class TestContract::TestContract(CString p_name ,CString p_webroot ,CString p_url ,PrefixType p_channelType ,CString p_targetNamespace ,unsigned p_maxThreads) :WebServiceServer(p_name,p_webroot,p_url,p_channelType,p_targetNamespace,p_maxThreads) { } // Mapping corresponding to the AddOperation of the WSDL WEBSERVICE_MAP_BEGIN(TestContract) WEBSERVICE(CONTRACT_MF,MarlinFirst) WEBSERVICE(CONTRACT_MS,MarlinSecond) WEBSERVICE(CONTRACT_MT,MarlinThird) WEBSERVICE_MAP_END ////////////////////////////////////////////////////////////////////////// // // HERE ARE THE SERVICE HANDLERS!! // Derived from the definition above in the WEBSERVICE_MAP // ////////////////////////////////////////////////////////////////////////// void TestContract::OnMarlinFirst(int p_code,SOAPMessage* p_message) { ASSERT(p_code == CONTRACT_MF); m_language = p_message->GetParameter("Language"); printf("\n"); printf("Setting base language to: %s\n",(LPCTSTR)m_language); // Reset message and set answering parameters p_message->Reset(); p_message->SetParameter("Accepted",m_language == "Dutch"); } ... more handlers... See "TestContract.cpp"
After this bit of abstraction you need only to write a "OnXxxxxx" handler for each service call, using the input parameters, resetting the message and providing the answering parameters. All the rest is done by the Marlin framework.
After this long explanation of the way of programming, let's look at how that can be caught in a thinking model for programming. Ideally you construct a SOAP message through a call to the constructor (new SOAPMessage), and you send this message of to the HTTPClient. After the call returns, you receive either a null pointer, or an answer.
The framework takes care of constructing a HTTPMessage out of your SOAP message, carrying it over the HTTP(S) intra/internet to your server, where it gets processed, and returns a message to you.
Note: Wherever you see the word "SOAP" in this text and the figure below, you can also read "JSON".
After downloading the sourcecode, the steps to get the examples running are the following:
1) Startup Visual Studio 2015 (minimum requirement);
2) Load the "HTTPManager" project and compile that one first, so we can set up a server on our machine. Recommended is to compile the "debug | x64" variant;
3) Start the HTTPManager and register the site "http://localhost:1200/MarlinTest/" (see the figure below how to do this);
After starting you should:
1) Press the "Listen on IP" button to make sure your machine will listen to IP traffic;
2) Fill in the number "1200" for a port number. All tests run on IP port 1200;
3) Fill in the base path "/MarlinTest". All test run on subsites of this site;
4) Press the button "Create" to register the "http://+:1200/MarlinTest" prefix listener;
5) Close the HTTPManager program and go back to Visual Studio;
6) Load the "MarlinServer" project and compile it;
7) Start a Second Visual Studio and load and compile the "MarlinClient" project;
8) Now start the MarlinServer first and check that all sites have been registered;
9) Start the MarlinClient now and if all tests are satisfactory it will end with a "Yipee!!"
But why not using IIS for those applications where we can clearly administer them the correct way, without having to "smuggle" them in? The ISAPI programming model for native applications in C or C++ have some clear restrictions, stemming from the IIS administrative model. These restrictions are exposed below:
Long ago I needed a webserver that was capable of running on Citrix desktops. With the extra requirement that no administrator should be bothered to
grant me the rights to run a webserver like IIS or apache for instance. What I wanted was a webserver I could "smuggle" on board in a corner of a larger
application. So that the applications could communicate with each other on a relatively free and with zero administrative overhead.
After a long search I settled with the "Universal TCP Socket" program from Elmue that I found on Codeproject (http://www.codeproject.com/Articles/34163/A-Universal-TCP-Socket-Class-for-Non-blocking-Serv). It is a very nice product and along with other things has asynchronous handling of incoming TCP/IP traffic. The only thing needed was the implementation of the full HTTP protocol. Which I then did. And it worked out well for quite some time.
But times changed. Could I not take care of the wish to be able to also run on the internet, instead of the intranet alone? And please could you then see to it that the server understands regular SSL/TLS and authentication methods?
Well, what righteous programmer wouldn't? I imagined myself already exploring the OpenSSL libraries and all sorts of cryptographic methods, but hey... wait.. Why bother if Microsoft hadn't taken care of that already? After a thorough bing/google search I found and settled for the "HTTP Server API" from Microsoft. (https://msdn.microsoft.com/en-us/library/windows/desktop/aa364510(v=vs.85).aspx). It's incorporated for free in any MS-Windows installation and after Windows-Vista / Server 2008 the version 2.0 of this library also takes care of SSL/TLS and authentication. So I ported the central classes of this library from the "Universal TCP Socket" to the "HTTP Server API 2.0", and it became the HTTPServer in this program.
Well, to be exact: I hesitated for a while. Why not use an existing framework like gSOAP (http://www.cs.fsu.edu/~engelen/soap.html ) or the new and promising "Casablanca" framework from Microsoft (https://casablanca.codeplex.com)? Both are on a slightly higher abstraction level and provide all needed mechanisms. But after experimenting with both, I decided to stick with the current programming model. gSoap proved to be quite arcane and Casablanca a moving target before it moved to codeplex.
Communication with other programs 'mainly in the .NET stack' were required over the years. Some of these programs used the "reliable-messaging-interface". So that was added in an extra abstraction layer in "WebServiceServer" and "WebServiceClient". Because the Microsoft .NET stack uses WSDL 1.1 and not 2.0 like the Java stack, I used that version (1.1) for the support of WSDL (Sorry Java guys).
From the beginning on I had written the HTTPMessage and the SOAPMessage to abstract the sending and receiving of messages. HTTPMessage took care of files (put and get) and the SOAPMessage took care of SOAP XML messages. All sites were sitting in a mapping of the server. After some time the server spread to more and more programs and it soon became clear that an extra layer of abstraction was needed. This became the HTTPSite object. Much of the settings and attributes of the server moved to the site objects, so that different sites could have different settings.
This web server is currently in its third incarnation. The version history is included in the sourcecode in the documentation directory. As is this document and the architecture overview in a Visio drawing.
A complete revision history of this project is contained within the source download.


In my recent post I wrote that I’m leaving my current job and moving back to Slovenia to start working on my own startup. In this post I’m going to provide a high level overview of a process and most of the bureaucratic things which are involved if you have a some kind of work visa (H1B in my case) and you want to move back to your home country.
Motivation
If you search around the web you can find plenty of blog posts, articles and resources for people who got a job or want to work in the US ( e.g. “Getting a job in San Francisco”).
Golden Gate Bridge, San Francisco, California
The same is not true if you turn the situation around. If you currently hold some kind of work visa and you want to move back to the home country there are basically no high level resources you could use to know what to expect.
I recently went through this process myself so I have fresh and first hand experience. Actual process involved a lot digging and reading through long and mostly boring legal documents.
I hope this post will act as a high level overview, help other people in a similar situation and give a better idea of how the whole thing looks like to people who never went through a process like this personally.
A lot of things described in this post are similar to the process you need to go through if you are just changing your job or moving to a different location, but there are two major differences:
- If you have H1B, there is no grace period which means you are on a tight schedule and need to make sure all the dates align perfectly.
- You are mostly on your own. If you get a job offer from a respectful company in the US, the company will usually pay the lawyers and take care most of the bureaucracy. The whole process is still very stressful and there are a lot of factors you nor lawyers can control, but at least you are not on your own.
Disclaimer
First I want to add that I’m going to talk about my specific case and people who hold H1B visa. The same things might not apply to other type of visas valid for work.
Second of all, I’m not a lawyer nor a tax adviser so please, if you are not sure about something, do your own research and consult your lawyer and / or tax adviser before doing something based just on this blog post.
Why move outside of the US in the first place?
First of all, a lot of people will ask why move outside of the US in the first place? Why not just start the company in the US? Isn’t Silicon Valley one of the best places for a technical and social startup to be?
To start with the last questions - the answer is yes. For majority of the technical and social startups Silicon Valley indeed is the best place to be.
Sadly if you are foreign-born and don’t have a US citizenship you are mostly out of luck. The reason is that US immigration doesn’t welcome foreign-born entrepreneurs without US citizenship and makes it basically impossible to start your own company in the US if you don’t have a lot of money to try your bets with the investor visa (E2) or similar.
Visualization of different type of visas and path to the green card.
That is very sad, especially because a lot of large and successful US companies were started by foreign-born entrepreneurs. The whole immigration problem is a very complex topic and I can’t do it justice in a single paragraph. All I can say is that I’m happy to see other countries recognizing this problem and trying to do something about it (examples include StartupChile sponsored by the Chilean government and Canada’s Start-Up Visa program).
Billboard on U.S. 101. Bold and clever way of advertising Canada's new Start-Up Visa.
Luckily recently a bunch of well known Silicon Valley entrepreneurs have stepped together and started working on a new immigration reform. The whole reform is not ideal, but it’s a step in the right direction and a big improvement over the current situation. I hope the bill will pass in the senate, but I’m not too optimistic because similar efforts have failed in the past.
H1B and grace period
Contrary to a popular belief there is no grace period for H1B holders.
If you want to do everything correctly and / or come back in the future it should be in your best interest to leave the country as soon as possible after your last work day.
In my case I left the country one day after my last working day.
Resignation Letter
In California you are employed at will which in the layman’s terms means that either you or your employer can terminate the employment relationship at any time, with or without reason (exceptions include discriminatory and a couple of other reasons).
Common practice when quitting your job is to give around 2 week notice to your employer. In a special case like this you need to figure a lot of things out (401k, apartment, ESPP, selling your belongings, etc.) which aren’t under your control and involve talking to HR and other people and institutions.
This means you should take all of this into account before giving your notice and make sure you have plenty of time to figure all of this out.
Sailing permit, taxes and the IRS
If you are on a work visa and you are going to leave a country for a longer period you need to obtain a document called ”sailing permit” from the IRS.
If you read about it online, people says that almost no one checks for a sailing permit when you leave the country. If you ever want to return to the US and do everything the right way you should obtain this document.
To purpose of this document is to prove IRS that you don’t ow them any money and if you do, you need to pay it before you can get a permit and legally leave the country.
The way this process works is as follows. You go to the local IRS office and with you, you need to have the following documents (for a full list see the IRS website):
- Photo ID (passport / california id / driving license)
- Your visa (usually located in your passport)
- Plane ticket which shows your date of departure
- Tax return for the previous year (to show that you paid any taxes due)
- W2’s for the previous years
- Pay stubs for the current year (to show taxes were withheld from your paychecks)
- Filled 1040C form
Regular 1040 tax return form. You
will need to fill this at the end of the current tax year.
The last part is one of the most important ones. 1040C is a one time early tax return for a foreign alien leaving the country.  If you do you need to pay them before you leave. If the IRS owes you money they won’t return this when you leave, but you need to claim that when you are filling your regular tax return for the current tax year.
If you only have a single source of income (your job), aren’t self employed and don’t have any vested shares, filling 1040C is pretty straightforward.
Keep in mind that things will get more complex when you are going to file your regular tax return for the current tax year (1040 or 1040NR). If you meet the substantial presence test, you will also ow US taxes for any money you make outside the US in this tax year. Most of the details again depend on your specific situation so be sure to do your own research.
If there is no treaty between the US and your home country you will also need pay taxes to the US and your home country. Luckily that is not the case with Slovenia, because we have signed a treaty for avoidance of double taxation.
Selling your belongings
This title is pretty self explanatory and it’s almost the same if you are just moving to a different location.
The only difference is that under this scenario you are usually under time pressure and all of the dates must line up perfectly.
Garage sale is one way to get rid of your belongings.
Usually way more fun than selling to random creepy people on Craigslist.
In my case, I luckily didn’t own a car or too many items so this process wasn’t too painful.
Moving out of your apartment
This is only applicable if you are renting as I did.
Specific details depend on your lease agreement, but usually you need to give at least 30-day notice in writing to your landlord.
401k
If you are enrolled into a 401k plan you have multiple options. Depending on your provider you can leave money in the account (if you ever plan to come back). Other options include transferring money to a similar fund in your home country or taking the money out when your employment has been terminated.
Keep in mind that under normal circumstances you can’t start a process of early withdrawal until you no longer work for a company that provides your 401k.
If you take the money out of the account early (before reaching the retirement age) you will also need to pay regular income tax and 10% early withdrawal penalty.
What is best for you depends on your specific situation, you home country and how much money you have in your account.
Bank Accounts
If you are not a citizen, most banks require you to have either social security number (SSN) or Individual Taxpayer Identification Number (ITIN) to have an account open with them.
If you have an H1B work visa you most likely also have a social security number, because H1B alone it’s not enough to work in the US. You usually apply for social security number as soon as you arrive in the US on H1B.
This means that usually you can keep your bank account open, unless your bank also requires you to have a valid US address. Some banks require that while others allow foreign account holders. It’s best to check with your bank.
Health Insurance
Usually when you leave a job your company insurance is not valid anymore. Specifics depend on the company. In some cases insurance is still valid until the end of the month and in case of layovers company might even pay insurance for a couple of more months after the termination.
Health care can be a big and expensive pain if you are temporarily without a job in the US (e.g. COBRA).
Luckily this wasn’t a problem for me because we have a universal healthcare in Slovenia and I returned back immediately after I left my job.
Conclusion
This blog post is pretty specific to my situation, but nevertheless I hope it will help clear things up, save time and act as general overview for other people in a similar situation.
Apache Cassandra includes a lot of functionality and tools which provide good visibility into your cluster health and performance.
A lot of this performance and health related metrics are exposed over the JMX interface and through the nodetool command line tool. nodetool is a simple wrapper around JMX interface which allows you to access some of the most commonly used attributes through a simple command line interface.
Another feature which was added recently and is available in Cassandra 1.2 is a feature called request tracing. Request tracing allows you see exactly what happens during a query executing and exactly how long each step takes.
Example of the request tracing session output.
This data is very granular and includes everything from how much time it takes to parse the CQL query to how much time it takes to talk to other nodes in the cluster and read data from memory and / or disk.
This functionality is very powerful, but it’s only available in Cassandra 1.2.
Some of the Cassandra clusters we operate here at Rackspace, more specifically on the Cloud Monitoring team, don’t run Cassandra 1.2 yet. Because of that, I’m going to focus on another very useful feature which is available in the older versions of Cassandra today.
This feature is cfhistograms
command exposed by the nodetool
utility.
cfhistograms command prints statistic histograms for a particular column family. The output includes the following information:
- Distribution of the write latency
- Distribution of the read latency
- Distribution of number of sstables accessed during a read
- Distribution of the row size
- Distribution of number of columns in a row
nodetool cfhistograms command output. Useful but hard to interpret.
This information is very useful, but the problem is that the default output is very convoluted and hard to read. If you Google around, you can find some good posts which explain how to interpret this output (e.g. Cassandra 0.7.x - Understanding the output of nodetool cfhistograms), but nevertheless interpreting the raw command line output is still time consuming and cumbersome.
Visualizing cfhistograms output
Around a year ago I was debugging a performance issues in one of our clusters so I decided to write simple Python script which visualizes the cfhistograms
output using a histogram.
This script is nothing fancy, but it does it’s job. In the background it uses a couple of lines of Python and matplotlib to convert the raw text output into nice looking histograms.
Histogram generated by the script. It makes identifying the outliers just by glancing over the image a lot
easier and faster.
Usage
Script is available as a gist on Github.
1. Download and chmod the script
wget "https://gist.github.com/Kami/5810229/raw/189ab7232bcb6db5dd5f6871533bcb5efecdfd84/cassandra_cfhistograms_to_histogram.py"
chmod +x cassandra_cfhistograms_to_histogram.py
2. Install the matplotlib dependency
3. Run the script
./cassandra_cfstats_histogram.py --input=<path to the file with cfhistograms output> \
--output=<directory where the histograms will be saved>
For example:
./cassandra_cfstats_histogram.py --input=/home/myuser/cfhistograms_output.txt \
--output=/home/myuser/histograms-images/
All this script does it reads data from the input file, processes it and writes 5 different histogram files to the output directory.
Conclusion
I hope you find it useful and this script will allow you to more easily interpret the output of nodetool cfhistograms
command.
In the future, I will try to write more about how we used the output of this command in practice to identify and issue and misconfiguration in one of our clusters.
Yesterday we hosted Libcloud Design Day and Meetup at the Rackspace San Francisco office.
This blog post includes a short recap of main topics we covered. It’s assembled mostly from my Libcloud mailing list post.
The goal of the event was to sit down with the Libcloud users and developers, indicate current biggest pain points and weaknesses and brainstorm about possible solutions.
Event was relatively small, but we had a good sample set of Libcloud developers and user.
Photo taken at the event
Here is an incomplete list of people who have attended the event:
You might recognize some of the names above - we were very happy to have some very well known and knowledgeable people from the Python world to join us.
Pricing data distribution
Currently we bundle JSON file with provider pricing data with every release. There is no documented and easy way for user to update this file or for us to ship an updated version without releasing a new version of Libcloud.
We should provide easy way to update this file which includes the following:
- Command line tool for updating the file - user can specify a custom URL to the file. By default it should point to the latest version from the version control (https://svn.apache.org/viewvc/libcloud/trunk/libcloud/data/pricing.json?view=co)
- Modify the code so it also tries to find the default pricing data file in
/home/user/.libcloud_data/pricing.json
(or whatever) directory
- Document this process and add it to the documentation page
Note: Most of code for this functionality already exists (https://github.com/apache/libcloud/blob/trunk/libcloud/pricing.py). We just need to add a code for downloading a file from a remote server and the cli tool.
Exception reporting for partial failures in the methods which result in multiple API calls / HTTP requests
Currently we have no standard interface for exceptions which get raised during a partial failure in a method which has side affects. Partial failure means that a function which performs multiple API calls failed half way through and this potentially resulted in some (but not all) resources getting created.
We should provide a special exception for cases like this. This exception should contain information about resources which got created. Users can then use this information to perform “rollback” / cleanup partially created resources.
Support for async API in the core
Currently we only expose sync / blocking API. This mostly works OK for simple command line scripts, but it’s less than ideal for long running process or applications which performs a lot of API calls which could be made more efficient and faster if we supported an async api.
As part of this change we would eventually need to refactor every driver which would also provide other side benefits such as:
- Code which is more maintainable and easier to test (smaller functions)
- Easier way to handle partial failures / exceptions
We didn’t come to a consensus on everything, but we agreed on a couple of things:
- Change should be backward compatible, we should default to the sync API and existing behavior code / shouldn’t change
- New async API should be available separately (e.g. under
libcloud.async.*
or whatever it ends up being)
- We should refactor internal code to follow new interfaces defined in the PEP 3156 (http://www.python.org/dev/peps/pep-3156/)
- We should start with a small scale experiment and try this in a single method in a compute driver
Documentation
We are weak on the documentation side.
Going forward we should strictly enforce that every patch which adds new code / functionality contains documentation and appropriate docstrings.
Migrating to git
We want to make contributing as easy as possible. SVN doesn’t help with that and increases barrier to entry.
Action item here is me opening an Apache Infrastructure ticket for switching to git.
Dropping support for Python 2.5
Supporting Python 2.5 adds code complexity which we would like to avoid. Main problem is that a bunch of CLI tools based on Libcloud usually also run on older versions of Linux distributions (e.g. RHEL 5) which still ship with Python 2.5.
We didn’t managed to actually talk about this one, but we should explore an option of removing support for Python 2.5 in the future release.
Conclusion
Overall the event was fun and productive. We had a lot of good debates and hopefully a lot of the things we talked about will result in real code and improvements in the near future :-)
Thanks again to everyone who joined us. If you missed the event or you couldn’t attend, don’t worry! You are more than welcome (and encouraged) to join us and share your opinion and feedback on the mailing list.
For as long as I can remember I have been interested in startups and growing a sustainable business. I have finally decided to take the next step. I’m leaving Rackspace and moving back to Slovenia to start working on my own startup.
In this post I will provide some background and describe my motivation for doing that.
History and Background
The last couple of years were very exciting for me. In 2010 I joined the Y-Combinator startup Cloudkick. Later, when Cloudkick was acquired by Rackspace, I relocated to San Francisco to work for Rackspace in their new San Francisco office.
During that time I had a chance to work with some of the best people in the industry, acquired a lot of new knowledge and experienced a lot of things first-hand.
It’s impossible to list all the things I’ve learned and experienced, but just to name a few - I’ve experienced the startup culture, I’ve experienced the “Silicon Valley bubble”, I helped grow our San Francisco office from ~30 to ~80 people, I worked on Cloud Monitoring (successor to Cloudkick), I launched a product and I learned how things work at a relatively large company.
Cloudkick team in 2010
(missing Russel Haering)
Besides all of that, I also met a lot of great people and made a lot of great friends with whom I hope to stay in touch for years to come.
All of that helped me to become not just a better engineer but a better person overall.
Now you might ask, how does all this relate to running your own startup?
The answer is that I’ve always paid attention to startups, long before I joined Cloudkick.
I’ve been reading articles, books and news about startups for as long as I had internet connection (~12 years).
Because of that I always wanted to do my own startup. I’ve had a countless number of side projects, websites and ran many different online communities, but nothing on which I would focus full-time I would personally call a “real startup”.
At Cloudkick, I experienced first hand what it was like working with a small and tightly connected team, building a product which makes life easier for customers. The experience just made me want to do it even more.
Why my own startup?
I personally believe that best way to learn something new and retain the this knowledge is through first-hand experience. This doesn’t mean you should just recklessly dive into something without any background or theoretical knowledge. Quite the contrary, if a literature is available, I believe that having a solid theoretical understating of a problem is one of the pre-requisites to make “learn more through experience” process really effective.
The same thinking applies to starting my own startup. I’ve already learned a lot and experience some of that at Cloudkick, but I didn’t join in a really early phase and I wasn’t one of the founders.
This means I wasn’t involved as intimately as I would want from the beginning and I missed a lot of things I still want to learn and experience.
I had plenty of opportunities to join an existing early and not so early stage startup, but I believe that starting my own thing and being a founder will allow me to learn more than I otherwise could.
Rackspace San Francisco logo by Logan
Welliver
Why now?
I believe now is the right time for me, because there are multiple things which will probably change over the years and make it harder for me to do a startup.
Most of the reasons listed bellow aren’t anything special and a lot of people would simple call those things “life”.
- I’ve made a lot of friends and connections which I can ask for help and advice
- I’m not settled down or too tied to a particular location yet
- I don’t have a family yet
- I’m still relatively young and don’t have a lot to lose, but I have plenty to gain (learn new things)
- I believe I have the right co-founder. We’ve known each other for a long time, we both share the same core values, but we both have different background and skills and bring different perspective to the table. I think diversity is very important and all of that makes us a great team.
- Most of the things I do well now I will still be able to to well couple of years in the future. In fact, I would argue that I will be able to do those things better because running my own startup will allow me to learn plenty of new things, obtain new experience and allow me to look at the problems from a different perspective. I believe that overall those things will also help make me a better person and engineer down the road.
I want to add that none of the things listed above are real blockers for running a (successful) startup. Quite the contrary, I know people who fit in few of the “categories” described above who are still very successful at running a startup.
The fact is that those people are in a minority and running a startup by itself is already a hard thing. Looking at it from a pure engineering and common sense perspective it makes sense to eliminate other things which could make it even harder and reduce number of people you could unintentionally hurt (there are plenty of stories about damaged or broken relationships).
What are the next steps?
When I get back to Slovenia I will first focus on building an MVP and getting it out to users as soon as possible. There will obviously also be a lot of other non-product development effort related to starting and growing a startup (legal, incorporating, marketing, …) but in the end it will all boil down to to be continuous iteration of the Build-Measure-Learn process.
Lean Startup Cycle per Lean Startup
Book
I will also try to do a better job with my blog. I will try to write more tech related articles and how my startup is evolving and what I have learned during this process.
In this post I will describe how to host APT repository on Rackspace Cloud Files.
First you need to create a CDN enabled container. You can do this using Libcloud or the new Rackspace control panel. Depending on how frequently you are going update your APT repository it is also recommended to lower the container TTL from the default value of 3 days to 900 seconds.
After you have created a CDN enabled container you need to install Python script I wrote which allows you to sychronize files from a local directory to a container hosted in one of the Storage providers supported by Libcloud.
sudo pip install file-syncer
Next we are going to create a dummy APT repository::
mkdir -p /tmp/apt-test/conf
cat > /tmp/apt-test/conf/distributions <<DELIM
codename: precise
Components: main
Architectures: i386 amd64
DELIM
Add a test package using reprepro
:
wget http://us.archive.ubuntu.com/ubuntu/ubuntu/ubuntu/pool/main/a/acpi/acpi_0.09-3ubuntu1_amd64.deb
reprepro -b /tmp/apt-test/ includedeb precise acpi_0.09-3ubuntu1_amd64.deb
And test the script:
file-syncer --log-level=DEBUG --directory=/tmp/apt-test/ --username=your username --key=your api key --container-name=container name
If everything went well, you should see an output similar to this one:
22 Jul 2012 22:36:05 : INFO : Using provider: CloudFiles (US)
22 Jul 2012 22:36:07 : DEBUG : Found 15 local files
22 Jul 2012 22:36:08 : DEBUG : Manifest doesn't exist, assuming that there are no remote files
22 Jul 2012 22:36:08 : DEBUG : Found 0 remote files
22 Jul 2012 22:36:08 : INFO : To remove: 0, to upload: 15
22 Jul 2012 22:36:08 : DEBUG : Uploading object: db/contents.cache.db
22 Jul 2012 22:36:08 : DEBUG : Uploading object: dists/precise/main/binary-amd64/Packages
22 Jul 2012 22:36:08 : DEBUG : Uploading object: dists/precise/main/binary-i386/Release
22 Jul 2012 22:36:08 : DEBUG : Uploading object: dists/precise/main/binary-i386/Packages
22 Jul 2012 22:36:08 : DEBUG : Uploading object: db/packages.db
22 Jul 2012 22:36:08 : DEBUG : Uploading object: pool/main/a/acpi/acpi_0.09-3ubuntu1_amd64.deb
22 Jul 2012 22:36:08 : DEBUG : Uploading object: db/release.caches.db
22 Jul 2012 22:36:08 : DEBUG : Uploading object: db/version
22 Jul 2012 22:36:08 : DEBUG : Uploading object: conf/distributions
22 Jul 2012 22:36:08 : DEBUG : Uploading object: db/references.db
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: dists/precise/main/binary-amd64/Packages
22 Jul 2012 22:36:09 : DEBUG : Uploading object: dists/precise/main/binary-i386/Packages.gz
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: dists/precise/main/binary-i386/Packages
22 Jul 2012 22:36:09 : DEBUG : Uploading object: dists/precise/main/binary-amd64/Packages.gz
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: db/release.caches.db
22 Jul 2012 22:36:09 : DEBUG : Uploading object: db/checksums.db
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: dists/precise/main/binary-i386/Release
22 Jul 2012 22:36:09 : DEBUG : Uploading object: dists/precise/main/binary-amd64/Release
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: conf/distributions
22 Jul 2012 22:36:09 : DEBUG : Uploading object: dists/precise/Release
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: db/packages.db
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: db/contents.cache.db
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: db/references.db
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: db/version
22 Jul 2012 22:36:09 : DEBUG : Object uploaded: pool/main/a/acpi/acpi_0.09-3ubuntu1_amd64.deb
22 Jul 2012 22:36:10 : DEBUG : Object uploaded: dists/precise/main/binary-amd64/Packages.gz
22 Jul 2012 22:36:10 : DEBUG : Object uploaded: dists/precise/main/binary-i386/Packages.gz
22 Jul 2012 22:36:10 : DEBUG : Object uploaded: db/checksums.db
22 Jul 2012 22:36:10 : DEBUG : Object uploaded: dists/precise/Release
22 Jul 2012 22:36:10 : DEBUG : Object uploaded: dists/precise/main/binary-amd64/Release
22 Jul 2012 22:36:11 : INFO : Synchronization complete, took: 4.62 seconds
After the upload has finished, you can test the repository by adding it to your APT sources list:
echo "deb http://c15173579.r79.cf2.rackcdn.com precise main" | sudo tee -a /etc/apt/sources.list.d/test-api-repo.list
We are also going to disable APT HTTP request pipeling. This step is required, because a nginx proxy running in front of the CDN doesn’t seem to support HTTP/1.1 pipelining. If you skip this test apt-get update will still work, but it will get stuck on [Waiting for headers]
for a longer period of time.
echo "Acquire::http::Pipeline-Depth "0";" | sudo tee -a /etc/apt/apt.conf.d/pipeline-workaround.conf
You can test that everything is working by issuing the following command:
sudo apt-get update ; sudo apt-cache policy acpi
You should get an output similar to this one:
acpi:
Installed: (none)
Candidate: 1.6-1
Version table:
1.6-1 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
0.09-3ubuntu1 0
500 http://c15173579.r79.cf2.rackcdn.com/ precise/main amd64 Packages
That is it. To make sure your container is always up to date, you need synchronize it every time you add a new packages. This can be achieved in multiple ways:
- adding a script which runs synchronize command after adding a package
- adding a cron job which periodically runs the sync command


Diploma raises dividend on the back of strong 2019 performance
by Edward ThicknesseLondon-listed Diploma today announced that it would list its final dividend by 15 per cent, after posting strong double-digit growth in both earnings and revenue.
Shares in the company rose nearly three and a half per cent during the morning’s trading.
Read more: Industrial parts supplier Diploma eyes further acquisitions
The figures
The company, which supply technical products such as wiring and seals for the life sciences, said that profit rose 14 per cent to £97.2m, up from £84.9m in 2018.
Revenue also grew 12 per cent to £544.7m from £485.1m last year, driven by a strong performance across healthcare divisions.
Cash flow slipped 7 per cent to £56.5m, with net debt at £15.1m at the year end.
Earnings per share and total dividend per share each saw double-digit growth, to 64.3p and 29p respectively.
Why it’s interesting
2019 was a record year for acquisitions for the company, which invested £78.3m in four new businesses.
Diploma said that the growth in uncertainty in global industrial markets had resulted in a healthier pipeline of opportunities for such purchases.
It added that the contribution from these acquisitions would offset the “moderately lower growth” the company expects to see in the current financial year.
Diploma also said that its life sciences division had enjoyed a particularly strong year, driven by gains in Canada and Australia.
What Diploma said
Commenting on the results, Johnny Thomson, Diploma’s Chief Executive Officer said:
“Diploma has delivered another strong set of results with double-digit revenue and earnings growth in the year. We were also delighted to welcome four new businesses into the group, all of which are strategically important and have exciting prospects.
Read more: UK tech firm IGE’s shares plunge after second revenue warning
“The political and economic outlook remains uncertain, but I am confident our resilient business model will support a consistently strong performance again in the year ahead.
We have also reviewed and refreshed our strategy since I joined. Our plans are about continuity, building on the strong foundations of our value-add distribution model, focusing on the development of the organisation’s capability and on significant growth opportunities in our core markets.”
Main image credit: Getty