Timewave Surfer Dudes
by Paco Xander Nathan
First appeared in bOING-bOING magazine, issue #10Software launching on my DOS system emits its bold meme"Timewave Zero version 4.07. Copyright 1989, 1991 Lux Natura. A precision instrument for exploring the theory of time as a fractal wave derived from the King Wen Sequence of I Ching Hexagrams. Based on extraterrestrial communications to Terence McKenna. Software developed by Peter Meyer. Published by Dolphin Software. Please press a key to begin..."
As a kid I attempted to escape from a devout religious upbringing by listening to the radio. I'd listen to just about anything for shelter, especially the weird or progressive. Regardless of how faded or what level of static, I'd stretch the tendrils of my auditory cortex across Etheric Maze to any haven, elsewhere or elsewhen, that allowed people to think for themselves. So much for xtian mind control tech. These days I still tolerate immense radio static, straining to catch that ephemeral whiff of, say, an ionized King Missile track... No bother, tis a creative pursuit to fill in the riffs.
Lately I've noticed how this annoys my friends. Given the tiniest crackle, some will scramble impulsively, twisting the dial to find comfort in gigawatt playlist sleaze, anything to avoid the fear of Noise. A parallel, predicted by the Eight Circuit model, can be found in common reactions to a really nice, witty guy named Terence McKenna. Try it: goto a local New Age bookstore, rent McKenna tapes, pop 'em in the deck. Most likely a couple of your friends will bend over backwards to kill your stereo, invent new forms of logic to reason you out of listening, thus confirming Leary's prediction that Circuit N types will instinctively fear Circuit N+1 parlance. "Go listen to something proven and safe for us couch potatoes; this dangerous stuff might prompt you to think creatively."
Because it does, throughout hours of apparently boundless rap, rant and rhyme presented in the brilliant shrill cackle of a modern Celtic bard/visionary. And, to me, McKenna makes his most incisive cultural point in the middle of one rant with the crying of I Ching Hexagram #49: "The magician is the one who makes the calendar."
To dominate, a new religion always appropriates calendrical events: Yule becomes Xmas, etc. Think about it, who determined the time scale of your life: some pontiff, Ike Newton, Julius Caesar, or you? Who decided that you'd celebrate each of your birthdays during the same season? Who fixed legal systems onto the varying cycles of sun or moon? Anybody who's ever tripped can vouch that Time isn't much of a scalar, bound by precise tickings within Swiss factory spawn. Time spirals, wrinkles, bends, or to paraphrase Edgar Cayce "flows like a river... with eddies and backcurrents." Cut to the chase, this is the room with the Wolfmother Wallpaper. Welcome to Time Hacking.
As Terence sez: "Newton's conception of time is that of pure duration, a measure without structure; Timewave Zero presents time as a fractal." The skinny is that TMcK had been diving into calendrics, researching across Time and Gaia, pondering alternative theories. Then he went South to nibble on his own preferred version of Rainforest Crunch with some Amazon yage heads. Bingo. Cut deep enough into your psyche with indole alkaloids and you'll end up meeting some Other Dudes. Okay, okay, you don't even need drugs, just try systematic lucid dreaming or meditation: we're not alone. Anywhere or anywhen else you go, if it's deep enough, therein lies an Experience that our evolutionary level of consciousness just can't quite grok. Symbolize 'em as aliens, pixies, gopod or Elvis, the point is we all have a lot to learn that cannot be put into words.
So Terence learned a bit about a certain mathematical function, later found to be a fractal, but hey this was back in 1971 before fractals had even become trendy. He started playing with numerical sequences in the oldest section of I Ching, a numerical system of 64 hexagrams which encompasses most of the astronomical cycles observable to the naked eye, i.e. state-of-the-art Chinese tech 3000 years ago for those bicameral enthusiasts in the audience. From this he arranged a table to generate a function, which math buddies at Berkeley ID'ed as a really trippy fractal... Timewave Zero.
TWZ, as the docs state, "correlates history with the ebb and flow of novelty, which is intrinsic to the structure of the universe." The fractal zig-zags through advances and declines, extropy and habituation, leading to a zero point at 21 Dec 2012. This is a singularity, which corresponds with the end-of-the-line for the Mayan calendar as well. Hmmm... McKenna's work charts Time as the ebb and flow of Novelty and Habit. His friend Rupert Sheldrake cites periods of habituation as morphogenic, i.e. developing form. Their friend Ralph Abraham describes the zero date as a chaotic strange attractor leading to some event or non-event. Maybe 2012 isn't Armageddon, but rather a launching point for an ultra-chaotic suprahistory. Okay, so just how many shrooms did Arthur Clarke ingest while writing "Childhood's End" and Whom did he meet?
Programmer-au-poil Peter Meyer has done an exquisite job of presenting TWZ on a common denominator PC platform - DOS 2.10 or later w/o even any graphics adaptor card required. Peter's implementation of TWZ provides a solid, intuitive framework for exploring the fractal, from any target date or timespan. We sat around an open fire in my backyard one moonful night, sipping a nice Cabernet and time traveling...
"Look at this huge drop into novelty," Peter noted, "in February to April 1996this is the steepest drop in the wave in the 1990s. It's the fourteenth lower trigrammatic resonance in the 67-year cycle of a another steep drop occurring in early 1525. That was when the German Peasants Rebellion was occurring, an event which touched off 150 years of religious wars.
"In the second half of the 20th Century the wave peaks on February 12, 1968, then begins a long descent into novelty which bottoms out on February 14, 1992. From then to the zero date of December 21, 2012, there are many ups and downs, indicating an exciting run up to the end of history and a leap into a mode of being whose nature we can only now just begin to glimpse."
Happy landings to you! Zooming in, the fractal looks markedly similarthe late 60's launched our most recent extropy fest; the early 1900's led a rough ride into post-WWII "bliss". Zooming out, we catch a massive slide around 14,000 BCE at the time of the agricultural revolution and another back around 32,000 BCE near the beginning of Homo sapiens' thriving and language.
Peter Meyer has several other related titles available through Dolphin Software: C function libraries, encryption software, as well as Mayan Calendrics, which is related to Timewave Zero. "The Maya calendar system is well-understood," sez Peter... "The problem is that there is no conclusive evidence as to which dates in the Western calendar correspond to dates in the Maya calendar that are found on the stelae and in the codices." The number system for the Maya calendar is base 20, and some dedicated scholars have suggested viable correspondences.
Peter's software provides a wonderful framework for exploring various hypotheses of the Maya calendar, for converting between Western and Mayan dates. By the way, if someone had a sequence of numbers they really wanted to protect, like say a private key for encryption, these kinds of tools could let hir bury a secret in Time.
I sit here typing on <IP_ADDRESS>.6 in the Tikal system using correlation number 584,283, also called 1 Cimi 9 Yax, which PC anthropologists would call 13 Oct 92 CE, also known as 18th day of the Gort lunation by Celtic standards, and agreed by most modern astronomers to be Julian day number 2,448,909. Samhain time. In a couple weeks, by the first week of November 1992, our latest round of descent into Novelty will have subsided, just around the time of the US presidential election
In conjunction with Time Hacking, think of Terence viz other modern shamans of the West. Aldous Huxley knew psychedelics, but exhorted us to keep the treasures indoled, hidden among elite intelligentsiathe first step in building a Hermetic "egregor", aka meme factory. His friend Leri took the party out to the masses, thankfullythe second Hermetic step into proselytizing Egregorville, which led to revolution and backlash.
In a time when the Just Say No crowd has monopolised the airwaves, TMcK presents a very complex story, admonishing hardcore heads to chase after botanical arcana instead of better living through chemistry.  It's a shame that good hallucinogens are so tough to find in these drug war days (wink). Why, you almost have to crawl through jungles just to get high anymore (snicker). In fact, soon the authorities will have wiped out rainforests and with them any hope of a psychedelic revolution (open belly laugh).
Static rumbles the Etherwaves, but a message xmits clear enough for those not afraid to stretch their heads. To quote the closing of Tom Robbins' time hacking treatise: "The temple door is open, the room waits for you to enter."


@dependabot rebase
mentioned
by Dependabot at 2021-09-09 01:06:37.head_ref_force_pushed
by None at 2021-09-09 01:07:06.referenced
by None at 2021-09-09 16:40:37.merged
by None at 2021-09-09 16:40:37.closed
by None at 2021-09-09 16:40:37.head_ref_deleted
by None at 2021-09-09 16:40:42.Superseded by #726.
closed
by None at 2021-09-09 16:41:16.head_ref_deleted
by None at 2021-09-09 16:41:21.referenced
by None at 2021-09-09 16:55:18.merged
by None at 2021-09-09 16:55:18.closed
by None at 2021-09-09 16:55:19.head_ref_deleted
by None at 2021-09-09 16:55:19.@dependabot rebase
labeled
by None at 2021-09-09 16:41:15.labeled
by None at 2021-09-09 16:41:15.mentioned
by Dependabot at 2021-09-09 17:05:45.head_ref_force_pushed
by None at 2021-09-09 17:06:36.referenced
by None at 2021-09-09 17:11:37.merged
by None at 2021-09-09 17:11:37.closed
by None at 2021-09-09 17:11:38.head_ref_deleted
by None at 2021-09-09 17:11:38.@dependabot rebase
Superseded by #728.
mentioned
by Dependabot at 2021-09-09 17:11:58.closed
by None at 2021-09-09 17:13:11.head_ref_deleted
by None at 2021-09-09 17:13:12.labeled
by None at 2021-09-09 17:13:10.labeled
by None at 2021-09-09 17:13:10.referenced
by None at 2021-09-09 17:26:17.merged
by None at 2021-09-09 17:26:17.closed
by None at 2021-09-09 17:26:17.head_ref_deleted
by None at 2021-09-09 17:26:18.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 17:26:39.head_ref_force_pushed
by None at 2021-09-09 17:27:16.referenced
by None at 2021-09-09 18:48:20.merged
by None at 2021-09-09 18:48:20.closed
by None at 2021-09-09 18:48:20.head_ref_deleted
by None at 2021-09-09 18:48:22.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 18:49:33.head_ref_force_pushed
by None at 2021-09-09 18:50:00.referenced
by None at 2021-09-09 18:54:21.merged
by None at 2021-09-09 18:54:21.closed
by None at 2021-09-09 18:54:21.head_ref_deleted
by None at 2021-09-09 18:54:21.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 18:54:47.head_ref_force_pushed
by None at 2021-09-09 18:55:15.referenced
by None at 2021-09-09 19:25:52.merged
by None at 2021-09-09 19:25:52.closed
by None at 2021-09-09 19:25:52.head_ref_deleted
by None at 2021-09-09 19:25:52.head_ref_force_pushed
by None at 2021-09-09 17:14:48.referenced
by None at 2021-09-09 19:26:27.merged
by None at 2021-09-09 19:26:27.closed
by None at 2021-09-09 19:26:28.head_ref_deleted
by None at 2021-09-09 19:26:28.head_ref_force_pushed
by None at 2021-09-09 17:27:30.head_ref_force_pushed
by None at 2021-09-09 18:55:19.referenced
by None at 2021-09-09 19:40:13.merged
by None at 2021-09-09 19:40:13.closed
by None at 2021-09-09 19:40:14.head_ref_deleted
by None at 2021-09-09 19:40:14.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 19:26:41.head_ref_force_pushed
by None at 2021-09-09 19:27:18.referenced
by None at 2021-09-09 19:40:36.merged
by None at 2021-09-09 19:40:36.closed
by None at 2021-09-09 19:40:37.head_ref_deleted
by None at 2021-09-09 19:40:37.@dependabot rebase
Superseded by #729.
mentioned
by Dependabot at 2021-09-09 19:41:09.closed
by None at 2021-09-09 19:41:48.head_ref_deleted
by None at 2021-09-09 19:41:49.labeled
by None at 2021-09-09 19:41:47.labeled
by None at 2021-09-09 19:41:47.referenced
by None at 2021-09-09 19:57:45.merged
by None at 2021-09-09 19:57:45.closed
by None at 2021-09-09 19:57:45.head_ref_deleted
by None at 2021-09-09 19:57:45.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 19:40:52.head_ref_force_pushed
by None at 2021-09-09 19:41:26.referenced
by None at 2021-09-09 19:58:07.merged
by None at 2021-09-09 19:58:07.closed
by None at 2021-09-09 19:58:07.head_ref_deleted
by None at 2021-09-09 19:58:08.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 19:41:27.head_ref_force_pushed
by None at 2021-09-09 19:42:00.referenced
by None at 2021-09-09 19:58:31.merged
by None at 2021-09-09 19:58:31.closed
by None at 2021-09-09 19:58:31.head_ref_deleted
by None at 2021-09-09 19:58:31.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 19:42:12.head_ref_force_pushed
by None at 2021-09-09 19:42:43.referenced
by None at 2021-09-09 19:59:22.merged
by None at 2021-09-09 19:59:22.closed
by None at 2021-09-09 19:59:22.head_ref_deleted
by None at 2021-09-09 19:59:22.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 19:41:50.head_ref_force_pushed
by None at 2021-09-09 19:42:17.head_ref_force_pushed
by None at 2021-09-09 19:58:48.head_ref_force_pushed
by None at 2021-09-09 19:59:13.referenced
by None at 2021-09-09 20:19:19.merged
by None at 2021-09-09 20:19:19.closed
by None at 2021-09-09 20:19:19.head_ref_deleted
by None at 2021-09-09 20:19:19.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 19:59:51.head_ref_force_pushed
by None at 2021-09-09 20:00:19.referenced
by None at 2021-09-09 20:19:42.merged
by None at 2021-09-09 20:19:42.closed
by None at 2021-09-09 20:19:42.head_ref_deleted
by None at 2021-09-09 20:19:42.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 20:00:04.head_ref_force_pushed
by None at 2021-09-09 20:00:38.referenced
by None at 2021-09-09 20:20:02.merged
by None at 2021-09-09 20:20:02.closed
by None at 2021-09-09 20:20:02.head_ref_deleted
by None at 2021-09-09 20:20:02.head_ref_force_pushed
by None at 2021-09-09 19:58:39.head_ref_force_pushed
by None at 2021-09-09 19:59:12.referenced
by None at 2021-09-09 20:20:21.merged
by None at 2021-09-09 20:20:21.closed
by None at 2021-09-09 20:20:21.head_ref_deleted
by None at 2021-09-09 20:20:22.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 20:00:27.head_ref_force_pushed
by None at 2021-09-09 20:00:56.referenced
by None at 2021-09-09 20:20:46.merged
by None at 2021-09-09 20:20:46.closed
by None at 2021-09-09 20:20:47.head_ref_deleted
by None at 2021-09-09 20:20:47.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 20:00:43.head_ref_force_pushed
by None at 2021-09-09 20:01:15.referenced
by None at 2021-09-09 20:21:12.merged
by None at 2021-09-09 20:21:12.closed
by None at 2021-09-09 20:21:12.head_ref_deleted
by None at 2021-09-09 20:21:12.head_ref_force_pushed
by None at 2021-09-09 19:27:03.head_ref_force_pushed
by None at 2021-09-09 19:27:49.head_ref_force_pushed
by None at 2021-09-09 19:58:59.head_ref_force_pushed
by None at 2021-09-09 19:59:52.head_ref_force_pushed
by None at 2021-09-09 20:00:47.referenced
by None at 2021-09-09 20:21:48.merged
by None at 2021-09-09 20:21:48.closed
by None at 2021-09-09 20:21:48.head_ref_deleted
by None at 2021-09-09 20:21:49.head_ref_force_pushed
by None at 2021-09-09 20:22:46.labeled
by James R. Griffin III at 2021-09-09 16:54:28.referenced
by None at 2021-09-09 12:27:09.merged
by None at 2021-09-09 12:27:09.closed
by None at 2021-09-09 12:27:09.head_ref_deleted
by None at 2021-09-09 12:27:17.referenced
by None at 2021-09-09 15:35:55.merged
by None at 2021-09-09 15:35:55.closed
by None at 2021-09-09 15:35:56.head_ref_deleted
by None at 2021-09-09 15:35:56.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 14:33:58.head_ref_force_pushed
by None at 2021-09-09 14:34:24.deployed
by None at 2021-09-09 15:48:07.referenced
by None at 2021-09-09 15:49:08.merged
by None at 2021-09-09 15:49:08.closed
by None at 2021-09-09 15:49:08.head_ref_deleted
by None at 2021-09-09 15:49:09.@dependabot rebase
mentioned
by Dependabot at 2021-09-09 15:49:36.head_ref_force_pushed
by None at 2021-09-09 15:50:05.deployed
by None at 2021-09-09 15:54:38.referenced
by None at 2021-09-09 15:55:38.merged
by None at 2021-09-09 15:55:38.closed
by None at 2021-09-09 15:55:38.head_ref_deleted
by None at 2021-09-09 15:55:38.@dependabot rebase
@dependabot rebase
mentioned
by Dependabot at 2021-09-09 01:07:25.head_ref_force_pushed
by None at 2021-09-09 01:07:57.mentioned
by Dependabot at 2021-09-09 15:55:58.head_ref_force_pushed
by None at 2021-09-09 15:56:26.deployed
by None at 2021-09-09 15:57:50.referenced
by None at 2021-09-09 15:59:23.merged
by None at 2021-09-09 15:59:23.closed
by None at 2021-09-09 15:59:23.head_ref_deleted
by None at 2021-09-09 15:59:24.@dependabot rebase
@dependabot rebase
mentioned
by Dependabot at 2021-09-09 01:07:12.head_ref_force_pushed
by None at 2021-09-09 01:07:37.mentioned
by Dependabot at 2021-09-09 15:57:05.head_ref_force_pushed
by None at 2021-09-09 15:57:31.deployed
by None at 2021-09-09 15:59:59.referenced
by None at 2021-09-09 16:01:01.merged
by None at 2021-09-09 16:01:01.closed
by None at 2021-09-09 16:01:01.head_ref_deleted
by None at 2021-09-09 16:01:02.@dependabot rebase
head_ref_force_pushed
by None at 2021-09-09 15:56:27.mentioned
by Dependabot at 2021-09-09 16:01:30.head_ref_force_pushed
by None at 2021-09-09 16:01:57.deployed
by None at 2021-09-09 16:03:06.referenced
by None at 2021-09-09 16:04:47.merged
by None at 2021-09-09 16:04:47.closed
by None at 2021-09-09 16:04:47.head_ref_deleted
by None at 2021-09-09 16:04:48.referenced
by None at 2021-09-09 14:23:28.merged
by None at 2021-09-09 14:23:28.closed
by None at 2021-09-09 14:23:28.head_ref_deleted
by None at 2021-09-09 14:23:29.renamed
by None at 2021-09-09 14:28:02.referenced
by None at 2021-09-09 15:35:18.merged
by None at 2021-09-09 15:35:18.closed
by None at 2021-09-09 15:35:18.head_ref_deleted
by None at 2021-09-09 15:35:19.Reran pgload again in qa, took less than a minute. (I did not drop the database first; it doesn't seem like it will matter.)
Total import time ✓ 300668 42.1 MB 4.696s
real 0m7.652s
user 0m5.146s
sys 0m0.582s
Cleared the Solr index and then did a full reindex, took 7.5 minutes ``` $ time ./manage.py index 100% (14557 of 14557) |######################################################################| Elapsed Time: 0:07:28 Time: 0:07:28 Indexed 12,110 items
real 7m35.288s user 2m50.188s sys 0m5.460s ```
assigned
by Francis Kayiwa at 2021-09-09 15:41:29.assigned
by Rebecca Sutton Koeser at 2021-09-09 15:41:29.deployed
by None at 2021-09-09 11:35:38.head_ref_force_pushed
by None at 2021-09-09 11:45:07.referenced
by None at 2021-09-09 12:27:05.merged
by None at 2021-09-09 12:27:05.closed
by None at 2021-09-09 12:27:05.head_ref_deleted
by None at 2021-09-09 12:27:06.referenced
by Trey Pendragon at 2021-09-09 19:49:18.merged
by Trey Pendragon at 2021-09-09 19:49:18.closed
by Trey Pendragon at 2021-09-09 19:49:18.head_ref_deleted
by Trey Pendragon at 2021-09-09 19:49:19.Working now.
closed
by Eliot Jordan at 2021-09-09 14:22:41.assigned
by None at 2021-09-09 17:12:31.Resolved: Confluence is back up in d8061c7
.
labeled
by Francis Kayiwa at 2021-09-09 02:18:19.labeled
by Francis Kayiwa at 2021-09-09 02:18:19.locked
by Francis Kayiwa at 2021-09-09 02:18:20.closed
by Francis Kayiwa at 2021-09-09 02:40:42.


{% extends 'training_template.html' %} {% load lesson_extras %} {% block training_content %}
Experience dives can take place at any point, but you need to get them signed off by an instructor.
{% show_lessons profile.training_for 'XP' profile %}You're not currently undertaking training.


{% extends "freepbx/freepbx.html" %} {% block content2 %}
Cannot connect to Asterisk Manager with {{ mgruser }}
Asterisk may not be running.


As you research the best restaurants you want to vist when traveling in the United States, simply add them to your vault by selecting the location and the restaurant name. You can then add a date that works best with your itinerary.
Changed your mind about the date or restaurant?
Click on the date to change it and click "Add Date" to save.
Click on to remove the restaurant from the vault.


Key subjects to understand:
- Radio Buttons
- Use JavaScript to change the class of an element
- Use JavaScript to swap one CSS file for another
- Extensions and Utilities
- Favicons
- Rotate Image
The most relevant assignments or pages:
Key subjects to understand:
The most relevant assignments or pages:


Burp:
If you want to analyze cookies from an auth request, capture the login request and send to sequencer
Try = for sql statement injection. If you know a key exists (like admin for username) try to make something close enough to admin to be recognized as admin
admin (with spaces)
admin=
cdmin
bdmin
etc
Another thing to try is bit flipping in Burp with the auth cookie
Say you register cdmin. If you can manage to 'flip a bit' maybe the application can recognize you as admin. "close enough" right?
Burp sniper > Payload: Bit Flipper
Encryption and Padding....Try oracle padding issues
Allows brute forcing one byte at a time: padbuster.pl
8 or 16 for BlockSize
GDB disassemble binary to find out what's going on, what calls are being made
In this case, it is cat /etc/shadow
cat is not bad itself, but there is not a full path here...can you take over the path to cat?
/usr/local/sbin:/usr/local/bin:/usr/sbin:usr/bin
how about editing your path?


| Modifier and Type | Method and Description |
|---|---|
protected NeuralNetConfiguration.Builder |
BaseNetworkSpace.randomGlobalConf(double[] values) |
| Modifier and Type | Field and Description |
|---|---|
protected NeuralNetConfiguration.Builder |
ComputationGraphConfiguration.GraphBuilder.globalConfiguration |
| Modifier and Type | Method and Description |
|---|---|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.activation(Activation activation)
Activation function / neuron non-linearity
Note: values set by this method will be applied to all applicable layers in the network, unless a different value is explicitly set on a given layer. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.activation(IActivation activationFunction)
Activation function / neuron non-linearity
Note: values set by this method will be applied to all applicable layers in the network, unless a different value is explicitly set on a given layer. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.biasInit(double biasInit)
Constant for bias initialization.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.biasUpdater(IUpdater updater)
Gradient updater configuration, for the biases only.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.cacheMode(@NonNull CacheMode cacheMode)
This method defines how/if preOutput cache is handled:
NONE: cache disabled (default value)
HOST: Host memory will be used
DEVICE: GPU memory will be used (on CPU backends effect will be the same as for HOST)
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.clone() |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.constrainAllParameters(LayerConstraint... constraints)
Set constraints to be applied to all layers.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.constrainBias(LayerConstraint... constraints)
Set constraints to be applied to all layers.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.constrainWeights(LayerConstraint... constraints)
Set constraints to be applied to all layers.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.convolutionMode(ConvolutionMode convolutionMode)
Sets the convolution mode for convolutional layers, which impacts padding and output sizes.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.cudnnAlgoMode(ConvolutionLayer.AlgoMode cudnnAlgoMode)
Sets the cuDNN algo mode for convolutional layers, which impacts performance and memory usage of cuDNN.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.dataType(@NonNull DataType dataType)
Set the DataType for the network parameters and activations.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.dist(Distribution dist)
Deprecated.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.dropOut(double inputRetainProbability)
Dropout probability.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.dropOut(IDropout dropout)
Set the dropout for all layers in this network
Note: values set by this method will be applied to all applicable layers in the network, unless a different value is explicitly set on a given layer. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.gradientNormalization(GradientNormalization gradientNormalization)
Gradient normalization strategy.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.gradientNormalizationThreshold(double threshold)
Threshold for gradient normalization, only used for GradientNormalization.ClipL2PerLayer,
GradientNormalization.ClipL2PerParamType, and GradientNormalization.ClipElementWiseAbsoluteValue
Not used otherwise. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.inferenceWorkspaceMode(@NonNull WorkspaceMode workspaceMode)
This method defines Workspace mode being used during inference:
NONE: workspace won't be used ENABLED: workspaces will be used for inference (reduced memory and better performance) |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.l1(double l1)
L1 regularization coefficient for the weights (excluding biases).
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.l1Bias(double l1Bias)
L1 regularization coefficient for the bias.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.l2(double l2)
L2 regularization coefficient for the weights (excluding biases).
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.l2Bias(double l2Bias)
L2 regularization coefficient for the bias.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.layer(Layer layer)
Layer class.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.maxNumLineSearchIterations(int maxNumLineSearchIterations)
Maximum number of line search iterations.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.miniBatch(boolean miniBatch)
Process input as minibatch vs full dataset.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.minimize(boolean minimize)
Objective function to minimize or maximize cost function
Default set to minimize true.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.optimizationAlgo(OptimizationAlgorithm optimizationAlgo)
Optimization algorithm to use.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.regularization(List<Regularization> regularization)
Set the regularization for the parameters (excluding biases) - for example
WeightDecay Note: values set by this method will be applied to all applicable layers in the network, unless a different value is explicitly set on a given layer. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.regularizationBias(List<Regularization> regularizationBias)
Set the regularization for the biases only - for example
WeightDecay Note: values set by this method will be applied to all applicable layers in the network, unless a different value is explicitly set on a given layer. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.seed(long seed)
Random number generator seed.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.stepFunction(StepFunction stepFunction)
Deprecated.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.trainingWorkspaceMode(@NonNull WorkspaceMode workspaceMode)
This method defines Workspace mode being used during training:
NONE: workspace won't be used ENABLED: workspaces will be used for training (reduced memory and better performance) |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.updater(IUpdater updater)
Gradient updater configuration.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.updater(Updater updater)
Deprecated.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightDecay(double coefficient)
Add weight decay regularization for the network parameters (excluding biases).
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightDecay(double coefficient,
boolean applyLR)
Add weight decay regularization for the network parameters (excluding biases).
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightDecayBias(double coefficient)
Weight decay for the biases only - see
weightDecay(double) for more details. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightDecayBias(double coefficient,
boolean applyLR)
Weight decay for the biases only - see
weightDecay(double) for more detailsNote: values set by this method will be applied to all applicable layers in the network, unless a different value is explicitly set on a given layer. |
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightInit(Distribution distribution)
Set weight initialization scheme to random sampling via the specified distribution.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightInit(IWeightInit weightInit)
Weight initialization scheme to use, for initial weight values
Note: values set by this method will be applied to all applicable layers in the network, unless a different
value is explicitly set on a given layer.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightInit(WeightInit weightInit)
Weight initialization scheme to use, for initial weight values
Note: values set by this method will be applied to all applicable layers in the network, unless a different
value is explicitly set on a given layer.
|
NeuralNetConfiguration.Builder |
NeuralNetConfiguration.Builder.weightNoise(IWeightNoise weightNoise)
Set the weight noise (such as
DropConnect and
WeightNoise ) for the layers in this network. |
| Modifier and Type | Method and Description |
|---|---|
Map<Integer,NeuralNetConfiguration.Builder> |
NeuralNetConfiguration.ListBuilder.getLayerwise() |
| Constructor and Description |
|---|
GraphBuilder(ComputationGraphConfiguration newConf,
NeuralNetConfiguration.Builder globalConfiguration) |
GraphBuilder(NeuralNetConfiguration.Builder globalConfiguration) |
ListBuilder(NeuralNetConfiguration.Builder globalConfig) |
ListBuilder(NeuralNetConfiguration.Builder globalConfig,
Map<Integer,NeuralNetConfiguration.Builder> layerMap) |
| Constructor and Description |
|---|
ListBuilder(NeuralNetConfiguration.Builder globalConfig,
Map<Integer,NeuralNetConfiguration.Builder> layerMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
LocallyConnected1D.applyGlobalConfigToLayer(NeuralNetConfiguration.Builder globalConfig) |
void |
LocallyConnected2D.applyGlobalConfigToLayer(NeuralNetConfiguration.Builder globalConfig) |
void |
RecurrentAttentionLayer.applyGlobalConfigToLayer(NeuralNetConfiguration.Builder globalConfig) |
| Modifier and Type | Method and Description |
|---|---|
void |
AbstractSameDiffLayer.applyGlobalConfig(NeuralNetConfiguration.Builder b) |
void |
SameDiffVertex.applyGlobalConfig(NeuralNetConfiguration.Builder b) |
void |
AbstractSameDiffLayer.applyGlobalConfigToLayer(NeuralNetConfiguration.Builder globalConfig) |
void |
SameDiffVertex.applyGlobalConfigToLayer(NeuralNetConfiguration.Builder globalConfig) |
| Modifier and Type | Method and Description |
|---|---|
NeuralNetConfiguration.Builder |
FineTuneConfiguration.appliedNeuralNetConfigurationBuilder() |
Copyright © 2020. All rights reserved.


BJP”s Sandip Joshi wins Mayor’s post by 78 votes
by Nagpur Today, Nagpur NewsNagpur: Beating Congress and Bahujan Samaj Party (BSP) candidates with significant margin of 78 votes, Bhartiya Janta Party (BJP) leader and four time corporator Sandip Joshi emerged as Nagpur Municipal Corporation (NMC) new mayor with 104 votes.
Congress candidate Harshala Sable secured 26 votes while BSP candidate Mohammad Ibrahim Tohfiq managed to rope in 10 votes.
Joshi later sought blessings of Lord Ganesha, for city’s over all development and prosperity.


[gecode-users] Access Violation when temporary BoolVarAgs looses scope.
Uwe Nowak
uwe.nowak at itwm.fraunhofer.de
Thu Jun 27 12:57:22 CEST 2013
Hello!
I am getting an access violation creating a custom Space and boiled it down
to the following minimal example.
When the tmp array is destroyed (as it gets out of scope) I get an access
violation.
Visual Studio 10, 32bit (on a 64 bit machine)
Did I missunderstand the concept of temporary variables? If all variables
are instance variables, everything works fine.
Interesting enough, it also works if tmp has a length less or equal to 16.
class DummySpace : public Gecode::Space {
public:
DummySpace(bool share, DummySpace& other) : Space(share, other) { }
DummySpace() {
{
Gecode::BoolVarArgs tmp(*this, 17, 0, 1);
for(int j = 0; j<tmp.size(); ++j) rel(*this, tmp[j] == 1);
} //tmp gets out of scope
std::cout << "Never executed!" << std::endl;
}
DummySpace* copy(bool share) {
return new DummySpace(share, *this);
}
};
Thank you for your support,
Uwe
More information about the users
mailing list


| Package | Description |
|---|---|
| quarks.analytics.math3.json |
JSON analytics using Apache Commons Math.
|
| quarks.analytics.math3.stat |
Statistical algorithms using Apache Commons Math.
|
| quarks.analytics.sensors |
Analytics focused on handling sensor data.
|
| quarks.connectors.file |
File stream connector.
|
| quarks.connectors.http |
HTTP stream connector.
|
| quarks.connectors.iot |
Quarks device connector API to a message hub.
|
| quarks.connectors.iotf |
IBM Watson IoT Platform stream connector.
|
| quarks.connectors.jdbc |
JDBC based database stream connector.
|
| quarks.connectors.kafka |
Apache Kafka enterprise messing hub stream connector.
|
| quarks.connectors.mqtt |
MQTT (lightweight messaging protocol for small sensors and mobile devices) stream connector.
|
| quarks.connectors.mqtt.iot |
An MQTT based IotDevice connector.
|
| quarks.connectors.pubsub.service |
Publish subscribe service.
|
| quarks.connectors.serial |
Serial port connector API.
|
| quarks.connectors.wsclient.javax.websocket |
WebSocket Client Connector for sending and receiving messages to a WebSocket Server.
|
| quarks.connectors.wsclient.javax.websocket.runtime | |
| quarks.execution.services |
Execution services.
|
| quarks.function |
Functional interfaces for lambda expressions.
|
| quarks.graph |
Low-level graph building API.
|
| quarks.metrics.oplets | |
| quarks.oplet |
Oplets API.
|
| quarks.oplet.core |
Core primitive oplets.
|
| quarks.oplet.functional |
Oplets that process tuples using functions.
|
| quarks.oplet.plumbing |
Oplets that control the flow of tuples.
|
| quarks.oplet.window |
Oplets using windows.
|
| quarks.providers.direct |
Direct execution of a streaming topology.
|
| quarks.providers.iot |
Iot provider that allows multiple applications to
share an
IotDevice . |
| quarks.runtime.appservice | |
| quarks.runtime.etiao |
A runtime for executing a Quarks streaming topology, designed as an embeddable library
so that it can be executed in a simple Java application.
|
| quarks.runtime.jobregistry | |
| quarks.samples.apps |
Support for some more complex Quarks application samples.
|
| quarks.samples.connectors |
General support for connector samples.
|
| quarks.samples.utils.sensor | |
| quarks.topology |
Functional api to build a streaming topology.
|
| quarks.topology.json |
Utilities for use of JSON in a streaming topology.
|
| quarks.topology.plumbing |
Plumbing for a streaming topology.
|
| quarks.topology.services |
Services for topologies.
|
| quarks.window |
Window API.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Supplier
Function that supplies a value.
|
| ToDoubleFunction
Function that returns a double primitive.
|
| Class and Description |
|---|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Function
Single argument function.
|
| Predicate
Predicate function.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Function
Single argument function.
|
| Predicate
Predicate function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Function
Single argument function.
|
| UnaryOperator
Function that returns the same type as its argument.
|
| Class and Description |
|---|
| Function
Single argument function.
|
| UnaryOperator
Function that returns the same type as its argument.
|
| Class and Description |
|---|
| Consumer
Function that consumes a value.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Function
Single argument function.
|
| UnaryOperator
Function that returns the same type as its argument.
|
| Class and Description |
|---|
| Consumer
Function that consumes a value.
|
| Class and Description |
|---|
| Consumer
Function that consumes a value.
|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Consumer
Function that consumes a value.
|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| BiConsumer
Consumer function that takes two arguments.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Consumer
Function that consumes a value.
|
| Function
Single argument function.
|
| Predicate
Predicate function.
|
| Supplier
Function that supplies a value.
|
| UnaryOperator
Function that returns the same type as its argument.
|
| Class and Description |
|---|
| Predicate
Predicate function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Consumer
Function that consumes a value.
|
| Class and Description |
|---|
| Consumer
Function that consumes a value.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Consumer
Function that consumes a value.
|
| ToIntFunction
Function that returns a int primitive.
|
| Class and Description |
|---|
| Consumer
Function that consumes a value.
|
| Function
Single argument function.
|
| Predicate
Predicate function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Consumer
Function that consumes a value.
|
| Function
Single argument function.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Consumer
Function that consumes a value.
|
| Class and Description |
|---|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| BiConsumer
Consumer function that takes two arguments.
|
| Function
Single argument function.
|
| Class and Description |
|---|
| BiConsumer
Consumer function that takes two arguments.
|
| Class and Description |
|---|
| BiConsumer
Consumer function that takes two arguments.
|
| Consumer
Function that consumes a value.
|
| Class and Description |
|---|
| BiConsumer
Consumer function that takes two arguments.
|
| BiFunction
Function that takes two arguments and returns a value.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| Supplier
Function that supplies a value.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Consumer
Function that consumes a value.
|
| Function
Single argument function.
|
| Predicate
Predicate function.
|
| Supplier
Function that supplies a value.
|
| ToIntFunction
Function that returns a int primitive.
|
| UnaryOperator
Function that returns the same type as its argument.
|
| Class and Description |
|---|
| Function
Single argument function.
|
| Class and Description |
|---|
| BiFunction
Function that takes two arguments and returns a value.
|
| Function
Single argument function.
|
| Predicate
Predicate function.
|
| ToIntFunction
Function that returns a int primitive.
|
| Class and Description |
|---|
| BiConsumer
Consumer function that takes two arguments.
|
| Class and Description |
|---|
| BiConsumer
Consumer function that takes two arguments.
|
| BiFunction
Function that takes two arguments and returns a value.
|
| Consumer
Function that consumes a value.
|
| Function
Single argument function.
|
| Supplier
Function that supplies a value.
|
Copyright © 2016 The Apache Software Foundation. All Rights Reserved - d6cdfc6-20160517-0028


created: 06/20/00; revised 07/08/02
Recall that binary files are those whose bytes might hold any possible pattern. Binary files store data that has not been translated into character form. Of course, a binary file can store character data mixed in with its other data types. A file that exclusively stores character data is called a text file.
The subclasses of InputStream
are designed for byte-oriented input from any source.
For use, the source will usually be a file on the hard disk.
But other sources of data can also
be connected to a program as an InputStream
.


Introduction
What approach to use?
When dealing with clustered data we have observations that are non-independent and reside within some grouping structure. This could be replicate samples for a specimen in an experiment, children nested within schools, which themselves are nested within districts, we might obtain the same measures at different time points for the same unit of observation, etc.
In such cases standard methods may be applied, just as they can be anywhere, but they would be lacking in some respect. The following demonstrates a number of methods that might be used in these situations, but while some will definitely be better than others, in other cases, it might be a practical or theoretical choice that drives the decision on how to deal with the data. In what follows, I will create a data set for us to use so that we don’t have any questions as to what might be going on, or what nuances we are not privy to that might produce differences in the results.
Preliminaries
Things to note
No attempt is made at providing too much detail on model specifics. It is assumed that if you’re reading this you’re already at least conceptually familiar in some sense with a couple of these models. The primary purpose here is to compare, contrast, and note issues. Sometimes a little more detail is required, but again, the goal is not to teach the methods themselves. See the references for more detail.
In many cases I hide the code but it is still available for viewing, especially in cases where it involves mostly data setup or wrangling, or involves more detailed technique than I am assuming some readers of this doc will understand. I prefer this document to be a more conceptual in nature and tool agnostic. Though it relies on R, the tool used doesn’t matter, and all the models conducted here could be run using other packages.
In describing some of these approaches I suggest that some are more discipline specific or more common in certain areas. This assessment is based on years of consulting across many, many academic disciplines, as well as reading many discipline-specific texts and articles, but this admittedly is not a random sample, so take that info as you wish. I just provide it as a means for the reader to understand why they may not be familiar with such a technique, and where they might find more information or examples.
Terminology
Note that in the following, terms such as ‘clustering’ and ‘cluster’ have nothing to do with unsupervised learning methods such as mixture models. I use the terms ‘cluster’, ‘grouping’ and similar terms as synonyms. As ‘mixed’ models incorporate random effects, I don’t normally distinguish between a random effects model (which could be seen as the general case) and a mixed model, except perhaps when comparing to ‘fixed effects models’. I’m not going to get into it here, but ‘fixed effects’ and ‘fixed-effect models’ are not the same thing1. I will try to be clear.
Color coding:
- emphasis
- package
- function
- object/class
- link
This doc also available in .epub and .pdf (See the icon above), though the doc is automatically converted to those formats, and to be perfectly honest I don’t care what may or may not look good or transfer appropriately.
Blame the economists.↩


You have {{ unread_count|text_if_zero }}
unread mail, and {{ mailbox_count }} in the mailbox. You won't be reminded about
the same unread mail again, so get it over with, perhaps.
Clear Filters
{% endif %}
No Matches.
None of your mail matches any of the filters you've enabled. Clear your filters to view all mail.
{% for mail in mailbox %}
{{ mail.heading }} ~ {{ mail.date|date:"F jS, Y | g:i a e" }}
It's damp, dark, and a little rusty. Might rain today.
It would seem that you have an empty mailbox. Perhaps you've discarded all your mail, or maybe there's
just nothing happening. Might as well wait for a while.


--- layout: post tags: [Dependency Injection, Software Design] date: 2011-12-19 13:04:55 UTC title: "Factory Overload" --- {% include JB/setup %}
Recently I received a question from Kelly Sommers about good ways to refactor away from Factory Overload. Basically, she's working in a code base where there's an explosion of Abstract Factories which seems to be counter-productive. In this post I'll take a look at the example problem and propose a set of alternatives.
An Abstract Factory (and its close relative Product Trader) can serve as a solution to various challenges that come up when writing loosely coupled code (chapter 6 of my book describes the most common scenarios). However, introducing an Abstract Factory may be a leaky abstraction, so don't do it blindly. For example, an Abstract Factory is rarely the best approach to address lifetime management concerns. In other words, the Abstract Factory has to make sense as a pure model element.
That's not the case in the following example.
The question centers around a code base that integrates with a database closely guarded by DBA police. Apparently, every single database access must happen through a set of very fine-grained stored procedures.
For example, to update the first name of a user, a set of stored procedures exist to support this scenario, depending on the context of the current application user:
| User type | Stored procedure | Parameter name |
| Admin | update_admin_firstname | adminFirstName |
| Guest | update_guest_firstname | guestFirstName |
| Regular | update_regular_firstname | regularFirstName |
| Restricted | update_restricted_firstname | restrictedFirstName |
As this table demonstrates, not only is there a stored procedure for each user context, but the parameter name differs as well. However, in this particular case it seems as though there's a pattern to the names.
If this pattern is consistent, I think the easiest way to address these variations would be to algorithmically build the strings from a couple of templates.
However, this is not the route taken by Kelly's team, so I assume that things are more complicated than that; apparently, a templated approach is not viable, so for the rest of this article I'm going to assume that it's necessary to write at least some code to address each case individually.
The current solution that Kelly's team has implemented is to use an Abstract Factory (Product Trader) to translate the user type into an appropriate IUserFirstNameModifier instance. From the consuming code, it looks like this:
var modifier = factory.Create(UserTypes.Admin); modifier.Commit("first");
where the factory variable is an instance of the IUserFirstNameModifierFactory interface. This is certainly loosely coupled, but looks like a leaky abstraction. Why is a factory needed? It seems that its single responsibility is to translate a UserTypes instance (an enum) into an IUserFirstNameModifier. There's a code smell buried here - try to spot it before you read on :)
Kelly herself suggests an alternative involving a concrete Builder which can create instances of a single concrete UserFirstNameModifier with or without an implicit conversion:
// Implicit conversion. UserFirstNameModifier modifier1 = builder.WithUserType(UserTypes.Guest); // Without implicit conversion. var modifier2 = builder .WithUserType(UserTypes.Restricted) .Create();
While this may seem to reduce the number of classes involved, it has several drawbacks:
Both the current implementation and the proposed solution involves passing an enum as a method parameter to a different class. If you've read and memorized Refactoring you should by now have recognized both a code smell and the remedy.
The code smell is Feature Envy and a possible refactoring is to replace the enum with a Strategy. In order to do that, an IUserType interface is introduced:
public interface IUserType { IUserFirstNameModifer CreateUserFirstNameModifier(); }
Usage becomes as simple as this:
var modifier = userType.CreateUserFirstNameModifier();
Obviously, more methods can be added to IUserType to support other update operations, but care should be taken to avoid creating a Header Interface.
While this solution is much more object-oriented, I'm still not quite happy with it, because apparently, the context is a CQRS style architecture. Since an update operation is essentially a Command, then why model the implementation along the lines of a Query? Both Abstract Factory and Factory Method patterns represent Queries, so it seems redundant in this case. It should be possible to apply the Hollywood Principle here.
Why have the user type return an modifier? Why can't it perform the update itself? The IUserType interface should be changed to something like this:
public interface IUserType { void CommitUserFirtName(string firstName); }
This makes it easier for the consumer to commit the user's first name because it can be done directly on the IUserType instance instead of first creating the modifier.
It also makes it much easier to unit test the consumer because there's no longer a mix of Command and Queries within the same method. From Growing Object-Oriented Software we know that Queries should be modeled with Stubs and Commands with Mocks, and if you've ever tried mixing the two you know that it's a sort of interaction that should be minimized.
While I personally like alternative 1b best, it may not be practical in all situations, so it's always valuable to examine other alternatives.
The root cause of the problem is that there's a lot of stored procedures. I want to reiterate that I still think that the absolutely easiest solution would be to generate a SqlCommand from a string template, but given that this article assumes that this isn't possible or desirable, it follows that code must be written for each stored procedure.
Why not simply define an interface for each one? As an example, to update the user's first name in the context of being an ‘Admin' user, this Role Interface can be used:
public interface IUserFirstNameAdminModifier { void Commit(string firstName); }
Similar interfaces can be defined for the other user types, such as IUserFirstNameRestrictedModifier, IUserFirstNameGuestModifier and so on.
This is a very simple solution; it's easy to implement, but risks violating the Reused Abstractions Principle (RAP).
The problem with introducing interfaces like IUserFirstNameAdminModifier, IUserFirstNameRestrictedModifier, IUserFirstNameGuestModifier etc. is that they differ only by name. The Commit method is the same for all these interfaces, so this seems to violate the RAP. It'd be better to merge all these interfaces into a single interface, which is what Kelly's team is currently doing. However, the problem with this is that the type carries no information about the role that the modifier is playing.
Another alternative is to turn the modifier interface into a generic interface like this:
public interface IUserFirstNameModifier<T> where T : IUserType { void Commit(string firstName); }
The IUserType is a Marker Interface, so .NET purists are not going to like this solution, since the .NET Type Design Guidelines recommend against using Marker Interfaces. However, it's impossible to constrain a generic type argument against an attribute, so the party line solution is out of the question.
This solution ensures that consumers can now have dependencies on IUserFirstNameModifier<AdminUserType>, IUserFirstNameModifier<RestrictedUserType>, etc.
However, the need for a marker interface gives off another odeur.
The problem at the heart of alternative 2 is that it attempts to use the type of the interfaces as an indicator of the roles that Services play. It's seems that making the type distinct works against the RAP, but when the RAP is applied, the type becomes ambiguous.
However, as Ted Neward points out in his excellent series on Multiparadigmatic .NET, the type is only one axis of variability among many. Perhaps, in this case, it may be much easier to use the name of the dependency to communicate its role instead of the type.
Given a single, ambiguous IUserFirstNameModifier interface (just as in the original problem statement), a consumer can distinguish between the various roles of modifiers by their names:
public partial class SomeConsumer { private readonly IUserFirstNameModifier adminModifier; private readonly IUserFirstNameModifier guestModifier; public SomeConsumer( IUserFirstNameModifier adminModifier, IUserFirstNameModifier guestModifier) { this.adminModifier = adminModifier; this.guestModifier = guestModifier; } public void DoSomething() { if (this.UseAdmin) this.adminModifier.Commit("first"); else this.guestModifier.Commit("first"); } }
Now it's entirely up to the Composition Root to compose SomeConsumer with the correct modifiers, and while this can be done manually, it's an excellent case for a DI Container and a bit of Convention over Configuration.
I'm sure that if I'd spent more time analyzing the problem I could have come up with more alternatives, but this post is becoming long enough already.
Of the alternatives I've suggested here, I prefer 1b or 3, depending on the exact requirements.
Comments
Personally I prefer 1b over 3. The if-statement in option 3 looks a bit suspicious to me as one day it might give rise to some maintenance if more user types have to be supported by the SomeConsumer type, so I am afraid it may violate the open/closed principle. Option 1b looks more straight forward to me.
sorry, way OT
I'm trying to implement a visitor pattern over a list of visitees object, constructed with a factory.
A visitee requires some external services, so, it might be resonable to have them injected already by IOC in the _factory (VisiteeFactory). isLast is an example of other contextual information, outside of dto, but required to create other visitee types.
Given that is a bounded context, how can I improve this design?
Pseudocode follows:
IVisiteeFactory
{
VisiteeAdapterBase Create(Dto dto, bool isLast);
}
VisiteeFactory : IVisiteeFactory
{
ctor VisiteeFactory(IExternalService service)
public VisiteeAdapterBase Create(Dto dto, bool isLast)
{
// lot of switches and ifs to determine the type of VisiteeAdapterBase
if (isLast && dto.Type == "1") {
return new Type1VisiteeAdapter(... dto props...);
}
}
}
ConsumerCtor(VisiteeFactory factory, List<Dto> dtoList)
{
// guards
_factory = factory;
_dtoList = dtoList;
}
ConsumerDoStuff
{
foreach (var dto in _dtoList) {
// isLast is additional logic, outside of dto
var visiteeAdapter = _factory.Create(dto, isLast);
visiteeAdapter.Accept(visitor);
}
}
The whole premise of the rest of the post is that for some reason, it's more complicated than that...


In this page you will find some posts about AI and Deep Continuous Learning! Be sure you subscribe to the rss feed to be always updated! :-)
-
Want to be a good Data Scientist? Start with a good setup!
During the last few years as a PhD student in AI and Deep Learning I met a lot of smart people and good data scientist both in the Academia and in the Industry. Still, I’ve always been surprise of how much of these folks still work with old tools and bad coding habits. Even though in the end is just about personal choices and tastes, I still believe that for high productivity and extra-safety measures some tools are better than others. …
-
Welcome to my new website!
Hi! :) And welcome to my new website! The new google sites seems great but lacks a lot of flexibility so I decided to switch to Github Pages plus Jekyll. I found it incredibly powerful and flexible even though some people prefer Pelican as static site generator. …


Nested Lists
Just about anything fits in a list, from sets of instructions to collections of links. You can create subcategories by nesting lists within lists So basically nested lists are list inside lists.
This is an example of what the nested list looks like in code
The Basics
- All nested lists follow the same markup pattern
- Each list item in the top-level ordered list is followed by a complete second-level list
- The second level lists sit inside the top-level list, not in the list items.
- Nested Lists use the basic list tags
This is what a Nested list would look like in the broswer
Most Common Uses
- Site Maps and other navigation tools
- Tables of content for online books and papers
- Outlines
- To do lists
Description Lists
A Description list is a list of terms, with a description of each term.
Description lists don't use the basic list tags,there are specific ones that you use when you are making a descripiton list
- Tags
- dl tag defines the description list
- dt tag defines the term(name)
- dd tag describes each term
This is what it would look like in the code.
This is what it would look like in the browser
Most Common Uses
- Online Restaurant Menus
- Product Descriptions
- Site Purposes, and info


▷ Start
? Help
⌂ Home
Instructions
1 Press to hear family member (English).
2 Press to hear family member (Filipino).
Use the next & back button to navigate family members.


HistoryController
can create nested nodes
should listen child nodes
can unlisten child nodes
can listen grandchild nodes
can unlisten grandchild nodes
can go back
can't go back if history is empty
can call parent go back if node history is empty
can dispose
Route
has a path
has a target
can match with valid url
can run nested build methods
can't match with invalid url
Router
has routes
finds target by url
return only root path if any route doesn't be matched
sends data and params to specified route
gets history back
calls back to parent if its history is empty
can call a relative path
can be blocked
can redirect to specified route when route has 'to' attribute
Match Routes
can match with param
gets routes if parameter is just numeric
mathes routes if parameter is alphanumeric


Petition of Player : %playerName%
Online:
%online%
Online Activity:
%onlineTime%
PvP Points:
%pvpPoints%
Pk Points:
%pkPoints%
Fame:
%fame%
Main Class:
%mainClass%
1st Sub:
%firstSub%
2nd Sub:
%secondSub%
3rd Sub:
%thirdSub%
Adena:
%adena%
Question 1: %question1%
Question 2: %question2%
Answer 1: %answer1%
Answer 2: %answer2%
Question 3: %question3%
Question 4: %question4%
Answer 3: %answer3%
Answer 4: %answer4%
Aditional Comment:
%comment%


University: ITESM campus Querétaro
Career: Computer Science / Computer Engineering
Graduating date: May/21
Phone number:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>Date: Aug 19 - Dec 19
Roles: FullStack Developer, Product Owner (Disciplined Agile Delivery)
Technologies Used: Django, Python, Html, CSS, JS, Jquery, PostgreSQL
Date: Aug 18 - Dec 18
Roles: FullStack Developer
Technologies Used: Django, Python, Html, CSS, JS, Jquery, Mysql
Date: Jan 18 - May 18
Roles: FullStack Developer
Technologies Used: PHP, Html, CSS, JS, Mysql
Date: Aug 16 - May 21
Career: Computer Engineering
Aside from programming and computer science subjects, my main interests include:


My project will mostly base on 2 fields of technology to support the project. The first is AI and Machine Learning, and the second is Arduino.
Artificial intelligence" is used to describe machines (or computers) with the ability to mimic "cognitive" functions that humans often have to link to the mind, such as "learning" or "problem solving". Currently, AI and Machine Learning, which have succeeded in understanding human words, are applied in many areas, specifically at strategy games such as chess or Go, or in military simulation.
Artificial intelligence is now divided into three different types of system: analytical artificial intelligence, artificial intelligence, cognitive and emotional intelligence. In the 21st century with Industry 4.0, AI has become an essential part of the technology industry, capable of solving many difficult and challenging problems on software technology and operational research.
AI technologies have helped in many fields.
AI in transport industry
Assisted in research to develop self-driving vehicles, as we can see as cars. Examples: Waymo, Zoox, Nauto,.. These applications bring high economic benefits, while minimizing life-threatening accidents at the same time.
AI in manufacturing
Besides transportation, artificial intelligence is also applied to the production line. With AI technology, it is easier and more productive to analyze and develop in production.
AI in health
AI technology promises to help service providers in storing, providing and collecting electronic health records. At the same time, AI and machine learning can accurately diagnose the effect based on data sources from the images . In addition, AI is also the robot used in the medical device support like animal robots communicate and identify patients, assistant robot in surgeries,..
AI in education
AI has made a big change in the field of education. For example: AI can help in scoring or tutoring. AI is also applied in monitoring the student's learning process, thereby notifying teachers and parents if problems are detected during the learning process. The AI system – programmed with professional knowledge – will replace teachers in answering and helping students find information quickly. AI gives us a new perspective in education.
AI in communication and service
AI plays an important role in the media industry. Specifically, AI can create content about an event, article, market trend,... Voice recognition technology that we often use from Google Assistant, Siri,.. is one of the ai technologies that are popular and widely used. Through cookies, AI helps websites to track customers' interests and behaviors to bring out the needs and desires of users for the purpose of accurate advertising, promoting consumption,...
AI in finance
Analyzes data; gives results to help leaders in making better decisions; supports customers through chatbots; searchs and detects fraud, complaints; analyzed and forecasts in financial services.
________________________________________________
With the ability to meet countless requirements and techniques, I believes that AI will have many orientations in the future. AI techniques can be developed significantly, such as self-driving cars, facial recognition or government support.
The COVID pandemic occurred this year, which is 2020, has caused a rather serious economic crisis. However, thanks to AI and machine learning, which have once again proving their importance, we are able to change the situation. Applying machine learning helps us to monitor communication among sick people, diagnose symptoms accurately, predict the development of the virus in the future and detect outbreaks easily. Bluezone is one of the specific examples of this.
Drones in some areas, such as the United States, are used to test the problem of social distancing. Some of the earliest warnings about COVID were generated by AI, the BlueDot tool in Toronto for specific, which had issued a warning about the outbreak in Wuhan – China on December 31, 2019.
During this pandemic, Amazon's net sales increased by 40% compared to the same period last year. AI is ready to help businesses understand the preferences and desires of customers and be able to offer and introduce ideal products for them.
In my view, the development trend of AI in next year – 2021 – will be the develop in-depth researchs on the evolution of Big Data, health problem (automatic detecting and preventing systems) and online sales. And also some more stuffs such as drones that can measure body temperature,...
The dark side of AI
However, besides great help and contribution to rapid social development, AI also has its downsides. Physicists such as Stephen Hawking and Elon Musk have also warned us of the potential dangers of artificial intelligence. The first impact of AI on our society that we can see most clearly is the particularly high unemployment rate. As AI becomes more and more complete, it will replace many areas of life such as automatic line manufacturing, healthcare, service,... And with the growing development of AI, we will gradually relied too much on it. Sometimes we will even listen to the decision of a machine instead of ourselves because it makes more accurate decisions than us.
The most alarming thing is that the machines will become smarter and more complete than humans little by little, so we might lose control of it. It may sound unrealistic, but we can't predict the future and this is quite a possible thing.
AI and my daily life
In my life, online shopping has always been suggested by artificial intelligence. Even when choosing games or apps to download on the App Store, I can also find many suggestions. My multiple choice tests are also scored by AI. In Vietnam, there are not many applications and AI technologies, so adults in my family, often without exposure to technology, will not have too much contact with AI. However, young people, like I and my friends in specific, with creativity and the ability to learn, will be exposed, learned and grew together with AI in modern society.


{% extends 'piston/base.html' %} {% block title %}Authorize Token{% endblock %} {% block content %}
Are you sure do you want to authorize {{ consumer.name }} to access al your wouso data?


Mayo karate kid Aoibhínn takes world silver medal for Ireland
EIGHT-year-old Aoibhínn Monaghan from Belmullet has taken the silver medal for Ireland in the 13th World Championships in Belgrade, Serbia.
The Irish team did well with Cameron Reddy taking gold under 12, Aoibhínn Monaghan silver at under 8, and bronze medals for Alfie Gough and Victoria Gottwald in Kumite WKC World Champions.
Aoibhínn, a student of the Belmullet Karate Club INSK, was recently selected from trials held in Dublin to represent Ireland, with the INSK Irish National Shotokan Karate team.
The youngest competitor for team Ireland, Aoibhínn competed in kumite (sparring) in the 8-9 years age category. Fighting off stiff competition from Russia and Sweden to meet Pakistan in the final.
A rising star, Aoibhínn has been honing her karate skills since the age of 3, under the guidance of her father Padraig Monaghan. Padraig is sensei of Belmullet Karate Club INSK along with sensei Kieran Togher, and both accompanied the Irish team to Serbia.
Padraig Monaghan said: "We are very proud of Aoibhínn and all the students who represented Ireland in the world competition.
“It was a wonderful experience and an honour to represent your country. To win medals on a world stage is a remarkable achievement.
“We would like to thank all the support and well wishes Aoibhínn has received and in particular the support from her national school Scoil Bhreandáin Eachléim. Along with the guidance of sensei Stephen Hughes of INSK Dublin.”


{{ "" | safeHTML }}
{{ range site.Params.plugins.js}}
{{ end }}
{{ "" | safeHTML }}
{{ $script := resources.Get "js/script.js" | minify}}
{{ if site.Params.cookies.enable }}
This site uses cookies. By continuing to use this website, you agree to their use. I Accept
{{ end }}


| Interface | Description |
|---|---|
| Cursor |
Interface for providing consistent behaviour between different Cursor implementations.
|
| DBCallback |
The DB callback interface.
|
| DBCallbackFactory |
Factory for creating concrete implementations of DBCallback.
|
| DBDecoder |
An interface for decoders of BSON into instances of DBObject that belong to a DBCollection.
|
| DBDecoderFactory |
Creates concrete DBDecoder instances.
|
| DBEncoder |
An interface for encoders of BSONObject to BSON.
|
| DBEncoderFactory |
Creates concrete DBEncoder instances.
|
| DBObject |
This interface adds some specific behaviour to
BSONObject for MongoDB documents. |
| Class | Description |
|---|---|
| AggregationOptions |
The options to apply to an aggregate operation.
|
| AggregationOptions.Builder |
Builder for creating
AggregationOptions . |
| AggregationOutput |
Container for the result of aggregation operation.
|
| BasicDBList |
An implementation of List that reflects the way BSON lists work.
|
| BasicDBObject |
A basic implementation of BSON object that is MongoDB specific.
|
| BasicDBObjectBuilder |
Utility for building complex objects.
|
| BSONTimestampCodec |
Knows how to encode and decode BSON timestamps.
|
| BulkUpdateRequestBuilder |
A builder for a single update request.
|
| BulkWriteError |
Represents an error for an item included in a bulk write operation, e.g.
|
| BulkWriteOperation |
A bulk write operation.
|
| BulkWriteRequestBuilder |
A builder for a single write request.
|
| BulkWriteResult |
The result of a successful bulk write operation.
|
| BulkWriteUpsert |
Represents an upsert request in a bulk write operation that resulted in an insert.
|
| Bytes |
Class that hold definitions of the wire protocol
|
| CommandResult |
A simple wrapper to hold the result of a command.
|
| DB |
A thread-safe client view of a logical database in a MongoDB cluster.
|
| DBAddress | Deprecated
This class is no longer needed, as the driver does not rely on it for anything anymore.
|
| DBCollection |
Implementation of a database collection.
|
| DBCursor |
An iterator over database results.
|
| DBObjectCodec |
A collectible codec for a DBObject.
|
| DBObjectCodecProvider |
A provider for a DBObjectCodec.
|
| DBRef |
A representation of a database reference.
|
| DBRefCodec |
A Codec for DBRef instances.
|
| DBRefCodecProvider |
A codec provider for DBRef.
|
| DefaultDBCallback |
An implementation of DBCallback that decodes into a DBObject.
|
| DefaultDBDecoder |
An implementation of DBDecoder
|
| DefaultDBEncoder |
The default BSON encoder for BSONObject instances.
|
| GroupCommand |
This class groups the argument for a group operation and can build the underlying command object
|
| InsertOptions |
Options related to insertion of documents into MongoDB.
|
| LazyDBCallback |
A
BSONCallback for the creation of LazyDBObject and LazyDBList instances. |
| LazyDBDecoder |
A decoder for
LazyDBObject instances. |
| LazyDBEncoder |
Encoder that only knows how to encode BSONObject instances of type LazyDBObject.
|
| LazyDBList |
A
LazyDBObject representing a BSON array. |
| LazyDBObject |
An immutable
DBObject backed by a byte buffer that lazily provides keys and values on request. |
| MapReduceCommand |
This class groups the argument for a map/reduce operation and can build the underlying command object
|
| MapReduceOutput |
Represents the result of a map/reduce operation.
|
| Mongo |
A database connection with internal connection pooling.
|
| Mongo.Holder |
Mongo.Holder can be used as a static place to hold several instances of Mongo.
|
| MongoClient |
A MongoDB client with internal connection pooling.
|
| MongoClientOptions |
Various settings to control the behavior of a
MongoClient . |
| MongoClientOptions.Builder |
A builder for MongoClientOptions so that MongoClientOptions can be immutable, and to support easier construction through chaining.
|
| MongoClientURI |
Represents a URI
which can be used to create a MongoClient instance.
|
| MongoOptions | Deprecated
Please use
MongoClientOptions instead. |
| MongoURI | Deprecated
Replaced by
MongoClientURI |
| ParallelScanOptions |
The options to use for a parallel collection scan.
|
| ParallelScanOptions.Builder |
A builder for the options
|
| QueryBuilder |
Utility for creating DBObject queries
|
| QueryOperators |
MongoDB keywords for various query operations.
|
| ReflectionDBObject |
This class enables to map simple Class fields to a BSON object fields
|
| ReflectionDBObject.JavaWrapper |
Represents a wrapper around the DBObject to interface with the Class fields
|
| ReplicaSetStatus |
Keeps replica set status.
|
| WriteConcernError |
An error representing a failure by the server to apply the requested write concern to the bulk operation.
|
| WriteResult |
This class lets you access the results of the previous acknowledged write.
|
| Enum | Description |
|---|---|
| AggregationOptions.OutputMode |
Enumeration to define where the results of the aggregation will be output.
|
| MapReduceCommand.OutputType |
Represents the different options available for outputting the results of a map-reduce operation.
|
| Exception | Description |
|---|---|
| BulkWriteException |
An exception that represents all errors associated with a bulk write operation.
|
Copyright © 2017. All rights reserved.


Using ChunkStays
A plugin may need to manipulate data in arbitrary chunks, and it needs a way to make the server guarantee that the chunks are available in memory.
The problem
Usually when plugins want to manipulate larger areas of world data, they need to make sure that the server has the appropriate chunks loaded in the memory. When the data being manipulated can be further away from the connected players, or the data is being manipulated from a console handler, there is a real chance that the chunks are not loaded.
This gets even more important when using the cBlockArea class for reading and writing. Those functions will fail when any of the required chunks aren't valid. This means that either the block area has incomplete data (Read() failed) or incomplete data has been written to the world (Write() failed). Recovery from this is near impossible - you can't simply read or write again later, because the world may have changed in the meantime.
The solution
The naive solution would be to monitor chunk loads and unloads, and postpone the operations until all the chunks are available. This would be quite ineffective and also very soon it would become very difficult to maintain, if there were multiple code paths requiring this handling.
An alternate approach has been implemented, accessible through a single (somewhat hidden) function call: cWorld:ChunkStay(). All that this call basically does is, it tells the server "Load these chunks for me, and call this callback function once you have them all." And the server does exactly that - it remembers the callback and asks the world loader / generator to provide the chunks. Once the chunks become available, it calls the callback function for the plugin.
There are a few gotcha-s, though. If the code that was requesting the read or write had access to some of the volatile objects, such as cPlayer or cEntity objects, those cannot be accessed by the callback anymore, because they may have become invalid in the meantime - the player may have disconnected, the entity may have despawned. So the callback must use the longer way to access such objects, such as calling cWorld:DoWithEntityByID() or cWorld:DoWithPlayer().
The example
As a simple example, consider a theoretical plugin that allows a player to save the immediate
surroundings of the spawn into a schematic file. The player issues a command to initiate the save, and
the plugin reads a 50 x 50 x 50 block area around the spawn into a cBlockArea and saves it on the disk
as "
The first attempt shows the naive approach. It simply reads the block area and saves it, then sends the message. I'll repeat once more, this code is the wrong way to do it!
function HandleCommandSaveSpawn(a_Split, a_Player) -- Get the coords for the spawn: local SpawnX = a_Player:GetWorld():GetSpawnX() local SpawnY = a_Player:GetWorld():GetSpawnY() local SpawnZ = a_Player:GetWorld():GetSpawnZ() local Bounds = cCuboid(SpawnX - 25, SpawnY - 25, SpawnZ - 25, SpawnX + 25, SpawnY + 25, SpawnZ + 25) Bounds:ClampY(0, 255) -- Read the area around spawn into a cBlockArea, save to file: local Area = cBlockArea() local FileName = a_Player:GetName() .. "_spawn.schematic" Area:Read(a_Player:GetWorld(), Bounds, cBlockArea.baTypes + cBlockArea.baMetas) Area:SaveToSchematicFile(FileName) -- Notify the player: a_Player:SendMessage(cCompositeChat("The spawn has been saved", mtInfo)) return true end
Now if the player goes exploring far and uses the command to save their spawn, the chunks aren't loaded, so the BlockArea reading fails, the BlockArea contains bad data. Note that the plugin fails to do any error checking and if the area isn't read from the world, it happily saves the incomplete data and says "hey, everything's right", althought it has just trashed any previous backup of the spawn schematic with nonsense data.
The following script uses the ChunkStay method to alleviate chunk-related problems. This is the right way of doing it:
function HandleCommandSaveSpawn(a_Split, a_Player) -- Get the coords for the spawn: local SpawnX = a_Player:GetWorld():GetSpawnX() local SpawnY = a_Player:GetWorld():GetSpawnY() local SpawnZ = a_Player:GetWorld():GetSpawnZ() local Bounds = cCuboid(SpawnX - 25, SpawnY - 25, SpawnZ - 25, SpawnX + 25, SpawnY + 25, SpawnZ + 25) Bounds:ClampY(0, 255) -- Get a list of chunks that we need loaded: local MinChunkX = math.floor((SpawnX - 25) / 16) local MaxChunkX = math.ceil ((SpawnX + 25) / 16) local MinChunkZ = math.floor((SpawnZ - 25) / 16) local MaxChunkZ = math.ceil ((SpawnZ + 25) / 16) local Chunks = {} for x = MinChunkX, MaxChunkX do for z = MinChunkZ, MaxChunkZ do table.insert(Chunks, {x, z}) end end -- for x -- Store the player's name and world to use in the callback, because the a_Player object may no longer be valid: local PlayerName = a_Player:GetName() local World = a_Player:GetWorld() -- This is the callback that is executed once all the chunks are loaded: local OnAllChunksAvailable = function() -- Read the area around spawn into a cBlockArea, save to file: local Area = cBlockArea() local FileName = PlayerName .. "_spawn.schematic" if (Area:Read(World, Bounds, cBlockArea.baTypes + cBlockArea.baMetas)) then Area:SaveToSchematicFile(FileName) Msg = cCompositeChat("The spawn has been saved", mtInfo) else Msg = cCompositeChat("Cannot save the spawn", mtFailure) end -- Notify the player: -- Note that we cannot use a_Player here, because it may no longer be valid (if the player disconnected before the command completes) World:DoWithPlayer(PlayerName, function (a_CBPlayer) a_CBPlayer:SendMessage(Msg) end ) end -- Ask the server to load our chunks and notify us once it's done: World:ChunkStay(Chunks, nil, OnAllChunksAvailable) -- Note that code here may get executed before the callback is called! -- The ChunkStay says "once you have the chunks", not "wait until you have the chunks" -- So you can't notify the player here, because the saving needn't have occurred yet. return true end
Note that this code does its error checking of the Area:Read() function, and it will not overwrite the previous file unless it actually has the correct data. If you're wondering how the reading could fail when we've got the chunks loaded, there's still the issue of free RAM - if the memory for the area cannot be allocated, it cannot be read even with all the chunks present. So we still do need that check.
The conclusion
Although it makes the code a little bit longer and is a bit more difficult to grasp at first, the ChunkStay is a useful technique to add to your repertoire. It is to be used whenever you need access to chunks that may potentially be inaccessible, and you really need the data.
Possibly the biggest hurdle in using the ChunkStay is the fact that it does its work in the background, thus invalidating all cPlayer and cEntity objects your function may hold, so you need to re-acquire them from their IDs and names. This is the penalty for using multi-threaded code.


At San Mateo’s Little Shanghai Restaurant’s, you will find a wide variety of traditional Chinese cuisine, including sweet and sour chicken and fried rice. Whether you are looking for food low in fat or gluten-free, this restaurant is the place you want to eat. Round out your meal with a little tipple? This restaurant has a terrific drink list, including beer, wine, and more. Families will feel right at home at this restaurant with its kid-friendly menu and atmosphere.
Shanghai cuisine, also known as Hu cuisine, is a popular style of Chinese food. In a narrow sense, Shanghai cuisine refers only to what is traditionally called Benbang cuisine which originated in Shanghai; in a broad sense, it refers to complex and developed styles of cooking under profound influence of those of the surrounding provinces, Jiangsu and Zhejiang. It takes "colour, aroma and taste" as its elements, like other Chinese regional cuisines, and emphasises in particular the use of seasonings, the quality of raw ingredients and original flavours.


Masters
Study
Daily
Constantly
Practice
Concepts
Always
Build
Projects
Regularly
Refactor
Code
Don't
Repeat
Yourself


Hornets form exposed nests in trees, shrubs, underground, on buildings, and in cavities using wood chewed into a paper-like pulp. Their nests typically house 100 to 700 workers and 2 to 6 queens in larger nests. They guard their nests aggressively, with their stings being more dangerous than that of bees.
Here at Calvert Exterminators, we recognize the important role that bees serve in Maryland's ecosystem and make it a priority to investigate and remove any hornet nests that pose a threat to bees. If our technicians identify a "wasp nest" as a beehive, we have contacts that can safely remove the hive and relocate the bees. This is an effort to preserve Earth's declining bee populations and their crucial role in pollinating Earth's plants.
Asian Giant Hornets (a.k.a "Murder Hornets") began to sighted in the United States, with word of their huge size and extremely painful sting spreading across the internet. In reality, Murder Hornets are very unlikely to be found in Maryland, with few sightings in the state of Washington. There is still a very real threat in Maryland, though: European Hornets. These large hornets feed not only on Maryland honeybees, but also other pollinators such as butterflies and yellow jackets. They are easily spotted by their stripping of bark from nearby trees and shrubs. If you suspect you have European Hornets, stay away from the nest and let us do the rest!