Whether you’re a seasoned pro or just starting out in the business, there are some basic tools that belong in your kit. Our advice is to do your homework before making any purchase and to consider the tools of your trade as an investment. After all, it’s your livelihood that’s at stake. To make things easy, we’ve come up with a list of items that are absolutely essential for building the perfect and a healthy hair.
| Brand | Features | Type | How to use | Price | |
|---|---|---|---|---|---|
| Philips HP8230/03 | Features six-speed heat settings to provide full control. 2,100 watts professional power for similar results to beauty salon. Perfect styling thanks to thin styling nozzle. Equipped with an airflow filter that can be removed for quick and easy cleaning. | Philips | Be sure to move the hair dryer constantly throughout the drying process, and do not fasten it to a single strand of hair for a long time. | QR 198 | |
| Sonashi SHD-3008 | Feautures both hot and cool air. Equipped with a 2012 AC/cold air engine. Two-level settings for heat and airflow. Two-level settings for both airflow speed and heat. Power: 2000 WATTS 220-240 volts ~50/60 Hz | Sonashi | It is used by connecting it to electricity and works with a stop and run button and has the property of raising the heat and reducing it | QR 69 | |
| Braun Satin Hair 5 HD585 | Built-in design hairdryer Satin Hair 5 - HD-585. Fast and easy to dry, Brown Satin Hair Power Production dryers combine strength and lightweight design for non-include styling possibilities. Facility with dispenser for aromatherapy essential oils. Ionic property for clearly less rough hair. Easy to styling. Comfortable and lightweight design. | Braun | Press the cold air splash button for a few seconds to get out of your hairstyle, this will cool your hair and stabilize the styling. The cold air splash also protects your hair. | QR 185 | |
| Revlon 1875W | Titanium technology transfers heat quickly for fast drying and styling while helping reduce over-drying to fight frizz and enhance shine. 3-Heat/2-speed settings for true customization for all hair types and textures. | Revlon | Press the play button then wait seconds, spread the airflow on your hair and comb your hair at the same time. | QR 109 | |
| KIPOZI Hair Dryer | Portable Weight and Compact Size. Attractive shape, light weight, easy to carry and store, perfect for home and travel, convenient use at any time in any place. Auto Leakage Protection. Good and safe for hair care.. The ideal personal care for family, More secure in use. | KIPOZI | Press the play button, then choose the heat you want, spread the airflow on your hair to make your hair softer. | QR 239 |
| Brand | Features | Type | How to use | Price | |
|---|---|---|---|---|---|
| Braun | Wide sheets, Wide panels To achieve silky and flowy hair is not difficult and it doesn't take much time, Mechanical temperature regulator. | Braun | Use them with a paddle brush or comb to soften, wave or curl hair, avoid lifting them to high-level temperatures | QR 186 | |
| Sanford SF9768HS | Simple and easy to describe and a great fully touched structure, heating and quickly restoring heat. | Sanford | It works through an electrical cord, avoiding adjusting the temperature of the hair dryer to the highest level , grap a piece of your hair, and then straighten it out | QR 84 | |
| Philips HP8321 | Perfectly smooth hair. Prepare for any occasion and get perfectly smooth hair thanks to 100 mm long ceramic tourmaline sheets. Philips hair smoothies help you get the right hair shape at high speed thanks to a running temperature of up to 210°C and quick heating time. | Philips | Make sure that always blow dry your hair before straightening, grap a piece of your hair, and then straighten it out | QR 165 | |
| Sam Villa SLEEKR | Straightening iron that quickly smooths and curls hair, providing incredible shine and smoothness. | Sam Villa | Use with a paddle brush or comb to smooth, wave or curl hair. | QR 439 | |
| REVLON Salon Straightener | Short plates ideal for getting close to the scalp and the smoothest trending looks Advanced copper 3x Ceramic PLATE technology helps reduce damage from over-styling through even heat distribution Unique true-grip rounded floating plates provide total contact for consistent results | REVLON | Press the play button, choose the right heat for your hair, grab a piece of your hair, and then straighten it out. | QR 106 |
| Brand | Features | Type | How to use | Price | |
|---|---|---|---|---|---|
| Sun Bum Blonde | This hairspray infused with our signature Fluid-Fix Technology for flexible hold and natural movement. The Spray also has refreshing notes of Rose and Jasmine HAIR SPRAY FOR VOLUME: salon-quality, micro-fine finishing spray keeps hair fresh throughout the day | Sun Bum | Spray on your hair five minutes after washing then comb your hair | QR 64 | |
| Babunj Spray | CURLS & WAVES STYLING CREAM. Our curly and wavy haired crew loves this lightweight styling cream! It delivers light hold with long-lasting, frizz-free, shiny curls while protecting your hair from UV rays without the crunch. | Carasa | Shake well,spray on the hair then comb your hair | QR 59 | |
| Pantene Hairspray | STYLE WITH STRENGTH Pantene Pro-V Volume High Lift Hairspray locks in volume, body and fullness GOES ON SMOOTH Our nutrient-infused formula dries quick for non-sticky style | Pantene | It's best to use after hair washing, Shake can well, Spray evenly on dry styled hair to finish | QR 54 | |
| Kenra Artformation | Provides volume and styling control. Long-lasting firm hold. Fast-drying | Kenra | Shake Well. Hold can 8–10 inches from hair, and spray | QR 62 | |
| John Frieda Frizz | Protects from frizz while enhancing natural curls and waves without stickiness or heat styling. | John Frieda | Shake well and spray liberally on damp hair to distribute evenly. Scrunch hair in small sections to help create definition. Air dry hair or blow dry using a diffuser. For second day hair: spritz and scrunch hair to reinvigorate wilted curls or waves. | QR 24 |
| Brand | Features | Type | How to use | Price | |
|---|---|---|---|---|---|
| Hair Steamer EZBASICS | Professional quality hair care & treatment steamer. Provides valuable nutrients to your hair, prevents breakage and split ends, treats brittle & damaged hair. Moisturizes your scalp to prevent dandruff and give your hair that full, healthy & shiny look. | EZBASICS | Use the steamer for five minutes before applying your deep conditioning treatment. This will give each cuticle a moment to open up. | QR 290 | |
| KINGDOMCARES | Powerful atomizer generates ultra-fine mist that can be quickly and easily absorbed by hair or skin, it can help facial mask processing and hair steaming. Standard salon hair care hot mist steam effectively promotes hair treatment cream absorption. Besides hair and skin care, the large capacity steamer can be used for interior humidifying and extra chamber to warm towels. | KINGDOMCARES | When put the dried flowers or cotton pad into the pollen box, please DO NOT let them block thesteamer nozzle. | QR 230 | |
| Topbarber Ionic Hair | Allows you to enjoy the spa at any angle. You can add your favorite essential oils to achieve different good effects. Simple buttons has two functions: Ozone and steam Safety water line setting, it will automatically power off on the situations of over or less water capacity. Portable and desktop design, user-friendly. | Topbarber | Start your wash with a steam and end with more steam. Apply your conditioner and then use the steamer again for a full 15 minutes | QR 256 | |
| Elitzia ET1409W | High temperature and cold mist dual water tank design, atomization tablets will not be affected by the effects of high temperature, so that the atomization sheet life is longer. Large-capacity water tower design, can work 4-6 hours after filled with water, use faster, more convenient, steam will not stop if pour water during use. | Elitzia | Open the water valve after use, pour out the remaining water in the water tank and clean it to extend service life. If the room temperature is below 12℃, pour pure water not higher than 40℃. Pay attention to your hands and feet away from the drain to prevent burns. | QR 2,419 | |
| Conair 1875 Watt Pro | 875 watts for powerful drying Extra-large hood accommodates a set of jumbo rollers Variable airflow settings for maximum styling comfort Even airflow distribution Adjustable height 2 heat/speed settings Carry handle 6-foot long cord stores in base. | Conair | Turn it on and sit under it to deep condition or simply to dry your hair | QR 146 |
| Brand | Features | Type | How to use | Price | |
|---|---|---|---|---|---|
| Freatech | Dry and wet manual head scalp massage brush (no battery required) | FReatech | Clean your hair roots and massage the scalp, stimulate scalp cells for scalp treatment | QR 25 | |
| Vebiys Hair Scalp | Get a relaxing massage every time you wash your hair. It is small in size and easy toplace and carry | Vebiys | MANUAL OPERATION - Scalp scrubber for hair does not require batteries and is completely water proof. | QR 21 | |
| Vitagoods Scalp Massaging | Take your shower or bathtime to the next level by incorporating the Vitagoods Scalp Massaging Shampoo Brush to your routine. It lets you enjoy the benefits of a scalp massage the fast and easy way! WATER-RESISTANT CONSTRUCTION | Vitagoods | Apply a small amount of your shampoo to your scalp and distribute through the roots of yours> hair. Press the on/off button to activate the vibration to desired speed on your Scalp massaging shampoo brush. hold the massager in the palm of your hand with the rubber tips | QR 89 | |
| Hair Scalp Massager | Shampoo brush with perfect grip handle to fit your hand comfortably (Manual with no battery required & Waterproof) Scalp massager with soft thick silicone bristles stimulate blood flow to the scalp and oil glands (Deep clean and exfoliate the scalp) | Maxsoft | Massage your scalp and deep clean scalp with less shampoo and conditioner | QR 32 | |
| Vanity Planet Scalp | REJUVENATING & CLEANSING SCALP MASSAGER: Get all of the benefits of a salon scalp massage in your own shower. including dense and thick hair, braids, extensions, and weaves. For wet or dry use. Battery-powered (battery not included). | Vanity Planet | Massage your scalp and deep clean scalp with less shampoo and conditioner | QR 73 |
| Brand | Features | Type | How to use | Price | |
|---|---|---|---|---|---|
| Tifara Beauty | Cordless, Non electric, Heat activated, Microwaveable | Tifara beauty | No batteries or cords are required to power the cap | QR 54 | |
| PrettySee | Upgarde Design - Equipped with longer and wider size, much more suitable for thick andcurly hair. | PrettySee | After DIY dyeing the hair put on the shower cap and then our heating helmet for about 15 min | QR 95 | |
| Blue Floral | Self hair conditioning care at home Make your hair look more healthier and moisturized | Y.F.M | Wash your hair first with shampoo. Apply oil or conditioner evenly to hair. then wear the shower cap. Connect the plug to power, switch to the stall you want. The hat will start to heat, it will be better to last 15-20 mins. The button divided into 3 choices, (low/turn off/high) you can choose which suitable according to your need. The proper heating allows you to get the best effect of the hair. | QR 74 | |
| Luckyfine 110V | Convenient to use, surely be an indispensable tool to heal your hair at home. It comes with a printed shower cap. | Y.F.M | Put mask or hair oil for five minutes in the shower and then wash off, that sit with them for 45 minutes under the thermo-cap. Even a weekly course (15-30 minutes at a temperature of 45-65 ° C) of revitalizing and nourishing masks and oil serums helped to restore the hair's softness, smoothness and shine. | QR 69 | |
| 110V Electric Hair Cap | The inner embedded plastic film is waterproof and anti-electricity, and it's detachable and convenient to be washed. Two level of temperature controlling, you can adjust to your favorite temperature. | Holady | Put mask or hair oil for five minutes in the shower and then wash off | QR 49 |


The Xi Project Modules¶
The Xi(Ξ) Term Module¶
| copyright: | Copyright 2016 Roger Bishop Jones |
|---|---|
| license: | BSD 2-Clause Licence, see LICENCE for details. |
I did consider making this into a class, but I couldn’t figure out what the benefit would be, so for the time being its just a module defining various functions for making taking apart and otherwise processing terms.
The terms are represented by triples. The first element is a number which tells you whether the term a variable, an abstraction or an application.
In a variable the second element of the tuple is its name and the third is zero
In an abstraction the second element is the name of the variable being bound and the third is the body of the abstraction (a term).
In an application the second and third elements of the tuple are the function and the argument (both terms).
-
xit.
DestTerm
(t)[source]¶ - disassembles a term, returning a 3-tuple in which the first element
- is 0, 1 or 2 according as the term is a variable, abstraction or application, and the next one or two elements are the immediate constituents.
>>> DestTerm(MkApp(MkVar("∀"), MkVar("Ξ"))) (2, (0, '∀', 0), (0, 'Ξ', 0)) >>> DestTerm(MkVar("Ξ")) (0, 'Ξ', 0)
-
xit.
Frees
(t)[source]¶ returns the set of free variables of a term
>>> Frees(MkApp(MkVar("∀"), MkVar("Ξ"))) {'Ξ', '∀'} >>> Frees(MkVar("Ξ")) {'Ξ'} >>> Frees(MkAbs("∀", MkVar("Ξ"))) {'Ξ'} >>> Frees(MkAbs("Ξ", MkVar("Ξ"))) set()
-
xit.
IsAbs
(t)[source]¶ tests whether a term is an abstraction
>>> IsAbs(MkAbs("∀", MkVar("Ξ"))) True >>> IsAbs(MkVar("Ξ")) False
-
xit.
IsApp
(t)[source]¶ tests whether a term is an application
>>> IsApp(MkApp(MkVar("∀"), MkVar("Ξ"))) True >>> IsApp(MkVar("Ξ")) False
-
xit.
IsVar
(t)[source]¶ tests whether a term is a variable
>>> IsVar(MkApp(MkVar("∀"), MkVar("Ξ"))) False >>> IsVar(MkVar("Ξ")) True
-
xit.
MkAbs
(v: str, b)[source]¶ constructs a term which is an abstraction
>>> MkAbs("∀", MkVar("Ξ")) (1, '∀', (0, 'Ξ', 0))
The Xi Interactive Theorem Prover¶
| copyright: | Copyright 2016 Roger Bishop Jones |
|---|---|
| license: | BSD 2-Clause Licence, see LICENSE for details. |


Rashmi Mali
President
Babita Kumari
Vice President
Param Kalane
Secretary
Gaurav Kulkarni
Management Head
Pooja Deshpande
Event Coordinator
Tejas Labde
Event Coordinator
Sakshi Garad
Marketing Head
Rohit More
Marketing Coordinator
Prerana Roy
Marketing Coordinator
Riya Ramteke
Documentation Head
Rutuja Gaikwad
Documentation Coordinator


Web Designer
"Experience in designing websites for clients in different industries. Able and eager to adapt and deal with problems as they arise."
Web Developer
"Extensive experience with designing and developing websites. Developed web-based applications for several of the world's largest companies."
Graphic Designer
"Successfully manage and coordinate graphic design projects from concept through completion. Work closely with clients to create vision, conceive designs."


Deserialization was a lot in the news lately with the Equifax breach being conducted via a deserialization attack in Apache Struts. The combination of using unpatched 3rd party components that have deserialization vulnerabilities can be fatal.
For those interested in learning more about deserialization you can watch the following OWASP Ottawa "Deep Dive" presentation.
$ java -jar ysoserial.jar Y SO SERIAL? Usage: java -jar ysoserial.jar [payload] '[command]' Available payload types: Payload Authors Dependencies ------- ------- ------------ BeanShell1 @pwntester, @cschneider4711 bsh:2.0b5 C3P0 @mbechler c3p0:<IP_ADDRESS>, mchange-commons-java:0.2.11 Clojure @JackOfMostTrades clojure:1.8.0 CommonsBeanutils1 @frohoff commons-beanutils:1.9.2, commons-collections:3.1, commons-logging:1.2 CommonsCollections1 @frohoff commons-collections:3.1 CommonsCollections2 @frohoff commons-collections4:4.0 CommonsCollections3 @frohoff commons-collections:3.1 CommonsCollections4 @frohoff commons-collections4:4.0 CommonsCollections5 @matthias_kaiser, @jasinner commons-collections:3.1 CommonsCollections6 @matthias_kaiser commons-collections:3.1 FileUpload1 @mbechler commons-fileupload:1.3.1, commons-io:2.4 Groovy1 @frohoff groovy:2.3.9 Hibernate1 @mbechler Hibernate2 @mbechler JBossInterceptors1 @matthias_kaiser javassist:3.12.1.GA, jboss-interceptor-core:2.0.0.Final, cdi-api:1.0-SP1, javax.interceptor-api:3.1, jboss-interceptor-spi:2.0.0.Final, slf4j-api:1.7.21 JRMPClient @mbechler JRMPListener @mbechler JSON1 @mbechler json-lib:jar:jdk15:2.4, spring-aop:4.1.4.RELEASE, aopalliance:1.0, commons-logging:1.2, commons-lang:2.6, ezmorph:1.0.6, commons-beanutils:1.9.2, spring-core:4.1.4.RELEASE, commons-collections:3.1 JavassistWeld1 @matthias_kaiser javassist:3.12.1.GA, weld-core:1.1.33.Final, cdi-api:1.0-SP1, javax.interceptor-api:3.1, jboss-interceptor-spi:2.0.0.Final, slf4j-api:1.7.21 Jdk7u21 @frohoff Jython1 @pwntester, @cschneider4711 jython-standalone:2.5.2 MozillaRhino1 @matthias_kaiser js:1.7R2 Myfaces1 @mbechler Myfaces2 @mbechler ROME @mbechler rome:1.0 Spring1 @frohoff spring-core:4.1.4.RELEASE, spring-beans:4.1.4.RELEASE Spring2 @mbechler spring-core:4.1.4.RELEASE, spring-aop:4.1.4.RELEASE, aopalliance:1.0, commons-logging:1.2 URLDNS @gebl Wicket1 @jacob-baines wicket-util:6.23.0, slf4j-api:1.6.4Here are the OWASP Top 10 links for Using Components with Known Vulnerabilities and Insecure Deserialization
Prevalence of this issue is very widespread. Component-heavy development patterns can lead to development teams not even understanding which components they use in their application or API, much less keeping them up to date.
The impact of deserialization flaws cannot be overstated. These flaws can lead to remote code execution attacks, one of the most serious attacks possible.
Once you are logged in you will notice that the application accepts serialized command objects. You can use ysoserial to generate a base64 encoded object and you can use curl to send the object to the application.
curl -H 'Cookie:JSESSIONID=_YOUR_SESSION_ID_' '_COMMAND_PROC_URL_SUBMIT_COMMAND' -H 'Content-Type: multipart/form-data; boundary=----123' --data-binary '------123\r\nContent-Disposition: form-data; name=\"object\"\r\n\r\nrO0ABXNyAApzZXJpYWwuQ2F0mJizcryhARMCAAFMAARuYW1ldAASTGphdmEvbGFuZy9TdHJpbmc7eHB0AApTZXJpYWwgQ2F0\r\n------123--\r\n' -L
commandproc
Java application from a previous challenge so you can generate your own Command objects to create a STOP command.
You'll also notice that you don't absolutely need the code, the app can serialize an object for you however it will only accept commands that have the correct authentication code.
The authentication code is stored in a binary so you can't exfiltrate it with XXE unless you convert it to base64.
openssl enc -aes-256-ecb -in _AUTH_CODE_FILE_ -out /tmp/_YOUR_FILE_NAME.enc -base64 -k _YOUR_SECRET_
file://tmp/
and download your encrypted file.
Be careful to remove the \n inserted by API Gateway in the response to the pinger request.
openssl enc -aes-256-ecb -in /_YOUR_FILE_NAME.enc -base64 -k _YOUR_SECRET_ -d -md md5|base64
will decrypt the authentication code to a base64 string.


Search
Preparing search index...
The search index is not available
sulla
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
"api/model/partial-message"
PartialMessage
Interface PartialMessage
Hierarchy
PartialMessage
Index
Properties
ack
body
broadcast
from
id
invis
is
Forwarded
labels
mentioned
Jid
List
notify
Name
self
star
t
to
type
Properties
ack
ack
:
number
body
body
:
string
broadcast
broadcast
:
boolean
from
from
:
string
id
id
:
ID
invis
invis
:
boolean
is
Forwarded
is
Forwarded
:
boolean
labels
labels
:
any
[]
mentioned
Jid
List
mentioned
Jid
List
:
any
[]
notify
Name
notify
Name
:
string
self
self
:
string
star
star
:
boolean
t
t
:
number
to
to
:
string
type
type
:
string
Globals
"api/model/partial-
message"
ID
Partial
Message
ack
body
broadcast
from
id
invis
is
Forwarded
labels
mentioned
Jid
List
notify
Name
self
star
t
to
type
Generated using
TypeDoc


There are two passes into the lagoon. As both passes are on the west side of the atoll, there can be overfalls on the inside of the lagoon on the incoming tide in the normal prevailing winds.
SY Morning Dove went aground on the reef on the SSW side of Apataki Atoll in May 2016. Read the news report here.
There is no safe anchorage near the village in prevailing winds.
There is however a calm anchorage in 25ft. of coral sand close to the pearl farms in the SE corner of the lagoon. Pearl farm families will welcome you warmly, they truly enjoy meeting travellers and you will be able to learn plenty about all their activities (black pearls, copra, fishing, vanilla cultivation, egg farming and more).
The NW anchorage about 1.5 nm from the NW pass is calm in NE winds but rolly in E winds and dangerous in S winds (because of the long fetch).
This is a straightforward lagoon to sail across pass to pass or even diagonally with few reefs easily avoided with good light. Keep an eye out for pearl farm buoys even in the middle of the lagoon.
If you are looking for somewhere unique to haul your boat, try Apataki Carenage in the south of the Atoll. This is a boatyard for cruisers doing their own work, not for expert advice and services.
Last updated June 2011.


The Latest On KJ Hamler Before Kickoff vs. Ohio State
by Chris RosvoglouWe’re less than two hours away from kickoff for this year’s Ohio State-Penn State matchup. Although his status isn’t official yet, it appears that KJ Hamler will be ready to play.
Penn State was dealt unfortunate injury news on Friday involving its offense. Starting center Michal Menet will not be available due to an undisclosed injury.
Hamler entered this week as questionable because of an injury to his head/neck area. James Franklin admit earlier in the week that he was hopeful that his star wideout would be active, but he wasn’t sure yet.
Fortunately for the Nittany Lions, Hamler is warming up on the field at Ohio Stadium.
This is an excellent sign for his availability today.
If Hamler truly couldn’t play this afternoon against the Buckeyes, the chances of him warming up for an extended period of time would be slim.
Sean Clifford needs Hamler for this game if the team wants to potentially upset Ohio State on the road. The sophomore wideout has 46 receptions for 791 yards and eight touchdowns this season.
Since kickoff is just around the corner, the Nittany Lions will know soon whether or not Hamler will play.
FOX will broadcast all the action today between Ohio State and Penn State.


|
Github |
JavaScript |
C# |
PostgreSQL |
Django |
React |
Python |
SQLite |
HTML |
CSS |
Postman |
JQuery |
| Learn Naturally |     | Capstone Project. This is a full-stack DJango application for an e-Learning Portal application. | ||||
| Trod JamDown |     | A full stack Django application which features unique travel experiences that are not always advertised as the ultimate travel destination in the island of Jamaica. |   | |||
| Mortal Kombat |     | This is a MMO game created with a Django backend and ReactJS frontend that uses the Mortal Kombat theme. The player can fight with and cause health damage to various Monsters as well as equip themselves with weapons from the weapon shop. |   |


Ctrl
key in order to Zoom
The steps for Mac and Linux are explained below, but in both cases ensure to run your app with node version >=0.11.3
.
Run your app
node --perf-basic-prof app.js
Use the Instruments Time Profiler to collect stack trace information as follows:
.csv
file/tmp/perf-<pid>.map
.csv
as the Callgraph/tmp/perf-<pid>.map
as the MapfileRun your app with perf:
perf record -e cycles:u -g -- node --perf-basic-prof app.js
Extract trace from perf.data
file
perf script > perf-script.txt
perf-script.txt
file as the Callgraph suffices since perf
already resolved the symbols.


Szymon Kulec
HTTP/1.1 200 OK
Date: Fri, 30 Oct 1998 14:19:41 GMT
Server: Apache/1.3.3 (Unix)
Cache-Control: max-age=3600, no-cache, public
Expires: Fri, 30 Oct 1998 14:19:41 GMT
Last-Modified: Mon, 29 Jun 1998 02:10:12 GMT
ETag: "3e85-410-3596fbbc"
Content-Length: 1000
Content-Type: text/html
| header | meaning |
|---|---|
| max-age=[seconds] | maximum time when cache is considered fresh |
| public | response is cacheable |
| private | response is cacheable but only for the end client |
| no-cache | must revalidate every time |
| no-store | don't store it! |
| headers | meaning |
|---|---|
| max-age=3600, private | keep up to 1h but only on the client (no proxy) |
| max-age=3600, no-cache, public | keep up to 1h but validate every time the resource is needed |
| header | sender | meaning |
|---|---|---|
| Last-Modified | server | date of last mofification |
| If-Modified-Since | client | date from the cached version |
| ETag | server | logical version of the resource |
| If-None-Match | client | logical version from the cached version |
| # | sender | data |
|---|---|---|
| 1 | client | GET |
| 2 | server | body + ETag: 12312 |
| 3 | client | GET + If-None-Match: 12312 |
| 4 | server | 304: Not Modified |
HTTP/1.1 200 OK
Date: Fri, 30 Oct 1998 14:19:41 GMT
Server: Apache/1.3.3 (Unix)
Cache-Control: max-age=3600, no-cache, public
Expires: Fri, 30 Oct 1998 14:19:41 GMT
Last-Modified: Mon, 29 Jun 1998 02:10:12 GMT
ETag: "3e85-410-3596fbbc"
Content-Length: 1000
Content-Type: text/html
GET http://<IP_ADDRESS>:2113/streams/mystream
Cache-Control: max-age=0, no-cache, must-revalidate
ETag: "1;248368668"
{
"entries": [
{
"title": "1@mystream",
"id": "http://<IP_ADDRESS>:2113/streams/mystream/1"
},
{
"title": "0@mystream",
"id": "http://<IP_ADDRESS>:2113/streams/mystream/0"
}
]
}
// one can easily obtain etag of the given document
var eTag = (Guid)session.Advanced.GetEtagFor(objectToSave);
// optimistic concurrency with retrieved tag value
session.Store(objectToSave, eTag);
<html>
...
<body>
<script type="text/javascript">
Object.prototype.__defineSetter__('Id', function(obj){alert(obj);});
</script>
<script src="http://yourbank.com/using/get/forJSON"></script>
</body>
</html>
If you're into web apps & services development, you should know about http cache and probably use it.
There are only two hard things in Computer Science: cache invalidation and naming things.
Phil Karlton
There is only one hard things in Computer Science: naming things.
me
Szymon Kulec @Scooletz http://blog.scooletz.com


I am experienced in leveraging agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition.
The goal is to make engagement with people, establish communication and deliver high-profile results. Delivering custom web solutions that work is the primary objective. Customers will get better user experience, better conversion rates and sales increase on your services. A winning strategy that leads to ultimate success. .
I`ve been Web Developer and Designer for more than 10 years. My best assets are my creativity, my feeling with technology and passion. I am passionate about everything related to web development. I follow-up on the most recent changes in web development industry and I am very active in the open source community. I believe that the client would be satisfied if you make the effort to pay attention even to smallest details, and also keeping him up to date with every change you make.
Creating all kind of designs for clothes company, also maintaining the social media. Keeping your eye on the design while performing a deep dive on the market mentality to derive convergence integration in the mediums.
Collaboratively server empowered markets via plug-and-play networks. Dynamically procrastinate users after login base benefits. Dramatically visualize customer directed convergence without revolutionary gateways. Redirecting all kinds of data from the server to the website.
GPA: 9.27
GPA: 5.00
Apart from being a web developer, I enjoy most of my time being outdoors. In the winter, I am an avid skier and novice ice climber. During the warmer months in Mavrovo, I enjoy mountain biking, free climbing, and kayaking. I also like to scuba dive when i have the chance. Exploring in general fascinates me. I also like do play Play Station 4, mainly Fifa when i take breaks from coding. Thats my part of the batery charge process :)
When forced indoors, I follow a number of sci-fi and fantasy genre movies and television shows, I am an aspiring chef, and I spend a large amount of my free time exploring the latest technology advancements in the front-end web development world.


Database Options
The Identity Server needs to be connected to a PostgreSQL-compatible database. Details for the form of the URI can be found in the PostgreSQL documentation.
is.database-uri
: Database connection URI
Email Options
The Identity Server can be configured with different providers for sending emails. Currently the sendgrid
and smtp
providers are implemented.
is.email.provider
: Email provider to use
When sendgrid
is used as provider, an API key is required. For testing, use the sandbox to prevent emails from actually being sent.
is.email.sendgrid.api-key
: The SendGrid API key to useis.email.sendgrid.sandbox
: Use SendGrid sandbox mode for testing
When smtp
is used as provider, provide the address of the SMTP server (host:port
), as well as the username and password for the SMTP server.
is.email.smtp.address
: SMTP server addressis.email.smtp.username
: Username to authenticate withis.email.smtp.password
: Password to authenticate withis.email.smtp.connections
: Maximum number of connections to the SMTP server
The email address and name of the sender should be configured regardless of the provider that is used.
is.email.sender-address
: The address of the senderis.email.sender-name
: The name of the sender
Most emails contain the name of the network and links to the Identity Server or Console.
is.email.network.name
: The name of the networkis.email.network.identity-server-url
: The URL of the Identity Serveris.email.network.console-url
: The URL of the Console
Although The Things Stack comes with a number of builtin email templates, it is possible to override those with custom templates. You can specify either a directory or a URL to load templates from. For mor information on email templates, see the email templates reference.
is.email.templates.directory
: Retrieve the email templates from the filesystemis.email.templates.url
: Retrieve the email templates from a web server
If your custom templates rely on other files, such as headers or footers, those files need to be included.
is.email.templates.includes
: The email templates that will be preloaded on startup
OAuth UI Options
The OAuth user interface needs to be configured with at least the canonical URL and the base URL of the Identity Server’s HTTP API. The canonical URL needs to be the full URL of the UI, and looks like https://thethings.example.com/oauth
. The base URL of the Identity Server’s HTTP API looks like https://thethings.example.com/api/v3
.
is.oauth.ui.canonical-url
: The page canonical URLis.oauth.ui.is.base-url
: Base URL to the HTTP API
If you do not want to serve the OAuth user interface on /oauth
, you may customize the mount path.
is.oauth.mount
: Path on the server where the OAuth server will be served
If page assets for the OAuth UI are served from a CDN or on a different path on the server, the base URL needs to be customized as well.
is.oauth.ui.assets-base-url
: The base URL to the page assets
The appearance of The Things Stack can optionally be customized.
is.oauth.ui.site-name
: The site nameis.oauth.ui.title
: The page titleis.oauth.ui.sub-title
: The page sub-titleis.oauth.ui.descriptions
: The page descriptionis.oauth.ui.language
: The page languageis.oauth.ui.theme-color
: The page theme color
Further customization of the CSS files, JS files and icons is also possible:
is.oauth.ui.css-file
: The names of the CSS filesis.oauth.ui.js-file
: The names of the JS filesis.oauth.ui.icon-prefix
: The prefix to put before the page icons (favicon.ico, touch-icon.png, og-image.png)
Profile Picture Storage Options
The profile pictures that users upload for their accounts are stored in a blob bucket. The global blob configuration is used for this. In addition to those options, specify the name of the bucket and the public URL to the bucket.
is.profile-picture.bucket
: Bucket used for storing profile picturesis.profile-picture.bucket-url
: Base URL for public bucket access
It is also possible to use Gravatar for profile pictures.
is.profile-picture.use-gravatar
: Use Gravatar fallback for users without profile picture
User Registration Options
The user registration process can be customized by requiring approval by admin users, requiring email validation or by requiring new users to be invited by existing users.
is.user-registration.admin-approval.required
: Require admin approval for new usersis.user-registration.contact-info-validation.required
: Require contact info validation for new usersis.user-registration.invitation.required
: Require invitations for new usersis.user-registration.invitation.token-ttl
: TTL of user invitation tokens
There are several options to customize the requirements for user passwords.
is.user-registration.password-requirements.max-length
: Maximum password lengthis.user-registration.password-requirements.min-digits
: Minimum number of digitsis.user-registration.password-requirements.min-length
: Minimum password lengthis.user-registration.password-requirements.min-special
: Minimum number of special charactersis.user-registration.password-requirements.min-uppercase
: Minimum number of uppercase letters


|
QuantumLibrary
|
#include <quantum_sequence_key_statistics.h>
Public Member Functions | |
| void | incrementPostedTaskCount () |
| Increments the total number of tasks associated with the key that have been posted to the Sequencer since the sequencer started tracking the key. More... | |
| void | incrementPendingTaskCount () |
| Increments the total number of pending tasks associated with the key. More... | |
| void | decrementPendingTaskCount () |
| Increments the total number of pending tasks associated with the key. More... | |
| Public Member Functions inherited from Bloomberg::quantum::SequenceKeyStatistics | |
| SequenceKeyStatistics ()=default | |
| Constructor. More... | |
| SequenceKeyStatistics (const SequenceKeyStatistics &that) | |
| Constructor. More... | |
| SequenceKeyStatistics (SequenceKeyStatistics &&that) | |
| Constructor. More... | |
| SequenceKeyStatistics & | operator= (const SequenceKeyStatistics &that) |
| Assignment operator. More... | |
| SequenceKeyStatistics & | operator= (SequenceKeyStatistics &&that) |
| Assignment operator. More... | |
| size_t | getPostedTaskCount () const |
| Gets the total number of tasks associated with the key that have been posted to the Sequencer since the sequencer started tracking the key. More... | |
| size_t | getPendingTaskCount () const |
| Gets the total number of pending tasks associated with the key. More... | |
Additional Inherited Members | |
| Protected Attributes inherited from Bloomberg::quantum::SequenceKeyStatistics | |
| size_t | _postedTaskCount {0} |
| Number of posted tasks associated with the sequence key. More... | |
| std::atomic< size_t > | _pendingTaskCount {0} |
| Number of pending tasks associated with the sequence key. More... | |
|
inline |
Increments the total number of pending tasks associated with the key.
|
inline |
Increments the total number of pending tasks associated with the key.
|
inline |
Increments the total number of tasks associated with the key that have been posted to the Sequencer since the sequencer started tracking the key.


|
| | FileOutputStream (const char *path_) |
| | FileOutputStream Constructor. 更多...
|
| |
| virtual | ~FileOutputStream () |
| | FileOutputStream Destructor. 更多...
|
| |
| virtual void | writeX (const void *src_, int size, bool reverseOrder=false) |
| | write function buffer data 更多...
|
| |
| virtual unsigned int | tell () const |
| | skip data from buffer 更多...
|
| |
| virtual void | skip (int size) |
| | Tell the current read position. 更多...
|
| |
| virtual bool | opened () const |
| | Check if the stream is opened. 更多...
|
| |
| virtual void | rewind () |
| | Rewind the stream, the stream current read position will be reset to 0 by this function. 更多...
|
| |
| | OutputStream () |
| | OutputStream Constructor. 更多...
|
| |
| virtual | ~OutputStream () |
| | OutputStream Destructor. 更多...
|
| |
| virtual void | write (const bool &data) |
| | read function for bool data 更多...
|
| |
| virtual void | write (const char &data) |
| | read function for char data 更多...
|
| |
| virtual void | write (const unsigned char &data) |
| | read function for unsigned char data 更多...
|
| |
| virtual void | write (const short &data) |
| | read function for short char data 更多...
|
| |
| virtual void | write (const unsigned short &data) |
| | read function for unsigned short char data 更多...
|
| |
| virtual void | write (const int &data) |
| | read function for int char data 更多...
|
| |
| virtual void | write (const unsigned int &data) |
| | read function for unsigned int char data 更多...
|
| |
| virtual void | write (const long &data) |
| | read function for long char data 更多...
|
| |
| virtual void | write (const unsigned long &data) |
| | read function for unsigned long char data 更多...
|
| |
| virtual void | write (const float &data) |
| | read function for float char data 更多...
|
| |
| virtual void | write (const double &data) |
| | read function for double char data 更多...
|
| |
| virtual void | write (const String &str) |
| | read function for String char data 更多...
|
| |
FileOutputStream.
The class is a OutputStream for a file stream


The following article appeared in the Lucent Bell Labs ``Multiuse Express'' magazine, Vol. 4, No. 6, December, 1996.
Developers in certain well-traveled domains have successfully applied OO techniques and tools for years. For instance, the Microsoft MFC GUI framework and OCX components are de facto industry standards for creating graphical business applications on PC platforms. Although these tools have their limitations, they demonstrate the productivity benefits of reusing common frameworks and components.
Software developers in more complex domains like telecom have traditionally lacked standard off-the-shelf middleware components. As a result, telecom developers largely build, validate, and maintain software systems from scratch. In an era of deregulation and stiff global competition, this in-house development process is becoming prohibitively costly and time consuming. Across the industry, this situation has produced a ``distributed software crisis,'' where computing hardware and networks get smaller, faster, and cheaper; yet telecom software gets larger, slower, and more expensive to develop and maintain.
The challenges of building distributed software stem from inherent and accidental complexities [Brooks:87] associated with telecom systems:
While developing high quality reusable software is hard enough, developing high quality extensible and reusable telecom software is even harder. Not surprisingly, many companies attempting to build reusable middleware fail -- often with enormous loss of money, time, and marketshare. Those companies that do succeed, however, reap the benefits resulting from their ability to develop and deploy complex applications rapidly, rather than wrestling endlessly with infrastructure problems. Unfortunately, the skills required to successfully produce telecom middleware remain something of a "black art," often locked in the heads of expert developers.
Many political, economical, organizational, and psychological factors can impede successful reuse in telecom companies. I've found that reuse-in-the-large works best when (1) the marketplace is competitive (i.e., time-to-market is crucial, so leveraging existing software substantially reduces development effort), (2) the application domain is non-trivial (i.e., repeatedly developing complete solutions from scratch is too costly), and (3) the corporate culture is supportive of an effective reuse process (e.g., developers are rewarded for taking the time to build robust reusable components). When these prerequisites don't apply, I've found that developers often fall victim to the "not-invented-here" syndrome and rebuild everything from scratch.
Expanding on the corporate culture theme, I've observed that it's crucial for software managers to openly support the fact that good components, frameworks, and software architectures take time to craft and hone. For reuse to succeed in-the-large, management must have the vision and resolve to support the incremental evolution of reusable software. In general, an 80% solution that can be evolved is often preferable to trying to achieve a 100% solution that never ships. Fred Brook's observation that ``Plan to throw the first one away, you will anyway'' [Brooks:75] applies as much today as it did 20 years ago.
Truly useful components and frameworks are derived from solving real problems, e.g., telecommunications, medical imaging, avionics, OLTP, etc. Therefore, a time honored way of producing reusable components is to generalize from working systems and applications. In particular, resist the temptation to create ``component teams'' that build reusable frameworks in isolation from application teams. I've learned the hard way that without intimate feedback from application developers, the software artifacts produced by a component team won't solve real problems and will not be reused.
Expecting emerging industry standards (like CORBA or TINA) to eliminate telecom software complexity today is very risky. For instance, although some CORBA ORB implementations are suited for certain telecom tasks (such as managing network elements), the semantics of higher level OMG services (such as the Common Object Services) are still too vague, under-specified, and non -interoperable. Although CORBA isn't yet suited to address certain demanding real-time performance and reliability requirements in the telecom domain, over the next 2 years we'll see CORBA-based products emerge that support such features [Schmidt:96].
Apply simple solutions to complex problems that sound too good to be true typically are... For example, translating code entirely from high-level specifications or using trendy OO design methodologies and programming languages is no guarantee of success. In my experience, there's simply no substitute for skilled software developers, which leads to the following final ``lesson learned.''
Ultimately, reusable components are only as good as the people who build and use them. Developing robust, efficient, and reusable telecom middleware requires teams with a wide range of skills. We need expert analysts and designers who have mastered design patterns, software architectures, and communication protocols to alleviate the inherent and accidental complexities of telecom software. Moreover, we need expert programmers who can implement these patterns, architectures, and protocols in reusable frameworks and components. In my experience, it is exceptionally hard to find high quality software developers. Ironically, many telecom companies treat their developers as interchangeable, "unskilled labor" who can be replaced easily. I suspect that over time, companies who respect and reward their high quality software developers will increasingly outperform those who don't.
On the other hand, the bad news is that (1) existing OO components and frameworks are largely focused on only a few areas (e.g., GUIs) and (2) existing industry standards still lack the semantics, features, and interoperability to be truly effective throughout the telecom software domain. Too often, vendors use industry standards to sell proprietary software under the guise of open systems. Therefore, it's essential for telecom companies to work with standards organizations and middleware vendors to ensure the emerging specifications support true interoperability and define features that meet telecom software needs.
Finally, to support the standardization effort, it's crucial for us to capture and document the patterns that underlie the successful telecom software components and frameworks that do exist. Likewise, we need to reify these patterns to guide the creation of standard frameworks and components for the telecom domain. I'm optimistic that the next generation of OO frameworks and components will be a substantial improvement over those we've worked with in the past.
For more information on building reusable OO communication software frameworks with CORBA and ACE, see the following WWW URLs:
http://www.cs.wustl.edu/~schmidt/corba.html
http://www.dre.vanderbilt.edu/~schmidt/ACE.html.
[Brooks:75] Frederick P. Brooks, "The Mythical Man-Month," Addison-Wesley, Reading, MA, 1975.
[Brooks:87] Frederick P. Brooks, "No Silver Bullet: Essence and Accidents of Software Engineering," IEEE Computer, Volume 20, Number 4, April 1987, 10-19.
[Gosling:96] The Java Programming Language, Addison-Wesley, Reading, MA, 1996.
[Lewis:95], Ted Lewis et al., "Object Oriented Application Frameworks," IEEE Computer Society Press, 1995.
[OMG:95] Object Management Group, The Common Object Request Broker: Architecture and Specification 2.0, July, 1995.
[Schmidt:96] Douglas C. Schmidt, "A Family of Design Patterns for Application-Level Gateways," Theory and Practice of Object Systems, Wiley and Sons, 1996.
[Schmidt:97] Aniruddha Gokhale, Douglas C. Schmidt, Tim Harrison, and Guru Parulkar, "Towards Real-time CORBA," IEEE Communications Magazine, Volume 14, Number 2, February 1997.
[Stroustrup:91] Bjarne Stroustrup, The C++ Programming Language, 2nd Edition, Addison-Wesley, Reading, MA, 1991.
Back to
ACE home page.
Back to ACE Documentation Home.


This tests that multiple violations on a page trigger multiple reports if and only if the violations are distinct. This test passes if only one. PingLoader callback is visible in the output.


Consider a rod element which we will use to compose the macroscopic rod later. Let's assume the rod element has cross-sectional area A, length $l_0$, Young's Modulus $E$ and density ρ. Here we will consider its steady-state vibration. The analysis we are going to perform is based on no boundary conditions, i.e. the rod is unconstrained at either end.
The rod is modelled by Lagrangian constant strain elements, where the distribution of displacement is linear and only happens along the rod (1D). Each element consists of 2 nodes, where each of then has 1 degree of freedom. As for the analysis, 1 stiffness matrix and 2 mass matrices (consistent and diagonal mass matrices) are listed below for the Lagrangian rod element:
Assuming there are n elements inside the rod, where n = \frac{L}{l_0} , the system now contains (n+1) DoFs, with the following assembled mass and stiffness matrices. Each of them has dimensions (n+1) by (n+1)


Blog
Every day, I blogged about my adventures.
Route
Every day, I got closer to my goal.
Peninsula Clarion
Newspaper article one.
Redoubt Reporter
Newspaper article two.
{% extends "base.html" %} {% block content %} {% load staticfiles %}
Every day, I blogged about my adventures.
Every day, I got closer to my goal.
Newspaper article one.
Newspaper article two.


[gecode-users] If then type constraints
Mikael Zayenz Lagerkvist
zayenz at gmail.com
Mon Mar 10 08:42:26 CET 2008
For all reified constraints that I can think of, instantiating the
"base" variables will also mean that the Boolean variable will get
instantiated. However, if you build more complicated expressions with
the Booleans and additional intermediate variables, then these might
not be instantiated. For example, think of the following constraint
system
IntVar x;
BoolVar IsA, IsB, Neither;
x = a <=> IsA;
x = b <=> IsB;
IsA \/ IsB \/ Neither;
The variable Neither will not be instantiated if x is instantiated to
a or b (it can be either true or false, the constraints are satisfied
either way).
Cheers,
Mikael
On Mon, Mar 10, 2008 at 5:05 AM, Malcolm Ryan <malcolmr at cse.unsw.edu.au> wrote:
> If I use reification like this, do I have to write my search code so
> that it instantiates all the booleans as well as all the 'normal'
> variables? Or can I rely on the fact that once all the 'normal'
> variables are instantiated all the booleans should also be instantiated.
>
> Malcolm
>
>
>
> On 06/03/2008, at 4:15 PM, Christian Schulte wrote:
>
> > Use reification, that's clumsy but works. So, with minimodeling
> > support it
> > should be something like (~ reifies a linear relation, && is
> > conjunction,
> > imp is implication, and tt means that the statement must be true):
> > post(home, tt(imp(~(v1 == 2),~(v2 != 1) && ~(v3 != 3)));
> > or directly:
> > BoolVar b1(home,0,1), b2(home,0,1), b3(home,0,1), b23(home,0,1);
> > rel(home, v1, IRT_EQ, 2, b1);
> > rel(home, v2, IRT_NQ, 1, b2);
> > rel(home, v3, IRT_NQ, 3, b3);
> > rel(home, b2, BOT_AND, b3, b23);
> > rel(home, b1, BOT_IMP, b23, 1);
> >
> > Or check whether extensional constraints work for you.
> >
> > Christian
> >
> > --
> > Christian Schulte, www.ict.kth.se/~cschulte/
> >
> >
> > -----Original Message-----
> > From: users-bounces at gecode.org [mailto:users-bounces at gecode.org] On
> > Behalf
> > Of Debdeep Banerjee
> > Sent: Thursday, March 06, 2008 3:03 PM
> > To: users at gecode.org
> > Cc: users at gecode.org
> > Subject: [gecode-users] If then type constraints
> >
> > Hi,
> > How do I model if-then style constraints ? What I want to do is post
> > constraints if a variable is assigned a particular value. For example
> > say I have variable set V { v1, v2, v3} and each of them has the
> > domain
> > {1,2,3}. what I want to achieve is
> > if v1== 2 then
> > v2 !=1 /\ v3 !=3
> >
> > I know I can do this using a custom propagator, but is there any
> > other way ?
> >
> > With regards
> > Debdeep
> >
> > --
> > Debdeep Banerjee
> > PhD Candidate
> > CSL/RSISE/NICTA
> > Australian National University
> > Email: debdeep.banerjee at rsise.anu.edu.au
> > Web:http://rsise.anu.edu.au/~banerjed
> >
> >
> >
> > _______________________________________________
> > Gecode users mailing list
> > users at gecode.org
> > https://www.gecode.org/mailman/listinfo/gecode-users
> >
> >
> > _______________________________________________
> > Gecode users mailing list
> > users at gecode.org
> > https://www.gecode.org/mailman/listinfo/gecode-users
>
>
> _______________________________________________
> Gecode users mailing list
> users at gecode.org
> https://www.gecode.org/mailman/listinfo/gecode-users
>
--
Mikael Zayenz Lagerkvist, http://www.ict.kth.se/~zayenz/
More information about the gecode-users
mailing list


{% extends "template.html" %} {% block main %}
compile group: 'io.muserver', name: 'mu-server', version: '{{version}}'
Refer to the changelog to see what is new.


Instructions: Allow microphone access at the top of the screen.
Then, press the record button and answer the first question.
Continue by clicking the next question.
When you are done press "Record" again to stop recording.
You'll then be able to download a copy of your recording to listen to yourself or send to a friend for advice.


The retention policy for the data (i.e. how long the data is stored).
The default value for InfluxDB 1.0+ versions is "autogen".
The default value for InfluxDB <1.0 versions is "default".
The "autogen" or "default" retention policies mean the data is stored for infinity.
The input can be set e.g. "2m", "3d", "4w", for 2 minutes, 3 days, or 4 weeks respectively.


XML processing in Scheme SXPath -- SXML Query Language $Id: sxpathlib.scm,v 3.918 2004/02/05 22:52:33 kl Exp kl $ This code is in Public Domain It's based on SXPath by Oleg Kiselyov, and multiple improvements implemented by Dmitry Lizorkin. The list of differences from original SXPath.scm my be found in changelog.txt Kirill Lisovsky<EMAIL_ADDRESS>* * * SXPath is a query language for SXML, an instance of XML Information set (Infoset) in the form of s-expressions. See SSAX.scm for the definition of SXML and more details. SXPath is also a translation into Scheme of an XML Path Language, XPath: http://www.w3.org/TR/xpath XPath and SXPath describe means of selecting a set of Infoset's items or their properties. To facilitate queries, XPath maps the XML Infoset into an explicit tree, and introduces important notions of a location path and a current, context node. A location path denotes a selection of a set of nodes relative to a context node. Any XPath tree has a distinguished, root node -- which serves as the context node for absolute location paths. Location path is recursively defined as a location step joined with a location path. A location step is a simple query of the database relative to a context node. A step may include expressions that further filter the selected set. Each node in the resulting set is used as a context node for the adjoining location path. The result of the step is a union of the sets returned by the latter location paths. The SXML representation of the XML Infoset (see SSAX.scm) is rather suitable for querying as it is. Bowing to the XPath specification, we will refer to SXML information items as 'Nodes': <Node> ::= <Element> | <attributes-coll> | <attrib> | "text string" | <PI> This production can also be described as <Node> ::= (name . <Nodelist>) | "text string" An (ordered) set of nodes is just a list of the constituent nodes: <Nodelist> ::= (<Node> ...) Nodelists, and Nodes other than text strings are both lists. A <Nodelist> however is either an empty list, or a list whose head is not a symbol. A symbol at the head of a node is either an XML name (in which case it's a tag of an XML element), or an administrative name such as '@'. This uniform list representation makes processing rather simple and elegant, while avoiding confusion. The multi-branch tree structure formed by the mutually-recursive datatypes <Node> and <Nodelist> lends itself well to processing by functional languages. A location path is in fact a composite query over an XPath tree or its branch. A singe step is a combination of a projection, selection or a transitive closure. Multiple steps are combined via join and union operations. This insight allows us to _elegantly_ implement XPath as a sequence of projection and filtering primitives -- converters -- joined by _combinators_. Each converter takes a node and returns a nodelist which is the result of the corresponding query relative to that node. A converter can also be called on a set of nodes. In that case it returns a union of the corresponding queries over each node in the set. The union is easily implemented as a list append operation as all nodes in a SXML tree are considered distinct, by XPath conventions. We also preserve the order of the members in the union. Query combinators are high-order functions: they take converter(s) (which is a Node|Nodelist -> Nodelist function) and compose or otherwise combine them. We will be concerned with only relative location paths [XPath]: an absolute location path is a relative path applied to the root node. Similarly to XPath, SXPath defines full and abbreviated notations for location paths. In both cases, the abbreviated notation can be mechanically expanded into the full form by simple rewriting rules. In case of SXPath the corresponding rules are given as comments to a sxpath function, below. The regression test suite at the end of this file shows a representative sample of SXPaths in both notations, juxtaposed with the corresponding XPath expressions. Most of the samples are borrowed literally from the XPath specification, while the others are adjusted for our running example, tree1.
A converter is a function type Converter = Node|Nodelist -> Nodelist A converter can also play a role of a predicate: in that case, if a converter, applied to a node or a nodelist, yields a non-empty nodelist, the converter-predicate is deemed satisfied. Throughout this file a nil nodelist is equivalent to #f in denoting a failure.
Returns #t if given object is a nodelist
If x is a nodelist - returns it as is, otherwise wrap it in a list.
The following functions implement 'Node test's as defined in Sec. 2.3 of XPath document. A node test is one of the components of a location step. It is also a converter-predicate in SXPath.
Predicate which returns #t if <obj> is SXML element, otherwise returns #f.
The function ntype-names?? takes a list of acceptable node names as a criterion and returns a function, which, when applied to a node, will return #t if the node name is present in criterion list and #f othervise. ntype-names?? :: ListOfNames -> Node -> Boolean
The function ntype?? takes a type criterion and returns a function, which, when applied to a node, will tell if the node satisfies the test. ntype?? :: Crit -> Node -> Boolean The criterion 'crit' is one of the following symbols: id - tests if the Node has the right name (id) @ - tests if the Node is an <attributes-list> * - tests if the Node is an <Element> *text* - tests if the Node is a text node *data* - tests if the Node is a data node (text, number, boolean, etc., but not pair) *PI* - tests if the Node is a PI node *COMMENT* - tests if the Node is a COMMENT node *ENTITY* - tests if the Node is a ENTITY node *any* - #t for any type of Node
This function takes a namespace-id, and returns a predicate Node -> Boolean, which is #t for nodes with this very namespace-id. ns-id is a string (ntype-namespace-id?? #f) will be #t for nodes with non-qualified names.
This function takes a predicate and returns it complemented That is if the given predicate yelds #f or '() the complemented one yields the given node (#t) and vice versa.
Curried equivalence converter-predicates
node-pos:: N -> Nodelist -> Nodelist, or node-pos:: N -> Converter Select the N'th element of a Nodelist and return as a singular Nodelist; Return an empty nodelist if the Nth element does not exist. ((node-pos 1) Nodelist) selects the node at the head of the Nodelist, if exists; ((node-pos 2) Nodelist) selects the Node after that, if exists. N can also be a negative number: in that case the node is picked from the tail of the list. ((node-pos -1) Nodelist) selects the last node of a non-empty nodelist; ((node-pos -2) Nodelist) selects the last but one node, if exists.
filter:: Converter -> Converter A filter applicator, which introduces a filtering context. The argument converter is considered a predicate, with either #f or nil result meaning failure.
take-until:: Converter -> Converter, or take-until:: Pred -> Node|Nodelist -> Nodelist Given a converter-predicate and a nodelist, apply the predicate to each element of the nodelist, until the predicate yields anything but #f or nil. Return the elements of the input nodelist that have been processed till that moment (that is, which fail the predicate). take-until is a variation of the filter above: take-until passes elements of an ordered input set till (but not including) the first element that satisfies the predicate. The nodelist returned by ((take-until (not pred)) nset) is a subset -- to be more precise, a prefix -- of the nodelist returned by ((filter pred) nset)
take-after:: Converter -> Converter, or take-after:: Pred -> Node|Nodelist -> Nodelist Given a converter-predicate and a nodelist, apply the predicate to each element of the nodelist, until the predicate yields anything but #f or nil. Return the elements of the input nodelist that have not been processed: that is, return the elements of the input nodelist that follow the first element that satisfied the predicate. take-after along with take-until partition an input nodelist into three parts: the first element that satisfies a predicate, all preceding elements and all following elements.
Apply proc to each element of lst and return the list of results. if proc returns a nodelist, splice it into the result From another point of view, map-union is a function Converter->Converter, which places an argument-converter in a joining context.
node-reverse :: Converter, or node-reverse:: Node|Nodelist -> Nodelist Reverses the order of nodes in the nodelist This basic converter is needed to implement a reverse document order (see the XPath Recommendation).
node-trace:: String -> Converter (node-trace title) is an identity converter. In addition it prints out a node or nodelist it is applied to, prefixed with the 'title'. This converter is very useful for debugging.
Combinators are higher-order functions that transmogrify a converter or glue a sequence of converters into a single, non-trivial converter. The goal is to arrive at converters that correspond to XPath location paths. From a different point of view, a combinator is a fixed, named _pattern_ of applying converters. Given below is a complete set of such patterns that together implement XPath location path specification. As it turns out, all these combinators can be built from a small number of basic blocks: regular functional composition, map-union and filter applicators, and the nodelist union.
select-kids:: Pred -> Node -> Nodelist Given a Node, return an (ordered) subset its children that satisfy the Pred (a converter, actually) select-kids:: Pred -> Nodelist -> Nodelist The same as above, but select among children of all the nodes in the Nodelist More succinctly, the signature of this function is select-kids:: Converter -> Converter
node-self:: Pred -> Node -> Nodelist, or node-self:: Converter -> Converter Similar to select-kids but apply to the Node itself rather than to its children. The resulting Nodelist will contain either one component, or will be empty (if the Node failed the Pred).
node-join:: [LocPath] -> Node|Nodelist -> Nodelist, or node-join:: [Converter] -> Converter join the sequence of location steps or paths as described in the title comments above.
node-reduce:: [LocPath] -> Node|Nodelist -> Nodelist, or node-reduce:: [Converter] -> Converter A regular functional composition of converters. From a different point of view, ((apply node-reduce converters) nodelist) is equivalent to (foldl apply nodelist converters) i.e., folding, or reducing, a list of converters with the nodelist as a seed.
node-or:: [Converter] -> Converter This combinator applies all converters to a given node and produces the union of their results. This combinator corresponds to a union, '|' operation for XPath location paths.
node-closure:: Converter -> Converter Select all _descendants_ of a node that satisfy a converter-predicate. This combinator is similar to select-kids but applies to grand... children as well. This combinator implements the "descendant::" XPath axis Conceptually, this combinator can be expressed as (define (node-closure f) (node-or (select-kids f) (node-reduce (select-kids (ntype?? '*)) (node-closure f)))) This definition, as written, looks somewhat like a fixpoint, and it will run forever. It is obvious however that sooner or later (select-kids (ntype?? '*)) will return an empty nodelist. At this point further iterations will no longer affect the result and can be stopped.
According to XPath specification 2.3, this test is true for any XPath node. For SXML auxiliary lists and lists of attributes has to be excluded.
Returns the list of attributes for a given SXML node Empty list is returned if the given node os not an element, or if it has no list of attributes
Attribute axis
Child axis This function is similar to 'select-kids', but it returns an empty child-list for PI, Comment and Entity nodes
Parent axis Given a predicate, it returns a function RootNode -> Converter which which yields a node -> parent converter then applied to a rootnode. Thus, such a converter may be constructed using ((sxml:parent test-pred) rootnode) and returns a parent of a node it is applied to. If applied to a nodelist, it returns the list of parents of nodes in the nodelist. The rootnode does not have to be the root node of the whole SXML tree -- it may be a root node of a branch of interest. The parent:: axis can be used with any SXML node.
node-parent:: RootNode -> Converter (node-parent rootnode) yields a converter that returns a parent of a node it is applied to. If applied to a nodelist, it returns the list of parents of nodes in the nodelist. Given the notation of Philip Wadler's paper on semantics of XSLT, parent(x) = { y | y=subnode*(root), x=subnode(y) } Therefore, node-parent is not the fundamental converter: it can be expressed through the existing ones. Yet node-parent is a rather convenient converter. It corresponds to a parent:: axis of SXPath. Please note: this function is provided for backward compatibility with SXPath/SXPathlib ver. 3.5.x.x and earlier. Now it's a particular case of 'sxml:parent' application:
Returns #t if given object is a nodelist
(define (nodeset? x) (or (and (pair? x) (not (symbol? (car x)))) (null? x)))
If x is a nodelist - returns it as is, otherwise wrap it in a list.
(define (as-nodeset x) (if (nodeset? x) x (list x)))
This function takes a predicate and returns it complemented That is if the given predicate yelds #f or '() the complemented one yields the given node (#t) and vice versa.
(define (sxml:complement pred) (lambda(node) (case (pred node) ((#f '()) node) (else #f))))
Curried equivalence converter-predicates
(define (node-eq? other) (lambda (node) (eq? other node)))
(define (node-equal? other) (lambda (node) (equal? other node)))
node-pos:: N -> Nodelist -> Nodelist, or node-pos:: N -> Converter Select the N'th element of a Nodelist and return as a singular Nodelist; Return an empty nodelist if the Nth element does not exist. ((node-pos 1) Nodelist) selects the node at the head of the Nodelist, if exists; ((node-pos 2) Nodelist) selects the Node after that, if exists. N can also be a negative number: in that case the node is picked from the tail of the list. ((node-pos -1) Nodelist) selects the last node of a non-empty nodelist; ((node-pos -2) Nodelist) selects the last but one node, if exists.
(define (node-pos n) (lambda (nodelist) (cond ((not (nodeset? nodelist)) '()) ((null? nodelist) nodelist) ((eqv? n 1) (list (car nodelist))) ((negative? n) ((node-pos (+ n 1 (length nodelist))) nodelist)) (else (assert (positive? n)) ((node-pos (-- n)) (cdr nodelist))))))
filter:: Converter -> Converter A filter applicator, which introduces a filtering context. The argument converter is considered a predicate, with either #f or nil result meaning failure.
(define (sxml:filter pred?) (lambda (lst) ; a nodelist or a node (will be converted to a singleton nset) (let loop ((lst (as-nodeset lst)) (res '())) (if (null? lst) (reverse res) (let ((pred-result (pred? (car lst)))) (loop (cdr lst) (if (and pred-result (not (null? pred-result))) (cons (car lst) res) res)))))))
take-until:: Converter -> Converter, or take-until:: Pred -> Node|Nodelist -> Nodelist Given a converter-predicate and a nodelist, apply the predicate to each element of the nodelist, until the predicate yields anything but #f or nil. Return the elements of the input nodelist that have been processed till that moment (that is, which fail the predicate). take-until is a variation of the filter above: take-until passes elements of an ordered input set till (but not including) the first element that satisfies the predicate. The nodelist returned by ((take-until (not pred)) nset) is a subset -- to be more precise, a prefix -- of the nodelist returned by ((filter pred) nset)
(define (take-until pred?) (lambda (lst) ; a nodelist or a node (will be converted to a singleton nset) (let loop ((lst (as-nodeset lst))) (if (null? lst) lst (let ((pred-result (pred? (car lst)))) (if (and pred-result (not (null? pred-result))) '() (cons (car lst) (loop (cdr lst))))) ))))
take-after:: Converter -> Converter, or take-after:: Pred -> Node|Nodelist -> Nodelist Given a converter-predicate and a nodelist, apply the predicate to each element of the nodelist, until the predicate yields anything but #f or nil. Return the elements of the input nodelist that have not been processed: that is, return the elements of the input nodelist that follow the first element that satisfied the predicate. take-after along with take-until partition an input nodelist into three parts: the first element that satisfies a predicate, all preceding elements and all following elements.
(define (take-after pred?) (lambda (lst) ; a nodelist or a node (will be converted to a singleton nset) (let loop ((lst (as-nodeset lst))) (if (null? lst) lst (let ((pred-result (pred? (car lst)))) (if (and pred-result (not (null? pred-result))) (cdr lst) (loop (cdr lst)))) ))))
Apply proc to each element of lst and return the list of results. if proc returns a nodelist, splice it into the result From another point of view, map-union is a function Converter->Converter, which places an argument-converter in a joining context.
(define (map-union proc lst) (if (null? lst) lst (let ((proc-res (proc (car lst)))) ((if (nodeset? proc-res) append cons) proc-res (map-union proc (cdr lst))))))
node-reverse :: Converter, or node-reverse:: Node|Nodelist -> Nodelist Reverses the order of nodes in the nodelist This basic converter is needed to implement a reverse document order (see the XPath Recommendation).
(define node-reverse (lambda (node-or-nodelist) (if (not (nodeset? node-or-nodelist)) (list node-or-nodelist) (reverse node-or-nodelist))))
node-trace:: String -> Converter (node-trace title) is an identity converter. In addition it prints out a node or nodelist it is applied to, prefixed with the 'title'. This converter is very useful for debugging.
(define (node-trace title) (lambda (node-or-nodelist) (cout nl "-->" title " :") (pp node-or-nodelist) node-or-nodelist))
According to XPath specification 2.3, this test is true for any XPath node. For SXML auxiliary lists and lists of attributes has to be excluded.
(define (sxml:node? node) (not (and (pair? node) (memq (car node) '(@ @@)))))
Returns the list of attributes for a given SXML node Empty list is returned if the given node os not an element, or if it has no list of attributes
(define (sxml:attr-list obj) (if (and (sxml:element? obj) (not (null? (cdr obj))) (pair? (cadr obj)) (eq? '@ (caadr obj))) (cdadr obj) '()))
Attribute axis
(define (sxml:attribute test-pred?) (let ((fltr (sxml:filter test-pred?))) (lambda (node) (fltr (apply append (map sxml:attr-list (as-nodeset node)))))))
Child axis This function is similar to 'select-kids', but it returns an empty child-list for PI, Comment and Entity nodes
(define (sxml:child test-pred?) (lambda (node) ; node or node-set (cond ((null? node) node) ((not (pair? node)) '()) ; No children ((memq (car node) '(*PI* *COMMENT* *ENTITY*)) ; PI, Comment or Entity '()) ; No children ((symbol? (car node)) ; it's a single node ((sxml:filter test-pred?) (cdr node))) (else (map-union (sxml:child test-pred?) node)))))
Parent axis Given a predicate, it returns a function RootNode -> Converter which which yields a node -> parent converter then applied to a rootnode. Thus, such a converter may be constructed using ((sxml:parent test-pred) rootnode) and returns a parent of a node it is applied to. If applied to a nodelist, it returns the list of parents of nodes in the nodelist. The rootnode does not have to be the root node of the whole SXML tree -- it may be a root node of a branch of interest. The parent:: axis can be used with any SXML node.
(define (sxml:parent test-pred?) (lambda (root-node) ; node or nodelist (lambda (node) ; node or nodelist (if (nodeset? node) (map-union ((sxml:parent test-pred?) root-node) node) (let rpt ((pairs (apply append (map (lambda (root-n) (map (lambda (arg) (cons arg root-n)) (append (sxml:attr-list root-n) (sxml:child-nodes root-n)))) (as-nodeset root-node))) )) (if (null? pairs) '() (let ((pair (car pairs))) (if (eq? (car pair) node) ((sxml:filter test-pred?) (list (cdr pair))) (rpt (append (map (lambda (arg) (cons arg (car pair))) (append (sxml:attr-list (car pair)) (sxml:child-nodes (car pair)))) (cdr pairs) ))))))))))
node-parent:: RootNode -> Converter (node-parent rootnode) yields a converter that returns a parent of a node it is applied to. If applied to a nodelist, it returns the list of parents of nodes in the nodelist. Given the notation of Philip Wadler's paper on semantics of XSLT, parent(x) = { y | y=subnode*(root), x=subnode(y) } Therefore, node-parent is not the fundamental converter: it can be expressed through the existing ones. Yet node-parent is a rather convenient converter. It corresponds to a parent:: axis of SXPath. Please note: this function is provided for backward compatibility with SXPath/SXPathlib ver. 3.5.x.x and earlier. Now it's a particular case of 'sxml:parent' application:
(define node-parent (sxml:parent (ntype?? '*any*)))
(define sxml:child-nodes (sxml:child sxml:node?))
(define sxml:child-elements (select-kids sxml:element?))
Predicate which returns #t if <obj> is SXML element, otherwise returns #f.
(define (sxml:element? obj) (and (pair? obj) (symbol? (car obj)) (not (memq (car obj) ; '(@ @@ *PI* *COMMENT* *ENTITY* *NAMESPACES*) ; the line above is a workaround for old SXML '(@ @@ *PI* *COMMENT* *ENTITY*)))))
The function ntype-names?? takes a list of acceptable node names as a criterion and returns a function, which, when applied to a node, will return #t if the node name is present in criterion list and #f othervise. ntype-names?? :: ListOfNames -> Node -> Boolean
(define (ntype-names?? crit) (lambda(node) (and (pair? node) (memq (car node) crit))))
The function ntype?? takes a type criterion and returns a function, which, when applied to a node, will tell if the node satisfies the test. ntype?? :: Crit -> Node -> Boolean The criterion 'crit' is one of the following symbols: id - tests if the Node has the right name (id) @ - tests if the Node is an <attributes-list> * - tests if the Node is an <Element> *text* - tests if the Node is a text node *data* - tests if the Node is a data node (text, number, boolean, etc., but not pair) *PI* - tests if the Node is a PI node *COMMENT* - tests if the Node is a COMMENT node *ENTITY* - tests if the Node is a ENTITY node *any* - #t for any type of Node
(define (ntype?? crit) (case crit ((*) sxml:element?) ((*any*) (lambda (node) #t)) ((*text*) (lambda (node) (string? node))) ((*data*) (lambda (node) (not (pair? node)))) (else (lambda (node) (and (pair? node) (eq? crit (car node))))) ))
This function takes a namespace-id, and returns a predicate Node -> Boolean, which is #t for nodes with this very namespace-id. ns-id is a string (ntype-namespace-id?? #f) will be #t for nodes with non-qualified names.
(define (ntype-namespace-id?? ns-id) (lambda (node) (and (pair? node) (not (memq (car node) '(@ @@ *PI* *COMMENT* *ENTITY*))) (let ((nm (symbol->string (car node)))) (cond ((string-rindex nm #\:) => (lambda (pos) (and (= pos (string-length ns-id)) (string-prefix? ns-id nm)))) (else (not ns-id)))))))
select-kids:: Pred -> Node -> Nodelist Given a Node, return an (ordered) subset its children that satisfy the Pred (a converter, actually) select-kids:: Pred -> Nodelist -> Nodelist The same as above, but select among children of all the nodes in the Nodelist More succinctly, the signature of this function is select-kids:: Converter -> Converter
(define (select-kids test-pred?) (lambda (node) ; node or node-set (cond ((null? node) node) ((not (pair? node)) '()) ; No children ((symbol? (car node)) ((sxml:filter test-pred?) (cdr node))) ; it's a single node (else (map-union (select-kids test-pred?) node)))))
node-self:: Pred -> Node -> Nodelist, or node-self:: Converter -> Converter Similar to select-kids but apply to the Node itself rather than to its children. The resulting Nodelist will contain either one component, or will be empty (if the Node failed the Pred).
(define node-self sxml:filter)
node-join:: [LocPath] -> Node|Nodelist -> Nodelist, or node-join:: [Converter] -> Converter join the sequence of location steps or paths as described in the title comments above.
(define (node-join . selectors) (lambda (nodelist) ; Nodelist or node (let loop ((nodelist nodelist) (selectors selectors)) (if (null? selectors) nodelist (loop (if (nodeset? nodelist) (map-union (car selectors) nodelist) ((car selectors) nodelist)) (cdr selectors))))))
node-reduce:: [LocPath] -> Node|Nodelist -> Nodelist, or node-reduce:: [Converter] -> Converter A regular functional composition of converters. From a different point of view, ((apply node-reduce converters) nodelist) is equivalent to (foldl apply nodelist converters) i.e., folding, or reducing, a list of converters with the nodelist as a seed.
(define (node-reduce . converters) (lambda (nodelist) ; Nodelist or node (let loop ((nodelist nodelist) (converters converters)) (if (null? converters) nodelist (loop ((car converters) nodelist) (cdr converters))))))
node-or:: [Converter] -> Converter This combinator applies all converters to a given node and produces the union of their results. This combinator corresponds to a union, '|' operation for XPath location paths.
(define (node-or . converters) (lambda (node-or-nodelist) (let loop ((result '()) (converters converters)) (if (null? converters) result (loop (append result (or ((car converters) node-or-nodelist) '())) (cdr converters))))))
node-closure:: Converter -> Converter Select all _descendants_ of a node that satisfy a converter-predicate. This combinator is similar to select-kids but applies to grand... children as well. This combinator implements the "descendant::" XPath axis Conceptually, this combinator can be expressed as (define (node-closure f) (node-or (select-kids f) (node-reduce (select-kids (ntype?? '*)) (node-closure f)))) This definition, as written, looks somewhat like a fixpoint, and it will run forever. It is obvious however that sooner or later (select-kids (ntype?? '*)) will return an empty nodelist. At this point further iterations will no longer affect the result and can be stopped.
(define (node-closure test-pred?) (let ((kid-selector (select-kids test-pred?))) (lambda (node) ; Nodelist or node (let loop ((parent node) (result '())) (if (null? parent) result (loop (sxml:child-elements parent) (append result (kid-selector parent))) )))))


Wisielec - Odgadnij hasło
Time left:
99
Created and modified by Michał Warszczyński - based on
Mirosław Zelent