GeneralGraph¶
GeneralGraph for directed graphs (DiGraph) module
Class GeneralGraph for directed graphs (DiGraph). |
|
Load input file. |
|
Write list of nodes and list of edges csv files to visualize the input with Gephi. |
|
Reconstruct source-target paths starting from predecessors matrix. |
|
Populate the dictionary of shortest paths. |
|
Inner iteration for parallel Floyd Warshall APSP algorithm, to update shared dictionary. |
|
Compute efficiency, starting from path length attribute. |
|
Inner iteration for parallel efficiency calculation, to update shared dictionary. |
|
Initialization of Floyd Warshall APSP algorithm. |
|
Floyd Warshall’s APSP inner iteration. |
|
|
Parallel Floyd Warshall’s APSP algorithm. |
Serial Floyd Warshall’s APSP algorithm. |
|
Serial SSSP algorithm based on Dijkstra’s method. |
|
Parallel SSSP algorithm based on Dijkstra’s method. |
|
Divide graph nodes in chunks according to number of processes. |
|
Wrapper for parallel SSSP algorithm based on Dijkstra’s method. |
|
Global efficiency of the node. |
|
Local efficiency of the node. |
|
Average global efficiency of the whole graph. |
|
Betweenness_centrality measure of each node. |
|
Closeness_centrality measure of each node. |
|
Degree centrality measure of each node. |
|
Indegree centrality measure of each node. |
|
Outdegree centrality measure of each node. |
|
Choose the most appropriate way to compute the all-pairs shortest path depending on graph size and density. |
|
Describe the topology of the integer graph, before the occurrence of any perturbation in the system. |
|
Describe the topology of the potentially perturbed graph, after the occurrence of a perturbation in the system. |
|
Remove nodes from the graph in a depth first search way to propagate the perturbation. |
|
Merge two lists of dictionaries according to their keys. |
|
Update the status of the elements in the areas after the propagation of the perturbation. |
|
Delete a node in the graph to simulate a perturbation to an element in a plant and start to propagate the perturbation. |
|
Simulate a perturbation in one or multiple areas. |
|
Update the status of the nodes not concerned by the perturbation. |
|
Write to file the service paths situation after the perturbation. |
|
Write to file graph characterization after the perturbation. |
-
class
GeneralGraph
(incoming_graph_data=None, **attr)[source] Bases:
networkx.classes.digraph.DiGraph
Class GeneralGraph for directed graphs (DiGraph).
Constructs a new graph given an input file. A DiGraph stores nodes and edges with optional data or attributes. DiGraphs hold directed edges. Nodes can be arbitrary python objects with optional key/value attributes. Edges are represented as links between nodes with optional key/value attributes.
Initialize a graph with edges, name, or graph attributes.
- Parameters
incoming_graph_data (input graph (optional, default: None)) – Data to initialize graph. If None (default) an empty graph is created. The data can be an edge list, or any NetworkX graph object. If the corresponding optional Python packages are installed the data can also be a NumPy matrix or 2d ndarray, a SciPy sparse matrix, or a PyGraphviz graph.
attr (keyword arguments, optional (default= no attributes)) – Attributes to add to graph as key=value pairs.
See also
convert
Examples
>>> G = nx.Graph() # or DiGraph, MultiGraph, MultiDiGraph, etc >>> G = nx.Graph(name='my graph') >>> e = [(1, 2), (2, 3), (3, 4)] # list of edges >>> G = nx.Graph(e)
Arbitrary graph attribute pairs (key=value) may be assigned
>>> G = nx.Graph(e, day="Friday") >>> G.graph {'day': 'Friday'}
-
betweenness_centrality
()[source] Betweenness_centrality measure of each node. Nodes’ “betweenness_centrality” attribute is evaluated.
Note
Betweenness centrality is an index of the relative importance of a node and it is defined by the number of shortest paths that run through it. Nodes with the highest betweenness centrality hold the higher level of control on the information flowing between different nodes in the network, because more information will pass through them.
-
calculate_shortest_path
()[source] Choose the most appropriate way to compute the all-pairs shortest path depending on graph size and density.
For a dense graph choose Floyd Warshall algorithm.
For a sparse graph choose SSSP algorithm based on Dijkstra’s method.
For big graphs go parallel (number of processes equals the total number of available CPUs).
For small graphs go serial.
Note
Edge weights of the graph are taken into account in the computation.
-
check_after
()[source] Describe the topology of the potentially perturbed graph, after the occurrence of a perturbation in the system. Compute efficiency measures for the whole graph and its nodes. Check the availability of paths between source and target nodes.
-
check_before
()[source] Describe the topology of the integer graph, before the occurrence of any perturbation in the system. Compute efficiency measures for the whole graph and its nodes. Check the availability of paths between source and target nodes.
-
check_input_with_gephi
()[source] Write list of nodes and list of edges csv files to visualize the input with Gephi.
-
static
chunk_it
(nodi, n)[source] Divide graph nodes in chunks according to number of processes.
- Parameters
nodi (list) – list of nodes in the graph
n (int) – number of available processes
- Returns
list of graph nodes to be assigned to every process
- Return type
list
-
closeness_centrality
()[source] Closeness_centrality measure of each node. Nodes’ “closeness_centrality” attribute is evaluated.
Note
Closeness centrality measures the reciprocal of the average shortest path distance from a node to all other reachable nodes in the graph. Thus, the more central a node is, the closer it is to all other nodes. This measure allows to identify good broadcasters, that is key elements in a graph, depicting how closely the nodes are connected with each other.
-
compute_efficiency_iteration_parallel
(nodi, record)[source] Inner iteration for parallel efficiency calculation, to update shared dictionary.
- Parameters
nodi (list) – nodes for which to compute the shortest path between them and all the other nodes
record (multiprocessing.managers.dict) – nested dictionary with key corresponding to source, while as value a dictionary keyed by target and valued by the source-target efficiency
-
compute_efficiency_kernel
(nodi)[source] Compute efficiency, starting from path length attribute. Efficiency is a measure of how good is the exchange of commodities flowing from one node to the others.
- Parameters
nodi (list) – list of nodes for which to compute the efficiency between them and all the other nodes
- Returns
nested dictionary with key corresponding to source, while as value a dictionary keyed by target and valued by the source-target efficiency
- Return type
-
construct_path
(source, target, pred)[source] Reconstruct source-target paths starting from predecessors matrix.
- Parameters
source – starting node for the path
target – ending node for the path
pred (numpy.ndarray) – matrix of predecessors, computed with Floyd Warshall APSP algorithm
- Returns
the shortest path between source and target (source and target included)
- Return type
list
-
construct_path_iteration_parallel
(pred, nodi, record)[source] Inner iteration for parallel Floyd Warshall APSP algorithm, to update shared dictionary.
- Parameters
pred (numpy.ndarray) – matrix of predecessors, computed with Floyd Warshall APSP algorithm
nodi (list) – list of nodes for which to compute the shortest path between them and all the other nodes
record (multiprocessing.managers.dict) – nested dictionary with key corresponding to source, while as value a dictionary keyed by target and valued by the source-target shortest path
-
construct_path_kernel
(pred, nodi)[source] Populate the dictionary of shortest paths.
- Parameters
pred (numpy.ndarray) – matrix of predecessors, computed with Floyd Warshall APSP algorithm
nodi (list) – list of nodes for which to compute the shortest path between them and all the other nodes
- Returns
nested dictionary with key corresponding to source, while as value a dictionary keyed by target and valued by the source-target shortest path
- Return type
-
degree_centrality
()[source] Degree centrality measure of each node. Nodes’ “degree_centrality” attribute is evaluated.
Note
Degree centrality is a simple centrality measure that counts how many neighbors a node has in an undirected graph. The more neighbors the node has the most important it is, occupying a strategic position that serves as a source or conduit for large volumes of flux transactions with other nodes. A node with high degree centrality is a node with many dependencies.
-
delete_a_node
(node)[source] Delete a node in the graph to simulate a perturbation to an element in a plant and start to propagate the perturbation. Nodes’ “IntermediateStatus”, “FinalStatus”, “Mark_Status” and “Status_Area” attributes are evaluated.
- Parameters
node (str) – the id of the node to remove
-
floyd_warshall_initialization
()[source] Initialization of Floyd Warshall APSP algorithm. The distancy matrix is mutuated by NetworkX graph adjacency matrix, while the predecessors matrix is initialized with node fathers. The conversion between the labels (ids) in the graph and Numpy matrix indices (and viceversa) is also exploited.
Note
In order for the ids relation to be bijective, “Mark” attribute must be unique for each node.
-
floyd_warshall_kernel
(dist, pred, init, stop, barrier=None)[source] Floyd Warshall’s APSP inner iteration. Distance matrix is intended to take edges weight into account.
- Parameters
dist (numpy.ndarray) – matrix of distances
pred (numpy.ndarray) – matrix of predecessors
init (int) – starting column of numpy matrix slice
stop (int) – ending column of numpy matrix slice
barrier (multiprocessing.synchronize.Barrier) – multiprocessing barrier to moderate writing on distance and predecessors matrices
-
floyd_warshall_predecessor_and_distance_parallel
()[source] Parallel Floyd Warshall’s APSP algorithm. The predecessors and distance matrices are evaluated, together with the nested dictionaries for shortest-path, length of the paths and efficiency attributes.
Note
Edges weight is taken into account in the distance matrix. Edge weight attributes must be numerical. Distances are calculated as sums of weighted edges traversed.
-
floyd_warshall_predecessor_and_distance_serial
()[source] Serial Floyd Warshall’s APSP algorithm. The predecessors and distance matrices are evaluated, together with the nested dictionaries for shortest-path, length of the paths and efficiency attributes.
Note
Edges weight is taken into account in the distance matrix. Edge weight attributes must be numerical. Distances are calculated as sums of weighted edges traversed.
-
global_efficiency
()[source] Average global efficiency of the whole graph. Nodes’ “original_avg_global_eff”, or “final_avg_global_eff” attribute is evaluated.
“original_avg_global_eff” is the average global efficiency of the intact graph, before the occurrence of any perturbation, while “final_avg_global_eff” is the efficiency of each node in the potentially perturbed graph, after the propagation of a perturbation.
Note
The average global efficiency of a graph is the average efficiency of all pairs of nodes.
-
graph_characterization_to_file
(filename)[source] Write to file graph characterization after the perturbation.
- Parameters
filename (str) – output file name where to print the graph characterization
-
indegree_centrality
()[source] Indegree centrality measure of each node. Nodes’ “indegree_centrality” attribute is evaluated.
Note
Indegree centrality is measured by the number of edges ending at the node in a directed graph. Nodes with high indegree centrality are called cascade resulting nodes.
-
load
(filename)[source] Load input file. Input file must be in CSV format. Each line corresponds to a node/element description, with the relative hierarchy, together with the list of all the node attributes.
- Parameters
filename (str) – input file in CSV format
-
local_efficiency
()[source] Local efficiency of the node. Nodes’ “original_local_eff”, or “final_local_eff” attribute is evaluated.
“original_local_eff” is the local efficiency of each node in the intact graph, before the occurrence of any perturbation, while “final_local_eff” is the local efficiency of each node in the potentially perturbed graph, after the propagation of a perturbation.
Note
The local efficiency shows the efficiency of the connections between the first-order outgoing neighbors of node v when v is removed. Equivalently, local efficiency measures the “resilience” of the digraph to the perturbation of node removal, i.e. if we remove a node, how efficiently its first-order outgoing neighbors can communicate. It is in the range [0, 1].
-
static
merge_lists
(l1, l2, key)[source] Merge two lists of dictionaries according to their keys.
- Parameters
l1 (list) – first list of dictionaries to be merged
l2 (list) – second list of dictionaries to be merged
key (list) – key on which to merge the two lists of dictionaries
- Returns
the merged list of dictionaries
- Return type
list
-
nodal_efficiency
()[source] Global efficiency of the node. Nodes’ “original_nodal_eff”, or “final_nodal_eff” attribute is evaluated.
“original_nodal_eff” is the efficiency of each node in the intact graph, before the occurrence of any perturbation, while “final_nodal_eff” is the efficiency of each node in the potentially perturbed graph, after the propagation of a perturbation.
Note
The global efficiency of the node is equal to zero for a node without any outgoing path and equal to one if from it we can reach each node of the digraph.
-
outdegree_centrality
()[source] Outdegree centrality measure of each node. Nodes’ “outdegree_centrality” attribute is evaluated.
Note
Outdegree centrality is measured by the number of edges starting from a node in a directed graph. Nodes with high outdegree centrality are called cascade inititing nodes.
-
parallel_wrapper_proc
()[source] Wrapper for parallel SSSP algorithm based on Dijkstra’s method. The nested dictionaries for shortest-path, length of the paths and efficiency attributes are evaluated.
Note
Edges weight is taken into account. Edge weight attributes must be numerical. Distances are calculated as sums of weighted edges traversed.
-
rm_nodes
(node, visited=None)[source] Remove nodes from the graph in a depth first search way to propagate the perturbation.
-
service_paths_to_file
(filename)[source] Write to file the service paths situation after the perturbation.
- Parameters
filename (str) – output file name where to print the service paths situation
-
simulate_multi_area_perturbation
(multi_areas)[source] Simulate a perturbation in one or multiple areas. Nodes’ “IntermediateStatus”, “FinalStatus”, “Mark_Status” and “Status_Area” attributes are evaluated.
- Parameters
multi_areas (list) – area(s) in which the perturbing event occurred
-
single_source_shortest_path_parallel
(out_q, nodi)[source] Parallel SSSP algorithm based on Dijkstra’s method.
- Parameters
out_q (multiprocessing.queues.Queue) – multiprocessing queue
nodi (list) – list of starting nodes from which the SSSP should be computed to every other target node in the graph
Note
Edges weight is taken into account. Edge weight attributes must be numerical. Distances are calculated as sums of weighted edges traversed.
-
single_source_shortest_path_serial
()[source] Serial SSSP algorithm based on Dijkstra’s method. The nested dictionaries for shortest-path, length of the paths and efficiency attributes are evaluated.
Note
Edges weight is taken into account. Edge weight attributes must be numerical. Distances are calculated as sums of weighted edges traversed.
-
update_areas
(multi_areas)[source] Update the status of the elements in the areas after the propagation of the perturbation. Nodes’ “IntermediateStatus”, “FinalStatus”, “Mark_Status” and “Status_Area” attributes are evaluated.
- Parameters
multi_areas (list) – area(s) in which to update the status of the elements
-
update_status
(which_status, field, already_updated)[source] Update the status of the nodes not concerned by the perturbation. The status of nodes interested by the perturbation is already updated during perturbation propagation.


This modified version of sorttable supports (almost) everything the original from kryogenix did, but also improves browser compatibility and adds new features to it. Note the CSS used for these examples is of course free to use
Use "data-st-key" to provide a custom key (timestamp in this case)
But you could "simply" extend sorttable instead, and train it to sort your format
duration
23 d 12 h 36 m
12 d 05 h 00 m
7 d 22 h 44 m
7 d 17 h 56 m
6 d 21 h 40 m
2 d 23 h 48 m
1 d 14 h 00 m
0 d 15 h 40 m
115 d 08 h 56 m
duration
23 d 12 h 36 m
12 d 05 h 00 m
7 d 22 h 44 m
7 d 17 h 56 m
6 d 21 h 40 m
2 d 23 h 48 m
1 d 14 h 00 m
0 d 15 h 40 m
115 d 08 h 56 m
duration
23 d 12 h 36 m
12 d 05 h 00 m
7 d 22 h 44 m
7 d 17 h 56 m
6 d 21 h 40 m
2 d 23 h 48 m
1 d 14 h 00 m
0 d 15 h 40 m
115 d 08 h 56 m
ugh, wait! what if I want a column to have a row counter? CSS counters ;) Unless you've got a real good reason why sorttable should do it
and if I want every other row to have a different background? CSS background with :nth-child selector is perfectly fine for alternating row colors
#
alpha
numeric
#
F
74
C
12
A
23
E
36
D
52
B
34
alpha
numeric
F
74
C
12
A
23
E
36
D
52
B
34
Table with multiple bodies and headers
further demonstration with a "paged" table
number
square root
0
0
7
2.6457513110645905905016157536393
5
2.2360679774997896964091736687313
2
1.4142135623730950488016887242097
1
1
number
square root
4
2
3
1.7320508075688772935274463415059
6
2.4494897427831780981972840747059
8
2.8284271247461900976033774484194
9
3
number
square root
number
square root
FAQ (click on one to view anser)
I'm really in a hurry, how to use sorttable with "non-weird" tables?It's as simple as downloading and adding the script: <script src="sorttable.js"></script>
My table is quite dynamic and content will be added and removed a lot. I've noticed bad performance when the user tries to sort the table. How can I improve that?Just enforce a sort method for each column (numeric,alpha,ddmm,mmdd) by adding a class to their <th> like `sorttable_numeric` Sorttable redetects the sort method each time the user wants to sort a column and the table got changed since last sort.
My table is created by Javascript, how to enable sorting on that one?Call `sorttable.makeSortable(TABLE)`
Arrows, how to change them?Use CSS or replace the `sorttable.ARROWS` javascript array. HTML is allowed
Can I set a column to be unsortable?See the "CSS counters" example for more about it, but basically simply add the class `sorttable_nosort` to every column you don't want to be sortable
What sorting types / algorithms currently exist?these:
`sorttable_numeric` - numbers or currency with decimal point (3.1415926535)
`sorttable_numeric_comma` - numbers or currency with decimal comma (3,1415926535)
`sorttable_alpha` - strings or names using very simple sort (we don't have natural sorting yet)
`sorttable_ddmm` - dates in format dd/mm/yyyy
`sorttable_mmdd` - dates in format mm/dd/yyyy
You can use sorttable to make almost any page's tables sortable, simply bookmark the link 'activate sorttable' and open it on the page you want to make sortable or create a Greasemonkey userscript from it.
...
This
table
got
no
body
This
table
is
empty
float
0
2.6457513110645905905016157536393
2.2360679774997896964091736687313
1.4142135623730950488016887242097
1
These buttons are mostly for testing purposes or comparison to original sorttable


Home
Market:
Store Type:
Second Canister:
Canister Serial:
Key#
City:
State:
UT
AZ
Zip:
Country:
Order Serial #:
Issue date:


Utc 141119_031139.876920 Program H:\msr\2014\work\fsharp\IMHub\IMHub\bin\Debug\IMHub.exe started ...
Execution param [|"-log"; "c:\Log\ImHub\IMHub_141118_191139.830046.log"; "-verbose"; "4"; "-con"|]
Utc 141119_031139.876920, Launch Log Service ...
Utc 141119_031139.876920, Bind Monitoring Service to http://localhost:8000/IMGatewayService ...
Utc 141119_031140.033168, Start Registration Services ...
Utc 141119_031140.408167, Start IO Threads ...
UTC 141119_031140.408167, starting listening thread on port 8001


Clad only in his breeches, Mat was just finishing a snack after breakfast—some ham, three apples, bread, and butter—when the door of his room opened, and Nynaeve, Egwene, and Elayne filed in, all smiling at him brightly. He got up for a shirt, then stubbornly sat down again. They could at least have knocked. In any case, it was good to see their faces. At first, it was.
“Well, you do look better,” Egwene said.
“As if you had had a month of good food and rest,” Elayne said.
Nynaeve pressed a hand to his forehead. He flinched before he recalled that she had done much the same for at least five years, back home. She was just the Wisdom then, he thought. She wasn’t wearing that ring.
She had noticed his flinch. She gave him a tight smile. “You look ready to be up and about, to me. Are you tired of being cooped up, yet? You never could stand two days in a row indoors.”
He eyed the last apple core reluctantly, then dropped it back on the plate. Almost, he started to lick the juice off his fingers, but they were all three looking at him. And still smiling. He realized he was trying to decide which of them was prettiest, and could not. Had they been anybody but who—and what—they were, he would have asked any and all of them to dance a jig or a reel. He had danced with Egwene often enough, back home, and even once with Nynaeve, but that seemed a long time ago.
“ ‘One pretty woman means fun at the dance. Two pretty women mean trouble in the house. Three pretty women mean run for the hills.’ ” He gave Nynaeve an even tighter smile than her own. “My da used to say that. You’re up to something, Nynaeve. You are all smiling like cats staring at a finch caught in a thornbush, and I think I am the finch.”
The smiles flickered and vanished. He noticed their hands and wondered why they all looked as if they had been washing dishes. The Daughter-Heir of Andor surely never washed a dish, and he had as hard a time imagining Nynaeve at it, even knowing she had done her own back in Emond’s Field. They all three wore Great Serpent rings, now. That was new. And not a particularly pleasant surprise. Light, it had to happen sometime. It’s none of my business, and that is all there is to it. None of my business. It just isn’t.
Egwene shook her head, but it seemed as much for the other two women as for him. “I told you we should ask him straight out. He’s stubborn as any mule when he wants to be, and tricksome as a cat. You are, Mat. You know it, so stop frowning.”
He put his grin back quickly.
“Hush, Egwene,” Nynaeve said.  We do care, and you know that, unless you’re being even more wool-headed than usual. Are you well? You look remarkably well compared to how I last saw you. It really does look more like a month than two days.”
“I’m ready to run ten miles and dance a jig at the end of it.” His stomach growled, reminding him how long it was to midday yet, but he ignored it, and hoped they had not noticed. He almost did feel as if he had had a month of rest and food. And had had one meal in the last day. “What favor?” he asked suspiciously. Nynaeve did not ask favors, in his recollection; Nynaeve told people what to do and expected to see it done.
“I want you to carry a letter for me,” Elayne said before Nynaeve could speak. “To my mother, in Caemlyn.” She smiled, making a dimple in her cheek. “I would appreciate it so very much, Mat.” The morning light through the windows seemed to pick out highlights in her hair.
I wonder if she likes to dance. He pushed the thought right out of his head. “That does not sound too very hard, but it’s a long trip. What do I get out of it?” From the look on her face, he did not think that dimple had failed her very often.
She drew herself up, slim and proud. He could almost see a throne behind her. “Are you a loyal subject of Andor? Do you not wish to serve the Lion Throne, and your Daughter-Heir?”
Mat snickered.
“I told you that would not work either,” Egwene said. “Not with him.”
Elayne had a wry twist to her mouth. “I thought it worth a try. It always works on the Guards, in Caemlyn. You said if I smiled—” She cut off short, very obviously not looking at him.
What did you say, Egwene, he thought, furious. That I’m a fool for any girl who smiles at me? He kept his outward calm, though, and managed to maintain his grin.
“I wish asking were enough,” Egwene said, “but you do not do favors, do you, Mat? Have you ever done anything without being coaxed, wheedled, or bullied?”
He only smiled at her. “I will dance with both of you, Egwene, but I won’t run errands.” For an instant he thought she was going to stick out her tongue at him.
“If we can go back to what we planned in the first place,” Nynaeve said in a too-calm voice. The other two nodded, and she turned her attentions on him. For the first time since coming in, she looked like the Wisdom of old, with a stare that could pin you in your tracks and her braid ready to lash like a cat’s tail.
“You are even ruder than I remembered, Matrim Cauthon.  Even so, I would think you’d have a little gratitude in you. You’ve talked about seeing the world, seeing great cities. Well, what better city than Caemlyn? Do what you want, show your gratitude, and help someone all at the same time.” She produced a folded parchment from inside her cloak and set it on the table. It was sealed with a lily, in golden yellow wax. “You cannot ask for more than that.”
He eyed the paper regretfully. He barely remembered passing through Caemlyn, once, with Rand. It was a shame to stop them now, but he thought it best. If you want the fun of the jig, you have to pay the harper sooner or later. And the way Nynaeve was now, the longer he kept from paying, the worse it would be.  Are you a fly on the wall, or a man? A chance to do a favor for the Daughter-Heir of Andor, to see Caemlyn, to meet Queen Morgase herself in all probability, and you cannot? I really do not know what more you could possibly want.  Or has your heart changed so you like seeing these all around you?”
“Please, Mat?” Elayne said, and Egwene was staring at him as if he had grown horns like a Trolloc.
He squirmed on his chair. “It is not that I don’t want to. I cannot! The Amyrlin’s made it so I can’t get off the bloo—the island. Change that, and I will carry your letter in my teeth, Elayne.”
Looks passed between them. He sometimes wondered if women could read each other’s minds. They certainly seemed to read his when he least wanted it. But this time, whatever they had decided silently among themselves, they had not read his thoughts.
“Explain,” Nynaeve said curtly. “Why would the Amyrlin want to keep you here?”
He shrugged, and looked her straight in the eye, and gave her his best rueful grin. “It’s because I was sick. Because it went on so long. She said she would not let me go until she was sure I wouldn’t go off somewhere and die. Not that I’m going to, of course. Die, I mean.”
Nynaeve frowned, and jerked her braid, and suddenly took his head between her hands; a chill ran through him. Light, the Power! Before the thought was done, she had released him.
“What . . . ? What did you do to me, Nynaeve?”
“Not a tenth part of what you deserve, in all likelihood,” she said. “You are as healthy as a bull. Weaker than you look, but healthy.”
“I told you I was,” he said uneasily. He tried to get his grin back. “Nynaeve, she looked like you. The Amyrlin, I mean. Managing to loom even if she is a foot too short for it, and bullying . . . ” The way her eyebrows climbed, he decided that was not a road to go down any further. As long as he kept them away from the Horn. He wondered if they knew. “Well. Anyway, I think they want to keep me here because of that dagger. I mean, until they figure out exactly how it did what it did. You know how Aes Sedai are.” He gave a small laugh. They all just looked at him. Maybe I shouldn’t have said that. Burn me!  Burn me, I’m going on too long. I wish Nynaeve would stop staring at me like that. Keep it short. “The Amyrlin made it so I cannot cross a bridge or board a ship without an order from her. You see? It’s not that I do not want to help. I just can’t.”
“But you will if we can get you out of Tar Valon?” Nynaeve said intently.
“You get me out of Tar Valon, and I’ll carry Elayne to her mother on my back.”
 Women had no sense of humor, sometimes.
Nynaeve motioned the two of them to follow her to the windows, where they turned their backs to him and talked so softly he could catch only a murmur. He thought he heard Egwene say something about only needing one if they stayed together. Watching, he wondered if they really thought they could get around the Amyrlin’s order. If they can do that, I will carry their bloody letter. I really will carry it in my teeth.
Without thinking, he picked up an apple core and bit off the end. One chew, and he hastily spit the mouthful of bitter seeds back onto the plate.
When they came back to the table, Egwene handed him a thick, folded paper. He eyed them suspiciously before opening it out. As he read, he began humming to himself without knowing it.
What the bearer does is done at my order and by my authority. Obey, and keep silent, at my command.
Siuan Sanche
Watcher of the Seals
Flame of Tar Valon
The Amyrlin Seat
And sealed at the bottom with the Flame of Tar Valon in a circle of white wax as hard as stone.
He realized he was humming “A Pocket Full of Gold” and stopped. “Is this real? You didn’t . . . ? How did you get this?”
“She did not forge it, if that is what you mean,” Elayne said.
“Never you mind how we got it,” Nynaeve said. “It is real. That is all that need concern you. I would not show it around, were I you, or the Amyrlin will take it back, but it will get you past the guards and onto a ship. You said you’d take the letter, if we did that.”
“You can consider it in Morgase’s hands right now.” He did not want to stop reading the paper, but he folded it back up anyway, and laid it on top of Elayne’s letter. “You wouldn’t happen to have a little coin to go with this, would you? Some silver? A gold mark or two? I have almost enough for my passage, but I hear things are growing expensive downriver.”
Nynaeve shook her head. “Don’t you have money?  Why should things be more expensive downriver?”
“We gambled for coppers, Nynaeve, and he would not even do that after a while. It doesn’t matter. I will manage. Don’t you listen to what people say? There’s civil war in Cairhien, and I hear it is bad in Tear, too. I’ve heard a room at an inn in Aringill costs more than a good horse back home.”
“We have been busy,” she said sharply, and exchanged worried looks with Egwene and Elayne that set him wondering again.
“It doesn’t matter. I can make out.” There had to be gaming in the inns near the docks. A night with the dice would put him aboard a ship in the morning with a full purse.
“Just you deliver that letter to Queen Morgase, Mat,” Nynaeve said. “And do not let anyone know you have it.”
“I’ll take it to her. I said I would, didn’t I? You would think I didn’t keep my promises.” The looks he got from Nynaeve and Egwene reminded him of a few he had not kept. “I will do it. Blood and—I will do it!”
They stayed awhile longer, talking of home for the most part. Egwene and Elayne sat on the bed, and Nynaeve took the armchair, while he kept his stool. Talk of Emond’s Field made him homesick, and it seemed to make Nynaeve and Egwene sad, as if they were speaking of something they would never see again. He was sure their eyes moistened, but when he tried to change the subject, they brought it back again, to people they knew, to the festivals of Bel Tine and Sunday, to harvest dances and picnic gatherings for the shearing.
Elayne talked to him of Caemlyn, of what to expect at the Royal Palace and who to speak to, and a little of the city. Sometimes she held herself in a way that made him all but see a crown on her head.  When they rose to leave, he was sorry to see them go.
He stood, suddenly feeling awkward. “Look, you have done me a favor here.” He touched the Amyrlin’s paper, on the table. “A big favor. I know you’re all going to be Aes Sedai”—he stumbled a little on that—“and you will be a queen one day, Elayne, but if you ever need help, if there is ever anything I can do, I will come. You can count on it. Did I say something funny?”
 “No, Mat,” Nynaeve said smoothly, but her lips twitched. “Just something I have observed about men.”
“You would have to be a woman to understand,” Elayne said.
“Journey well and safely, Mat,” Egwene said. “And remember, if a woman does need a hero, she needs him today, not tomorrow.” The laughter bubbled out of her.
He stared at the door closing behind them. Women, he decided for at least the hundredth time, were odd.
Then his eye fell on Elayne’s letter, and the folded paper lying atop it. The Amyrlin’s blessed, not-to-be-understood, but welcome-as-a-fire-in-winter paper. He danced a little caper in the middle of the flowered carpet. Caemlyn to see, and a queen to meet. Your own words will free me of you, Amyrlin. And get me away from Selene, too.
“You’ll never catch me,” he laughed, and meant it for both of them. “You’ll never catch Mat Cauthon.”


1 write to _baseDirectory
Microsoft.PowerShell.Commands.Utility (1)
commands\utility\Import-LocalizedData.cs (1)
74
_baseDirectory
= value;
2 references to _baseDirectory
Microsoft.PowerShell.Commands.Utility (2)
commands\utility\Import-LocalizedData.cs (2)
69
return
_baseDirectory
;
254
string dir =
_baseDirectory
;


YOU MUST VOTE
Home
Logout
Vote Register
MyPage
Vote Result
로딩중...
No.
Candidate
Voting..
VOTE HERE!
Select Candidate
--> VOTE <--


Conor McGregor challenged by Jorge Masvidal – put your money where your mouth is!
by FSA EditorThere are no shortage of options for Conor McGregor, who is set to make a UFC return in 2020
Conor McGregor has been challenged to put his “money where his mouth is” by Jorge Masvidal, who is keen to mix it with the big-talking Irishman.
Former two-weight UFC champion McGregor is reported to be making a comeback to the Octagon in January and his manager last month said he hopes to conclude a deal for a bout with Donald Cerrone.
However, an ESPN tweet posted on Friday displayed a graphic showing potential opponents for McGregor and Masvidal in 2020, which prompted a reply from the former saying: “I’ll go at anyone on that list”.
Masvidal could not pass up the opportunity to have a say of his own, writing to McGregor: “Put your money where your mouth is I’m the only 1.”
The 35-year-old Masvidal has seen his stock rise during a fine 2019 that started with a second-round knockout of Darren Till prior to a stunning five-second triumph over Ben Askren.
Earlier this month, Masvidal earned a controversial stoppage over Nate Diaz.
McGregor last fought in UFC 13 months ago, in a now infamous lightweight defeat to Khabib Nurmagomedov.


Gas, power meters installed in violation of Act: plea
HC seeks response of Centre, AAP govt.
by Staff ReporterThe Delhi High Court has asked the Centre and the AAP government to respond to a plea claiming that piped gas and power meters in the Capital are installed in violation of the Legal Metrology Act.
A Bench of Chief Justice D.N. Patel and Justice C. Hari Shankar also issued a notice to the Delhi Jal Board seeking their stand on the petition which has alleged no specifications have been prescribed by the authorities to ensure quality and uniformity of the meters.
The petition has contended that since no specifications have been prescribed, power distribution companies (discoms) and Indraprastha Gas Ltd (IGL), which provides piped gas in the city, “are unable to maintain standards which ultimately affect safety and interest of common man”.
The plea has sought enforcement of the Legal Metrology Act and Rules and a direction to the authorities to prescribe and notify the specifications for power and piped gas meters. It has also sought a direction to DJB to ensure only licensed manufacturers are empanelled by it for supply of water meters.


The css classes in the tachyons framework can be composed in so many different ways to build reusable components. This page will document some of the numerous examples of how to combine the classes in tachyons to build fully responsive components.
Pull requests are welcome if you would like to contribute a component or example of how to use tachyons.


The Short Message Service (SMS) is a protocol designed to transmit short alpha-numeric messages via a dedicated cellular provider's "service center." SMS is built into the GSM (Global System for Mobile communications) standard that has gained general acceptance within Europe; SMS will also most likely be integrated into whatever digital cellular network becomes the de-facto standard within the United States.
The Nokia 9000i Communicator is compliant with the transmission and reception of SMS protocol messages according to the GSM standard. With SMS, it is possible to create applications and services that request and retrieve short text messages (up to 160 characters) to any server or user on the GSM network. The ability to send and receive short messages can enable a wide variety of services. For example, short messages can be used to retrieve stock quotes, place horse-racing bets at a paramutual facility, or play chess with another member of the GSM network. The possible uses for the SMS protocol are almost limitless. A service need only be connected to the GSM network.
Geoworks' Mailbox library includes built-in transmission and receipt of SMS messages. The elements of the Mailbox library that are of concern to SMS application developers have been excerpted and included in this chapter.You will not need to understand the inner workings of the Mailbox library to write an SMS application or service.
Before reading this chapter, you should be familiar with cellular technologies, the SMS standard and elementary GEOS programming--in particular, the use of GEOS Virtual Memory (VM) files.
1 SMS OverviewThe Short Message Service protocol handles a "short message" of up to 160 characters. The SMS standard of 160 characters allows you to send a text message to any single node (address) on the GSM network by way of a dedicated cellular service provider.
The cellular service provider is responsible for managing incoming SMS messages and holding them until the recipient's phone becomes active. The length of time that an SMS message should be held can be specified by the sending party. This is known as a validity period .
The cellular provider may also elect to deliver the message in a format other than SMS. This is done at the server through a message conversion into the alternative format (e.g., as a fax message, as an email, as a page, etc.) This alternative method of delivery may also be specified by the sending party (though, of course, the recipient must have the means to handle such a format).
Because the SMS message is so short, it is guaranteed to be delivered as a single packet of information.
The Nokia 9000i Communicator comes with built-in capabilities to send and receive SMS messages. This is enabled through use of Geoworks' Mailbox library. Because the Mailbox library includes all Inbox/Outbox functionality (email, faxing, etc.), it contains a large amount of information that is not relevant to an SMS service developer. This section will only detail general information about the Mailbox library and API specific to SMS application developers.
The purpose of the Mailbox library is to let applications send and receive information to and from other computers, through a variety of communications media. The mailbox insulates the application as much as possible from the mechanics of transmitting and receiving the information.
In order to use the Mailbox library, an application must package information in a format acceptable to both a data driver (which stores the message) and a transport driver (which sends the message) -- in this case the SMS transport driver. The application then registers this message with the Mailbox library. During the registration process, you specify in which data format the message is stored.
The Mailbox library stores messages that have not yet been transmitted in its outbox . Messages are held in the outbox until the hardware connection necessary for transmission is available. An application can also specify that a message not be delivered until a specific time. In this case, the message will automatically remain in the outbox until that time. While a message is in the outbox, the device's user can examine information about the message and delay or even cancel its delivery.
When the time comes to send the message, the Mailbox library activates the appropriate transport driver. This activation is transparent to an application developer.
There are three pieces of information that you will need to know when you send an SMS message. These are rather self-evident:
If you wish the SMS message to be sent to a particular application on the receiving Nokia 9000i Communicator, you will also need the following information:
TokenChars
) of the receiving app.
ManufacturerID
of the receiving app.
In GEOS, these two pieces of information are referred to as a
GeodeToken
. If the application is your own, the
GeodeToken
is easy enough to determine (since you will have defined it yourself). If the application is not your own, you will need to contact that manufacturer or cellular provider for this information.
Sending and the Mailbox Library
Any SMS message that is sent out to the cellular provider is routed through the mailbox's outbox . There are three basic paradigms involved in packaging up information for use by the outbox. Although knowledge of how they work is not essential to sending an SMS message, it may be important when troubleshooting problems.
Apart from any parameters sent to the mailbox, the three basic pieces of information the outbox needs to know in order to send a message are:
When a message is placed in the outbox, the mailbox calls the appropriate data driver to store the data. When a connection is made, the mailbox calls the appropriate transport driver and sends the message. Note that the mailbox itself does not need to know the message's contents, or even its format.
mailbox.goh
To send an SMS message to the outside world, an application will need to perform the following steps:
GeoworksMailboxDataFormatID
), but a VM file is the easiest to manipulate. This VM file will be accessed by a Mailbox data driver. (See Storing the Text Within a VM File
.)
SMSendingOptions
parameters in a DB item. These will be used by the SMS transport driver when the message is delivered. (See Setting Up the SMSending Options
.)
MailboxRegisterMessageArgs
structure. (See Setting Up the MailboxRegisterMessageArgs
.)
MailboxRegisterMessage()
. (See Registering the Message
.)These steps are detailed in the sections following.
foam.goh
The Short Message Service protocol is able to handle a "short message" of up to 160 characters. The Foam library defines this character limit:
#define FOAM_MAX_SMS_TEXT_SIZE 160
The Nokia 9000i Communicator also allows you to further specify a particular application within the Nokia 9000i Communicator by adding a prefix to the SMS message (thus reducing the amount of useful text).
This prefix consists of two backslashes ("//"),
a 4-byte GEOS application token ( TokenChars
),
a 5-byte GEOS ManufacturerID
,
and a carriage return ("/r", ASCII 13, or 0x0D hex).
The Mailbox library will correctly read all characters up to the carriage return.
For example:
//SKAA11\r
is a valid prefix.
The application
TokenChars
and
ManufacturerID
should match those of the intended
receiving
application. If you define your own application, and only wish to communicate with its counterpart running on another device, you will define this string in the application's
.gp
file. The string is constructed from the
tokenchars
and
tokenid
lines of the
.gp
file.
You may also send a message to a different application, as long as you know its
TokenChars
and
ManufacturerID
.
This prefix should leave at least 148 characters to store the alpha-numeric text message. When concatenating two strings, be sure that you do not overflow the bounds of the array.
Code Display 3-1 Setting Up an SMS Text Message
/* * Declare the buffer to store the text message and write the prefix to the buffer. */ TCHAR smsMessage[FOAM_MAX_SMS_TEXT_SIZE + 1] = "//SKAA11\r"; TCHAR smsText[] = "Here's my test message. I better make sure it fits.";
/* * Add the body of the text to the buffer but first check the bounds. */ if ( strlen( smsMessage ) + strlen( smsText ) <= FOAM_MAX_SMS_TEXT_SIZE ) { strcat( smsMessage, smsText ); }
MailboxGetVMFile(), Mailbox\vmtree.goh
Text within an SMS message needs to be stored by the Mailbox until it connects with a cellular service provider. When you register a message with the Mailbox library, you indicate what storage format you have selected. The Mailbox uses a data driver to store and retrieve messages. There are a number of data drivers available, but we only need to know a few.
SMS messages may either be stored as VM (Virtual Memory) trees or as GEOS files, within the Mailbox itself. VM trees offer a lower overhead, and are simpler to use, so that is the format we have documented. (It is possible that future data drivers will become available as well.) If you are unfamiliar with GEOS VM trees, consult the Virtual Memory chapter of the Concepts book.
The mailbox data driver stores its data in what is called a VM tree. This tree is referenced by a
VMTreeAppRef
structure.
typedef struct { VMChain VMTAR_vmChain; VMFileHandle VMTAR_vmFile; } VMTreeAppRef;
VMTAR_vmChain
stores the
VMChain
to pass to the data driver. For SMS messages, simply use the VMCHAIN_MAKE_FROM_VM_BLOCK macro to construct a
VMChain
from a single
VMBlockHandle
.
vmFile
stores the
VMFileHandle
which contains the VM block.The Mailbox stores these VM trees locally within an administation file that it maintains. To store the text within a Mailbox-compatible VM file, perform the following steps:
MailboxGetVMFile()
to retrieve a VM file handle within the Mailbox. This routine expects an argument indicating the expected number of blocks to be added to the file; because the SMS message can be contained in a single block, pass 1. Also pass a buffer to store the returned
VMStatus
.
VMFileHandle
.
VMAlloc()
.
VMLock()
. This routine returns the segment address of the locked block. You will also receive a temporary memory handle that you can use to manipulate the block.
VMChainLink
that begins the block.)
VMDirty()
.
VMUnlock()
.
VMTreeAppRef
structure. This format is understood by the mailbox data driver.Code Display 3-2 Storing the Text In a VM File
VMFileHandle vmFile; VMBlockHandle vmBlock; TCHAR *textPtr; MemHandle mh; word vmStatus; VMTreeAppRef vmRef;
/* * Obtain the handle of a writable VM file from the Mailbox library. We pass one * since we do not plan to add additional blocks to this file (because SMS messages * are so short). */ vmFile = MailboxGetVMFile(1, &vmStatus);
/* * Allocate a VM block and store the text within this block. The block will need * to fit a header (VMChainLink), the SMS message itself, and a null terminator. */ vmBlock = VMAlloc(vmFile, (sizeof(VMChainLink) + strlen(smsMessage) +1), 0); charPtr = VMLock(vmFile, vmBlock, &mh);
/* * We advance past the VMChainLink contained at the beginning of the VM * block and copy the text to that location. */ strcpy(textPtr + sizeof(VMChainLink), smsMessage);
/* * Dirty the block and unlock it. */ VMDirty(mh); VMUnlock(mh);
/* * Store the VM file and VM block within a VMTreeAppRef structure. This is the * format that the mailbox library understands. Essentially, it ia a VM "chain" * of a single VM file. */ vmRef.VMTAR_vmChain = VMCHAIN_MAKE_FROM_VM_BLOCK(vmBlock); vmRef.VMTAR_vmFile = vmFile;
MailboxGetAdminFile(), smdefine.goh, SMSendingOptions, ReadCSNumberFromIniFile()
When registering a mailbox message, the application must specify a data driver to use when storing the message. It will also need to specify which transport driver to use when the message is to be delivered. The GEOS SMS transport driver expects a number of parameters indicating how the SMS message should be sent. These parameters are passed as a
SMSendingOptions
structure within a GEOS
DBItem
.
To store these parameters within a compatible DB item, perform the following steps:
MailboxGetAdminFile()
to retrieve the
VMFileHandle
of the Mailbox administration file. This is where you will copy your SMS parameters.
DBAllocUngrouped()
.
DBLockUngrouped()
.
SMSendingOptions
parameters into this DB item.
InitFileReadStringBuffer()
. Copy that number into the DB item.
DBDirty()
.
DBUnlock()
.
The
SMSendingOptions
structure is defined within
smdefine.goh
and is shown below:
typedef struct { SMReplyPath SMSO_replyPath; SMValidityPeriod SMSO_validityPeriod; SMMessageConversion SMSO_messageConversion; TCHAR SMSO_scAddress[MAX_ADDRESS_SIZE]; } SMSendingOptions; #define MAX_ADDRESS_SIZE 22
replyPath
contains an
SMReplyPath
value which indicates whether the recipient may reply to the message through the sender's service provider. Possible values are:
_validityPeriod
contains an
SMValidityPeriod
value which indicates the length of time that the message is considered valid for delivery. The cellular provider should interpret this value and if it is unable to connect with the recipient, drop the message and inform the sender that the message was not delivered. Possible values are:
messageConversion
contains an
SMMessageConversion
value, indicating that you wish to have the SMS message delivered to the recipient in a different format than that of an SMS message (provided that the cellular provider offers this service). Possible values are:
scAddress
stores the address of the service center (cellular provider). This number is stored as an ASCII text string and is limited to 22 characters. This number should be retrieved from the Nokia 9000i Communicator's .INI file; the number is stored under the
scNumber
field within the
SMS
category. This "address" in this case is really just a numerical phone number.initfile.h, InitFileReadStringBuffer()
To read a string from the .INI file, call
InitFileReadStringBuffer()
. Pass "SMS" as the category and "scNumber" as the key. The routine will read the entry into a buffer passed to the routine. It will also read the size of the string into another buffer.
Code Display 3-3 Setting the SMSendingOptions Parameters
SMSendingOptions *ptrSendingOptions VMFileHandle adminFile; DBGroupAndItem smsParams; word sizeOfBuffer;
adminFile = MailboxGetAdminFile();
smsParams = DBAllocUngrouped(adminFile, sizeof(SMSendingOptions));
ptrSendingOptions = (SMSendingOptions *) DBLockUngrouped(adminFile, smsParams);
/* set desired sending options */ ptrSendingOptions->SMSO_replyPath = SMRP_NO; ptrSendingOptions->SMSO_validityPeriod = SMVP_24_HOURS; ptrSendingOptions->SMSO_messageConversion = SMMC_NORMAL;
/* be sure to initialize these fields as well, otherwise the app will crash! */ ptrSendingOptions->SMSO_dataCodingScheme = 0; ptrSendingOptions->SMSO_userDataLength = 0; ptrSendingOptions->SMSO_userDataLength = 0;
InitFileReadStringBuffer("SMS", "scNumber", ptrSendingOptions->SMSO_scAddress, 0, &sizeOfBuffer);
DBDirty(ptrSendingOptions); DBNUnlock(ptrSendingOptions);
MailboxRegisterMessageArgs, MailboxTransAddr
By now, you have created a reference to the SMS message itself (within a
VMTreeAppRef
structure); you have also placed the SMS sending parameters within the mailbox administration file. You are now ready to load the
MailboxRegisterMessageArgs
structure with parameters. (Two of these parameters will be the location of the SMS message and its sending parameters.)
SMSendingOptions
are located.
All of these steps are accomplished by simply filling in a
MailboxRegisterMessageArgs
structure. This structure is large, but it is not altogether complicated. Each field is described in the following sections, though only SMS relevant information is shown. It is shown below:
typedef struct { MailboxStorage MRA_bodyStorage; MailboxDataFormat MRA_bodyFormat; const void *MRA_bodyRef; word MRA_bodyRefLen; MailboxTransport MRA_transport; MailboxTransportOption MRA_transOption; MailboxTransAddr *MRA_transAddrs; word MRA_numTransAddrs; dword MRA_transData; MailboxMessageFlags MRA_flags; const char *MRA_summary; GeodeToken MRA_destApp; FileDateAndTime MRA_startBound; FileDateAndTime MRA_endBound; } MailboxRegisterMessageArgs;
As we mentioned, the Mailbox will need to store a message in a format that it can understand. Rather than have the Mailbox understand every data format that is (or will ever be) developed, it is easier to "package" the message in a small number of standard formats. You specify in what format the message will be wrapped in the MRA
_bodyStorage
field.
bodyStorage
indicates under what format (of type
MailboxStorage
) the message will be stored in the internal Mailbox administration file.
MailboxStorage
is defined as follows:typedef struct { word MS_id; ManufacturerID MS_manuf; } MailboxStorage;
MS_id
GeoworksMailboxStorageID
. The following types are valid:GMSID_FILE GMSID_VM_TREE
MS_manuf
ManufacturerID
of the data driver being used. Since we will be using Geoworks VM trees, we will store MANUFACTURER_ID_GEOWORKS
in this location.MRA_bodyFormat
MailboxDataFormat
. This is defined below:typedef struct { word MDF_id; ManufacturerID MDF_manuf; } MailboxDataFormat;
MDF_id
GeoworksMailboxDataFormatID
. Pass GMDFID_SHORT_MESSAGE in this field
to indicate that the message is a Geoworks SMS message.MDF_manuf
ManufacturerID
of the format. Since we will be using Geoworks SMS , we will
store MANUFACTURER_ID_GEOWORKS in this location.
_bodyRef
stores a pointer to the reference of the SMS message. Since we will be storing the message in a VM tree, we will reference that message with a
VMAppTreeRef
.
bodyRefLen
stores the length of the reference indicated in MRA_
bodyRef
. In this case, we will store the size of the
VMAppTreeRef
structure.
transport
field.
_transport
takes an argument of type
MailboxTransport
. This is defined below:typedef struct { word MT_id; ManufacturerID MT_manuf; } MailboxTransport;
MT_id
GeoworksMailboxTransportID
. MT_manuf
ManufacturerID
of the transport driver being used. Since we will be using Geoworks SM transport driver, we will store MANUFACTURER_ID_GEOWORKS in this location.MRA_transOption
MRA_transAddrs
MailboxTransAddr
structure; it is only important that the transport driver understand the format for this address.
MailboxTransAddr
structures. This structure is defined below:typedef struct { const void *MTA_transAddr; unsigned MTA_transAddrLen; const char *MTA_userTransAddr; } MailboxTransAddr;
MTA_transAddr
MTA_transAddrLen
MTA_transAddr
.MTA_userTransAddr
MTA_transAddr
.MRA_numTransAddrs
MRA_transAddrs
.MRA_transData
DBItem
containing a structure of type
SMSendingOptions
.MRA_flags
MailboxMessageFlags
. MRA_summary
MRA_destApp
GeodeToken
of the destination application.MRA_startBound
FileDateAndTime
) to begin transmission of the message. You may also pass the value MAILBOX_NOW (0) for immediate delivery.MRA_endBound
FileDateAndTime
) to end attempts to transmit the message to the service provider. You may also pass the value MAILBOX_ETERNITY (-1) to indicate attempt until successful.Code Display 3-4 Setting Up the Mailbox Registration Arguments
MailboxRegisterMessageArgs registerArgs; MailboxTransAddr addressList; TCHAR number[MAX_ADDRESS_SIZE]
/* * We tell the mailbox that the data is stored within a VMTreeAppRef. */ registerArgs.MRA_bodyStorage.MS_id = GMSID_VM_TREE; registerArgs.MRA_bodyStorage.MS_manuf = MANUFACTURER_ID_GEOWORKS;
/* * We tell the mailbox that this is an SMS message. */ registerArgs.MRA_bodyFormat.MDF_id = GMDFID_SHORT_MESSAGE; registerArgs.MRA_bodyFormat.MDF_manuf = MANUFACTURER_ID_GEOWORKS;
/* * We tell the mailbox where the body text is stored. */ MRA_bodyRef = &vmRef; registerArgs.MRA_bodyRefLen = sizeof(VMTreeAppRef);
/* * We tell the mailbox to use the SM transport driver when sending the message. */ registerArgs.MRA_transport.MT_id = GMTID_SM; registerArgs.MRA_transport.MT_manuf = MANUFACTURER_ID_GEOWORKS;
registerArgs.MRA_transOption = 0;
/* * Normally, we would retrieve the phone number from an outside source (such as * the contact database). Here, we just set it to a specific value. */
number = "13125551212";
/* * We need to stuff each address (in this case, a phone number) into a * MailboxTransAddr structure. */
addressList.MTA_transAddr = &number; addressList.MTA_transAddrLen = strlen(number); addressList.MTA_userTransAddr = &number;
registerArgs.MRA_transAddrs = &addressList; registerArgs.MRA_numTransAddr = 1;
/* * We pass the previously set up SMSendingOptions in the DBGroupItem to the * transport driver. */ registerArgs.MRA_transData = smsParams;
registerArgs.MRA_flags = MMF_DELETE_BODY_AFTER_TRANSMISSION;
registerArgs.MRA_summary = "Chess Move";
strcpy(registerArgs.MRA_destApp.GT_chars, "SKAA"); registerArgs.MRA_destApp.GT_manufID = MANUFACTURER_ID_NOKIA;
registerArgs.MRA_startBound = MAILBOX_NOW; registerArgs.MRA_endBound = MAILBOX_ETERNITY;
MailboxRegisterMessage(), MailboxDoneWithVMFile()
Finally, you have everything set up. To send the message, all you need to do is register the message with the mailbox library.
MailboxRegisterMessage()
takes an address (of type
MailboxMessage
) as a second parameter. The routine will write a token value into this address so that future mailbox routines can refer to this message by its token.
Do not confuse this token with the actual message (which is sent through the
MailboxRegisterMessageArgs
).
After you have successfully registered the message, call
MailboxDoneWithVMFile()
to tell the mailbox to get rid of the temporary VM file it had created.
Code Display 3-5 Using MailboxRegisterMessage
MailboxRegisterMessageArgs registerArgs; MailboxMessage msgToken; MailboxError mailboxError; VMFileHandle vmFile;
mailboxError = MailboxRegisterMessage(®isterArgs, &msgToken);
if (mailboxError == ME_SUCCESS) {
/* If we want to do anything special upon success, here it would reside ... */
};
MailboxDoneWithVMFile(vmFile);
There is a possibility that
MailboxRegisterMessage()
may return an error (of type
MailboxError
) if something is not working correctly (or if the message was not set up correctly). The routine returns ME_SUCCESS if the registration was successful.
The following are valid mailbox error codes:
ME_SUCCESS = 0 ME_NOT_ENOUGH_MEMORY ME_CANNOT_LOAD_DATA_DRIVER ME_CANNOT_LOAD_TRANSPORT_DRIVER ME_UNABLE_TO_CREATE_TRANSMIT_THREAD ME_CANNOT_ENQUEUE_MESSAGE ME_USER_CANCELED ME_LOST_CONNECTION ME_CANNOT_CREATE_MESSAGE_FILE ME_CANNOT_RESIZE_MBOX_REF ME_CANNOT_SAVE_MESSAGE_FILE ME_CANCELLED_BY_RECEIVER ME_MESSAGE_BLOCKS_ARE_MISATCHED ME_DATA_DRIVER_CANNOT_STORE_MESSAGE_BODY ME_INSUFFICIENT_DISK_SPACE ME_CANNOT_CONNECT
The following are unrecoverable
MailboxError
error codes. (The high bit is set if this is the case.)
#define ME_UNRECOVERABLE 0x8000
ME_ADDRESS_INVALID ME_DATA_DRIVER_CANNOT_ACCESS_MESSAGE_BODY ME_UNSUPPORTED_BODY_FORMAT ME_MESSAGE_BODY_INVALID ME_INVALID_MESSAGE ME_REPLY_ADDRESS_NOT_AVAILABLE ME_DESTINATION_APPLICATION_UNKNOWN ME_UNKNOWN_DISK_ERROR ME_APP_REF_BUF_TOO_SMALL ME_CANNOT_OPEN_MESSAGE_FILE ME_CANNOT_READ_MESSAGE_FILE ME_CAN_NEVER_CONNECT
There are two ways the Nokia 9000i Communicator may receive an SMS message: standard, or targeted.
As a developer, you do not need to concern yourself with standard messages since a "standard" message is handled by the Nokia 9000i Communicator's built-in SMS application. This application handles standard messages that are either sent without an SMS prefix or that are sent specifically to the SM Receive application.
Targeted messages are those messages sent using the twelve character prefix.
These messages may not necessarily be sent using another Nokia 9000i Communicator; any device that uses the correct SMS prefix can contact a specific application if it so desires. In any case, the twelve character prefix (containing the GeodeToken
) will specify the application that is meant to receive the message.
SM Receive and the Mailbox Library
When the GSM network informs the unit that is has an SMS message pending for receipt, it launches the SM Receive application. This application retrieves the SMS message(s). If the message is a standard SMS message, it routes the message to the application's "Received messages" folder.
If the message is targeted to a specific application, the SM Receive application contacts the mailbox and places the message in the mailbox's inbox . The mailbox then contacts the application by sending it a message ( MSG_META_MAILBOX_NOTIFY_MESSAGE_AVAILABLE ). If the mailbox cannot contact the application, it re-routes the message back to the SM Receive application.
You do not need to know how the SM Receive application works, but it is useful to know the process which occurs when an SMS message is received.
When the inbox receives a message that it determines is destined for a specific application, the mailbox will contact that application's process class with MSG_META_MAILBOX_NOTIFY_MESSAGE_AVAILABLE . This message passes a token identifer of the SMS message.
If you wish your application to handle an SMS message, you will need to write a message handler for MSG_META_MAILBOX_NOTIFY_MESSAGE_AVAILABLE . It should perform the following steps:
MailboxAcknowledgeReceipt()
to inform the mailbox that we're handling the message. Pass the token identifer of the SMS message that was passed with
MSG_META_MAILBOX_NOTIFY_MESSAGE_AVAILABLE
. (See Acknowledging Receipt of the Message
.)
MailboxGetBodyRef()
. (See Retrieving the Text from the VM Block
.)
MailboxDoneWithBody()
to instruct the mailbox to release the VM reference to the text. (See Cleaning Up
.)
Mailbox DeleteMessage()
, passing the token referring to this message. These specific steps are described in more detail below:
MailboxAcknowledgeMessageReceipt()
When your application receives an SMS message with
MSG_META_MAILBOX_NOTIFY_MESSAGE_AVAILABLE
, your first order of business should be informing the mailbox that you have the message. To do this, send the mailbox
MailboxAcknowledgeMessageReceipt()
, passing it the message token.
Code Display 3-6 Acknowledging Receipt of an SMS Message
/* * Each application which wishes to receive SMS messages should create a * MSG_META_MAILBOX_NOTIFY_MESSAGE_AVAILABLE handler in the app's main prcoess * class. */
@method MyProcessClass, MSG_META_MAILBOX_NOTIFY_MESSAGE_AVAILABLE {
/* * First we inform the mailbox that we've received the message. We pass the * `msg' token that was passed to this message in the first place. */
MailboxAcknowledgeMessageReceipt(msg);
/* To be continued ... */
MailboxGetBodyRef()
As we indicated in Storing the Text Within a VM File
, it is convenient for the SMS message itself to be wrapped in a small
VMChain
structure. In the following section, we assume that is indeed what was done on the sending end.
Use
MailboxGetBodyRef()
to retrieve this reference to the actual text. Pass the message token, a pointer to a buffer to store the body reference, and the length of that buffer.
Code Display 3-7 Retrieving the Text
MailboxError errorCode; VMAppTreeRef vmRef; word refSize; MemHandle handleToText; TCHAR smsText[FOAM_MAX_SMS_TEXT_SIZE+1]; char *ptrToText;
/* * First, retrieve the reference to the body of the SMS text from the mailbox * library. Place that reference into our vmRef variable. */
refSize = sizeof(VMTreeAppRef); errorCode = MailboxGetBodyRef(msg, &vmRef, &refSize);
if (errorCode == ME_SUCCESS) {
/* * Lock the block and retrieve a pointer to the SMS text. */ ptrToText = (char *) VMLock(vmRef.VMTAR_vmFile, VMCHAIN_GET_VM_BLOCK(vmRef.VMTAR_vmChain), &handleToText);
/* * Advance the pointer beyond the carriage return to get beyond the * prefix. */
while ( *ptrToText != `\r') ptrToText++;
/* Advance over the `\r' ...*/ ptrToText++;
strcpy(smsText, ptrToText);
VMUnlock(handleToText);
/* To be continued ... */
MailboxDoneWithBody(), MailboxDeleteMessage()
Finally, we need to notify the mailbox that it can delete both the text of the message (and the reference to that text) and the message itself. To perform each of these steps, call
MailboxDoneWithBody()
and
MailboxDeleteMessage()
.
Code Display 3-8 Cleaning Up the Mailbox
/* Now remove the external text and the reference to that text. */
MailboxDoneWithBody(msg, &vmRef, refSize)
/* * Finally, delete the "message" including the message token and any * information included with it. */
MailboxDeleteMessage(msg);
}
}


This project was developed from scratch using openframeworks in C++. The project models were also developed by me. The project incorporates OpenGL shaders and openframeworks lighting, the latter of which is similar to openGL lighting. The Lunar Lander project also included particle effects with physics and emitters along with an octree collision detection algorithm. This project is akin to a remake of the classic 'lunar lander' game which was bundled on atari game consoles in the early years of video game industry.
The tech stack for the application is as follows:
- C++
- OpenFrameworks
- Visual Studio
- OpenGL lighting
- OpenGL shaders
- Openframeworks Lighting
- Particle effects
- Octree Collision detection
- Particle Emitters
- Maya Model Development
- Maya textures
- Ray casting
- Ray intersection


Founded in October of 2003 and based in Dehradun, Ashoka Jewellers and Sons have built a trusted marketplace for people to buy jewellery in Dehradun.
Whether you want a diamond necklace, an engagement ring, bracelets or ear-rings, we have them all customized especially for our valued customers. Since this is our ancestral business we have a history of trust, respect and understanding with our customers. Along with that our owner Mr. Amit Kansal is a government approved valuer, and a member of GJEPC (Gem & Jewellery Export Promotion Council). He is also a licensed Exporter of Gold and Silver jewellery.


Looks like this page is missing. Don't worry though, our best man is on the case.
Meanwhile, why don't try again by going


{{ message|e }}
Click here to submit a permit application
DENIED Try again in a few weeks, if not months!


byte
, int
, etc.) to conserve
memory and boost performance.
The Java Collections package is in many ways excellent, but it cannot be used for primitive types and autoboxing introduced in Java 1.5 kills the runtime performance (increased memory use, garbage collector overhead).
This library has different design goals than Java Collections (and many other collection packages). For example, the internals of each class are open and subject to free hacking and tuning up to one's wishes.
There are a few projects implementing collections over primitive types: fastutil, PCJ, GNU Trove, Apache Mahout (ported COLT collections), Apache Primitive Collections.
Some of these are LGPL-ed, a license type many commercial companies tend to avoid at all costs; other projects above are no longer maintained or complete. There is also a tendency to write tightly encapsulated code (private internals), implementing the API of standard Java packages and striving for fast error-recovery. Although these are good programming practices, they are not always practical (in many computationally intense applications access to the collection class' internals is a bliss). HPPC has a slightly different set of goals.
We assume that:
From these assumptions stem the following design drivers:
-ea
switch). When the algorithm is tested and verified,
it can run with no additional overhead from contract checks.Object
types), but at the same time we want
specialized classes automatically-generated for primitive-types
(to limit memory consumption and boost performance due to JIT optimisations).HPPC is not strictly modeled after Java Collections API, although we did
try to make the APIs look similar enough for comfortable use.
One particular thing largerly missing in HPPC are view projections
(sublists or views over the collection of keys or values). Certain classes provide such views
(like {@linkplain com.carrotsearch.hppc.ObjectObjectOpenHashMap
ObjectObjectOpenHashMap
}), but for the most part, specific methods are
provided that accept ranges or closure-like filters. If performance is still unsatisfactory,
the internals of each class are available for direct manipulation.
Rough relationships between Java Collections classes and HPPC classes are presented in the table below.
| Java Collections | HPPC (primitives) | HPPC (generics) | |
|---|---|---|---|
| bit sets | java.util.BitSet |
BitSet |
n/a |
| array-backed lists | java.util.ArrayList , java.util.Vector |
[type]ArrayList |
{@linkplain com.carrotsearch.hppc.ObjectArrayList
ObjectArrayList<T> } |
| stacks | java.util.Stack |
[type]Stack |
{@linkplain com.carrotsearch.hppc.ObjectStack
ObjectStack<T> } |
| deques | java.util.ArrayDeque |
[type]ArrayDeque |
{@linkplain com.carrotsearch.hppc.ObjectArrayDeque
ObjectArrayDeque<T> } |
| hash maps (dictionaries) | java.util.HashMap |
[keyType][valueType]OpenHashMap |
{@linkplain com.carrotsearch.hppc.ObjectObjectOpenHashMap
ObjectObjectOpenHashMap<K, V> }[keyType]ObjectOpenHashMap<V> Object[valueType]OpenHashMap<K>
|
The method-level API of the corresponding types is also similar, but distinct differences exist (consult the JavaDoc of each class).
HPPC's interfaces are modeled to encapsulate the common functionality enforced from all the classes that implement a given interface. The interface hierarchy is loosely inspired by STL.
An overview of interfaces and their relationship to data structures implemented in HPPC is depicted graphically in {@link com.carrotsearch.hppc.ObjectContainer}.


Flexible Radiofrequency Readout
Home
(current)
Gallery
GPU Server
Python client API
Web GUI (Coming soon...)
Resonator fitting
TKID calibration with heater diagnostic
VNA scan and tagging
Triggering cosmic rays
Quantum capacitance deterctor readout
Resonator model parameters explorer


By Prof. Dr. Ansgar Gerlicher, Feb. 2019
Image source: giphy.com
| Optimization | Effect |
|---|---|
| Combination of multiple Class files in one DEX file | Smaller memory footprint, faster load of the application |
| Sharing of DEX files between processes (read-only mapping) | Smaller memory footprint, faster load of the application |
| Byte ordering and word alignment according to local machine (install time) | Faster load of the application DEX file itself still platform independent |
| Bytecode pre-verification (as much as possible, install time) | Faster load and execution |
| Install-time optimization of bytecode | Faster execution, still platform independence |
| Register instead of stack based virtual machine | Faster execution (~30%) |
/Users/\<user>/Library/Android/sdk/platform-tools
> adb -e shell
> adb push \<local> \<remote>
> adb pull \<remote> \[\<local>]
> adb install \<file>
<?xml version="1.0" encoding="utf-8"?>
<manifest>
<uses-permission />
<application>
<activity>
<intent-filter>
<action />
<category />
<data />
</intent-filter>
<meta-data />
</activity>
<service>
<intent-filter> . . . </intent-filter>
<meta-data/>
</service>
</application>
</manifest>


Section 4. The Times, Places and Manner of holding Elections for Senators and Representatives, shall be prescribed in each State by the Legislature thereof; but the Congress may at any time by Law make or alter such Regulations, except as to the Places of chusing Senators.
[The Congress shall assemble at least once in every Year, and such Meetings shall be on the first Monday in December, unless they shall by Law appoint a different Day.]*
_______________
*Superseded by the XXth amendment.


--- layout: default ---
<audio id="audioCon">
<source src="Song of The Lonely Mountain - The Hobbit - Peter Hollens.mp3">
<source src="Song of The Lonely Mountain - The Hobbit - Peter Hollens.ogg">
Your browser does not support the audio element.
</audio>
<video width="640 height="360" controls style="padding-bottom: 15px"
poster="https://cdn02.nintendo-europe.com/media/images/10_share_images/games_15/nintendo_switch_download_software_1/H2x1_NSwitchDS_CaveStoryPlus_image1600w.jpg">
<source src="CaveStory Boss.mp4">
<source src="CaveStory Boss_WebM 720p HD.webm">
Your browser does not support the video tag.
</video>
Now while you can upload and host your own videos...
The easiest way these days is to just let YouTube do the hosting and embed your video into your page. Also makes it easier to add multiple videos without the ton of JavaScript you need to get video and audio to behave and count multiple files/slash controls.
Canvas pretty much lets you do what you dang well please within the tag that you would like, think of it as a blank slate, hence the term canvas. Most of-, actually lets make that all of the time, you'll be using JavaScript to run and draw the things in your canvases.
var canvas = document.querySelector('canvas'),
ctx = canvas.getContext('2d'),
particles = [],
patriclesNum = 125,
w = 300,
h = 300,
colors = ['#f35d4f','#f36849','#c0d988','#6ddaf1','#f1e85b'];
canvas.width = 300;
canvas.height = 300;
canvas.style.left = (window.innerWidth - 300)/2+'px';
if(window.innerHeight>300)
canvas.style.top = (window.innerHeight - 250)/2+'px';
function Factory(){
this.x = Math.round( Math.random() * w);
this.y = Math.round( Math.random() * h);
this.rad = Math.round( Math.random() * 1) + 1;
this.rgba = colors[ Math.round( Math.random() * 3) ];
this.vx = Math.round( Math.random() * 3) - 1.5;
this.vy = Math.round( Math.random() * 3) - 1.5;
}
function draw(){
ctx.clearRect(0, 0, w, h);
ctx.globalCompositeOperation = 'lighter';
for(var i = 0;i < patriclesNum; i++){
var temp = particles[i];
var factor = 1;
for(var j = 0; j<patriclesNum; j++){
var temp2 = particles[j];
ctx.linewidth = 0.5;
if(temp.rgba == temp2.rgba && findDistance(temp, temp2)<50){
ctx.strokeStyle = temp.rgba;
ctx.beginPath();
ctx.moveTo(temp.x, temp.y);
ctx.lineTo(temp2.x, temp2.y);
ctx.stroke();
factor++;
}
}
ctx.fillStyle = temp.rgba;
ctx.strokeStyle = temp.rgba;
ctx.beginPath();
ctx.arc(temp.x, temp.y, temp.rad*factor, 0, Math.PI*2, true);
ctx.fill();
ctx.closePath();
ctx.beginPath();
ctx.arc(temp.x, temp.y, (temp.rad+5)*factor, 0, Math.PI*2, true);
ctx.stroke();
ctx.closePath();
temp.x += temp.vx;
temp.y += temp.vy;
if(temp.x > w)temp.x = 0;
if(temp.x < 0)temp.x = w;
if(temp.y > h)temp.y = 0;
if(temp.y < 0)temp.y = h;
}
}
function findDistance(p1,p2){
return Math.sqrt( Math.pow(p2.x - p1.x, 2) + Math.pow(p2.y - p1.y, 2) );
}
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
window.mozRequestAnimationFrame ||
function( callback ){
window.setTimeout(callback, 1000 / 60);
};
})();
(function init(){
for(var i = 0; i < patriclesNum; i++){
particles.push(new Factory);
}
})();
(function loop(){
draw();
requestAnimFrame(loop);
})();
Now, this JavaScript might look like a pile of spaghetti, but it can pull off things like this in a canvas:
Which also looks a bit like spaghetti. If you thought Flash and Illustrator vectors where cool, they got nothing on this. Now, while I might have just grabbed this one out someones Pen repo, that is how coding ends up working quite often, you take a base and build upon it to make it even better. or at least to figure out how the heck it works, which was the case this time.
By the way, here are some other places that I found with some interesting examples, including the one I based this off of:
HTML5 Canvas Experiments
Mind-Blowing Canvas Demos


Bauchi ex-governor denies misappropriating N47b Paris Club largesse
by Adamu Abuh, AbujaFormer Governor Muhammed Abubakar has faulted claims that he frittered away over N47.3 billion Paris Club refund to Bauchi State.
He maintained that the allegations were falsehoods peddled by the Bauchi State Funds and Assets Recovery Committee “working in cahoots” with his successor, Governor Bala Mohammed.
Abubakar, who spoke yesterday in Abuja through Umar Mohammed, his ex-Housing Commissioner, vowed to sue his successor to clear his name.
Accusing the committee of embarking on a witch-hunt, he said the Paris Club largesse and the bailout funds from the Federal Government were used to offset backlog of workers’ salaries.


Feature Inclusion¶
There may be a case where an original dataset has multiple features, but only a subset of these features are wanted to be included in the segmentation process.
>>> import numpy as np
>>> import matplotlib.pylab as plt
>>> import seg1d
>>> #retrieve the sample reference, target, and weight data
>>> r,t,w = seg1d.sampleData(c=0.5)
Note: The reference data shown here is centered at 0 on the y axis (vertical). As the algorithm process is based on the shape of the curve, it is irrelevant what this offset is.
>>> # plot reference data
>>> plt_r = np.asarray( [ x for y in r for x in y.values() ] ).T
>>> plt.figure(figsize=(3,3))
>>> plt.plot(plt_r,alpha=0.3)
>>> plt.show()
>>> # plot target data
>>> plt_t = np.asarray( [ x for x in t.values() ] )
>>> plt.figure(figsize=(15,4))
>>> plt.plot(plt_t.T,alpha=0.5)
>>> plt.show()
>>> #Make an instance of the segmenter
>>> s = seg1d.Segmenter()
>>> #set scaling parameters
>>> s.minW,s.maxW,s.step = 98, 105, 1
>>> #Set target and reference data
>>> s.t, s.r, s.w = t,r,w
>>> #call the segmentation algorithm
>>> segments = s.segment()
>>> print(np.around(segments,decimals=7))
[[204. 245. 0.7128945]
[ 70. 112. 0.6670482]
[340. 382. 0.6630886]]
>>> plt_t = s.t_masked #get a NaN masked array of the target data
>>> # plot masked target
>>> plt.figure(figsize=(15,4))
>>> plt.plot(plt_t.T,alpha=0.5)
>>> plt.show()
To use a subset of the features, the weights can be redefined, which may result in a different segmentation result
>>> sub = [('C7','z'),('T10','z'),('CLAV','z')]
>>> s.w = { x: w[x] for x in sub }
>>> segments = s.segment()
>>> print(np.around(segments,decimals=7))
[[ 2. 44. 0.9648465]
[341. 383. 0.9646419]
[203. 244. 0.9644605]
[273. 314. 0.9640178]
[ 72. 113. 0.9632458]
[139. 180. 0.9624551]]
>>> plt_t = s.t_masked #get a NaN masked array of the target data
>>> # plot masked target
>>> plt.figure(figsize=(15,4))
>>> plt.plot(plt_t.T,alpha=0.5)
>>> plt.show()