This Twitch Privacy Policy applies to your use of www.twitch.tv, and any other websites, applications, or services provided, owned, or operated by Twitch Interactive, Inc. (with its affiliates, “Twitch”) that link to this Privacy Policy (collectively, the “Twitch Services”). Twitch values the privacy of users, subscribers, publishers, members, and others who visit and use the Twitch Services (collectively or individually, “you” or “users”) and wants you to be familiar with how we collect, use, and disclose personal information from and about you.
You may share personal information when using the Twitch Services. One example is when you provide information about yourself as part of the Twitch account creation process. Another is when you take certain actions on the Twitch Services that are public or intended to be public in nature, such as when you broadcast content, participate in a chat room, post profile information, follow a channel, or subscribe to a broadcast channel. Given the social nature of some of the Twitch Services, that information may be collected, used, or disclosed by others who are part of that social interaction. In addition, some features of the Twitch Services are designed to provide others with information about user activity, such as identifying the user who created a particular Clip or the subscription status of users for a given channel. We encourage you to be mindful of this when considering your activity on the Twitch Services.
By agreeing to this Privacy Policy in your Twitch account setup, or by using the Twitch Services, you expressly consent to the information handling practices described in this Policy. Storage and access to cookies that are set in connection with the Twitch Services are governed by the Twitch Cookie Policy (“Cookie Policy”).
Twitch does not share information that can identify you personally with third parties for their marketing or promotional uses without your consent. We may share such information for the following purposes:
You may decline to share certain information with Twitch, in which case Twitch may not be able to provide to you some of the features and functionality found on the Twitch Services. If you have created a Twitch Services account, then, depending on the service, you may be able to update your profile information and preferences or disable your account by logging in and going to the settings page -- for example, twitch.tv. For other requests to review, update, delete, or otherwise limit Twitch’s use of information that you have provided directly to Twitch, you may contact<EMAIL_ADDRESS>In your request, please include your email address, name, address, and telephone number and specify all relevant background. To protect your privacy and security, we may take steps to verify your identity before granting you access or making corrections to your information. You are responsible for maintaining the secrecy of your unique password and account information at all times.
If you would like to close your account and delete your profile information on www.twitch.tv go to http://www.twitch.tv/user/delete_account. For Twitch Services other than twitch.tv, you may update or delete information tied to your account, or close an account, by accessing the “My Account” area of the service or by submitting a help ticket to that service. If you close your account, Twitch may retain other information about you for the activities described in this Privacy Policy, or as permitted or required by applicable law.
The Twitch Services may link to third-party websites or services. The privacy practices of those third parties are not governed by this Privacy Policy. We encourage you to review the privacy policies of these third-party websites and services to understand their practices.
If you connect to a third-party service (such as Facebook, Twitter, or another third-party application) through the Twitch Services or otherwise link your Twitch account with a third-party service, you are requesting and authorizing us to share or grant access to information on your behalf (such as your username, the fact that your connection originated from the Twitch Services, and other relevant usage and diagnostic information) with such third party. We may also send information about the content you watch or your activities on the Twitch Services to such third parties. For example, we may make information available to app developers, game developers, and game publishers to facilitate purchases and awards of digital goods, such as games and in-game items.
The Twitch Extensions program allows broadcasters to embed interactive, custom, third-party content and applications on their channel pages. You can find out more about the specific Extension(s) operating on a given channel by clicking on the attribution links or icons that Twitch will make available on the channel page, for example, on the Twitch video player or at the bottom of an Extension's panel.
Interaction by a viewer with an Extension or with the channel on which the Extension is activated will provide the developer that operates the Extension with viewer information of the nature described above in “Automatically Collected Information.” Twitch does not provide access to your user name or ID to third-party Extension developers as part of the Twitch Extensions program unless you click “Grant Access” within the Extension or you install an Extension on your channel. You are responsible if you choose to provide that information to the developer independently, for example, through a web form on the Extension or visiting that developer’s website.
We require Extension developers to process data about you for only those purposes set forth in our developer agreement. We encourage you to visit an Extension’s detail page to review any privacy policy posted by the developer, which may include additional information on their privacy practices.
We may use third-party Web analytics services in connection with the Twitch Services, such as those of Google Analytics, its advertising features, and Mixpanel. These service providers use a variety of tracking technologies such as cookies to analyze how users use the Twitch Services. The information collected (described above in “Automatically Collected Information”) will be collected directly by these service providers to evaluate your use of the Twitch Services. For more information on how Google Analytics uses data from our websites and how you can control the information sent to Google, click here. To learn about opting out of Google Analytics, please click here. To opt out of Mixpanel, please click here. Because these opt outs are cookie-based, please note that if you get a new computer or device, install or start using a new browser, or erase or alter your browser’s cookie file, you may need to opt out again.
Twitch may allow advertisers, third-party advertising networks and third-party advertising serving companies to serve advertisements directly to you within the Twitch Services and other Twitch sites, services and software. By serving these advertisements directly to you, these companies can set their own cookies on your computer and trigger their own Web beacons and other tracking technologies to measure the effectiveness of their advertisements, and to collect and track information such as demographic information, inferred interests, aggregated information, and activity to assist them in personalizing the advertising content delivered to you. Twitch does not provide information that personally identifies you to these third-party ad servers or ad networks without your consent. However, if you respond to an advertisement that targets a certain audience (for example, males age 15 to 18 who have participated in certain promotions), the advertiser or ad-server may conclude that you fit the description of the audience that they were trying to reach.
This Privacy Policy does not apply to, and we cannot control the tracking technologies and activities of, other advertisers, third-party advertising networks, or third-party advertising servers. You should consult the respective privacy policies of these advertisers, third-party advertising networks, or third-party advertising servers. For more information about third-party advertising networks and similar entities that use these technologies, see http://www.aboutads.info/consumers, and to opt-out of such ad networks’ and services’ advertising practices, for example, Google Analytics advertising features and Google’s use of cookies, go to the Network Advertising Initiative opt-out page, the Digital Advertising Alliance opt-out page, or the Your Online Choices page.
Do Not Track (“DNT”) is a privacy preference that users can set in certain web browsers. DNT is a way for users to inform websites and services that they do not want certain information about their webpage visits collected over time and across websites or online services. We are committed to providing you with meaningful choices about the information collected on our website for third-party purposes, and that is why we provide the Network Advertising Initiative and the Digital Advertising Alliance opt-out links above. However, we do not recognize or respond to browser-initiated DNT signals, as the Internet industry is currently still working toward defining exactly what DNT means, what it means to comply with DNT, and a common approach to responding to DNT.
Twitch uses a variety of managerial, technical, and physical measures to protect the integrity and security of your information. These measures may vary based on the sensitivity of your information. However, no security precautions or systems can be completely secure. We cannot ensure or warrant the security of any information you transmit to Twitch, and you do so at your own risk. We cannot guarantee that such information may not be accessed, disclosed, altered, or destroyed by breach of any of our physical, technical, or managerial safeguards.
IF YOU ARE UNDER 13 YEARS OF AGE, THEN PLEASE DO NOT USE OR ACCESS THE TWITCH SERVICES AT ANY TIME OR IN ANY MANNER.
Protecting the privacy of young children is especially important. For that reason, Twitch does not knowingly collect or maintain personal information from persons under 13 years-of-age. If Twitch learns that personal information of persons under 13-years-of-age has been collected on or through the Twitch Services, Twitch will take appropriate steps to delete this information.
If you are the parent or legal guardian of a child under 13 who has become a Twitch Services member, then please contact Twitch at<EMAIL_ADDRESS>to have that child’s account terminated and personal information deleted.
In the event that Twitch, or some or all assets related to the Twitch Services are acquired by or merged with a third-party entity or in connection with a contemplated change of ownership transaction, we reserve the right, in any of these circumstances, to transfer or assign the information that we have collected from users as part of that merger, acquisition, sale, or other change of control event.
Twitch reserves the right to change, modify, add, or remove portions of this Privacy Policy at any time (for example to reflect updates to the Twitch Services or to reflect changes in the law). If Twitch changes this Privacy Policy, we will provide you notice of these changes, such as by sending an email, posting a notice on the Twitch Services, or updating the “Last Updated” date above. Please check this Privacy Policy periodically for those changes. Your continued use of the Twitch Services after the posting of changes constitutes your binding acceptance of such changes.
Please contact Twitch with any questions or comments about this Privacy Policy at 225 Bush Street, 9th Floor, San Francisco, CA 94104 or by email to<EMAIL_ADDRESS>We will respond to your inquiry within 30 days of its receipt. If you are a California resident, you may have this same information emailed to you by sending a letter to the foregoing address with your email address and a request for this information.
California law permits users who are California residents to request and obtain from us once a year, free of charge, a list of the third parties to whom we have disclosed their personal information (if any) for their direct marketing purposes in the prior calendar year, as well as the type of personal information disclosed to those parties. Twitch does not currently disclose personal information to third parties for their direct marketing purposes.


Keto Bombs
☰
˟
HOME
SWEET BOMBS
SAVORY BOMBS
CHOCOLATE BOMBS
DAIRY-FREE BOMBS
UNSWEETENED BOMBS
NUT-FREE BOMBS
EDITOR'S FAVORITES
ABOUT
Sweet Bombs
More...
Savory Bombs
More...
Chocolate Bombs
More...
Dairy-Free Bombs
More...
Unsweetened Bombs
More...
Nut-Free Bombs
More...
Editor's Favorites
More...
About Keto Bombs


{% extends "global/Page.html" %} {% load otree %} {% block title %} Please enter from which Website you would like to make the purchase. {% endblock %} {% block content %} . {% formfields %} {% next_button %} {% endblock %}


const source = Rx.Observable.interval(1000);
source.subscribe(value => console.log(value));
source.subscribe(value => console.log(value));
http://embed.plnkr.co/fLXZETUlWK8udqhZZfA9/
Cold observables start running on subscription.
Values are not shared among subscribers.
const source = Rx.Observable.interval(1000).publish();
source.connect();
source.subscribe(value => console.log(value));
source.subscribe(value => console.log(value));
http://embed.plnkr.co/IVMSXLayiEvnsoVx1VV5/
By default, observables in RxJS are cold, or unicast.
The multicast operators can be used to make an observable hot.
publish() : ConnectableObservable
Returns a ConnectableObservable
, which is a variety of Observable that waits until its
connect
method is called before it begins emitting items to those Observers that have subscribed to it.
multicast(selector: Function): Observable
Share the source using the provided Subject
.
share(): Observable
share
is like multicast
with a Subject
and refCount
Cold The observable creates the producer
Hot The observable closes over the producer
Cold
const cold = new Observable((observer) => {
const producer = new Producer();
// ...
});
Hot
const producer = new Producer();
const hot = new Observable((observer) => {
// ...
});
The Http service returns a cold observable, which means that each subscription results in a new request.
{{heroes | async}}
{{heroes | async}}
One solution is to share the Observable in the component.
ngOnInit() {
this.heroes = this.http.get('/api/heroes.json')
.share()
.map((response: Response) => response.json());
}


Toggle navigation
Menu
ProfHacks
×
Error
Profhacks Registration
First Name (Required):
Last Name (Required):
Email (Required):
Date of Birth (Required):
School (Required):
Major (Required):
Graduation Date (Required):
Shirt Size (Required):
-- Select an option --
Extra Small
Small
Medium
Large
Extra Large
Is this your first hackathon? (Required)
Yes
No
Gender (Optional):
thanks.html
-- Select an option --
Male
Female
Other
Dietary Restrictions (Optional) (Fill in your restriction if it isn't listed):
None
Vegetarian
Vegan
Gluten-Free
Special Needs (Optional):
Phone Number (Optional):
Would you like to recieve SMS notifications about Profhacks? (Optional) [Requires Phone Number]
Yes
No
Do you need travel reimbursement? If so, explain your travel expenses/mileage (Optional):
Would you like to upload you resume? (Optional)
By submitting, you are agreeing to the terms of the
MLH Contest Terms and Conditions
,
MLH Code of Conduct
, and the
MLH Privacy Policy
.
Please note that you may receive pre and post-event informational e-mails and occasional messages about hackathons from MLH as per the MLH Privacy Policy.
Submit


nrvr
index
/usr/lib/python2.7/site-packages/nrvr/__init__.py
See nested packages.
Package Contents
diskimage
(package)
distros
(package)
machine
(package)
process
(package)
remote
(package)
util
(package)
vm
(package)
wins
(package)
xml
(package)


{% extends 'sitewide/base.html' %} {% block title %}{{object.name}} - Income{% endblock %} {% load react %} {% load humanize %} {% block body %}
Political Committee
{% endif %} {% if object.e_type == "person" %}Individual Contributor
{% endif %} {% if object.e_type == "corp" %}Company or Corporate Contributor
{% endif %}State laws require that political organizations report their donations and spending to the Missouri Ethics Commission anywhere between one and five times each year, depending on the kind of organization and how much money they raise. We compile these reports and other public records to create profiles for each donor and political organization.
| Date | Source | Amount |
| {{transaction.date}} | {{transaction.t_from.name}} | ${{transaction.amount|floatformat:2|intcomma}} |
|---|


Singapore's monsoon season will last till March - so PUB is loaning out panels to prevent homes from flooding, Business Insider - Business Insider Singapore
by Jessica LinIt’s beginning to look a lot like Christmas in Singapore – except, instead of snow, we have the rainy northeast monsoon season.
The National Environment Agency said last Friday (Nov 15) that the monsoon season this year is expected to last till March 2020, bringing showers to Singapore and the surrounding region.
Since the first two months of the season typically bring frequent and heavy showers, officers from PUB are now making their rounds to inform residents on how to protect their homes and stay safe during floods.
Some homes in flood-prone or low-lying areas in the eastern and central parts of Singapore have also been introduced to new Dam Easy Flood Panels (DFPs), which the authority has loaned out.
The panels – with side panels than can be extended in just five minutes – can be easily installed at doorways to prevent floodwaters from entering homes by creating a watertight seal around the barrier. Unlike conventional flood panels, these panels do not need fixings that can sometimes damage doorways.
There are only 20 sets of flood panels available for loan, and only homes or businesses in localised areas – where conventional measures to alleviate floods are not feasible – are eligible.
There is also no way to apply for a loan. According to PUB, the homes have already been selected based on the suitability of their premises, doorway size and door frame type.
After the monsoon season, PUB will gather feedback from the selected users to evaluate the usability of the flood panels in future.
In addition, PUB’s Quick Response Team vehicles are now equipped with portable flood barriers, which can help divert and confine floodwaters to the inner lanes on roads so that traffic remains passable.
These barriers are lightweight and self-anchoring, so they can be quickly deployed in the event of a flash flood. PUB said it is also exploring the potential use of the barriers at construction sites for temporary diversion of storm water to facilitate construction activities.
In the meantime, reminders have been sent to all public agencies, town councils, and some 4,000 building owners and managing agents to carry out inspections and maintenance works on their pump drainage systems, and regularly clear the drains and vertical drain gratings within their premises, PUB said.
NEA will also increase the frequency of their checks and cleaning of public drains and Drop-Inlet Chambers in flood-prone areas and hot spots, it added.
On top of these measures, PUB also carries out 24-hour flood monitoring through a network of 278 closed circuit television (CCTV) cameras and 219 water level sensors installed in the major drains and canals.
Over the past year, PUB has also started to use radars, which provide advance warning of rainfall patterns, so its response vehicles can be deployed to areas where floods may potentially occur.
Read also:
- Singapore’s Temasek just unveiled an outdoor fan that can lower temperatures by 10 deg C and cut humidity by 15%
- Last year was Singapore’s eighth-warmest year – and December had the hottest day in the nation’s history
- By 2050, Singapore and KL will have climates that have never been seen before, report warns
- When Singapore heats up, poorer households use more water, richer ones turn up the air-con: Study


--- layout: page title: Laura Benton date: 2013-02-18 22:14:01.000000000 -05:00 type: page published: true status: publish categories: [] tags: [] meta: _edit_last: '396' _wp_page_template: default author: login: kenny email<EMAIL_ADDRESS>display_name: kenny first_name: Kenneth last_name: Flynn ---
Identifying the Adaptive Mutations that Allow for Increased Biofilm Formation by Burkholderia cenocepacia
Populations of B. cenocepacia evolved in the laboratory (by Steffen Poltak) under conditions favoring biofilms produce significantly more biofilm than the ancestral isolate. We hypothesize that these hyper-biofilm forming evolved populations are similar to those in chronic stages of infection that would be isolated from the lungs of CF patients. Our preliminary data on the physiology of the evolved populations support this hypothesis, but the underlying genetic mechanisms are unknown. These laboratory-evolved bacteria can now be used as a tool for tracking the evolution of a chronic infection.
As my thesis project, I am determining some of the molecular mechanisms by which B. cenocepacia has evolved into an excellent biofilm-former, which may be the same mechanisms by which this pathogen evolves in the CF lung. I have started a mutant library using a trimethoprim resistant Tn5-based construct for evaluating mutations conferring an increased biofilm phenotype and am also working on genetic complementations of a few of our experimentally evolved isolates for which we have sequence data.


{{ section.frontpagetitle }}
{{ section.description_markdown | markdownify }}
Read more {{nextPost.title}}
--- layout: home carousel: - image: /uploads/lbennett03-1.jpg caption: link: - image: /uploads/lbennett08.jpg caption: link: - image: /uploads/lbennett01-1.jpg caption: link: - image: /uploads/round-blue-earrings.jpg caption: link: - image: /assets/images/58f6352037015.jpg caption: link: - image: /assets/images/507f2e15b9aae.jpg caption: link: - image: /assets/images/58f63f9434076.jpg caption: link: - image: /assets/images/58f6204655441.jpg caption: link: - image: /assets/images/58f6656c128eb.jpg caption: link: - image: /assets/images/58f5f70c830e5.jpg caption: link: - image: /assets/images/58f5253601de2.jpg caption: link: _options: image: width: 1200 height: 1200 resize_style: contain mime_type: image/jpeg _comments: carousel: Edit the slideshow link: Optional web link from the slide caption: optional caption ---
{{ section.description_markdown | markdownify }}
Read more {{nextPost.title}}
{{ gallery.homepage_markdown | markdownify }}
{% endif %}


ineqpy.statistics¶
Descriptive statistics.
This module contains main descriptive statistics like: mean, variance, etc.
Functions
c_moment ([variable, weights, data, order, …]) |
Calculate the central moment of x with respect to param of order n, given the weights w. |
coef_variation ([variable, weights, data]) |
Calculate the coefficient of variation. |
density ([variable, weights, groups, data]) |
Density in percentage. |
kurt ([variable, weights, data]) |
Calculate the Kurtosis coefficient. |
mean ([variable, weights, data]) |
Calculate the mean of variable given weights. |
percentile ([variable, weights, data, p, …]) |
Calculate the value of a quantile given a variable and his weights. |
skew ([variable, weights, data]) |
Returns the asymmetry coefficient of a sample. |
std_moment ([variable, weights, data, param, …]) |
Calculate the standardized moment of order c for the variable` x` with respect to c. |
var ([variable, weights, data, ddof]) |
Calculate the variance. |


alerts, confirms and dialogs in one.
A jQuery plugin that provides great set of features like,
Auto-close, Ajax-loading, background-dismiss, themes and more.
This plugin is actively developed, We would love you have your suggestions.
These features can practically be used like so.
Elegant Alerts.
Stacked Confirmations
Important modal
Need input?
Its also a Dialog.
Something huge?
User friendly?
Keyboard actions?
Download
Download the Latest version and use files in the /dist/
folder.
via Bower:
$ bower install craftpip/jquery-confirm
via Npm:
$ npm install jquery-confirm
Dependencies:
Show an alert dialog
$.alert()
Has only confirm button.
$.alert({
title: 'Alert!',
content: 'Simple alert!',
confirm: function(){
alert('Confirmed!');
}
});
Show an confirm dialog
$.confirm()
Has both confirm & cancel buttons.
$.confirm({
title: 'Confirm!',
content: 'Simple confirm!',
confirm: function(){
alert('Confirmed!');
},
cancel: function(){
alert('Canceled!')
}
});
Show an modal dialog
$.dialog()
Hides both confirm & cancel buttons. (Shows close [x] button)
$.dialog({
title: 'Text content!',
content: 'Simple modal!',
});
NOTE:
The $.confirm()
, $.dialog()
& $.alert()
methods are alias of jconfirm()
.
All three methods indirectly call the jconfirm base function altering the provided options.
ADVANCED: this.$b
is the body div for jquery-confirm. You can find and alter any element at run time.
Change the button text for confirm and cancel.
$.confirm({
confirmButton: 'Yes i agree',
cancelButton: 'NO never !'
});
Apply the classes you want in the buttons.
Available bootstrap options are btn-primary
btn-inverse
btn-warning
btn-info
btn-danger
btn-success
$.confirm({
confirmButtonClass: 'btn-info',
cancelButtonClass: 'btn-danger'
})
Hide the Title/Content/Confirm Button/Cancel Button/Close icon when u don't need them.
$.confirm({
title: false, // hides the title.
cancelButton: false // hides the cancel button.
confirmButton: false, // hides the confirm button.
closeIcon: false, // hides the close icon.
content: false, // hides content block.
});
NOTE:
By default the closeIcon is visible if both confirm & cancel buttons are hidden. (dialog mode).
To explicitly show or hide closeIcon set closeIcon: true
or closeIcon: false
.
Shorthand to hide both buttons is to use $.dialog()
.
The Light & Dark themes that suit any website design,
$.confirm({
theme: 'white'
});
$.confirm({
theme: 'black'
});
$.confirm({
theme: 'hololight'
});
$.confirm({
theme: 'holodark'
});
$.confirm({
theme: 'supervan'
});
Jquery-confirm uses bootstrap's grid system for its layout.
You can simply provide column classes to adjust the modal's width.
You can also set responsive layouts. Bootstrap grid docs
$.confirm({
columnClass: 'col-md-4 col-md-offset-4'
});
$.confirm({
columnClass: 'col-md-4'
});
$.confirm({
columnClass: 'col-md-4 col-md-offset-8 col-xs-4 col-xs-offset-8'
});
Get content from a file/url.
Prepend URL:
to your URL. The URL will be called with the get ajax method.
Example content: "URL:http://example.com/getData?id=1"
The confirm/cancel buttons are disabled until the content is fetched from the URL.
You can also load HTML contents to the modal with ease.
view text.txt$.confirm({
content: 'url:text.txt',
title: 'Title'
});
// Using contentLoaded callback.
$.confirm({
content: 'url:text.txt',
title: 'Title',
contentLoaded: function(data, status, xhr){
var that = this;
setTimeout(function(){
that.setContent('Amazing huh?: '+status);
}, 1000);
}
});
contentLoaded is called regardless of success or error.
Get full control over Ajax calls and its callbacks.
Pass a function that returns jquery ajax promise. i.e. $.get()
, $.post()
, $.ajax()
, etc.
$obj
is the reference object to jconfirm, and provides set of methods.
$.confirm({
content: function ($obj) {
return $.ajax({
url: 'bower.json',
dataType: 'json',
success: function (data) {
$obj.setContent('Plugin description: '+data.description); // sets the content and centers the dialog on screen.
// Ahh, success!
},
error: function () {
$obj.contentDiv.html("Something went wrong, please try again later."); // sets the content straightaway.
// Handle it your way
}
});
},
confirm: function(){
// here this.content is the current content overwritten everytime new content is set.
this.setContent(this.content+'
Adding a new sentence.
');
return false;
}
});
All the impression lies in what we see.
Lots and lots of animations
2D animations:
3D animations:
$.confirm({
animation: 'zoom'
});
see options for list of options you can apply.
Some eye candy thats in fashion.
$.confirm({
animationBounce: 1.5, // default is 1.5 whereas 1 is no bounce.
});
Adjust the duration of animation.
$.confirm({
animationSpeed: 2000 // 2 seconds
});
$.confirm({
animationSpeed: 200 // 0.2 seconds
});
Do a action if the user does not respond of specified time.
The autoClose
option takes in a string, like 'confirm|4000'
where confirm is the action to trigger after 4000 milliseconds.
Practical examples of autoClose
$.confirm({
title: 'Delete user?',
content: 'This dialog will automatically trigger \'cancel\' in 6 seconds if you don\'t respond.',
autoClose: 'cancel|6000',
confirm: function(){
alert('confirmed');
},
cancel:function(){
alert('canceled');
}
});
$.confirm({
title: 'Logout?',
content: 'Your time is out, you will be automatically logged out in 10 seconds.',
autoClose: 'confirm|10000',
confirm: function(){
alert('confirmed');
},
cancel:function(){
alert('canceled');
}
});
Give meaning to your dialog with custom icons.
Read about Font Awesome here.
$.confirm({
icon: 'glyphicon glyphicon-heart',
title: 'glyphicon'
});
$.confirm({
icon: 'fa fa-warning',
title: 'font-awesome'
});
$.alert({
icon: 'fa fa-spinner fa-spin',
title: 'Working!',
content: 'Sit back, we are processing your request.
The animated icon is provided by Font-Awesome!'
});
By default the 'cancel' action is trigged if the user click outside of the dialog.
$.confirm({
backgroundDismiss: true,
content: 'Click outside the dialog'
});
$.confirm({
backgroundDismiss: false,
content: 'Click outside the dialog'
});
Enables keyboard events on jquery-confirm dialog.
ENTER calls confirm();
& ESC calls cancel();
$.confirm({
keyboardEnabled: true,
content: 'Press ESC or ENTER to see it in action.',
cancel: function(){
alert('canceled');
},
confirm: function(){
alert('confirmed');
}
});
If you have a form inside your modal, you'll probably need to attach events to it.
Most used to interact with the elements inside the modal.
$.confirm({
content: 'Imagine this is a complex form and you have to attach events all over the form or any element
<button type="button" class="examplebutton">I\'m alive!</button>',
onOpen: function(){
alert('after the modal is opened');
// find the input element and attach events to it.
// NOTE: `this.$b` is the jquery-confirm's content DIV.
this.$b.find('button.examplebutton').click(function(){
alert('You clicked on me!');
});
},
onClose: function(){
alert('before the modal is closed');
},
onAction: function(){
alert('Any of confirm or cancel was clicked');
}
});
You can setup global settings for your jconfirm.
jconfirm.defaults should be set after the plugin has loaded.
jconfirm.defaults = {
title: 'Hello',
content: 'Are you sure to continue?',
contentLoaded: function(){
},
icon: '',
confirmButton: 'Okay',
cancelButton: 'Cancel',
confirmButtonClass: 'btn-default',
cancelButtonClass: 'btn-default',
theme: 'white',
animation: 'scale',
animationSpeed: 400,
animationBounce: 1.5,
keyboardEnabled: false,
container: 'body',
confirm: function () {
},
cancel: function () {
},
backgroundDismiss: true,
autoClose: false,
closeIcon: null,
columnClass: 'col-md-6 col-md-offset-3',
onOpen: function(){
},
onClose: function(){
},
onAction: function(){
}
};
Options, their defaults and possibilities.
| Name | type | default | description |
|---|---|---|---|
| title | String | 'Hello' |
Title of the dialog. |
| content | String, Function | 'Are you sure to continue?' |
Content for the dialog. Or use a function that returns Ajax promise. |
| contentLoaded | function | function(){} |
(optionally available) If you load content via URL using 'url:http://abc.com/xyz', contentLoaded will be the callback. |
| icon | String | '' |
Icon class prepended before the title. |
| confirmButton | String | 'Okay' |
Button text for the confirm callback. |
| cancelButton | String | 'Cancel' |
Button text for the cancel callback. |
| confirmButtonClass | String | 'btn-default' |
Class for the confirm button. |
| cancelButtonClass | String | 'btn-default' |
Class for the cancel button. |
| theme | String | 'white' |
Color theme for the dialog. possible options are 'white' & 'black' |
| animation | String | 'scale' |
Open & Close animation for the dialog. possible options are 'scale', 'top', 'bottom', 'left', 'right', 'zoom', 'opacity', 'none', 'rotate', 'rotatex', 'rotatey', 'scalex', 'scaley'. The 'blur' animation was removed in v1.1.2 |
| animationSpeed | Number | 400 |
Animation duration in miliseconds. |
| animationBounce | Float | 1.5 |
Adds a Bounce open animation, 1 = No bounce |
| keyboardEnabled | Boolean | false |
Use the ENTER key to trigger the confirm action and ESC key to trigger the cancel action. |
| container | String | 'body' |
Specify where the generated HTML content for jconfirm should append. By default it appends in the document's . |
| confirm | Function | function(){} |
function to run after the user clicks the confirm button. |
| cancel | Function | function(){} |
function to run after the user clicks the cancel button. |
| backgroundDismiss | Boolean | true |
if the user can dismiss the dialog via clicking outside the dialog. |
| autoClose | String | false |
Auto-close the dialog within a specified time, if the user doesn't respond. possible option 'confirm|400'
the string is divided in two halves with |
| closeIcon | Boolean | null |
By default closeIcon is visible if both buttons are false. (dialog mode). closeIcon can be shown by setting this value to a Boolean value. |
| columnClass | String | 'col-md-6 col-md-offset-3' |
Provides a better way to set Custom width to Jquery-onfirm. You can also set custom widths for different display sizes using the Bootstraps grid. |
| onOpen | Function | function(){} |
This function is triggered when the jquery-confirm element is rendered. (After the popup is displayed) |
| onClose | Function | function(){} |
This function is triggered when the modal is closed. |
| onAction | Function | function(){} |
This function is triggered when any of the action performed, ie. confirm/cancel/closeicon click. |
The function var obj = $.confirm()
returns a reference object on execution.
This obj
can be used to interact with the opened dialog.
var obj = $.confirm({title: 'awesome'}); // initial execution
The $b object is a jQuery DOM reference to the dialog. You can access your Dialogs contents via this object.
var obj = $.confirm({
title: 'awesome',
content: 'Yeah, this is awesome'
})
var finding = obj.$b.find('.styled').html();
console.log(finding);
// Yeah, this is awesome
var contentBlock = obj.contentDiv.html();
console.log(contentBlock);
// Yeah, this is awesome
The close method closes/destroys the dialog.
var obj = $.confirm({
....
})
// Reference object is stored in 'obj', and the dialog opens on execution!
obj.close();
// The dialog is closed/destroyed.
Tells if the dialog is closed or not.
Returns TRUE if closed else returns FALSE,
Overwrites the content in the dialog and centers the dialog on screen.
Centers the dialog on screen.
You may need the returned reference obj inside the callback function, this
is what you need.
var obj = $.confirm({
title: 'awesome',
content: 'Get me yeah.',
confirm: function(){
console.log(this.content);
// Get me yeah.
}
})
console.log(obj.content);
// Get me yeah.
// Moral, this within the callback function is the returned object on execution.
At times you need the content inside dialog be validated, (For example, If you have a form inside, and the fields are required).
You can prevent the modal close by simply doing return false;
var obj = $.confirm({
title: 'awesome',
content: 'Your name: <input type="text" />', // You can also LOAD the html data using LOAD FROM URL feature,
confirm: function(){
var val = this.$b.find('input').val();
// there is a input element inside the content.
if(val == ''){
// if the value is empty, dont close the dialog. (and maybe show some error.)
return false;
}
}
// NOTE: You can return any falsy value to prevent close (such as '', null, undefined, 0).
});
Thanks for making it to the END of the document.
This Documentation needs review.


--- layout: default title: Ant Strap · An elegant CSS Framework built after Ant Design using Bootstrap 4. --- {{ site.name }}STRAP {{ site.description }} Stars Github
{{ site.description }}
Ant Strap was built entirely on the great work done by the developers of Bootstrap and Ant Design, thank you.


|
SdFat
|
Basic file class. More...
#include <ExFatFile.h>
Public Member Functions | |
| int | available () |
| uint64_t | available64 () |
| void | clearError () |
| void | clearWriteError () |
| bool | close () |
| bool | contiguousRange (uint32_t *bgnSector, uint32_t *endSector) |
| uint64_t | curPosition () const |
| uint64_t | dataLength () |
| uint32_t | dirIndex () |
| ExFatFile () | |
| bool | exists (const ExChar_t *path) |
| void | fgetpos (fspos_t *pos) |
| int | fgets (char *str, int num, char *delim=NULL) |
| uint64_t | fileSize () |
| uint32_t | firstSector () |
| void | flush () |
| void | fsetpos (const fspos_t *pos) |
| bool | getAccessDateTime (uint16_t *pdate, uint16_t *ptime) |
| bool | getCreateDateTime (uint16_t *pdate, uint16_t *ptime) |
| uint8_t | getError () |
| bool | getModifyDateTime (uint16_t *pdate, uint16_t *ptime) |
| size_t | getName (ExChar_t *name, size_t size) |
| bool | getWriteError () |
| bool | isContiguous () const |
| bool | isDir () const |
| bool | isFile () const |
| bool | isHidden () const |
| bool | isOpen () const |
| bool | isReadable () const |
| bool | isReadOnly () const |
| bool | isRoot () const |
| bool | isSubDir () const |
| bool | isWritable () const |
| bool | ls (print_t *pr) |
| bool | ls (print_t *pr, uint8_t flags, uint8_t indent=0) |
| bool | mkdir (ExFatFile *parent, const ExChar_t *path, bool pFlag=true) |
| bool | open (const ExChar_t *path, int oflag=0X00) |
| bool | open (ExFatFile *dirFile, const ExChar_t *path, oflag_t oflag) |
| bool | open (ExFatFile *dirFile, uint32_t index, oflag_t oflag) |
| bool | open (ExFatVolume *vol, const ExChar_t *path, int oflag) |
| bool | openNext (ExFatFile *dirFile, oflag_t oflag=0X00) |
| bool | openRoot (ExFatVolume *vol) |
| operator bool () | |
| int | peek () |
| bool | preAllocate (uint64_t length) |
| size_t | printAccessDateTime (print_t *pr) |
| size_t | printCreateDateTime (print_t *pr) |
| size_t | printField (double value, char term, uint8_t prec=2) |
| size_t | printField (float value, char term, uint8_t prec=2) |
| template<typename Type > | |
| size_t | printField (Type value, char term) |
| size_t | printFileSize (print_t *pr) |
| size_t | printModifyDateTime (print_t *pr) |
| size_t | printName (print_t *pr) |
| int | read () |
| int | read (void *buf, size_t count) |
| bool | remove () |
| bool | remove (const ExChar_t *path) |
| bool | rename (const ExChar_t *newPath) |
| bool | rename (ExFatFile *dirFile, const ExChar_t *newPath) |
| void | rewind () |
| bool | rmdir () |
| bool | seekCur (int64_t offset) |
| bool | seekEnd (int64_t offset=0) |
| bool | seekSet (uint64_t pos) |
| bool | sync () |
| bool | timestamp (uint8_t flags, uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second) |
| bool | truncate () |
| bool | truncate (uint64_t length) |
| uint64_t | validLength () |
| size_t | write (const char *str) |
| size_t | write (const void *buf, size_t count) |
| size_t | write (uint8_t b) |
Friends | |
| class | ExFatVolume |
Basic file class.
|
inline |
Create an instance.
|
inline |
available64() is recommended for very large files.
Zero is returned for directory files.
|
inline |
|
inline |
Clear all error bits.
|
inline |
Clear writeError.
| bool ExFatFile::close | ( | ) |
Close a file and force cached data and directory information to be written to the storage device.
| bool ExFatFile::contiguousRange | ( | uint32_t * | bgnSector, |
| uint32_t * | endSector | ||
| ) |
Check for contiguous file and return its raw sector range.
| [out] | bgnSector | the first sector address for the file. |
| [out] | endSector | the last sector address for the file. |
Parameters may be nullptr.
|
inline |
|
inline |
|
inline |
|
inline |
Test for the existence of a file in a directory
| [in] | path | Path of the file to be tested for. |
The calling instance must be an open directory file.
dirFile.exists("TOFIND.TXT") searches for "TOFIND.TXT" in the directory dirFile.
| void ExFatFile::fgetpos | ( | fspos_t * | pos | ) |
get position for streams
| [out] | pos | struct to receive position |
| int ExFatFile::fgets | ( | char * | str, |
| int | num, | ||
| char * | delim = NULL |
||
| ) |
Get a string from a file.
fgets() reads bytes from a file into the array pointed to by str, until num - 1 bytes are read, or a delimiter is read and transferred to str, or end-of-file is encountered. The string is then terminated with a null byte.
fgets() deletes CR, '\r', from the string. This insures only a '\n' terminates the string for Windows text files which use CRLF for newline.
| [out] | str | Pointer to the array where the string is stored. |
| [in] | num | Maximum number of characters to be read (including the final null byte). Usually the length of the array str is used. |
| [in] | delim | Optional set of delimiters. The default is "\n". |
|
inline |
| uint32_t ExFatFile::firstSector | ( | ) |
|
inline |
Arduino name for sync()
| void ExFatFile::fsetpos | ( | const fspos_t * | pos | ) |
Set position for streams
| [in] | pos | struct with value for new position |
| bool ExFatFile::getAccessDateTime | ( | uint16_t * | pdate, |
| uint16_t * | ptime | ||
| ) |
Get a file's access date and time.
| [out] | pdate | Packed date for directory entry. |
| [out] | ptime | Packed time for directory entry. |
| bool ExFatFile::getCreateDateTime | ( | uint16_t * | pdate, |
| uint16_t * | ptime | ||
| ) |
Get a file's create date and time.
| [out] | pdate | Packed date for directory entry. |
| [out] | ptime | Packed time for directory entry. |
|
inline |
| bool ExFatFile::getModifyDateTime | ( | uint16_t * | pdate, |
| uint16_t * | ptime | ||
| ) |
Get a file's modify date and time.
| [out] | pdate | Packed date for directory entry. |
| [out] | ptime | Packed time for directory entry. |
| size_t ExFatFile::getName | ( | ExChar_t * | name, |
| size_t | size | ||
| ) |
Get a file's name followed by a zero byte.
| [out] | name | An array of characters for the file's name. |
| [in] | size | The size of the array in characters. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool ExFatFile::ls | ( | print_t * | pr | ) |
List directory contents.
| [in] | pr | Print stream for list. |
| bool ExFatFile::ls | ( | print_t * | pr, |
| uint8_t | flags, | ||
| uint8_t | indent = 0 |
||
| ) |
List directory contents.
| [in] | pr | Print stream for list. |
| [in] | flags | The inclusive OR of |
LS_DATE - Print file modification date
LS_SIZE - Print file size.
LS_R - Recursive list of subdirectories.
| [in] | indent | Amount of space before file name. Used for recursive list to indicate subdirectory level. |
| bool ExFatFile::mkdir | ( | ExFatFile * | parent, |
| const ExChar_t * | path, | ||
| bool | pFlag = true |
||
| ) |
Make a new directory.
| [in] | parent | An open directory file that will contain the new directory. |
| [in] | path | A path with a valid name for the new directory. |
| [in] | pFlag | Create missing parent directories if true. |
| bool ExFatFile::open | ( | const ExChar_t * | path, |
| int | oflag = 0X00 |
||
| ) |
Open a file in the current working directory.
| [in] | path | A path with a valid name for a file to be opened. |
| [in] | oflag | bitwise-inclusive OR of open flags. See see ExFatFile::open(ExFatFile*, const char*, uint8_t). |
| bool ExFatFile::open | ( | ExFatFile * | dirFile, |
| const ExChar_t * | path, | ||
| oflag_t | oflag | ||
| ) |
Open a file or directory by name.
| [in] | dirFile | An open directory containing the file to be opened. |
| [in] | path | The path for a file to be opened. |
| [in] | oflag | Values for oflag are constructed by a bitwise-inclusive OR of flags from the following list. Only one of O_RDONLY, O_READ, O_WRONLY, O_WRITE, or O_RDWR is allowed. |
O_RDONLY - Open for reading.
O_READ - Same as O_RDONLY.
O_WRONLY - Open for writing.
O_WRITE - Same as O_WRONLY.
O_RDWR - Open for reading and writing.
O_APPEND - If set, the file offset shall be set to the end of the file prior to each write.
O_AT_END - Set the initial position at the end of the file.
O_CREAT - If the file exists, this flag has no effect except as noted under O_EXCL below. Otherwise, the file shall be created
O_EXCL - If O_CREAT and O_EXCL are set, open() shall fail if the file exists.
O_TRUNC - If the file exists and is a regular file, and the file is successfully opened and is not read only, its length shall be truncated to 0.
WARNING: A given file must not be opened by more than one file object or file corruption may occur.
| bool ExFatFile::open | ( | ExFatFile * | dirFile, |
| uint32_t | index, | ||
| oflag_t | oflag | ||
| ) |
Open a file by index.
| [in] | dirFile | An open ExFatFile instance for the directory. |
| [in] | index | The index of the directory entry for the file to be opened. The value for index is (directory file position)/32. |
| [in] | oflag | bitwise-inclusive OR of open flags. See see ExFatFile::open(ExFatFile*, const ExChar_t*, uint8_t). |
See open() by path for definition of flags.
| bool ExFatFile::open | ( | ExFatVolume * | vol, |
| const ExChar_t * | path, | ||
| int | oflag | ||
| ) |
Open a file in the volume working directory.
| [in] | vol | Volume where the file is located. |
| [in] | path | with a valid name for a file to be opened. |
| [in] | oflag | bitwise-inclusive OR of open flags. See see open(ExFatFile*, const char*, uint8_t). |
| bool ExFatFile::openNext | ( | ExFatFile * | dirFile, |
| oflag_t | oflag = 0X00 |
||
| ) |
Open the next file or subdirectory in a directory.
| [in] | dirFile | An open instance for the directory containing the file to be opened. |
| [in] | oflag | bitwise-inclusive OR of open flags. See see open(ExFatFile*, const char*, uint8_t). |
| bool ExFatFile::openRoot | ( | ExFatVolume * | vol | ) |
Open a volume's root directory.
| [in] | vol | The FAT volume containing the root directory to be opened. |
|
inline |
The parenthesis operator.
| int ExFatFile::peek | ( | ) |
Return the next available byte without consuming it.
| bool ExFatFile::preAllocate | ( | uint64_t | length | ) |
Allocate contiguous clusters to an empty file.
The file must be empty with no clusters allocated.
The file will have zero validLength and dataLength will equal the requested length.
| [in] | length | size of allocated space in bytes. |
| size_t ExFatFile::printAccessDateTime | ( | print_t * | pr | ) |
Print a file's access date and time
| [in] | pr | Print stream for output. |
| size_t ExFatFile::printCreateDateTime | ( | print_t * | pr | ) |
Print a file's creation date and time
| [in] | pr | Print stream for output. |
|
inline |
Print a number followed by a field terminator.
| [in] | value | The number to be printed. |
| [in] | term | The field terminator. Use '\n' for CR LF. |
| [in] | prec | Number of digits after decimal point. |
|
inline |
Print a number followed by a field terminator.
| [in] | value | The number to be printed. |
| [in] | term | The field terminator. Use '\n' for CR LF. |
| [in] | prec | Number of digits after decimal point. |
|
inline |
Print a number followed by a field terminator.
| [in] | value | The number to be printed. |
| [in] | term | The field terminator. Use '\n' for CR LF. |
| size_t ExFatFile::printFileSize | ( | print_t * | pr | ) |
Print a file's size in bytes.
| [in] | pr | Prtin stream for the output. |
| size_t ExFatFile::printModifyDateTime | ( | print_t * | pr | ) |
Print a file's modify date and time
| [in] | pr | Print stream for output. |
| size_t ExFatFile::printName | ( | print_t * | pr | ) |
Print a file's name
| [in] | pr | Print stream for output. |
|
inline |
Read the next byte from a file.
| int ExFatFile::read | ( | void * | buf, |
| size_t | count | ||
| ) |
Read data from a file starting at the current position.
| [out] | buf | Pointer to the location that will receive the data. |
| [in] | count | Maximum number of bytes to read. |
| bool ExFatFile::remove | ( | ) |
Remove a file.
The directory entry and all data for the file are deleted.
| bool ExFatFile::remove | ( | const ExChar_t * | path | ) |
Remove a file.
The directory entry and all data for the file are deleted.
| [in] | path | Path for the file to be removed. |
Example use: dirFile.remove(filenameToRemove);
| bool ExFatFile::rename | ( | const ExChar_t * | newPath | ) |
Rename a file or subdirectory.
| [in] | newPath | New path name for the file/directory. |
| bool ExFatFile::rename | ( | ExFatFile * | dirFile, |
| const ExChar_t * | newPath | ||
| ) |
Rename a file or subdirectory.
| [in] | dirFile | Directory for the new path. |
| [in] | newPath | New path name for the file/directory. |
|
inline |
Set the file's current position to zero.
| bool ExFatFile::rmdir | ( | ) |
Remove a directory file.
The directory file will be removed only if it is empty and is not the root directory. rmdir() follows DOS and Windows and ignores the read-only attribute for the directory.
|
inline |
Set the files position to current position + pos. See seekSet().
| [in] | offset | The new position in bytes from the current position. |
|
inline |
Set the files position to end-of-file + offset. See seekSet(). Can't be used for directory files since file size is not defined.
| [in] | offset | The new position in bytes from end-of-file. |
| bool ExFatFile::seekSet | ( | uint64_t | pos | ) |
Sets a file's position.
| [in] | pos | The new position in bytes from the beginning of the file. |
| bool ExFatFile::sync | ( | ) |
The sync() call causes all modified data and directory fields to be written to the storage device.
| bool ExFatFile::timestamp | ( | uint8_t | flags, |
| uint16_t | year, | ||
| uint8_t | month, | ||
| uint8_t | day, | ||
| uint8_t | hour, | ||
| uint8_t | minute, | ||
| uint8_t | second | ||
| ) |
Truncate a file at the current file position.
| [in] | flags | Values for flags are constructed by a bitwise-inclusive OR of flags from the following list |
T_ACCESS - Set the file's last access date and time.
T_CREATE - Set the file's creation date and time.
T_WRITE - Set the file's last write/modification date and time.
| [in] | year | Valid range 1980 - 2107 inclusive. |
| [in] | month | Valid range 1 - 12 inclusive. |
| [in] | day | Valid range 1 - 31 inclusive. |
| [in] | hour | Valid range 0 - 23 inclusive. |
| [in] | minute | Valid range 0 - 59 inclusive. |
| [in] | second | Valid range 0 - 59 inclusive |
| bool ExFatFile::truncate | ( | ) |
Truncate a file at the current file position. will be maintained if it is less than or equal to length otherwise it will be set to end of file.
|
inline |
Truncate a file to a specified length. The current file position will be set to end of file.
| [in] | length | The desired length for the file. |
|
inline |
|
inline |
Write a string to a file. Used by the Arduino Print class.
| [in] | str | Pointer to the string. Use getWriteError to check for errors. |
| size_t ExFatFile::write | ( | const void * | buf, |
| size_t | count | ||
| ) |
Write data to an open file.
| [in] | buf | Pointer to the location of the data to be written. |
| [in] | count | Number of bytes to write. |
|
inline |
Write a single byte.
| [in] | b | The byte to be written. |
|
friend |
ExFatVolume allowed access to private members.


Teaching 2023
Introduction to machine learning (MALAP). 6 lectures + 4 lab sessions (with the goal of implementing actual algorithms).
- All slides in book format: pdf
- 1. Introduction, ERM, k-NN: html, ipynb
- 2. Linear models: html, ipynb
- 3. SVM and kernels: html, ipynb
- 4. Decision trees and ensembling: html, ipynb
- 5. Neural networks: html, ipynb
- 6. Clustering and metric learning: html, ipynb
- Lab 0. Numerical algebra: ipynb
- Lab 1. Nearest neighbor classifier: ipynb
- Lab 2. Support vector machines: ipynb
- Lab 3. Decision trees: ipynb
- Lab 4. Metric learning: ipynb
|


Triage is the assessment of the degree of urgency or acuity of a patient’s need for treatment. This process occurs whenever a patient enters in the emergency department. Prioritizing patients is a challenge for emergency departments all over the world. One significant issue is the inability to quickly distinguish significantly ill patients; under-triaging these patients can delay time-sensitive treatment.
The Emergency Severity Index (ESI) is a prioritization tool used by the majority of hospitals in the US, rating patients by severity of condition and resources needed.
| ESI | |
|---|---|
| 1 | Life-saving measures needed immediately |
| 2 | High risk of a time-sensitive critical condition |
| 3 | Stable, with multiple resources needed for treatment |
| 4 | Stable, with only one resource needed for treatment |
| 5 | Stable, with no anticipated resource use |
Over-triaging (assigning a more urgent ESI rating than needed) and under-triaging remain problems. Under-triaging is more serious, since it implies that an individual’s condition requires more urgent attention than they are queued to receive. So what happens? Overutilization of the middle ESI 3 category.
We found that 39.9% of patients who experienced a critical outcome were correctly assigned to ESI 1 or ESI 2. Of those who died in the ED, 36% were assigned to ESI 3.


- MANIFEST_PATH - Static variable in class com.ensoftcorp.open.java.commons.bytecode.JarModifier
-
The standard manifest path
- MathSubsystem - Class in com.ensoftcorp.open.java.commons.subsystems
-
- MathSubsystem() - Constructor for class com.ensoftcorp.open.java.commons.subsystems.MathSubsystem
-
- META_INF - Static variable in class com.ensoftcorp.open.java.commons.bytecode.JarInspector
-
The directory that stores the manifest and jar signatures
- META_INF - Static variable in class com.ensoftcorp.open.java.commons.bytecode.JarModifier
-
The directory that stores the manifest and jar signatures
- methodParameter(Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the parameters of the given methods.
- methodParameter(Q, Integer...) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the parameters of the given methods at the given indices.
- methodParameter(Q, Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the parameters of the given methods.
- methodParameter(Q, Q, Integer...) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the parameters of the given methods at the given indices.
- methodReturn(Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the return nodes for the given methods.
- methodReturn(Q, Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the return nodes for the given methods.
- methodsOf(Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the methods declared by the given types.
- methodsOf(Q, Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the methods declared by the given types.
- methodThis(Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the 'this' identity nodes for the given methods.
- methodThis(Q, Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns the 'this' identity nodes for the given methods.
- mutatedBy(Q, Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns those elements in the origin which were called by or written by
elements in the mutators set.
- mutatedBy(Q, Q, Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Returns those elements in the origin which were called by or written by
elements in the mutators set.
- mutators(Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Given a Q containing methods or data flow nodes, returns a Q of things
which write to or call things in the Q.
- mutators(Q, Q) - Static method in class com.ensoftcorp.open.java.commons.analysis.CommonQueries
-
Given a Q containing methods or data flow nodes, returns a Q of things
which write to or call things in the Q.


Written by Walter Chang
Used by permission of the author. Copyright notice below.Correct pronunciation is critical to get the cadence and beat to line up; see the Pronunciation Guide at the end of this document for how you should pronounce the various assembler instructions.
To the tune of: The Major-General's Song, from
Pirates of Penzance
Inspired by Tom Lehrer's The Elements
There's div and nor and mult and or and sllv sra
There's xor and swl and beq and sll and bgezal jumps today
And multu, srav, and j combined with lhu and lui
And also slt and bne and instruction mthi
There's sh and sb and lbu and blez and jal and then sltu
And of course there's and and add and srl and sub and things to do
With the MIPS instructions I am very nimble on my feet
And though I sing assembler but I am really not a geek
There's addu, ori, slti, swr, and bgez and jalr too
And loads of other fun instructions that were put in just for you
The MIPS instruction set is very simple to be memorized
Which will come in handy when you have your code to optimize!
There's addi, divu, lh, rfe, and syscall, jr, mfcz
And mfc1, nop, and break, and bltzal with bczt
And srlv, xori, bltz, and lb, lwl, and addiu
andi, subu, lwr, and lwcz, mtcz, sltiu
There's bczf, bgtz to branch if it's greater than
And mflo and sw, these instructions are not any also-rans
There's mtlo and swcz too, although I don't know what they're for
And lw - that's obviously load word from mem bytes there are four
And now my song is through and I know all of my words by the heart
Which will come in handy when we have our projects multi-part
I live and breathe the MIPS instruction set on every night and day
Because the MIPS assembler will always try and work my way!
note: assembler is 4 syllables: ass-em-bell-er
The pronunciations suitable for this song are as follows:
http://www.cs.utexas.edu/users/walter/cs-songbook/instruction_set.html
Copyright Walter Chang. Permission granted for noncommercial use as long as attribution is maintained. walter@cs.utexas.edu


Constructor
new YateChannel(message)
Parameters:
| Name | Type | Description |
|---|---|---|
message |
YateMessage | Only "call.route" or "call.execute" are supported (required) |
Example
let chan = new YateChannel(incoming_message);
chan.init()
.then(m => console.log("Channel", m.id, "initialized"))
.then(() => chan.callTo("wave/play/./prompt.au"))
.then(m => console.log("Channel", m.id, "prompted"))
.then(() => chan.callJust("sip/sip:123@<IP_ADDRESS>"))
.then(m => console.log("Channel", m.id, "redirected"));
Methods
(async) answered(params) → {Promise}
answered() is an abstraction over call.answered message.
Parameters:
| Name | Type | Description |
|---|---|---|
params |
Object | parameters of call.answered message (optional) |
- Source:
- See:
Returns:
- resolve(false) if channel is not ready or has not been initialized, resolve(YateMessage) with "call.answered"
- Type
- Promise
(async) callJust(dst, params) → {Promise}
callJust() is an abstraction over call.execute message.
Parameters:
| Name | Type | Description |
|---|---|---|
dst |
string | callto destination for call.execute message i.e<EMAIL_ADDRESS>|
params |
Object | parameters for call.execute message (optional) |
- Source:
- See:
Returns:
- resolve(false) if channel is not ready or has not been initialized, resolve(YateMessage) with handled "call.execute"
- Type
- Promise
(async) callTo(dst, params) → {Promise}
callTo() is an abstraction over chan.attach message.
Parameters:
| Name | Type | Description |
|---|---|---|
dst |
string | is source for "wave/play/", consumer for "wave/record/" or override for "tone/" (required) |
params |
Object | parameters of chan.attach message (optional) |
- Source:
- See:
Returns:
- resolve(false) if channel is not ready or has not been initialized, resolve(YateMessage) with last message on complete
- Type
- Promise
(async) hangup(reason) → {Promise}
hangup() is an abstraction over call.drop message.
Parameters:
| Name | Type | Description |
|---|---|---|
reason |
string | reason parameter of call.drop message (optional) |
- Source:
- See:
Returns:
- resolve(YateMessage) with "call.drop" message
- Type
- Promise
(async) init(callback) → {Promise}
init() - initialize YateChannel before use.
This method waits until the "call.execute" message arrives.
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
function | (optional) |
Returns:
- resolve(YateMessage), resolve(false) if timeout
- Type
- Promise
(async) install(handler, name, priority) → {Promise}
install() - to set the "install" handler for the channel.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
handler |
function | (required) | |
name |
string | (required) | |
priority |
number | 80 | default value is 80 (optional) |
- Source:
- See:
Returns:
- Type
- Promise
(async) progress(params) → {Promise}
progress() is an abstraction over call.progress message.
Parameters:
| Name | Type | Description |
|---|---|---|
params |
Object | parameters of call.progress message (optional) |
- Source:
- See:
Returns:
- resolve(false) if channel is not ready or has not been initialized, resolve(YateMessage) with "call.progress"
- Type
- Promise
reset(message) → {undefined}
reset() - rejects active promise of channel.
It's useful if you need to break the chain of promises
Parameters:
| Name | Type | Description |
|---|---|---|
message |
any | (optional) |
Returns:
- Type
- undefined
(async) ringing(params) → {Promise}
ringing() is an abstraction over call.ringing message.
Parameters:
| Name | Type | Description |
|---|---|---|
params |
Object | parameters of call.ringing message (optional) |
- Source:
- See:
Returns:
- resolve(false) if channel is not ready or has not been initialized, resolve(YateMessage) with "call.ringing"
- Type
- Promise
(async) watch(handler, name) → {Promise}
watch() - to set the "watch" handler for the channel: filterName = "id", filterValue = channel.id.
Calling this method multiple times will overwrite the previous event handler. All event subscriptions will be automatically deleted after the call/channel hangup.
Parameters:
| Name | Type | Description |
|---|---|---|
handler |
function | (required) |
name |
string | (required) |
- Source:
- See:
Returns:
- Type
- Promise


What happens if you bring together Jer Thorp, known of many beautiful data representations, and Mark Hansen, UCLA statistics professor and one of the people behind the Moveable Type installation, together at the NYTLabs, which is the research and development lab of The New York Times Company.
Well, you get Cascade [nytlabs.com], a 3D interactive visualization tool that reveals how information propagates through social media space by linking the browsing behavior on the NYTimes website with the corresponding social activity in terms of content and URL sharing. In short, the tool aims to reveal the causal factors that determine how tweets about news stories are propagated in the most succesful ways. For instance, the visualization already can demonstrate how viral popularity is mostly influenced by the people who are followed by famous people, who in turn drive a lot of online discussions and retweet activity.
The "side view" shows a 2D bar-graph-like timeline of the activities of a specific story (e.g. shortening of links (blue), tweeting (red), etc.), which can also be explored in 3D, as the radius depicts the time passed since the original news story broke. The yellow sunburst-like "radar view" reveals the separation between individual conversations. The resulting "cascades" can also be further explored to focus only on the most influential tweets (the "backbone of a conversation"), and the specific users who posted them. As a result, the tool is able to display the overall life cycle of a news sharing event, and identify the most influential contributors that drive and influence this cycle.
Also at Nieman Lab.
Tip: the best way to appreciate this visualization, seems to include going through the quick tutorial explanation around the 1-minute mark of the main video, and then to explore several links below the "videos" subtitle, all at the original project page.


{% extends "!footer.html" %}
{% set show_copyright = False %}
{% block extrafooter %}
Copyright 2002-2021 © OpenNebula Project (OpenNebula.org). All Rights Reserved. Please send comments to the webmaster.
Read the Legal Notice. This site is hosted by OpenNebula Systems.
{% endblock %}


Ruby Classes
2/2/2016
Classes. They make everything organized, categorized, simplified. Classes allow you to create repeating objects that have the same instance variables and call the same methods. They create order to what would otherwise be absolute chaos!
What is a class? A class is an instance of an object. It’s like an object’s blue print. Think of some object classes you may already know - String, Integer, Float. What happens when you identify an object as a String? It suddenly has access to this huge world of methods. You can call a string’s length. You can capitalize it, lowercase it, and reverse it. You can even treat a string like an array! The String methods #length, #capitalize, #reverse, have all been declared within the String’s class. This gives any item declared as a String the power to use these methods.
So here is where things get really cool - you can create your own classes with their own variables and methods. Theoretically, you could even create your own String class. Would you ever want to do that? Probably not, Ruby gives you the String class built in to their code. Ruby actually gives us a ton of pre existing classes. However, there will be many times when you need to create your own class.
In order to better examine how to create a class, and why classes are useful, let’s look at an example.  You each have your own bags and a long list of items you need to bring. You could, of course, just create a list of the items each person wants to bring. You could even create a Ruby program that simply three arrays containing these lists of items. Maybe it would look something like this.
Tori = [“Jeans”,”Shirts”,”Running Shoes”,”Boots”,”Yoga Pants”,”,”Dresses”,”Hair Brush”,”Toothbrush”,”Deoderant”,”Shampoo”,”Conditioner”,”Hair Ties”,”Make Up”,”Jewelry”,”Chocolate”,”Present for Mom”,”Book for Sister”]
Matt = [“Jeans”,”Shirts”,”Running Shoes”,”Dress Shoes”,”Watch”,”Under Shirts”,”Shaving Cream”,”Body Wash”,”Deoderant”,”Toothbrush”,”Toothpaste”,”Chips”,”Granola Bar”,”Gatorade”,”Pajamas”]
Nors = [“Dog Food”,”Water Bowl”,”Food Bowl”,”Stuffed Squirrel”,”Extension Leash”,”Short Leash”,”Harness”,”Plaid Jacket”,”Blue Sweater”,”Squeaky Duck”,”Treats”]
This is a terrible way of completing this task. The name of the array indicates the owner of the list, but the name of a variable is a difficult thing to reference. What if you want to find or remove an item? What if you want to add an item? What if you want to print off a list of items by category? None of these things can be done, as there are no methods attached to these arrays. You could, of course, create individual methods and attach them to each collection, but that seems repetitive and therefore silly. There has to be an easier way. This is where classes come in.
The best way to learn is by jumping right in to an example! Check out the code below. This is a class called Bag
, which allows a user to create a "bag" that has an owner, description, and a list of organized items. This Bag class allows the user to add
items, remove
items, check_bag
to make sure everything is in there, and even unpack
when you arrive at your final destination! At any time, you can view a list of everything you are bringing in your bag with list_items
, and check the owner
or description
of the bag.
Please note that the code below was colored and prettified using a code HTML/CSS generator called hilite.me!
class Bag
attr_reader :owner, :description
attr_accessor :items
def initialize(owner, description, items={})
@owner = owner
@description = description
@items = items
end
# Add items by type and quantity to the item list
def add(type, thing, quantity=0)
# Add a new type if it does not already exist.
@items[type] = [] if !@items.has_key?(type)
list_by_type = @items[type]
if list_by_type.is_a? Array then
list_by_type.push(thing)
elsif list_by_type.has_key?(thing) then
list_by_type[thing] += quantity
else
list_by_type[thing] = quantity
end
end
# Remove items by type and quantity
def remove(type, thing, quantity=0)
missing_type_error = "We could not find #{type} as a type! Please try again."
missing_item_error = "#{thing} does not exist in your list under #{type}."
wrong_quantity_error = "You tried to delete more #{thing} than you have. #{thing} has been removed from the list."
# Checks if type exists in list
puts missing_type_error if !@items.has_key?(type)
return false if !@items.has_key?(type)
list = @items[type]
# Removes the item by quantity depending on Array or Hash type
if list.is_a? Array then
if list.include?(thing) then
list.delete(thing)
return true
else
puts missing_item_error
return false
end
elsif list.has_key?(thing) then
if list[thing] < quantity then
list.delete(thing)
puts wrong_quantity_error
return false
else
list[thing] -= quantity
return true
end
else
puts missing_item_error
return false
end
end
# List all items in your bag
def list_items
@items.each do |type,list|
puts "#{type}"
puts "--------------------"
list.each {|item, key| puts "#{item} #{key}"}
puts ""
end
end
# Check for lost items in your bag
def check_bag(lost_item)
@items.each do |type,list|
contains_lost_item = list.any? {|item,empty| item == lost_item}
return true if contains_lost_item
end
return false
end
# Unpack the bag and print all contents
def unpack
@items.each do |type,list|
puts "#{type}"
puts "--------------------"
list.each {|item| puts item}
@items.delete(type)
puts ""
end
end
end
So, let's break this down! First, we can see we have a class called Bag
. The very first thing any Bag
class is going to do, is to call it's initialize
method. initialize
is the first thing any class searches for when a new object of that class is created. initialize
is frequently used to set instance variables. In this case, we take our instance variables owner
, description
, and items
, and set them equal to the arguments declared when the new Bag
class was created. For more on instance variables or declaring initialize, check out the resources section below.
Before initialize
, you can see attr_reader
and attr_accessor
, both linked to our instance variables. attr_reader
and attr_accessor
give access to these instance variables outside the class. Their sole purpose is to allow a user to either read or write to these variables. For more information on accessors, please check out the resources below.
The cool part of this code are the added functions. You can create a new bag, initialize it with all kinds of variables, and then change or read the instance variables.
Now we have her bag packed, but I can't remember if I packed her Squeaky Duck.
puts nors_bag.check_bag("Squeaky Duck")
Output:
No worries, you already packed Squeaky Duck.
Nori took one look at her bag and decided she needed more treats and less brushes. Let's say we decide to add and remove some things from the bag.
nors_bag.add("Snacks","Bones",3)
nors_bag.remove("Misc","Brush")
nors_bag.list_items
Output:
Clothes
--------------------
Plaid Jacket
Blue Sweater
Snacks
--------------------
Dog Food 5
Bowl 1
Food Bowl 1
Treats 10
Bones 3
Toys
--------------------
Stuffed Squirrel
Squeaky Duck
Misc
--------------------
Extension Leash
Short Leash
Harness
It looks like Nors is all packed, and now we can do the same for myself and my husband! We can create our own bag class, pack it full of items, and then change the items around as we remember things we forgot to pack!
I hope this was a helpful overview of classes and how they work. If you are still unsure about this subject, take a look at some of the resources I have listed below. They really helped me in my understanding of the material! Please feel free to check out my bag
class code on my GitHub site. Fork the project, copy it, or just look it over. I always love feedback, and would greatly appreciate any ideas you have for how to improve my code! I am sure there are many ways to make it better! If you see anything that could be improved, please send me an email at the contact information listed at the bottom of my site.


fixnt(1) Debian fixnt(1) NAME fixnt - Filter for the Windows NT postscript printer driver. SYNOPSIS fixnt < BADFILE.ps > GOODFILE.ps DESCRIPTION The Windows NT postscript driver has a tendency to make broken postscript files, that are incompatible with psutils. fixnt is a filter that fixes these problems, allowing the use of psnup(1). The filter takes the broken postscript file on stdin, and outputs a fixed postscript file on stdout. It has no other form for invocation and takes no options on the command-line. OPTIONS fixnt takes no options. BUGS fixnt does not check for NTPSOct94. For a workaround, use a sed(1) com‐ mand to replace 'NTPSOct94' with 'NTPSOct95', like so: sed 's/NTPSOct94/NTPSOct95/g' This is particularly important for Windows NT 3.5 users. AUTHOR fixnt was written by Holger Bauer<EMAIL_ADDRESS>Michael Rath<EMAIL_ADDRESS>and Akim Demaille<EMAIL_ADDRESS>REPORTING BUGS Report bugs to the Authors, but avoid sending large postscript files. Patches are always welcome; send to<EMAIL_ADDRESS>SEE ALSO psnup(1), sed(1) a2ps February 2003 fixnt(1)


• DevOps/Agile way of working knowledge.
• Created and built the framework to test associate web portals then integrated into CI/CD pipeline using TFS.
• Develop end-to-end automation solutions for testing of web-based applications.
• Tested ETL mappings to extract and load data from different databases such as Salesforce, Oracle and flat files and loaded them into Teradata.
• Implemented end to end testing solution in the data warehouse architecture.
• Experienced in Selenium Webdriver using Java, Automation automation, TestNG, and Manual Testing.
• Involved in Test case preparation and Test case execution based on SRS.
• Cloud-based Device compatibility testing i.e Browserstack.
• Flexible and versatile to adapt to any environment and work on a different project.
• Worked with team developing state-of-the-art software for mobile devices, including the #3 selling fit bit solution in the U.S. at the time. Analyzed business requirements, conducted gap analysis, estimated project scope and worked closely with fellow developers to deliver high-quality software solutions using Objective-C and SQLite.
Master of Computer Applications (MCA)is a professional Master's Degree in computer science awarded in India. It is a postgraduate course that can be taken up after obtaining a Bachelor's Degree.
Bachelor in Computer Application (BCA) is an undergraduate degree course in computer applications.It is a technical degree that prepares students for a career in the field of computer applications and software development.
Testing Practice - Gobal Delivery Center (GDC) India awarded with Accolade bronze for Active Contribution in Siemens project.


Informal settlements will soon be a thing of the past - Geingob
SWAPO presidential candidate has reminded residents of Mix settlement and Okahandja that informal settlements will soon be a thing of the past, under the party's rule.
President Hage Geingob and his campaign team held meetings at the two areas, ahead of SWAPO's final rally.


Change of scenery
12 December 2016 · Filed in Private • 0 CommentsMy blog has been dead for some time now. Mostly due to having two hyper-active kids and everything that follows with having a family. But I recently got the chance to start as a Systems Engineer at Aruba Networks here in Denmark. So I have decided to start blogging again about my new employment and the things that come with working for a vendor.</p> More to come :-)
Tags: Employment Previous Post: HP´s response to Meraki is here Next Post: ArubaOS 8 centralized upgrade


Searching from the SDK
The Java SDK provides an API that supports Full Text Search.
Using Full Text Search from the Java SDK
By means of the Java SDK, Full Text Search queries can be performed on Full Text Indexes; and result-sets sorted.
A general introduction to Full Text Search, with pointers to detailed descriptions of its principal features, is provided in 6.0@server:fts:full-text-intro.adoc.
The current page features a code example that demonstrates the Java SDK Full Text Search API.
The example assumes that Couchbase Server is running, and that the username Administrator
and the password password
provide authorization for performing the searches.
It also assumes that the travel-sample
bucket has been installed.
For information on creating users and managing roles, see 6.0@server:learn:security/authorization-overview.adoc.
For information on installing sample buckets, see 6.0@server:manage:manage-settings/install-sample-buckets.adoc.
The example also assumes the existence of three specific Full Text Indexes, defined on the travel-sample
bucket.
These are:
-
travel-sample-index-unstored
: Uses only the default settings. -
travel-sample-index-stored
: Uses default settings, with one exception: dynamic fields are stored, for the whole index. -
travel-sample-index-hotel-description
: Indexes only thedescription
fields ofhotel
documents, and disables thedefault
type mapping. The index has a custom analyzer namedmyUnicodeAnalyzer
defined on it: the analyzer’s main characteristic is that it uses the unicode tokenizer.
See 6.0@server:fts:fts-creating-indexes.adoc for details on how to create these indexes: they can be created interactively, by means of the Couchbase Web Console; however, there may be greater efficiency in using the Couchbase REST API, as described in the section 6.0@server:fts:fts-creating-indexes.adoc#index-creation-with-the-rest-api. The JSON objects that constitute index-definitions (for inclusion as bodies to the index-creation REST calls), are provided in 6.0@server:fts:fts-demonstration-indexes.adoc.
The example features the following Full Text Searches on the travel-sample
bucket, within Couchbase Server:
-
Simple Text Query on a single word, targeting an index with dynamic fields unstored.
-
Simple Text Query on Non-Default Index, specifying an index that consists only of content derived from a specific field from a specific document-type.
-
Simple Text Query on Stored Field, specifying the field to be searched; targeting an index with dynamic fields stored, to ensure that field-content is included in the return object.
-
Match Query with Facet, showing how query-results can be displayed either by row or by hits; and demonstrating use of a facet, which provides aggregation-data.
-
DocId Query, showing results of a query on two document IDs.
-
Unanalyzed Term Query with Fuzziness Level of 0, demonstrating how to query on a term with no analysis. Zero fuzziness is specified, to ensure that matches are exact.
-
Unanalyzed Term Query with Fuzziness Level of 2, which is almost identical to the immediately preceding query; but which this time specifies a fuzziness factor of 2, allowing partial matches to be made. The output from this query can be compared to that of the one immediately preceding.
-
Match Phrase Query, using Analysis, for searching on a phrase.
-
Phrase Query, without Analysis, for searching on a phrase without analysis supported.
-
Query String Query, showing how a query string is specified as search-input.
-
Conjunction Query, whereby two separate queries are defined and then run as part of the search, with only the matches returned by both included in the result-object.
-
Wild Card Query, whereby a wildcard is used in the string submitted for the search.
-
Numeric Range Query, whereby minimum and maximum numbers are specified, and matches within the range returned.
-
Regexp Query, whereby a regular expression is submitted, to generate the conditions for successful matches.
Detailed Example
The following example demonstrates Full Text Search queries that can be made with the Java SDK.
package com.couchbase.example.fts;
import com.couchbase.client.java.Bucket;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.CouchbaseCluster;
import com.couchbase.client.java.search.SearchQuery;
import com.couchbase.client.java.search.facet.SearchFacet;
import com.couchbase.client.java.search.queries.*;
import com.couchbase.client.java.search.result.SearchQueryResult;
import com.couchbase.client.java.search.result.SearchQueryRow;
public class JavaFtsExamples {
public static void simpleTextQuery(Bucket bucket) {
String indexName = "travel-sample-index-unstored";
MatchQuery query = SearchQuery.match("swanky");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10));
printResult("Simple Text Query", result);
}
public static void simpleTextQueryOnStoredField(Bucket bucket) {
String indexName = "travel-sample-index-stored";
MatchQuery query = SearchQuery.match("MDG").field("destinationairport");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10).highlight());
printResult("Simple Text Query on Stored Field", result);
}
public static void simpleTextQueryOnNonDefaultIndex(Bucket bucket) {
String indexName = "travel-sample-index-hotel-description";
MatchQuery query = SearchQuery.match("swanky");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10));
printResult("Simple Text Query on Non-Default Index", result);
}
public static void textQueryOnStoredFieldWithFacet(Bucket bucket) {
String indexName = "travel-sample-index-stored";
MatchQuery query = SearchQuery.match("La Rue Saint Denis!!")
.field("reviews.content");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10).highlight()
.addFacet("Countries Referenced", SearchFacet.term("country", 5)));
printResult("Match Query with Facet, Result by Row", result);
System.out.println();
System.out.println("Match Query with Facet, Result by hits:");
System.out.println(result.hits());
System.out.println();
System.out.println("Match Query with Facet, Result by facet: ");
System.out.println(result.facets());
}
public static void docIdQueryMethod(Bucket bucket) {
String indexName = "travel-sample-index-unstored";
DocIdQuery query = SearchQuery.docId("hotel_26223", "hotel_28960");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query));
printResult("DocId Query", result);
}
public static void unAnalyzedTermQuery(Bucket bucket, int fuzzinessLevel) {
String indexName = "travel-sample-index-stored";
TermQuery query = SearchQuery.term("sushi").field("reviews.content")
.fuzziness(fuzzinessLevel);
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(50).highlight());
printResult("Unanalyzed Term Query with Fuzziness Level of "
+ fuzzinessLevel + ":", result);
}
public static void matchPhraseQueryOnStoredField(Bucket bucket) {
String indexName = "travel-sample-index-stored";
MatchPhraseQuery query = SearchQuery.matchPhrase("Eiffel Tower")
.field("description");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10).highlight());
printResult("Match Phrase Query, using Analysis", result);
}
public static void unAnalyzedPhraseQuery(Bucket bucket) {
String indexName = "travel-sample-index-stored";
PhraseQuery query = SearchQuery.phrase("dorm", "rooms")
.field("description");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10).highlight());
printResult("Phrase Query, without Analysis", result);
}
public static void conjunctionQueryMethod(Bucket bucket) {
String indexName = "travel-sample-index-stored";
MatchQuery firstQuery = SearchQuery.match("La Rue Saint Denis!!")
.field("reviews.content");
MatchQuery secondQuery = SearchQuery.match("boutique")
.field("description");
ConjunctionQuery conjunctionQuery =
SearchQuery.conjuncts(firstQuery, secondQuery);
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, conjunctionQuery).limit(10).highlight());
printResult("Conjunction Query", result);
}
public static void queryStringMethod(Bucket bucket) {
String indexName = "travel-sample-index-unstored";
QueryStringQuery query = SearchQuery.queryString("description: Imperial");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10));
printResult("Query String Query", result);
}
public static void wildCardQueryMethod(Bucket bucket) {
String indexName = "travel-sample-index-stored";
WildcardQuery query = SearchQuery.wildcard("bouti*ue").field("description");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10).highlight());
printResult("Wild Card Query", result);
}
public static void numericRangeQueryMethod(Bucket bucket) {
String indexName = "travel-sample-index-unstored";
NumericRangeQuery query = SearchQuery.numericRange().min(10100).max(10200)
.field("id");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10));
printResult("Numeric Range Query", result);
}
public static void regexpQueryMethod(Bucket bucket) {
String indexName = "travel-sample-index-stored";
RegexpQuery query = SearchQuery.regexp("[a-z]").field("description");
SearchQueryResult result = bucket.query(
new SearchQuery(indexName, query).limit(10).highlight());
printResult("Regexp Query", result);
}
private static void printResult(String label, SearchQueryResult resultObject) {
System.out.println();
System.out.println("= = = = = = = = = = = = = = = = = = = = = = =");
System.out.println("= = = = = = = = = = = = = = = = = = = = = = =");
System.out.println();
System.out.println(label);
System.out.println();
for (SearchQueryRow row : resultObject) {
System.out.println(row);
}
}
public static void main(String[] args) {
// Access the cluster that is running on the local host, authenticating with
// the username and password of any user who has the "FTS Searcher" role
// for the "travel-sample" bucket...
//
Cluster cluster = CouchbaseCluster.create("localhost");
cluster.authenticate("Administrator", "password");
Bucket travelSample = cluster.openBucket("travel-sample");
simpleTextQuery(travelSample);
simpleTextQueryOnStoredField(travelSample);
simpleTextQueryOnNonDefaultIndex(travelSample);
textQueryOnStoredFieldWithFacet(travelSample);
docIdQueryMethod(travelSample);
unAnalyzedTermQuery(travelSample, 0);
unAnalyzedTermQuery(travelSample, 2);
matchPhraseQueryOnStoredField(travelSample);
unAnalyzedPhraseQuery(travelSample);
conjunctionQueryMethod(travelSample);
queryStringMethod(travelSample);
wildCardQueryMethod(travelSample);
numericRangeQueryMethod(travelSample);
regexpQueryMethod(travelSample);
cluster.disconnect();
}
}


Weekly Meetings: Every Sunday @ 7pm in the Campus Center Main Lounge Office Hours: After Weekly SGA Meetings Email<EMAIL_ADDRESS>Campus Center Box # : C-1735