--- layout: post authors: ["Raniere Silva"] title: "Software Carpentry Workshop at Universidade of São Paulo" date: 2014-09-09 time: "11:00:00" tags: ["Bootcamps", "USP"] ---
Last week Alex Viana and I taught two Software Carpentry workshops at the Universidade São Paulo, the biggest public university in Brazil. In both workshops we took them through Bash, Git and Python over the course of two days.
We had 18 people subscribe and 27 names on the waitlist. Because of that we were waiting for a full room but only 10 students showed up (we still trying to figure out why this happened) with different previous programming experience but all from bioinformatics fields.
The first day started with Alex teaching the Unix shell. Most of the students used it before but from the feedback they liked discovering some new commands and that you can write your own shell scripts.
In the afternoon I taught Python. This wasn't the best session because I got the wrong impression from the students: the ones asking the most questions during the session were already programming in Perl and were asking questions to figure out the differences between Python and Perl. Moreover, looks like our lesson has a small time issue.
The second day started with Alex teaching Git. This was the best presentation of Git I've ever seen: Alex was very calm presenting exactly the lessons available at our website (except for the fact that for the collaborating and conflict lesson students worked in pairs like Thomas Kluyver's proposal that I plan to review soon) and students followed it up without problems. At the end of the Git session students wanted answers for advanced questions and we extended the session for more one hour.
In the afternoon, we changed our original plans and split the class into two groups. The first group, with more advanced programming skills, had a demo session of Pandas with Alex, while the second group had an exercise session on the concepts learned at the previous day (functions, loops, etc.).
18 people subscribed, with 23 names on the waitlist. Unlike the first workshop we had around 18 students (full room), most from bioinformatics without previous programming experience.
The first day started with Alex teaching the Unix shell. Some students liked this first section but most of them still asked themselves, "Why am I learning this?". In the afternoon I taught Python and for the first time I got feedback saying that I was too slow. I had purposely reduced the speed of the lesson but also had to interrupt it a few times before the break because many students were having troubles with Anaconda and IPython Notebook.
The second day started with Alex teaching Git. Again some students had troubles with the installation (all the cases of students using Mac OS X) but after some time we solved the problems. As in the first round, Alex's lesson was great but this time students didn't asked advanced questions at the end. In the afternoon, I finished the Python lesson (I didn't taught the loop lesson in the first day) and gave a quick example of matplotlib and Pandas.


Create a map for the snake game and make it a bit more challenging! Click on a point on the map to add a wall to it, click again to remove it.
Wall count: 0
click here to go to the game


The activity you have requested hasn't started yet. Come back in a couple of hours to see online and participate in it


dengue virus viral RNA DENV protein infection Med. disease Trop. control vaccine mosquito severe host proteins cells fever viruses cell hemorrhagic Dengue DENV- immune human replication vector associated antibodies patients primary mosquitoes Hyg. aegypti type using antibody secondary early genome membrane used Infect. effective important clinical domain levels serotypes flavivirus region response increased infections present species structure days inhibitors (Gubler, acute illness loop protease shock stem {border-style fusion including large phase responses based conserved economic envelope highly prM px;} serotype surveillance synthesis #ffffff;} Dis.e./journal.pntd. IgG NS, Negl. Virol../JVI.- burden children critical epidemic following infection. nonstructural potential proposed risk role sequence single vaccines Aedes countries detection development different followed high increase population studies Health IgM NSB adult contains infectious programs strains structures a). capsid cases cities complementary dengue. developed flaviviruses form infection, known neutralization number strategies tetravalent water Asia DENV-, Virus West antiviral association case containers genes health include leakage neutralizing new particles people transmission urban Biol. DENVs DHF Viral World amplification analysis complex costs end febrile involved likely mature plasma production regions result sequences similar symptomatic systems use usually vascular Asian N-terminal UTR Virol. activation and/or complement considered cross-reactive elements factors formation genus glycoprotein interaction life low nucleotides onset pathogenesis polymerase provide severity spread surface translation African Clin. Gen. Halstead Microbiol. NSA, Nile Vaccine activities binding cause cellular dengue, drug epidemics epitopes estimated higher immunity lead lower major period polyprotein possible produced protection recent recognized shown specific strain structural susceptibility target time Dis. Flavivirus However, III NSA RdRp ability acid activity antigenic attenuated b). breeding chimeric compared developing direct essential global humans infected is, isolated laboratory membranes methods mice permeability positive public receptor reduction reported serum small storage study syndrome tropical virus, wild-type (Fig. ADE Figure Host Hyg../ajtmh..- IFN NSB, Pacific RNA, SLA Vector Virol.Pt addition, adults called cells. characterization common complications consists cost cycle cyclization described diagnosis encephalitis endothelial ends enhancement factor gene genomic growth indirect induced infectionJ. insecticide inside interactions larvae late manifestations method million model multiple need newly occur occurs processing px; recombinant reduced reducing related required rise showed signs sites terminal tools treatment viremia years {font-family (Mackenzie AUG Asia, Control DSS Diagnosis International MHC New Sci. Second VPs absence active allow antibody-dependent antigen areas assay candidate cells, changes cleavage coding commonly contain contribute current dengue- detected effects element enzymatic expressed failure features fever: font-size forms function functional functions genomes genotype geographic given hydrophobic identification impact larval leading liver management mediated molecules mosquito-borne nucleoside observed origin platelet populations pressure primates protective rapid rapidly reduce replication. resulted significant sylvatic symptoms tick-borne total transmitted triphosphatase vectors vitro volume yellow (Avirutnan (Halstead (Halstead, (Shepard ./vir..- Acad. Am. Americas Immunol. Infection Natl. Public RNA-dependent RNA. addition aegypti, albopictus antigens applied assembly block blood cap capillary causing cytokines cytoplasm differences distribution double; dsRNA endemic epidemiology evidence expansion fluid generate genetic genetics helicase hours identified illness, illness. immature infecting insecticides. interact mammalian mediates mild molecular molecule monkeys nonhuman particle particularly peptides play poor probably problem promoter proteins. rate replicative require resulting reverse sensitive short source sufficient untranslated virulence weeks ′–′ Assoc. Clinical DALY DENV, DNA Dis../ Dis../eid. Disease ELISA Elsevier Factors Gubler, Hemorrhagic IL-, Institute Int. Management Mol. ORF Pathog.e./journal.ppat. RNAs Res. Research Rev. Soc. South Stegomyia achieved adapted adaptive amino animal antigenically associate available better billion bind bleeding border-color border-width bound cDNA caused collected combination contact correlate data derived develop directly dramatic drive efficacy enhance entry especially expressing family fatal fever. furin future general genetically genome. haemorrhagic hypothesis infections, inoculation insect interferon isothermal kidney limited lipid live located maturation modified months, mortality necessary negative nonspecific normal novel occurred original partially potent preventing protein, proteins, provided reaction region. remains reporter reports research resistance resource responsible ribonucleic sNS samples seen serological serotype-specific serves site solid; strategy synthesis. synthesized targeting test thought tissue transmit typically upstream various virus. widely years, {font-style {font-weight (Alvarez (Diptera: (Guzman (Miller (OhAinle Africa American CMs COVID- Capsid Chem../jbc.M DENV. DHF/DSS Domain East Economic Finally, Flaviviruses Following II. Japanese Microbe./j.chom... Mosquito NSB-NS Onee./journal.pone. Phase Prevention RNA–RNA Replication Res../j.antiviral... Res../j.virusres... STAT Southeast U.S.A../pnas. UAR US$ United University Viruses WNV War Westaway abdominal aerosols allele allows areas. attenuation automobile begins bleeding, bold cell-mediated centre changing characteristics circular circulation cleaved clones codon complication control. copies countries. courier; crowded cycles day deaths defined degree dendritic dengue: density depends diagnostic did difficult discovery distinct divided documented drugs efforts em; encodes endocytosis endosomal eradication exists expanded expression field full-length fully greater groups habitats hairpin helicase, hepatic highest hours. however, ideal immunogenicity implicated increasingly incubation induce information inhibition inhibitor initial initiated internalization introduced involves involving isolation. kill lack led level linked little living long long-range longer lumen macular main mainly means measures microscopy monitoring mosquito, moved negative-strand northern nucleic nucleocapsid nucleotide outbreak outbreaks pain pandemic particular patients. peptide peridomestic plaque positive-sense positive-strand possibly precursor predicted presence presumably prevention probability process prolonged promote protect proteolytic pt;} rarely receptors recognition replacement replicate reporting resources rhesus rural safe second secreted serine seroconversion serotype, soluble southern space stable stages subsequent suggested support supported synthesis, targeted tests thrombocytopenia titers topology transcription transfusion ultimately useful vaccinia variation vector, vertebrate virus-induced virusJ. vivo way world,


{% load static %}
400
Error:400
Bad request! The request sent to the server was malformed or illegal!


This keyboard layout is designed for Balochi based on the standard Windows Urdu keyboard. It includes an on screen keyboard which can be viewed by clicking on the Keyman icon and selecting the On Screen Keyboard menu item. Similar keyboards are also available for other desktop and mobile platforms.
Unshifted
Shifted
Control Shifted
Version 1.0, released 5 May 2018
Version 1.0.1, released 4 April 2019


|
Airport openGL
1.0.0
|
This class is used to create a model. More...
#include <model.h>
Public Member Functions | |
| Model () | |
| ~Model () | |
| Model (std::string sFileName, std::string sTextureName, sf::Vector3f positionIN, sf::Vector3f orientationIN, sf::Vector3f scaleIN) | |
| void | render (bool drawWithNormals, bool drawWithTexture) |
Private Attributes | |
| sf::Vector3f | position |
| sf::Vector3f | orientation |
| sf::Vector3f | scale |
| GLuint | m_xiRotationAngle |
| GLuint | m_yiRotationAngle |
| GLuint | m_ziRotationAngle |
| GLuint | m_textureID [2] |
| ModelReader * | m_modelReader |
| TextureLoader * | m_textureLoader |
This class is used to create a model.
|
inline |
Constructor.
|
inline |
Destructor.
| Model::Model | ( | std::string | sFileName, |
| std::string | sTextureName, | ||
| sf::Vector3f | positionIN, | ||
| sf::Vector3f | orientationIN, | ||
| sf::Vector3f | scaleIN | ||
| ) |
Model constructor.
| sFileName | = Name of a file. |
| sTextureName | = Texture name. |
| postionIN | = Position of a model. |
| orientationIN | = Orientation of a model. |
| scaleIN | = Scale of a model. |
| void Model::render | ( | bool | drawWithNormals, |
| bool | drawWithTexture | ||
| ) |
Model rendering.
| drawWithNormals | = Whether or not to draw with normals. param drawWithTexture = Whether or not to draw with textures. |
|
private |
Model reader.
|
private |
A buffer of texture.
|
private |
Texture loader.
|
private |
Rotation in X axis.
|
private |
Rotation in Y axis.
|
private |
Rotation in Z axis.
|
private |
Orientation of the model.
|
private |
Position of the model.
|
private |
Scale of the model.


Man dies after police and medics dash to rear of West Bromwich pub
Eyewitnesses said a number of crews were called to Garrett Street, West Bromwich, after a 999 call at around 1pm on Saturday, November 2
by Jordan Coussins, https://www.birminghammail.co.uk/authors/jordan-coussins/Medics pronounced a man dead at the scene after emergency crews were called to a West Bromwich pub.
Police and ambulance staff went to The Merry Go Round in Garrett Street, West Bromwich, after a 999 call at around 1pm on Saturday, November 2.
West Midlands Fire & Rescue Service also confirmed they attended and said they helped gain access to a derelict factory building, which is close to the pub.
The man – who has not been named – was sadly pronounced dead, a spokesman for West Midlands Ambulance Service confirmed.
Eyewitness, Adam Parker, told Black Country Live that a number of crews were seen outside the boozer following the emergency call.
West Midlands Police say they are not treating the death as suspicious.
A spokesman for the service added: “We were called to Garrett Street, West Bromwich, to reports of a medical emergency at 1pm on Saturday, November 2.
“We sent two ambulances and a paramedic support officer to the scene.
“On arrival, crews quickly found it apparent that nothing could be done to save the patient and they were pronounced dead at the scene.
To keep up-to-date with crime in your community, join the Black Country Crime Watch Facebook group where you will be alerted to any suspicious or criminal behaviour happening in your area.
Keep up-to-date with all things Walsall on our Walsall Facebook page - where you'll get the latest news, travel, weather and events in your area.


{% extends 'pages/base.html' %} {% block content %}
This page allows you to download historical prices for companies listed on the ASX and applies machine learning to them to understand trends and patterns so that buy/sell/hold recommendations can be made.


Baby, Don't Fear The Rebase
Why Is this so Hard?
- Commits as a story
- A 2-trick pony
- Rebase FTW!
- Scenarios
Searchable
Forever *
"Complete commits" vs "WIP commits"
What am I doing with my life?
git status
git diff
The index is actually awesome
git add -p
Just get this thing out of my way
git stash
Great commits
who cares?
Code ownership
Finding stuff
What is going on here?
The server does not matter
It's all just pointers man
References Make Commits Reachable
Directed Acyclic Graph
Rebase rules
REBASE on branches
MERGE on master
Why rebase?
-
Linear history
-
Easier to quit
-
Easier to undo
-
Merging is Viral
-
git-bisect
When to merge
- NEVER
- Just kidding-> AFTER rebase
- Maybe* -> (Long lived branches)
I'm afraid I'm about to mess things up
### Autosquash
```
git commit --fixup bbb2222
git commit --squash bbb2222
git rebase -i --autosquash master
```
```
git config --global rebase.autosquash true
```
```
git commit --fixup :/second
```
## Don't make me repeat myself
```
git rerere
```


The Lean CLI supports starting live trading for a cloud project on any of the brokerages supported in the cloud. We recommend live trading your projects in our cloud because we provide a battle-tested, colocated infrastructure racked in Equinix, maintained by our engineers to ensure the best possible stability and uptime.
 [Y/n]: y
$ lean cloud live "My Project" --push --open Brokerage: Paper Trading Project id: 1234567 Environment: Paper Server name: L-MICRO node 89c90172 Server type: L-MICRO Data provider: QuantConnect LEAN version: 11157 Order event notifications: Yes Insight notifications: Yes Email notifications<EMAIL_ADDRESS>Webhook notifications: None SMS notifications: None Automatic algorithm restarting: Yes Are you sure you want to start live trading for project 'My Project'? [y/N]: y
Follow these steps to see the live status of a project:
lean init
in.lean cloud status "My Project"
to show the status of the cloud project named "My Project".
$ lean cloud status "My Project" Project id: 1234567 Project name: My Project Project url: https://www.quantconnect.com/project/1234567 Live status: Running Live id: L-1234567a8901d234e5e678ddd9b0123c Live url: https://www.quantconnect.com/project/1234567/live Brokerage: Paper Trading Launched: 2021-06-09 15:10:12 UTC


Settings
Google Drive folder:
User name:
Automation settings
Auto-create screenshot on pop-up open:
Auto-upload and select folder on Submit:
Save & Close


This is a post about the technology stack I use for my new project (available in the next few weeks).
I can’t tell you right now what it is… (I’m a little paranoid that my idea will be stolen :) ). But really soon I promise.
tl;dr
I used Rails, PostgreSql, Backbone and Twitter Bootstrap.
This is how I decided of the technology stack.
Web framework
Most of my real-world experience was with Rails and .NET. I have done a lot of work in ASP.NET, MVC, Winforms, services, etc. Since I have a lot more experience in the Microsoft world, it would have been logical to use ASP.NET MVC, but Rails is part of my life for the last 2-3 years and it’s a lot more fun and the development process is reduced by a strong percentage. Don’t believe me? Try it yourself, you’ll see what I mean. I have nothing against Visual Studio, It’s a fantastic IDE and it’s becoming pretty fast. But, not fast enough. Waiting for Visual Studio to build and attach the debugger is too painful when you are in a hurry. NuGet is starting to be really great but …
So I will use Rails latests version (3.2.3 at the moment) with Vim, all on my Macbook Pro. RVM included. I strongly belived that when you launch a startup you want to launch something as fast as possible and adjust to the need of your users. I can’t built every tools from scratch. So I will use existing tools instead of reinventing the wheel. Rails assets pipeline will help compress and manage assets easily, Sass and CoffeeScript support out of the box. You need something complicated that you don’t have time for? Gems! There is Gems for almost everything.
I had considered and was almost sure that I would use Node. But I have realized that I couldn’t be proefficient soon enough.
Database
For the database, I made the mistake to use MySql on my last project when I needed fulltext search. I will not use PostgreSQL. With Rails however, I didn’t see any changes in my development process. Require the pg gem instead of MySql and it’s done. NoSql is tempting but I don’t see any real advantages for me, for now.
Client-side styling
For the css grid framework I wanted to use Skeleton but decided at the last moment to use Twitter Bootstrap (I know…).  And it has all this Javascript plugins that are just great Twitter Bootstrap
Backbone
An obvious choice was to use Backbone. I didn’t knew why at the time, but I am glad I didn’t threw this choice away. It was important for me to be a client-side application. As I previously read, Performance is a feature. And it is one of my key principle.
Backbone has a big learning curve. Here is how I manage to use it effectively:
I wanted to use TDD to develop the client-side, but gave away after the first week. It was getting in my way and for me I didn’t feel I was learning Backbone, I was learning how to test javascript. What I did instead was to only use the model part of Backbone and implement the rest using JQuery. It worked really well, until I finally saw a pattern emerging were I needed to reuse a certain part of the interface. So I created a view, listening to the change event of the model. After a while, I added another event listener to the blur event of an text input, and then listening to the reset event of a collection. And then another and another. I saw another case where a view could be appropriate and started implementing it. Created a sub view. Realized that a Router would be a welcome addition. And now I see where I could use it everywhere.
I can now say that no more of the original JQuery code is left and everything is in either a view, model, router or collection.
Authentication
One of the other big challenge I faced was with authentication. It was a requirement to use a flexible authentication scheme.
Twitter and Facebook were my two absolute must as well as the normal user/password combination. Thankfully, the Rails ecosystem has some great gems and OmniAuth was exactly what I was looking for.
A final note
I strongly believe in this project, not to generate a lot of revenue, but to help those in the same situation as WE were with our first baby… (ohoh a hint here).


{% extends "layout.html" %} {% block page_title %} Money Claims Prototype {% endblock %} {% block proposition_header %} {% set my_account="2" %} {% include "includes/propositional_navigation.html" %} {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} Back Make an offer Suggest a resolution {% if data['defendant'] == "defendant" %} Make it clear what you will do and by when. For example: "I will pay you £240 on 29 April 2018 by bank transfer". If you're also asking Jan Clark to do something, say clearly what it is and by when it should be done. For example: "You will fix the roof by 28 April 2018.". {% elseif data['defendant'] == "claimant" %} For example suggest they make a payment, fix a problem or return goods. {% else %} For example a payment, fix a problem or return goods. {% endif %} Your offer {{data['defence-suggestion']}} {% if data['defendant'] == "defendant" %} When will all parts of this offer be done? {% elseif data['defendant'] == "claimant" %} When would this be done by? {% else %} When will you complete the offer by? {% endif %} For example, 23 04 2017 Day Month Year {% if data['defendant'] == "defendant" %} Jan Clark can accept or reject your offer. {% elseif data['defendant'] == "claimant" %} Mary Richards can accept or reject your offer. {% else %} Jan Clark can accept or reject your offer. {% endif %} {% include 'prototypes/prototype-jun-2019/includes/contact.html' %} {% endblock %}
Make it clear what you will do and by when. For example: "I will pay you £240 on 29 April 2018 by bank transfer".
If you're also asking Jan Clark to do something, say clearly what it is and by when it should be done. For example: "You will fix the roof by 28 April 2018.".
For example, 23 04 2017
{% if data['defendant'] == "defendant" %} Jan Clark can accept or reject your offer. {% elseif data['defendant'] == "claimant" %} Mary Richards can accept or reject your offer. {% else %} Jan Clark can accept or reject your offer. {% endif %}


Search
Preparing search index...
The search index is not available
quizizz.js
Options
All
Public
Public/Protected
All
Inherited
Only exported
Menu
Globals
"typings/QuizCreatedByData"
QuizCreatedByData
Interface QuizCreatedByData
Hierarchy
QuizCreatedByData
Index
Properties
_id
country
deactivated
deleted
first
Name
google
id
last
Name
local
media
occupation
student
Properties
_id
_id
:
string
country
country
:
string
deactivated
deactivated
:
boolean
deleted
deleted
:
boolean
first
Name
first
Name
:
string
google
google
:
QuizCreatedByGoogleData
id
id
:
string
last
Name
last
Name
:
string
local
local
:
QuizCreatedByLocalData
media
media
:
string
occupation
occupation
:
string
student
student
:
string
|
null
Globals
"
Quizizz
Client"
"index"
"rest/
Response"
"rest/
Rest
Manager"
"structures/
Question"
"structures/
Quiz"
"structures/
Request
Error"
"structures/
Structure"
"structures/
User"
"typings/
Quiz
Created
ByData"
"typings/
Quiz
Created
ByGoogle
Data"
"typings/
Quiz
Created
ByLocal
Data"
"typings/
Quiz
Data"
"typings/
Quiz
Data
Info"
"typings/
Quiz
Data
Question"
"typings/
Quiz
Data
Question
Info"
"typings/
Quiz
Data
Stats"
"typings/
Quizizz
Response"
"typings/typings"
Quiz
Created
ByData
_id
country
deactivated
deleted
first
Name
google
id
last
Name
local
media
occupation
student
Generated using
TypeDoc


{% extends "layouts/layout01.html" %} {% block content %}
We're all about learning while having fun! We call it 'edu-tainment'. While you're here, why not have some fun and learn a few things? Below is a quiz and a few web games. Have Fun!!
Please ensure to fill in all quiz questions!
Fire in the hole marooned aye draft parley measured fer yer chains Gold Road.
Catch the cute monsters to score points. Lose a point for each that dies. Made with JavaScript, CSS, graphics, & HTML5. Enjoy!
Play GameBuild your memory. Utilizes Angular.js, Material Design, and Material icons
Play GameA simple Mad Libs Game for your enjoyment! Built using HTML5, CSS3, Angular.js, & JavaScript.
Play GameBeat the timer. Built using jQuery, jQuery UI, Bootstrap 3, Fontastic icons, Google fonts, CSS, & HTML5.
Play GameHeave to Barbary Coast crimp snow quarterdeck man-of-war spyglass. Snow cable splice the main brace yardarm mizzen topsail bounty. Holystone lugger Sink me rutters tack bilged on her anchor deadlights.


{% extends "auth_template.html" %} {% block auth_content %}
Because you login with a social account you currently do not have a password, one can be created here.
This will allow you to also login with your email address {{ user.email }}.


Next: make-random-state, Previous: sqrt, Up: Numbers Dictionary
A random state object contains state information used by the pseudo-random number generator. The nature of a random state object is implementation-dependent. It can be printed out and successfully read back in by the same implementation, but might not function correctly as a random state in another implementation.
Implementations are required to provide a read syntax for objects of type random-state, but the specific nature of that syntax is implementation-dependent.


Here is a div. Click the button below to change its style!
Animate Mario (click multiple times)
Here is the Mario sprite sheet image used in this example:


Provides an alternative approach to multiple testing by calculating a simultaneous upper confidence bounds for the number of true null hypotheses among any subset of the hypotheses of interest, using the methods of Goeman and Solari (2011) <doi:10.1214/11-STS356>.
| Version: | 0.6-12 |
| Depends: | methods |
| Imports: | bitops, lpSolve, Matrix |
| Suggests: | MASS, multtest |
| Published: | 2018-01-29 |
| Author: | Jelle Goeman, Aldo Solari, Rosa Meijer |
| Maintainer: | Jelle Goeman <j.j.goeman at lumc.nl> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| Citation: | cherry citation info |
| Materials: | ChangeLog |
| CRAN checks: | cherry results |
| Reference manual: | cherry.pdf |
| Vignettes: |
cherry |
| Package source: | cherry_0.6-12.tar.gz |
| Windows binaries: | r-devel: cherry_0.6-12.zip, r-release: cherry_0.6-12.zip, r-oldrel: cherry_0.6-12.zip |
| OS X binaries: | r-release: cherry_0.6-12.tgz, r-oldrel: cherry_0.6-12.tgz |
| Old sources: | cherry archive |
| Reverse imports: | flip |
Please use the canonical form https://CRAN.R-project.org/package=cherry to link to this page.


An individual component of a description of a morphological trait. ~
( #PCDATA | object-id )*
This can be the character (e.g. head) or the character state (round, ovoid, red,..) ~ ~~
May Contain:


| {{selection.selected.length}} rows selected | All {{(length$ | async) || ''}} rows in database selected |
|
|
|
|
{{row.roleMapping.email}} | Group | {{row.roleMapping.group}} | Role(s) | {{getRoles(row.roleMapping.roleList)}} | ID | {{row.id}} |
|---|


With this command you can save the contents (raw data) of a buffer to a file, ready to be read back into memory using the Buffer: Load command.
| Box Name | Type | Description |
|---|---|---|
| Buffer Name | String | Name of the buffer |
| Path | String | File name to save the buffer into. |


Package org.uma.jmetal.util.measure
Interface MeasureManager
- All Known Implementing Classes:
SimpleMeasureManager
public interface MeasureManager
A
Because a
MeasureManager
aims at managing a set of Measure
s.
Typically, a Measurable
entity would create a single
MeasureManager
to store all the Measure
s it would like to
support, each of them being identified by a key.Because a
Measure
can be whether a PullMeasure
or a
PushMeasure
, the two methods getPullMeasure(Object)
and
getPushMeasure(Object)
are provided. It could be that a single
Measure
is also available through both (via a single instance
implementing both interfaces or two different instances implementing each
interface), leading to have both methods returning a non-null
value for the same key.- Author:
- Created by Antonio J. Nebro on 21/10/14 based on the ideas of
Matthieu Vergne
-
Method Summary
Modifier and Type Method Description java.util.Collection<java.lang.Object>
getMeasureKeys()
This method should return all the keys identifying theMeasure
s managed by thisMeasureManager
.<T> PullMeasure<T>
getPullMeasure(java.lang.Object key)
<T> PushMeasure<T>
getPushMeasure(java.lang.Object key)
-
Method Details
-
getMeasureKeys
java.util.Collection<java.lang.Object> getMeasureKeys()This method should return all the keys identifying theMeasure
s managed by thisMeasureManager
. More precisely, ifgetPullMeasure(Object)
orgetPushMeasure(Object)
returns a non-null
value for a given key, then this key should be returned bygetMeasureKeys()
. However, it is not because a key is returned bygetMeasureKeys()
that it necessarily has aPullMeasure
or aPushMeasure
returned by thisMeasureManager
.- Returns:
- the set of keys identifying the managed
Measure
s
-
getPullMeasure
- Parameters:
key
- the key of theMeasure
- Returns:
- the
PullMeasure
identified by this key
-
getPushMeasure
- Parameters:
key
- the key of theMeasure
- Returns:
- the
PushMeasure
identified by this key
-


I’m a semi-pro traveler, burrito aficionado, Python scripter, and problem solver. Currently I’m pursuing a PhD in Mechanical Engineering at the University of Florida and Stellenbosch University. Take a look at my CV or Google Scholar. Some of my interests include:
I’m currently teaching a 1 credit hour course on Python Programming. Take a look at the Syllabus. Since I’ve been at UF many graduate students have expressed their desire to learn Python, however there are very few opportunities in my college to learn Python. Why do so many people want to learn Python? Because there have been so many state-of-the-art scientific libraries developed in Python recently! This course was created to help my fellow graduate students pick up Python for their research.
My technical skill set, determination, and easy going personality all combine to make me one exceptional team player. Send me an email at<EMAIL_ADDRESS>and let’s work together on some thought-provoking problems.
I use PGP. My public key is here.
This website is hosted on Github Pages, and is built with Jekyll using the Kactus theme by Nick Balestra. All of the material on this site is freely available.


View workout stats to easily understand your progress and goals.
Analytics that break down individual workouts to give you a fine grained understanding of your progress.
Log your weight daily to track progress towards your individual goal.


jpaul.Constraints
Interface SolAccessor<V extends Var<Info>,Info>
- All Superinterfaces:
- SolReader<V,Info>
public interface SolAccessor<V extends Var<Info>,Info>
- extends SolReader<V,Info>
SolAccessor
provides access to the values of the
variables from a system of constraints.
- Version:
- $Id: SolAccessor.java,v 1.5 2005/08/11 22:57:08 salcianu Exp $
- Author:
- Alexandru Salcianu -<EMAIL_ADDRESS>|
Method Summary |
void |
join(V v,
Info delta)
Change the value attached to the variable v by
joining delta to it. |
| Methods inherited from interface jpaul.Constraints.SolReader |
get |
join
void join(V v,
Info delta)
- Change the value attached to the variable
v
by
joining delta
to it. The real join operation is
performed by the join
method of the variable
v
; that method should be able to handle
delta
. In addition to the real join, this method
will do some internal book-keeping for the fixed-point
computation (e.g., it puts back in the workset the variables
that change).
Copyright 2005 Alexandru Salcianu - salcianu@alum.mit.edu


JSON:
{"list": [{"id": 1, "name": "Washington Botelho", "email"<EMAIL_ADDRESS>"total": 1}
- The JSON must have a list of object and an attribute with the total length.
Script:
$('#grid').gridy({ url: '/gridy' });
- Just especify your URL that will returns the JSON;- That's all, but you'll want to use other cool features.
HTML:

- Where the grid will appears;- In this case we're using the default template "gridy-default", but you can create your own. (:
- This target element can be any you want.
Template:

- You build a jQuery Template with an ID to be hooked;

${name}
${email}

</script>
- The main purpose of Gridy is to provide the flexibility to use any data structure, not just an old table;
- The first element inside the template will be the row and the direct children will be the columns;
- This structure will be repeated as many times as the total number of objects returned in JSON;
- If you are using some framework like Spring or EL (Expression Language), scape the '$' to avoid conflicts: \${ } or <c:out value="${ }"/>.
Query String:
search=__&page=__&sortname=__&sortorder=__&find=__&rows=__
- search: the term you want to search;- page: the number of the page you want to view;
- sortname: the name of the column of the database you want to sort by;
- sortorder: the order you want to sort the result: ascending or descending;
- find: the name of the column you want to search;
- rows: the number of rows you want to display in each page;
- * You can append more attributes using the 'params' or 'paramsElements' option.
Server side example (Java/VRaptor):
@Get("/gridy")
public void gridy(String search, int page, String sortName, String sortOrder, String find, int rows) {
}
public void gridy(String search, int page, String sortName, String sortOrder, String find, int rows) {
}
Ajax Options:
always: undefined / using undefined jQuery will consider it as: undefined
$('#grid').gridy({
url: '/gridy',
always: function(jqXHR, textStatus) {
alert('Successfully completed!');
}
});
url: '/gridy',
always: function(jqXHR, textStatus) {
alert('Successfully completed!');
}
});
Function executed when the grid finish the request.
Explanation: you can stop a loading message when request finish.
cache: undefined / using undefined jQuery will consider it as: true, false for dataType 'script' and 'jsonp'
$('#grid').gridy({
url: '/gridy',
cache: true
});
url: '/gridy',
cache: true
});
Enables the ajax cache.
Explanation: you can enable de ajax cache to avoid reload some data.
contentType: undefined / using undefined jQuery will consider it as: 'application/x-www-form-urlencoded'
$('#grid').gridy({
url: '/gridy',
contentType: 'jsonp'
});
url: '/gridy',
contentType: 'jsonp'
});
The content type of the ajax request.
Explanation: you can do a cross domain request with JSONP.
dataType: 'json' / using undefined jQuery will consider it as: Intelligent Guess (xml, json, script, or html)
$('#grid').gridy({
url: '/gridy',
dataType: 'xml'
});
url: '/gridy',
dataType: 'xml'
});
The data type of the ajax request.
Explanation: you can receive the data as XML. * For now just JSON is supported!
done: undefined / using undefined jQuery will consider it as: undefined
$('#grid').gridy({
url: '/gridy',
done: function(data, textStatus, jqXHR) {
alert('Successfully loaded!');
}
});
url: '/gridy',
done: function(data, textStatus, jqXHR) {
alert('Successfully loaded!');
}
});
Function executed when the grid loads successfully.
Explanation: you can get the data returned from request and display a success message.
fail: undefined / using undefined jQuery will consider it as: undefined
$('#grid').gridy({
url: '/gridy',
fail: function(jqXHR, textStatus, errorThrown) {
alert('Some thing is wrong!');
}
});
url: '/gridy',
fail: function(jqXHR, textStatus, errorThrown) {
alert('Some thing is wrong!');
}
});
Function executed when occurs an error.
Explanation: you can recover an error and display it, or take a workaround decision.
jsonp: undefined / using undefined jQuery will consider it as: no effect.
$('#grid').gridy({
url: '/gridy',
jsonp: true
});
url: '/gridy',
jsonp: true
});
Override the callback function name in a jsonp request.
Explanation: you can override the callback name. jQuery 1.5+ you can set it to false to avoid append of "?callback" or "=?" and set the name using jsonpCallback option.
jsonpCallback: undefined / using undefined jQuery will consider it as: random value
$('#grid').gridy({
url: '/gridy',
jsonpCallback: 'MyCallbackName'
});
url: '/gridy',
jsonpCallback: 'MyCallbackName'
});
Specify the callback function name for a JSONP request.
Explanation:
- You can change the name of callback manually;
- Using static name you can have a better browser caching;
- But it is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling
- You can change the name of callback manually;
- Using static name you can have a better browser caching;
- But it is preferable to let jQuery generate a unique name as it'll make it easier to manage the requests and provide callbacks and error handling
page: 1
$('#grid').gridy({
url: '/gridy',
page: 3
});
url: '/gridy',
page: 3
});
The number of the page to be displayed.
Explanation: you can choose the number of the page you want to start.
params: {}
$('#grid').gridy({
url: '/gridy',
params: { 'language': 'pt_BR', 'status': 1 }
});
url: '/gridy',
params: { 'language': 'pt_BR', 'status': 1 }
});
...&language=pt_BR&status=1
A hash of parameters to be added to the query string.
Explanation: you can pass extra parameter to filter your search.
paramsElements: []
<input id="language" type="text" name="language" value="pt_BR" />
<input type="checkbox" name="status" value="0" checked="checked" class="status" />
<input type="checkbox" name="status" value="1" class="status" />
<input type="checkbox" name="status" value="2" checked="checked" class="status" />
<select name="entity.year">
<option value="2011">2011</option>
<option value="2012" selected="selected">2012</option>
<option value="2013">2013</option>
</select>
<input type="checkbox" name="status" value="0" checked="checked" class="status" />
<input type="checkbox" name="status" value="1" class="status" />
<input type="checkbox" name="status" value="2" checked="checked" class="status" />
<select name="entity.year">
<option value="2011">2011</option>
<option value="2012" selected="selected">2012</option>
<option value="2013">2013</option>
</select>
$('#grid').gridy({
url: '/gridy',
paramsElements: ['#language', '.status', '[name="entity.year"]']
});
url: '/gridy',
paramsElements: ['#language', '.status', '[name="entity.year"]']
});
...&language=pt_BR&status[]=0&status[]=2&entity.year=2012
Array of selectors of field to use the name and value as parameter.
Explanation:
- You can pass dinamically extra parameter coming from fields elements:
- The name of field will be the key and the value will be the value of that key;
- If the selector is a class then the parameters will be send as a array.
- You can pass dinamically extra parameter coming from fields elements:
- The name of field will be the key and the value will be the value of that key;
- If the selector is a class then the parameters will be send as a array.
sortName: ''
$('#grid').gridy({
url: '/gridy',
sortName: 'attribute'
});
url: '/gridy',
sortName: 'attribute'
});
Name of the default column sorted.
Explanation: you can choose a column of the grid to be sorted alphabetically.
sortOrder: 'asc'
$('#grid').gridy({
url: '/gridy',
sortOrder: 'desc'
});
url: '/gridy',
sortOrder: 'desc'
});
Order of classification.
Explanation: you can choose to sort the data in a column in ascending or descending order.
type: 'get'
$('#grid').gridy({
url: '/gridy',
type: 'post'
});
url: '/gridy',
type: 'post'
});
Type of the HTTP request.
Explanation: you can change the verb to get, post, delete or put, but it is a search, then it is recommended that you use the default get.
url: '/gridy'
$('#grid').gridy({
url: '/user/gridy',
type: 'post'
});
url: '/user/gridy',
type: 'post'
});
URL to request the data.
Explanation: you can change the URL to receive your data. Don't forget to prepend the context of your application.
Callback Options:
before: undefined
$('#grid').gridy({
url: '/gridy',
filter: function(page, sortName, sortOrder) {
return { page: 2, sortName: 'value', sortOrder: 'desc' };
}
});
url: '/gridy',
filter: function(page, sortName, sortOrder) {
return { page: 2, sortName: 'value', sortOrder: 'desc' };
}
});
Function executed before the grid call the request.
Explanation:
- You can receives the parameters 'page', 'sortName' and 'sortOrder' before the grid request the URL
- You can override each one of that attributes returning a hash with the desired values.
- You can receives the parameters 'page', 'sortName' and 'sortOrder' before the grid request the URL
- You can override each one of that attributes returning a hash with the desired values.
filter: undefined
$('#grid').gridy({
url: '/gridy',
before: function(data, page, sortName, sortOrder) {
if (page == 10) {
data.total = 0;
return data;
}
}
});
url: '/gridy',
before: function(data, page, sortName, sortOrder) {
if (page == 10) {
data.total = 0;
return data;
}
}
});
Function executed when the data is returned from request.
Explanation:
- You can receives the parameters 'data' that is the content of request, 'page', 'sortName' and 'sortOrder' when the data returned from request
- You'll receives the data as an object, then you can change and return it to the original data be overrided like a filter.
- The data will be overrided only if you return some object.
- You can receives the parameters 'data' that is the content of request, 'page', 'sortName' and 'sortOrder' when the data returned from request
- You'll receives the data as an object, then you can change and return it to the original data be overrided like a filter.
- The data will be overrided only if you return some object.
Content Options:
columns: []
$('#grid').gridy({
url: '/gridy',
columns: [
{ name: 'Attribute', value: 'attribute', width: 100, clazz: 'special' },
{ value: 'value', width: 200 },
{ name: 'Description', width: 300 },
{ width: 50 }
}
});
url: '/gridy',
columns: [
{ name: 'Attribute', value: 'attribute', width: 100, clazz: 'special' },
{ value: 'value', width: 200 },
{ name: 'Description', width: 300 },
{ width: 50 }
}
});
Array of objects that represents the columns with name, value, width and clazz.
Explanation:
- You can choose to have the column label, it will be read-only, it will have a different style, or if nothing is displayed on header label;
- 1. Has all attributes;
- 2. Don't has a label then we can't click it to make a sort and nothing is displayed on label, but it is sorted, then the arrow shows;
- 3. Has the label, but don't has the value necessary to send to the query to be sorted, then it is read-only. It shows arrows indicating the sort;
- 4. Has just the width;
- 5. Was not declared, then don't have any special config. All attributes are optional;
- 6. Idem item 5;
- 7. The headers will take all values from 'columns' unless you override it using the specific 'headers' option to build columns and headers with different size;
- 8. The width from 'headers' will be applied only on header, so you can, for example, build a grid with one column (900px) and three headers (300px).
- You can choose to have the column label, it will be read-only, it will have a different style, or if nothing is displayed on header label;
- 1. Has all attributes;
- 2. Don't has a label then we can't click it to make a sort and nothing is displayed on label, but it is sorted, then the arrow shows;
- 3. Has the label, but don't has the value necessary to send to the query to be sorted, then it is read-only. It shows arrows indicating the sort;
- 4. Has just the width;
- 5. Was not declared, then don't have any special config. All attributes are optional;
- 6. Idem item 5;
- 7. The headers will take all values from 'columns' unless you override it using the specific 'headers' option to build columns and headers with different size;
- 8. The width from 'headers' will be applied only on header, so you can, for example, build a grid with one column (900px) and three headers (300px).
scroll: false / height: undefined
$('#grid').gridy({
url: '/gridy',
height: 200,
scroll: true
});
url: '/gridy',
height: 200,
scroll: true
});
Enables the display of the grid with scroll.
Explanation:
- You can choose the scroll style when you need a bunch of grid on the same screen with poor space;
- The 'height' attribute is mandatory, because scroll must has a vertical delimiter to be builded;
- The 'height' attribute just works with 'scroll' option.
- You can choose the scroll style when you need a bunch of grid on the same screen with poor space;
- The 'height' attribute is mandatory, because scroll must has a vertical delimiter to be builded;
- The 'height' attribute just works with 'scroll' option.
style: 'table'
$('#grid').gridy({
url: '/gridy',
style: 'free'
});
url: '/gridy',
style: 'free'
});

${attribute}

${value}

${description}

${version}

edit

</script>
Change between table and free style of template.
Explanation:
- You can use any structure on your template, not only the old table;
- In fact, Gridy was build with this goal: do cool things on your way;
- You can use combinate ul and li or any elements you want, build the template the way you want;
- On the example above we dicide to use only divs.
- You can use any structure on your template, not only the old table;
- In fact, Gridy was build with this goal: do cool things on your way;
- You can use combinate ul and li or any elements you want, build the template the way you want;
- On the example above we dicide to use only divs.
width: undefined
$('#grid').gridy({
url: '/gridy',
width: 1000
});
url: '/gridy',
width: 1000
});
Width of the grid.
Explanation: you can choose the width based on you screen space. Some grid needs less or more space then other.
Design Options:
evenOdd: false
$('#grid').gridy({
url: '/gridy',
evenOdd: true
});
url: '/gridy',
evenOdd: true
});
Enables the even odd row style.
Explanation: you can enable this option to make better the difference between the lines.
resize: true
$('#grid').gridy({
url: '/gridy',
resize: false
});
url: '/gridy',
resize: false
});
Apply the same width of the content to the other wrappers.
Explanation:
- This option to make sure that wrappers main, header, content, footer and buttons has the same size.
- You can turn off this option to choose a free size for each one of that wrapper.
- This option to make sure that wrappers main, header, content, footer and buttons has the same size.
- You can turn off this option to choose a free size for each one of that wrapper.
separate: true
$('#grid').gridy({
url: '/gridy',
separate: false
});
url: '/gridy',
separate: false
});
Change the style of the first line on grid.
Explanation: you enable this option to make more clearly the division between header and the rows.
skin: 'gridy'
$('#grid').gridy({
url: '/gridy',
skin: 'strong-layout'
});
url: '/gridy',
skin: 'strong-layout'
});
.gridy .gridy-header { font-weight: normal; }
.strong-layout .gridy-header { font-weight: bold; }
.strong-layout .gridy-header { font-weight: bold; }
Name of the root class name style "CSS prefix".
Explanation:
- You can choose different skin for each gridy and take advantage from selectors precedence to be possible use different style for each one;
- On the example above we are applying style on the same container, but the precedence indicates about what gridy we are talking;
- In this way you can creates a bunch of skin for your grid.
- You can choose different skin for each gridy and take advantage from selectors precedence to be possible use different style for each one;
- On the example above we are applying style on the same container, but the precedence indicates about what gridy we are talking;
- In this way you can creates a bunch of skin for your grid.
Effect Options:
clickFx: false
$('#grid').gridy({
url: '/gridy',
clickFx: true
});
url: '/gridy',
clickFx: true
});
Enables rows selection with different style on click.
Explanation:
- You can enable it to be possible click to do a line selection;
- Hold ctrl/command key to do more then one selection.
- You can enable it to be possible click to do a line selection;
- Hold ctrl/command key to do more then one selection.
hoverFx: false
$('#grid').gridy({
url: '/gridy',
hoverFx: true
});
url: '/gridy',
hoverFx: true
});
Enables highlight rows on mouseover.
Explanation:
- You can enable it to highlight the row where the mouse is over;
- It can help you to read the grid when there is a lot of rows.
- You can enable it to highlight the row where the mouse is over;
- It can help you to read the grid when there is a lot of rows.
Find Options:
find: ''
$('#grid').gridy({
url: '/gridy',
find: 'value'
});
url: '/gridy',
find: 'value'
});
...&find=value
Name of the column where research will be done.
Explanation:
- You choose wich column do you want to do a search;
- If your WHERE needs more parameters, then use 'params' or 'paramsElements' it.
- You choose wich column do you want to do a search;
- If your WHERE needs more parameters, then use 'params' or 'paramsElements' it.
finds: []
$('#grid').gridy({
url: '/gridy',
finds: [
{ name: 'Attribute', value: 'attribute' },
{ name: 'Value', value: 'value' },
{ name: 'Description', value: 'description' },
{ name: 'Version', value: 'version' }
]
});
url: '/gridy',
finds: [
{ name: 'Attribute', value: 'attribute' },
{ name: 'Value', value: 'value' },
{ name: 'Description', value: 'description' },
{ name: 'Version', value: 'version' }
]
});
List of objects with the name and value representing the avaliable columns for search.
Explanation:
- You can choose the columns you want make possible to do a search;
- You choose the value corresponding to the database column and a pretty name to be displayed to the user;
- Normally we put all values from columns, but you can choose even values that are not listed.
- You can choose the columns you want make possible to do a search;
- You choose the value corresponding to the database column and a pretty name to be displayed to the user;
- Normally we put all values from columns, but you can choose even values that are not listed.
findTarget: undefined

Find:

$('#grid').gridy({
url: '/gridy',
findTarget: '#target'
});
url: '/gridy',
findTarget: '#target'
});
Selector of the place where the "find" element will be appended.
Explanation:
- For default the find box is located on the right side of the search field, but you can change the place of it;
- To change the place, just provide a jQuery selector to indicate the new place.
- For default the find box is located on the right side of the search field, but you can change the place of it;
- To change the place, just provide a jQuery selector to indicate the new place.
Header Options:
arrowDown: 'gridy-arrow-down'
.arrow-down-big { background: url('big-arrow-down.png'); }
$('#grid').gridy({
url: '/gridy',
arrowDown: 'arrow-down-big'
});
url: '/gridy',
arrowDown: 'arrow-down-big'
});
Class with background used as icon on the descending sort.
Explanation: you can change the background icon with one you like.
arrowNone: 'gridy-arrow-none'
.arrow-no-sorted { background: url('no-sorted-arrow.png'); }
$('#grid').gridy({
url: '/gridy',
arrowNone: 'arrow-no-sorted'
});
url: '/gridy',
arrowNone: 'arrow-no-sorted'
});
Class with background used as icon when there is no sort by especific field.
Explanation: you can choose an empty image to hide the arrow when there is no sort.
arrowUp: 'gridy-arrow-up'
.arrow-up-big { background: url('big-arrow-up.png'); }
$('#grid').gridy({
url: '/gridy',
arrowUp: 'arrow-up-big'
});
url: '/gridy',
arrowUp: 'arrow-up-big'
});
Class with background used as icon on the ascending sort.
Explanation: you can change the background icon with one you like.
headers: []
$('#grid').gridy({
url: '/gridy',
columns : [
{ width: 1000 }
],
headers : [
{ name: 'Attribute', value: 'attribute', width: 100, clazz: 'special' },
{ name: 'Value', value: 'value', width: 100 },
{ name: 'Description', value: 'description', width: 600 },
{ name: 'Version', value: 'version', width: 100 },
{ width: 100 }
],
}
});
url: '/gridy',
columns : [
{ width: 1000 }
],
headers : [
{ name: 'Attribute', value: 'attribute', width: 100, clazz: 'special' },
{ name: 'Value', value: 'value', width: 100 },
{ name: 'Description', value: 'description', width: 600 },
{ name: 'Version', value: 'version', width: 100 },
{ width: 100 }
],
}
});
Array of objects that represents each header columns of the grid with name, value, width and clazz.
Explanation:
- See options 'column'!
- Whats the difference of 'columns' option?:
+ 1. On first look, nothing! But when you want a different width between headers and columns you must declare all options on 'headers' and just the width on 'columns';
+ 2. 'headers' has priority over columns less the attribute 'width' that each one has your own;
+ 3. If you declare 'name', 'value' and 'clazz' in both option, only the attributes of 'headers' will be considered;
+ 4. If you don't need different widths, then use just columns to be more visible de configuration.
- See options 'column'!
- Whats the difference of 'columns' option?:
+ 1. On first look, nothing! But when you want a different width between headers and columns you must declare all options on 'headers' and just the width on 'columns';
+ 2. 'headers' has priority over columns less the attribute 'width' that each one has your own;
+ 3. If you declare 'name', 'value' and 'clazz' in both option, only the attributes of 'headers' will be considered;
+ 4. If you don't need different widths, then use just columns to be more visible de configuration.
Page Options
buttonBackTitle: '‹ Back'
$('#grid').gridy({
url: '/gridy',
buttonBackTitle: 'Previous'
});
url: '/gridy',
buttonBackTitle: 'Previous'
});
Title of the navigation button back.
Explanation: you can choose a tip for what is that button on mouse over.
buttonMax: 10
$('#grid').gridy({
url: '/gridy',
buttonMax: 1
});
url: '/gridy',
buttonMax: 1
});
Number of paging buttons visible.
Explanation: you can choose to see just a few buttons page and let the responsibility to the back and next button.
buttonNextTitle: 'Next ›'
$('#grid').gridy({
url: '/gridy',
buttonNextTitle: 'Forward'
});
url: '/gridy',
buttonNextTitle: 'Forward'
});
Title of the navigation button next.
Explanation: you can choose a tip for what is that button on mouse over.
buttonOption: true
$('#grid').gridy({
url: '/gridy',
buttonOption: false
});
url: '/gridy',
buttonOption: false
});
Shows the pagination buttons.
Explanation: maybe you don't want to show the page buttons, even if it has more than one page to show.
buttonTitle: 'Page'
$('#grid').gridy({
url: '/gridy',
buttonTitle: false
});
url: '/gridy',
buttonTitle: false
});
Text prepended in the button title with it number.
Explanation: you can change the title for a good button page description.
JSON Options
listPath: 'list'
{ "root": { "data": [{"id": 1, "name": "Washington Botelho", "email"<EMAIL_ADDRESS>}, "total": 1 }
$('#grid').gridy({
url: '/gridy',
listPath: 'root.data'
});
url: '/gridy',
listPath: 'root.data'
});
The JSON root name.
Explanation:
- You can receive a JSON list in the node you choose.
- It can be at any depth.
- You can receive a JSON list in the node you choose.
- It can be at any depth.
totalPath: 'total'
{ "list": [{"id": 1, "name": "Washington Botelho", "email"<EMAIL_ADDRESS>"total": { "value": 1 } } }
$('#grid').gridy({
url: '/gridy',
totalPath: 'total.value'
});
url: '/gridy',
totalPath: 'total.value'
});
Path of the total element.
Explanation:
- You can change the path where you find the total value.
- It can be at any depth.
- You can change the path where you find the total value.
- It can be at any depth.
template: 'template'

${attribute}

${value}

${description}

${version}

</script>
$('#grid').gridy({
url: '/gridy',
template: 'template-free'
});
url: '/gridy',
template: 'template-free'
});
The ID of the script template loaded.
Explanation:
- If you have more than one kind of grid in you page with different structure, then you will need to create more than one template.
- For default the template with ID equals 'template' is called by Gridy, but you can creates other template and gives another ID to be hooked.
- If you have more than one kind of grid in you page with different structure, then you will need to create more than one template.
- For default the template with ID equals 'template' is called by Gridy, but you can creates other template and gives another ID to be hooked.
Loading Options
loadingIcon: 'gridy-loading'
.loading-icon { background: url('loading.png'); }
$('#grid').gridy({
url: '/gridy',
loadingIcon: 'loading-icon'
});
url: '/gridy',
loadingIcon: 'loading-icon'
});
Name of the class used as a loading icon.
Explanation: you can change the loading icon or even take it off.
loadingOption: true
$('#grid').gridy({
url: '/gridy',
loadingOption: false
});
url: '/gridy',
loadingOption: false
});
Enables the presentation of the loading message.

});
Text that will appear during the loading.
Explanation:
- You can set a text to explain that Gridy is loading.
- If your intention is just show the icon, than let this option with a empty text.
- You can set a text to explain that Gridy is loading.
- If your intention is just show the icon, than let this option with a empty text.
Message Options
messageOption: false
$('#grid').gridy({
url: '/gridy',
messageOption: false
});
url: '/gridy',
messageOption: false
});
Enables the display of messages about the grid.
Explanation:
- You can show error, success, warning and notice messages on this container.
- Error message throwed by application is showed on that automatically.
- You can show error, success, warning and notice messages on this container.
- Error message throwed by application is showed on that automatically.
messageTimer: 4000
$('#grid').gridy({
url: '/gridy',
messageTimer: 2000
});
url: '/gridy',
messageTimer: 2000
});
Time in milliseconds in which the messages will remain on the screen.
Explanation:
- If you want give more time to the user read the message, just increase the time.
- The time is in milliseconds, to convert it to second just divide by 1000.
- If you want give more time to the user read the message, just increase the time.
- The time is in milliseconds, to convert it to second just divide by 1000.
Other Options
debug: false
$('#grid').gridy({
url: '/gridy',
debug: true
});
url: '/gridy',
debug: true
});
Shows details of the grid request.
Explanation: to know about data that is sending on request.
Refresh Options
refreshIcon: 'gridy-button-refresh'
.refresh-button { background: url('refresh.png'); }
$('#grid').gridy({
url: '/gridy',
refreshIcon: 'refresh-button'
});
url: '/gridy',
refreshIcon: 'refresh-button'
});
Button to refresh the data of the grid.
Explanation: if someone alter some information on the grid you current vision will be old, then refresh it.
refreshOption: true
$('#grid').gridy({
url: '/gridy',
refreshOption: false
});
url: '/gridy',
refreshOption: false
});
Enables the refresh button.
Explanation: if you want refresh the grid just with another search you can remove the refresh button.
refreshTarget: undefined

Find:

$('#grid').gridy({
url: '/gridy',
refreshTarget: '#target'
});
url: '/gridy',
refreshTarget: '#target'
});
Enables the refresh button.
Explanation: if you want refresh the grid just with another search you can remove the refresh button.
Result Options
firstQuery: true
$('#grid').gridy({
url: '/gridy',
firstQuery: false
});
url: '/gridy',
firstQuery: false
});
Choose if the grid will do a first query when loaded on page.
Explanation:
- if you always starts doing a filter before the search, than you can turn off the first query.
- Of course if the options passed to the Gridy is enough, you don't need it
- This options has the objective to avoidd the first request that can bring useless data.
- if you always starts doing a filter before the search, than you can turn off the first query.
- Of course if the options passed to the Gridy is enough, you don't need it
- This options has the objective to avoidd the first request that can bring useless data.
noFirstQueryText: 'No search was performed yet!'
$('#grid').gridy({
url: '/gridy',
noFirstQueryText: 'Do your first query!'
});
url: '/gridy',
noFirstQueryText: 'Do your first query!'
});
Message displayed when the first query is blocked.
Explanation: you can choose a good description to tell the user that him must do the first query before show the data.
noResultText: 'No item was found!'
$('#grid').gridy({
url: '/gridy',
noResultText: 'No result, try again!'
});
url: '/gridy',
noResultText: 'No result, try again!'
});
Text shown when no result is found for the search.
Explanation: you can tell the user the no result was found, maybe give some tips.
resultOption: true
$('#grid').gridy({
url: '/gridy',
resultOption: false
});
url: '/gridy',
resultOption: false
});
Enables the presentation of details of the result.
Explanation: maybe you don't want to show message when there is no result or the first query was not trigger.
Row Options
rows: 10
$('#grid').gridy({
url: '/gridy',
rows: 3
});
url: '/gridy',
rows: 3
});
Number of rows displayed on each page.
Explanation:
- If you has more space on page you can increase this number to show more items.
- With lower number you'll has more pages and less database overload.
- If you has more space on page you can increase this number to show more items.
- With lower number you'll has more pages and less database overload.
rowsNumber: [5, 10, 25, 50, 100]
$('#grid').gridy({
url: '/gridy',
rowsNumber: [10, 100, 1000, 10000]
});
url: '/gridy',
rowsNumber: [10, 100, 1000, 10000]
});
List with the numbers of lines that should be displayed.
Explanation:
- You can choose how many lines can be displayed at once.
- Huge number can be slower, than make sure to keep a good number for pagination.
- You can choose how many lines can be displayed at once.
- Huge number can be slower, than make sure to keep a good number for pagination.
rowsTarget: undefined
$('#grid').gridy({
url: '/gridy',
rowsTarget: '#target'
});
url: '/gridy',
rowsTarget: '#target'
});
Selector of the place where the "rows" element will be appended.
Explanation:
- For default the rows box is located on the footer, but you can change the place of it;
- To change the place, just provide a jQuery selector to indicate the new place.
- For default the rows box is located on the footer, but you can change the place of it;
- To change the place, just provide a jQuery selector to indicate the new place.
Search Options
search: ''
...&search=wbotelhos%20blog
$('#grid').gridy({
url: '/gridy',
search: 'wbotelhos blog'
});
url: '/gridy',
search: 'wbotelhos blog'
});
Default term to be consulted.
Explanation:
- Some times you wants the Gridy loads and on the first load do a search, than just provide the term you want;
- Of couser that the term typed on search field will be override this value.
- Some times you wants the Gridy loads and on the first load do a search, than just provide the term you want;
- Of couser that the term typed on search field will be override this value.
searchButtonLabel: 'search'
$('#grid').gridy({
url: '/gridy',
searchButtonLabel: 'go!'
});
url: '/gridy',
searchButtonLabel: 'go!'
});
Value of the search button.
Explanation: choose an better description to the search button.
searchButtonTitle: 'Start the search'
$('#grid').gridy({
url: '/gridy',
searchButtonTitle: 'Click to search'
});
url: '/gridy',
searchButtonTitle: 'Click to search'
});
Title of the search button.
Explanation: choose a good explanation about what this button do.
searchFocus: true
$('#grid').gridy({
url: '/gridy',
searchFocus: false
});
url: '/gridy',
searchFocus: false
});
Enables the automatic focus in the search field.
Explanation:
- Its a good idea keep the focus enable to avoid the user click on field.
- If you have more than one grid on the same screen, maybe you will need choose wich will receives the focus.
- Its a good idea keep the focus enable to avoid the user click on field.
- If you have more than one grid on the same screen, maybe you will need choose wich will receives the focus.
searchOption: true
$('#grid').gridy({
url: '/gridy',
searchOption: false
});
url: '/gridy',
searchOption: false
});
Enables the search field.
Explanation:
- If you need a search over the grid, then just enable this option.
- Even if this options is off, you can set the initials values on Gridy configuration.
- If you need more on field to input search criteria, then use the 'params' and 'paramsElements' to send the values.
- For default we have just this search field, but you can create any you want.
- If you need a search over the grid, then just enable this option.
- Even if this options is off, you can set the initials values on Gridy configuration.
- If you need more on field to input search criteria, then use the 'params' and 'paramsElements' to send the values.
- For default we have just this search field, but you can create any you want.
searchTarget: undefined
$('#grid').gridy({
url: '/gridy',
searchTarget: '#target'
});
url: '/gridy',
searchTarget: '#target'
});
Selector of the place where the "search" element will be appended.
Explanation:
- For default the search box is located on the top of Gridy, but you can change the place of it;
- To change the place, just provide a jQuery selector to indicate the new place.
- For default the search box is located on the top of Gridy, but you can change the place of it;
- To change the place, just provide a jQuery selector to indicate the new place.
searchText: ''
$('#grid').gridy({
url: '/gridy',
searchText: 'type your search here...'
});
url: '/gridy',
searchText: 'type your search here...'
});
Text displayed in the search field.
Explanation: you can set a tip text to encourage the user type something on search field.
Status Options
statusOption: true
$('#grid').gridy({
url: '/gridy',
statusOption: false
});
url: '/gridy',
statusOption: false
});
Enables the status information text.
Explanation: let it on to see how many pages the gridy has, you current page and the total of items.
statusText: 'Displaying {from} - {to} of {total} items'
$('#grid').gridy({
url: '/gridy',
statusText: 'Page: {from} | Total Page: {to} | Total Items: {total}'
});
url: '/gridy',
statusText: 'Page: {from} | Total Page: {to} | Total Items: {total}'
});
Enables the status information text.
Explanation:
- The text has three templates that can be used or not;
- {from} you current page;
- {to} the number of the last page;
- {total} the total of item.
- The text has three templates that can be used or not;
- {from} you current page;
- {to} the number of the last page;
- {total} the total of item.
Changing the settings globally:
$.fn.catchy.defaults.scroll = true;
$.fn.catchy.defaults.sortOrder = 'desc';
- You can change any option mention the scope $.fn.gridy.defaults. + option_name;$.fn.catchy.defaults.sortOrder = 'desc';
- This setup must be called before you bind the Gridy, of course.
Public functions:
$('#grid').gridy('reload');
Reload the grid with the current filter configuration.
$('#grid').gridy('set', { scroll: true });
Reload the grid setting new configurations.


Cloud Vision V1 API - Class Google::Cloud::Vision::V1::AnnotateImageResponse (v0.6.4)
Reference documentation and code samples for the Cloud Vision V1 API class Google::Cloud::Vision::V1::AnnotateImageResponse.
Response to an image annotation request.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#context
def context() -> ::Google::Cloud::Vision::V1::ImageAnnotationContext
Returns
- (::Google::Cloud::Vision::V1::ImageAnnotationContext) — If present, contextual information is needed to understand where this image comes from.
#context=
def context=(value) -> ::Google::Cloud::Vision::V1::ImageAnnotationContext
Parameter
- value (::Google::Cloud::Vision::V1::ImageAnnotationContext) — If present, contextual information is needed to understand where this image comes from.
Returns
- (::Google::Cloud::Vision::V1::ImageAnnotationContext) — If present, contextual information is needed to understand where this image comes from.
#crop_hints_annotation
def crop_hints_annotation() -> ::Google::Cloud::Vision::V1::CropHintsAnnotation
Returns
- (::Google::Cloud::Vision::V1::CropHintsAnnotation) — If present, crop hints have completed successfully.
#crop_hints_annotation=
def crop_hints_annotation=(value) -> ::Google::Cloud::Vision::V1::CropHintsAnnotation
Parameter
- value (::Google::Cloud::Vision::V1::CropHintsAnnotation) — If present, crop hints have completed successfully.
Returns
- (::Google::Cloud::Vision::V1::CropHintsAnnotation) — If present, crop hints have completed successfully.
#error
def error() -> ::Google::Rpc::Status
Returns
-
(::Google::Rpc::Status) — If set, represents the error message for the operation.
Note that filled-in image annotations are guaranteed to be
correct, even when
error
is set.
#error=
def error=(value) -> ::Google::Rpc::Status
Parameter
-
value (::Google::Rpc::Status) — If set, represents the error message for the operation.
Note that filled-in image annotations are guaranteed to be
correct, even when
error
is set.
Returns
-
(::Google::Rpc::Status) — If set, represents the error message for the operation.
Note that filled-in image annotations are guaranteed to be
correct, even when
error
is set.
#face_annotations
def face_annotations() -> ::Array<::Google::Cloud::Vision::V1::FaceAnnotation>
Returns
- (::Array<::Google::Cloud::Vision::V1::FaceAnnotation>) — If present, face detection has completed successfully.
#face_annotations=
def face_annotations=(value) -> ::Array<::Google::Cloud::Vision::V1::FaceAnnotation>
Parameter
- value (::Array<::Google::Cloud::Vision::V1::FaceAnnotation>) — If present, face detection has completed successfully.
Returns
- (::Array<::Google::Cloud::Vision::V1::FaceAnnotation>) — If present, face detection has completed successfully.
#full_text_annotation
def full_text_annotation() -> ::Google::Cloud::Vision::V1::TextAnnotation
Returns
- (::Google::Cloud::Vision::V1::TextAnnotation) — If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.
#full_text_annotation=
def full_text_annotation=(value) -> ::Google::Cloud::Vision::V1::TextAnnotation
Parameter
- value (::Google::Cloud::Vision::V1::TextAnnotation) — If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.
Returns
- (::Google::Cloud::Vision::V1::TextAnnotation) — If present, text (OCR) detection or document (OCR) text detection has completed successfully. This annotation provides the structural hierarchy for the OCR detected text.
#image_properties_annotation
def image_properties_annotation() -> ::Google::Cloud::Vision::V1::ImageProperties
Returns
- (::Google::Cloud::Vision::V1::ImageProperties) — If present, image properties were extracted successfully.
#image_properties_annotation=
def image_properties_annotation=(value) -> ::Google::Cloud::Vision::V1::ImageProperties
Parameter
- value (::Google::Cloud::Vision::V1::ImageProperties) — If present, image properties were extracted successfully.
Returns
- (::Google::Cloud::Vision::V1::ImageProperties) — If present, image properties were extracted successfully.
#label_annotations
def label_annotations() -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, label detection has completed successfully.
#label_annotations=
def label_annotations=(value) -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Parameter
- value (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, label detection has completed successfully.
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, label detection has completed successfully.
#landmark_annotations
def landmark_annotations() -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, landmark detection has completed successfully.
#landmark_annotations=
def landmark_annotations=(value) -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Parameter
- value (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, landmark detection has completed successfully.
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, landmark detection has completed successfully.
#localized_object_annotations
def localized_object_annotations() -> ::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>
Returns
- (::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>) — If present, localized object detection has completed successfully. This will be sorted descending by confidence score.
#localized_object_annotations=
def localized_object_annotations=(value) -> ::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>
Parameter
- value (::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>) — If present, localized object detection has completed successfully. This will be sorted descending by confidence score.
Returns
- (::Array<::Google::Cloud::Vision::V1::LocalizedObjectAnnotation>) — If present, localized object detection has completed successfully. This will be sorted descending by confidence score.
#logo_annotations
def logo_annotations() -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, logo detection has completed successfully.
#logo_annotations=
def logo_annotations=(value) -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Parameter
- value (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, logo detection has completed successfully.
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, logo detection has completed successfully.
#product_search_results
def product_search_results() -> ::Google::Cloud::Vision::V1::ProductSearchResults
Returns
- (::Google::Cloud::Vision::V1::ProductSearchResults) — If present, product search has completed successfully.
#product_search_results=
def product_search_results=(value) -> ::Google::Cloud::Vision::V1::ProductSearchResults
Parameter
- value (::Google::Cloud::Vision::V1::ProductSearchResults) — If present, product search has completed successfully.
Returns
- (::Google::Cloud::Vision::V1::ProductSearchResults) — If present, product search has completed successfully.
#safe_search_annotation
def safe_search_annotation() -> ::Google::Cloud::Vision::V1::SafeSearchAnnotation
Returns
- (::Google::Cloud::Vision::V1::SafeSearchAnnotation) — If present, safe-search annotation has completed successfully.
#safe_search_annotation=
def safe_search_annotation=(value) -> ::Google::Cloud::Vision::V1::SafeSearchAnnotation
Parameter
- value (::Google::Cloud::Vision::V1::SafeSearchAnnotation) — If present, safe-search annotation has completed successfully.
Returns
- (::Google::Cloud::Vision::V1::SafeSearchAnnotation) — If present, safe-search annotation has completed successfully.
#text_annotations
def text_annotations() -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, text (OCR) detection has completed successfully.
#text_annotations=
def text_annotations=(value) -> ::Array<::Google::Cloud::Vision::V1::EntityAnnotation>
Parameter
- value (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, text (OCR) detection has completed successfully.
Returns
- (::Array<::Google::Cloud::Vision::V1::EntityAnnotation>) — If present, text (OCR) detection has completed successfully.
#web_detection
def web_detection() -> ::Google::Cloud::Vision::V1::WebDetection
Returns
- (::Google::Cloud::Vision::V1::WebDetection) — If present, web detection has completed successfully.
#web_detection=
def web_detection=(value) -> ::Google::Cloud::Vision::V1::WebDetection
Parameter
- value (::Google::Cloud::Vision::V1::WebDetection) — If present, web detection has completed successfully.
Returns
- (::Google::Cloud::Vision::V1::WebDetection) — If present, web detection has completed successfully.


Module LuaXML
A module that maps between Lua and XML without much ado.
LuaXML provides a set of functions for processing XML data in Lua.
It offers a very simple and natural mapping between the XML format and Lua tables,
which allows one to work with and construct XML data just using Lua’s normal
table access and iteration methods (e.g. ipairs()
).
Substatements and tag content are represented as array data having numerical
keys (1 .. n
), attributes use string keys, and tags the numerical index 0
.
This representation makes sure that the structure of XML data is preserved
exactly across read/write cycles (i.e. xml.eval(var:str())
should equal var
again).
To use LuaXML, first import the module - for example like this:
local xml = require("LuaXML")
LuaXML consists of a Lua file (LuaXML.lua
) and a corresponding C module
(LuaXML_lib
) – normally a shared library (.dll
/.so
), although a static
linking is possible as well. Both parts are imported by this call, provided
that they are found in Lua’s package search path.
Functions
| append (var, tag) | appends a new subordinate LuaXML object to an existing one. |
| children (var, tag, key, value, maxdepth) | iterate subelements (“XML children”) as key – value pairs. |
| decode (str) | converts a string from XML encoding. |
| encode (str) | converts a string to XML encoding. |
| eval (xml, mode) | parses an XML string into a Lua table. |
| find (var, tag, key, value) | recursively searches a Lua table for a subelement matching the provided tag and attribute. |
| iterate (var, cb, tag, key, value, r, max, d) | iterates a LuaXML object, invoking a callback function for all matching (sub)elements. |
| load (filename, mode) | loads XML data from a file and returns it as table. |
| match (var, tag, key, value) | match XML entity against given (optional) criteria. |
| new (arg, tag) | creates a LuaXML “object”, and optionally sets its tag. |
| registerCode (decoded, encoded) | registers a custom code for the conversion between non-standard characters and XML character entities. |
| save (var, filename, filemode, cmt, hdr) | saves a Lua var as XML file. |
| str (value, indent, tag) | converts any Lua value to an XML string. |
| tag (var, tag) | sets or returns tag of a LuaXML object. |
Fields
| WS_NORMALIZE | remove “lead in” whitespace before tags |
| WS_PRESERVE | preserve all whitespace, even between tags |
| WS_TRIM | strip all leading / trailing whitespace |
Functions
- append (var, tag)
-
appends a new subordinate LuaXML object to an existing one.
optionally sets tag
Parameters:
- var the parent LuaXML object
- tag optional string the tag of the appended LuaXML object
Returns:
-
appended LuaXML object, or
nil
in case of errors - children (var, tag, key, value, maxdepth)
-
iterate subelements (“XML children”) as key – value pairs.
This function is meant to be called in a generic
for
loop, similar to whatipairs(var)
would do. However you can easily specify additional criteria to match against here, possibly reducing the overhead needed to test for specific subelements.For the resulting
(k, v)
pairs, note thatk
is just a sequential number in the array of matched child elements, and has no direct relation to the actual “position” (subtag index) within eachv
’s parent object.Parameters:
- var the table (LuaXML object) to work on
- tag optional string XML tag to be matched
- key optional string attribute key to be matched
- value (optional) attribute value to be matched
- maxdepth
optional number
maximum depth allowed, defaults to 1 (only immediate children).
You can pass 0 or
true
to iterate all children recursively.
Returns:
-
Lua iterator function and initial state (Lua-internal use) – suitable
for a
for
loopSee also:
Usage:
local xml = require("LuaXML") local foobar = xml.eval('<foo><c bar="yes" /></foo>') -- iterate over those children that have a "bar" attribute: for k, v in foobar:children(nil, "bar") do print(k, v:tag(), v.bar) end -- will print -- 1 b no -- 2 c yes -- require "bar" to be "yes": for k, v in foobar:children(nil, "bar", "yes") do print(k, v:tag(), v.bar) end -- will print -- 1 c yes -- iterate "a" tags: (the first and fourth child will match) for k, v in foobar:children("a") do print(k, v:tag(), v.bar) end -- will print -- 1 a nil -- 2 a nil
- decode (str)
-
converts a string from XML encoding.
This function transforms
str
by replacing any special XML encodings with their “plain text” counterparts.Parameters:
- str string string to be transformed
Returns:
-
string
the decoded string
See also:
Usage:
print((xml.decode("<->")) -- "<->"
- encode (str)
-
converts a string to XML encoding.
This function transforms
str
by replacing any special characters with suitable XML encodings.Parameters:
- str string string to be transformed
Returns:
-
string
the XML-encoded string
See also:
Usage:
print(xml.encode("<->")) -- "<->"
- eval (xml, mode)
-
parses an XML string into a Lua table.
The table will contain a representation of the XML tag, attributes (and their
values), and element content / subelements (either as strings or nested LuaXML
“objects”).
Note: Parsing “wide” strings or Unicode (UCS-2, UCS-4, UTF-16) currently is not supported. If needed, convert such
xml
data to UTF-8 before passing it toeval()
. UTF-8 should be safe to use, and this function will also recognize and ignore a UTF-8 BOM (byte order mark) at the start ofxml
.Parameters:
- xml
string or userdata
the XML to be converted. When passing a userdata type
xml
value, it must point to a C-style (NUL-terminated) string. - mode
optional number
whitespace handling mode, one of the
WS_*
constants – see Fields. defaults to WS_TRIM (compatible to previous LuaXML versions)
Returns:
-
a LuaXML object containing the XML data, or
nil
in case of errors - xml
string or userdata
the XML to be converted. When passing a userdata type
- find (var, tag, key, value)
-
recursively searches a Lua table for a subelement
matching the provided tag and attribute. See the description of match for
the logic involved with testing for
tag
,key
andvalue
.Parameters:
- var the table to be searched in
- tag optional string the XML tag to be found
- key optional string the attribute key (= exact name) to be found
- value (optional) the attribute value to be found
Returns:
-
the first (sub-)table that satisfies the search condition,
or
nil
for no match - iterate (var, cb, tag, key, value, r, max, d)
-
iterates a LuaXML object,
invoking a callback function for all matching (sub)elements.
The iteration starts with the variable
var
itself (= default depth 0). A callback functioncb
gets invoked for each match , depending on the specified criteria. If ther
flag is set, the process will repeat recursively for the subelements ofvar
(at depth + 1). You can limit the scope by setting a maximum depth, or have the callback function explicitly request to stop the iteration (by returningfalse
).Parameters:
- var the table (LuaXML object) to iterate
- cb
function
callback function.
callback(var, depth)
will be called for each matching element.
The function may returnfalse
to request a stop; if its result is any other value (includingnil
), the iteration will continue. - tag optional string XML tag to be matched
- key optional string attribute key to be matched
- value (optional) attribute value to be matched
- r
optional boolean
recursive operation. If
true
, also iterate over the subelements ofvar
- max optional number maximum depth allowed
- d optional number initial depth value, defaults to 0
Returns:
-
The function returns two values: a counter representing the number of elements
that were successfully matched (and processed), and a boolean completion flag.
The latter is
true
for an exhaustive iteration, andfalse
if was stopped from the callback.See also:
- load (filename, mode)
-
loads XML data from a file and returns it as table.
Basically, this is just calling eval on the given file’s content.
Parameters:
- filename string the name and path of the file to be loaded
- mode optional number whitespace handling mode, defaults to WS_TRIM
Returns:
-
a Lua table representing the XML data, or
nil
in case of errors - match (var, tag, key, value)
-
match XML entity against given (optional) criteria.
Passing
nil
for one of thetag
,key
, orvalue
parameters means “don’t care” (i.e. match anything for that particular aspect). So for examplevar:match(nil, "text", nil) -- or shorter, but identical: var:match(nil, "text")
will look for an XML attribute (name) “text” to be present in
var
, but won’t consider its value or the tag ofvar
.Note: If you want to test for a specific attribute
value
, so also have to supply akey
– otherwisevalue
will be ignored.Parameters:
- var
the variable to test, normally a Lua table or LuaXML object. (If
var
is not a table type, the test always fails.) - tag
optional string
If set, has to match the XML tag (i.e. must be equal to the
tag(var, nil)
result) - key optional string If set, a corresponding attribute key needs to be present (exact name match).
- value
(optional)
arbitrary Lua value. If set, the attribute value for
key
has to match it.
Returns:
-
either
nil
for no match; or thevar
argument properly converted to a LuaXML object, equivalent toxml.new(var)
.This allows you to either make direct use of the matched LuaXML object, or to use the return value in a boolean test (
if xml.match(…)
), which is a common Lua idiom.Usage:
-- each of these will either return
x
, ornil
in case of no match x:match("foo") -- test for x:tag() == "foo" x:match(nil, "bar") -- test if x has a "bar" attribute x:match(nil, "foo", "bar") -- test if x has a "foo" attribute that equals "bar" x:match("foobar", "foo", "bar") -- test for "foobar" tag, and attr "foo" == "bar" - var
the variable to test, normally a Lua table or LuaXML object. (If
- new (arg, tag)
-
creates a LuaXML “object”, and optionally sets its tag.
The function either sets the metatable of an existing Lua table, or creates a
new (empty) “object”. If you pass an optional
tag
string, it will be assigned to the result.(It’s also possible to call this as
new(tag)
, which creates a new XML object with the given tag and is equivalent tonew({}, tag)
.)Note that it’s not mandatory to use this function in order to treat a Lua table as LuaXML object. Setting the metatable just allows the usage of a more object-oriented syntax (e.g.
xmlvar:str()
instead ofxml.str(xmlvar)
). XML objects created by load or eval automatically offer the object-oriented syntax.Parameters:
- arg (optional) (1) a table to be converted to a LuaXML object, or (2) the tag of the new LuaXML object
- tag optional string a tag value that will be assigned to the object
Returns:
-
LuaXML object, either newly created or the conversion of
arg
; optionally tagged as requested - registerCode (decoded, encoded)
-
registers a custom code for the conversion between non-standard characters
and XML character entities.
By default, only the most basic entities are known to LuaXML:
" < > '
On top (and independent) of that, the ampersand sign always gets encoded / decoded separately:
&
↔&
. Character codes above 127 are directly converted to an appropriate XML encoding, representing the character number (e.g.
). If other special encodings are needed, they can be registered using this function.Note: LuaXML now manages these encodings in a (private) standard Lua table. This allows you to replace entries by calling
registerCode()
again, using the samedecoded
and a differentencoded
. Encodings may even be removed later, by explictly registering anil
value:registerCode(decoded, nil)
.Parameters:
- decoded string the character (sequence) to be used within Lua
- encoded string the character entity to be used in XML
See also:
- save (var, filename, filemode, cmt, hdr)
-
saves a Lua var as XML file.
Basically this simply exports the string representation
xml.str(var)
(orvar:str()
), plus a standard header.Parameters:
- var the variable to be saved, normally a table
- filename string the filename to be used. An existing file of the same name gets overwritten.
- filemode optional string the file mode to pass to io.open , defaults to “w”
- cmt
optional string
custom comment to be written at the top of the file (after the header). You may pass an empty string if you don’t want any comment at all, otherwise it should preferably end with at least one newline. Defaults to:
\n\n
- hdr
optional string
custom header, written before anything else. You may pass an empty string if you don’t want any header at all, otherwise it should preferably end with a newline. Defaults to the standard XML 1.0 declaration:
<?xml version="1.0"?>\n
Usage:
var:save("simple.xml") var:save("no-comment.xml", nil, "") var:save("custom.xml", "a+", "\n", "")
- str (value, indent, tag)
-
converts any Lua value to an XML string.
Parameters:
- value
the value to be converted, normally a table (LuaXML object). However this
function will ‘encapsulate’ other Lua values (of arbitrary type) in a way that
should make them valid XML.
Note: Passing novalue
will cause the function to returnnil
. - indent optional number indentation level for ‘pretty’ output. Mainly for internal use, defaults to 0.
- tag
optional string
the tag to be used in case
value
doesn’t already have an ‘implicit’ tag. Mainly for internal use.
Returns:
-
string
an XML string, or
nil
in case of errors. - value
the value to be converted, normally a table (LuaXML object). However this
function will ‘encapsulate’ other Lua values (of arbitrary type) in a way that
should make them valid XML.
- tag (var, tag)
-
sets or returns tag of a LuaXML object.
This method is just “syntactic sugar” (using a typical Lua term) that allows
the writing of clearer code. LuaXML stores the tag value of an XML statement
at table index 0, hence it can be simply accessed or altered by
var[0]
. However, writingvar:tag()
for access orvar:tag(“newTag”)
for altering may be more self explanatory (and future-proof in case LuaXML’s tag handling should ever change).Parameters:
- var the variable whose tag should be accessed, a LuaXML object
- tag optional string the new tag to be set
Returns:
-
If you have passed a new tag, the function will return
var
(with its tag changed); otherwise the result will be the current tag ofvar
(normally a string).


{{weatherToday.temp}} ℃
{{weatherToday.status}}
{{weather.day}}
{{weather.temp}} ℃
Warning message
Are you sure want to delete this Widget


2048 is a single-player sliding block puzzle game
The game's objective is to slide numbered tiles on a grid to combine them to create a tile with the number 2048; however, you can keep playing the game, creating tiles with larger numbers (such as a 32,768 tile).
This project is a game engine for 2048 game with it's engine written in C++ and game front-end written in Python using the PyGame module.
Check it out


--- layout: post title: Slides from the talk about Phonegap date: 2011-01-11 00:16:04.000000000 +01:00 categories: - _ tags: [] status: publish type: post published: true meta: _edit_last: '1' _wp_old_slug: '' author: login: cybear email<EMAIL_ADDRESS>display_name: cybear first_name: '' last_name: '' ---
The Øresund Frontend Meetup today was a success. We had the most attendants ever. After my speech, some interesting discussions spawned. ØFM continues to impress me - our members are of very different background but with passion and much knowledge. If you're living in the Øresund region and are into Frontend, be sure to check out our meetup page.
The speech is up here:
http://tap5.com/talks/phonegap/
PDF, not perfectly formatted but works: http://tap5.com/talks/phonegap/phonegap.pdf
And by the way. The markdown to slideshow generator I used is https://github.com/n1k0/landslide - and its slideshow part is based off of http://slides.html5rocks.com/


Flips may seem familiar, since it is based off the popular game Othello. The Goal is to have more pieces that are your color on the board at the end than your opponent. To place a move, you must surround a row, either vertical, horizontal, or diagonal, of your opponents pieces with two of your own. Doing this will allow you to flip those surrounded pieces into your color.
Remember, you are playing a computer, so there may be some awkward interractions due to lack of communication. For example, the computer might play twice in a row. At first this might seem unfair, but it probably just recognized that you did not have any legal moves, therefore it really was the computer's turn twice in a row. If you have any interractions that you don't understand, check out this link for instructions: https://www.wikihow.com/Play-Othello. There are even tips on that site that can help you beat the computer! If after reading the rules you still encounter a confusing situation, feel free to email me at<EMAIL_ADDRESS>with the subject "Issues with Flips."


My Survey
Instructions for the survey.
Username
First Survey
First survey option.
Second survey option.
third survey option.
Second Survey
Fourth survey option.
Fifth survey option.
Sixth survey option.


Parser-generator class with an easy PHP-based API, similar to the pyparsing module in philosophy
Located in /Parser.php (line 35)
Simple test for whether a character is a whitespace character
Helper function returning a string of all alphabet and digit characters
Helper function returning a regex range of all the characters in the english alphabet
wrapper around MC_Parser_Def_OneOf that matches true and false, depending on case requirements
Returns a MC_Parser_Def_Set that matches a set of expressions delimited by a literal and optional whitespace
Returns a MC_Parser_Def_Literal that matches a literal word (but with non-whitespace following characters turned off)
Returns a MC_Parser_Def_Literal that matches a literal word
wrapper around MC_Parser_Def_Regex that matches numerical values (like 7, 3.5, and -42)
Helper function returning a regex range of all digit characters
Return a MC_Parser_Def_OneOf with the function arguments as the possible expressions
Returns a MC_Parser_Def_NOrMore that matches one or more expressions
Returns a MC_Parser_Def_OneOf that matches zero or one expressions
Return a MC_Parser_Def_Regex that matches a typical optionally-escaped quoted string
Returns a MC_Parser_Def_Recursive placeholder def that can be used to create recursive grammars
Return a MC_Parser_Def_Set with the function arguments as the subexpressions
Return a MC_Parser_Def_Word that matches a set of possible characters not separated by whitespace
Returns a MC_Parser_Def_NOrMore that matches zero or more expressions
Documentation generated on Wed, 13 May 2009 08:25:47 -0400 by phpDocumentor 1.4.2