NodeDiscovery module¶
- NodeDiscovery.cone_determination(client, coor_index)¶
The cone_determination function determines the cone that the client will have when running the trip.
- Parameters
client (Object of class clientclass) – The client object that has all the information about the client of that trip
coor_index (Integer) – Index of the trips dataframe
- Returns
Returns 1 in success
- Return type
Integer
- NodeDiscovery.get_client_source(client, dfstations)¶
The get_client_source function finds the closest edge server to the user by comparing the distance between the client coordinates and the coordinates of the edge server station. This is used to find the first edge server as it starts the trip
- Parameters
client (Object of class clientclass) – The client object that has all the information about the client of that trip
dfstations (Pandas dataframe) – Dataframe with the edge server stations
- Returns
Returns 1 in success
- Return type
Integer
- NodeDiscovery.lte_connection(client, coor_index)¶
The lte_connection function find the closest LTE station to the client.
- Parameters
client (Object of class clientclass) – The client object that has all the information about the client of that trip
coor_index (Integer) – Index of the trips dataframe
- Returns
Returns 1 in success
- Return type
Integer
- NodeDiscovery.node_search(client, coor_index, dfstations, user_def)¶
The node_search function suggest a possible destination based on the client’s heading through the use of a search cone and by taking into account the latency or distance that possible destination.
- Parameters
client (Object of class clientclass) – The client object that has all the information about the client of that trip
coor_index (Integer) – Index of the trips dataframe
dfstations (Pandas dataframe) – Dataframe with the edge server stations
user_def (Object of the class UserDef) – User definitions
- Returns
Returns 1 it finds a possible destination or it returns -1 if it can’t find a possible destination
- Return type
Integer
- NodeDiscovery.node_search_dist(client_coor, st_lat_lon, server_origin_coor)¶
The node_search_dist function checks if the distance to the target edge server is within range when comparing it to the distance that the client has to the source.
- Parameters
client_coor (Tuple of floats) – The client coordinates
st_lat_lon (Tuple of floats) – The target station coordinates
server_origin_coor (Tuple of floats) – The source station coordinates
- Returns
Returns 1 if the destination is in range or it returns -1 if if the destination is not in range
- Return type
Integer
- NodeDiscovery.node_search_lat(client, coor_index, st_lat_lon)¶
The node_search_lat function checks if the latency to the target edge server is within range when comparing it to the lantecy that the client has to the source.
- Parameters
client (Object of class clientclass) – The client object that has all the information about the client of that trip
coor_index (Integer) – Index of the trips dataframe
st_lat_lon (Tuple of floats) – The target station coordinates
- Returns
Returns 1 if the destination is in range or it returns -1 if if the destination is not in range
- Return type
Integer
- NodeDiscovery.remove_cluster(dfstations)¶
The remove_cluster function removes clusters of edge servers. This is to prevent migrations between edge servers that are to close together and mitigate uncessary migrations.
- Parameters
dfstations (Pandas dataframe) – Dataframe with the edge server stations
- Returns
Returns the filtered edge server dataframe
- Return type
Pandas Dataframe


{{#each products}}
-
{{#inArray category "Safe Work Method Statements (SWMS)/SWMS Value Packs"}}
Value Pack
{{else}}
{{/inArray}}
{{>components/products/card settings=../settings show_compare=../show_compare show_rating=../settings.show_product_rating theme_settings=../theme_settings customer=../customer event=../event position=(add @index 1)}}
{{/each}}
{{#each products}}
{{#inArray category "Safe Work Method Statements (SWMS)/SWMS Value Packs"}}
-
Value Pack
{{>components/products/card-list settings=../settings show_compare=../show_compare show_rating=../settings.show_product_rating theme_settings=../theme_settings customer=../customer event=../event position=(add @index 1)}}
{{else}}
-
{{>components/products/card-list settings=../settings show_compare=../show_compare show_rating=../settings.show_product_rating theme_settings=../theme_settings customer=../customer event=../event position=(add @index 1)}}
{{/inArray}}
{{/each}}


Whats the Event Name?
Enter the Address for the Event?
What day is the Event?
Whats the Theme for the Potluck?
Whats are you trying to make?
How many people do you want?
Who is comming to the Event?
Post
Event was successfully submitted


Goal 12: Ensure sustainable consumption of our resources
Population and consumption continues to increase
Current planet cannot sustain our demands
About 1/3 of all food that is produced gets wasted
Food waste is a contributor to carbon emissions.
People throw away edible food because of picky habits
Food Waste Issue
1/3 of all food produced is never eaten
“about 300,000 tonnes of raw material is produced per year, which was intended for food but which does not go on to food.“
the Swedish Board of Agriculture
“The production of the amount of food thrown every year corresponds to emissions of about 2 million tons of carbon dioxide”
Swedish Environmental Protection Agency
Ideating
We originally started with water consumption but this lead us to food waste
We sketched and ideated on food waste, production, and consumption issues
Try to change people’s perspectives on food and their food waste habits
Came up with very different ideas from VR glasses, Interact game, food dispenser in grocery store, etc.
Decided on a social media app that changes the appearance of food in order to spark a conversation on people’s attitude towards food and their food waste habits
Prototyping
Purpose: Harvest more “Yums” from peers and portray a better, false version of reality
1st Iteration: edit pictures of “ugly” fruit and make them “pretty”
2nd Iteration: changes to app’s interactions and paths users can take
3rd Iteration: redesigned app by adding a newsfeed and giving users four paths to take
User Testing
Interviewed and User tested in order to gather critique about the critical design and flow of the app
Main critique being inability to understand our intended message and to further improve the flow of the app
“Card sorting” with bananas that people would rank in order of a given question
We gathered more info about people's perception of fruit, their expectations when buying, eating, or posting fruit
Insights
There is an "ideal" version of produce. Even if people's taste preference is different- Gives insight into the superficial attitude of beauty
Students’ main concern was with their economy over food waste carbon emission- their wallet impacts their daily life more so than the environmental impact
Food's taste was the most important factor when determining if food should be thrown away or not
People wouldn't take "ugly" fruit even if it was free - This type of thinking contributes to food waste
Our app was too familiar. Mindless scrolling. We could change the comments to help get the message across.
We tried to strengthen our message but it supported the critique of social media more. We modelled after instagram and that muddled what we were trying to achieve
What people are saying...
Margaret E.
"Wow! I never thought of food waste in this way before!"
Fred S.
"Now I can harvest more Yums on Fruitgram with FIX A FRUIT!"


Hi everyone
I stumbled upon this project after looking for inline and clamp power monitors and it looks really promising. I'm looking to record power/energy usage of various devices around the home over time. I'm not interested in recording my total mains energy usage, just specific devices. Therefore I'm looking for the sensor and datalogger to be reasonably robust and portable and able to move it around the home with relative ease.
I'd like to find a way of accessing this data so a RaspberryPi can poll for the values and record them in a database. Either a USB or serial connection would be fine, though I see from the site that wireless might also be an option. I will then process this data into graphs and perform statistical analysis from there.
Initially I was looking for an inline socket-based monitor that could expose its data in a standard format. Alternatively a clamp-style sensor (such as the SCT-013-000 CT sensor in the shop) clamped around the input cable would also work and allow me to move the power monitoring without turning the device/appliance off.
My concern with clamp-style sensors was that the diameter of the cables to be monitored varies greatly and for devices plugged directly into sockets I would have to use an extension in those cases. Does a clamp-style sensor need to be clamped snugly around the input supply wire, or can it be used on devices where the supply wire is smaller than the diameter of the clamp?
Does anyone have any suggestions as to the best way to achieve my overall objective?
From looking around this site a clamp sensor (and temperature sensor, may as well record temp as well) connected to an emonTx , to a wireless receiver module attached to a RaspberryPi looks good.
Is there a way to attach the emonTx directly to a RaspberryPi so I could run the whole thing from a single USB power supply and contained in a single (Lego) case?
I'm not too concerned about wireless transmission of the data, unless the indoor range and signal reliability is good enough. What's the indoor range like of the wireless transmission between sensor nodes and base station at these frequencies?
Would it be affected by any other domestic radio signals from microwaves, DECT telephones and WiFi networks etc?
Cheers, B
Re: Power monitoring of plugged in devices/appliances
The first thing to point out is a c.t. does not work when clipped around a two-wire cable (with or without an earth) where the two wires are carrying the same current in opposite directions. So that one falls at the first hurdle.
I think you have little choice but to be looking at the inline socket-based monitor configuration that the commercial plug-in energy monitors use - where you plug the monitor in to the wall and the appliance in to the monitor. Then you can use the cheaper and smaller ring-core c.t., and you can tap off the voltage supply to obtain the power to operate. If you're using wireless then you can potentially (subject to channel occupancy and data collisions) have many measurement nodes reporting to one base station.
The range indoors depends very much on the construction of your house - wood and it's excellent, 1 metre of solid stone and you'll be lucky to get out of the room. You need to choose the rf band that's least affected by other interfering signals.
Re: Power monitoring of plugged in devices/appliances
Many thanks for the reply and the information. So it does sound like I'll have to try and find an inline power meter that exposes its data somehow. I should emphasise that I am a software guy looking to learn some basic electronics and hardware hacking.
Or I could take one of these... http://www.belkin.com/uk/null-Belkin/p/P-F7C005 and try and disconnect the socket from the sensor and take my own readings from the wires. I don't suppose anyone knows if that's possible or anyone has attempted this?
If I was to buy one of these and experiment, what sort of kit might I need to try and access the signals that are being transmitted? At least as a start point to assess whether it will be possible to rig something up?
Cheers, B
Re: Power monitoring of plugged in devices/appliances
It could be quite a challenge to access the signals, the information on decoding the rf packets is generally not out there from what I've gathered. Maybe the easiest option but not that elegant would be to create an assembly where the separate live and neutral wires are accessible, you'd have a plug on one end and a socket on the other, the easiest way to do this is to allow a bit of the external sheeting on the cable going into a four-bank, a bit like in the picture:
Id only do this if you where comfortable with rewiring a plug and removing some sheathing without exposing any live wiring though.
Re: Power monitoring of plugged in devices/appliances
Ah I think I see what you mean. Yeah I'd be reasonably comfortable with doing that.
I guess I could do it with a 1 gang extension lead like this... http://www.amazon.co.uk/Quality-extension-extention-Electrical-Electric/...
 How much live wire needs to be exposed to coil around the clamp?
What could I do I with the free hanging neutral/earth wires? I'd quite like this to be a fairly sturdy project with enough wire clamps to stop too much movement in the cables to reduce the chance of any melt-downs!
Cheers, B
Re: Power monitoring of plugged in devices/appliances
You dont actually need to coil as I have done above, just clip it around the wire with the wire being straight. Coiling multiples the current and it was a technique I was using for the accuracy test that that picture is from. So you should only need about 2-3 inches of say only the brown live conductor visible. The neutral and earth could remain inside the white sheathing and then you could tape it up cleanly. Il see if I can take a better picture of one here.
Re: Power monitoring of plugged in devices/appliances
A small point to be aware of:
The white plastic sheath is mechanically strong and is there for protection against cuts and the like. The brown or blue insulation is electrically good but mechanically weak.
Therefore, whenever the sheath is removed from a cable, you must take extra care not to damage the insulation.
Re: Power monitoring of plugged in devices/appliances
Here's a better pic:
+1 as Robert said, watch cutting into the live, neutral or earth when you cut the white sheathing.
Re: Power monitoring of plugged in devices/appliances
Wow nice photo, that looks pretty sturdy.
Great so I could even shorten the extension cable between the plug and socket to 20-40cm to make things a bit more compact.
Could I wrap the live wire in some thicker tape for extra strength? Then also add a ferrule/collar to the points where I've split the wires out. Or would extra taping around the live wire reduce the signal strength picked up by the sensor?
What's the internal diameter of the clamp? Can you pad it out so the live wire doesn't move around inside it?
I might actually buy one of those Belkin units just as an exercise in exploration to take apart the display unit. Might there be something useful in there which would allow me to decode the sensor signals?
Finally, this is a real noob question. What is the signal that would be exposed by this clamp sensor and how would I convert that to power in W (J per sec)? Or is that handled by the sensor base station?
Cheers, B
Re: Power monitoring of plugged in devices/appliances
Could I wrap the live wire in some thicker tape for extra strength?
That would help. Possibly better: spiral nylon wrapping, available in various sizes.
Then also add a ferrule/collar to the points where I've split the wires out. Or would extra taping around the live wire reduce the signal strength picked up by the sensor?
No, the current transformer is a transformer and works on magnetic fields.
What's the internal diameter of the clamp?
About 12 mm - check the data sheet!
Can you pad it out so the live wire doesn't move around inside it?
If you wish.
I might actually buy one of those Belkin units just as an exercise in exploration to take apart the display unit. Might there be something useful in there which would allow me to decode the sensor signals?
? ? ? The output from the current transformer is a current wave - a scaled-down version of the current it is measuring.
Finally, this is a real noob question. What is the signal that would be exposed by this clamp sensor and how would I convert that to power in W (J per sec)? Or is that handled by the sensor base station?
You can't convert current to Power! You must factor in other things, like the voltage and the relationship between the voltage and current waves. Read all about it in Building Blocks. The maths is done in the emonTx (if that's what you elect to use) or the equivalent unit that is fed with both current and voltage analogue inputs.
Re: Power monitoring of plugged in devices/appliances
Awesome, I might pad the clamp out with some polystyrene or bubble wrap... that shouldn't cause a heat issue should it?
Yes I realise it's far more complicated than I made out and that it's not a case of just directly measuring the power. To be honest I'd like to use this as a learning exercise and perform all the calculations myself, once I'm recording the data.
The clamp measures the current but what measures the voltage?
This all sounds great so far though.
Is there a board that attaches to the raspberry pi which can accept the sensor input directly? I'd like to avoid having a separate sensor node and raspberry pi+RFM12Pi. Though separating the sensor from the logger does have its advantages.
Cheers, B
Re: Power monitoring of plugged in devices/appliances
For added safety, I tend to expose the Neutral for clamping rather than the Active. You can see I've got 5 CTs of different sizes clamped around the Neutral of the extension lead. Assuming you have no ground faults, the current flowing in one should be identical to the other, just in the reverse direction, so just flip the CTs 180 degrees if you want the phase to remain the same.
Re: Power monitoring of plugged in devices/appliances
I might pad the clamp out with some polystyrene or bubble wrap... that shouldn't cause a heat issue should it?
It might well do. It will depend on the cable size and the current it's carrying. It's not a good idea to thermally insulate any cable or wire. (Technically, there's no difference between the wire in a flexible cord and the wire in an electric fire. Both get hot when carrying current - it's just that one is designed to and the other does but the size is chosen so that it stays relatively cool).
I'd like to ...... perform all the calculations myself Really? The emonTx calculates the rms current by multiplying current and voltage, then taking the average. It takes about 250 readings per second. You must be pretty good to keep up with that. ;-)
what measures the voltage? This or this.
Re: Power monitoring of plugged in devices/appliances
dBC: For added safety, I tend to expose the Neutral for clamping rather than the Active.
I understand what you're saying, but technically both are live conductors and both should be treated with equal respect. It only takes the neutral connection to fall off and everything then is at full line voltage - and just as dangerous as the line conductor, probably more so even because you don't expect it.
Re: Power monitoring of plugged in devices/appliances
Absolutely, but in the case of no additional faults other than a bit of undetected damaged insulation during the butchering phase, I'd rather be bumping into exposed copper on the blue wire than the brown wire.
Re: Power monitoring of plugged in devices/appliances
This is great info.
If I need to measure the voltage with an AC adaptor, where does that get plugged in? I guess I would need a 2 gang extension lead, one for the appliance I'm monitoring and another for the voltage sensor?
Is there a way to directly connect the emonTx to the RaspberryPi, so the whole lot can be powered from a single power supply?
I'm not sure this is going to be as robust or self-contained as I was hoping. I might end up buying and butchering one of those Belkin units to see if there's anything in there I can tap into.
Re: Power monitoring of plugged in devices/appliances
Time to take a step back. Why don't you read the Atmel Application Note about designing an energy meter? OK, parts might be a bit more complicated than you need, and you might want to add better recording facilities, but I feel it might be a better starting point, it would be certainly be worth studying. It's AVR465 - doc2566.pdf
If you do decide to follow this design, take careful note of the warnings regarding working on live equipment, particularly the need to isolate ALL connections when programming and testing.
If you don't go that route, then I would be looking at a large plastic box onto which you would mount a socket for your appliance, it would plug in to the mains via a short lead, and inside the box you would have a voltage transformer, a current transformer and whatever signal conditioning and recording you want - you seem to be looking at a Raspberry Pi plus analogue input board.
If you go the radio route, it's basically the same but your box now houses an emonTx to do the signal conditioning and transmitting; and you have your receiver and logging elsewhere. And with the same safety warning (i.e. you must double-insulate everything and work to the standards used in GIVmon, and you must have no connections to the outside world for programming or data) you could dispense with the voltage adapter/transformer and do as GIVmon does for its input.
I don't know what your level of expertise or experience with electrical and electronic construction is, but from what I've read so far, I would advise you use the emonTx + c.t. + packaged voltage adapter.
Re: Power monitoring of plugged in devices/appliances
Also, have a look at the Hexabus plugs and the "hacked" Hexabus plugs by Bart from Flukso. https://www.flukso.net/files/presentations/flukso.20121026.hack_hexaplug...
Re: Power monitoring of plugged in devices/appliances
You can also use the Sailwider / Current Cost plugs for this. They include both measurement and remote switching, RFM12B compatible.
Jack Kelly sometimes posts here - his github has all of the code you need for this.
P.
Re: Power monitoring of plugged in devices/appliances
Does anyone know if the currentcost IAMs measure V these days?
Re: Power monitoring of plugged in devices/appliances
Could we develop a "OpenEnergyMonitor" plug ourselves and do crowdfunding to lower the production costs? Maybe by using the same chip as Hexabus does? Analog Devices has cool chips for this: http://www.analog.com/en/analog-to-digital-converters/energy-measurement/products/index.html
Then we develop a PCB to fit it in a OKW plug case or when you succesfully crowdfund such a device, custom injection molded case.
Re: Power monitoring of plugged in devices/appliances
Does anyone know if the currentcost IAMs measure V these days?
As I understand it, they report power, but using measured (rather than hard coded) voltage and current. At least, I'm pretty sure that the Sailwider ones do (and so probably the EDF IAMs too). Not sure about the original "monitor only" CurrentCost IAMs - they might be dumber.
P.
Re: Power monitoring of plugged in devices/appliances
Fluppie, do you know where you can buy that OKW case? It would be ideal for an RF remote on a Mk2 system...
P.
Re: Power monitoring of plugged in devices/appliances
If I'm right Telerex Europe has them. Or you can send the guys at OKW an e-mail?
Re: Power monitoring of plugged in devices/appliances
Damn - looks like the UK version doesn't get an integrated socket.
Might be easier to just buy a commercial IAM, and pull the existing guts out.
P.
Re: Power monitoring of plugged in devices/appliances
I'd definitely pledge money for that.
I'm sure there's a way you could use the existing emonTx and various boards, all it seems I need is an inline AC voltage sensor with a clamp around the live/neutral wires inside.
The problem is that I don't have much experience in electronics/electrical construction, I'm a software guy, but I'm willing to learn, though learning with mains voltage AC circuits is pretty scary! Another problem is that I have hardly any spare time these days.
Cheers, B
Re: Power monitoring of plugged in devices/appliances
I think if we modify the HexaBus plug to RFM12B and Jeelib we can achieve something!
In this PDF there are scheme's and parts lists: http://openenergymonitor.org/emon/sites/default/files/HexaBus_Plug.pdf


The best way to grow shrooms is to grow a species which is native to your climate. When you've fruited as many caps as you can, just throw the spawn outside and let nature do the rest. Two species which are particularly hardy are P. Cubensis in warm climates, and P. Cyanescens in temperate areas like the Pacific Northwest.
Sterile technique is required for germinating spores, especially if you start with a petrie dish of agar. This method is preferred because you can select the best mycelia to transfer to the growing medium but requires some practice to maintain sterility and extra cost for the equipment (petrie dishes, agar, scalpel, alcohol lamp). You can start the spores directly on the growth medium, but you have no control over quality.
The most important thing about sterile technique is to clean everything twice. Take a shower, wipe down the work area with soap and water, then spray it and yourself with Lysol or some other disinfectant. This doesn't take more than 10 minutes and will almost insure success. I usually work nude from the waist up to keep dust from clothes from getting involved. If you wear clothes, make sure they are freshly laundered. Work in an area without a draft, and use a glove box (best case), or on a flat table underneath some sort of cover to protect from stray contaminants from falling down. Keep the lids on the jars or petrie dishes and only open them for the minimum time necessary to add spores or transfer mycelia to another jar. Don't make any sudden moves, though, as this causes drafts and may lead to contamination. Use a pressure cooker, and sterilize at 15 lbs for at least 30 minutes. I generally go for an hour.
For growth medium, I use birdseed without sunflower seeds for P. cubensis. It's easy to sterilize because it's smooth without a lot of nooks and crannies for bacteria to grow in, plus it's easier to shake apart later. This is important, because once you have a jar or two of healthy uncontaminated mycelia, you can use them to inoculate at least ten jars each of fresh growth medium. Once the mycelium has completely saturated the growth medium, transfer it to a larger container for growing. At this point, sterile technique is no longer required as the mycelia generates its own fungicides which keep other contaminates from growing. Use an open box or carton so you can easily get to the mushrooms when they sprout.
Apply the casing layer to the spawn, and keep watered. When the mycelia has permeated the casing layer, drop the temperature about 10 degrees to induce fruiting. When picking, use a razor blade or other sharp implement to cut the fruit close to the soil. Make sure you don't damage any of the pinheads which will eventually grow to full size. You should get two or three flushes of mushrooms over the next couple of weeks. When no more caps fruit, toss the contents outside in a shady area and wait for next year. You might also want to make some spore prints of your own.  Cover the cap with a glass or cup and let sit for a couple of hours.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Created by Casper Kehlet Jensen on 13th of October, 2015. Source code at
github
.
Background art based on work by
Zeyu Ren 任泽宇
.


This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.
It uses utility classes for typography and spacing to space content out within the larger container.
This is a longer card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat.
This card has supporting text below as a natural lead-in to additional content.
Last updated 3 mins ago
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
This is a wider card with supporting text below as a natural lead-in to additional content. This card has even longer content than the first to show that equal height action.
Last updated 3 mins ago
sass-resources-loader
with bootstrap-loader


OCaml-TLS: ASN.1 and notation embedding
This is the fourth in a series of posts that introduce new libraries for a pure OCaml implementation of TLS. You might like to begin with the introduction.
asn1-combinators is a library that allows one to express ASN.1 grammars directly in OCaml, manipulate them as first-class entities, combine them with one of several ASN encoding rules and use the result to parse or serialize values.
It is the parsing and serialization backend for our X.509 certificate library, which in turn provides certificate handling for ocaml-tls. We wrote about the X.509 certificate handling yesterday.
What is ASN.1, really?
ASN.1 (Abstract Syntax Notation, version one) is a way to describe on-the-wire representation of messages. It is split into two components: a way to describe the content of a message, i.e. a notation for its abstract syntax, and a series of standard encoding rules that define the exact byte representations of those syntaxes. It is defined in ITU-T standards X.680-X.683 and X.690-X.695.
The notation itself contains primitive grammar elements, such as BIT STRING
or
GeneralizedTime
, and constructs that allow for creation of compound grammars
from other grammars, like SEQUENCE
. The notation is probably best introduced
through a real-world example:
-- Simple name bindings
UniqueIdentifier ::= BIT STRING
-- Products
Validity ::= SEQUENCE {
notBefore Time,
notAfter Time
}
-- Sums
Time ::= CHOICE {
utcTime UTCTime,
generalTime GeneralizedTime
}
(Example from RFC 5280, the RFC that describes X.509 certificates which heavily rely on ASN.)
The first definition shows that we can introduce an alias for any existing ASN
grammar fragment, in this case the primitive BIT STRING
. The second and third
definitions are, at least morally, a product and a sum.
At their very core, ASN grammars look roughly like algebraic data types, with a
range of pre-defined primitive grammar fragments like BIT STRING
, INTEGER
,
NULL
, BOOLEAN
or even GeneralizedTime
, and a number of combining
constructs that can be understood as denoting sums and products.
Definitions such as the above are arranged into named modules. The standard even provides for some abstractive capabilities: initially just a macro facility, and later a form of parameterized interfaces.
To facilitate actual message transfer, a grammar needs to be coupled with an encoding. By far the most relevant ones are Basic Encoding Rules (BER) and Distinguished Encoding Rules (DER), although other encodings exist.
BER and DER are tag-length-value (TLV) encodings, meaning that every value is encoded as a triplet containing a tag that gives the interpretation of its contents, a length field, and the actual contents which can in turn contain other TLV triplets.
Let’s drop the time from the example above, as time encoding is a little involved, and assume a simpler version for a moment:
Pair ::= SEQUENCE {
car Value,
cdr Value
}
Value ::= CHOICE {
v_str UTF8String,
v_int INTEGER
}
Then two possible BER encodings of a Pair
("foo", 42)
are:
30 - SEQUENCE 30 - SEQUENCE
08 - length 0c - length
[ 0c - UTF8String [ 2c - UTF8String, compound
03 - length 07 - length
[ 66 - 'f' [ 0c - UTF8String
6f - 'o' 01 - length
6f ] - 'o' [ 66 ] - 'f'
02 - INTEGER 0c - UTF8String
01 - length 02 - length
[ 2a ] ] - 42 [ 6f - 'o'
6f ] - 'o'
02 - INTEGER
01 - length
[ 2a ] ] - 42
The left one is also the only valid DER encoding of this value: BER allows certain freedoms in encoding, while DER is just a BER subset without those freedoms. The property of DER that any value has exactly one encoding is useful, for example, when trying to digitally sign a value.
If this piqued your curiosity about ASN, you might want to take a detour and check out this excellent writeup.
A bit of history
The description above paints a picture of a technology a little like Google’s Protocol Buffers or Apache Thrift: a way to declaratively specify the structure of a set of values and derive parsers and serializers, with the addition of multiple concrete representations.
But the devil is in the detail. For instance, the examples above intentionally gloss over the fact that often concrete tag values leak into the grammar specifications for various disambiguation reasons. And ASN has more than 10 different string types, most of which use long-obsolete character encodings. Not to mention that the full standard is close to 200 pages of relatively dense language and quite difficult to follow. In general, ASN seems to have too many features for the relatively simple task it is solving, and its specification has evolved over decades, apparently trying to address various other semi-related problems, such as providing a general Interface Description Language.
Which is to say, ASN is probably not what you are looking for. So why implement it?
Developed in the context of the telecom industry around 30 years ago, modified several times after that and apparently suffering from a lack of a coherent goal, by the early 90s ASN was still probably the only universal, machine- and architecture-independent external data representation.
So it came easily to hand around the time RSA Security started publishing its series of PKCS standards, aimed at the standardization of cryptographic material exchange. RSA keys and digital signatures are often exchanged ASN-encoded.
At roughly the same time, ITU-T started publishing the X.500 series of standards which aimed to provide a comprehensive directory service. Much of this work ended up as LDAP, but one little bit stands out in particular: the X.509 PKI certificate.
So a few years later, when Netscape tried to build an authenticated and confidential layer to tunnel HTTP through, they based it on – amongst other things – X.509 certificates. Their work went through several revisions as SSL and was finally standardized as TLS. Modern TLS still requires X.509.
Thus, even though TLS uses ASN only for encoding certificates (and the odd PKCS1 signature), every implementation needs to know how to deal with ASN. In fact, many other general cryptographic libraries also need to deal with ASN, as various PKCS standards mandate ASN as the encoding for exchange of cryptographic material.
The grammar of the grammar
As its name implies, ASN was meant to be used with a specialized compiler. ASN is really a standard for writing down abstract syntaxes, and ASN compilers provided with the target encoding will generate code in your programming language of choice that, when invoked, parses to or serializes from ASN.
As long as your programming language of choice is C, C++, Java or C#, obviously – there doesn’t seem to be one freely available that targets OCaml. In any case, generating code for such a high-level language feels wrong somehow. In its effort to be language-neutral, ASN needs to deal with things like modules, abstraction and composition. At this point, most functional programmers reading this are screaming: “I already have a language that can deal with modules, abstraction and composition perfectly well!”
So we’re left with implementing ASN in OCaml.
One strategy is to provide utility functions for parsing elements of ASN and simply invoke them in the appropriate order, as imposed by the target grammar. This amounts to hand-writing the parser and is what TLS libraries in C typically do.
As of release 1.3.7, PolarSSL includes ~7,500 lines of rather beautifully written C, that implement a specialized parser for dealing with X.509. OpenSSL’s libcrypto contains ~50,000 lines of C in its ‘asn1’, ‘x509’ and ‘x509v3’ directories, and primarily deals with X.509 specifically as required by TLS.
In both cases, low-level control flow is intertwined with the parsing logic and, above the ASN parsing level, the code that deals with interpreting the ASN structure is not particularly concise. It is certainly a far cry from the (relatively) simple grammar description ASN itself provides.
Since in BER every value fully describes itself, another strategy is to parse the input stream without reference to the grammar. This produces a value that belongs to the general type of all ASN-encoded trees, after which we need to process the structure according to the grammar. This is similar to a common treatment of JSON or XML, where one decouples parsing of bytes from the higher-level concerns about the actual structure contained therein. The problem here is that either the downstream client of such a parser needs to constantly re-check whether the parts of the structure it’s interacting with are really formed according to the grammar (probably leading to a tedium of pattern-matches), or we have to turn around and solve the parsing problem again, mapping the uni-typed contents of a message to the actual, statically known structure we require the message to have.
Surely we can do better?
LAMBDA: The Ultimate Declarative
Again, ASN is a language with a number of built-in primitives, a few combining constructs, (recursive) name-binding and a module system. Our target language is a language with a perfectly good module system and it can certainly express combining constructs. It includes an abstraction mechanism arguably far simpler and easier to use than those of ASN, namely, functions. And the OCaml compilers can already parse OCaml sources. So why not just reuse this machinery?
The idea is familiar. Creating embedded languages for highly declarative descriptions within narrowly defined problem spaces is the staple of functional programming. In particular, combinatory parsing has been known, studied and used for decades.
However, we also have to diverge from traditional parser combinators in two major ways. Firstly, a single grammar expression needs to be able to generate different concrete parsers, corresponding to different ASN encodings. More importantly, we desire our grammar descriptions to act bidirectionally, producing both parsers and complementary deserializers.
The second point severely restricts the signatures we can support. The usual monadic parsers are off the table because the expression such as:
( (pa : a t) >>= fun (a : a) ->
(pb : b t) >>= fun (b : b) ->
return (b, b, a) ) : (b * b * a) t
… “hides” parts of the parser inside the closures, especially the method of mapping the parsed values into the output values, and can not be run “in reverse” [1].
We have a similar problem with applicative functors:
( (fun a b -> (b, b, a))
<$> (pa : a t)
<*> (pb : b t) ) : (b * b * a) t
(Given the usual <$> : ('a -> 'b) -> 'a t -> 'b t
and <*> : ('a -> 'b) t ->
'a t -> 'b t
.) Although the elements of ASN syntax are now exposed, the process
of going from intermediate parsing results to the result of the whole is still
not accessible.
Fortunately, due to the regular structure of ASN, we don’t really need the
full expressive power of monadic parsing. The only occurrence of sequential
parsing is within SEQUENCE
and related constructs, and we don’t need
look-ahead. All we need to do is provide a few specialized combinators to handle
those cases – combinators the likes of which would be derived in a
more typical setting.
So if we imagine we had a few values, like:
val gen_time : gen_time t
val utc_time : utc_time t
val choice : 'a t -> 'b t -> ('a, 'b) choice t
val sequence : 'a t -> 'b t -> ('a * 'b) t
Assuming appropriate OCaml types gen_time
and utc_time
that reflect their
ASN counterparts, and a simple sum type choice
, we could express the
Validity
grammar above using:
type time = (gen_time, utc_time) choice
let time : time t = choice gen_time utc_time
let validity : (time * time) t = sequence time time
In fact, ASN maps quite well to algebraic data types. Its SEQUENCE
corresponds
to n-ary products and CHOICE
to sums. ASN SET
is a lot like SEQUENCE
,
except the elements can come in any order; and SEQUENCE_OF
and SET_OF
are
just lifting an 'a
-grammar into an 'a list
-grammar.
A small wrinkle is that SEQUENCE
allows for more contextual information on its
components (so does CHOICE
in reality, but we ignore that): elements can carry
labels (which are not used for parsing) and can be marked as optional. So
instead of working directly on the grammars, our sequence
must work on their
annotated versions. A second wrinkle is the arity of the sequence
combinator.
Thus we introduce the type of annotated grammars, 'a element
, which
corresponds to one ,
-delimited syntactic element in ASN’s own SEQUENCE
grammar, and the type 'a sequence
, which describes the entire contents ({ ...
}
) of a SEQUENCE
definition:
val required : 'a t -> 'a element
val optional : 'a t -> 'a option element
val ( -@ ) : 'a element -> 'b element -> ('a * 'b) sequence
val ( @ ) : 'a element -> 'a sequence -> ('a * 'b) sequence
val sequence : 'a sequence -> 'a t
The following are then equivalent:
Triple ::= SEQUENCE {
a INTEGER,
b BOOLEAN,
c BOOLEAN OPTIONAL
}
let triple : (int * (bool * bool option)) t =
sequence (
required int
@ required bool
-@ optional bool
)
We can also re-introduce functions, but in a controlled manner:
val map : ('a -> 'b) -> ('b -> 'a) -> 'a t -> 'b t
Keeping in line with the general theme of bidirectionality, we require functions
to come in pairs. The deceptively called map
could also be called iso
, and
comes with a nice property: if the two functions are truly inverses,
the serialization process is fully reversible, and so is parsing, under
single-representation encodings (DER)!
ASTs of ASNs
To go that last mile, we should probably also implement what we discussed.
Traditional parser combinators look a little like this:
type 'a p = string -> 'a * string
let bool : bool p = fun str -> (s.[0] <> "\000", tail_of_string str)
Usually, the values inhabiting the parser type are the actual parsing functions,
and their composition directly produces larger parsing functions. We would
probably need to represent them with 'a p * 'a s
, pairs of a parser and its
inverse, but the same general idea applies.
Nevertheless, we don’t want to do this. The grammars need to support more than one concrete parser/serializer, and composing what is common between them and extracting out what is not would probably turn into a tangled mess. That is one reason. The other is that if we encode the grammar purely as (non-function) value, we can traverse it for various other purposes.
So we turn from what is sometimes called “shallow embedding” to “deep embedding” and try to represent the grammar purely as an algebraic data type.
Let’s try to encode the parser for bools, boolean : bool t
:
type 'a t =
| Bool
...
let boolean : bool t = Bool
Unfortunately our constructor is fully polymorphic, of type 'a. 'a t
. We can
constrain it for the users, but once we traverse it there is nothing left to
prove its intended association with booleans!
Fortunately, starting with the release of OCaml 4.00.0, OCaml joined the ranks of languages equipped with what is probably the supreme tool of deep embedding, GADTs. Using them, we can do things like:
type _ t =
| Bool : bool t
| Pair : ('a t * 'b t) -> ('a * 'b) t
| Choice : ('a t * 'b t) -> ('a, 'b) choice t
...
In fact, this is very close to how the library is actually implemented.
There is only one thing left to worry about: ASN definitions can be recursive. We might try something like:
let rec list = choice null (pair int list)
But this won’t work. Being just trees of applications, our definitions never contain statically constructive parts – this expression could never terminate in a strict language.
We can get around that by wrapping grammars in Lazy.t
(or just closures), but
this would be too awkward to use. Like many other similar libraries, we need to
provide a fixpoint combinator:
val fix : ('a t -> 'a t) -> 'a t
And get to write:
let list = fix @@ fun list -> choice null (pair int list)
This introduces a small problem. So far we simply reused binding inherited from OCaml without ever worrying about identifiers and references, but with a fixpoint, the grammar encodings need to be able to somehow express a cycle.
Borrowing an idea from higher-order abstract syntax, we can represent the entire fixpoint node using exactly the function provided to define it, re-using OCaml’s own binding and identifier resolution:
type _ t =
| Fix : ('a t -> 'a t) -> 'a t
...
This treatment completely sidesteps the problems with variables. We need no
binding environments or De Brujin indices, and need not care about the desired
scoping semantics. A little trade-off is that with this simple encoding it
becomes more difficult to track cycles (when traversing the AST, if we keep
applying a Fix
node to itself while descending into it, it looks like an
infinite tree), but with a little opportunistic caching it all plays out well
[2].
The parser and serializer proper then emerge as interpreters for this little language of typed trees, traversing them with an input string, and parsing it in a fully type-safe manner.
How does it play out?
The entire ASN library comes down to ~1,700 lines of OCaml, with around ~1,100 more in tests, giving a mostly-complete treatment of BER and DER.
Its main use so far is in the context of the X.509
library
(discussed yesterday). It allowed the
grammar of certificates and RSA keys, together with a number of transformations
from the raw types to more pleasant, externally facing ones, to be written in
~900 lines of OCaml. And the code looks a lot like the
actual standards the grammars were taken from – the fragment from the beginning
of this article becomes:
let unique_identifier = bit_string_cs
let time =
map (function `C1 t -> t | `C2 t -> t) (fun t -> `C2 t)
(choice2 utc_time generalized_time)
let validity =
sequence2
(required ~label:"not before" time)
(required ~label:"not after" time)
We added ~label
to 'a element
-forming injections, and have:
val choice2 : 'a t -> 'b t -> [ `C1 of 'a | `C2 of 'b ] t
To get a sense of how the resulting system eases the translation of standardized ASN grammars into working code, it is particularly instructive to compare these two definitions.
Reversibility was a major simplifying factor during development. Since the grammars are traversable, it is easy to generate their random inhabitants, encode them, parse the result and verify the reversibility still holds. This can’t help convince us the parsing/serializing pair is actually correct with respect to ASN, but it gives a simple tool to generate large amounts of test cases and convince us that that pair is equivalent. A number of hand-written cases then check the conformance to the actual ASN.
As for security, there were two concerns we were aware of. There is a history of catastrophic buffer overruns in some ASN.1 implementations, but – assuming our compiler and runtime system are correct – we are immune to these as we are subject to bounds-checking. And there are some documented problems with security of X.509 certificate verification due to overflows of numbers in ASN OID types, which we explicitly guard against.
You can check our security status on our issue tracker.
Footnotes
-
In fact, the problem with embedding functions in combinator languages, and the fact that in a functional language it is not possible to extract information from a function other than by applying it, was discussed more than a decade ago. Such discussions led to the development of Arrows, amongst other things.
-
Actually, a version of the library used the more proper encoding to be able to inject results of reducing referred-to parts of the AST into the referring sites directly, roughly like
Fix : ('r -> ('a, 'r) t) -> ('a, 'r) t
. This approach was abandoned because terms need to be polymorphic in'r
, and this becomes impossible to hide from the user of the library, creating unwelcome noise.
Posts in this TLS series:
- Irmin 0.12 with portable filesystem watching released
- MirageOS Summer 2016 Hackathon roundup
- MirageOS Summer 2016 Hackathon announcement, and talk roundup
- MirageOS Spring 2016 Hackathon!
- MirageOS security advisory 00: mirage-net-xen
- Introducing Functoria
- Run Mirage Unikernels on KVM/QEMU with Solo5
- MirageOS hackathon
- Introducing Charrua — a DHCP implementation
- Unikernel.org


@* * Copyright 2021 HM Revenue & Customs * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *@ @import config.AppConfig @import models.request.AuthenticatedRequest @import controllers.routes @import models.{Case, CaseStatusRadioInput} @import models.viewmodels.NoTabSelected @import views.html.includes.main @import views.html.components.input_radio @import views.html.components.confirm_or_cancel_buttons @import views.html.partials.{error_summary, case_heading, back_link} @import uk.gov.hmrc.play.views.html._ @(c: Case, form: Form[_], messageKey: Option[String] = None)(implicit request: AuthenticatedRequest[_], messages: Messages, appConfig: AppConfig) @main(bodyClasses = None, customTitle = Some(messages("action_this_case_status_title")), customPrimaryNavTab = NoTabSelected) { @back_link() @error_summary(form.errors)


 All rights reserved.
 Head back home and look for something else.


This site has been moved to https://ske.xpixv.com. The old domain will expire in July 9th, 2019. Please rebookmark this site.🖖
I'm sorry for the trouble.


LA POLO is India’s first international polo magazine sporting the aristocratic world of Polo and bespoke lifestyle. Capturing the pulsating sport and associated luxury, both in the Indian subcontinent and abroad, LA POLO strives to encapsulate the essence through its stars, patrons, founders, legacy, teams and clubs change the world


Experienced and passionate researcher in the theoretical and computational physics. 8+ years of experience in development and optimization of algorithms to increase computational efficiency. An enthusiastic learner and strong analytical thinker.
I am a passionate and curious about solving problems, developing and integrating new algorithms and approaches. I like to participate in code contests (e.g. TopCoder) to improve my coding skills. I am also artificial intelligence enthusiast and following up with last achievements in that area. In my free time, I try to pass on my knowledge to people around me, organize and develop different educational courses. JetBrains Foundation awarded my MOOC course on advanced math and physics.
Backend and frontend development for website http://problems.ml (in progress)
Software kit development. Main challenges: to enumerate subset of exponentially large set of terms, according to existing conditions. Evaluate equation corresponding to each term in subset. Transform and postprocess results of previous steps. Implemented algorithms increase reachable perturbation order from 2nd to 7th and decrease computational time by 30%.
Development of effective algorithms to enumerate lattices states. Main challenges: implementation of multithreading approach, algorithms optimization and bottleneck eliminations. Computational time decreased by ~30% per thread.
Development of the novel approach to calculate precise radius of the Sun based on satellite detectors data. Main challenges: model the Sun signal on detectors, develop approach to extract the signal from noisy data, consideration and processing of special cases for different measurement peculiarities. Accuracy increased by 10% according to previous results.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur in iaculis ex. Etiam volutpat laoreet urna. Morbi ut tortor nec nulla commodo malesuada sit amet vel lacus. Fusce eget efficitur libero. Morbi dapibus porta quam laoreet placerat.
View ProjectLorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur in iaculis ex. Etiam volutpat laoreet urna. Morbi ut tortor nec nulla commodo malesuada sit amet vel lacus. Fusce eget efficitur libero. Morbi dapibus porta quam laoreet placerat.
View Project


DSS has brought shame to Nigeria — Sowore’s lawyer
by Ade AdesomojuAde Adesomoju, Abuja
Mr Stanley Imhanruor, a lawyer in the defence team of the convener of #RevolutionNow protest, Mr Omoyele Sowore, and his co-defendant, Olawale Bakare, on Thursday took a swipe at the Department of State Services for refusing to release his clients from custody in violation of the order of the Federal High Court in Abuja.
Imhanruor, in a statement sent to our correspondent on Thursday, described the DSS conduct as crude, adding that the agency had brought shame to Nigeria in the comity of civilised nations.
He said, “For the records, the worst form of corruption is disobedience of court orders by public officers and institutions. It is therefore shameful, hypocritical and benumbing that a government that claims to be fighting corruption is now notorious for disobedience of court orders.”
Calling for the release of the SaharaReporters publisher and Bakare, Imhanruor said the court order for the release of the defendants must be obeyed.
He stated, “To say the least, the DSS has brought shame on us as a people in the comity of civilised nations. This country belongs to all of us and not just a set of people who are privileged to be at the helm of affairs presently.
“The order of court directing the DSS to release the defendants must be obeyed by the DSS irrespective of whoever maybe wearing a frowning face. That is how democracy and the rule of law thrive and Nigeria should not be an exception.”
Imhanruor faulted the latest of the DSS’ excuses that it had not released the two men from custody because their sureties were not available to receive them.
He said by imposing a condition that was not part of the ones imposed by the Federal High Court, the DSS was trying to constitute itself into an appellate court.
Describing the conduct of the DSS as crude, he vowed that he and the defence team led by Mr Femi Falana (SAN), would not bow to the agency’s intimidation.
He stated, “The DSS then ridiculously accused our lead counsel, the highly respected Femi Falana, SAN, of playing to the gallery simply because the learned silk called on the DSS to release the defendants from illegal custody without further delay and in line with the order of court.
“It is crude and antiquated for the DSS to think that everyone will yield to its antics of crass intimidation and oppression.
“The DSS is not an appellate court and as such cannot sit on appeal over the decision of the court by giving fresh conditions for the release of the defendants who have since fulfilled their bail conditions as imposed by the court.
“Even in the days of military dictatorship, court orders were obeyed, let alone in a democracy. It is about time the DSS shielded its pre-colonial mentality.”
Copyright PUNCH.
All rights reserved. This material, and other digital content on this website, may not be reproduced, published, broadcast, rewritten or redistributed in whole or in part without prior express written permission from PUNCH.
Contact: theeditor@punchng.com


CountString()
语法
Result = CountString(String$, StringToCount$)概要
Returns the number of occurrences of StringToCount$ found in String$.
参数
String$ 要使用的传入字符串. StringToCount$ 要将计数输入字符串中的字符串。
返回值
The number of occurrences of 'StringToCount$' found in 'String$'.
备注
The counting is not word based, which means that if the 'StringToCount$' is a part of a word, it will be counted as well, as shown in the following example.
示例
Debug CountString("How many 'ow' contains Bow ?", "ow") ; will display 3
已支持操作系统
所有


This day and age, predictability and reliability are two of the most important words when it comes deployments. In this series, I am going to talk about how to add both predictability and reliability to your ASP.NET Core Continuous Integration pipeline using TeamCity and Octopus Deploy.
In 2010 there were two key resources published that helped identify many of the common mistakes developers were making when dealing with deployments and how you might go about solving them.
Both Scott and Troy based their work on the fact that at the time, many of the common practices being followed when deploying a web application were unpredictable due to the human variable. It does not matter which way you slice it, we as humans are error prone. No matter how many step-by-step instructions sets are put in front of us or how many times we have performed the same task over and over, we will mess it up at some point. That is a guarantee!
The key to reducing the problems then are the still the same now, introduce automation into your deployment process and introduce it early.
Though the high-level concepts are the same now as they were then, the landscape in which they exist in has drastically changed. With that in mind, let's define some of the familiar high-level goals that we would like to achieve.
In other words, the code is pushed to our repository. The "push" triggers an automated build. The "automated build" triggers an automated deployment. The automated "deployment" configures the "build" and pushes the deployment to a target.
As you might have noticed, I am opting to emphasize the concept of automation here. When we automate steps in the deployment process, we are removing points in which a human has a chance to screw something up. By doing such, we are introducing the concept of predictability. If we automate "a", we can predict "x" will happen. The more we can predict and more importantly prove to be accurate, the more reliability we will have in our deployment process.
Though conceptually some of the concepts have been around for some time, the tooling used to achieve them has changed. With this in mind, let's define some specifics around our goals.
There will be a few prerequisite that needs to be met before we get started. Like with many of my other blog posts, I will be approaching this from the point of view of my actual blog. Meaning, I will be using the Pioneer Code Blog source in my environment, with the deployment target being pioneercode.com. That being said, all the high-level concepts hold true to most deployments and all the tooling holds accurate to most ASP.NET deployments.
This day and age, the vast majority of the development community are using GitHub to service their repository needs and I will be doing the same. That being said, alternative services such as Visual Studio Team Services or GitLab will suffice.
If you do not go with GitHub, concepts such as triggering integrations with TeamCity on a status change will differ.
I will be using an on-perm server to host TeamCity and Octopus Deploy. Any environment you choose to host with, be it a server, virtual machine or local development environment, will be fine.
Pioneer Code is hosted at DigitalOcean on a Linux VM. For the most part, be it a Linux target or Windows the concept of file transfer on deployment is the same. The means on how we achieve this will differ though. I will address more of this in the following parts to this series.
Now that we have some goals defined and our prerequisites out of the way, we can look to setting up and configuring TeamCity to automatically build our application as we push code into our repository. Until then, please feel free to leave any comments below.
Deploying An ASP.NET Core Site, You're Still Doing It Wrong : Part 2 - Octopus Deploy: TeamCity


Even after have bblog version 3.1.1 the emblem is still not visible to bblog users. A few days ago it was visible to bblog users and now it isn't. Most threads posted so far only mention to the emblem issue before 3.0
BrainFooLong
Administrator
Do you readed the changelog?
* custom platoon image upload/display is now disabled by default, to reduce the server load, could be re-enabled in the options
Topicstarter
JESSEJJ89
BrainFooLong wrote:
Do you readed the changelog?
* custom platoon image upload/display is now disabled by default, to reduce the server load, could be re-enabled in the options
Thanks, guess I thought the issue something else since mine wasn't the only one. Cheers :)


Magnitude 5.9 quake strikes Laos: EMSC
(Reuters) - A magnitude 5.9 quake struck Laos on Thursday, the European-Mediterranean Seismological Centre (EMSC) said.
The shallow quake was initially reported as a magnitude 6.0.
(Reuters) - A magnitude 5.9 quake struck Laos on Thursday, the European-Mediterranean Seismological Centre (EMSC) said.
The shallow quake was initially reported as a magnitude 6.0.


|
Technical information
Transcraft My Accountant was written using the Java language from
Sun
Microsystems®. The Graphical
User Interface (GUI) component was developed using the Standard Widget Toolkit
(SWT) from IBM®. SWT is the
foundation layer for the Eclipse project, which provides excellent development
environment for Java, Perl, and Palm OS®, namely in the
Eclipse IDE. The underlying
database technology is the object database technology from
db4objects®. Reporting technology powered by
the Jasper Reports
reporting engine. Please follow the above URL's to find out more about these
technologies. The application has been developed on a Windows® platform,
but has been recompiled and works flawlessly on Linux. Below are the
screenshots for the same entry account on Linux and Windows (apologies I do
not yet own an Apple® machine to produce the Mac OS X® version, but hopefully
that will be remedied soon). Windows:
Linux
The technology from dbobjects® has
dramatically shortened the development time, as mapping from domain models to
persistence is now one single step instead of three. The company also provides
excellent technical support, with their own developer community program and
dedicated NNTP server and news groups.
I used the Visual designer for Jasper Reports from a product called
IReports.
Without this tool, it would have taken much longer to put together the
templates for the reports. The only down side to IReports is it was written in
Swing, so the look and feel is a world apart from the SWT based environment
provided by Eclipse.
The source code is now available on
Sourceforge,
together with the binary distribution for Linux and Win32 platforms. Build and installation is pretty simple, as you can just drop the
project directly into the Eclipse IDE. Please note that the I used Eclipse 3.0
to build the Win32 version, and Eclipse version 3.1 to build the Linux
version, so the code should work fine with either (although you might need to
tweak the build and runtime paths a bit to pick up the correct SWT Java and
native libraries. Drop me a mail if you need help).
Outstanding work
I intend to implement additional features for this application. The features I
have in mind are:
- payroll support (this costs me £100 per year currently)
- inventory control (I don't need this right now as I only do
consultancy work, but if I ever open an Internet shop, this will be top of
the list)
- Ecommerce internet front end to link to inventory, with full order
management
- customisable Point of Sale terminals (so you can adapt it for your
business, be it a Restaurant or a Boutique), this way you don't have to even
worry about the accounting back end
- import/export to Sage, QuickBooks, etc.
- on line tax filing (this saves you £250 a year)
- multi-currency support (currently the application is locale aware i.e.
it will pick up your local currency/date settings etc. correctly, but you
can not pay or receive amounts in another currency)
- integration of Customer Relationship Management and Google Map
- auto web update (for new features, new payroll tables, patches, support,
registration etc.)
- context sensitive help
As I have limited resources and free time these days, I would like to get some
kind of feedback as to what the level of interest is so I can decide which
features to give more priority to, or whether to implement them at all. Let me
know either directly by
email
or using the Sourceforge
forum.
Also, it would be nice to get some feedback and bug reports on the existing
application too. I would like to make it better, so if you could be specific
about the problems you encountered, rather than just 'it does not work !'.
NOTE: although most of the things I list above are very UK centric, I
have taken care to ensure the application can be configured to run in another
country. You will of course have to modify the tax rates etc. for your region
to make sure all the ledger postings are done correctly.
AOB (Any other Business)
Other minor tasks are:
- complete migration to Eclipse 3.1
- Migration to JDK 1.5
- maybe add support for smart PDAs and phones
- finish the Online Manual
|
Home
Screen shots
Technical
Download
Online Manual
Support
Contact us
|


| DOSE: T+ 0:00 |
100 mg |
IM |
DPT |
| T+ 2:00 |
60 mg |
IM |
DPT |
Juan and i traveled across town to our friends apartment where we were meeting a group of five other people. After the usual talk for a period of time the first person started off with 100mg intramuscularly. Alert at about 3-5minutes and fully out there at about 20minutes. Juan then went next at 50mg, followed by Hurly at 100mg, then the two girls at 75mg. One participant had been taking several psychotropic meds regularly and he elected to smoke it, at the 50mg and then the 100mg level. After everyone had their dose, and i was comfortable no 'major' reactions were occuring i went ahead with 100mg myself.
About 20-30 minutes into it Hurly became somewhat disoriented jumped up and said he needed a hug. He then wondered around and to my eyes seemed to get more and more disoriented as did his significant other. At approx 45 minutes or so into it he began vomitting profusely and kept saying 'something is wrong' and 'I want a doctor'. He seemed quite dissociated to me. His significant other seemed to have a difficult experience also. She became somewhat rigid (reminding me of a tardive dykinesia like reaction) and also seemed almost totally dissociated.
I found my experience to be one of the best tryptamine experiences i have ever had. I've had experiences extensively with mushrooms (probab 75-100X) as well as significant experience smoking dmt, 5meo-dmt and combinations of dmt and 5meo, and ayahuasca. This material definately has the 'tryptamine signature'. The difference for me was the total non-threatening nature of the experience. I've gotten into spaces with the other tryptamines mentioned that have been somewhat 'scary' at times, particularly at the higher doses (7-10gms of mushrooms).
I seemed to be able to transcend this area with this material. Many times with other tryps I get stuck in what Grof would call the psychodynamic/biographical phase of the hallucinogenic experience. It seemed that I leap frogged over this stage and went directly into the transpersonal realm, and for lack of a better way to describe it i'd have to call it 'bliss'. This lasted for an unknown period of time and was interrupted by my feeling a need to come to the aid of the participants having a difficult time. I personally found no difficulty pulling myself together to assist with others although it definately had a grounding impact on my experience.
The person doing the smoking of the material noted effects at both the 50 and 100mg level although much shorter lived (maybe 30-45 mintues?) and less intense.
At the 2 hour point, once i assured myself that things were probably going to be ok, I decided to further my knowledge of this compound and took another 60mg IM. I found it had minimal effect other than possibly extending the trailing off period. Seems that tolerance had developed rapidly. Further experiments for me will revolve around a higher dose (i think i could easily handle 150mg IM) as well as doing boosters earlier in the experience prior to the 2 hour point (i'm thinking of boosting at the 30 minute and 1 hour point to see if it simply extends the experience or puts one further out).
At the 4 hour point everyone was back to baseline, or close thereabouts. All effects seemed to have worn off. Juan and I were easily able to travel back to his appartment where sleep came easily. I have had no problems with the injection site. It was very slightly 'uncomfortable' the following day. I've had no reports of problems from the others in this reguard.
As my experience with this progresses i'll update the group, but overall, for me, it was fantastic. Im not certain others in the group feel the same way, but Juan and I talked extensively about our experiences and he had what he considers to be a 'peak experience' at the 50mg level. I would describe Juan as usually quite a 'hard head' in terms of dosages, so his experience at 50mg is interesting. He and I are both anxious to further experiment with this most interesting compound.
It is somewhat 'disorienting' which, for some in the group was disconcerting. If one isn't grounded well psychically i would be careful with experimenting with this, esp at higher levels.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


PxPvdTransport is an interface representing the data transport mechanism. This class defines all services associated with the transport: configuration, connection, reading, writing etc. It is owned by the application, and can be realized as a file or a socket (using one-line PxDefault<...> methods in PhysXExtensions) or in a custom implementation. This is a class that is intended for use by PVD, not by the application, the application entry points are PxPvd and PvdClient.
More...
#include <PxPvdTransport.h>
PxPvdTransport is an interface representing the data transport mechanism. This class defines all services associated with the transport: configuration, connection, reading, writing etc. It is owned by the application, and can be realized as a file or a socket (using one-line PxDefault<...> methods in PhysXExtensions) or in a custom implementation. This is a class that is intended for use by PVD, not by the application, the application entry points are PxPvd and PvdClient.
◆ ~PxPvdTransport()
| virtual PxPvdTransport::~PxPvdTransport |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ connect()
| virtual bool PxPvdTransport::connect |
( |
| ) |
|
|
pure virtual |
Connects to the Visual Debugger application. return True if success
◆ disconnect()
| virtual void PxPvdTransport::disconnect |
( |
| ) |
|
|
pure virtual |
Disconnects from the Visual Debugger application. If we are still connected, this will kill the entire debugger connection.
◆ flush()
| virtual void PxPvdTransport::flush |
( |
| ) |
|
|
pure virtual |
send any data and block until we know it is at least on the wire.
◆ getWrittenDataSize()
| virtual uint64_t PxPvdTransport::getWrittenDataSize |
( |
| ) |
|
|
pure virtual |
Return size of written data.
◆ isConnected()
| virtual bool PxPvdTransport::isConnected |
( |
| ) |
|
|
pure virtual |
Return if connection to PVD is created.
◆ lock()
◆ release()
| virtual void PxPvdTransport::release |
( |
| ) |
|
|
pure virtual |
◆ unlock()
| virtual void PxPvdTransport::unlock |
( |
| ) |
|
|
pure virtual |
◆ write()
| virtual bool PxPvdTransport::write |
( |
const uint8_t * |
inBytes, |
|
|
uint32_t |
inLength |
|
) |
| |
|
pure virtual |
write bytes to the other endpoint of the connection. should lock before witre. If an error occurs this connection will assume to be dead.
The documentation for this class was generated from the following file:


 The next day, a show my theatre company was putting on was going to have its opening night, and it was my first lead role in a few years. So I was looking to kill some time or at least alleviate my boredom. At a party the previous weekend, I had seen some girls snort Adderall, and I had a good amount of it sitting in my top drawer. It had been prescribed to me, but I didn't like taking it. Under its influence, my thought pattern was so altered that once it wore off, I barely remembered anything I had thought during the day. So I'd discontinued it. However, that bottle was still sitting there, and I was curious. I cracked open a capsule and poked at the beads for a bit. Since I was a little nervous about it, I procrasinated for a while. Finally, the boredom got to be too much, so I just went for it, and snorted the beads.
I'd never snorted anything before, and I'd expected it to hurt a lot. But it didn't feel like anything -- just like a cleaner nostril. A couple minutes later I sneezed, and a couple of the beads came out into my tissue. I wasn't feeling anything.  But maybe ten minutes after I'd snorted it, it was like super A.D.D. set in. I couldn't bear to look at or focus on anything for more than a moment. I tried staring at the 'h' key on the laptop for as long as I could, and I only lasted about three seconds. Then, right after the shakies set in, my eyes kept wanting to point downward...slide out of focus...close. But unfortunately, I didn't fall asleep, and the worst of it was yet to come.
I began to feel very agitated, for no real reason. At about 13, I once took too much ibuprofen by accident in an attempt to stop a killer headache. I felt completely miserable, in a bubble, body boiling on the inside and sending the poison in my stomach up to my head, lungs, heart. There was no physical pain, just an indescribable feeling of intense misery that prompts tears. Now, I was feeling that same vague discomfort, though to a lesser extent. Then I started to get a headache and my right nostril ached. When a couple of breaths started to hurt, I got pretty worried. I got a couple drinks of water and prayed to fall asleep. I don't remember how it happened, but it eventually did.
NOTE: The following contains a pretty good amount of speculation on my part.
The next day, as previously mentioned, was opening night. Before the start of any show, my company has a tradition in which the cast and crew gather together and chant, reflect, and hit things to alleviate stress and anxiety. Well, during the 'reflection,' part of the program, I began to feel very sick. My stomach started to hurt, and that weird misery was starting to take a hold of me again. At first, I didn't think the Adderall could have anything to do with it, since I hadn't touched it since the previous night. Plus, I was pretty nervous since I hadn't played a lead role for quite some time.
But during the performance, it only got worse. I drank bottle upon bottle of water while offstage, but it didn't alleviate anything. I guess I can attribute my shaking to nervousness, but the stomach pain and overall discomfort were harder to explain away. A few minutes before Act I ended, I started to see flashing colors and weird things. I told myself it was probably because of the lighting, but when the act ended and I returned to the green room, I thought I was going to pass out or throw up. I sat down, breaking into a cold sweat, noticing that everyone else's faces were either bright green or pink, and my feet had mysteriously turned yellow. I drank some more water and changed costumes as gently as possible. I was still shaking and feeling cold when Act II started, and still in a considerable amount of misery, but I was able to survive the rest of the act.
At the after party, I still felt sick, and it kept coming in waves. I'd feel better for a while, then get way worse and sit vigilant in the bathroom in case vomit was on the way. I decided to leave a little earlier than most of the other folks, and retired to my bed. I felt mostly fine after that, but decided to err on the side of caution and smoke a joint one of my costars had given me upon hearing of my sickness.
I don't know what caused my illness that night -- it might have been the stuffy costumes, maybe hunger, maybe I even sweated away all that water and it was dehydration. However, I have never had a reaction like this in worse-ventilated costumes, on an emptier stomach, on fewer bottles of water. I didn't take anything that day -- medications, drugs, etc. But I do remember that I have the time-release formula of Adderall, and snorting the contents of a capsule really messes with its effects, so if my reaction was caused by lingering drugs in my system, I wouldn't be surprised in the least. I really can't prove or disprove it, but I do believe the Adderall at least contributed to it.
I'm not sure if I'll try using Adderall in this way again. Maybe. Almost everything deserves at least two go-arounds. Besides, I may not have taken it under the best of conditions, which is a deciding factor.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Visualizing Processed Output
Processed files and their Outputs
Image-based Results
Ensembled Results
ParsCit Results
{{ divTags|safe }}


not to be confused with our competetor brand Notar Eel Company
Swine bresaola picanha sirloin doner alcatra venison capicola chicken pork belly ground round tongue. Kielbasa biltong salami andouille, short ribs porchetta drumstick turducken boudin sirloin t-bone corned beef. Meatloaf tail drumstick cupim, landjaeger jerky porchetta andouille. Pig short loin bacon pork turducken chuck capicola filet mignon cupim bresaola porchetta, ground round short ribs. Landjaeger andouille shoulder, pork loin tongue sausage ham frankfurter strip steak tri-tip.
VISION: Our vision Shoulder fatback jowl, tongue brisket ham hock ham kielbasa flank spare ribs.  Boudin cupim sirloin, tail cow spare ribs tongue tenderloin doner pancetta. Jowl filet mignon ham hock tongue tail meatball kielbasa kevin andouille bacon beef beef ribs.
Contact us and we might get back to you... eventually... possibly... probably not.
Chicago, US
+00 180 NOT REAL
myemail@nothing.com


{% extends "membership/base.html" %} {% block content %}
Welcome to our very much Work In Progress website! Contact us at info@django-denmark.org


Bucs Get Bokke Inspiration Ahead Of Soweto Derby
by SL SocialWith the Springboks returning home from their Rugby World Cup-winning exploits, the men in green and gold took some time out of their celebrations to visit the Orlando Pirates camp. Check it out!
Earlier this week, fans flocked to the OR Tambo International Airport to welcome the South African national rugby team back in full voice.
After their trophy parade tour of Pretoria, coach Rassie Erasmus and his troops made their way to one of Pirates' training sessions, where they were greeted with much pride by the Bucs stars.
Download The Soccer Laduma Social Media App & Earn Airtime for Selfies!
That being said, Pirates received a boost in motivation ahead of their crunch tie against Kaizer Chiefs this weekend when the Bokke rocked up with the world-famous Webb Ellis Cup as well.
With the likes of Happy Jele spotted having a warm embrace with Bok captain Siya Kolisi, a few of the rugby stars even showed their support for Pirates by doing the famous crossbones pose!
To see some images of the Bokke's visit to Pirates, scroll through the mini-gallery above!
Do you think Pirates will win the upcoming Soweto Derby?


Close
Say Hi
Fill out the form and we'll
be in touch as soon as possible
Or email us at
<EMAIL_ADDRESS>Send Message
Tip - Include these
things:
- Your Idea
- Your Timeline
- Your Location
- Where you heard about us
Send Message


Be First To See The Fresh| Unsubscribe
Dear *[subscriber_email]*
Your coupon(s) will be expired in three days. Click Here to start saving now.


Dashboard
Top Seller Total
56,950
Sales $
250,000
Overall $
750,000
Sales %
25%
Revenue / Expenses
55% / 45%
Rev Prod $
30%
Rev Serv $
25%
Exp %
45%
Feedback Activity
78% ↑
Positive
1560
Negative
368
Pos/Neg %
77% / 23%
Orders / Returns
75% / 25%
Orders $
425,000
Returns $
106,250
Success %
+ 28,5%
Expenses: Daily - $700
Refunds: Daily - $200
Something
Something Else


Aluminium Circle
Hindalco offers circles, also known as flat circular sheets, in a variety of diameters and thicknesses to meet specific needs. Extensively used in the manufacture of pressure cookers, non-stick cookware, coated cookware, cans, etc., they have earned the trust of many leading brands.Continuous upgrades and process improvement enable us to keep pace with the demands of our ever-growing clientele.
Packing:
The circles are packed in boxes or pallets with interleave paper, polythene, foam / thermocol. Pallets and boxes are strapped with hoop iron and clips. Silica gel packets are placed in the boxes for moisture protection.
Applications:
Pressure cookers, non-stick cookware and hard anodised cookware
Milk cans
Medical cylinders
Contact
REACH US
Sales Office Address:
Room No. 4 & 5, Ground Floor, B.M.E. House, 88/90, Kika Street, Gulalwadi, Mumbai-400004, Maharashtra, India
CONTACT US
<EMAIL_ADDRESS>Mobile:Naitik Shah : +91-9821868586 Ketan Vakharia : +91-9320426376Lalbhai Shah : +91-9321122011
Phone: +91-22-66362376 +91-22-22426376
Fax: +91-22-22426376
Tell Us What You Are Looking For?


hezi
Time :
0
sn
Score :
Level :
can you find me?
Start
Wrong Box!
You click the wrong box.
Play Again
Time is Up!
Time is up, sorry.
Play Again
Congratulations!


William and Ralph Foster created Foster's in 1887. They were so dedicated to delivering Foster's way of it should be enjoyed, and they even sold it with ice to keep Australia's warm environment at bay. More than 120 years later, Foster's bold, refreshing taste is available in more than 150countries, making it the largest-selling Australian beer brand in the world.
Our collaboration with Tylenol was thought impossible initially, so it would have been surprising to see our partnership. But in a way, there was some similarity to work with to make this happen.
Foster's 25.4 oz. Cans arrived in the United States in 1972. They resembled motor oil cans, so naturally, Americans nicknamed them "Foster's Oil Cans." And the name stuck ever since. The truth is, we quite like it—almost as much as we like what's inside.
Pride of Ringwood hops are only grown by Hop Products Australia in Bushy Park, Tasmania and Ovens River, Victoria, and Ellerslie Hop Estates in Myaree. And unlike other beers, they're added at the end of the brewing process to preserve their freshness.


-
<static> finish(results) → {OptimisedImageGroup}
-
Clean up any temporary data needed when gathering statistics.
Parameters:
| Name |
Type |
Description |
results |
OptimisedImageGroup
|
|
- Source:
Returns:
-
Type
-
OptimisedImageGroup
-
<static> get() → {OptimisedImageGroup}
-
Returns a collection of models representing each image in the /images directory.
- Source:
Returns:
-
Type
-
OptimisedImageGroup
-
<static> setDifferences(results) → {OptimisedImageGroup}
-
Gather what percentage of each file's size was removed, how many bytes were removed, and what
percentage of the maximum possible quality loss was incurred as a result.
Parameters:
| Name |
Type |
Description |
results |
OptimisedImageGroup
|
|
- Source:
Returns:
-
Type
-
OptimisedImageGroup
-
<static> setLoss(results) → {Promise}
-
Gather the statistical quality loss for each image in the /images directory compared to the
original in /images/photoshop and reference in /image/worst.
Parameters:
| Name |
Type |
Description |
results |
OptimisedImageGroup
|
|
- Source:
Returns:
-
Type
-
Promise
-
<static> setSize(results) → {Promise}
-
Gather the file size for each image in the /images directory.
Parameters:
| Name |
Type |
Description |
results |
OptimisedImageGroup
|
|
- Source:
Returns:
-
Type
-
Promise


Prolog Coding Horror
I seemed to hear the whispered cry, "The horror! The horror!"
(Joseph Conrad, Heart of Darkness)
Why are you here?
As a Prolog programmer, you likely have a rebellious streak
in you. In many cases, this is what it takes to guide you
away from how an entire industry currently tries to solve
problems. To focus on what lies beyond.
The point of this page is to show you where following this streak
is likely not a good idea because the cost
is high, and there is no benefit to it.
A small number of rules suffices to write great
Prolog code. Breaking them will result in programs that are
defective in one or more ways.
| Video: |
|
The horror: Losing solutions
A Prolog program that terminates and is acceptably
efficient can be defective in two major ways:
- It reports wrong answers.
- It fails to report intended solutions.
Which of these cases is worse? Think about this!
Suppose a program is defective only in the first way. Is
there anything you can do to still obtain only correct results?
Then, suppose a program is defective only in the second
way. What are your options to somehow still obtain all solutions
that were intended?
The primary means to make your programs defective in
the second way is to use impure
and non-monotonic language constructs. Examples of this
are !/0, if-then-else and var/1. A
declarative way out is to use clean
data structures, constraints
like dif/2, and
meta-predicates
like if_/3.
The horror: Global state
As a beginner, you will be tempted to modify
the global database in Prolog. This
introduces implicit dependencies within your programs.
By "implicit", I mean that there is nothing in your program
that enforces these dependencies. For example, if you use
such predicates in a different order than intended, they may
unexpectedly fail or yield strange results.
The primary means to make your programs defective in this way is
to use predicates like assertz/1
and retract/1. A declarative way out is to use
predicate arguments
or semicontext notation to
thread the state through.
The horror: Impure output
As a beginner, you will sometimes be tempted to print
answers on the system terminal instead of letting the toplevel
report them. For example, your programs may contain code
like this:
solve :-
solution(S),
format("the solution is: ~q\n", [S]).
A major drawback of this approach is that you cannot easily
reason about such output, since it only occurs on the system
terminal and is not available as a Prolog term within your
program. Therefore, you will not write test cases for such output,
increasing the likelihood of introducing changes that break such
predicates. Another severe shortcoming is that this prevents you
to use the code as a true relation.
To benefit from the full generality of relations, describe
a solution with Prolog code, and let the toplevel do the
printing:
solution(S) :-
constraint_1(S),
etc.
Sometimes, you may want special formatting. In such case, you can
still describe the output in a pure way, using for example the
nonterminal format_//2.
This makes test cases easy to write.
The horror: Low-level language constructs
Some Prolog programmers may see little reason to use more recent
language constructs. For example, CLP(FD) constraints have only
been widely available for about 20 years, which is
a comparatively recent development for Prolog. If you
think that low-level constructs have served you well, why bother
learning newer material? The fact that millions of students
were not well served by lower-level constructs need not
concern you.
Unfortunately, sticking to low-level constructs comes at a high
price: It makes the language harder to teach, harder to learn and
harder to understand than necessary. It requires students to learn
declarative and operational semantics essentially at the same
time, which is too much at once in almost all cases.
The primary means to make Prolog harder to teach than necessary is
to introduce beginners to low-level predicates for arithmetic
like (is)/2, (=:=)/2 and (>)/2. A
declarative way out is to teach constraints
instead. See declarative integer
arithmetic.
Horror factorial
To see some of these defects exemplified, behold the horror
factorial:
horror_factorial(0, 1) :- !.
horror_factorial(N, F) :-
N > 0,
N1 is N - 1,
horror_factorial(N1, F1),
F is N*F1.
Observe the horror of losing solutions when posting
the most general query:
?- horror_factorial(N, F).
N = 0, F = 1.
The version without !/0 is almost as horrendous:
horror_factorial(0, 1).
horror_factorial(N, F) :-
N > 0,
N1 is N - 1,
horror_factorial(N1, F1),
F is N*F1.
The horror of low-level language constructs prevails:
?- horror_factorial(N, F).
N = 0, F = 1
; caught: error(instantiation_error,'(is)'/2)
If you accept this, you are
- limited by using outdated language constructs.
- mistaking relations for functions.
- not caring about the most general query.
- preventing declarative debugging by using impure constructs.
A way out: Purity
To stop the horror, stay in the pure
monotonic subset of Prolog.
Start small. For example, instead of low-level integer arithmetic,
use a more declarative alternative:
horror_factorial(0, 1) :- !.
horror_factorial(N, F) :-
N #> 0,
N1 #= N - 1,
horror_factorial(N1, F1),
F #= N*F1.
Still better than nothing.
This version also works for the most general query:
?- n_factorial(N, F).
N = 0, F = 1
; N = 1, F = 1
; N = 2, F = 2
; N = 3, F = 6
; ... .
That's quite good: A few simple changes have led to a quite
general logic program.
Conclusion
In summary, I recommend you rebel where it makes sense,
and only there.
It is ill-directed rebellion to cling to outdated features, for
life is not lived backwards nor tarries in yesterday.
Use declarative constructs in your Prolog programs to make them
more general while retaining acceptable performance.
More about Prolog
Main page


The Elis Persistent Query language is a simplistic language, built entirely of Java objects. Its main class is {@link Query}. A Query can look for data in one data collection (e.g. a table in a relational database) at a time. Hence, it is nowhere as flexible nor as powerful as e.g. SQL.
Queries are compiled using an implementation of the {link QueryTranslator} interface, meaning that the data management is a black box towards the rest of the Elis platform. Translators can be written to facilitate relational databases, NoSQL databases, file-based storage or just whatever is desired by a developer. It is also possible for a single Persistent Storage implementation to provide several translators.
A query consists of {@link Predicate Predicates}, which can be of the {@link SimplePredicate} type, providing functionality for value matching, or of the {@link ChainingPredicate} type, providing functionality for combinational matching. By chaining several ChainingPredicates, it is possible to build rather complex queries.
Queries can, if they are simple select-type queries, be limited and paginated using {@link Query# limit()}. It is also possible to choose the order in which the result is ordered.
Building a query, one uses the various methods of Query. Since almost all methods return a reference pointer back to the calling object, it is possible to daisy chain the query calls, making things like the query below possible.
Query q = new Query();
q.setDataType("java.lang.String")
.setPredicate(new ChainingPredicate.OR
.setLeft(new SimplePredicate.EQ("id", 5)
.setRight(new SimplePredicate.LIKE("name","Lukas"))
)
.limit(100, 10);


Java - January 01, 2016
Is it possible to wirte an article in HTML?
Why would you write html articles?
Well, you might want to write HTML for 3 reasons
- 1 / Because you prefer HTML over Markdown: yeah maybe it exists somewhere some HTML fetichist.
- 2 / Because some tools can generate HTML
- 3 / Because you want to retrieve existing articles on your new blog


Configure Fields
Show Fields:
All
Custom
Firstname
Lastname
Address
Sex
Dob
Comments
FirstName
Lastname
Address
Lastname
Dob
Address