|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.xml.dtm.ref.ChunkedIntArray
final class ChunkedIntArray
ChunkedIntArray
is an extensible array of blocks of integers.
(I'd consider Vector, but it's unable to handle integers except by
turning them into Objects.)
Making this a separate class means some call-and-return overhead. But doing it all inline tends to be fragile and expensive in coder time, not to mention driving up code size. If you want to inline it, feel free. The Java text suggest that private and Final methods may be inlined, and one can argue that this beast need not be made subclassable...
%REVIEW% This has strong conceptual overlap with the IntVector class. It would probably be a good thing to merge the two, when time permits.
| Nested Class Summary | |
|---|---|
(package private) static class |
ChunkedIntArray.ChunksVector
|
| Field Summary | |
|---|---|
(package private) static int |
chunkalloc
|
(package private) ChunkedIntArray.ChunksVector |
chunks
|
(package private) int[] |
fastArray
|
(package private) int |
lastUsed
|
(package private) static int |
lowbits
|
(package private) static int |
lowmask
|
(package private) static int |
slotsize
|
| Constructor Summary | |
|---|---|
ChunkedIntArray(int slotsize)
Create a new CIA with specified record size. |
| Method Summary | |
|---|---|
(package private) int |
appendSlot(int w0,
int w1,
int w2,
int w3)
Append a 4-integer record to the CIA, starting with record 1. |
(package private) void |
discardLast()
Disard the highest-numbered record. |
(package private) int |
readEntry(int position,
int offset)
Retrieve an integer from the CIA by record number and column within the record, both 0-based (though position 0 is reserved for special purposes). |
(package private) void |
readSlot(int position,
int[] buffer)
Retrieve the contents of a record into a user-supplied buffer array. |
(package private) int |
slotsUsed()
|
(package private) int |
specialFind(int startPos,
int position)
|
(package private) void |
writeEntry(int position,
int offset,
int value)
Overwrite the integer found at a specific record and column. |
(package private) void |
writeSlot(int position,
int w0,
int w1,
int w2,
int w3)
Overwrite an entire (4-integer) record at the specified index. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static final int slotsize
static final int lowbits
static final int chunkalloc
static final int lowmask
ChunkedIntArray.ChunksVector chunks
final int[] fastArray
int lastUsed
| Constructor Detail |
|---|
ChunkedIntArray(int slotsize)
| Method Detail |
|---|
int appendSlot(int w0, int w1, int w2, int w3)
int readEntry(int position, int offset) throws java.lang.ArrayIndexOutOfBoundsException
position
- int Record numberslotpos
- int Column number
java.lang.ArrayIndexOutOfBoundsException
int specialFind(int startPos, int position)
int slotsUsed()
void discardLast()
void writeEntry(int position, int offset, int value) throws java.lang.ArrayIndexOutOfBoundsException
position
- int Record numberoffset
- int Column numbervalue
- int New contents
java.lang.ArrayIndexOutOfBoundsException
void writeSlot(int position, int w0, int w1, int w2, int w3)
position
- integer Record numberw0
- intw1
- intw2
- intw3
- intvoid readSlot(int position, int[] buffer)
position
- int Record numberbuffer
- int[] Integer array provided by user, must be large enough
to hold a complete record.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


Attribute definition
Edit (pull request)An attribute definition defines a named, typed value that can be associated with an entity defined in this specification (e.g., a Node Type or Relationship Type). Specifically, it is used to expose a value that is set by the orchestrator after the entity has been instantiated (as part of an instance model). Typically, this value can be retrieved via a function from the instance model and used as inputs to other entities or implementation artifacts.
Keynames
| Keyname | Required | Type | Description | tosca_definitions_version |
|---|---|---|---|---|
| type (1) | yes | string | The required data type for the attribute. | alien_dsl_1_3_0 alien_dsl_1_2_0 tosca_simple_yaml_1_0 |
| description | no | string | The optional description for the attribute. | alien_dsl_1_3_0 alien_dsl_1_2_0 tosca_simple_yaml_1_0 |
| default | no | N.A. | An optional key that may provide a value to be used as a default if not provided by another means. This value SHALL be type compatible with the type declared by the attribute definition’s type keyname. | alien_dsl_1_3_0 alien_dsl_1_2_0 tosca_simple_yaml_1_0 |
| status (2) | no (default supported) | string | The optional status of the attribute relative to the specification or implementation. See supported status values defined under the property definition section. | N.A. |
| entry_schema (1) | no | string | The optional key that is used to declare the name of the Datatype definition for entries of set types such as the TOSCA list or map. | N.A. |
- (1) Alien 4 cloud currently support primitive types only on an attribute. Entry schema is therefore not supported as it is used only to specify the type of entries for the complex list and map types.
- (2) Status has been added in the latest versions of the specification and is not yet supported in alien4cloud. Table below details the supported values as defined in the TOSCA specification.
Grammar
<attribute_name>:
type: <attribute_type>
description: <attribute_description>
default: <attribute_default_value>
Example
The following example shows how to define a node type with attributes:
node_types:
fastconnect.nodes.AttributeSample:
attributes:
property_1:
type: string
property_2:
type: string
description: this is the second attribute of the node
default: This is the default value of the attribute
property_3:
type: integer
default: 45


Roy Keane delivers damning verdict on £80m Man Utd transfer target Declan Rice
Roy Keane has delivered a damning verdict on Manchester United transfer target Declan Rice.
West Ham and England midfielder Rice has emerged as a target for the Red Devils, who are reportedly eyeing a stunning £80m move ahead of the January transfer window.
United spent almost £150m on new signings last summer but failed to bolster Ole Gunnar Solskjaer’s midfield options despite the departures of Marouane Fellaini and Ander Herrera.
Rice could find himself heading to Old Trafford in the next year but Red Devils hero Keane has revealed his concerns over the West Ham man.
Advertisement Advertisement
Speaking ahead of England’s Euro 2020 qualifier against Kosovo on Sunday, Keane told ITV: ‘Well, where he [Rice] needs to improve, there’s plenty of aspects.
‘When you think about him, over the last few months he’s had a lot of praise. I’ve looked at him pretty closely, I’ve worked with him when he was with the Irish squad.
‘Where he needs to improve, where do you want me to start? His positional play, I don’t think he’s been consistent enough, he doesn’t stay with runners, he’s sloppy in possession, I can go on.
‘He’s one of these players who people were enjoying and loved but he’s one of these players that has almost played his way out of the team because he’s not been consistent at West Ham.
‘He’s got another opportunity tonight and I think it is a position in the England team where Gareth [Southgate] is obviously not sure who’s going to do that job in there.
‘It’s an opportunity for him but he’s got to take it.’
Despite signing Harry Maguire, Aaron Wan-Bissaka and Daniel James last summer, Manchester United are just seventh in the Premier League after 12 fixtures.
Advertisement Advertisement
Following the international break, Solskjaer’s side travel to Premier League new-boys Sheffield United.


spam bait
`Prev `__
S
`Next `__
--------------
**spam bait**: n.
Email addresses included in, or comprising the entirety of, a Usenet
message so that spammers mining a newsgroup with an `*address
harvester* <../A/address-harvester.html>`__ will collect them. These
addresses can be people who have offended or annoyed the poster, or who
are included so that a spammer will spam an official, thereby causing
himself trouble. One particularly effective form of spam bait is the
address of a `*teergrube* <../T/teergrube.html>`__.
--------------
+-------------------------+----------------------------+------------------------------+
| `Prev `__ | `Up <../S.html>`__ | `Next `__ |
+-------------------------+----------------------------+------------------------------+
| spam | `Home <../index.html>`__ | spamblock |
+-------------------------+----------------------------+------------------------------+


--- layout: article title: Before this blog... date: 2015-03-04 10:39:16.000000000 -06:00 categories: [] tags: - CSS - HTML - Javascript - Rails - Ruby - Summary status: publish type: post published: true meta: geo_public: '0' _edit_last: '25921218' _publicize_pending: '1' _rest_api_published: '1' _rest_api_client_id: "-1" _wpas_skip_facebook: '1' _wpas_skip_google_plus: '1' _wpas_skip_twitter: '1' _wpas_skip_linkedin: '1' _wpas_skip_tumblr: '1' _wpas_skip_path: '1' excerpt: ---
This blog isn't the first step I have taken in pursuing web application development. I am using this post to explain where I am currently at. I am still at a relatively elementary stage but do have some concepts under my belt that will be beneficial moving forward.
In the last month and a half I wanted to create a base of general knowledge that would help me before I got into more complex concepts. To begin my study, I completed courses from Codecademy and Code School which explained the basic concepts behind HTML, CSS, Ruby, Rails and Python. While I will not be focusing on Python for this course of study, I thought it was a good idea to familiarize myself with alternative languages to notice differences in syntax and structure. The HTML/CSS courses were incredibly helpful in understanding the "Box" model of website construction and how page layouts are structured. These markup languages format and position the content of a static web page to show what the user sees in their final web browser. While HTML and CSS are great at making a website look organized, I have yet to find extended functionality for them beyond creating links to other pages.
Ruby and Rails will be where I focus most of my time because these languages are what comprise the "application" part of a web application. In addition to the online courses, I am reading "The Rails 4 Way" and "Programming Ruby" (otherwise known as the pickaxe book). I was recommended these books to best understand the intricacies of both languages and am so far impressed with what I have discovered. I have programmed clones of simple blogs and can create a basic web application requesting and manipulating data on a server.
I will spend many blog posts trying to understand the intricacies of these languages but for the purposes of this post I will simply summarize what I have learned. I am coming to grasps with the "Model-View-Controller" structure of Rails and am learning "CRUD" and RESTful actions. In short, Rails is a strict structure that defines how a server should be organized through the use of Models. Models are defined tables that illustrate where data is stored on a server. Controllers are the logic behind the webpage and dictate how to manipulate data from the Models. Controllers request and operate on data from Models, arranging it in variables that may be accessed by the View. The View uses the variables created by the Controller to display the information to the user in a concise and readable format through Embedded Ruby HTML.
This sums up where I am at now. I am excited to go beyond the basics and begin diving into the more complex components of Ruby, Rails, Javascript, HTML and CSS.


‘Thrilling rescue’ after man is stuck for two hours in broken cherry picker
The man had been fitting Christmas lights in Market Harborough, Leicestershire.
A man fitting Christmas lights in a Leicestershire town had to be rescued after his cherry picker malfunctioned – leaving him stranded for two hours.
Firefighters in Market Harborough came to his aid after a malfunction meant his platform could not take him lower than seven metres off the ground.
Angela Denison manages the Nags Head pub on Church Street in Market Harborough, outside which the man was stranded on Sunday afternoon.
“He was up there for about two hours,” she told PA.
“I was thinking poor old Church street never has it easy when it comes to Christmas illuminations, does the man stuck up there want a pint and its a good job its not raining.
“Our customers enjoyed the unexpected entertainment, the ladies loved the arrival of all those fireman, especially when the impressive rescue equipment arrived.”
She said around 20 to 25 people stopped to watch the “thrilling rescue” and “seriously embarrassed” light fitter.
Leicestershire Fire and Rescue received an emergency call about the incident a little after 2pm.
The fire service said the local council is arranging for the cherry picker to be recovered.


Percentage of users that shared positive feedback.
Most of the features available out of the box.
Percentage of unsatisfied users.
Skeleton is an amazingly easy place to start with responsive development. If you want to learn more, just visit the documentation!
View Skeleton DocsSkeleton images sit easily in grid with .u-max-full-width class. I suggest exploring solution to serving different images based on device size.


It is one of the districts in the state which has a number of wild life sanctuaries and offers abundant scope for promotion of eco tourism if infrastructure facilities and proper promotional activities are provided. It is also famed for its spice production, tea plantations and rubber cultivation. Idukki also boasts of having the highest arch dam in Asia. Idukki is one of the districts in the state where linguistic minority exists. The linguistic minority consists mainly of Tamil origin. They are mainly workers in the tea and cardamom plantations, spread in Peermade, Udumbanchola and Devikulam taluks. The district is highly heterogeneous in the matter of its people in their culture, climate, cropping pattern, physiographic features etc.
Idukki is situated at the top of Western Ghats surrounded by mountains. The Asia's first and the world's second great arch dam is in Idukki. This arch dam built across the Kuravan Kurathi mountain is wonderful and beyond description. Attached to this dam of 650 feet length and 550 feet height, two other dams are also there in Kulmavu and Cherunthony. This beautiful high range district of Kerala is geographically known for its mountainous hills and dense forests. The district headquarters of Idukki is located at Kuyilimala in Painavu.A land-locked district, Idukki is one of the most nature rich areas of Kerala. The name Idukki has been derived from the Malayalam word 'idukku' meaning narrow gorge. Blessed generously by Mother Nature, Idukki offers diverse attractions like wild life sanctuaries, hill stations, spice plantation centers and mountain treks .
Spread over 97 sq km of land, the Eravikulam National Park holds the largest population of the endangered Nilgiri Tahr. It is also the abode of other animals such as small clawed otter, ruddy mongoose, Nilgiri Marten and dusky striped squirrel.  The Neelakurinji blooms only once in every twelve years. The last blossoms were in 2006; the next will be in 2018.
About 10 kms from Munnar, Chithirapuram is simply picture perfect, with its main attractions being the old playgrounds, Pallyvasal Hydel Project and lush tea plantations. The hill town slumbers in the midst of its picturesque surroundings. A tour to Chithirapuram unveils its natural bounty and immense agricultural potential. The Spices Board of Kerala has under its ambit two major nurseries, with one being at Chithirapuram.
The Idukki Wildlife Sanctuary is spread over an area of 77 sq. kms. in the Thodupuzha and Udumpanchola taluks of the district. Situated at an altitude of 450 to 748 m above sea level, this sanctuary occupies the forest land between the Cheruthoni River and the Periyar River. There is a scenic lake around the sanctuary, covered by an enchanting canopy of tropical evergreen and deciduous trees, and offers boat rides.Elephants, bison, sambar deer, wild dogs, jungle cats, tiger, wild boar etc are seen here apart from various species of snakes including cobra, viper, kraits and numerous non-poisonous ones. Birds include jungle fowl, myna, laughing thrush, black bulbul, peafowl, woodpecker, kingfisher etc. The wildlife here is similar to that of Thekkady. This sanctuary lies adjacent to the world renowned Idukki Arch Dam.
The highest point in Munnar, Top Station offers panoramic views of the countryside and the sprawling tea estates. The summit also offers clear views of the plains of Tamil Nadu and the edge of the Western Ghats.
Devikulam is a small and beautiful hill station, 1800 metres above sea level. 7 kms from Munnar, this hill station with its unique flora and fauna and pleasant weather makes an ideal summer haven. Said to be the highest lake in Munnar, the Devikulam lake is perfect for trout fishing. A local folklore says that Goddess Sita took a dip in the waters of this lake. There is a temple close by which was built in her honour. The lake can be visited only after getting prior permission from the Tata Tea Regional Officer, Munnar. Not far away from the lake is the spectacular Pallivasal Waterfalls that is frequented by picnickers for the sheer manifestation of nature in its various ways.
This idyllic hill station with sprawling green tea estates was the summer resort of the erstwhile British Administration in South India. Munnar, (Mun meaning three and aar meaning river) derives its names from the location it is situated at- at the convergence of three mountain streams- Muthirapuzha, Nallathanni and Kundala, set at an altitude of 1600 m above sea level. The places of interest in this hill station are: the Tea Museum, CSI Church, Mount Caramel Church, Mattupetty Dam, Blossom International Park, Kundala, Top Station, Echo Point, and Devikulam Lake among many others.
Famed for its waterfalls, Thommankuthu is a seven step waterfall that drops from a height of 1500 m. at each step there is a cascade with a pool below it. The 12 km trek to the top of the falls is an exciting experience.
The Periyar River flows through a valley formed by two massive rocks called Kuravan and Kurathi. The Idukki Arch Dam is Asia’s first arch dam and it is so massive that it spans the whole gorge. On one side is the calm reservoir and on the other one can hear the roar of the waters as it plummets into the dense valley.
Thekkady is famous for its wild life sanctuary which is home to elephants, sambhar deers, tigers, Nilgiri Langurs, lion-tailed macaques and gaurs. The sanctuary spread across an area of 777 sq kms was declared a tiger reserve in 1978. Conducted Boating tours across the Periyar River can offer a glimpse of elephants and tigers that come down to the river banks to slake their thirst. The nearby plantation hills of Kumily are also a place to visit when you are in Thekkady.


20 projects built with HTML, CSS & JavaScript
Analog Clock
Currency Converter
Bookmarker
DOM Array Methods
Breathing Exercise
Drag and Drop
Expense Tracker
Form Validator
Find Lyrics
Infinite Images
Hangam Game
Landing Page
Music Player
Speech Recognition
Movie Seat Booking
Speech Synthesis
Recipe Search
Typing Test
Video Player
Breakout Game


|
|
Personal info:
| Name : |
Alamin mia |
| Father,s name: |
Md. Suroj mia |
| Mother,s name: |
Mrs. Morseda begaum |
| Sibling: |
Atekur ,Sanjida |
| ID no: |
1000245640216511 |
| Marital Status: |
Single |
| Permanent Addrs: |
Monohordi,Norsingdi |
| Present Addrs: |
House-1, Road-15,DIT-project,Merul badda,dhaka |
|
|


Professor Carole Goble in “Better Software, Better Research”:
One of my favorite #overlyhonestmethods tweets (a hashtag for lab scientists) is Ian Holmes’s “You can download our code from the URL supplied. Good luck downloading the only postdoc who can get it to run, though.”
README
: sits in top-level directory and
contains all the necessary information for installing, getting started with, and understanding the accompanying code.
May be accompanied by other specific files:
LICENSE
, INSTALL
, CITATION
, ABOUT
, CHANGELOG
SQUIRREL, version 1.2 released on 2026-09-20
# About
The Spectral Q and U Imaging Radiation Replicating Experimental Library
(SQUIRREL) is a library for replicating radiation sources with spectral details
and Q and U polarizations of superman bubblegum.
# Installation
The SQUIRREL library relies on other libraries:
- The ACORN library www.acorn.nutz
- The TREEBRANCH database format API
Install those before installing the SQUIRREL library. To install the SQUIRREL
library:
./configure
make --prefix=/install/path
make install
...
Comments provide a way to insert metainformation about code intended for people, right next to the code:
def the_function(var):
"""This is a docstring, where a function
definition might live"""
a = 1 + var # this is a simple comment
return a
Also possible to pollute code with unnecessary cruft:
def decay(index, database):
# first, retrieve the decay constants from the database
mylist = database.decay_constants()
# next, try to access an element of the list
try:
# gets decay constant at index in the list
d = mylist[index]
# if the index doesn't exist
except IndexError:
# throw an informative error message
raise Exception("value not found in the list")
return d
Code written cleanly will have its own voice. Use intelligent naming to make most lines of code clear without comments, then use comments sparingly to help explain reasons or complicated sections:
def decay(index, database):
lambdas = database.decay_constants()
try:
# gets decay constant at index in the list
lambda_i = lambdas[index]
except IndexError:
raise Exception("value not found in the list")
return lambda
Naming: a class, variable, or function name should tell you why it exists, what it does, and how it is used.
Simple functions: functions should be small to be understandable and testable; they should only do one thing.
Consistent style: use a consistent, standardized style; e.g., select variable and function names according to the PEP8 style guide for Python.
## packages and modules are short and lowercase
packages
modules
## other objects can be long
ClassesUseCamelCase
ExceptionsAreClassesToo
functions_use_snake_case
CONSTANTS_USE_ALL_CAPS
## variable scope is *suggested* by style convention
# internal to module
_single_leading_underscore_
# avoids conflicts with Python keywords
single_trailing_underscore_
# these are magic, like __init__
__double_leading_and_trailing__
docstring: comment placed immediately after a function or class definition, typically enclosed by three pairs of double quotes:
def <name>(<args>):
"""<docstring>"""
<body>
docstrings are available within Python via help()
and
iPython's magic command ?
, and Sphinx picks them up.
Make docstrings descriptive and concise; you can explain the arguments of a function, its behavior, and how you intend it to be used.
def power(base, x):
"""Computes base^x. Both base and x should be integers,
floats, or another numeric type.
"""
return base**x
Sphinx can be used to automate the generation of HTML documentation; we can even use it with Travis CI to automatically build and deploy the docs on GitHub Pages.
For now, let's just make sure your docstrings are suitable for Sphinx.
def function_with_types_in_docstring(param1, param2):
"""Example function with types documented in the docstring.
`PEP 484`_ type annotations are supported. If attribute, parameter, and
return types are annotated according to `PEP 484`_, they do not need to be
included in the docstring:
Parameters
----------
param1 : int
The first parameter.
param2 : str
The second parameter.
Returns
-------
bool
True if successful, False otherwise.
.. _PEP 484:
https://www.python.org/dev/peps/pep-0484/
"""
More examples at the Sphinx documentation
def function_with_types_in_docstring(param1, param2):
"""Example function with types documented in the docstring.
`PEP 484`_ type annotations are supported. If attribute, parameter, and
return types are annotated according to `PEP 484`_, they do not need to be
included in the docstring:
Args:
param1 (int): The first parameter.
param2 (str): The second parameter.
Returns:
bool: The return value. True for success, False otherwise.
.. _PEP 484:
https://www.python.org/dev/peps/pep-0484/
"""
More examples at the Sphinx documentation


abstract suspend fun silentInsert(list: List<Execution>): Unit
Insert executions that are not in database and ignore those which are already stored (don't rewrite executions).


Heading
Hello there, awesome person!
This is a link to Google
This is a link to Instagram
This is a link to GitHub


WATCH | Tourist robbed of goods worth R100 000 in driveway of Morningside hotel
by Bertram MalgasA 69-year-old UK tourist didn't even have time to properly acclimatise to South Africa, before being robbed in the driveway of a hotel in Morningside on Sunday.
The man was travelling in an Uber from the OR Tambo International Airport.
CCTV cameras captured the moment two armed men pounce on the vehicle. A third suspect then grabs the items worth R100 000, from the boot of the car before all three flee the scene.
"A case of armed robbery was opened at Sandton police station," national police spokesperson Colonel Brenda Muridili told News24.
"A 69-year-old man was allegedly robbed of personal items valued about R100 000, at the gate of a hotel in Morningside on arrival from the OR Tambo International Airport yesterday."
No arrests have been made.
Police are investigating the matter.


My major field of interest lies in the intersection of applied AI research and software engineering. I am excited about building large-scale machine learning systems that can help people in day to day life. I care a lot about writing neat and clean software. Other than this I am also an artist, a kaggler, a blogger, an avid reader and an investor.


Before
Code Block
Unsafe <Characters> thing[0]; -> ^_^ <-
after
This is a paragraph introducing: ~~~~ a one-line code block ~~~~
after 2
This pre has line break tags another one end


(defmethod mark-some-roots ((heap mark-and-sweep-heap) amount)
;; Mark some roots and their descendants as alive.
;; (This may add new roots.)
(let ((work-done 0))
(loop while (and (roots heap) (< work-done amount))
do (let ((root (pop (roots heap))))
(incf work-done (mark-root heap root))))
(when (null (roots heap))
;; We've finished marking roots. Move to the next step.
(setf (state heap) :sweeping-heap))
;; Return the amount of work done.
work-done))
Source Context


Next: Macro Forms, Previous: Conses as Forms, Up: The Evaluation Model
A special form is a form with special syntax, special evaluation rules, or both, possibly manipulating the evaluation environment, control flow, or both. A special operator has access to the current lexical environment and the current dynamic environment. Each special operator defines the manner in which its subexpressions are treated—which are forms, which are special syntax, etc.
Some special operators create new lexical or dynamic environments for use during the evaluation of subforms of the special form. For example, block creates a new lexical environment that is the same as the one in force at the point of evaluation of the block form with the addition of a binding of the block name to an exit point from the block.
The set of special operator names is fixed in Common Lisp; no way is provided for the user to define a special operator. Figure 3–2 lists all of the Common Lisp symbols that have definitions as special operators.
| block | let* | return-from |
| catch | load-time-value | setq |
| eval-when | locally | symbol-macrolet |
| flet | macrolet | tagbody |
| function | multiple-value-call | the |
| go | multiple-value-prog1 | throw |
| if | progn | unwind-protect |
| labels | progv | |
| let | quote |
Figure 3–2: Common Lisp Special Operators


Akan names come from a traditional naming system
people from countries such as Togo,
Ivory Coast and Ghana.
A child’s name is determined by factors surrounding his or her birth.
example, the day of their birth or the manner in which they were born
may determine which name they get
irrespective of their gender.
These Akan names signify the day one is born.
According to Akan tradition,
each child is born with a name associated to their soul.
The day the child is born is therefore determined by the soul.
The well thought and organized naming system
of the Akan’s was initiated
by the ancestors and has attracted
so many people’s attention
as they desire to know more about these names.
As a matter of fact,
it is possible to tell what led to someone’s birth,
the day they were born and their rank among
the siblings just by their names.
This is why you need to read this
article to know more about Akan
names and their meanings.
Fill this form to know your Akan name


Home
News
Contact
About
Fun Game
The Most Useless Website
made this website for fun - Zoofy
About
website made in html
make sure to join the super epic redefiners discord server:
Invite Link


Alabama SGA ‘disruptive behavior’ warning for Trump visit
TUSCALOOSA, Ala. — Alabama’s Student Government Association is warning students they could lose their block seating for the rest of the season if they “engage in disruptive behavior” during the LSU game.
Jason Rothfarb, the SGA’s vice president of student affairs, sent out a letter citing the increased security at Saturday’s game between the second-ranked Crimson Tide and No. 1 LSU. President Donald Trump is expected to attend the game, and Alabama is warning fans to arrive early and expect longer waits getting into Bryant-Denny Stadium.
A later statement from the SGA said the letter was “meant only to remind students about heightened security and the consequences of altercations or other behaviors unbecoming of a University of Alabama student, as defined in the Capstone Creed.”
It said there was no “political context” intended and that “the SGA strongly affirms its belief in free speech and the rights of all students to express their opinions.”
Sign up for Daily Newsletters
Copyright © 2019 The Washington Times, LLC.
Please read our comment policy before commenting.


15 sec.
14/15
2368 points
1
Randomized Abstract Identification Description
2
Short
3
Medium Length
4
Lorem ipsum dolor sit


pywinauto.controls.menuwrapper¶
Wrapper around Menu’s and Menu items
These wrappers allow you to work easily with menu items. You can select or click on items and check if they are checked or unchecked.
- class
pywinauto.controls.menuwrapper.
Menu
(owner_ctrl, menuhandle, is_main_menu=True, owner_item=None)¶Bases:
object
A simple wrapper around a menu handle
A menu supports methods for querying the menu and getting it’s menu items.
Initialize the class.
- owner_ctrl is the Control that owns this menu
- menuhandle is the menu handle of the menu
- is_main_menu we have to track whether it is the main menu or a popup menu
- owner_item The item that contains this menu - this will be None for the main menu, it will be a MenuItem instance for a submenu.
GetMenuPath
(instance, *args, **kwargs)¶Check if the instance is accessible
GetProperties
(instance, *args, **kwargs)¶Check if the instance is accessible
Item
(instance, *args, **kwargs)¶Check if the instance is accessible
ItemCount
(instance, *args, **kwargs)¶Check if the instance is accessible
Items
(instance, *args, **kwargs)¶Check if the instance is accessible
- exception
pywinauto.controls.menuwrapper.
MenuInaccessible
¶Bases:
exceptions.RuntimeError
Raised when a menu has handle but inaccessible.
- class
pywinauto.controls.menuwrapper.
MenuInfo
¶
- class
pywinauto.controls.menuwrapper.
MenuItem
(ctrl, menu, index, on_main_menu=False)¶Bases:
object
Wrap a menu item
Initialize the menu item
- ctrl The dialog or control that owns this menu
- menu The menu that this item is on
- index The Index of this menu item on the menu
- on_main_menu True if the item is on the main menu
Click
()¶Select the menu item
This will send a message to the parent window that the item was picked
ClickInput
()¶Click on the menu item in a more realistic way
If the menu is open it will click with the mouse event on the item. If the menu is not open each of it’s parent’s will be opened until the item is visible.
FriendlyClassName
()¶
GetProperties
()¶Return the properties for the item as a dict
If this item opens a sub menu then call Menu.GetProperties() to return the list of items in the sub menu. This is avialable under the ‘MenuItems’ key
ID
()¶Return the ID of this menu item
Index
()¶Return the index of this menu item
IsChecked
()¶Return True if the item is checked.
IsEnabled
()¶Return True if the item is enabled.
Rectangle
()¶Get the rectangle of the menu item
Select
()¶Select the menu item
This will send a message to the parent window that the item was picked
State
()¶Return the state of this menu item
SubMenu
()¶Return the SubMenu or None if no submenu
Text
()¶Return the text of this menu item
Type
()¶Return the Type of this menu item
Main types are MF_STRING, MF_BITMAP, MF_SEPARATOR.
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/resources/menus/menureference/menustructures/menuiteminfo.asp for further information.
- class
pywinauto.controls.menuwrapper.
MenuItemInfo
¶
- exception
pywinauto.controls.menuwrapper.
MenuItemNotEnabled
¶Bases:
exceptions.RuntimeError
Raised when a menu item is not enabled
pywinauto.controls.menuwrapper.
ensure_accessible
(method)¶Decorator for Menu instance methods


Youtube - Mark watched
Options
Thumbnail opacity level
An opacity level of 1 means that the thumbnail looks unmodified, a level of 0 makes the thumbnail invisible
Store history locally or use chrome sync
Using sync to store the settings means that you will get the same settings on another computer
Thumbnail effect
If this is enabled then the visual indication is shown. Disabling hides the visual effect but still keeps track of watched videos
Save
History information
Local storage
Clear
Show
Sync storage
Clear
Show


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 2-3
This popular Bengali curry, chingri malai, uses freshwater prawns in a spicy coconut sauce, served with smoky basmati rice.
For the boiled basmati rice, add 600ml20fl oz of water to the saucepan, then add the rice and salt. Cook on a low heat until all the water has disappeared. Place a lid on top and set aside for 20 minutes.
For the prawns, marinate the prawns with the turmeric and salt in a shallow dish in a cool place for 30 minutes to an hour.
Heat 60ml/2fl oz of the oil in a pan and add the bay leaves and onion paste. Fry gently for 6-8 minutes on medium heat, or until very light brown.
Meanwhile heat the remaining oil in a non-stick frying pan and fry the prawns briefly for a minute or two. Set aside.
Mix the ground cumin, turmeric and ginger-garlic paste in 75ml/2½fl oz of water and add to the onions, reduce the heat and cook for 2-3 minutes stirring regularly.
Add salt, green chillies and the prawns and stir for one minute. Mix in the coconut milk and simmer for 2-3 minutes, or just until the prawns are cooked, adding a little shellfish stock if necessary.
Season to taste with sugar. Sprinkle over the cardamom powder and coriander and a squeeze of lime. Stir the ghee and smoked salt into the rice and serve immediately.


The longest word in the english dictionary is: tpeianrleqkntlqwekjhtowifusljkntlqfplcdjstliqu4otiquwed
Click to move the scrollbar by horizontal.


{{ define "meta" }} {{ end }} {{ define "main" }}
Pixboost is a cloud Image CDN service which is designated to optimise raster images (e.g. *.jpg, *.png, etc) for file size reduction and decreased load times. Once an image has been optimised, its file is cached on Google’s CDN (Content Delivery Network), increasing the speed at which images can be retrieved on subsequent requests.
The service can also be used to resize and crop images, which makes generating responsive images that respect the device screen size on which they are being displayed is simple to achieve. Using the service requires modifications to the image URL.
Pixboost image manipulation service sources are accessible to the public on github. We believe that open source is the most efficient model of software development. Also, it allows our customers to deploy service to their own data centres. We are always happy to provide consulting services to customize the solution for your needs.


@* * This template is called from the `index` template. This template * handles the rendering of the page header and body tags. It takes * two arguments, a `String` for the title of the page and an `Html` * object to insert into the body of the page. *@ @(content: scala.collection.immutable.ListMap[String, Int])
@* Here's where we render the page title `String`. *@| word | 登場回数 | |
|---|---|---|
| @key | @value |


Arsenal reignite interest in defensive star duo with int’l scouting mission
Arsenal have rekindled their interest in Leicester defender Caglar Soyuncu after watching him in action for Turkey on Thursday night, according to reports.
The 23-year-old has been a revelation for Brendan Rodgers’ side so far this season, stepping in following the departure of Harry Maguire in impressive style.
The Foxes have only conceded eight goals in their 12 Premier League games to date and, according to Turkish newspaper Star, Gunners scouts watched him for his country against Iceland in Euro 2020 qualifying action.
The Daily Mirror adds that Arsenal were keen on Soyuncu when he played for Freiburg, but were beaten to his signing by Leicester.
In addition, Star reports that Arsenal were keeping an eye on Juventus’ Mehri Derimal in Thursday’s tie.
However, they were not the only ones keeping an eye on Derimal, as it is claimed Manchester United scouts were in attendance too.
Turkey booked their place at Euro 2020 with a 0-0 draw against Iceland, with their final qualifier coming against Andorra on Sunday.
Read more: Trouble for Arsenal as Bellerin agent names ideal next destination


Toggle Manage Page Sidebar
Manage
Components
Components
Components
Components
Action
Another action
Something else here
Separated link
One more separated link


{{ cdesc }}
When submitting the login form for this challenge, it uses the HTTP POST method. It is possible to either remove/disable the JavaScript validating the login form or submit a valid request and intercept it with aproxy tool such as Burp Suite and modify it.
For information on how Burp Suite works, visit the Burp Suite room on TryHackMe.


Chapter 5 Setting up your working environment
There is a myth about the scientist and the messy workspace, typically illustrated with Albert Einstein:
However many of us need order to be able to work properly. An organised workspace is also prominent, as we can see with these famous work spaces of : Galileo, Marie Curie, John Dalton, Alan Turing, and Charles Dickens:
When working with data, you have to consider your workspace. You can think of your computer folders as your desk. It helps immensely to keep our data, your code and your notes organised. You will likely have a project folder, where you save your data, your graphs, your analysis outputs, etc. You want to consider the layout of this folder, how many subfolders will you have, what is the best structure to work for you? You might think this is trivial, but when you are working on a project with multiple data sets, or many graphs, it can get very messy very quickly. I recommend going through this resource from the university of Cambridge data management guide to consider Naming and Organising Files, Documentation and Metadata, Managing References, and Organising E-mail.
Normally, say when you are working on a Windows PC at home, you can save files to your C: drive, and easily access them the next time you turn the computer on. When you are using computers at the university, however, you cannot be certain of being able to use the same computer again when you want to find and use your file again. Fortunately, once you have logged on to a computer at the university, a personal drive is available for you to use, and in effect, this drive follows you around to whichever PC you are logged on to. All students and staff have a personal file storage space on the network - known as the P: drive as this is usually the network drive letter allocated to it. Wherever you log on to the campus network your P: drive is available (in PC Clusters the My Documents icon on the desktop is a shortcut to the P: drive).
You should already have a username and password with which to log on. Your username has 7 or 8 letters/digits, typically beginning ‘m…’. On the computers in the Faculty clusters (where you work in class time) you will see the Faculty computer ‘image’ and a version of the operating systems Windows 7.
Away from the campus you can download and upload files to and from your P: drive over an Internet connection - for example to and from your home computer, but please remember that large files may take a long time to upload/download depending on the speed of your home internet connection. See here for details about remote access.
It’s generally good to create a folder to save your data and our outputs in, which we will call a working directory. So firstly, before we begin to do any work, we should create our working directory. This is simply a folder where you will save all our data, and also where you will be reading data in from. You can create a new folder, where you will save everything for this course, or you can choose an existing folder. It’s advised that you create a folder, and also give it some name you remember, that will be meaningful. Generally try to avoid spaces and special characters in folder (and file) names. Here is a handy guide you should read about naming files and folders that will be relevant for all your future work.
It’s not necessarily a good idea to just dump everything into ‘Desktop’ either, as you want to be able to find things later, and maybe keep things tidy. We will now show you where your personal drive is and how to save your word file to it.
Just to have some practice with doing this, create a Word document to put into the folder. Open Microsoft Word now (you can find this on the ‘Start’ button in the bottom left corner of your screen). The only thing you have to type in the document is your name.
Save the file to your p: drive as follows. Click on the save button (or click File then Save in the drop down menus). The dialogue box below will appear. Click on the down arrow in the ‘Save in:’ box to change the default directory to your P: drive. The P: drive is the one that starts with your user name. Click on this drive.
Now create a new folder within your P: drive, especially for material for this course. To do so, click on the ‘Create new folder’ icon, as shown in the dialogue box below.
Label the new folder ‘LAWS20441’. You will now have a series of folders in your p: drive (some of these you haven’t created yourself, they have been provided for you by the university), one of which you can store course material in. Finally, name your Word document ‘Trial Document’ (in the filename box) and click ‘Save’. As noted above, you can remotely access your p: drive (from home or elsewhere). You can do this by logging into your personalised university portal (https://my.manchester.ac.uk).
A word of caution, if your P: drive is full (and this tends to happen when you save image or sound files to it), there is a chance that some of the applications you want to use do not work. So make sure you keep your P: drive tidy if you don’t want to run into problems.


Peer-connect
A webrtc chat app made using peerjs.
Your Peer Id is -
Enter a Peer Id to connect with -
Status is -
unconnected.
Disconnect
call
hang up
Chat Box
created by nilinswap


Here you can save and edit texts. Hit the back button when you are done.
Delete this text
Start new text
Back


Nicole Scherzinger voted Thom Evans off X Factor: Celebrity to ‘save their romance’
“Nicole is really into Thom"
by Sarah MaglioccoNicole Scherzinger shocked fans when she agreed to boot Try Star off the X Factor: Celebrity edition, after being romantically linked to one of the band’s singers Thom Evans.
The band, made up of Thom, Ben Foden and Levi Davis, were voted off the show by the judges over the weekend.
A source has claimed that the former Pussycat Doll wants the relationship to be taken seriously, and couldn’t stand having it potentially play out on the show.
A source claimed to The Sun: “Nicole is really into Thom and she didn’t want jokes being made about them.”
“She chose to get rid of his group Try Star because it would stop people scrutinizing what she has with Tom.”
“And she knew they were the weaker act.”
Nicole and Thom were pictured partying together in London following the elimination.
A source said previously: “Thom is completely Nicole’s type. And for his part, Thom was smitten early on — he’s always said Nicole is one of the most beautiful women in the world.”
The Celebrity X Factor finale show is this week, Saturday November 30th.


Testing strategy
- functional programming reactive programming user interface testing 1 min read
Testing strategy
Given the large size (infinite) of the domain of the function under test, the following hypothesis based on the knowledge of the implementation (gray-box testing) will be used to reduce when deemed convenient the size of the test space :
- T1 : Independence hypothesis
- Testing against A | B is sufficient to guarantee behaviour on A x B (independence of A and B)
- T2 : Continuity hypothesis
- When we have to test against a set of possible values, we will only test the limit conditions, assuming that passing those tests implies a correct behaviour for the other values.
- T3 : Generating set hypothesis
- When we are confident that a smaller test set is sufficient to imply the expected behaviour for the whole set, we will test only against that smaller test.
- T4 : HC/LB faith hypothesis
In some cases we simply renounce to test against some values of the test space (80-20 Pareto approach, where we discard the 20% of tests which are high cost and low benefit). This may happen when the values to be tested against are :
believed to lead to correct behaviour of the function under test (faith)
believed to have a sufficient low probability of occuring/have an impact that we are willing to absorb


| Code |
Description |
| 00 |
Approved or completed successfully |
| 02 |
Call Voice-authorization number; Initialization Data |
| 03 |
Invalid merchant number |
| 04 |
Retain card |
| 05 |
Authorization declined |
| 06 |
Sequence- generation- number error - diagnostics necessary; the POS Terminal must
carry out reconciliation with a 0800 message |
| 09 |
The value "09" has special significance as it indicates a "wait" message and the POS-
System should expect to wait at most 30 seconds more. The host may send several of these "wait messages" until the true reply is ready. A wait message contains only the following fields: Message Type, Bit Map, PAN, System Trace Audit number, POS Terminal ID Code, Response Code, and Additional Response Data. |
| 10 |
Partial approval |
| 12 |
Invalid transaction |
| 13 |
Invalid amount |
| 14 |
Invalid card |
| 21 |
No action taken |
| 30 |
Format Error |
| 33 |
Card expired |
| 34 |
Suspicion of Manipulation |
| 40 |
Requested function not supported |
| 43 |
Stolen Card, pick up |
| 55 |
Incorrect personal identification number |
| 56 |
Card not in authorizer's database |
| 57 |
referencing transaction (e.g. reversal, Booking pre-authorization ...) was not carried out with the card which was used for the original transaction. |
| 58 |
Terminal ID unknown |
| 62 |
Restricted Card |
| 64 |
The transaction amount of the referencing transaction is higher than the transaction amount of the original transaction |
| 65 |
Contactless request declined – retry in contact mode / Soft decline - SCA required (for e-commerce) |
| 75 |
PIN entered incorrectly too often |
| 77 |
PIN entry necessary |
| 78 |
Stop payment order (for forwarding the Visa response code "R0" of the Visa BASE I interface): the transaction was declined or returned because the cardholder requested that payment of a specific recurring or installment payment transaction be stopped. |
| 79 |
Revocation of authorization order (for forwarding the Visa response codes "R1" or “R3” of the Visa BASE I interface): the transaction was declined or returned because the cardholder requested that payment of all recurring or installment payment transactions for a specific merchant account be stopped. |
| 80 |
Amount no longer available |
| 81 |
Message-flow error85: Cash back declined – pls. retry purchase only |
| 91 |
Card issuer temporarily not reachable |
| 92 |
The card type is not processed by the authorization center |
| 96 |
Processing temporarily not possible |
| 97 |
Security breach - MAC check indicates error condition |
| 98 |
Date and time not plausible - The POS Terminal must set itself to the date and time of the response message |
| 99 |
Error in PAC encryption detected |


Module 1: Library 101
Available Materials
Navigation
Library 101
Use of Library
Get a card
Library Etiquette
Internet Guidelines
Materials
Materials Activity
Video
References
Module 1 Assessment
Certificate


Clojure/ClojureScript Boot literate programming template
1 Introduction
1.1 Clojure/ClojureScript/Boot literate programing project template for Emacs + Org mode
This is a skeleton of a Literate Clojure/Boot project in Emacs/Org envirenoment. It shows how to shape a literate programming project from several org-files, and no just one, and still have proper documentation and code export (tangling) both from Emacs directly as well as from project generated shell-scripts.
The project is self-documenting, get started from project.org
and it should be more or less clear how to use it,
or navigate to pre-exported documentation.
2 Quick start
- Git clone from https://github.com/MaximGB/clojure-boot-literate.git.
- Load project Library of Babel, by executing the following code block
(org-babel-lob-ingest "build/lob.org")
, to execute it place the cursor on the block and press C-c C-c. - Fill in the table in the Project specification section.
- Read the Environment and project requirements section, setup your environment accordingly and create
the code exporting scripts
tangle.sh
andtangle-all.sh
. - Export initial project code by runing
./tangle-all.sh
, place the cursor on the code block and press C-c C-c to execute it from Emacs, or runtangle-all.sh
from a terminal. - Build the project with Boot:
- For Clojure
boot clj-build
, place the cursor on the code block and press C-c C-c to execute it, or runboot clj-build
from a terminal. - For ClojureScript
boot cljs-figwheel
, place the cursor on the code block and press C-c C-c to execute it, or runboot cljs-figwheel
from a terminal.
- For Clojure
- Run the project by running
java -jar target/project.jar
, place the cursor on the code block and press C-c C-c, or runjava jar target/project.jar
from a terminal. - Keep working on the project export the code periodically.
- To export the project documentation:
- Into
project.pdf
press С-с С-e l p. - Into
project.html
press C-c C-e h h.
- Into
3 Project specification
Project specification is given in the table following. The project file system as well as boot.properties
and build.boot
files are generated according to the specification.
| Property | Value |
|---|---|
| Boot | |
| Version | 2.6.0 |
| Project name | literate-boot |
| Project version | 0.1.0-SNAPSHOT |
| Org sources path | org |
| Tests path | tests |
| Resource path | resources |
| Assets path | assets |
| Target path | target |
| Main namespace | core |
| Clojure | yes |
| Version | 1.8.0 |
| Sources path | src |
| ClojureScript | yes |
| Version | 1.9.225 |
| Sources path | src |
| Public resources path | resources/public |
| Cider | |
| Version | 0.14.0 |
3.1 Dependencies
Project dependencies are given in the dependencies table
One dependency per the table row should be given. The table columns correspond to options supported by pomegranate library, which in it's turn, is used by Boot for dependecies resolution 1:
- Name - artifact name
- Version - artifact version
- Scope - dependency scope (in Maven terms), mighe be one of:
compile, provided, runtime, test, system, import
- Optional - dependency optionality flag, any dependency having
no
or empty value in this column is considired to be optional - Classifier - dependency classifier (in Maven terms)
- Extension - dependency extension (in Maven-terms)
- Exclusion - transitive dependencies exclusions for the dependency, one exclusion per the table row is allowed if you need to setup several exclusions for one dependency than for second and other exclusions name, version, scope, optional, classifier, extension columns should be empty
- Classifier - exclusion dependency classifier (in Maven terms)
- Extension - exclusion dependency extension (in Maven-terms)
- Note - this column is ignored, it's used for documentation purposes
| Name | Version | Scope | Optional | Classifier | Extension | Exclusion | Classifier | Extension | Note |
4 Environment and project requirements
4.1 Environtment
This project template requires Emacs/Org-mode, Clojure, Boot. The project which might be built using this template will follow principles of the literate programming, i.e. when program code is extracted from Org files, which in turn combine a project documentation and code.
4.2 Code export from org-files.
To exctract code from org-files into files with Clojure source code tangle.sh
file is used 2.
Unfortunatelly it's impossible to export code from Emacs by simply executing M-x org-babel-tangle
call out of the box using this template. The project org-files are using the so called "Library of Babel" feature,
the code of which is inside build/lob.org
file. To initialize the library a call to (org-babel-lob-ingest)
is required. This call is done inside tangle.sh
file and if you run it from a terminal everything should work
out of the box. To export code from Emacs you will have to execute (org-babel-lib-ingest "build/lob.org")
call once per session (Emacs run).
To create tangle.sh
file in the project's root directory place the cursor into the following source code block
and press C-u C-c C-v t, this will put the code block contents into tangle.sh
file on your disk.
DIR=`pwd` FILES="" # wrap each argument in the code required to call tangle on it for i in $@; do FILES="$FILES \"$i\"" done emacs -Q --batch \ --eval \ "(progn (require 'package) (let ((default-directory package-user-dir)) (normal-top-level-add-subdirs-to-load-path)) (require 'cl)(require 'org)(require 'ob)(require 'ob-tangle)(require 'ob-lob) (org-babel-lob-ingest \"build/lob.org\") (setq org-confirm-babel-evaluate nil) (mapc (lambda (file) (find-file (expand-file-name file \"$DIR\")) (org-babel-tangle) (kill-buffer)) '($FILES)))" \ 2>&1 | grep Tangled
This script receives org-file names which to extract source code from: tangle.sh file ...
, where file
is
name or names of org-files to process.
4.3 Project code export
To extract project source code from all org-files the tangle-all.sh
shell-script is used 2.
To create tangle-all.sh
file in the project's root directory place the cursor into the following source code block
and press C-u C-c C-v t, this will put the code block contents into tangle-all.sh
file on your disk.
./tangle.sh project.org build/*.org org/*.org
5 "Library of Babel" helper code blocks library
Helper code blocks constituting the project's "Library of Babel" are defined here. This code blocks work in Emacs/Org environment and are not supposed to be called from Clojure or ClojureScript.
5.1 time-is-now
Returns current time as a string in a given format.
Examples:
<<time-is-now()>> <<time-is-now(format="%F") #+CALL: time-is-now()
| Name | Default value | Description |
|---|---|---|
| [format] | "%F %X" | Time string format as supported by (format-time-string) function. Optional. |
(format-time-string format)
5.2 get-table-param
Returns a value of a parameter defined in a table. Table must follow given requirements: parameter names are given
in the first column, parameter values - in the second column. Hierarchical queries are supported in a way,
if parameter name is given as name/subname
then first name
will be searched and then subname
will be searched
starting from name
a row where name
has been found.
Examples:
<<get-table-param(table=../project.org:project-specification, title="Project name")>> <<get-table-param(table=../project.org:project-specification, title="Project name", splitby="-", joinby="_")>> <<get-table param(table=../project.org:project-specification, title="Clojure/Version")>> #+CALL: get-table-param(table=../project.org:project-specification, title="Project name")
| Name | Default value | Description |
|---|---|---|
| table | (quote ()) | Table reference. Reference format is [table containing org-file path:]table-name , |
for example ../file.org:table_name or just table_name if a table is given |
||
| in the same file the call is done from. Default value simply allows return nil if | ||
| parameter is not given, since internally code block receives a table as a list. | ||
| title | "" | Parameter name. Path-like parameter names are supported (i.e. names containing '/' . |
| If such complex parameter is given, than it'll be splited, and each resulting part | ||
| will be considered as a separate parameter name. The following parameter name search | ||
| will be started from a row where the preceding parameter name has been found, a value | ||
| of a preceding parameter is ignored. A value of the last parameter will be returned. | ||
| [splitby] | "" | Parameter value splitter. Optional. Works in pair with joinby . If parameter values |
a listed in a cell as comma-separated list, for example, than, giving splitby="," , |
||
will split'em, and splitted values will be joined with joinby value. |
||
| [joinby] | "" | Parameter value combinator. Optional. Works in pair with splitby . |
(let* ((table-adopted (mapcar (lambda (x) (if (equal x 'hline) '(hline hline hline) x)) table)) (titles (mapcar #'car table-adopted)) (path (split-string title (regexp-quote "/"))) (last-index (reduce (lambda (index title) (cl-position title titles :start index :test #'equal)) path :initial-value nil))) (if last-index (let* ((result (nth 1 (nth last-index table-adopted)))) (if (and result splitby joinby) (mapconcat #'identity (split-string result (regexp-quote splitby) t "\s+") joinby) result))))
5.3 get-specification-param
Returns parameter value given in the project specification table inside ../project.org
file.
Examples:
<<get-specification-param(title="Project name")>> <<get-specification-param(title="Main namespace", splitby="." joinby="/")>> #+CALL: get-specification-param(title="Project name")
| Name | Default value | Description |
|---|---|---|
| title | "" | Parameter name (see (get-table-param)). |
| [splitby] | "" | Parameter value separator (see (get-table-param)). |
| [joinby] | "" | Parameter value combinator (see. (get-table-param)). |
(save-excursion (let ((project-org-dir (locate-dominating-file (buffer-file-name) "project.org"))) (if project-org-dir (let ((project-spec-ref (concat project-org-dir "project.org:project-specification"))) (org-babel-execute-src-block nil (cdr (assoc 'get-table-param org-babel-library-of-babel)) (list (cons :var (format "table=%s" project-spec-ref)) (cons :var (format "title=\"%s\"" title)) (cons :var (format "splitby=\"%s\"" splitby)) (cons :var (format "joinby=\"%s\"" joinby))))))))
5.4 in-some-path
Returns an absolute path to a file in one of the project directories given in the project specification table, will take project name into account and insert it as intermediate directory if requested.
Requirements: Project specification must have following parameters defined:
- Project name
- Parameter given in
param
code block parameter.
Examples:
#+BEGIN_SRC clojure :tangle (org-sbe in-some-path (param="Clojure/Sources path" path \"core.clj\")) ... #+END_SRC <<in-some-path(param="Clojure/Sources path", path="core.clj")>> #+CALL: in-some-path(param="Clojure/Sources path", path="core.clj")
| Name | Default value | Description |
|---|---|---|
| param | "Clojure/Sources path" | Parameter name defining the base directory (relative to project root) |
| [path] | "" | Path relative to built directory name |
| [projectvise] | t | Whether to insert project name between base directory path and the path |
part given in path parameter |
(save-excursion (let* ((project-org-dir (locate-dominating-file (buffer-file-name) "project.org")) (src-path (org-babel-execute-src-block nil (cdr (assoc 'get-specification-param org-babel-library-of-babel)) (list (cons :var (format "title=\"%s\"" param))))) (project-name (org-babel-execute-src-block nil (cdr (assoc 'get-specification-param org-babel-library-of-babel)) (list (cons :var "title=\"Project name\"") (cons :var "splitby=\".\"") (cons :var "joinby=\"/\"")))) (ns-path (replace-regexp-in-string "\-" "_" project-name))) (concat project-org-dir src-path "/" (if projectvise (concat ns-path "/") "") path)))
5.5 in-clj-path
Return an absolute path to a file in project's exported Clojure sources directory with respect to project name.
Requirements: Project specification must have following parameters defined:
- Project name
- Clojure/Sources path
Examples:
#+BEGIN_SRC clojure :tangle (org-sbe in-clj-path (path \"core.clj\")) ... #+END_SRC <<in-clj-path(path="core.clj")>> #+CALL: in-clj-path(path="core.clj")
| Name | Default value | Description |
|---|---|---|
| path | "" | Path relative to project's exported Clojure sources directory to be appended |
(save-excursion (org-babel-execute-src-block nil (cdr (assoc 'in-some-path org-babel-library-of-babel)) (list (cons :var "param=\"Clojure/Sources path\"") (cons :var (format "path=\"%s\"" path)))))
5.6 in-cljs-path
Return an absolute path to a file in project's exported Clojure Script sources directory with respect to project name.
Requirements: Project specification must have following parameters defined:
- Project name
- ClojureScript/Sources path
Examples:
#+BEGIN_SRC clojure :tangle (org-sbe in-cljs-path (path \"core.clj\")) ... #+END_SRC <<in-cljs-path(path="core.clj")>> #+CALL: in-cljs-path(path="core.clj")
| Name | Default value | Description |
|---|---|---|
| path | "" | Path relative to project's exported Clojure Script sources directory to be appended |
(save-excursion (org-babel-execute-src-block nil (cdr (assoc 'in-some-path org-babel-library-of-babel)) (list (cons :var "param=\"ClojureScript/Sources path\"") (cons :var (format "path=\"%s\"" path)))))
5.7 in-tests-path
Return an absolute path to a file in project's exported tests sources directory with respect to project name.
Requirements: Project specification must have following parameters defined:
- Project name
- Tests path
Examples:
#+BEGIN_SRC clojure :tangle (org-sbe in-tests-path (path \"core.clj\")) ... #+END_SRC <<in-tests-path(path="core.clj")>> #+CALL: in-tests-path(path="core.clj")
| Name | Default value | Description |
|---|---|---|
| path | "" | Path relative to project's exported tests directory to be appended |
(save-excursion (org-babel-execute-src-block nil (cdr (assoc 'in-some-path org-babel-library-of-babel)) (list (cons :var "param=\"Tests path\"") (cons :var (format "path=\"%s\"" path)))))
5.8 in-resources-path
Return an absolute path to a file in project's exported resources directory.
Requirements: Project specification must have following parameters defined:
- Project name
- Resource path
Examples:
#+BEGIN_SRC clojure :tangle (org-sbe in-resources-path (path \"index.html")) ... #+END_SRC <<in-resources-path(path="index.html")>> #+CALL: in-resources-path(path="index.html")
| Name | Default value | Description |
|---|---|---|
| path | "" | A path relative to project's exported resources directory to be appended |
(save-excursion (org-babel-execute-src-block nil (cdr (assoc 'in-some-path org-babel-library-of-babel)) (list (cons :var "param=\"Resource path\"") (cons :var (format "path=\"%s\"" path)) (cons :var "projectvise=()"))))
5.9 in-assets-path
Return an absolute path to a file in project's exported assets directory.
Requirements: Project specification must have following parameters defined:
- Project name
- Assets path
Examples:
#+BEGIN_SRC clojure :tangle (org-sbe in-resources-path (path \"index.html")) ... #+END_SRC <<in-resources-path(path="index.html")>> #+CALL: in-resources-path(path="index.html")
| Name | Default value | Description |
|---|---|---|
| path | "" | A path relative to project's exported assets directory to be appended |
(save-excursion (org-babel-execute-src-block nil (cdr (assoc 'in-some-path org-babel-library-of-babel)) (list (cons :var "param=\"Assets path\"") (cons :var (format "path=\"%s\"" path)) (cons :var "projectvise=()"))))
5.10 in-target-path
Returns an absolute path to a file in project's target directory.
Requirements: Project specification must have following parameters defined:
- Project name
- Target path
Examples:
#+BEGIN_SRC clojure :tangle (org-sbe in-target-path (path \"project.jar")) ... #+END_SRC <<in-target-path(path="project.jar")>> #+CALL: in-target-path(path="project.jar")
| Name | Default value | Description |
|---|---|---|
| path | "" | A path relative to project's target directory to be appended |
(save-excursion (org-babel-execute-src-block nil (cdr (assoc 'in-some-path org-babel-library-of-babel)) (list (cons :var "param=\"Target path\"") (cons :var (format "path=\"%s\"" path)) (cons :var "projectvise=()"))))
5.11 render-project-dependencies
Renders (returns as a string) project dependencies, defined in the project dependencies table, as a list of Clojure vectors.
Examples:
<<render-project-dependencies()>> #+CALL: render-project-dependencies() (org-sbe render-project-dependencies)
; Full dependency definition specification is given here ; https://github.com/cemerick/pomegranate/blob/master/src/main/clojure/cemerick/pomegranate/aether.clj ; in resolve-dependencies function (require 'subr-x) (require 'seq) (let ((project-org-dir (locate-dominating-file (buffer-file-name) "project.org"))) (if project-org-dir (let* ((project-spec-ref (concat project-org-dir "project.org:project-dependencies")) ; deps-table is a list of lists and hlines (deps-table (org-babel-ref-resolve project-spec-ref)) ; Dependency representing hash-map key traversing sequence (serialize-key-traversing-seq '(name version scope optional classifier extension exclusions))) (cl-labels ( ; dependency hash map has following keys ; - name - dependency artifact name ; - version - dependency artifact version ; - scope - dependency scope ; - optional - flag showing whether a dependency is optional, any value but "" and "no" is considered to be true ; - classifier - dependency Maven-classifier ; - extension - dependency Maven-extension ; - exclusions - list of transient dependency exclusions for a dependency (make-dependency (name version scope optional classifier extension exclusions) (let ((new-dep (make-hash-table))) (puthash 'name name new-dep) (puthash 'version (format "%s" version) new-dep) (puthash 'scope scope new-dep) (puthash 'optional (if (or (string-empty-p optional) (string= "no" (downcase optional))) nil 't) new-dep) (puthash 'classifier classifier new-dep) (puthash 'extension extension new-dep) (puthash 'exclusions exclusions new-dep) new-dep)) ; Dependency serializing function (serialize-dependency (dependency) (concat "[" ; Traversing every key in the dependency hash table and building dependency definition string (mapconcat (lambda (key) (let ((value (gethash key dependency))) (cond ; name is always given ((equal key 'name) value) ; I'm not sure but maybe version might be empty ((and (equal key 'version) (not (string-empty-p value))) (format "\"%s\"" value)) ; Scope is optional ((and (equal key 'scope) (not (string-empty-p value))) (format ":scope \"%s\"" value)) ; Optional flag should be set only if it's true ((and (equal key 'optional) value) ":optional true") ; Classifier is optinal ((and (equal key 'classifier) (not (string-empty-p value))) (format ":classifier \"%s\"" value)) ; Extension is optional ((and (equal key 'extension) (not (string-empty-p value))) (format ":extension \"%s\"" value)) ; Exclusions should be given if there're any ((and (equal key 'exclusions) (not (seq-empty-p value))) (concat ":exclusions [" (mapconcat #'serialize-dependency value " ") "]"))))) serialize-key-traversing-seq " ") "]"))) (let ( ; deps-adopted is a list of hash tables representing dependencies (deps-adopted (reduce (lambda (deps-adopted dependency) ; Skip any hlines and empty rows (if (or (equal dependency 'hline) (every #'string-empty-p dependency)) deps-adopted ; Else destructuring the dependency given (destructuring-bind (name version scope optional classifier extension exclusions ex-classifier ex-extension _) dependency (cond ; Append new dependency hash map in case there's a name given ((not (string-empty-p name)) (append deps-adopted (list (make-dependency name version scope optional classifier extension (if (not (string-empty-p exclusions)) (list (make-dependency exclusions "" "" "" ex-classifier ex-extension nil))))))) ; Append another exclusion in case there's no name but exclusions given ((and (string-empty-p name) (not (string-empty-p exclusions))) (let* ((last-dep (car (last deps-adopted)))) (puthash 'exclusions (append (gethash 'exclusions last-dep nil) (list (make-dependency exclusions "" "" "" ex-classifier ex-extension nil))) last-dep) deps-adopted)))))) ; Skipping title line (cdr deps-table) :initial-value nil))) ; So now I have list of dependencies (as hash maps) which I'm to transform into Clojure's vector of vectors ; in Clojure syntax (mapconcat #'serialize-dependency deps-adopted "\n"))))))
5.12 render-code-block-if
Renders a code block if the project specification table contains a parameter with a given name and a value passing an equality condition.
Requirements:
- A code block with a given name must be defined in file the call is done from.
Examples:
<<render-codeblock-if(name="project-clojurescript-dependencies" if="ClojureScript=yes")>> #+CALL: render-codeblock-if(name="project-clojurescript-dependencies" if="ClojureScript=yes")
| Name | Default value | Description |
|---|---|---|
| name | "" | A code block name to be rendered, the one given in it's #+NAME: dirrective. |
| condition | "" | Rendering condition given as "parameter = value" , where = is string comparison |
| operation. |
(save-excursion (destructuring-bind (&optional (param-name "") &optional (cond-value "")) (split-string condition "=" t "\s+") (let ((param-value (org-babel-execute-src-block nil (cdr (assoc 'get-specification-param org-babel-library-of-babel)) (list (cons :var (format "title=\"%s\"" param-name)))))) (if (string= param-value cond-value) (progn (org-babel-goto-named-src-block name) (let ((tangle-result (org-babel-tangle-single-block ""))) (nth 5 tangle-result))) ""))))
6 Boot-project
6.1 boot.properties
boot.properties
file is used by Boot to link your Clojure/ClojureScript project to a particular version
of Boot executing by a particular version of Clojure.
#http://boot-clj.com #2016-12-19 07:29:34 BOOT_CLOJURE_NAME=org.clojure/clojure BOOT_CLOJURE_VERSION=1.8.0 BOOT_VERSION=2.6.0
6.2 build.boot
build.boot
file is executed by Boot upon running the following command boot task
, where task
is a name of Boot-task to execute. Project's tasks are defined below in a corresponding sections.
Setting up corresponding project directories if they are defined in the project specification table and exist on build machine disk.
(def paths [ [:source-paths "src"] [:source-paths "src"] [:resource-paths "resources"] [:asset-paths "assets"] ] ) (doseq [[ env-key path ] paths] (if (and (seq path) (not ((get-env env-key) path))) (let [dir (file path)] (if (.isDirectory dir) (set-env! env-key #(conj % (.getName dir)))))))
If dependency from Clojure is defined in the project specification table, i.e. value yes
is given against
parameter Clojure
, than adding org.clojure/clojure
dependency.
(set-env! :dependencies #(conj % '[org.clojure/clojure "1.8.0"]))
If dependency from ClojureScript is defined in the project specification table, i.e. value yes
is given against
parameter ClojureScript
, than adding org.clojure/clojurescript
dependency.
(set-env! :dependencies #(conj % '[org.clojure/clojurescript "1.9.225"]))
Adding project dependencies defined in the project dependencies table.
(let [deps '[ ]] (set-env! :dependencies #(into % deps)))
6.2.1 Clojure related project's Boot-tasks
These tasks will be added into resulting build.boot
file, if Clojure
parameter is set to yes
in the project specification table
All blocks of code defining Boot-tasks for Clojure must have boot-clojure-task
name. Each task defined
in code block with boot-clojure-task
name will be added into resulting build.boot
file.
<IP_ADDRESS> clj-build
This task builds project's uberjar which might be run with
java -jar target/project.jar
(deftask clj-build "Builds project's uberjar" [] (comp (pom :project 'literate-boot :version "0.1.0-SNAPSHOT") (aot :all true) (uber) (jar :main 'literate-boot.core) (target :dir #{"target"})))
To execute the task run: boot clj-build
<IP_ADDRESS> clj-run
This task executes project's main
function in the Boot's Java environment.
(deftask clj-run "Runs the project's main function" [] (require 'literate-boot.core) (let [main-fn (resolve 'literate-boot.core/-main)] (comp (aot :all true) (with-pass-thru _ (main-fn)))))
To execute the task run: boot clj-run
6.2.2 ClojureScript related project's Boot-задачи
These tasks will be added into resulting build.boot
file, if ClojureScript
parameter is set to yes
in the project specification table
All blocks of code defining Boot-tasks for Clojure must have boot-clojurescript-task
name. Each task defined
in a code block with boot-clojurescript-task
name will be added into resulting build.boot
file.
<IP_ADDRESS> cljs-figwheel
This task is an interface to figwheel, to execute it run boot cljs-figwheel
.
The task compiles ClojureScript files, runs HTTP-server serving project's public resources directory,
runs changes monitor and automaticaly recompiles and reloads the project upon *.cljs
files change,
runs nRepl server.
To run a ClojureScript repl one has to go through "9 steps to success":
- run
boot cljs-figwheel
- wait for Clojure repl prompt
- look for address and port of a run web-server (usually http://localhost:3449/) in the console output
- open a browser, novigate to web-server address:port URL, open browser's developer tools console and make sure there's "Opened Websocket REPL connection" message present
- look address and port of a nRepl server, in the console output and pass it to
(cider-connect)
call at the next step - execute
(cider-connect HOST PORT)
orM-x cider-connect
and input nRepl HOST and PORT, though, it appears as if cider is able to take the values needed from.nrepl-port
file, so one can just press ENTER twice - execute
(cljs-repl)
in repl-buffer to run a ClojureScript REPL - execute
(.log js/console "OK!")
in repl-buffer and make sure there's "OK!" message present in the brower's developer tools console. - done!
(set-env! :dependencies #(into % '[[ajchemist/boot-figwheel "0.5.4-6" :scope "test"] [org.clojure/tools.nrepl "0.2.12" :scope "test"] [com.cemerick/piggieback "0.2.1" :scope "test"] [figwheel-sidecar "0.5.7" :scope "test"]])) (require '[boot-figwheel :refer [figwheel start-figwheel! stop-figwheel! start-autobuild stop-autobuild cljs-repl fig-status]]) ;; This is for (cider-connect) to work. ;; NOTE: do not use (cider-jack-in), use (cider-connect) instead ;; --------------------------- ;; Start of cider related code (swap! boot.repl/*default-dependencies* concat '[[cider/cider-nrepl "0.14.0"]]) (swap! boot.repl/*default-middleware* conj 'cider.nrepl/cider-middleware) ;; End of cider related code (deftask cljs-figwheel "Compiles ClojureScript, serves it, autobuilds" [] (comp (figwheel :build-ids ["dev"] ;:once-build ["advanced"] :all-builds [{:id "dev" :source-paths (seq (get-env :source-paths)) :compiler {:main 'literate-boot.core :optimizations :none :source-map true :output-to "app.js"} :figwheel {:build-id "dev" :on-jsload 'literate-boot.core/-main :heads-up-display true :autoload true :debug false}}] :figwheel-options {:http-server-root "public" :open-file-command "emacsclient" :repl false} :target-path "resources/public") (speak) (repl)))
6.2.3 User's Boot-tasks
All code blocks defining user's Boot-tasks must have boot-user-task
name. Each tasks defined in a code block
with boot-user-task
name will be included into resulting build.boot
file.
7 Project code
7.1 Core namespace
7.1.1 Functions
<IP_ADDRESS> -main
(ns literate-boot.core (:gen-class)) (defn -main "Project's entry point" [& args] (println "Hello, from literate-boot!"))
(ns literate-boot.core (:refer-clojure)) (enable-console-print!) (defn ^:export -main "Project's entry point" [& args] (println "Hello, from literate-boot!!"))
<!doctype html> <html> <head> <title>literate-boot</title> </head> <body> <script src="app.js"></script> </body> </html>
Footnotes:
For the one interested please see the documentation for cemeric.pomegranate.aether/resolve-dependencies
function
tangle.sh
and tangle-all.sh
shell-script has been taken from thi.ng/babel project and adopted to this project a bit.