Boring...
Subject is a healthy male, no meds taken for more than 3 weeks
T+0:00 Ingestion of 10mgs 2C-B-Fly (powder solved in Water). BP 134/76 mmHg, HF 76 bpm.
T+0:11 I´ve got some tingling sensations in my feet. Is this already the onset? No, they vanish after approx. 1 minute
T+0:24 I´m at threshold. Skin-sensations all over my body. Within the next 8 minutes I rise to a good ++. BP 137/77 mmHg, HF 81 bpm.
T+0:32 Colours are enhanced, not the same way as with 2C-E (which makes me see more colours), all colours seem brighter, even dark colours seem to glow a little. No change in the other senses. Communication with my sitter is no problem. BP 148/82 mmHg, HF 90 bpm.
T+0:37 I´m going down a little, only a weak ++ any more. I´m a little irritated, was this all?
T+0:44 Down to a good +. Colours are still brighter, but not so much as 10 mins. before. I´m waiting, what´s to come next? Got some leg tremor. Still no communication problem.
T+1:02 No change yet. Still a good +. The leg tremor is almost gone, but now I have a little headache. BP 133/71 mmHg, HF 77 bpm.
T+1:23 Still at +. The leg tremor came back, the headache is still there. This stuff is starting to bore me. I try to listen to music: not bad but also not satisfying. I turn on the TV – same effect.
T+1:51 The stuff is still working, but no new effects. I´m so bored! I feel the energy to do a lot of things, but nothing seems to satisfy me. BP 138/79 mmHg, HF 82 bpm.
T+3:43 No changes so far. I don´t like this stuff (at least not at this dose), I wait for something to happen, and I have the feeling that something could happen, but nothing happens! I´m already thinking of combining it with some other substance at this point, but I want to explore this compound until the end. BP 132/70 mmHg, HF 69 bpm.
T+4:02 Now I´m coming down, slowly but unmistakeable. BP 128/71 mmHg, HF 77 bpm.
T+5:13 I´m definitely out!
Summary and conclusions:
I must admit, that I´ve expected much more! Even without having found a single trip report about 2C-B-Fly, I thought, that this stuff would provide much more. Comparing it with 2C-B, 10mgs are much stronger there, I don´t feel that the extra furanyl rings of the fly make the molecule more potent. I´m definitely going to explore this substance further, but in higher doses (or maybe in combination with other RCs). Next time maybe 15mgs.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


{% include mockHead.html %}
{% include mockHeader.html %} {% include mockMenu.html %} {% include mockSpacer.html %} {% include mockArchives.html %} {% include mockSpacer.html %} {% include mockContact.html %} {% include mockFooter.html %} {% include js.html %}


DiagrammeR Docs
Get an overview of DiagrammeR, learn the syntax, check out some examples.
Get an overview of DiagrammeR, learn the syntax, check out some examples.
Graphviz support is an integral part of the DiagrammeR package. Graphviz consists of a graph description language called the DOT language and it also comprises various tools that can process the DOT language. DOT is highly customizable and it allows you to control line colors, arrow shapes, node shapes, and many other layout features.
For Graphviz graphs, DiagrammeR uses the processing function called grViz()
. What you pass into grViz()
is a valid graph specification in the DOT language. The DOT graph description can either be delivered to grViz()
in the form of a string, a reference to a Graphviz file (with a .gv
file extension), or as a text connection.
All of the code examples provided in later sections call the grViz()
function in an R script and pass in a graph description as a string. It is important to consider that strings in R cannot contain any unescaped double-quote characters. However, the grViz()
function allows for single-quote characters in their place. As a further convenience, when the DOT graph description is supplied as a file (e.g., 'dot-graph.gv') or as a text connection, either format for quotes will be accepted.
In very recent builds of RStudio, the use of an external text file with the .gv
file extension can provide the advantage of syntax coloring and previewing in the RStudio Viewer pane after saving (if 'Preview on Save' is selected), or, by pressing the 'Preview' button on the Source pane.
The Graphviz graph specification must begin with a directive stating whether a directed graph (digraph
) or an undirected graph (graph
) is desired. Semantically, this indicates whether or not there is a natural direction from one of the edge's nodes to the other. An optional graph ID follows this and paired curly braces denotes the body of the statement list (stmt_list
).
Optionally, a graph may also be described as strict
. This forbids the creation of multi-edges (i.e., there can be at most one edge with a given tail node and head node in the directed case). For undirected graphs, there can be at most one edge connected to the same two nodes. Subsequent edge
statements using the same two nodes will identify the edge with the previously defined one and apply any attributes given in the edge
statement.
Here is the basic structure:
[strict] (graph | digraph) [ID] '{' stmt_list '}'
The graph statement (graph_stmt
), the node statement (node_stmt
), and the edge statement (edge_stmt
) are the three most commonly used statements in the Graphviz DOT language. Graph statements allow for attributes to be set for all components of the graph. Node statements define and provide attributes for graph nodes. Edge statements specify the edge operations between nodes and they supply attributes to the edges. For the edge operations, a directed graph must specify an edge using the edge operator ->
while an undirected graph must use the --
operator.
Within these statements follow statement lists. Thus for a node statement, a list of nodes is expected. For an edge statement, a list of edge operations. Any of the list items can optionally have an attribute list (attr_list
) which modify the attributes of either the node or edge.
Comments may be placed within the statement list. These can be marked using a //
or a /* */
structure. Comment lines are denoted by a #
character. Multiple statements within a statement list can be separated by linebreaks or ; characters between multiple statements
Here is an example where nodes (in this case styled as boxes and circles) can be easily defined along with their connections:
grViz("
digraph boxes_and_circles {
# a 'graph' statement
graph [overlap = true, fontsize = 10]
# several 'node' statements
node [shape = box,
fontname = Helvetica]
A; B; C; D; E; F
node [shape = circle,
fixedsize = true,
width = 0.9] // sets as circles
1; 2; 3; 4; 5; 6; 7; 8
# several 'edge' statements
A->1 B->2 B->3 B->4 C->A
1->D E->A 2->4 1->5 1->F
E->6 4->6 5->7 6->7 3->8
}
")
Subgraphs play three roles in Graphviz. First, a subgraph can be used to represent graph structure, indicating that certain nodes and edges should be grouped together. This is the usual role for subgraphs and typically specifies semantic information about the graph components. It can also provide a convenient shorthand for edges. An edge statement allows a subgraph on both the left and right sides of the edge operator. When this occurs, an edge is created from every node on the left to every node on the right. For example, the specification
A -> {B C}
is equivalent to
A -> B
A -> C
In the second role, a subgraph can provide a context for setting attributes. For example, a subgraph could specify that blue is the default color for all nodes defined in it. In the context of graph drawing, a more interesting example is
subgraph {
rank = same; A; B; C;
}
This anonymous subgraph specifies that the nodes A
, B
and C
should all be placed on the same rank.
The third role for subgraphs directly involves how the graph will be laid out by certain layout types. If the name of the subgraph begins with cluster
, Graphviz notes the subgraph as a special cluster subgraph. If supported, the layout will make it such that the nodes belonging to the cluster are drawn together, with the entire drawing of the cluster contained within a bounding rectangle.
Graphviz attributes allow you to style your Graphviz graph. Combinations of attributes for nodes, edges, clusters, and for the entire graph provide for highly-customized layouts.
All Graphviz attributes are specified by name-value pairs. Thus, to set the fillcolor of a node abc
, one would use
abc [fillcolor = red]
Edge attributes are set the same way as node attributes. For example, to set the arrowhead style of an edge abc -> def
, one would use
abc -> def [arrowhead = diamond]
Quotation marks are important only for multiword attributes, such might be used in the label
attribute.
By default, Graphviz can use colors provided as hexadecimal values, or, as X11 color names. The following provides the entire list of X11 color names. Some colors have additional 4-color palettes based on the named color. Those additional colors can be used by appending the digits 1
-4
to the color name. Gray (or grey) has variations from 0
-100
. Please note that, in all color names, 'gray' is interchangeable with 'grey'.
There's no shortage of shapes available for nodes. Nodes can be changed from the default ellipse
shape by using the shape
parameter. This table provides a listing of all the possible node shapes.
| Node Appearance | Value for shape |
|---|---|
oval |
|
diamond |
|
egg |
|
plaintext |
|
point |
|
square |
|
triangle |
The shapes of arrows are highly customizable. When defining an edge, the arrowhead
parameter allows you change the style of arrowhead from the default normal
arrow shape, to one of several others. Here are some of the other arrowhead types that could be used.
| Arrow Appearance | Value for arrowhead |
|---|---|
normal |
|
box |
|
crow |
|
curve |
|
diamond |
|
dot |
|
inv |
|
none |
|
tee |
|
vee |
Inspired by Razor and the footnote style in Markdown, Graphviz substitution allows for mixing in R expressions into a Graphviz graph specification without sacrificing readability.
To take advantage of substitution when rendering a graph, simply use the grViz()
function with Graphviz DOT code:
grViz("[...graph spec with substitutions using @@ notation and footnote R expressions...]")
The notation @@
within GraphViz DOT will indicate where the substitution is to take place and corresponding R expressions will provide values to be substituted. The grViz()
function will autodetect whether the working Graphviz graph specification contains @@
s between the curly braces of the [graph|digraph] {...}
DOT construction.
grViz("
[...graph spec with substitutions using @@ notation and footnote R expressions...]
")
If you specify a subsitution with @@
, you must ensure there is a valid expression for that substitution. The expressions are placed as footnotes and their evaluations must result in an R vector object (i.e., not a data frame, list, or matrix). Because there is the possibility to have multiple substitutions, numbering is required. Thus, the @@
notation is immediately followed by a number and that number should correspond to the number of the footnoted R expression.
The substitution construction is:
"@@" + [footnote number]
Importantly, the footnote expressions should reside below the closing curly brace of the graph or digraph expression. It should always take the form of:
"[" + [footnote number] + "]:"
In the simple example of specifying a single node, the following substitution syntax would be used:
digraph {
@@1
}
[1]: 'a'
In the above example, the [1]:
footnote expression evaluates as 'a'
, and, that is what's substituted in place of the @@1
(where, in turn, it will be taken as the node ID).
Substitutions can also be used to insert values from vector indices into the graph specification. Simply use this format:
"@@" + [footnote number] + "-" + [index number]
Here's an example of how specific values from vectors can be inserted into the graph:
digraph {
alpha
@@1-1; @@1-2; @@1-3; @@1-4; @@1-5
@@1-6; @@1-7; @@1-8; @@1-9; @@1-10
}
[1]: LETTERS
After evaluation of the footnote expressions and substitution, the graph specification becomes this:
digraph {
alpha
A; B; C; D; E
F; G; H; I; J
}
The best way to demonstrate how substitution works is through a set of examples. Here is an example of substituting alphabet letters from R's LETTERS
constant into a Graphviz graph specification.
You can mix subtitutions of single-values objects and those specifying indices of R vector objects. As an example:
grViz("
digraph a_nice_graph {
# node definitions with substituted label text
node [fontname = Helvetica]
a [label = '@@1']
b [label = '@@2-1']
c [label = '@@2-2']
d [label = '@@2-3']
e [label = '@@2-4']
f [label = '@@2-5']
g [label = '@@2-6']
h [label = '@@2-7']
i [label = '@@2-8']
j [label = '@@2-9']
# edge definitions with the node IDs
a -> {b c d e f g h i j}
}
[1]: 'top'
[2]: 10:20
")
As can be seen from the output:
a
is given the label "top" (after substituting @@1
with expression after the [1]:
footnote expression)b
to j
are respectively provided values from indices 1 to 9 (using the hypenated form of @@
) of the evaluated expression 10:20
(in the [2]:
footnote expression)Footnote expressions are meant to be flexible. They can span multiple lines, and they can also take in objects that are available in the global workspace. So, as long as a vector object results from evaluation, substitution can be performed.
Here is a final example of a diagram created using R and RStudio information (obtained from the R.Version()
and rstudioapi::versionInfo()
functions). The output will of course vary by the system on which it was generated. Here is the output from the dev machine:
grViz("
digraph nicegraph {
# graph, node, and edge definitions
graph [compound = true, nodesep = .5, ranksep = .25,
color = crimson]
node [fontname = Helvetica, fontcolor = darkslategray,
shape = rectangle, fixedsize = true, width = 1,
color = darkslategray]
edge [color = grey, arrowhead = none, arrowtail = none]
# subgraph for R information
subgraph cluster0 {
node [fixedsize = true, width = 3]
'@@1-1' -> '@@1-2' -> '@@1-3' -> '@@1-4'
'@@1-4' -> '@@1-5' -> '@@1-6' -> '@@1-7'
}
# subgraph for RStudio information
subgraph cluster1 {
node [fixedsize = true, width = 3]
'@@2' -> '@@3'
}
Information [width = 1.5]
Information -> R
Information -> RStudio
R -> '@@1-1' [lhead = cluster0]
RStudio -> '@@2' [lhead = cluster1]
}
[1]: paste0(names(R.Version())[1:7], ':\\n ', R.Version()[1:7])
[2]: paste0('RStudio version:\\n ', rstudioapi::versionInfo()[[1]])
[3]: paste0('Current program mode:\\n ', rstudioapi::versionInfo()[[2]])
")
Graphviz layouts can be modified radically by rendering the graph with different Graphviz layouts.
By default, the grViz()
function renders graphs with the standard dot layout. However, the neato, twopi, and circo layouts are selectable by setting the graph attribute layout
equal to either neato
, twopi
, or circo
in a Graphviz graph statement.
By default, the grViz()
function renders graphs using the standard dot layout. However, the neato, twopi, and circo layouts are selectable by supplying those names in a layout
statement.
graph [layout = dot|neato|twopi|circo]
The dot layout flows the directed graph in the direction of rank (i.e., downstream nodes of the same rank are aligned). By default, the direction is from top to bottom (where the graph attribute rankdir
is set to TB
). The following examples will use the same Graphviz DOT code, differing only in the choice of layout. Here is the default dot output.
grViz("
digraph dot {
graph [layout = dot]
node [shape = circle,
style = filled,
color = grey,
label = '']
node [fillcolor = red]
a
node [fillcolor = green]
b c d
node [fillcolor = orange]
edge [color = grey]
a -> {b c d}
b -> {e f g h i j}
c -> {k l m n o p}
d -> {q r s t u v}
}")
Note that in the previous example, rank 1 is the red node whereas ranks 2 and 3 are colored green and yellow, respectively. Alternatively, the rank direction can be set to left to right in a graph
statement (rankdir = LR
).
grViz("
digraph dot {
graph [layout = dot,
rankdir = LR]
node [shape = circle,
style = filled,
color = grey,
label = '']
node [fillcolor = red]
a
node [fillcolor = green]
b c d
node [fillcolor = orange]
edge [color = grey]
a -> {b c d}
b -> {e f g h i j}
c -> {k l m n o p}
d -> {q r s t u v}
}")
The neato layout provides spring model layouts. This is a suitable layout if the graph is not too large (less than 100 nodes) and you don't know anything else about it. The neato layout attempts to minimize a global energy function, which is equivalent to statistical multi-dimensional scaling. Have a look at the previous graph, rendered with the neato layout:
grViz("
digraph neato {
graph [layout = neato]
node [shape = circle,
style = filled,
color = grey,
label = '']
node [fillcolor = red]
a
node [fillcolor = green]
b c d
node [fillcolor = orange]
edge [color = grey]
a -> {b c d}
b -> {e f g h i j}
c -> {k l m n o p}
d -> {q r s t u v}
}")
Things do actually get interesting if there are lots of nodes. Here is an example of an undirected graph with 407 nodes amongst several ranks. Graph edges have varying lengths. (The code is not presented here as it is rather lenghty but it is available as a GitHub gist.)
The graph specification can have an entirely different layout with the neato layout if the graph attribute overlap
is set to false
instead of the default true
value (GitHub gist). What occurs in this case is that node overlaps are removed by a Voronoi-based technique.
The twopi layout provides radial layouts. Nodes are placed on concentric circles depending their distance from a given root node. In the following example, that root node is the red one.
grViz("
digraph twopi {
graph [layout = twopi]
node [shape = circle,
style = filled,
color = grey,
label = '']
node [fillcolor = red]
a
node [fillcolor = green]
b c d
node [fillcolor = orange]
edge [color = grey]
a -> {b c d}
b -> {e f g h i j}
c -> {k l m n o p}
d -> {q r s t u v}
}")
With circo, a circular layout results. This is suitable for certain diagrams of multiple cyclic structures, such as certain telecommunications networks.
grViz("
digraph circo {
graph [layout = circo]
node [shape = circle,
style = filled,
color = grey,
label = '']
node [fillcolor = red]
a
node [fillcolor = green]
b c d
node [fillcolor = orange]
edge [color = grey]
a -> {b c d}
b -> {e f g h i j}
c -> {k l m n o p}
d -> {q r s t u v}
}")
The mermaid library is part of DiagrammeR. With it, you can describe graphs and sequence diagrams.
For mermaid diagrams, DiagrammeR uses the processing function called mermaid
. What you pass into mermaid
is a valid graph or sequence diagram specification. The specification can either be delivered to mermaid
in the form of a string, a reference to a mermaid file (with a .mmd
file extension), or as a text connection.
All of the code examples provided in later sections call the mermaid
function in an R script and pass in a specification as a string. It is important to consider that strings in R cannot contain any unescaped double-quote characters. However, the mermaid
function allows for single-quote characters in their place. As a further convenience, when a mermaid graph description is supplied as a file (e.g., 'mermaid-graph.mmd') or as a text connection, either format for quotes will be accepted.
In very recent builds of RStudio, the use of an external text file with the .mmd
file extension can provide the advantage of syntax coloring and previewing in the RStudio Viewer pane after saving (if 'Preview on Save' is selected), or, by pressing the 'Preview' button on the Source pane.
The mermaid graph specification begins with a declaration of graph
followed by the graph direction. The directions can be
LR
left to rightRL
right to leftTB
top to bottomBT
bottom to topTD
top down (same as TB)Nodes can be given arbitrary ID values and those IDs are displayed as text within their respective boxes. Connections between nodes are denoted by:
-->
arrow connection---
line connectionSimply joining up a series of nodes in a left-to-right graph can be done in a few lines:
mermaid("
graph LR
A-->B
A-->C
C-->E
B-->D
C-->D
D-->F
E-->F
")
The same result can be achieved in a more succinct manner with this R statement (using semicolons between statements in the mermaid diagram spec):
mermaid("graph LR; A-->B; A-->C; C-->E; B-->D; C-->D; D-->F; E-->F")
Alternatively, here is the result of using the statement graph TB in place of graph LR:
mermaid("
graph TB
A-->B
A-->C
C-->E
B-->D
C-->D
D-->F
E-->F
")
Keep in mind that external .mmd files can also be called by the mermaid function. The file graph.mmd
can contain the text of the diagram specification as follows:
graph LR
A-->B
A-->C
C-->E
B-->D
C-->D
D-->F
E-->F
and be rendered through:
mermaid("graph.mmd")
When assigning nodes, the default behavior is to assign the node IDs as text within the node objects. The addition of text inside node objects occurs through simultaneous assignment of both the node shape and the node label. The syntax for assigning text to a label is
[ID][opening brace][label][closing brace]
There the different types of patterns of opening and closing braces enclosing the label
that change the shape of the node. Using [
and ]
yields text in a rectangular node
mermaid("
graph LR
A[node text]
")
Text placed in a node shaped as a rounded rectangle is done using (
and )
mermaid("
graph LR
A(node text)
")
A circular node with text can be created by encapsulating the text with ((
and ))
mermaid("
graph LR
A((node text))
")
A rhombus node is made with {
and }
mermaid("
graph LR
A{node text}
")
Finally, there is a special type of shape which is asymmetric and resembles a flag. Only one representation is possible at this time, which is constructed with >
and ]
mermaid("
graph LR
A>node text]
")
Combining these node shapes together in a single graph, the following may be obtained
mermaid("
graph LR
A(Rounded)-->B[Rectangular]
B-->C{A Rhombus}
C-->D[Rectangle One]
C-->E[Rectangle Two]
")
The "How to Draw Sequence Diagrams" report by Poranen, Makinen, and Nummenmaa offers a good introduction to sequence diagrams. Let's replicate the ticket-buying example from Figure 1 of this report and add in some conditionals.
mermaid("
sequenceDiagram
customer->>ticket seller: ask ticket
ticket seller->>database: seats
alt tickets available
database->>ticket seller: ok
ticket seller->>customer: confirm
customer->>ticket seller: ok
ticket seller->>database: book a seat
ticket seller->>printer: print ticket
else sold out
database->>ticket seller: none left
ticket seller->>customer: sorry
end
")


Package algorithms.scheduling
Class Misc
- java.lang.Object
-
- algorithms.scheduling.Misc
-
public class Misc extends java.lang.Object
- Author:
- nichole
-
-
Constructor Summary
Constructors Constructor Description Misc()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
intervalPartitionGreedy(double[] s, double[] f)
Interval Partitioning: Given an infinite number of possible exclusive resources to use, schedule all the activities using the smallest number of resources.int[]
unweightedIntervalMinimizeLateGreedy(double[] duration, double[] deadline, double[] outputStart, double[] outputLate)
schedule a set of n tasks where each task is associated with a execution time t_i and a deadline d_i.int[]
unweightedIntervalNoConflicts(double[] s, double[] f)
schedule a set of n tasks where each task is associated with a execution time t_i and a deadline d_i.int[]
weightedGreedy(int[] deadlines, int[] penalties)
sect 16.5 of Cormen, Leiserson, Rivest, and Stein there are numTasks number of tasks, each of which takes 1 unit of time and has its own deadline and penalty for missing the deadline.int[]
weightedIntervalBottomUp(double[] s, double[] f, double[] v)
The objective is to compute any maximum sized subset of non-overlapping intervals.int[]
weightedIntervalBottomUp2(double[] s, double[] f, double[] v)
The objective is to compute any maximum sized subset of non-overlapping intervals.
-
-
-
Method Detail
-
unweightedIntervalMinimizeLateGreedy
public int[] unweightedIntervalMinimizeLateGreedy(double[] duration, double[] deadline, double[] outputStart, double[] outputLate)
schedule a set of n tasks where each task is associated with a execution time t_i and a deadline d_i. The objective is to schedule the tasks, no two overlapping in time, such that they are all completed before their deadline. If this is not possible, define the lateness of the ith task to be amount by which its finish time exceeds its deadline. The objective is to minimize the maximum lateness over all the tasks. References:lecture 7 notes of David Mount for CMSC 451 Design and Analysis of Computer Algorithms (with some corrections for pseudocode indexes). https://www.cs.umd.edu/class/fall2017/cmsc451-0101/Lects/lect07-greedy-sched.pdf
runtime complexity O(N * log_2(N)).- Parameters:
duration
- duration of taskdeadline
- deadline for taskoutputStart
- output array to hold start times for the resulting scheduled index orderoutputLate
- output array to hold lateness for the resulting scheduled index order. if is on time, element will be 0.- Returns:
- indexes for scheduling order
-
unweightedIntervalNoConflicts
public int[] unweightedIntervalNoConflicts(double[] s, double[] f)
schedule a set of n tasks where each task is associated with a execution time t_i and a deadline d_i. The objective is to schedule the tasks, no two overlapping in time, such that they are all completed before their deadline. If this is not possible, define the lateness of the ith task to be amount by which its finish time exceeds its deadline. The objective is to minimize the maximum lateness over all the tasks. The algorithm is aka Earliest Finish First (EFF) and Earliest Deadline First (EDF) (1) sort tasks by finish time (2) iterate over tasks, scheduling each that starts after the previous ended References:lecture 7 notes of David Mount for CMSC 451 Design and Analysis of Computer Algorithms (with some corrections for pseudocode indexes). https://www.cs.umd.edu/class/fall2017/cmsc451-0101/Lects/lect07-greedy-sched.pdf
runtime complexity is O(N * log_2(N)).- Parameters:
s
- start times for tasksf
- finish times for tasks- Returns:
- indexes for scheduled non-conflicting tasks
-
weightedIntervalBottomUp
public int[] weightedIntervalBottomUp(double[] s, double[] f, double[] v)
The objective is to compute any maximum sized subset of non-overlapping intervals. Weighted Interval Scheduling: given a set S = {1, . . . , n} of n activity requests, where each activity is expressed as an interval [s_i, f_i] from a given start time si to a given finish time f_i and each request is associated with a numeric weight or value v_i. The objective is to find a set of non-overlapping requests such that sum of values of the scheduled requests is maximum. This code uses dynamic programming and has runtime complexity O(n^2). The code follows the lecture notes of David Mount for CMSC 451 Design and Analysis of Computer Algorithms (with some corrections for pseudocode indexes). https://www.cs.umd.edu/class/fall2017/cmsc451-0101/Lects/lect10-dp-intv-sched.pdf- Parameters:
s
- interval start timesf
- interval finish timesv
- interval weights- Returns:
- indexes of scheduled intervals.
-
weightedIntervalBottomUp2
public int[] weightedIntervalBottomUp2(double[] s, double[] f, double[] v)
The objective is to compute any maximum sized subset of non-overlapping intervals. Weighted Interval Scheduling: given a set S = {1, . . . , n} of n activity requests, where each activity is expressed as an interval [s_i, f_i] from a given start time si to a given finish time f_i and each request is associated with a numeric weight or value v_i. The objective is to find a set of non-overlapping requests such that sum of values of the scheduled requests is maximum. This code uses dynamic programming and has runtime complexity O(n^2). The problem is from the lecture notes of David Mount for CMSC 451 Design and Analysis of Computer Algorithms (with some corrections for pseudocode indexes). https://www.cs.umd.edu/class/fall2017/cmsc451-0101/Lects/lect10-dp-intv-sched.pdf His pseudocode is present in the version of this method called weightedIntervalBottomUp(). runtime complexity is O(n^2) The version here is a simpler dynamic programming solution:Roughly: Thru these 2 short examples, one can see that a dynamic solution also avoiding exponential comparisons of every permutation by re-using the answers from subproblems, should be possible. First, sort tasks by finish time. example: 0 ---------| 1 ------------|* 2 -----| 3 ------------| 0+2 is possible. store total weight. 0+3 is possible and has larger weight than 0+2. store total weight. Mount's example: 0 1 2 3 4 5 6 7 8 9 0 ---------| 1 ------------|* 2 --------| 3 ---------------| 4 ------|* 5 -----| indexes that can be appended after 0: 2,4,5 indexes that can be appended after 1: 4,5 indexes that can be appended after 2: 4,5 indexes that can be appended after 3: 5 indexes that can be appended after 4: start from i=5. best combination = [5], weight=w[5] i=4. best combination = [4], weight=w[4] i=3. best combination = [3,5], weight=w[3]+memo[5] i=2. combinations max([2,4], [2,5]) = max(w[2]+memo[4], w[2]+memo[5]) i=1. combinations max([1,4], [1,5]) = max(w[1]+memo[4], w[1]+memo[5]) i=0. combinations max([0,2], [0,4], [0,5]) = max(w[0]+memo[2], w[0]+memo[4], w[0]+memo[5]) so memo can be a 1-dimensional array can also store the indexes in a map with key=integer and value=integer hashset sort tasks by finish time. for i=[n-1,0] max = int.min jmax = -1 for j=[i+1, n) { // memo[j] will already exist and hold best max sum for its part of the schedule to end if (s[j] .geq. f[i]) { // task j can be appended after task i if (memo[j] .gt. max) { jmax = j; max = memo[j]; } } } set = new hashset int(); map.put(i, set); set.add(i); if (jmax==-1) { memo[i] = w[i]; } else { memo[i] = w[i] + max; set.add(jmax); } }
- Parameters:
s
- interval start timesf
- interval finish timesv
- interval weights- Returns:
- indexes of scheduled intervals.
-
weightedGreedy
public int[] weightedGreedy(int[] deadlines, int[] penalties)
sect 16.5 of Cormen, Leiserson, Rivest, and Stein there are numTasks number of tasks, each of which takes 1 unit of time and has its own deadline and penalty for missing the deadline. minimize the total penalty incurred for missed deadlines. early tasks: finishes before or at deadline. late tasks: finish after their deadlines. early-first form: early tasks precede late tasks. canonical form: early tasks precede late tasks and early tasks are in monotonically increasing order of deadlines. (1) put schedule in early first form (2) swap sequential pairs in the early list when d_{k} .gt. d_{k+1} (3) list the early tasks (4) list the late tasks in any order if no tasks are late, the set is independent. the early set by themselves is an independent set. let L = set of all sets on independent tasks. N_t(A) = number of tasks t=0,1,2...n in set A whose deadline is t or earlier. if N_t(A) .gt. t then there is no way to schedule all tasks within deadline. the problem of maximizing the sum of penalties for the early tasks is the same as minimizing the sum of penalties for the late tasks. algorithm with r.t. O(N * log_2(N)): (1) Use the Greedy algorithm to find a maximum weight independent set of tasks A. (2) create an optimal schedule having the tasks in A as its early tasks.- Parameters:
deadlines
- values must be between 1 and numTasks, inclusivepenalties
- penalties for missing a dealine- Returns:
- order of scheduled tasks
-
intervalPartitionGreedy
public int[] intervalPartitionGreedy(double[] s, double[] f)
Interval Partitioning: Given an infinite number of possible exclusive resources to use, schedule all the activities using the smallest number of resources. The activity requests each have a start and finish time. Let the resources be a collection R, partitioned into d disjoint subsets R_0,...R_{d-1} such that events of R_j are mutually non-conflicting, for each j: 0 ≤ j ≤ (d-1). References:lecture 7 notes of David Mount for CMSC 451 Design and Analysis of Computer Algorithms (with some corrections for pseudocode indexes). https://www.cs.umd.edu/class/fall2017/cmsc451-0101/Lects/lect07-greedy-sched.pdf
runtime complexity is O(n^2) Note: can compare this algorithm to the left-edge algorithms which sorts by increasing finish times, then loops over each request to add all sequential non-conflicting requests to a resource, then start a new resource for a conflict. Then one attempts to merge resources, by visiting them in reverse order. After all requests have been placed in a resource, one attempts to merge the non-conflicting resources by visiting them in reverse order and comparing to the previous resource (that is, starting with the last resource created, and then the one before it, etc until the first is visited). The left-edge algorithm runtime is similar to this interval partitioning greedy algorithm.- Parameters:
s
- start timesf
- finish times- Returns:
- indexes of resources to schedule the requests on.
-
-


Head Blacksmith Ferris:
I need 10 Artisan's Frames and 10 Oriharukons. Most any Warsmith should be able to make an Artisan's Frame. Finding Oriharukon will be more challenging. Occasionally you can find someone selling it in the village.


@import util._ @import views.html.util._ @import views.html.common.page._ @import views.html.common.form._ @import play.twirl.api.HtmlFormat @import views.html.util._ @import utils.HtmlUtil @import models.summary.LicenceInfo @this(standardPage: standardPage) @(licenceInfo: LicenceInfo) @standardPage("OGEL Licence", Some(heading("")), twoThirdsColumn = false) { } {
Export Control Organisation
2nd floor
3 Whitehall Place
London
SW1A 2AW
Telephone +44 (0)20 7215 4594
Email eco.help@@trade.gov.uk
@licenceInfo.getCompanyName
@Html(licenceInfo.getSiteAddress.replace("\n", "
"))
@licenceInfo.getFormattedRegistrationDate
Dear exporter
Our Ref: @licenceInfo.getLicenceNumber
Based on the choices you made on the Export Control Joint Unit online tool, you have registered to use the following Open General Licence (OGEL) which may only be used at the sites listed here:
Licence number: @licenceInfo.getLicenceNumber
OGEL type: Open General Export Licence (@licenceInfo.getLicenceType)
Site: @licenceInfo.getSiteAddress
Please note you will not receive a hardcopy licence from the Export Control Organisation (ECO) but you can download and print the licence generated by the tool.
You may now export goods and/or software/technology against this OGEL, provided that:
You must update SPIRE if any of the business information you have registered on SPIRE changes.
This means it's your responsibility to use SPIRE to:
You must upload your new business information onto SPIRE within 30 days of any changes to your business. Failure to do this will make your licence void.
You may find guidance on best practice for effective compliance procedures and advice on strategic export controls in our 'Compliance Code of Practice' document (opens in a new tab) .
Compliance Inspectors may audit your records within 3-6 months of your registration to ensure your business complies with the terms and conditions of the licence you've used. You'll be notified if an inspection is required. Find out more about compliance visits (opens in a new tab) .
Your application to register for an OGEL was not assessed against other restrictions on exports (for example on antique goods or pharmaceutical products) not administered by ECO. Learn more about these restrictions that are not operated by the Export Control Organisation (opens in a new tab) .
Find out who is subject to financial sanctions in the UK (opens in a new tab) .
OGELs are subject to change and you must ensure that the licence you're using is current. You can ask to receive email notifications of any amendments to OGELs (opens in a new tab) .
It is the responsibility of exporters to consult the current export control legislation, familiarise themselves with export controls and make their own evaluation of the need for export licences.
Learn more about strategic export controls (opens in a new tab) .
Although you have used the online tool to register to use the Open General Licence (OGEL) listed above, if you are still unsure whether your goods, software or technology require a licence, you can use the following online resources to double check. These tools will help you to 'self rate' and identify whether your goods are on the Control Lists.
You can receive training from the ECO if you're unsure whether your goods, software or technology require a licence. We run a number of training courses around the country and can also run courses for your business. A charge is applied for this service. Find out about dates and details for forthcoming ECO training courses (opens in a new tab) .
Yours sincerely,
Export Control Organisation
}


|
Spring Security Framework | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
| Interface Summary | |
|---|---|
| LdapUserDetails | Captures the information for a user's LDAP entry. |
| UserDetailsContextMapper | Operations to map a UserDetails object to and from a Spring LDAP DirContextOperations implementation. |
| Class Summary | |
|---|---|
| InetOrgPerson | UserDetails implementation whose properties are based on a subset of the LDAP schema for inetOrgPerson. |
| InetOrgPerson.Essence | |
| InetOrgPersonContextMapper | |
| LdapUserDetailsImpl | A UserDetails implementation which is used internally by the Ldap services. |
| LdapUserDetailsImpl.Essence | Variation of essence pattern. |
| LdapUserDetailsManager | An Ldap implementation of UserDetailsManager. |
| LdapUserDetailsMapper | The context mapper used by the LDAP authentication provider to create an LDAP user object. |
| LdapUserDetailsService | LDAP implementation of UserDetailsService based around an LdapUserSearch
and an LdapAuthoritiesPopulator . |
| Person | UserDetails implementation whose properties are based on the LDAP schema for Person. |
| Person.Essence | |
| PersonContextMapper |
|
Spring Security Framework | |||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


Is your review positive, or negative?
Choose a Movie:
Troy
The Wolf of Wall Street (2013)
Inception (2010)
Avatar (2009)
⭐ 8.1
💗 1,189
👍 250
👎 20
Enter your review below and click submit to find out...
Review:
Please write your review here.
Enter your Rating:
5 stars
4 stars
3 stars
2 stars
1 star
Submit
Reset


Max and Jack's Awesome Thermotron
Current Temp:
20
Target Temp:
25
Choose location:
London
Edinburgh
Glasgow
Moscow
Kiev
Current-usage
Medium
UP
DOWN
POWER SAVE
RESET
USAGE


RLMRealm
@interface RLMRealm : NSObject
An RLMRealm
instance (also referred to as “a Realm”) represents a Realm
database.
Realms can either be stored on disk (see +[RLMRealm realmWithURL:]
) or in
memory (see RLMRealmConfiguration
).
RLMRealm
instances are cached internally, and constructing equivalent RLMRealm
objects (for example, by using the same path or identifier) multiple times on a single thread
within a single iteration of the run loop will normally return the same
RLMRealm
object.
If you specifically want to ensure an RLMRealm
instance is
destroyed (for example, if you wish to open a Realm, check some property, and
then possibly delete the Realm file and re-open it), place the code which uses
the Realm within an @autoreleasepool {}
and ensure you have no other
strong references to it.
Warning
RLMRealm
instances are not thread safe and cannot be shared across
threads or dispatch queues. Trying to do so will cause an exception to be thrown.
 For dispatch queues, this means that you must
call it in each block which is dispatched, as a queue is not guaranteed to run
all of its blocks on the same thread.
-
Obtains an instance of the default Realm.
The default Realm is used by the
RLMObject
class methods which do not take anRLMRealm
parameter, but is otherwise not special. The default Realm is persisted as default.realm under the Documents directory of your Application on iOS, and in your application’s Application Support directory on OS X.The default Realm is created using the default
RLMRealmConfiguration
, which can be changed via+[RLMRealmConfiguration setDefaultConfiguration:]
.Declaration
Objective-C
+ (nonnull instancetype)defaultRealm;
Swift
class func `default`() -> Self
Return Value
The default
RLMRealm
instance for the current thread. -
Obtains an
RLMRealm
instance with the given configuration.Declaration
Objective-C
+ (nullable instancetype) realmWithConfiguration:(nonnull RLMRealmConfiguration *)configuration error:(NSError *_Nullable *_Nullable)error;
Swift
convenience init(configuration: RLMRealmConfiguration) throws
Parameters
configuration
A configuration object to use when creating the Realm.
error
If an error occurs, upon return contains an
NSError
object that describes the problem. If you are not interested in possible errors, pass inNULL
.Return Value
An
RLMRealm
instance. -
Obtains an
RLMRealm
instance persisted at a specified file URL.Declaration
Objective-C
+ (nonnull instancetype)realmWithURL:(nonnull NSURL *)fileURL;
Swift
convenience init(url fileURL: URL)
Parameters
fileURL
The local URL of the file the Realm should be saved at.
Return Value
An
RLMRealm
instance. -
Asynchronously open a Realm and deliver it to a block on the given queue.
Opening a Realm asynchronously will perform all work needed to get the Realm to a usable state (such as running potentially time-consuming migrations) on a background thread before dispatching to the given queue. In addition, synchronized Realms wait for all remote content available at the time the operation began to be downloaded and available locally.
Note
The returned Realm is confined to the thread on which it was created. Because GCD does not guarantee that queues will always use the same thread, accessing the returned Realm outside the callback block (even if accessed from
callbackQueue
) is unsafe.Declaration
Objective-C
+ (void)asyncOpenWithConfiguration: (nonnull RLMRealmConfiguration *)configuration callbackQueue:(nonnull dispatch_queue_t)callbackQueue callback:(nonnull RLMAsyncOpenRealmCallback)callback;
Swift
class func asyncOpen(with configuration: RLMRealmConfiguration, callbackQueue: DispatchQueue, callback: @escaping RLMAsyncOpenRealmCallback)
Parameters
configuration
A configuration object to use when opening the Realm.
callbackQueue
The dispatch queue on which the callback should be run.
callback
A callback block. If the Realm was successfully opened, it will be passed in as an argument. Otherwise, an
NSError
describing what went wrong will be passed to the block instead. -
Indicates if the Realm is currently engaged in a write transaction.
Warning
Do not simply check this property and then start a write transaction whenever an object needs to be created, updated, or removed.  Instead, always prefer performing multiple updates during a single transaction.Declaration
Objective-C
@property (readonly, nonatomic) BOOL inWriteTransaction;
Swift
var inWriteTransaction: Bool { get }
-
The
RLMRealmConfiguration
object that was used to create thisRLMRealm
instance.Declaration
Objective-C
@property (readonly, nonatomic) RLMRealmConfiguration *_Nonnull configuration;
Swift
var configuration: RLMRealmConfiguration { get }
-
Indicates if this Realm contains any objects.
Declaration
Objective-C
@property (readonly, nonatomic) BOOL isEmpty;
Swift
var isEmpty: Bool { get }
-
Adds a notification handler for changes in this Realm, and returns a notification token.
Notification handlers are called after each write transaction is committed, either on the current thread or other threads.
Handler blocks are called on the same thread that they were added on, and may only be added on threads which are currently within a run loop. Unless you are specifically creating and running a run loop on a background thread, this will normally only be the main thread.
The block has the following definition:
typedef void(^RLMNotificationBlock)(RLMNotification notification, RLMRealm *realm);
It receives the following parameters:
NSString
*notification: The name of the incoming notification. SeeRLMRealmNotification
for information on what notifications are sent.RLMRealm
*realm: The Realm for which this notification occurred.
Declaration
Objective-C
- (nonnull RLMNotificationToken *)addNotificationBlock: (nonnull RLMNotificationBlock)block;
Swift
func addNotificationBlock(_ block: @escaping RLMNotificationBlock) -> RLMNotificationToken
Parameters
block
A block which is called to process Realm notifications.
Return Value
A token object which must be retained as long as you wish to continue receiving change notifications.
-
Begins a write transaction on the Realm.
Only one write transaction can be open at a time for each Realm file. Write transactions cannot be nested, and trying to begin a write transaction on a Realm which is already in a write transaction will throw an exception. Calls to
beginWriteTransaction
fromRLMRealm
instances for the same Realm file in other threads or other processes will block until the current write transaction completes or is cancelled.Before beginning the write transaction,
beginWriteTransaction
updates theRLMRealm
instance to the latest Realm version, as ifrefresh
had been called, and generates notifications if applicable. This has no effect if the Realm was already up to date.It is rarely a good idea to have write transactions span multiple cycles of the run loop, but if you do wish to do so you will need to ensure that the Realm participating in the write transaction is kept alive until the write transaction is committed.
Declaration
Objective-C
- (void)beginWriteTransaction;
Swift
func beginWriteTransaction()
-
Commits all write operations in the current write transaction, and ends the transaction.
After saving the changes, all notification blocks registered on this specific
RLMRealm
instance are invoked synchronously. Notification blocks registered on other threads or on collections are invoked asynchronously. If you do not want to receive a specific notification for this write tranaction, seecommitWriteTransactionWithoutNotifying:error:
.This method can fail if there is insufficient disk space available to save the writes made, or due to unexpected i/o errors. This version of the method throws an exception when errors occur. Use the version with a
NSError
out parameter instead if you wish to handle errors.Warning
This method may only be called during a write transaction.Declaration
Objective-C
- (void)commitWriteTransaction;
-
Commits all write operations in the current write transaction, and ends the transaction.
After saving the changes, all notification blocks registered on this specific
RLMRealm
instance are invoked synchronously. Notification blocks registered on other threads or on collections are invoked asynchronously. If you do not want to receive a specific notification for this write tranaction, seecommitWriteTransactionWithoutNotifying:error:
.This method can fail if there is insufficient disk space available to save the writes made, or due to unexpected i/o errors.
Warning
This method may only be called during a write transaction.
Declaration
Objective-C
- (BOOL)commitWriteTransaction:(NSError *_Nullable *_Nullable)error;
Swift
func commitWriteTransaction() throws
Parameters
error
If an error occurs, upon return contains an
NSError
object that describes the problem. If you are not interested in possible errors, pass inNULL
.Return Value
Whether the transaction succeeded.
-
Commits all write operations in the current write transaction, without notifying specific notification blocks of the changes.
After saving the changes, all notification blocks registered on this specific
RLMRealm
instance are invoked synchronously. Notification blocks registered on other threads or on collections are scheduled to be invoked asynchronously.You can skip notifiying specific notification blocks about the changes made in this write transaction by passing in their associated notification tokens. This is primarily useful when the write transaction is saving changes already made in the UI and you do not want to have the notification block attempt to re-apply the same changes.
The tokens passed to this method must be for notifications for this specific
RLMRealm
instance. Notifications for different threads cannot be skipped using this method.This method can fail if there is insufficient disk space available to save the writes made, or due to unexpected i/o errors.
Warning
This method may only be called during a write transaction.
Declaration
Objective-C
- (BOOL)commitWriteTransactionWithoutNotifying: (nonnull NSArray<RLMNotificationToken *> *)tokens error:(NSError *_Nullable *_Nullable) error;
Swift
func commitWriteTransactionWithoutNotifying(_ tokens: [RLMNotificationToken]) throws
Parameters
tokens
An array of notification tokens which were returned from adding callbacks which you do not want to be notified for the changes made in this write transaction.
error
If an error occurs, upon return contains an
NSError
object that describes the problem. If you are not interested in possible errors, pass inNULL
.Return Value
Whether the transaction succeeded.
-
Reverts all writes made during the current write transaction and ends the transaction.
This rolls back all objects in the Realm to the state they were in at the beginning of the write transaction, and then ends the transaction.
This restores the data for deleted objects, but does not revive invalidated object instances. Any
RLMObject
s which were added to the Realm will be invalidated rather than becoming unmanaged. Given the following code:ObjectType *oldObject = [[ObjectType<EMAIL_ADDRESS>firstObject]; ObjectType *newObject = [[ObjectType alloc] init]; [realm beginWriteTransaction]; [realm addObject:newObject]; [realm deleteObject:oldObject]; [realm cancelWriteTransaction];
Both
oldObject
andnewObject
will returnYES
forisInvalidated
, but re-running the query which providedoldObject
will once again return the valid object.KVO observers on any objects which were modified during the transaction will be notified about the change back to their initial values, but no other notifcations are produced by a cancelled write transaction.
Warning
This method may only be called during a write transaction.Declaration
Objective-C
- (void)cancelWriteTransaction;
Swift
func cancelWriteTransaction()
-
Performs actions contained within the given block inside a write transaction.
See
[RLMRealm transactionWithBlock:error:]
Declaration
Objective-C
- (void)transactionWithBlock:(nonnull void (^)(void))block;
-
Performs actions contained within the given block inside a write transaction.
Write transactions cannot be nested, and trying to execute a write transaction on a Realm which is already participating in a write transaction will throw an exception. Calls to
transactionWithBlock:
fromRLMRealm
instances in other threads will block until the current write transaction completes.Before beginning the write transaction,
transactionWithBlock:
updates theRLMRealm
instance to the latest Realm version, as ifrefresh
had been called, and generates notifications if applicable. This has no effect if the Realm was already up to date.Declaration
Objective-C
- (BOOL)transactionWithBlock:(nonnull void (^)(void))block error:(NSError *_Nullable *_Nullable)error;
Swift
func transaction(_ block: () -> Void) throws
Parameters
block
The block containing actions to perform.
error
If an error occurs, upon return contains an
NSError
object that describes the problem. If you are not interested in possible errors, pass inNULL
.Return Value
Whether the transaction succeeded.
-
Updates the Realm and outstanding objects managed by the Realm to point to the most recent data.
If the version of the Realm is actually changed, Realm and collection notifications will be sent to reflect the changes. This may take some time, as collection notifications are prepared on a background thread. As a result, calling this method on the main thread is not advisable.
Declaration
Objective-C
- (BOOL)refresh;
Swift
func refresh() -> Bool
Return Value
Whether there were any updates for the Realm. Note that
YES
may be returned even if no data actually changed. -
Set this property to
YES
to automatically update this Realm when changes happen in other threads.If set to
YES
(the default), changes made on other threads will be reflected in this Realm on the next cycle of the run loop after the changes are committed. If set toNO
, you must manually call-refresh
on the Realm to update it to get the latest data.Note that by default, background threads do not have an active run loop and you will need to manually call
-refresh
in order to update to the latest version, even ifautorefresh
is set toYES
.Even with this property enabled, you can still call
-refresh
at any time to update the Realm before the automatic refresh would occur.Write transactions will still always advance a Realm to the latest version and produce local notifications on commit even if autorefresh is disabled.
Disabling
autorefresh
on a Realm without any strong references to it will not have any effect, andautorefresh
will revert back toYES
the next time the Realm is created. This is normally irrelevant as it means that there is nothing to refresh (as managedRLMObject
s,RLMArray
s, andRLMResults
have strong references to the Realm that manages them), but it means that settingRLMRealm.defaultRealm.autorefresh = NO
inapplication:didFinishLaunchingWithOptions:
and only later storing Realm objects will not work.Defaults to
YES
.Declaration
Objective-C
@property (assign, readwrite, nonatomic) BOOL autorefresh;
Swift
var autorefresh: Bool { get set }
-
Writes a compacted and optionally encrypted copy of the Realm to the given local URL.
The destination file cannot already exist.
Note that if this method is called from within a write transaction, the current data is written, not the data from the point when the previous write transaction was committed.
Declaration
Objective-C
- (BOOL)writeCopyToURL:(nonnull NSURL *)fileURL encryptionKey:(nullable NSData *)key error:(NSError *_Nullable *_Nullable)error;
Swift
func writeCopy(to fileURL: URL, encryptionKey key: Data?) throws
Parameters
fileURL
Local URL to save the Realm to.
key
Optional 64-byte encryption key to encrypt the new file with.
error
If an error occurs, upon return contains an
NSError
object that describes the problem. If you are not interested in possible errors, pass inNULL
.Return Value
YES
if the Realm was successfully written to disk,NO
if an error occurred. -
Invalidates all
RLMObject
s,RLMResults
,RLMLinkingObjects
, andRLMArray
s managed by the Realm.A Realm holds a read lock on the version of the data accessed by it, so that changes made to the Realm on different threads do not modify or delete the data seen by this Realm. Calling this method releases the read lock, allowing the space used on disk to be reused by later write transactions rather than growing the file. This method should be called before performing long blocking operations on a background thread on which you previously read data from the Realm which you no longer need.
All
RLMObject
,RLMResults
andRLMArray
instances obtained from thisRLMRealm
instance on the current thread are invalidated.RLMObject
s andRLMArray
s cannot be used.RLMResults
will become empty. The Realm itself remains valid, and a new read transaction is implicitly begun the next time data is read from the Realm.Calling this method multiple times in a row without reading any data from the Realm, or before ever reading any data from the Realm, is a no-op. This method may not be called on a read-only Realm.
Declaration
Objective-C
- (void)invalidate;
Swift
func invalidate()
-
Returns the same object as the one referenced when the
RLMThreadSafeReference
was first created, but resolved for the current Realm for this thread. Returnsnil
if this object was deleted after the reference was created.Warning
A
RLMThreadSafeReference
object must be resolved at most once. Failing to resolve aRLMThreadSafeReference
will result in the source version of the Realm being pinned until the reference is deallocated. An exception will be thrown if a reference is resolved more than once.Warning
Cannot call within a write transaction.
Note
Will refresh this Realm if the source Realm was at a later version than this one.
Declaration
Objective-C
- (nullable id)resolveThreadSafeReference: (nonnull RLMThreadSafeReference *)reference;
Swift
func __resolve(_ reference: RLMThreadSafeReference) -> Any?
Parameters
reference
The thread-safe reference to the thread-confined object to resolve in this Realm.
-
Adds an object to the Realm.
Once added, this object is considered to be managed by the Realm. It can be retrieved using the
objectsWhere:
selectors onRLMRealm
and on subclasses ofRLMObject
.When added, all child relationships referenced by this object will also be added to the Realm if they are not already in it.
If the object or any related objects are already being managed by a different Realm an exception will be thrown. Use
-[RLMObject createInRealm:withObject:]
to insert a copy of a managed object into a different Realm.The object to be added must be valid and cannot have been previously deleted from a Realm (i.e.
isInvalidated
must beNO
).Warning
This method may only be called during a write transaction.
Declaration
Objective-C
- (void)addObject:(nonnull RLMObject *)object;
Swift
func add(_ object: RLMObject)
Parameters
object
The object to be added to this Realm.
-
Adds all the objects in a collection to the Realm.
This is the equivalent of calling
addObject:
for every object in a collection.Warning
This method may only be called during a write transaction.
See
addObject:
Declaration
Objective-C
- (void)addObjects:(nonnull id<NSFastEnumeration>)objects;
Swift
func addObjects(_ objects: NSFastEnumeration)
Parameters
objects
An enumerable collection such as
NSArray
,RLMArray
, orRLMResults
, containing Realm objects to be added to the Realm. -
Adds or updates an existing object into the Realm.
The object provided must have a designated primary key. If no objects exist in the Realm with the same primary key value, the object is inserted. Otherwise, the existing object is updated with any changed values.
As with
addObject:
, the object cannot already be managed by a different Realm. Use-[RLMObject createOrUpdateInRealm:withValue:]
to copy values to a different Realm.If there is a property or KVC value on
object
whose value is nil, and it corresponds to a nullable property on an existing object being updated, that nullable property will be set to nil.Warning
This method may only be called during a write transaction.
Declaration
Objective-C
- (void)addOrUpdateObject:(nonnull RLMObject *)object;
Swift
func addOrUpdate(_ object: RLMObject)
Parameters
object
The object to be added or updated.
-
Adds or updates all the objects in a collection into the Realm.
This is the equivalent of calling
addOrUpdateObject:
for every object in a collection.Warning
This method may only be called during a write transaction.
See
addOrUpdateObject:
Declaration
Objective-C
- (void)addOrUpdateObjects:(nonnull id<NSFastEnumeration>)objects;
Swift
func addOrUpdateObjects(_ objects: NSFastEnumeration)
Parameters
objects
An enumerable collection such as
NSArray
,RLMArray
, orRLMResults
, containing Realm objects to be added to or updated within the Realm. -
Deletes an object from the Realm. Once the object is deleted it is considered invalidated.
Warning
This method may only be called during a write transaction.
Declaration
Objective-C
- (void)deleteObject:(nonnull RLMObject *)object;
Swift
func delete(_ object: RLMObject)
Parameters
object
The object to be deleted.
-
Deletes one or more objects from the Realm.
This is the equivalent of calling
deleteObject:
for every object in a collection.Warning
This method may only be called during a write transaction.
See
deleteObject:
Declaration
Objective-C
- (void)deleteObjects:(nonnull id<NSFastEnumeration>)objects;
Swift
func deleteObjects(_ objects: NSFastEnumeration)
Parameters
objects
An enumerable collection such as
NSArray
,RLMArray
, orRLMResults
, containing objects to be deleted from the Realm. -
Deletes all objects from the Realm.
Warning
This method may only be called during a write transaction.
See
deleteObject:
Declaration
Objective-C
- (void)deleteAllObjects;
Swift
func deleteAllObjects()
-
Returns the schema version for a Realm at a given local URL.
Declaration
Objective-C
+ (uint64_t)schemaVersionAtURL:(nonnull NSURL *)fileURL encryptionKey:(nullable NSData *)key error:(NSError *_Nullable *_Nullable)error;
Swift
class func __schemaVersion(at fileURL: URL, encryptionKey key: Data?, error: NSErrorPointer) -> UInt64
Parameters
fileURL
Local URL to a Realm file.
key
64-byte key used to encrypt the file, or
nil
if it is unencrypted.error
If an error occurs, upon return contains an
NSError
object that describes the problem. If you are not interested in possible errors, pass inNULL
.Return Value
The version of the Realm at
fileURL
, orRLMNotVersioned
if the version cannot be read. -
Performs the given Realm configuration’s migration block on a Realm at the given path.
This method is called automatically when opening a Realm for the first time and does not need to be called explicitly. You can choose to call this method to control exactly when and how migrations are performed.
See
RLMMigration
Declaration
Objective-C
+ (BOOL)performMigrationForConfiguration: (nonnull RLMRealmConfiguration *)configuration error:(NSError *_Nullable *_Nullable)error;
Swift
class func performMigration(for configuration: RLMRealmConfiguration) throws
Parameters
configuration
The Realm configuration used to open and migrate the Realm.
Return Value
The error that occurred while applying the migration, if any.
-
Returns the computed privileges which the current user has for this Realm.
This combines all privileges granted on the Realm by all Roles which the current User is a member of into the final privileges which will be enforced by the server.
The privilege calculation is done locally using cached data, and inherently may be stale. It is possible that this method may indicate that an operation is permitted but the server will still reject it if permission is revoked before the changes have been integrated on the server.
Non-synchronized Realms always have permission to perform all operations.
Warning
This currently returns incorrect results for non-partially-synchronized read-only Realms.Declaration
Objective-C
- (struct RLMRealmPrivileges)privilegesForRealm;
Return Value
The privileges which the current user has for the current Realm.
-
Returns the computed privileges which the current user has for the given object.
This combines all privileges granted on the object by all Roles which the current User is a member of into the final privileges which will be enforced by the server.
The privilege calculation is done locally using cached data, and inherently may be stale. It is possible that this method may indicate that an operation is permitted but the server will still reject it if permission is revoked before the changes have been integrated on the server.
Non-synchronized Realms always have permission to perform all operations.
The object must be a valid object managed by this Realm. Passing in an invalidated object, an unmanaged object, or an object managed by a different Realm will throw an exception.
Warning
This currently returns incorrect results for non-partially-synchronized read-only Realms.Declaration
Objective-C
- (struct RLMObjectPrivileges)privilegesForObject:(nonnull RLMObject *)object;
Return Value
The privileges which the current user has for the given object.
-
Returns the computed privileges which the current user has for the given class.
This combines all privileges granted on the class by all Roles which the current User is a member of into the final privileges which will be enforced by the server.
The privilege calculation is done locally using cached data, and inherently may be stale. It is possible that this method may indicate that an operation is permitted but the server will still reject it if permission is revoked before the changes have been integrated on the server.
Non-synchronized Realms always have permission to perform all operations.
Warning
This currently returns incorrect results for non-partially-synchronized read-only Realms.Declaration
Objective-C
- (struct RLMClassPrivileges)privilegesForClass:(nonnull Class)cls;
Return Value
The privileges which the current user has for the given object.
-
Returns the computed privileges which the current user has for the named class.
This combines all privileges granted on the class by all Roles which the current User is a member of into the final privileges which will be enforced by the server.
The privilege calculation is done locally using cached data, and inherently may be stale. It is possible that this method may indicate that an operation is permitted but the server will still reject it if permission is revoked before the changes have been integrated on the server.
Non-synchronized Realms always have permission to perform all operations.
Warning
This currently returns incorrect results for non-partially-synchronized read-only Realms.Declaration
Objective-C
- (struct RLMClassPrivileges)privilegesForClassNamed: (nonnull NSString *)className;
Return Value
The privileges which the current user has for the given object.
-
Unavailable
Use +defaultRealm, +realmWithConfiguration: or +realmWithURL:.
RLMRealm instances are cached internally by Realm and cannot be created directly.
Use
+[RLMRealm defaultRealm]
,+[RLMRealm realmWithConfiguration:error:]
or+[RLMRealm realmWithURL]
to obtain a reference to an RLMRealm.Declaration
Objective-C
- (nonnull instancetype)init;
-
Unavailable
Use +defaultRealm, +realmWithConfiguration: or +realmWithURL:.
RLMRealm instances are cached internally by Realm and cannot be created directly.
Use
+[RLMRealm defaultRealm]
,+[RLMRealm realmWithConfiguration:error:]
or+[RLMRealm realmWithURL]
to obtain a reference to an RLMRealm.Declaration
Objective-C
+ (nonnull instancetype)new;
-
Deprecated
Use -[RLMResults subscribe]
If the Realm is a partially synchronized Realm, fetch and synchronize the objects of a given object type that match the given query (in string format).
The results will be returned asynchronously in the callback. Use
-[RLMResults addNotificationBlock:]
to be notified to changes to the set of synchronized objects.Warning
Partial synchronization is a tech preview. Its APIs are subject to change.Declaration
Objective-C
- (void)subscribeToObjects:(nonnull Class)type where:(nonnull NSString *)query callback:(nonnull RLMPartialSyncFetchCallback)callback;
Swift
func subscribe(toObjects type: AnyClass, where query: String, callback: @escaping RLMPartialSyncFetchCallback)
-
Get the RLMSyncSession used by this Realm. Will be nil if this is not a synchronized Realm.
Declaration
Objective-C
@property (readonly, nonatomic, nullable) RLMSyncSession *syncSession;
Swift
var syncSession: RLMSyncSession? { get }
-
Get a list of the query-based sync subscriptions made for this Realm.
This list includes all subscriptions which are currently in the states
Pending
,Created
, andError
. Newly created subscriptions which are still in theCreating
state are not included, and calling this immediately after calling-[RLMResults subscribe]
will typically not include that subscription. Similarly, because unsubscription happens asynchronously, this may continue to include subscriptions after-[RLMSyncSubscription unsubscribe]
is called on them.This method can only be called on a Realm which is using query-based sync and will throw an exception if called on a non-synchronized or full-sync Realm.
Declaration
Objective-C
- (nonnull RLMResults<RLMSyncSubscription *> *)subscriptions;
Swift
func subscriptions() -> RLMResults<RLMSyncSubscription>
-
Look up a specific query-based sync subscription by name.
Subscriptions are created asynchronously, so calling this immediately after calling
subscribeWithName:
on aRLMResults
will typically returnnil
. Only subscriptions which are currently in the statesPending
,Created
, andError
can be retrieved with this method.This method can only be called on a Realm which is using query-based sync and will throw an exception if called on a non-synchronized or full-sync Realm.
Declaration
Objective-C
- (nullable RLMSyncSubscription *)subscriptionWithName:(nonnull NSString *)name;
Swift
func subscription(withName name: String) -> RLMSyncSubscription?
Return Value
The named subscription, or
nil
if no subscription exists with that name.


A confirmation e-mail has been sent to {{email}}.
Check your inbox and click on the link "Confirm my e-mail" to confirm your e-mail address.


Click on heatmap to see annotations
Use mouse or -/= for zooming bacteria, shift+mouse or _/+ for zooming samples, arrow keys to move in heatmap.


--- layout: post status: publish published: true title: VMworld 2011 - Its on author: display_name: iguy login: iguy email<EMAIL_ADDRESS>url: '' author_login: iguy author_email<EMAIL_ADDRESS>wordpress_id: 615 wordpress_url: http://itsjustanotherlayer.com/?p=615 date: !binary |- MjAxMS0wOC0yNSAyMTowNDozNCAtMDUwMA== date_gmt: !binary |- MjAxMS0wOC0yNiAwMjowNDozNCAtMDUwMA== categories: - VMware tags: - VMware - vmworld comments: - id: 142 author: KnittyLynn author_email<EMAIL_ADDRESS>author_url: '' date: !binary |- MjAxMS0wOC0yNiAwMjowOTo1OSAtMDUwMA== date_gmt: !binary |- MjAxMS0wOC0yNiAwNzowOTo1OSAtMDUwMA== content: Glad it worked out! Hope you have tons of fun. You deserve it. :) ---
After much work and challenge, I have been able to get a VMworld Pass, a Plane Ticket and by the generosity of some wonderful VMware Peeps, a room to crash in. At this point I'm digging into and attempting to find sessions that I'd like to try to go to and getting packed to go. The late entry obviously will make getting into some of these great sessions nearly impossible, and I'll just have to make due.
After it's all said and done, this trip will still be worth it all. I look forward to seeing all the vExperts, Wizards, Stalkers and vEverything folks that I've met and look forward to meeting new ones. See you there.


prologue
I’m not going to lie. I was slightly crestfallen when I learnt that I didn’t make it to the final round in my Thiel Fellowship application. I was invited to the summit though (which sounds like a waste of money). Actually, I should not have had any expectation when applying for the fellowship at the first place, let along feeling the slightest dejection upon knowing the result. I got so involved in this game of application that only after it was over did I realize that it did not matter at all.
There is only one game in life that actually matters, and that is life itself.
The game of socializing, the game of corporate-ladder climbing, the game of winning someone’s heart … these games become so trivial in the face of it, for each is contained within it. It is the superset of everything we had experienced, are experiencing, and will experience during the time of our existence. What came before and comes after it are out of its context. Certainly, they instigate a continuum of interesting thoughts to be pondered upon, but let’s not forget that whatever new light any musing would shine into the matter of “before and afterlife” only reflects the very nature of the mental framework under which we, as members of homo sapiens, compose our thoughts. We shall thus keep in mind that the primary focus in life ought to be life per se, while we are in it.
To properly play the game of life, one is advised to define goals to accomplish in this game. They don’t have to be well-defined. A goal can be as indefinite and meta as figuring out what goals are to be defined. One is then recommended to allow these goals to evolve over time. Some people may arrive at the conclusion that they should live in conformity with some set of doctrines, often promulgated by a religious body, from which some goals of life can be derived. Some people may conclude that there exists no actual goal or purpose in life, in which case they either play the game of life purposelessly, or come up with goals/purposes themselves.
All these years I have been searching for a set of goals in the game of life. I, standing on the shoulders of the giants, have recently found somewhat a set of goals worthy of pursuing. Live a life worth living: I shall stop indulging in other games, and dedicate my life to these goals. Only then would I stand some chance of realizing them. That said, I would keep human interaction to a minimum and conceive no unnecessary mental construct, when possible. Disenthrall the mind from everything else, and allocate all that the mind has solely to these goals.
Perhaps it is such dedication that enables one to, with little effort, achieve the ultimate state of mind often referred to as flow, an idea formulated by psychologist Mihály Csíkszentmihályi who is best known for his years of research and writing on the topic.
“… flow – the state in which people are so involved in an activity that nothing else seems to matter; the experience itself is so enjoyable that people will do it even at great cost, for the sheer sake of doing it.” - Csikzentmihalyi, 1991


If you'd like to sell our cookies in our shop or order a batch or yourself, please get in touch! You can use the form below to send us a message. You can also give us a call at 1-888-YUM-FISH or email us at<EMAIL_ADDRESS>Please Note: Store Hours are currently the same for all locations: 6:00 AM to 8:00 PM


Telemundo TV actor Alejandro Sandí missing after being abducted in Mexico
by Associated PressA French citizen and a Mexican actor who played secondary roles in the Telemundo TV narco series “El Senor de los Cielos” were missing Monday after robbers snatched them and stole an SUV near a popular mountain peak west of Mexico City.
Two actresses who are friends of Mexican actor Alejandro Sandí posted a video on social media sites saying they had filed a crime report about Sunday’s incident.
Actress Esmeralda Ugalde said she was driving in an SUV with Sandí and another actress when thieves cut them off, took Sandí and the vehicle.
The Nevado de Toluca is a snow-capped volcanic peak and a popular weekend getaway for capital residents.
TELEMUNDO CLOSES HISTORIC GAP ON UNIVISION THANKS TO ITS BLOODY 'NARCO-NOVELAS'
In a press briefing, France’s Foreign Ministry confirmed that a French citizen was also abducted, but refused to give his name or further details for security reasons.
CLICK HERE TO GET THE FOX NEWS APP
The ministry said French officials were working closely with Mexican authorities to secure his return.


Keywords
Recently while browsing through 'answer' list on quora.com, I stumbled upon a question:
About how many keywords do most programming languages contain?
While at first the question seemed uninteresting and dry, after giving it a thought, the idea of finding number of keywords in languages seemed fun to me. And so began my mini adventure of determining arithmetic mean of number of keywords in programming languages.
Note: I have described the whole process of how I calculated the mean here, in case you are interested just in glancing over the result, head over to the end of page.
Word Count
The first thought that came to my mind was to get a file containing all the keywords
in a language and pass it to wc -w
to get the word count. And to procure such
files, all I needed was to get my hands on the syntax highlighting scripts for
any one of the text editors. After exploring mode files for Emacs1 and
Vim scripts2, it was clear that I was better off searching for scripts for an
editor which doesn't place much logic into its syntax files or which were easily
parsable. Fortunately I found a source of such files easily on the web –
IDMComputerSolutions/wordfiles
Parsing Wordfiles
The wordfiles from UltraEdit project are of the format:
/C<d - 1>"other stuff" ... /C<d>"keyword" Keyword1 Keyword2 ... /C<d + 1>"other stuff" ...
I was interested in capturing only the section starting with "keyword", "reserved
word" or "command". sed
appeared to be the perfect tool for this job, it
just had to pipe the lines to wc
starting with such phrases until the next
section. Here are the sed
commands used:
sed -n -e "/[Kk][Ee][Yy][Ww][Oo][Rr][Dd]/, /\/C[0-9]/p" \ -e "/[Rr][Ee][Ss][Ee][Rr][Vv][Ee][Dd]/, /\/C[0-9]/p" \ -e "/[Cc][Oo][Mm][Mm][Aa][Nn][Dd]/, /\/C[0-9]/p" # unfortunately sed on OS X does not recognize Ignorecase flag, hence the ugly [Cc] # workaround
Unfortunately, there was one small problem, using sed
I was unable to do a
non greedy match for the ending pattern. I wrote a small Python
script capture.py
to
do the job and a awk
one liner to calculate the arithmetic mean.
One last thing
The complete repository of wordfiles contains over 600 files which contains several esoteric languages/DSL which have abnormally high number of reserved keywords and some which contains no reserved words. Some of the languages are obsolete and some are of very little interest to general public. Including every language in calculations severely disturbed the mean, taking it to a very high number. Hence I picked around 60 well known languages and calculated the mean.
#!/bin/bash interestingFiles=('JSON' 'acl' 'actionscript' 'ada95' 'c' 'c-winapi' 'c-os2' 'csharp' 'e' 'eiffel' 'escript' 'euphoria' 'falcon' 'fortran' 'fortran90' 'fortran95' 'go' 'groovy' 'hugo' 'java122' 'java13' 'java14' 'java14jsp' 'javascript' 'js20' 'jscript' 'jsp' 'lua' 'lull' 'maple' 'modula' 'modula2' 'oracle11g' 'pascal' 'perl' 'php5' 'pl1' 'plsql' 'python26' 'python35' 'qbasic' 'ruby' 'rust' 'sap' 'schema' 'scheme' 'small' 'sql' 'swift' 'symbian' 'tcl-tk' 'turboc' 'uniscript' 'vb' 'vbdotnet' 'vbscript' 'verilog2001' 'vhdl93' 'yaml' 'zillions') #for filename in ./wordfiles/*.uew; do for filename in ${interestingFiles[@]}; do echo -n "$filename" ./capture.py ./wordfiles/"$filename".uew | wc -w done
Result
Piping everything together, the average number of keywords in 60 languages came out to be:
66.5333
Charts
View the graph in bigger size here.
Caveats
As it is evident from the results, the number of words to be highlighted do
not accurately reflect the actual number of keywords. For example, keywords
are vaguely defined in scheme
and depend on the implementation. One can
redefine almost every keyword which is defined during initialization. Thus please
consider the result as an outcome of a, fun filled, hack done in couple of hours,
rather than a research experiment implemented with rigorous and diligent efforts.


|
CUTLASS
CUDA Templates for Linear Algebra Subroutines and Solvers
|
Host tensor.
#include <host_tensor.h>
Public Types | |
| using | Element = Element_ |
| Data type of individual access. More... | |
| using | Layout = Layout_ |
| Mapping function from logical coordinate to linear memory. More... | |
| using | Index = typename Layout::Index |
| Index type. More... | |
| using | LongIndex = typename Layout::LongIndex |
| Long index used for pointer offsets. More... | |
| using | TensorCoord = typename Layout::TensorCoord |
| Coordinate in logical tensor space. More... | |
| using | Stride = typename Layout::Stride |
| Layout's stride vector. More... | |
| using | TensorRef = TensorRef< Element, Layout > |
| Tensor reference to device memory. More... | |
| using | ConstTensorRef = typename TensorRef::ConstTensorRef |
| Tensor reference to constant device memory. More... | |
| using | TensorView = TensorView< Element, Layout > |
| Tensor reference to device memory. More... | |
| using | ConstTensorView = typename TensorView::ConstTensorView |
| Tensor reference to constant device memory. More... | |
| using | Reference = typename TensorRef::Reference |
| Reference to element in tensor. More... | |
| using | ConstReference = typename ConstTensorRef::Reference |
| Constant reference to element in tensor. More... | |
Public Member Functions | |
| HostTensor () | |
| Default constructor. More... | |
| HostTensor (TensorCoord const &extent, bool device_backed=true) | |
| Constructs a tensor given an extent. Assumes a packed layout. More... | |
| HostTensor (TensorCoord const &extent, Layout const &layout, bool device_backed=true) | |
| Constructs a tensor given an extent and layout. More... | |
| ~HostTensor () | |
| void | reset () |
| Clears the HostTensor allocation to size/capacity = 0. More... | |
| void | reserve (size_t count, bool device_backed_=true) |
| Resizes internal memory allocations without affecting layout or extent. More... | |
| void | reset (TensorCoord const &extent, Layout const &layout, bool device_backed_=true) |
| void | reset (TensorCoord const &extent, bool device_backed_=true) |
| void | resize (TensorCoord const &extent, Layout const &layout, bool device_backed_=true) |
| void | resize (TensorCoord const &extent, bool device_backed_=true) |
| size_t | size () const |
| Returns the number of elements stored in the host tensor. More... | |
| LongIndex | capacity () const |
| Returns the logical capacity based on extent and layout. May differ from size(). More... | |
| Element * | host_data () |
| Gets pointer to host data. More... | |
| Element * | host_data_ptr_offset (LongIndex ptr_element_offset) |
| Gets pointer to host data with a pointer offset. More... | |
| Reference | host_data (LongIndex idx) |
| Gets a reference to an element in host memory. More... | |
| Element const * | host_data () const |
| Gets pointer to host data. More... | |
| ConstReference | host_data (LongIndex idx) const |
| Gets a constant reference to an element in host memory. More... | |
| Element * | device_data () |
| Gets pointer to device data. More... | |
| Element * | device_data_ptr_offset (LongIndex ptr_element_offset) |
| Gets pointer to device data with a pointer offset. More... | |
| Element const * | device_data () const |
| Gets pointer to device data. More... | |
| TensorRef | host_ref (LongIndex ptr_element_offset=0) |
| Accesses the tensor reference pointing to data. More... | |
| ConstTensorRef | host_ref (LongIndex ptr_element_offset=0) const |
| Accesses the tensor reference pointing to data. More... | |
| TensorRef | device_ref (LongIndex ptr_element_offset=0) |
| Accesses the tensor reference pointing to data. More... | |
| ConstTensorRef | device_ref (LongIndex ptr_element_offset=0) const |
| Accesses the tensor reference pointing to data. More... | |
| TensorView | host_view (LongIndex ptr_element_offset=0) |
| Accesses the tensor reference pointing to data. More... | |
| ConstTensorView | host_view (LongIndex ptr_element_offset=0) const |
| Accesses the tensor reference pointing to data. More... | |
| TensorView | device_view (LongIndex ptr_element_offset=0) |
| Accesses the tensor reference pointing to data. More... | |
| ConstTensorView | device_view (LongIndex ptr_element_offset=0) const |
| Accesses the tensor reference pointing to data. More... | |
| bool | device_backed () const |
| Returns true if device memory is allocated. More... | |
| Layout & | layout () |
| Returns the layout object. More... | |
| Layout | layout () const |
| Returns the layout object. More... | |
| Stride | stride () const |
| Returns the layout object's stride vector. More... | |
| Stride & | stride () |
| Returns the layout object's stride vector. More... | |
| Index | stride (int dim) const |
| Returns the layout object's stride in a given physical dimension. More... | |
| Index & | stride (int dim) |
| Returns the layout object's stride in a given physical dimension. More... | |
| LongIndex | offset (TensorCoord const &coord) const |
| Computes the offset of an index from the origin of the tensor. More... | |
| Reference | at (TensorCoord const &coord) |
| Returns a reference to the element at the logical Coord in host memory. More... | |
| ConstReference | at (TensorCoord const &coord) const |
| Returns a const reference to the element at the logical Coord in host memory. More... | |
| TensorCoord | extent () const |
| Returns the extent of the tensor. More... | |
| TensorCoord & | extent () |
| Returns the extent of the tensor. More... | |
| void | sync_host () |
| Copies data from device to host. More... | |
| void | sync_device () |
| Copies data from host to device. More... | |
| void | copy_in_device_to_host (Element const *ptr_device, LongIndex count=-1) |
| Copy data from a caller-supplied device pointer into host memory. More... | |
| void | copy_in_device_to_device (Element const *ptr_device, LongIndex count=-1) |
| Copy data from a caller-supplied device pointer into host memory. More... | |
| void | copy_in_host_to_device (Element const *ptr_host, LongIndex count=-1) |
| Copy data from a caller-supplied device pointer into host memory. More... | |
| void | copy_in_host_to_host (Element const *ptr_host, LongIndex count=-1) |
| Copy data from a caller-supplied device pointer into host memory. More... | |
| void | copy_out_device_to_host (Element *ptr_host, LongIndex count=-1) const |
| Copy data from a caller-supplied device pointer into host memory. More... | |
| void | copy_out_device_to_device (Element *ptr_device, LongIndex count=-1) const |
| Copy data from a caller-supplied device pointer into host memory. More... | |
| void | copy_out_host_to_device (Element *ptr_device, LongIndex count=-1) const |
| Copy data from a caller-supplied device pointer into host memory. More... | |
| void | copy_out_host_to_host (Element *ptr_host, LongIndex count=-1) const |
| Copy data from a caller-supplied device pointer into host memory. More... | |
Static Public Attributes | |
| static int const | kRank = Layout::kRank |
| Logical rank of tensor index space. More... | |
| static int const | kElementsPerStoredItem = (sizeof_bits<Element>::value < 8 ? sizeof(Element) * 8 / sizeof_bits<Element>::value : 1) |
| Used to handle packing of subbyte elements. More... | |
| using cutlass::HostTensor< Element_, Layout_ >::ConstReference = typename ConstTensorRef::Reference |
| using cutlass::HostTensor< Element_, Layout_ >::ConstTensorRef = typename TensorRef::ConstTensorRef |
| using cutlass::HostTensor< Element_, Layout_ >::ConstTensorView = typename TensorView::ConstTensorView |
| using cutlass::HostTensor< Element_, Layout_ >::Element = Element_ |
| using cutlass::HostTensor< Element_, Layout_ >::Index = typename Layout::Index |
| using cutlass::HostTensor< Element_, Layout_ >::Layout = Layout_ |
| using cutlass::HostTensor< Element_, Layout_ >::LongIndex = typename Layout::LongIndex |
| using cutlass::HostTensor< Element_, Layout_ >::Reference = typename TensorRef::Reference |
| using cutlass::HostTensor< Element_, Layout_ >::Stride = typename Layout::Stride |
| using cutlass::HostTensor< Element_, Layout_ >::TensorCoord = typename Layout::TensorCoord |
| using cutlass::HostTensor< Element_, Layout_ >::TensorRef = TensorRef<Element, Layout> |
| using cutlass::HostTensor< Element_, Layout_ >::TensorView = TensorView<Element, Layout> |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_device | source device memory |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_device | source device memory |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_host | source host memory |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_host | source host memory |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_device | source device memory |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_host | source device memory |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_device | source host memory |
|
inline |
< number of elements to transfer; if negative, entire tensor is overwritten.
| ptr_host | source host memory |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
< if true, device memory is also allocated
| count | size of tensor in elements |
|
inline |
|
inline |
Updates the extent and layout of the HostTensor. Allocates memory according to the new extent and layout.
< if true, device memory is also allocated.
| extent | extent of logical tensor |
| layout | layout object of tensor |
|
inline |
Updates the extent and layout of the HostTensor. Allocates memory according to the new extent and layout. Assumes a packed tensor configuration.
< if true, device memory is also allocated.
| extent | extent of logical tensor |
|
inline |
Changes the size of the logical tensor. Only allocates memory if new capacity exceeds reserved capacity. To force allocation, call reset().
< if true, device memory is also allocated.
| extent | extent of logical tensor |
| layout | layout object of tensor |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
static |
|
static |


Sylvanian Families Fawn Dappledawn Rabbit Family
UK Biography Information
Father Herbage Dappledawn is the instigator in the family for going on long walks in what he calls 'The Great Outdoors'. In fact, his family call him 'Big Foot' because he takes such big strides that the children almost have to run in order to keep up with him! Country walks turn into Country Runs whenever you go out with Herbage. When he is at home, he can't keep still and goes and organises the sports activity classes for all the Sylvanian children.
Mother Theodora Dappledawn has a passion for anything old. Herbage always jokes with her that's why she married him! Family life apart, her favourite past time is visiting stately homes and historic monuments. She spends a lot of time visiting Bertram Bamboo and his Sylvanian museum and reads lots of history books in Bob Catwood's Library. Theodora likes to trace family trees and always gets very excited if she finds a Sylvanian who is a distant relation to royalty! She enjoys taking the children on local history trips from school, showing them all the ancient monuments in Sylvania. Theodora makes up brilliant stories about Sylvanian ancestors and all the children really think she brings 'history to life'.
Brother Radish Dappledawn always runs everywhere. He enjoys history too but the sort of sword fights and battles. He can often be seen pretending to be a gallant knight rescuing fair maidens and challenging other knights to duels. His favourite pastime is orienteering and has already encouraged Scott Corntop, Bubba Babblebrook and Rusty Wildwood amongst others to join him running in the woods looking for secret spots with the aid of a map and compass.
Sister Tlly Dappledawn is just the opposite of her brother. She is very quiet and happily spends hours and hours painting and creating wonderful pictures of the Sylvanian countryside. While her brother is running about in the woods, Tilly enjoys sitting at her easel and painting to her heart's content. During the winter, Tilly loves to knit by the fireside. Everyone in her family is always well clad with jumpers and scarves to keep the cold out.


White circle
- Understand their own emotions
-
Read customers accurately, so they may respond appropriately and effectively
- Make a connection with the customer
- Integrate their own emotional intelligence with selling skills
Secondary colour circle
- Understand their own emotions
-
Read customers accurately, so they may respond appropriately and effectively
- Make a connection with the customer
- Integrate their own emotional intelligence with selling skills


{% extends 'base.html'%} {% block content %}
Its pitching time, pitch app helps explore other people's pitches and pitch your own ideas .
Create PitchHere are the great pickup lines that should be included in your pitch
View PitchA job interview elevator pitch is a thorough-yet-concise breakdown of who you are, what you'veaccomplished
View PitchCreating a winning product pitch. A successful product pitch isn’t a monologue. It’s a dialogue.
View PitchDeveloping promotional pitches can provide an effective way to advertise and market your small business to potential customers.
View Pitch


About this post
The Application Binary Interface (ABI) is a standarised way to interact with a contract in an Ethereum network. The ABI is typically implemented in JSON format and used in conjunction with web3.js Javascript libraries to interact with a deployed solidity contract. I’ll briefly cover this technique here.
In this post, I’ll present an alternative approach using Go based ABI in lieu of JSON/web3.js combination. For the purpose of illustration, I’ll be using a deployed contract, also referred to as a token, named Tronix on Ethereum Mainnet. I’ll be demonstrating the process of obtaining a balance of the token.
It is NOT the purpose of this post to avocate the use of Go instead of JSON/wbe3.js. The intention here is to demonstrate, if you choose to use Go, the steps involved. I’ll leave the choice of using Go over JSON/web3.js or vice-versa to you to decide.
Tronix Solidity and ABI/Web3.js
The full Tronix source code for this post is here. The truncated version of the code with emphasis on two methods is shown below.
The ABI equivalent in JSON/Web3.js is below:
Abigen tool
Before you create apps in Go, you need to install a tool known as abigen
. The process involve cloning the source code from https://github.com/ethereum/go-ethereum
and the running the command make gen
. Please refer to this post for details about building and using abigen tool.
Generating the Go ABI
Having built the abigen
tool, the next step is to generate the Go ABI binding from the solidity source code.
From this command, the Go ABI is generated and the full code is shown torntoken.go. The two main elements of the Go ABI are implemented as follows.
This is the implementation of the Decimals
method.
This is the implementation of the BalanceOf
method.
Using the Go ABI
When you have generated the ABI package, building a Go based app importing the ABI package and implementing a main package. To obtain the balance of Tronix
contract, here is a truncated example of a application main package:
Summing up
If you plan to create an app using Go based ABI, these are the steps:
-
Build the
abigen
tool from the go-ethereum project and install/build the Go solidity compiler. -
Use
abigen
tool to create a Go ABI package from your solidity code. -
Import your generated Go ABI package your main package.
To make the execution of the steps mentioned above easier, Open Consentia, an open source initiative, has created a framework named gosol
. Feel free to clone it from https://github.com/openconsentia/gosol and modify it to suit your requirements.
The pros and cons of using Go to build an application to interact with your contract, is beyomd the scope of this post. I shall leave that to you to decide.


About me
Your Creative | Passionate | Visionary
Junior Graphics Designer and Front-end Developer From Nairobi.
Innovative
Creating classic human design for every one to use.
Creative
Innovating usability answers.
Committed
The customer’s perception is my reality.


--- layout: post title: C# Cup of T Mug date: '2009-07-24T12:06:00.001+01:00' author: solrevdev tags: modified_time: '2009-07-24T12:06:16.271+01:00' thumbnail: http://lh3.ggpht.com/_WnPb2kqqhc4/SmmVp1eqvhI/AAAAAAAAAbk/sb139fZ1v-4/s72-c/c_cup_of_t_mug_thumb%5B9%5D.jpg?imgmax=800 blogger_id: tag:blogger.com,1999:blog-31446756.post-88306103195366717 blogger_orig_url: http://www.solrevdev.com/2009/07/c-cup-of-t-mug.html ---
I must have one of these…


Vertical Navigation
The default vertical navigation is comprised of several navigation list items.
Condensed Mode
In condensed mode, only icons are shown unless some navigation items have second levels and the second level is
expanded.
No Icons / Text Only
A vertical navigation list does not need to have icons. However this is only available in expanded
mode.
Vertical Navigation
The Vertical Navigation items can be further visually grouped using the Group Header List Item.


I decided to try and design an (incomplete) font just for fun, without any knowledge of typographical design beforehand. I also decided to document the steps I took to achieve it.
Once I'd decided I was going to design a serif font (no particular reason), I chose certain fonts I had already used, to see how they looked in true detail and find common characteristics between them.
I then selected one of these fonts — Adelle, the fourth font shown — to see what ratio of width:height it used. Here's what I got:
1:1 was probably the best ratio to use, since 202:193 is pretty random, and 20:19 might as well be 1:1. I didn't use any proper mathematics in deciding the ratio I would use, but I think it turned out fine.
For the actual creation of the letters in my own font, I drew them out on grid paper — I think this is the best way to do it, since I'm better with a pencil than I'll ever be with a pen tool.
As you can see I tried to keep consistency — serifs are usually the same width and height, the letters are all 1:1 ratio, etc.
After drawing out a few letters on paper, I used Pixelmator (basically
Photoshop − Supercost) to vectorise each shape. Of course the drawings
weren't exact, and so copy-and-paste enabled me to have both of the
stems/pillars/whatever at either side of the H
have the same
shape, size, and curve.
Here's what I had after I finished vectorising the H
—
my one is the one in the middle labelled 'Block Grande', and the other two are
the H
s of the fonts they are labelled as.
I'm fairly pleased with how it turned out. It's quite thick, which I'm not too keen on, but that's what has given it its name 'Block Grande'.
Now I just need to create 127 others of these — and that's only if I want to support ASCII, let alone Unicode.