code
stringlengths 3
1.01M
| repo_name
stringlengths 5
116
| path
stringlengths 3
311
| language
stringclasses 30
values | license
stringclasses 15
values | size
int64 3
1.01M
|
|---|---|---|---|---|---|
jsonp({"cep":"23097030","logradouro":"Rua do Amapaense","bairro":"Campo Grande","cidade":"Rio de Janeiro","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/23097030.jsonp.js
|
JavaScript
|
cc0-1.0
| 145
|
jsonp({"cep":"95047030","logradouro":"Rua das Andorinhas","bairro":"Santa F\u00e9","cidade":"Caxias do Sul","uf":"RS","estado":"Rio Grande do Sul"});
|
lfreneda/cepdb
|
api/v1/95047030.jsonp.js
|
JavaScript
|
cc0-1.0
| 150
|
jsonp({"cep":"07934420","logradouro":"Rua Daniela Perez","bairro":"Jardim S\u00e3o Jo\u00e3o","cidade":"Francisco Morato","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/07934420.jsonp.js
|
JavaScript
|
cc0-1.0
| 161
|
;Los comentarios van antecedidos de un punto y coma
list p=18f4550 ;Modelo del microcontrolador
#include <p18f4550.inc> ;Librería de nombres de los registros
;Zona de declaración de los bits de configuración del microcontrolador
CONFIG PLLDIV = 1 ; PLL Prescaler Selection bits (No prescale (4 MHz oscillator input drives PLL directly))
CONFIG CPUDIV = OSC1_PLL2 ; System Clock Postscaler Selection bits ([Primary Oscillator Src: /1][96 MHz PLL Src: /2])
CONFIG FOSC = XT_XT ; Oscillator Selection bits (XT oscillator (XT))
CONFIG PWRT = ON ; Power-up Timer Enable bit (PWRT enabled)
CONFIG BOR = OFF ; Brown-out Reset Enable bits (Brown-out Reset disabled in hardware and software)
CONFIG WDT = OFF ; Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
CONFIG CCP2MX = ON ; CCP2 MUX bit (CCP2 input/output is multiplexed with RC1)
CONFIG PBADEN = OFF ; PORTB A/D Enable bit (PORTB<4:0> pins are configured as digital I/O on Reset)
CONFIG MCLRE = ON ; MCLR Pin Enable bit (MCLR pin enabled; RE3 input pin disabled)
CONFIG LVP = OFF ; Single-Supply ICSP Enable bit (Single-Supply ICSP disabled)
org 0x0000 ;Vector de RESET
goto init_conf
org 0x0008 ;Vector de interrupcion
org 0x0020 ;Zona de programa de usuario
init_conf:
bcf TRISD, 0 ;Hacer que el puerto RD0 sea una salida
bsf TRISB, 0 ;Hacer que el puerto RB0 sea una entrada
loop: btfss PORTB, 0 ;Leer y preguntar si RB0 es uno
goto falso ;Cuando se obtiene un falso, salta a etiqueta falso
bcf LATD, 0 ;Cuando se obtiene un verdadero, manda cero a RD0
goto loop ;Salta a etiqueta loop
falso: bsf LATD, 0 ;Manda uno a RD0
goto loop ;Salta a etiqueta loop
end ;Fin del programa
|
tocache/picomones
|
UPC Microcontroladores 2020-1/Semana 01/20201-Prueba NOT.X/maincode.asm
|
Assembly
|
cc0-1.0
| 1,968
|
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>雨流</title>
<link type="text/css" rel="stylesheet" href="../../style.css">
<h1 lang="art-Hani-x-fiz-1der-block012">
<ruby>雨流<rt lang="art-Latn-x-fiz-1der-block012">uru</ruby>
</h1>
<dl>
<dt>Etymology:</dt>
<dd>From PL <i lang="art-x-fzn-proto">-ur</i>, a verb suffix used to note cyclical or reflexive actions, later detached as an adverb/post-position.</dd>
</dl>
<h2>postposition</h2>
<p>
reflexive marker
</p>
<h2>adverb</h2>
<p>
repeatedly; often
</p>
|
literallybenjam/langdev
|
data/languages/fzn/fiz/1der/block012/雨流.html
|
HTML
|
cc0-1.0
| 546
|
jsonp({"cep":"07179294","logradouro":"Rua Altamiro Mathias Goes","bairro":"Jardim Santa Paula","cidade":"Guarulhos","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/07179294.jsonp.js
|
JavaScript
|
cc0-1.0
| 155
|
jsonp({"cep":"60348380","logradouro":"Rua 37","bairro":"Vila Velha","cidade":"Fortaleza","uf":"CE","estado":"Cear\u00e1"});
|
lfreneda/cepdb
|
api/v1/60348380.jsonp.js
|
JavaScript
|
cc0-1.0
| 124
|
jsonp({"cep":"26193586","logradouro":"Beco Brito","bairro":"S\u00e3o Jos\u00e9","cidade":"Belford Roxo","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/26193586.jsonp.js
|
JavaScript
|
cc0-1.0
| 143
|
jsonp({"cep":"90250869","logradouro":"Acesso B Tr\u00eas","bairro":"Farrapos","cidade":"Porto Alegre","uf":"RS","estado":"Rio Grande do Sul"});
|
lfreneda/cepdb
|
api/v1/90250869.jsonp.js
|
JavaScript
|
cc0-1.0
| 144
|
# Programming
+ [Start Writing More Classes](http://lucumr.pocoo.org/2013/2/13/moar-classes/): Classes are good at compositing function atoms.
+ [编程的智慧](http://www.yinwang.org/blog-cn/2015/11/21/programming-philosophy):王垠出品
## API Design
+ [千万不要把 bool 设计成函数参数](http://coolshell.cn/articles/5444.html)
+ [QT API Design Principles](http://wiki.qt.io/API-Design-Principles)
+ [API设计:用流畅接口构造内部DSL](http://coolshell.cn/articles/5709.html)
+ 抽象! 抽象! 抽象!
+ DSL is a high abstract language which leads to less bugs compared to low level languages when they are of the same length.
+ [An Approach to Internal Domain-Specific Languages in Java](http://www.infoq.com/articles/internal-dsls-java)
+ [CommandQuerySeparation](http://martinfowler.com/bliki/CommandQuerySeparation.html)
+ [ExpressionBuilder](http://martinfowler.com/bliki/ExpressionBuilder.html)
+ [写了这么多年代码,你真的了解SOLID吗?](https://insights.thoughtworks.cn/do-you-really-know-solid/): Thoughtworks出口,还是值得一看的
# Tricks
+ [Micro Batching](http://tutorials.jenkov.com/java-performance/micro-batching.html)
+ Zero Allocation
+ [Stackoverflow](http://stackoverflow.com/questions/33656936/java-zero-allocation)
+ [Zero allocation patterns in Java](https://elecodev.wordpress.com/2015/07/07/zero-allocation-patterns/)
+ Marker Interface
+ [Wiki](https://en.wikipedia.org/wiki/Marker_interface_pattern)
+ [What is Marker interfaces in Java and why required](https://javarevisited.blogspot.com/2012/01/what-is-marker-interfaces-in-java-and.html)
# Error handling
+ [When and How to Use Exceptions](http://www.drdobbs.com/when-and-how-to-use-exceptions/184401836)
+ [Handling errors is canceling operations](https://akrzemi1.wordpress.com/2019/04/25/handling-errors-is-canceling-operations/)
+ [Error Handling in Node.js](https://www.joyent.com/node-js/production/design/errors)
|
qqiangwu/awesome-blogs
|
code.md
|
Markdown
|
cc0-1.0
| 1,980
|
jsonp({"cep":"78746710","logradouro":"Rua Ad\u00e3o Porfirio de Souza","bairro":"Distrito Industrial Augusto Bortoli Razia","cidade":"Rondon\u00f3polis","uf":"MT","estado":"Mato Grosso"});
|
lfreneda/cepdb
|
api/v1/78746710.jsonp.js
|
JavaScript
|
cc0-1.0
| 189
|
jsonp({"cep":"29198224","logradouro":"Avenida Bahia","bairro":"Mar Azul","cidade":"Aracruz","uf":"ES","estado":"Esp\u00edrito Santo"});
|
lfreneda/cepdb
|
api/v1/29198224.jsonp.js
|
JavaScript
|
cc0-1.0
| 136
|
jsonp({"cep":"26317130","logradouro":"Rua Dom Jo\u00e3o","bairro":"Vila Am\u00e9lia","cidade":"Queimados","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/26317130.jsonp.js
|
JavaScript
|
cc0-1.0
| 145
|
jsonp({"cep":"14784179","logradouro":"Avenida Jundia\u00ed","bairro":"Ibirapuera","cidade":"Barretos","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/14784179.jsonp.js
|
JavaScript
|
cc0-1.0
| 141
|
jsonp({"cep":"27511310","logradouro":"Rua Astolfo Villca","bairro":"Centro","cidade":"Resende","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/27511310.jsonp.js
|
JavaScript
|
cc0-1.0
| 134
|
jsonp({"cep":"73403230","logradouro":"Ch\u00e1cara 10 DF-130","bairro":"Setor Mans\u00f5es Itiquira (Planaltina)","cidade":"Bras\u00edlia","uf":"DF","estado":"Distrito Federal"});
|
lfreneda/cepdb
|
api/v1/73403230.jsonp.js
|
JavaScript
|
cc0-1.0
| 180
|
jsonp({"cep":"29182498","logradouro":"Rua Venda Nova do Imigrante","bairro":"Parque das Gaivotas","cidade":"Serra","uf":"ES","estado":"Esp\u00edrito Santo"});
|
lfreneda/cepdb
|
api/v1/29182498.jsonp.js
|
JavaScript
|
cc0-1.0
| 159
|
jsonp({"cep":"04191150","logradouro":"Rua Luiz Gon\u00e7alves Oliveira","bairro":"Vila Caraguat\u00e1","cidade":"S\u00e3o Paulo","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/04191150.jsonp.js
|
JavaScript
|
cc0-1.0
| 168
|
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Expires" content="-1">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<title>105年第十四任總統副總統及第九屆立法委員選舉</title>
<link href="../css/style.css" rel="stylesheet" type="text/css">
<link href="../css/style2.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="../js/ftiens4.js"></script>
<script type="text/javascript" src="../js/ua.js"></script>
<script type="text/javascript" src="../js/func.js"></script>
<script type="text/javascript" src="../js/treeP1.js"></script>
<script type="text/javascript" src="../js/refresh.js"></script>
</head>
<body id="main-body">
<div id="main-header">
<div id="main-top">
<a class="main-top-logo" href="#">中央選舉委員會</a>
<ul class="main-top-list">
<li class="main-top-item"><a class="main-top-link main-top-link-home" href="../index.html">回首頁</a></li>
<li class="main-top-item"><a class="main-top-link main-top-link-cec" href="http://2016.cec.gov.tw">中選會網站</a></li>
<li class="main-top-item"><a class="main-top-link main-top-link-english" href="../../en/index.html">English</a></li>
</ul>
</div>
</div>
<div id="main-wrap">
<div id="main-banner">
<div class="slideshow">
<img src="../img/main_bg_1.jpg" width="1024" height="300" alt="background" title="background">
</div>
<div class="main-deco"></div>
<div class="main-title"></div>
<a class="main-pvpe main-pvpe-current" href="../IDX/indexP1.html">總統副總統選舉</a>
<a class="main-le" href="../IDX/indexT.html">立法委員選舉</a>
</div>
<div id="main-container">
<div id="main-content">
<table width="1024" border="1" cellpadding="0" cellspacing="0">
<tr>
<td width="180" valign="top">
<div id="divMenu">
<table border="0">
<tr>
<td><a style="text-decoration:none;color:silver" href="http://www.treemenu.net/" target=_blank></a></td>
</tr>
</table>
<span class="TreeviewSpanArea">
<script>initializeDocument()</script>
<noscript>請開啟Javascript功能</noscript>
</span>
</div>
</td>
<td width="796" valign="top">
<div id="divContent">
<!-- 修改區塊 -->
<table width="100%" border="0" cellpadding="0" cellspacing="4">
<tr>
<td><img src="../images/search.png" alt="候選人得票數" title="候選人得票數"> <b>總統副總統選舉 候選人在 臺中市 大里區得票數 </b></td>
</tr>
<tr valign="bottom">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="bottom">
<td class="fontNumber"> <img src="../images/nav.gif" alt="候選組數" title="候選組數"> <img src="../images/nav.gif" alt="候選組數" title="候選組數"> 候選組數:3 <img src="../images/nav.gif" alt="應選組數" title="應選組數"> <img src="../images/nav.gif" alt="應選組數" title="應選組數"> 應選組數:1</td>
<td align="right">
<select name="selector_order" class="selectC" tabindex="1" id="orderBy" onChange="changeOrder();">
<option value="n">依號次排序</option>
<option value="s">依得票排序</option>
</select>
</td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td>
<table width="100%" border="0" cellpadding="6" cellspacing="1" class="tableT">
<tr class="trHeaderT">
<td>註記</td>
<td>號次</td>
<td><table><tr><td>總統</td><td rowspan=2> 候選人姓名</td></tr><td>副總統</td></table></td>
<td>性別</td>
<td>得票數</td>
<td>得票率%</td>
<td>登記方式</td>
</tr>
<tr class="trT">
<td> </td>
<td>1</td>
<td>朱立倫<br>王如玄</td>
<td>男<br>女</td>
<td class="tdAlignRight">27,186</td>
<td class="tdAlignRight">26.1103</td>
<td>中國國民黨 推薦</td>
</tr>
<tr class="trT">
<td> </td>
<td>2</td>
<td>蔡英文<br>陳建仁</td>
<td>女<br>男</td>
<td class="tdAlignRight">60,132</td>
<td class="tdAlignRight">57.7526</td>
<td>民主進步黨 推薦</td>
</tr>
<tr class="trT">
<td> </td>
<td>3</td>
<td>宋楚瑜<br>徐欣瑩</td>
<td>男<br>女</td>
<td class="tdAlignRight">16,802</td>
<td class="tdAlignRight">16.1371</td>
<td>親民黨 推薦</td>
</tr>
<tr class="trFooterT">
<td colspan="7" align="right">投開票所數 已送/應送: 97/98 </td>
</tr>
</table>
</td>
</tr>
<tr valign="top">
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10"></td>
<td valign="top" class="fontNote">
<table>
<tr>
<td>註記說明:</td>
<td align="center">◎</td>
<td>自然當選</td>
</tr>
<tr>
<td></td>
<td align="center">?</td>
<td>同票待抽籤</td>
</tr>
</table>
</td>
<td valign="top" class="fontTimer"><img src="../images/clock2.png" alt="Sat, 16 Jan 2016 21:00:11 +0800" title="Sat, 16 Jan 2016 21:00:11 +0800"> 資料更新時間: 01/16 21:00:06 <br>(網頁每3分鐘自動更新一次)</td>
</tr>
<tr>
<td colspan="3" class="fontNote"></td>
</tr>
</table>
</td>
</tr>
</table>
<!-- 修改區塊 -->
</div>
</td>
</tr>
</table>
</div>
<div class="main-footer"></div>
<div id="divFooter" align=center>[中央選舉委員會] </div>
<!--main-content-->
</div><!--main-container-->
</div><!--END main-wrap-->
<script>setOrder();</script>
<script>setMenuScrollPosY();</script>
</body>
</html>
|
gugod/vote-watch-2016
|
data/president/n400001100000000/20160116130039/page.html
|
HTML
|
cc0-1.0
| 6,580
|
jsonp({"cep":"64006390","logradouro":"Rua Coimbra","bairro":"\u00c1gua Mineral","cidade":"Teresina","uf":"PI","estado":"Piau\u00ed"});
|
lfreneda/cepdb
|
api/v1/64006390.jsonp.js
|
JavaScript
|
cc0-1.0
| 135
|
jsonp({"cep":"83218080","logradouro":"Rua Etelvina Correia","bairro":"Vila Garcia","cidade":"Paranagu\u00e1","uf":"PR","estado":"Paran\u00e1"});
|
lfreneda/cepdb
|
api/v1/83218080.jsonp.js
|
JavaScript
|
cc0-1.0
| 145
|
jsonp({"cep":"05270090","logradouro":"Rua Lins","bairro":"S\u00edtio Itaberaba I","cidade":"S\u00e3o Paulo","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/05270090.jsonp.js
|
JavaScript
|
cc0-1.0
| 147
|
<!doctype html>
<html>
<head>
<title>
Quiz 1: Version 2
</title>
<meta charset="utf-8"/>
<link rel="stylesheet" href="quiz1.css" type="text/css">
<h1>
Quiz 1: Version 2
</h1>
<header>
Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah.
Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah.
</header>
</head>
<body>
<nav>
</nav>
<main>
<h2>
Section 1
</h2>
<h3>
Sub-Section A
</h3>
<p>
Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah.
</p>
<h3>
Sub-Section B
</h3>
<p>
Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah.
</p>
<h2>
Section 2
</h2>
<p>
Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah.
</p>
<h3>
Sub-Section A
</h3>
<p>
Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah.
</p>
<h3>
Sub-Section B
</h3>
<p>
Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah. Blah blah blah.
</p>
</main>
<footer>
©2015 (Insert Your Name Here) - CMIS Webdesign
</footer>
</body>
</html>
|
melissa1790-cmis/melissa1790-cmis-wd
|
quiz1.html
|
HTML
|
cc0-1.0
| 2,796
|
.png)
# General materials for ContentMine workshops
*If you are running a ContentMine workshop, please read through this document and use the resources in this repo.*
Welcome to the ContentMine workshops repo! This repo is designed to support members of the ContentMine team in designing and implementing a ContentMine workshop or hack event. However the materials found here can also be used by anyone who is interested.
## Organisation of this repo
### Folder: organisation
*This directory contains resources for the organisation of a ContentMine workshop. The following files are avaiable to use:*
* [Facilitator Checklist](checklists/checklist_facilitators.md)
This should help facilitators preparing their sessions. Can be converted into github issues and be used as a to do list throughout the planning and execution of the workshop.
* [Coordinator Checklist](checklists/checklist_coordinator.md)
This should help organizers setting up the frame for a workshop. Can be converted into github issues and be used as a to do list.
* `template_programme`
- this can be edited to make a programme for the day with the ContentMine theme. There are Pages and MS Word versions for Apple/Office users
* `template_README.md`
- this can be copied and pasted as the README for the new workshop repo. It will need to be filled with the relevant information for the specific workshop.
- `template_programme.pages` and `template_programme.docx`
- Pages or MS Word template for generating the workshop programme - you can use either
- it may also help to look at programmes from previous workshops:
- [Force2015](https://github.com/ContentMine/force2015_workshop/raw/master/info/force15programme.pdf)
- [EBImine](https://github.com/ContentMine/ebi_workshop_20141006/raw/master/info/EBI_programme.pdf)
### Folder: sessions
Individual sessions have been moved to [workshop-resources](https://github.com/ContentMine/workshop-resources/tree/master/resources/modules) where they can be developed independently.
|
ContentMine/workshops
|
README.md
|
Markdown
|
cc0-1.0
| 2,135
|
jsonp({"cep":"13085722","logradouro":"Rua Norberto Villas Boas","bairro":"Village Campinas","cidade":"Campinas","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/13085722.jsonp.js
|
JavaScript
|
cc0-1.0
| 151
|
# Linux下配置IP
在Linux系统中配置IP地址的方法有4种:
| 方法 | 说明 |
| -- | -- |
| ifconfig命令 | 通过```ifconfig```命令可以**临时**配置IP地址,但是```ifconfig```命令主要用于**查看**网络状态。 |
| setup工具 | setup工具可以永久配置IP地址,但setup是Redhat系列的**专有命令**。在使用```setup```之后,还需要运行命令```service network restart```以重启网络服务。 |
| **网络配置文件** | 通过修改网络配置文件来配置IP地址是标准的配置方法,必须掌握。 |
| 图形界面 | 与在Windows下配置IP的方法类似,仅作了解 |
## Linux网络配置文件
通过修改网络配置文件来配置IP,是以上4种方法中最重要且最值得掌握的方式。
首先,应该清楚Linux的网络配置文件有哪些(见下表)。
| 文件路径 | 文件名 | 说明 |
| -- | -- |
| /etc/sysconfig/net-scripts/ifcfg-eth0 | 网卡信息文件 |
| /etc/sysconfig/network | 主机名文件 |
| /etc/resolv.conf | DNS配置文件 |
**补充:**
1. DHCP服务器是一种自动分配IP地址的服务器。如果需要自动获取IP,则在局域网内要有DHCP服务器。
|
Huan-Rong/Linux-Book
|
linuxxia_pei_zhi_ip.md
|
Markdown
|
cc0-1.0
| 1,203
|
jsonp({"cep":"37502512","logradouro":"Rua J\u00falia Gomes Renno","bairro":"Nossa Senhora de F\u00e1tima","cidade":"Itajub\u00e1","uf":"MG","estado":"Minas Gerais"});
|
lfreneda/cepdb
|
api/v1/37502512.jsonp.js
|
JavaScript
|
cc0-1.0
| 167
|
http://stackoverflow.com/questions/10240125/working-with-readme-md-on-github-com
http://daringfireball.net/projects/markdown/syntax
https://help.github.com/articles/github-flavored-markdown
http://www.codinghorror.com/blog/2012/10/the-future-of-markdown.html
https://help.github.com/
http://redcloth.org/hobix.com/textile/
http://pragprog.com/resources/markup-in-forums
相关工程
https://github.com/sirthias/pegdown
https://code.google.com/p/markdown4j/downloads/list
https://github.com/chenkelmann/actuarius
http://henkelmann.eu/2011/01/06/actuarius_release_note
http://tristanjuricek.com/knockoff/
|
jasonqu/reading-notes
|
_content/_drafts/temp2/markdown/index.md
|
Markdown
|
cc0-1.0
| 610
|
jsonp({"cep":"23565130","logradouro":"Rodovia Rio-Santos","bairro":"Santa Cruz","cidade":"Rio de Janeiro","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/23565130.jsonp.js
|
JavaScript
|
cc0-1.0
| 145
|
jsonp({"cep":"88101004","logradouro":"Servid\u00e3o Alu\u00edsio Bernardino Melo","bairro":"Campinas","cidade":"S\u00e3o Jos\u00e9","uf":"SC","estado":"Santa Catarina"});
|
lfreneda/cepdb
|
api/v1/88101004.jsonp.js
|
JavaScript
|
cc0-1.0
| 171
|
jsonp({"cep":"69021605","logradouro":"Rua 2","bairro":"Tarum\u00e3","cidade":"Manaus","uf":"AM","estado":"Amazonas"});
|
lfreneda/cepdb
|
api/v1/69021605.jsonp.js
|
JavaScript
|
cc0-1.0
| 119
|
jsonp({"cep":"18303020","logradouro":"Rua Jo\u00e3o Aleixo Vaz","bairro":"Vila Aparecida","cidade":"Cap\u00e3o Bonito","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/18303020.jsonp.js
|
JavaScript
|
cc0-1.0
| 158
|
jsonp({"cep":"78715180","logradouro":"Rua Bel\u00e9m","bairro":"Jardim Tropical","cidade":"Rondon\u00f3polis","uf":"MT","estado":"Mato Grosso"});
|
lfreneda/cepdb
|
api/v1/78715180.jsonp.js
|
JavaScript
|
cc0-1.0
| 146
|
from django.apps import AppConfig
class TravellerConfig(AppConfig):
name = 'traveller'
|
catherinedevlin/rideshare-matchmaker
|
traveller/apps.py
|
Python
|
cc0-1.0
| 93
|
<!DOCTYPE html>
<html lang='en'>
<head>
<title>blog</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A humble blog by me, Lucy Wyman">
<meta name="keywords" content="blog, code, lucy, wyman">
<meta name="keywords" content="puppet">
<meta name="keywords" content="books">
<meta name="keywords" content="experiences">
<meta name="keywords" content="travel">
<meta name="keywords" content="bucket-lists">
<meta name="keywords" content="tech">
<meta name="keywords" content="conferences">
<meta name="keywords" content="loves">
<meta name="keywords" content="Seattle">
<meta name="keywords" content="favorites">
<meta name="keywords" content="thoughts">
<meta name="keywords" content="food">
<meta name="keywords" content="exercise">
<meta name="keywords" content="movies">
<meta name="keywords" content="japanuary">
<meta name="keywords" content="containers">
<meta name="keywords" content="Openshift">
<meta name="keywords" content="book-review">
<meta name="keywords" content="health">
<meta name="keywords" content="ruby">
<meta name="keywords" content="selenium">
<meta name="keywords" content="thanksgiving">
<meta name="keywords" content="politics">
<meta name="keywords" content="women">
<meta name="keywords" content="application">
<meta name="keywords" content="orchestrator">
<meta name="keywords" content="flag">
<meta name="keywords" content="example">
<meta name="keywords" content="Corvallis">
<meta name="keywords" content="openstack">
<meta name="keywords" content="Portland">
<meta name="keywords" content="clothes">
<meta name="keywords" content="concerts">
<meta name="keywords" content="interviews">
<meta name="keywords" content="conference">
<meta name="keywords" content="Books">
<meta name="keywords" content="Conferences">
<meta name="keywords" content="Experiences">
<meta name="keywords" content="Loves">
<meta name="keywords" content="Tech">
<meta name="keywords" content="Thoughts">
<meta name="keywords" content="Travel">
<meta name="robots" content="index, follow">
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Blog" />
<meta property="og:url" content="http://blog.lucywyman.me" />
<meta property="og:site_name" content="Blog" />
<script src="/theme/js/jquery-1.11.2.js"></script>
<link href="/theme/css/fontawesome/css/all.css" rel="stylesheet">
<link rel='stylesheet' href='/theme/css/main.css' type='text/css'>
<link href="/theme/images/favicon.ico" type="image/icon" rel="icon">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-48093989-5', 'auto');
ga('send', 'pageview');
</script>
</head> <body>
<nav>
<ul>
<li><h3><a href='http://blog.lucywyman.me'>Lucy Wyman</a></h3></li>
<li><a href='http://blog.lucywyman.me/about.html'>About</a></li>
<li>
<a href='http://blog.lucywyman.me/category/books.html'>Books</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/conferences.html'>Conferences</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/experiences.html'>Experiences</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/loves.html'>Loves</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/tech.html'>Tech</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/thoughts.html'>Thoughts</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/travel.html'>Travel</a>
</li>
</ul>
</nav>
<div class='wrapper'>
<main>
<div class='article-blurb'>
<div class='blurb-content'>
<h2><a href="http://blog.lucywyman.me/desserts-i-dream-about.html">Desserts I Dream About</a></h2>
<p>05.1.2018</p>
<p><p>I've always had a sweet tooth. Chocolate, caramel, cake, pastries,
fruit. Dessert is my favorite meal, and sugar is my love language. I
don't tend to eat sweets very often because they aren't so good for
you in large and frequent doses, but when I do indulge it can be …</p><a href='desserts-i-dream-about.html'>read more</a></p>
</div>
</div>
<div class='article-blurb'>
<div class='blurb-content'>
<h2><a href="http://blog.lucywyman.me/my-bucket-list.html">My Super Boring Bucket List</a></h2>
<p>04.4.2018</p>
<p><p>I read an article today about Bucket Lists that included a comments
section, and was surprised by two patterns in people's bucket lists:</p>
<ul class="simple">
<li>The Northern Lights seemed to be the most frequent single item. I
have no idea what would compel anyone to stand in freezing weather
in the middle …</li></ul><a href='my-bucket-list.html'>read more</a></p>
</div>
</div>
<div class='article-blurb'>
<div class='blurb-content'>
<h2><a href="http://blog.lucywyman.me/spring-10x10-2018.html">Spring 10x10 2018</a></h2>
<p>03.30.2018</p>
<p><p>For the first time ever, I'm participating in the <a class="reference external" href="http://www.stylebee.ca/2018/03/30/spring-10x10-2018/">10 x 10</a>
challenge, hosted by <a class="reference external" href="http://www.stylebee.ca">Lee of Style Bee</a> and <a class="reference external" href="http://un-fancy.com">Caroline of Unfancy</a>.
For those who don't know, Lee and Caroline are bloggers in the
responsible + ethical fashion space who have been a huge influence on
my closet and shopping …</p><a href='spring-10x10-2018.html'>read more</a></p>
</div>
</div>
<div class='article-blurb'>
<div class='blurb-content'>
<h2><a href="http://blog.lucywyman.me/spring-bucket-list-2018.html">Spring Bucket List 2018</a></h2>
<p>03.8.2018</p>
<p><p>Spring is nearly here! With warmer, longer days on the horizon I'm
dreaming of all the outdoor, evening-time activities we can start
doing again. And in a new city! I'm moving to Seattle in a week, which
means this Spring will involve a lot of exploring new places, new
experiences …</p><a href='spring-bucket-list-2018.html'>read more</a></p>
</div>
</div>
<div class='article-blurb'>
<div class='blurb-content'>
<h2><a href="http://blog.lucywyman.me/coffee-alternatives.html">Coffee Alternatives</a></h2>
<p>03.2.2018</p>
<p><p>Little known Lucy fact: I'm allergic to coffee. I <em>love</em> the smell of
coffee, and if I keep it to about 12 oz. once a week I'm fine. But
much more than that, and my stomach just ties itself in knots! Don't
get me wrong, though: I still really like …</p><a href='coffee-alternatives.html'>read more</a></p>
</div>
</div>
<div class='article-blurb'>
<div class='blurb-content'>
<h2><a href="http://blog.lucywyman.me/23.html">-23- 8 Things I Learned This Year</a></h2>
<p>02.14.2018</p>
<p><p>Happy Valentine's Day! Today is my 23rd birthday, and to celebrate I
wanted to reflect on what I had learned in the last year. As I wrote
during my recent <a class="reference external" href="http://blog.lucywyman.me/2017-year-in-review.html">new years post</a>, this last year has not been the
most exciting year, and I'm honestly a little glad it's …</p><a href='23.html'>read more</a></p>
</div>
</div>
<div class='article-blurb'>
<div class='blurb-content'>
<h2><a href="http://blog.lucywyman.me/reflections-on-2017.html">Reflections on 2017</a></h2>
<p>12.11.2017</p>
<p><p>What a year! I know so many people talk about how quickly time moves, but
for me this year (and most years) feel more like decades. I'm not sure why time
moves so slowly for me (and I'm certainly not sad about it!), but thinking back
to last January it …</p><a href='reflections-on-2017.html'>read more</a></p>
</div>
</div>
<p class="paginator">
<a href="http://blog.lucywyman.me/category/experiences2.html" class="button_accent">← newer</a>
<a href="http://blog.lucywyman.me/category/experiences4.html"
class="button_accent">older →</a>
</p>
</main>
<aside>
<div class='sidebar'>
<!--TODO: search, subscribe, archive-->
<p><a href='/feed.rss'>RSS <i class="fas fa-rss"></i></a></p>
<hr>
<h3>Categories</h3>
<ul>
<li>
<a href='http://blog.lucywyman.me/category/books.html'>Books</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/conferences.html'>Conferences</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/experiences.html'>Experiences</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/loves.html'>Loves</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/tech.html'>Tech</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/thoughts.html'>Thoughts</a>
</li>
<li>
<a href='http://blog.lucywyman.me/category/travel.html'>Travel</a>
</li>
</ul>
<hr>
<h3>Tags</h3>
<ul>
<li>
<a href='http://blog.lucywyman.me/tag/application.html'>application</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/book-review.html'>book-review</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/books.html'>books</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/bucket-lists.html'>bucket-lists</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/clothes.html'>clothes</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/concerts.html'>concerts</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/conference.html'>conference</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/conferences.html'>conferences</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/containers.html'>containers</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/Corvallis.html'>Corvallis</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/example.html'>example</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/exercise.html'>exercise</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/experiences.html'>experiences</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/favorites.html'>favorites</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/flag.html'>flag</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/food.html'>food</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/health.html'>health</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/interviews.html'>interviews</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/japanuary.html'>japanuary</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/loves.html'>loves</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/movies.html'>movies</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/Openshift.html'>Openshift</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/openstack.html'>openstack</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/orchestrator.html'>orchestrator</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/politics.html'>politics</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/Portland.html'>Portland</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/puppet.html'>puppet</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/ruby.html'>ruby</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/Seattle.html'>Seattle</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/selenium.html'>selenium</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/tech.html'>tech</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/thanksgiving.html'>thanksgiving</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/thoughts.html'>thoughts</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/travel.html'>travel</a>
</li>
<li>
<a href='http://blog.lucywyman.me/tag/women.html'>women</a>
</li>
</ul>
<hr>
<h3>Popular Posts</h3>
<ul>
<li><a href='http://blog.lucywyman.me/tattoo.html'>Getting a Tattoo</a></li>
<li><a href='http://blog.lucywyman.me/respect.html'>Rivers of Milk and Honey</a></li>
<li><a href='http://blog.lucywyman.me/boy.html'>If I Were a Boy</a></li>
<li><a href='http://blog.lucywyman.me/interviews.html'>The Interview</a></li>
</ul>
</div>
</aside>
</div>
<div class='footer'>
<p>Made with <i class="fas fa-heart"></i> in PDX · Powered by <a href='https://docs.getpelican.com/en/3.6.3/index.html'>Pelican</a> · Code on <a href='https://github.com/lucywyman'>
<img class='social' src='/theme/images/github-icon.png'>
</a></p>
</div>
</body>
</html>
|
lucywyman/blog
|
category/experiences3.html
|
HTML
|
cc0-1.0
| 14,421
|
jsonp({"cep":"32671120","logradouro":"Avenida Juiz Marco T\u00falio Isaac","bairro":"Jardim das Alterosas - 1\u00aa Se\u00e7\u00e3o","cidade":"Betim","uf":"MG","estado":"Minas Gerais"});
|
lfreneda/cepdb
|
api/v1/32671120.jsonp.js
|
JavaScript
|
cc0-1.0
| 187
|
jsonp({"cep":"29313665","logradouro":"Rua Joana Carlete Fi\u00f3rio","bairro":"Marbrasa","cidade":"Cachoeiro de Itapemirim","uf":"ES","estado":"Esp\u00edrito Santo"});
|
lfreneda/cepdb
|
api/v1/29313665.jsonp.js
|
JavaScript
|
cc0-1.0
| 168
|
jsonp({"cep":"85857360","logradouro":"Alameda Atuma","bairro":"Loteamento Campos do Igua\u00e7u","cidade":"Foz do Igua\u00e7u","uf":"PR","estado":"Paran\u00e1"});
|
lfreneda/cepdb
|
api/v1/85857360.jsonp.js
|
JavaScript
|
cc0-1.0
| 163
|
package test7.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
import org.springframework.transaction.PlatformTransactionManager;
import javax.sql.DataSource;
@Configuration
public class DbConfig {
@Bean
public DataSource dataSource() {
return new EmbeddedDatabaseBuilder()
.setType(EmbeddedDatabaseType.H2)
.addScripts("common/schema.sql", "common/test-data.sql")
.build();
}
@Bean
public PlatformTransactionManager transactionManager(DataSource ds) {
return new DataSourceTransactionManager(ds);
}
@Bean
public JdbcTemplate jdbcTemplate(DataSource ds) {
return new JdbcTemplate(ds);
}
@Bean
public NamedParameterJdbcTemplate namedParameterJdbcTemplate(DataSource ds) {
return new NamedParameterJdbcTemplate(ds);
}
}
|
lathspell/java_test
|
java_test_spring_jdbc/src/main/java/test7/config/DbConfig.java
|
Java
|
cc0-1.0
| 1,276
|
# enable highlighting
$feature{'highlight'}{'default'} = [1];
|
journalehsan/Sandbox-Book
|
Code/gitweb5.sh
|
Shell
|
cc0-1.0
| 62
|
develop-like-a-ninja
====================
Gathering good practices to discuss during gehacktdag
|
thijsvdanker/develop-like-a-ninja
|
README.md
|
Markdown
|
cc0-1.0
| 97
|
jsonp({"cep":"25720360","logradouro":"Rua Belisario Fonseca","bairro":"Corr\u00eaas","cidade":"Petr\u00f3polis","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/25720360.jsonp.js
|
JavaScript
|
cc0-1.0
| 151
|
jsonp({"cep":"18608002","logradouro":"Rua Francisco Gomes Filho","bairro":"Jardim Itamarati","cidade":"Botucatu","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/18608002.jsonp.js
|
JavaScript
|
cc0-1.0
| 152
|
jsonp({"cep":"28623550","logradouro":"Rua Jaime Higgins","bairro":"Olaria","cidade":"Nova Friburgo","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/28623550.jsonp.js
|
JavaScript
|
cc0-1.0
| 139
|
\thispagestyle{empty}
\pagestyle{empty}
\pagenumbering{arabic}
\begin{titlepage}
\label{text}
\begin{center}
\begin{Large}\textbf{LEARNING SEVENSI}\end{Large}\\
\emph{A Primer}
\end{center}
\end{titlepage}
\emptybreak
\pagestyle{plain}
|
literallybenjam/7c
|
books/education/Learning Sevensi – A Primer/00.tex
|
TeX
|
cc0-1.0
| 241
|
<!DOCTYPE html>
<!-- saved from url=(0063)http://ironsummitmedia.github.io/startbootstrap-small-business/ -->
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>KB Stilguide - Exempel</title>
<!-- Custom styles for this template -->
<link href="../css/kb-style.css" rel="stylesheet">
<!-- Custom CSS -->
<!-- <link href="http://ironsummitmedia.github.io/startbootstrap-small-business/css/small-business.css" rel="stylesheet"> -->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style type="text/css"></style></head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand navbar-logo" href="#"><img src="../assets/kb_logo_white.svg" /></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Services</a>
</li>
<li>
<a href="#">Contact</a>
</li>
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<div class="container">
<br/><br/><br/>
<!-- Heading Row -->
<div class="row">
<div class="col-md-8">
<img class="img-responsive img-rounded" src="http://c2.staticflickr.com/8/7325/16401931880_fcf8034610_h.jpg" alt="">
</div>
<!-- /.col-md-8 -->
<div class="col-md-4">
<h1>Business Name or Tagline</h1>
<p>This is a template that is great for small businesses. It doesn't have too much fancy flare to it, but it makes a great use of the standard Bootstrap core components. Feel free to use this template for any project you want!</p>
<a class="btn btn-primary btn-lg" href="#">Call to Action!</a>
</div>
<!-- /.col-md-4 -->
</div>
<!-- /.row -->
<hr>
<!-- Call to Action Well -->
<div class="row">
<div class="col-lg-12">
<div class="well text-center">
This is a well that is a great spot for a business tagline or phone number for easy access!
</div>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<!-- Content Row -->
<div class="row">
<div class="col-md-4">
<h2>Heading 1</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p>
<a class="btn btn-default" href="#">More Info</a>
</div>
<!-- /.col-md-4 -->
<div class="col-md-4">
<h2>Heading 2</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p>
<a class="btn btn-default" href="#">More Info</a>
</div>
<!-- /.col-md-4 -->
<div class="col-md-4">
<h2>Heading 3</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Saepe rem nisi accusamus error velit animi non ipsa placeat. Recusandae, suscipit, soluta quibusdam accusamus a veniam quaerat eveniet eligendi dolor consectetur.</p>
<a class="btn btn-default" href="#">More Info</a>
</div>
<!-- /.col-md-4 -->
</div>
<!-- /.row -->
</div>
<!-- Footer -->
<footer>
<div class="footer-container bg-pastel-light-blue">
<div class="container">
<div class="col-md-2 text-center">
<img src="../assets/kb_logo_black.svg" class="logo-medium" />
</div>
<div class="col-md-10 text-black">
<p>
<strong><a href="http://www.kb.se" alt="Länk till Kungl. Bibliotekets webbplats">KUNGL. BIBLIOTEKET</a></strong><br>
<span>Support: <a href="mailto:test.test@kb.se">test.test@kb.se</a></span>
</p>
</div>
</div>
</div>
</footer>
<!-- /.container -->
<!-- Placed at the end of the document so the pages load faster -->
<script src="../vendor/jquery.min.js"></script>
<script src="../vendor/bootstrap.min.js"></script>
</body></html>
|
Kungbib/frontend-guide
|
examples/smallbusiness.html
|
HTML
|
cc0-1.0
| 6,046
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45-internal) on Sat Jul 25 18:13:22 BST 2015 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.apache.jena.rdf.model (Apache Jena)</title>
<meta name="date" content="2015-07-25">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="org.apache.jena.rdf.model (Apache Jena)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/jena/rdf/listeners/package-summary.html">Prev Package</a></li>
<li><a href="../../../../../org/apache/jena/rdfxml/xmlinput/package-summary.html">Next Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/jena/rdf/model/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package org.apache.jena.rdf.model</h1>
<div class="docSummary">
<div class="block">A package for creating and manipulating RDF graphs.</div>
</div>
<p>See: <a href="#package.description">Description</a></p>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation">
<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Alt.html" title="interface in org.apache.jena.rdf.model">Alt</a></td>
<td class="colLast">
<div class="block">An RDF Alternative container.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Bag.html" title="interface in org.apache.jena.rdf.model">Bag</a></td>
<td class="colLast">
<div class="block">An RDF Bag container.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Container.html" title="interface in org.apache.jena.rdf.model">Container</a></td>
<td class="colLast">
<div class="block">An RDF Container.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/InfModel.html" title="interface in org.apache.jena.rdf.model">InfModel</a></td>
<td class="colLast">
<div class="block">An extension to the normal Model interface that supports access to any
underlying inference capability.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Literal.html" title="interface in org.apache.jena.rdf.model">Literal</a></td>
<td class="colLast">
<div class="block">An RDF Literal.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Model.html" title="interface in org.apache.jena.rdf.model">Model</a></td>
<td class="colLast">
<div class="block">An RDF Model.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelChangedListener.html" title="interface in org.apache.jena.rdf.model">ModelChangedListener</a></td>
<td class="colLast">
<div class="block">The interface for classes that listen for model-changed events.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelCon.html" title="interface in org.apache.jena.rdf.model">ModelCon</a></td>
<td class="colLast">
<div class="block">Convenience methods which extend the <a href="../../../../../org/apache/jena/rdf/model/Model.html" title="interface in org.apache.jena.rdf.model"><code>Model</code></a> interface.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelGetter.html" title="interface in org.apache.jena.rdf.model">ModelGetter</a></td>
<td class="colLast">
<div class="block">A ModelGetter object can retrieve a Model given a URL for it.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelGraphInterface.html" title="interface in org.apache.jena.rdf.model">ModelGraphInterface</a></td>
<td class="colLast">
<div class="block">ModelGraphInterface - this interface mediates between the API Model level
and the SPI Graph level.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelMaker.html" title="interface in org.apache.jena.rdf.model">ModelMaker</a></td>
<td class="colLast">
<div class="block">A ModelMaker contains a collection of named models, methods for creating
new models [both named and anonymous] and opening previously-named
models, removing models, and accessing a single "default" Model for this
Maker.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelReader.html" title="interface in org.apache.jena.rdf.model">ModelReader</a></td>
<td class="colLast">
<div class="block">A component interface used by ModelGetter for reading models.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelSource.html" title="interface in org.apache.jena.rdf.model">ModelSource</a></td>
<td class="colLast">
<div class="block">The revised and soon-to-be-core interface for sources of models,
typically generated from RDF descriptions.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/NodeIterator.html" title="interface in org.apache.jena.rdf.model">NodeIterator</a></td>
<td class="colLast">
<div class="block">An iterator which returns RDF nodes.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/NsIterator.html" title="interface in org.apache.jena.rdf.model">NsIterator</a></td>
<td class="colLast">
<div class="block">An iterator which returns namespace URI's.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Property.html" title="interface in org.apache.jena.rdf.model">Property</a></td>
<td class="colLast">
<div class="block">An RDF Property.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFErrorHandler.html" title="interface in org.apache.jena.rdf.model">RDFErrorHandler</a></td>
<td class="colLast">
<div class="block">A generic error handler.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFList.html" title="interface in org.apache.jena.rdf.model">RDFList</a></td>
<td class="colLast">
<div class="block">
Provides a convenience encapsulation for lists formed from chains of RDF
statements arranged to form a head/tail cons-cell structure.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFList.ApplyFn.html" title="interface in org.apache.jena.rdf.model">RDFList.ApplyFn</a></td>
<td class="colLast">
<div class="block">Interface that encapsulates a function to apply to every element in a
list.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFList.ReduceFn.html" title="interface in org.apache.jena.rdf.model">RDFList.ReduceFn</a></td>
<td class="colLast">
<div class="block">Interface that encapsulates a function to apply to each element of a list
in turn, and passing the result to an accumulator.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFNode.html" title="interface in org.apache.jena.rdf.model">RDFNode</a></td>
<td class="colLast">
<div class="block">Interface covering RDF resources and literals.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFReader.html" title="interface in org.apache.jena.rdf.model">RDFReader</a></td>
<td class="colLast">
<div class="block">An <code>RDFReader</code> reads a serialized represenation of RDF,
e.g.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFReaderF.html" title="interface in org.apache.jena.rdf.model">RDFReaderF</a></td>
<td class="colLast">
<div class="block">An RDFReader factory inferface.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFVisitor.html" title="interface in org.apache.jena.rdf.model">RDFVisitor</a></td>
<td class="colLast">
<div class="block">The interface for visiting (ie type-dispatching) an RDF Node.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFWriter.html" title="interface in org.apache.jena.rdf.model">RDFWriter</a></td>
<td class="colLast">
<div class="block">RDFWriter is an interface to RDF serializers.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RDFWriterF.html" title="interface in org.apache.jena.rdf.model">RDFWriterF</a></td>
<td class="colLast">
<div class="block">An RDFWriter factory inferface.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ReifiedStatement.html" title="interface in org.apache.jena.rdf.model">ReifiedStatement</a></td>
<td class="colLast">
<div class="block">A ReifiedStatement represents a Statement as a Resource.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ResIterator.html" title="interface in org.apache.jena.rdf.model">ResIterator</a></td>
<td class="colLast">
<div class="block">An iterator which returns RDF Resources.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Resource.html" title="interface in org.apache.jena.rdf.model">Resource</a></td>
<td class="colLast">
<div class="block">An RDF Resource.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ResourceF.html" title="interface in org.apache.jena.rdf.model">ResourceF</a></td>
<td class="colLast">Deprecated</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ResourceFactory.Interface.html" title="interface in org.apache.jena.rdf.model">ResourceFactory.Interface</a></td>
<td class="colLast">
<div class="block">the interface to resource factory objects.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/RSIterator.html" title="interface in org.apache.jena.rdf.model">RSIterator</a></td>
<td class="colLast">
<div class="block">An RSIterator is a ClosableIterator (qv) which delivers only ReifedStatement's
and which has a next-method with that return type.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Selector.html" title="interface in org.apache.jena.rdf.model">Selector</a></td>
<td class="colLast">
<div class="block">A Statement selector.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Seq.html" title="interface in org.apache.jena.rdf.model">Seq</a></td>
<td class="colLast">
<div class="block">RDF Sequence container.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/Statement.html" title="interface in org.apache.jena.rdf.model">Statement</a></td>
<td class="colLast">
<div class="block">An RDF Statement.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/StatementBoundary.html" title="interface in org.apache.jena.rdf.model">StatementBoundary</a></td>
<td class="colLast">
<div class="block">An interface for expressing search boundaries in terms of bounding statements.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/StmtIterator.html" title="interface in org.apache.jena.rdf.model">StmtIterator</a></td>
<td class="colLast">
<div class="block">An iterator which returns RDF Statements.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/AnonId.html" title="class in org.apache.jena.rdf.model">AnonId</a></td>
<td class="colLast">
<div class="block">System id for an anonymous node.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelExtract.html" title="class in org.apache.jena.rdf.model">ModelExtract</a></td>
<td class="colLast">
<div class="block">ModelExtract - a wrapper for GraphExtract, allowing rooted sub-models to be
extracted from other models with some boundary condition.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelFactory.html" title="class in org.apache.jena.rdf.model">ModelFactory</a></td>
<td class="colLast">
<div class="block">ModelFactory provides methods for creating standard kinds of Model.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ModelFactoryBase.html" title="class in org.apache.jena.rdf.model">ModelFactoryBase</a></td>
<td class="colLast">
<div class="block">Helper functions for ModelFactory - in here to keep from obtruding on the
end-users.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ResourceFactory.html" title="class in org.apache.jena.rdf.model">ResourceFactory</a></td>
<td class="colLast">
<div class="block">A Factory class for creating resources.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/SimpleSelector.html" title="class in org.apache.jena.rdf.model">SimpleSelector</a></td>
<td class="colLast">
<div class="block">A general selector class for use when querying models.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/StatementBoundaryBase.html" title="class in org.apache.jena.rdf.model">StatementBoundaryBase</a></td>
<td class="colLast">
<div class="block">StatementBoundaryBase - a base class for StatementBoundarys, with
built-in converstion to triples and a continueWith as well as a stopAt.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/StatementTripleBoundary.html" title="class in org.apache.jena.rdf.model">StatementTripleBoundary</a></td>
<td class="colLast">
<div class="block">StatementTripleBoundary - a StatementBoundary that just wraps a
TripleBoundary.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Exception Summary table, listing exceptions, and an explanation">
<caption><span>Exception Summary</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Exception</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/AltHasNoDefaultException.html" title="class in org.apache.jena.rdf.model">AltHasNoDefaultException</a></td>
<td class="colLast">
<div class="block">Exception thrown if an Alt has no default statement.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/DoesNotReifyException.html" title="class in org.apache.jena.rdf.model">DoesNotReifyException</a></td>
<td class="colLast">
<div class="block">This exception may be raised when an attempt to convert an RDFNode
to a ReifiedStatement fails because the RDFNode does not correspond
to a reification.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/EmptyListException.html" title="class in org.apache.jena.rdf.model">EmptyListException</a></td>
<td class="colLast">
<div class="block">
A exception that is thrown when an operation is attempted on an empty (nil)
list that actually requires a list of length one or more.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/EmptyListUpdateException.html" title="class in org.apache.jena.rdf.model">EmptyListUpdateException</a></td>
<td class="colLast">
<div class="block">
Exception that is thrown when an attept is made to perform a side-effectful
operation on an <a href="../../../../../org/apache/jena/rdf/model/RDFList.html" title="interface in org.apache.jena.rdf.model"><code>RDFList</code></a> that is the empty list, or <code>rdf:nil</code>.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/HasNoModelException.html" title="class in org.apache.jena.rdf.model">HasNoModelException</a></td>
<td class="colLast">
<div class="block">Exception to throw when a Statement or Resource (which don't have
a useful common supertype, alas) don't have an associated model.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/InvalidListException.html" title="class in org.apache.jena.rdf.model">InvalidListException</a></td>
<td class="colLast">
<div class="block">
A exception that is thrown when an operation is attempted on a list that is
not well-formed, and is being processed in strict mode.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ListIndexException.html" title="class in org.apache.jena.rdf.model">ListIndexException</a></td>
<td class="colLast">
<div class="block">
A exception that is thrown when an operation attempts to access an indexed
list element beyond the length of the list.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/LiteralRequiredException.html" title="class in org.apache.jena.rdf.model">LiteralRequiredException</a></td>
<td class="colLast">
<div class="block">Exception to throw when an RDFNode required to be a Literal isn't, or when a
literal Node is required but a non-literal Node supplied.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/ResourceRequiredException.html" title="class in org.apache.jena.rdf.model">ResourceRequiredException</a></td>
<td class="colLast">
<div class="block">Exception to throw when an RDFNode required to be a Resource isn't, or when a Node
supposed to be a resource isn't.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../../org/apache/jena/rdf/model/SeqIndexBoundsException.html" title="class in org.apache.jena.rdf.model">SeqIndexBoundsException</a></td>
<td class="colLast">
<div class="block">Exception to throw when the index of a sequence is not in range.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="package.description">
<!-- -->
</a>
<h2 title="Package org.apache.jena.rdf.model Description">Package org.apache.jena.rdf.model Description</h2>
<div class="block"><p>A package for creating and manipulating RDF graphs.
</p></div>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/jena/rdf/listeners/package-summary.html">Prev Package</a></li>
<li><a href="../../../../../org/apache/jena/rdfxml/xmlinput/package-summary.html">Next Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/jena/rdf/model/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Licenced under the Apache License, Version 2.0</small></p>
</body>
</html>
|
slennie12/SOR-Onderzoek
|
apache-jena-3.0.0/javadoc-core/org/apache/jena/rdf/model/package-summary.html
|
HTML
|
cc0-1.0
| 23,561
|
jsonp({"cep":"11667827","logradouro":"Estrada do S\u00edtio Tucum\u00e3","bairro":"Pegorelli","cidade":"Caraguatatuba","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/11667827.jsonp.js
|
JavaScript
|
cc0-1.0
| 158
|
jsonp({"cep":"78150428","logradouro":"Rua A","bairro":"Cohab Asa Bela","cidade":"V\u00e1rzea Grande","uf":"MT","estado":"Mato Grosso"});
|
lfreneda/cepdb
|
api/v1/78150428.jsonp.js
|
JavaScript
|
cc0-1.0
| 137
|
<!DOCTYPE HTML>
<!--
Prologue by HTML5 UP
html5up.net | @n33co
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Study in Germany</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!--[if lte IE 8]><script src="assets/js/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="assets/css/main.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="assets/css/ie8.css" /><![endif]-->
<!--[if lte IE 9]><link rel="stylesheet" href="assets/css/ie9.css" /><![endif]-->
</head>
<body>
<!-- Header -->
<?php require_once "headerlocal.php"; ?>
<!-- Main -->
<div id="main">
<!-- About Me -->
<section id="about" class="three">
<div class="container">
<header>
<h2>About Germany</h2>
</header>
<p>Germany is one of the leading countries of Europe. It consists of 16 states; Berlin is the capital of Germany. It is the third largest economy of world due to a lot of industries. Germany is world’s second most famous migration destination. It includes many automotive industries like BMW, VOLKSWAGEN, AUDI etc. Therefore Germany is the world's 3rd largest exporter of goods.
</p>
</div>
</section>
<!-- Contact
<section id="contact" class="four">
<div class="container">
<header>
<h2>Contact</h2>
</header>
<p>Please drop a letter in our letter-box and we will respond soon! :)</p>
<form method="post" action="#">
<div class="row">
<div class="6u 12u$(mobile)"><input type="text" name="name" placeholder="Name" /></div>
<div class="6u$ 12u$(mobile)"><input type="text" name="email" placeholder="Email" /></div>
<div class="6u$ 12u$(mobile)"><input type="text" name="phone" placeholder="Phone Number" required /></div>
<div class="12u$">
<textarea name="message" placeholder="Message"></textarea>
</div>
<div class="12u$">
<input type="submit" value="Send Message" />
</div>
</div>
</form>
</div>
</section>-->
</div>
<!-- Footer -->
<div id="footer">
<!-- Copyright -->
<ul class="copyright">
<li>© Peasants B. All rights reserved.</li><li>Efforted by: <a href="http://unspoon.com">Unspoon</a></li>
<li>Address: Bindra Complex, near Gurudwara Shaheed Baba Deep Singh Ji, Model Town Extension, Ludhaina</li><li>Reach us at: <a href="https://www.google.co.in/maps/place/Bindra+Complex,+Model+Town+Rd,+Shastri+Nagar,+Model+Town,+Ludhiana,+Punjab+141002/@30.886298,75.8351396,17z/data=!3m1!4b1!4m2!3m1!1s0x391a824b779fa5ed:0x6ed3ea9a3d84c996?hl=en">Google Map</a></li>
</ul>
</div>
<!-- Scripts -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/jquery.scrollzer.min.js"></script>
<script src="assets/js/skel.min.js"></script>
<script src="assets/js/util.js"></script>
<!--[if lte IE 8]><script src="assets/js/ie/respond.min.js"></script><![endif]-->
<script src="assets/js/main.js"></script>
<!-- <script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>-->
</body>
</html>
|
albertcoder/peasantsB
|
about.php
|
PHP
|
cc0-1.0
| 3,360
|
using UnityEngine;
using System.Collections;
[RequireComponent(typeof(BoxCollider2D))]
public class PlayerPhysics : MonoBehaviour {
public LayerMask collisionMask;
public int coliderRaysX = 3;
public int coliderRaysY = 3;
private BoxCollider2D collider;
private Vector3 size;
private Vector3 center;
private Vector3 originalSize;
private Vector3 originalCenter;
private float colliderScaleX;
private float colliderScaleY;
private float skin = .005f;
//[HideInInspector]
public bool grounded;
[HideInInspector]
public bool movementStop;
Ray ray;
RaycastHit hit;
void Start(){
collider = GetComponent<BoxCollider2D> ();
//collider.bounds.extents = new Vector3 (0,0,0);
colliderScaleX = transform.localScale.x;
colliderScaleY = transform.localScale.y;
originalSize = collider.size;
originalCenter = collider.center;
Debug.Log(collider.size+" "+collider.center+"/"+originalSize +" "+ originalCenter);
SetColider (originalSize,originalCenter);
}
public void Move(Vector2 moveAmount){
float deltaY = moveAmount.y;
float deltaX = moveAmount.x;
Vector2 p = transform.position;
grounded = false;
for (int i=0; i<coliderRaysY; i++) {
float dir = Mathf.Sign(deltaY);
float x =(p.x + center.x - size.x/2) + size.x/(coliderRaysY-1)*i;
float y = p.y + center.y+size.y/2 * dir;
ray = new Ray(new Vector2(x,y),new Vector2(0,dir));
Debug.DrawRay(ray.origin,ray.direction);
if(Physics.Raycast(ray, out hit,Mathf.Abs(deltaY)+skin,collisionMask)){
float dst = Vector3.Distance(ray.origin,hit.point);
if(dst>skin){
deltaY=dst*dir-skin*dir;
}
else{
deltaY=0;
}
grounded = true;
break;
}
}
movementStop = false;
for (int i=0; i<coliderRaysX; i++) {
float dir = Mathf.Sign(deltaX);
float x =p.x + center.x + size.x/2*dir;
float y = p.y + center.y - size.y/2 + size.y/(coliderRaysX-1) * i;
// Debug.Log(x +" "+y+" "+ p.x +" "+center.x+" "+size.x+" "+size.x/2*dir);
ray = new Ray(new Vector2(x,y),new Vector2(dir,0));
Debug.DrawRay(ray.origin,ray.direction);
if(Physics.Raycast(ray, out hit,Mathf.Abs(deltaX)+skin,collisionMask)){
float dst = Vector3.Distance(ray.origin,hit.point);
if(dst>skin){
deltaX=dst*dir-skin*dir;
}
else{
deltaX=0;
}
movementStop = true;
break;
}
}
if(!grounded && !movementStop){
Vector3 playerDir = new Vector3 (deltaX, deltaY, 0);
Vector3 o = new Vector3 (p.x + center.x + size.x/coliderRaysX*Mathf.Sign(deltaX), p.y + center.y+size.y/coliderRaysY * Mathf.Sign(deltaY),0);
Debug.DrawRay(o,playerDir.normalized);
ray = new Ray (o, playerDir.normalized);
if(Physics.Raycast(ray,Mathf.Sqrt (deltaX*deltaX + deltaY*deltaY),collisionMask)){
grounded = true;
deltaY = 0;
}
}
Vector2 finalTransform = new Vector2 (deltaX, deltaY);
transform.Translate (finalTransform);
}
public void SetColider(Vector3 size, Vector3 center){
collider.size = size;
collider.center = center;
Debug.Log(size+" "+center);
this.size.x = size.x * colliderScaleX;
this.size.y = size.y * colliderScaleY;
this.center = center * colliderScaleX;
}
}
|
Zambos/A_Shadowy_Adventure
|
Scripts/GameLogic/PlayerPhysics.cs
|
C#
|
cc0-1.0
| 3,188
|
jsonp({"cep":"13098009","logradouro":"Rua Ant\u00f4nio Ramos","bairro":"Parque dos Pomares","cidade":"Campinas","uf":"SP","estado":"S\u00e3o Paulo"});
|
lfreneda/cepdb
|
api/v1/13098009.jsonp.js
|
JavaScript
|
cc0-1.0
| 151
|
jsonp({"cep":"26115085","logradouro":"Avenida Joaquim da Costa Lima","bairro":"Nova Piam","cidade":"Belford Roxo","uf":"RJ","estado":"Rio de Janeiro"});
|
lfreneda/cepdb
|
api/v1/26115085.jsonp.js
|
JavaScript
|
cc0-1.0
| 153
|
# Finite dimensional vector spaces
These notes introduce vector spaces and prove the dimension theorem for finitely-generated vector spaces. We also introduce some fundamental notions like vector spaces of scalar-valued functions.
## Definition of a group
A **group** is a tuple $(G, \circ, e)$ where $G$ is a set and $\circ: G \times G \to G$ such that
- for all $a, b, c$ \in G$, $a \circ (b \circ c) = (a \circ b) \circ c$
- for all $a \in G$, $a \circ e = e \circ a = a$
- for all $a \in G$ there is a $b \in G$ with $a \circ b = b \circ a = e$
$e$ is called the **unit** of the group and the elements specified in the third axiom are called **inverses**.
## Unit is unique
If there's a $u \in G$ with $\forall g \in G$ $g \circ u = u \circ g = g$, then $u = e$.
*Proof:* $u = u \circ e = e$ by the properties of $e$ and the assumed properties of $u$.
## Inverses are unique
If $b$ and $c$ are inverses for an element $a$, then $b = c$.
*Proof:* $b = b \circ e = b \circ (a \circ c) = (b \circ a) \circ c = e \circ c = c$
## Notation for inverses
Since each $a \in G$ has a unique inverse, we notate it $a^{-1}$.
## Notation convention for the group operation
Writing all these $\circ$'s will be tedious, so we will abbreviate the group operation between two elements $g$ and $h$ by $g h$.
## Cancellation laws
For any $a, b, c \in G$:
- If $a b = a c$, then $b = c$.
- If $a c = b c$, then $a = b$.
1. If $a b = a c$, then $b = c$.
*Proof:* $b = a^{-1} (a b) = a^{-1} (a c) = c$ (after ommitting steps where we use associativity and properties of inverses).
2. If $a c = b c$, then $a = b$.
*Proof:* $a = (a c) c^{-1} = (b c) c^{-1} = b$ (again after omitting steps using associativity and properties of inverses).
## Unique solvability
For any $g, h \in G$, there is a unique $x \in G$ such that $g x = h$ and a unique $y \in G$ such that $y g = h$. Furthermore, $x = g^{-1} h$ and $y = h g^{-1}$.
*Proof:* $x = g^{-1} h$ is a solution for $g x = h$. If some $z$ also solves it, then $h = g z = g (g^{-1} h)$, so by cancellation $z = g^{-1} h$.
For the second equation, $h g^{-1}$ is a solution for $y g = h$. If some $z$ also solves it, again by cancellation $z = h g^{-1}$.
## Inverse of the inverse
For any $g \in G$, $(g^{-1})^{-1} = g$
*Proof:* $g^{-1} (g^{-1})^{-1} = e = g^{-1} g$, so the statement is established via unique solvability.
## Definition of an abelian group
An **abelian group** is a group with a commutative group operation.
## Definition of a subgroup
A **subgroup** of a group $G$ is a subset $S$ which is a group when the group operation is restricted to $S$.
## Definition of a field
A **field** is a commutative division ring. See the ring theory notes for details.
## A brief note on notation
We often write the group operation of many elements together without any parentheses, even though technically the operation works only on two elements at a time. For example $g h i j k$ would represent the a group product like $(g h) ((i j) k)$. Since the parentheses don't matter, it is convenient to omit them.
Furthermore, in an abelian group, the left-to-right sequence of the elements in a group product doesn't matter. For example, $a b c = a c b = b a c = b c a = c a b = c b a$. In this case, it is convienent (especially when we get to vector spaces) to use the summation notation $\sum{i=1}^n g_i$, where the $g_i$ are group elements. Not only are we not writing parentheses, but the order in which the vectors are being added is not specified since the group's commutativity makes it irrelevant. The relevant information in a commutative group is merely which set of group elements is being combined.
## Vector spaces
A vector space is a tuple $(V, \mathbb{F}, \cdot)$ where $V$ is an abelian group of *vectors*, $\mathbb{F}$ is a field of *scalars*, and $\cdot$ is an operation of *scalar multiplication* such that the following hold:
- for all $a \in \mathbb{F}$ and $u, v \in V$, $a \cdot (u + v) = a \cdot u + a \cdot v$
- for all $a, b in \mathbb{F}$ and $u \in V$, $(a + b) \cdot u = a \cdot u + b \cdot u$
- $\mathbb{F}$'s multiplicative identity $1$ has $1 \cdot u = u$ for all $u \in V$
- for all $a, b in \mathbb{F}$ and $u \in V$, $a \cdot (b \cdot u) = (a b) \cdot u$
## Basic scalar multiplication facts
### Zero scalar nullifies all vectors
For all $v \in V$, $0 \cdot v = 0 \in V$.
*Proof:* $0 \cdot v = (0 + 0) \cdot v = 0 \cdot v + 0 \cdot v. Add inverses to both sides to obtain the statement.
### Scaling the zero vector results in zero
For all $c \in \mathbb{F}$, $c \cdot 0 = 0$.
*Proof:* $c \cdot 0 = c \cdot (0 + 0) = c \cdot 0 + c \cdot 0$. Add inverses to both sides to obtain the statement.
### $-1 \in \mathbb{F}$ negates the vector
For all $v \in V$, $(-1) \cdot v = -v \in V$.
*Proof:* $v + -1 \cdot v = 1 \cdot v + -1 \cdot v = (1 + -1) \cdot v = 0 \cdot v = 0$ by distributivity and the previous proposition. The additive inverse of any group is unique, so $-v = -1 \cdot v$.
### Cancellation law for scalar multiplication
If $c \in \mathbb{F}$ and $v \in V$, if $c \cdot v = 0$ then either $c = 0 \in \mathbb{F}$$ or $v = 0 \in V$.
*Proof:* If $c \neq 0$, then $v = 1 \cdot v = c^{-1} \cdot (c \cdot v) = c^{-1} \cdot 0 = 0$.
## Definition of linear combinations
Let $S$ be some finite set of vectors in a vector space $(V, \mathbb{F})$. A **scaling** of $S$ is a mapping $s: S \rightarrow \mathbb{F}$ assigning to every vector in $S$ some scalar. Then a **linear combination** is the vector $\sum{v \in S} s(v) \cdot v$.
If the scaling assigns all zero scalars, then it is called a **trivial scaling**.
## Definition of a basis
A **basis** set for a vector space $(V, \mathbb{F})$ is a subset $S$ of $V$ such that for every $v \in V$ there is a unique scaling whose linear combination is $v$.
A basis is very often represented in ordered form $(v_1, \ldots, v_n)$, so that a scaling can be specified by $(a_1, \ldots, a_n)$. The scaling of a basis that represents a vector $v$ is often instead called the **coordinates** of $v$ with respect to the basis.
## Definition of finite-dimensional vector spaces
A vector space is **finite-dimensional** if it has a finite basis. The word "dimension" in this phrase will be explained later.
## Assume all vector spaces are finite-dimensional from now on
Unless mentioned otherwise, we will assume that all vector spaces are finite-dimensional from here on out. Proving things about infinite-dimensional vector spaces requires more machinery.
## Definition of a generating set
A **generating** set for a vector space $(V, \mathbb{F})$ is a subset $S$ of $V$ such that for every $v \in V$ there is some scaling whose linear combination is $v$.
More generally, the **span** of a set $S$, denoted $span S$, is the set of vectors in $v \in V$ for which there exist scalings of $S$ that combine to $v$. In other words, the span of $S$ is the set of all linear combinations of $S$. It is easy to see that $S$ is a generating set for vector space $V$ iff $V = span S$.
## Definition of an independent set
An **independent** set for a vector space $(V, \mathbb{F})$ is a subset $S$ of $V$ such that for every $v \in V$ there is at most one scaling whose linear combination is $v$.
A set of vectors is **dependent** if it is not independent.
## A basis is an independent generating set
$B$ is a basis iff it is an independent generating set.
*Proof:* immediately from the definitions.
## The standard definition of independence
A set $S$ is linearly independent iff the zero vector has a unique representation as the trivial scaling of $S$.
*Proof:* Clearly if $S$ is independent then zero is uniquely obtained as a linear combination of a trivial scaling of $S$. Conversely, if some vector $v$ has two distinct scalings $f$ and $g$, then
$$v = \sum_{x \in S) f(x) \cdot x = \sum_{x \in S} g(x) \cdot x$$
Then we must have
$$ 0 = v - v = \sum_{x \in S} h(x) \cdot x$$
for the scaling defined by $h(x) = f(x) - g(x)$. $h(x)$ is non-trivial since $f$ and $g$ are distinct by hypothesis, so the zero vector does not have a unique scaling.
### Remark
This is a more convenient way of determining when some set is independent. Note that we defined $S$ to be independent by saying that every element of $span S$ has a unique scaling of $S$ that combines to it, but found that a "weaker" statement, that merely $0$ has a unique scaling of $S$ that combines to it, is an equivalent formulation.
## Necessary and sufficient condition for dependence
A set $S$ is dependent iff some $v \in S$ is in the span of the others
1. If $S$ is dependent, then some $v \in S$ is in the span of the others.
1. There is some $v \in S$ and some scaling $f$ of $S$ such that $f(v) \neq 0$ and $0 = \sum_{x \in S} f(x) \cdot x$
*Proof:* By the standard definition for independence.
2. $0 = f(v) \cdot v + \sum_{x \in S, x \neq v} f(x) \cdot x$
*Proof:* Rearrangement of (1)
3. Q.E.D.
*Proof:* (2) implies that $v = \sum_{x \in S, x \neq v} g(x) \cdot x$ for $g(x) := f(x) / f(v)$. So $v \in span(S - v)$.
2. If some $v \in S$ is in the span of the others, then $S$ is dependent
*Proof:* If $v = \sum_{x \in S, x \neq v} f(x) \cdot x$, then
$$
g(x) =
\cases{
f(x) & \text{if } x \neq v\cr
-1 & \text{o.w.}
}
$$
is a non-trivial scaling of $S$ that combines to $0$, so $S$ is dependent.
3. Q.E.D.
*Proof:* By (1) and (2)
## Removing dependent vectors doesn't change the span
If $S$ is a set of vectors and $u \in S$, then $u \in span(S - u)$ iff $span S = span(S - u)$.
1. If $u \in span(S - u)$, then $span S = span(S - u)$
1. It suffices to assume $v \in V$ and that $g$ is a scaling of $S$ that combines to $v$, and prove there exists a scaling of $S - u$ that combines to $v$.
*Proof:* We already have $span(S - u) \subseteq span S$.
2. There is a scaling $f$ of $S - u$ such that $u = \sum_{x \in S - u} f(x) \cdot x$.
*Proof:* By assumption that $u \in span(S - u)$.
3. Q.E.D.
*Proof:* $v = \sum_{x \in S} g(x) \cdot x = g(u) \cdot u + \sum_{x \in S - u} g(x) \cdot x$ by (1). The scaling of $S - u$ defined by $h(x) := g(u) f(x) + g(x)$ combines to $v$.
2. If $span(S) = span(S - u)$, then $u \in span(S - u)$
*Proof:* Immediate since $u \in span(S)$.
### Corollary
$S$ is dependent iff there is a $u \in S$ such that $span(S) = span(S - u)$
## A finite generating set contains a basis
If $S$ is a finite generating set for a vector space $V$, then there is a $B \subseteq S$ which is a basis for $V$.
*Proof:* If $S$ is independent, then it is a basis. Otherwise it is dependent and one element $x \in S$ is in the span of the others, so remove $x$ from $S$. The new set $S - x$ still spans $V$ because removing dependent vectors doesn't change the span. Repeat this process until an independent set is obtained. It must terminate eventually since we started with a finite set.
## An independent set can be extended to a basis
If $S$ is an independent subset of a vector space $V$, then there is a basis $B$ such that $S \subseteq B$.
*Proof:* $V$ is by assumption finite-dimensional, so it has a basis $C$. If $S$ is not already a basis, then it must not generate $V$, so we can find one element of $C$ that isn't in the span of $S$ (if not, all are in the span, which means $S$ generates $V$, contradicting our assumption that it didn't). Continually add vectors from $C$ that are not in the span of $S$ until we achieve a basis. This will be achieved because we only add vectors not in the span of $S$, so each addition maintains the independence of the set. This process eventually terminates since there are finitely many vectors in the basis.
## Equivalent definitions of basis
A set $B$ is a basis for fdvs $V$ iff $B$ is a maximal independent set iff $B$ is a minimal generating set.
*Proof:* If $B$ is a basis, $span B = V$, so we could not add any other element to $B$ and obtain an indepedent set, since all other elemends in $V$ are in the span of $B$. So $B$ is a maximal independent set. Also, $B$ could not be a non-minimal generating set, since that would imply it is dependent, contrary to the assumption it is a basis. So it must be a minimal generating set.
If $B$ is a maximal independent set, we cannot add any element of $V$ to $B$ without making the set dependent, so for all $v \in V - B$ we have $B + v$ dependent. This means some non-trivial scaling of $B + v$ combines to $0$, and we must have a non-zero coefficient on $v$ since otherwise we would have a non-trivial scaling of an independent set that combines to $0$, a contradiction. So $v \in span(B)$, meaning that $B$ generates $V$ and so $B$ is a basis.
If $B$ is a minimal generating set, then for all $x \in B$ we have $span(B - x) \neq span(B)$, so $B$ could not be dependent and must be independent, hence a basis.
## Steinitz exchange lemma
If $S$ is independent in $V$ and $T$ generates $V$, with $S$ finite, then $|S| \leq |T|$.
*Proof:* We can assume $S \neq \emptyset$ ($S = \emptyset$ immediately implies the statement to be proved), and impose some ordering so that $S = \{s_1, \ldots, s_k \}$.
Note that we will use notation $a + X$ for an element $a$ of some set, and some set $X$, to be the union $X \cup \{a\}$. Also, if $b \in X$, then $X - b = \{x \in X : x \neq b\}$.
By hypothesis $T$ generates $V$, so letting $S_0 = \emptyset$, $S_1 = \{ s_1 \}$, $T_0 = T$, we have $span(S_0 \cup T_0) = span(S_1 \cup T_0)$. The set $X_1 = S_1 \cup T_0$ is dependent since $T$ generates $V$ and $s_1 \in V$, and furthermore we can find a $t_1 \in T_0$ such that $t_1 \in span(X_1 - t_1)$ since we know some non-trivial scaling of $X_1$ combines to $0$ and that all zero-coefficients on the elements of $T$ in this scaling would imply that $s_1 = 0$, which is impossible. So let $T_1 = T_0 - t_1$. We have $span(S_0 \cup T_0) = span(S_1 \cup T_1)$ since removing a dependent vector doesn't change the span.
Now suppose that we have $S_j$ and $T_j$ for some $j$ such that $span(S_j \cup T_j) = span(S_0 \cup T_0)$ and $S_j$ is a proper subset of $S$. By the same reasoning as above, we can find a $t_{j+1}$ that is in the span of $S_j + s_j + T_j - t_{j+1}$, hence $span(S_{j+1} \cup T_{j+1}) = span(S_j \cup T_j)$, where $S_{j+1} = S_j + s_j$ and $T_{j+1} = T_j - T_{j+1}$.
This proves that there are at least $k$-elements in $T$ (since when we have defined $S_{k-1}$ and $T_{k-1}$, we can add $s_k$ to the set and still find a $t_k$ in the span of the others).
## Corollary
Any two finite bases in a finite dimensional vector space $V$ have the same number of elements.
*Proof:* If $B$ and $C$ are bases, then $B$ is independent and $C$ generating, hence $|B| \leq |C|$, and also $C$ is independent and $B$ generating, so $|C| \leq |B|$.
## No finite-dimensional vector space has an infinite independent set
If $V$ has a finite basis, then there is no infinite subset $S$ of $V$ which is independent.
*Proof:* If there is an infinite independent $S$, then any subset of $S$ is independent. In particular, we can find a subset with $n+1$ elements in it. This contradicts the Steinitz exchange lemma which says any independent set must have no more elements than any other spanning set.
### Corollary
Any two bases in a finite dimensional vector space have the same number of elements.
## Definition of dimension
The last corollary allows us to define the **dimension** of a finite-dimensional vector space, which is the (unique) number of elements in any basis.
## Vector spaces of functions
For any set $X$ and field $\mathbb{F}$, consider the set $\mathbb{F}^X$ of all functions $X \to \mathbb{F}$. We can define a vector space on $\mathbb{F}^X$ by:
- $(f+g)(x) = f(x) + g(x)$
- $(c \cdot f)(x) = c f(x)$
This is a vector space for essentially the same reason the direct product was: addition of functions is defined component wise, and component-wise addition is commutative, associative, has an additive identity and additive inverses, due to the components belonging to a field. Similarly the scalar multiplication properties hold.
|
nham/math_notes
|
notes/linalg/dim.md
|
Markdown
|
cc0-1.0
| 16,166
|
/*
* Copyright (C) 2010, Sasa Zivkov <sasa.zivkov@sap.com>
* and other copyright owners as documented in the project's IP log.
*
* This program and the accompanying materials are made available
* under the terms of the Eclipse Distribution License v1.0 which
* accompanies this distribution, is reproduced below, and is
* available at http://www.eclipse.org/org/documents/edl-v10.php
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or
* without modification, are permitted provided that the following
* conditions are met:
*
* - Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following
* disclaimer in the documentation and/or other materials provided
* with the distribution.
*
* - Neither the name of the Eclipse Foundation, Inc. nor the
* names of its contributors may be used to endorse or promote
* products derived from this software without specific prior
* written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.jboss.forge.jgit.notes;
import java.io.IOException;
import org.jboss.forge.jgit.lib.ObjectInserter;
import org.jboss.forge.jgit.lib.ObjectReader;
import org.jboss.forge.jgit.notes.Note;
import org.jboss.forge.jgit.notes.NotesMergeConflictException;
/**
* Three-way note merge operation.
* <p>
* This operation takes three versions of a note: base, ours and theirs,
* performs the three-way merge and returns the merge result.
*/
public interface NoteMerger {
/**
* Merges the conflicting note changes.
* <p>
* base, ours and their are all notes on the same object.
*
* @param base
* version of the Note
* @param ours
* version of the Note
* @param their
* version of the Note
* @param reader
* the object reader that must be used to read Git objects
* @param inserter
* the object inserter that must be used to insert Git objects
* @return the merge result
* @throws NotesMergeConflictException
* in case there was a merge conflict which this note merger
* couldn't resolve
* @throws IOException
* in case the reader or the inserter would throw an IOException
* the implementor will most likely want to propagate it as it
* can't do much to recover from it
*/
Note merge(Note base, Note ours, Note their, ObjectReader reader,
ObjectInserter inserter) throws NotesMergeConflictException,
IOException;
}
|
forge/plugin-undo
|
src/main/jgit/org/jboss/forge/jgit/notes/NoteMerger.java
|
Java
|
epl-1.0
| 3,451
|
/*
* Copyright (c) 2012-2018 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/
package org.eclipse.che.core.internal.resources.mapping;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IMarkerDelta;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceDelta;
import org.eclipse.core.resources.IResourceDeltaVisitor;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.PlatformObject;
/** Concrete implementation of IResourceDelta used for operation validation */
public final class ProposedResourceDelta extends PlatformObject implements IResourceDelta {
protected static int KIND_MASK = 0xFF;
private HashMap<String, ProposedResourceDelta> children =
new HashMap<String, ProposedResourceDelta>(8);
private IPath movedFromPath;
private IPath movedToPath;
private IResource resource;
private int status;
public ProposedResourceDelta(IResource resource) {
this.resource = resource;
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#accept(org.eclipse.core.resources.IResourceDeltaVisitor)
*/
public void accept(IResourceDeltaVisitor visitor) throws CoreException {
accept(visitor, 0);
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#accept(org.eclipse.core.resources.IResourceDeltaVisitor, boolean)
*/
public void accept(IResourceDeltaVisitor visitor, boolean includePhantoms) throws CoreException {
accept(visitor, includePhantoms ? IContainer.INCLUDE_PHANTOMS : 0);
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#accept(org.eclipse.core.resources.IResourceDeltaVisitor, int)
*/
public void accept(IResourceDeltaVisitor visitor, int memberFlags) throws CoreException {
if (!visitor.visit(this)) return;
for (Iterator<ProposedResourceDelta> iter = children.values().iterator(); iter.hasNext(); ) {
ProposedResourceDelta childDelta = iter.next();
childDelta.accept(visitor, memberFlags);
}
}
/**
* Adds a child delta to the list of children for this delta node.
*
* @param delta
*/
protected void add(ProposedResourceDelta delta) {
if (children.size() == 0 && status == 0) setKind(IResourceDelta.CHANGED);
children.put(delta.getResource().getName(), delta);
}
/**
* Adds the given flags to this delta.
*
* @param flags The flags to add
*/
protected void addFlags(int flags) {
// make sure the provided flags don't influence the kind
this.status |= (flags & ~KIND_MASK);
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#findMember(org.eclipse.core.runtime.IPath)
*/
public IResourceDelta findMember(IPath path) {
int segmentCount = path.segmentCount();
if (segmentCount == 0) return this;
// iterate over the path and find matching child delta
ProposedResourceDelta current = this;
for (int i = 0; i < segmentCount; i++) {
current = current.children.get(path.segment(i));
if (current == null) return null;
}
return current;
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getAffectedChildren()
*/
public IResourceDelta[] getAffectedChildren() {
return getAffectedChildren(ADDED | REMOVED | CHANGED, IResource.NONE);
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getAffectedChildren(int)
*/
public IResourceDelta[] getAffectedChildren(int kindMask) {
return getAffectedChildren(kindMask, IResource.NONE);
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getAffectedChildren(int, int)
*/
public IResourceDelta[] getAffectedChildren(int kindMask, int memberFlags) {
List<ProposedResourceDelta> result = new ArrayList<ProposedResourceDelta>();
for (Iterator<ProposedResourceDelta> iter = children.values().iterator(); iter.hasNext(); ) {
ProposedResourceDelta child = iter.next();
if ((child.getKind() & kindMask) != 0) result.add(child);
}
return result.toArray(new IResourceDelta[result.size()]);
}
/**
* Returns the child delta corresponding to the given child resource name, or <code>null</code>.
*/
ProposedResourceDelta getChild(String name) {
return children.get(name);
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getFlags()
*/
public int getFlags() {
return status & ~KIND_MASK;
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getFullPath()
*/
public IPath getFullPath() {
return getResource().getFullPath();
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getKind()
*/
public int getKind() {
return status & KIND_MASK;
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getMarkerDeltas()
*/
public IMarkerDelta[] getMarkerDeltas() {
return new IMarkerDelta[0];
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getMovedFromPath()
*/
public IPath getMovedFromPath() {
return movedFromPath;
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getMovedToPath()
*/
public IPath getMovedToPath() {
return movedToPath;
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getProjectRelativePath()
*/
public IPath getProjectRelativePath() {
return getResource().getProjectRelativePath();
}
/* (non-Javadoc)
* @see org.eclipse.core.resources.IResourceDelta#getResource()
*/
public IResource getResource() {
return resource;
}
public void setFlags(int flags) {
status = getKind() | (flags & ~KIND_MASK);
}
protected void setKind(int kind) {
status = getFlags() | (kind & KIND_MASK);
}
protected void setMovedFromPath(IPath path) {
movedFromPath = path;
}
protected void setMovedToPath(IPath path) {
movedToPath = path;
}
/** For debugging purposes only. */
@Override
public String toString() {
return "ProposedDelta(" + resource + ')'; // $NON-NLS-1$
}
}
|
sleshchenko/che
|
plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-core-resources/src/main/java/org/eclipse/che/core/internal/resources/mapping/ProposedResourceDelta.java
|
Java
|
epl-1.0
| 6,526
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>XSSFImportFromXML (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="XSSFImportFromXML (POI API Documentation)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/XSSFImportFromXML.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/xssf/extractor/XSSFExportToXml.html" title="class in org.apache.poi.xssf.extractor"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/xssf/extractor/XSSFImportFromXML.html" target="_top">Frames</a></li>
<li><a href="XSSFImportFromXML.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.poi.xssf.extractor</div>
<h2 title="Class XSSFImportFromXML" class="title">Class XSSFImportFromXML</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.apache.poi.xssf.extractor.XSSFImportFromXML</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">XSSFImportFromXML</span>
extends java.lang.Object</pre>
<div class="block">Imports data from an external XML to an XLSX according to one of the mappings
defined.The output XML Schema must respect this limitations:
<ul>
<li>the input XML must be valid according to the XML Schema used in the mapping</li>
<li>denormalized table mapping is not supported (see OpenOffice part 4: chapter 3.5.1.7)</li>
<li>all the namespaces used in the document must be declared in the root node</li>
</ul></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/poi/xssf/extractor/XSSFImportFromXML.html#XSSFImportFromXML(org.apache.poi.xssf.usermodel.XSSFMap)">XSSFImportFromXML</a></strong>(<a href="../../../../../org/apache/poi/xssf/usermodel/XSSFMap.html" title="class in org.apache.poi.xssf.usermodel">XSSFMap</a> map)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/poi/xssf/extractor/XSSFImportFromXML.html#importFromXML(java.lang.String)">importFromXML</a></strong>(java.lang.String xmlInputString)</code>
<div class="block">Imports an XML into the XLSX using the Custom XML mapping defined</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="XSSFImportFromXML(org.apache.poi.xssf.usermodel.XSSFMap)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>XSSFImportFromXML</h4>
<pre>public XSSFImportFromXML(<a href="../../../../../org/apache/poi/xssf/usermodel/XSSFMap.html" title="class in org.apache.poi.xssf.usermodel">XSSFMap</a> map)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="importFromXML(java.lang.String)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>importFromXML</h4>
<pre>public void importFromXML(java.lang.String xmlInputString)
throws org.xml.sax.SAXException,
javax.xml.xpath.XPathExpressionException,
java.io.IOException</pre>
<div class="block">Imports an XML into the XLSX using the Custom XML mapping defined</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>xmlInputString</code> - the XML to import</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>org.xml.sax.SAXException</code> - if error occurs during XML parsing</dd>
<dd><code>javax.xml.xpath.XPathExpressionException</code> - if error occurs during XML navigation</dd>
<dd><code>javax.xml.parsers.ParserConfigurationException</code> - if there are problems with XML parser configuration</dd>
<dd><code>java.io.IOException</code> - if there are problems reading the input string</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/XSSFImportFromXML.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/poi/xssf/extractor/XSSFExportToXml.html" title="class in org.apache.poi.xssf.extractor"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/xssf/extractor/XSSFImportFromXML.html" target="_top">Frames</a></li>
<li><a href="XSSFImportFromXML.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<i>Copyright 2016 The Apache Software Foundation or
its licensors, as applicable.</i>
</small></p>
</body>
</html>
|
tommylsh/test20170719
|
Desktop/tool/poi-bin-3.15-20160924/poi-3.15/docs/apidocs/org/apache/poi/xssf/extractor/XSSFImportFromXML.html
|
HTML
|
epl-1.0
| 10,034
|
package pt.uminho.haslab.echo.util;
/**
* Created with IntelliJ IDEA.
* User: tmg
* Date: 12/18/13
* Time: 6:13 PM
*/
public class Pair<L,R> {
// TODO: methods like hashcode, they are not needed now, but they might be in the future!
public final L left;
public final R right;
public Pair(L left, R right) {
this.left = left;
this.right = right;
}
public boolean equals(Pair p2){
return this.left.equals(p2.left) && this.right.equals(p2.right);
}
@Override
public String toString(){
return "{" + left.toString() + " , " + right.toString() + "}";
}
@Override
public boolean equals(Object o)
{
return this == o || o instanceof Pair && equals((Pair) o);
}
}
|
haslab/echo
|
plugins/pt.uminho.haslab.echo/src/pt/uminho/haslab/echo/util/Pair.java
|
Java
|
epl-1.0
| 767
|
package net.trajano.jee.domain.dao;
import java.io.InputStream;
public interface LobDAO {
/**
* This may return <code>null</code>.
*
* @param name
* name of the lob.
* @return input stream for the lob data.
*/
InputStream getInputStream(String name);
/**
* Removes the entry.
*
* @param name
* name
*/
void remove(String name);
/**
* Sets the value for the lob data.
*
* @param name
* id for the lob.
* @param is
* input stream for the data
*/
void update(String name,
InputStream is);
}
|
trajano/jee
|
jee-domain-api/src/main/java/net/trajano/jee/domain/dao/LobDAO.java
|
Java
|
epl-1.0
| 659
|
/*******************************************************************************
* Copyright (c) 1998, 2013 Oracle and/or its affiliates. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0
* which accompanies this distribution.
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* Contributors:
* Oracle - initial API and implementation from Oracle TopLink
******************************************************************************/
package org.eclipse.persistence.internal.sessions.factories.model.pool;
/**
* INTERNAL:
*/
public class ReadConnectionPoolConfig extends ConnectionPoolConfig {
private boolean m_exclusive;
public ReadConnectionPoolConfig() {
super();
}
public void setExclusive(boolean exclusive) {
m_exclusive = exclusive;
}
public boolean getExclusive() {
return m_exclusive;
}
}
|
bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs
|
foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/internal/sessions/factories/model/pool/ReadConnectionPoolConfig.java
|
Java
|
epl-1.0
| 1,188
|
\documentclass{article}
\begin{document}
\input{../gen/table.tex}
\end{document}
|
jesusc/anatlyzer
|
doc/anatlyzer.doc.generator/test/testdoc.tex
|
TeX
|
epl-1.0
| 82
|
package bds.devweb.dao;
import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Time;
import java.util.ArrayList;
import java.util.List;
import bds.devweb.model.Adresse;
import bds.devweb.model.Challenge;
public class ChallengeDao {
public Challenge getLastChallenge(String nom_challenge){
Challenge challenge = null;
try {
Connection connection = DataSourceProvider.getDataSource().getConnection();
//Utiliser la connexion
PreparedStatement stmt = connection.prepareStatement("SELECT challenge.*, adresse.* FROM challenge INNER JOIN adresse ON challenge.id_adresse = adresse.id_adr WHERE challenge.nom_challenge = ? ORDER BY challenge.date_challenge DESC LIMIT 1");
stmt.setString(1, nom_challenge);
ResultSet results = stmt.executeQuery();
if(results.next()){
challenge = new Challenge(
results.getString("challenge.id_challenge"),
results.getString("challenge.nom_challenge"),
results.getDate("challenge.date_challenge"),
results.getTime("challenge.heure_challenge"),
results.getString("challenge.description_challenge"),
results.getString("challenge.id_adresse"));
challenge.setAdresse(new Adresse(results.getString("adresse.id_adr"),results.getString("adresse.site_adr"),results.getString("adresse.num_adr"),results.getString("adresse.rue_adr"),results.getString("adresse.cp_adr"),results.getString("adresse.ville_adr"),results.getString("adresse.pays_adr")));
}
//Fermer la connexion
results.close();
stmt.close();
connection.close();
}
catch (SQLException e){
e.printStackTrace();
}
return challenge;
}
public void modifierChallenge(Challenge challenge){
try {
Connection connection = DataSourceProvider.getDataSource().getConnection();
//Utiliser la connexion
PreparedStatement stmt = connection.prepareStatement("UPDATE challenge SET date_challenge = ?, heure_challenge = ?, description_challenge = ?, id_adresse = ? WHERE id_challenge = ?");
stmt.setDate(1, new Date(challenge.getDate_challenge().getTime()));
stmt.setTime(2, new Time(challenge.getHeure_challenge().getTime()));
stmt.setString(3, challenge.getDescription_challenge());
stmt.setString(4, challenge.getId_adrChal());
stmt.setString(5, challenge.getId_challenge());
stmt.executeUpdate();
//Fermer la connexion
stmt.close();
connection.close();
}
catch (SQLException e){
e.printStackTrace();
}
}
public Challenge getChallenge(String id_challenge){
Challenge challenge = null;
try {
Connection connection = DataSourceProvider.getDataSource().getConnection();
//Utiliser la connexion
PreparedStatement stmt = connection.prepareStatement("SELECT challenge.*, adresse.* FROM challenge INNER JOIN adresse ON challenge.id_adresse = adresse.id_adr WHERE challenge.id_challenge = ?");
stmt.setString(1, id_challenge);
ResultSet results = stmt.executeQuery();
if(results.next()){
challenge = new Challenge(
results.getString("challenge.id_challenge"),
results.getString("challenge.nom_challenge"),
results.getDate("challenge.date_challenge"),
results.getTime("challenge.heure_challenge"),
results.getString("challenge.description_challenge"),
results.getString("challenge.id_adresse"));
challenge.setAdresse(new Adresse(results.getString("adresse.id_adr"),results.getString("adresse.site_adr"),results.getString("adresse.num_adr"),results.getString("adresse.rue_adr"),results.getString("adresse.cp_adr"),results.getString("adresse.ville_adr"),results.getString("adresse.pays_adr")));
}
//Fermer la connexion
results.close();
stmt.close();
connection.close();
}
catch (SQLException e){
e.printStackTrace();
}
return challenge;
}
public List<Challenge> listerChallenge(){
List<Challenge> listeChallenge = new ArrayList<Challenge>();
try {
Connection connection = DataSourceProvider.getDataSource().getConnection();
//Utiliser la connexion
PreparedStatement stmt = connection.prepareStatement("SELECT challenge.*, adresse.* FROM challenge INNER JOIN adresse ON challenge.id_adresse = adresse.id_adr ORDER BY challenge.date_challenge DESC");
ResultSet results = stmt.executeQuery();
while(results.next()){
Challenge challenge = new Challenge(
results.getString("challenge.id_challenge"),
results.getString("challenge.nom_challenge"),
results.getDate("challenge.date_challenge"),
results.getTime("challenge.heure_challenge"),
results.getString("challenge.description_challenge"),
results.getString("challenge.id_adresse"));
challenge.setAdresse(new Adresse(results.getString("adresse.id_adr"),results.getString("adresse.site_adr"),results.getString("adresse.num_adr"),results.getString("adresse.rue_adr"),results.getString("adresse.cp_adr"),results.getString("adresse.ville_adr"),results.getString("adresse.pays_adr")));
listeChallenge.add(challenge);
}
//Fermer la connexion
results.close();
stmt.close();
connection.close();
}
catch (SQLException e){
e.printStackTrace();
}
return listeChallenge;
}
public List<Challenge> listerTypeChallenge(){
List<Challenge> listeTypeChallenge = new ArrayList<Challenge>();
try {
Connection connection = DataSourceProvider.getDataSource().getConnection();
//Utiliser la connexion
PreparedStatement stmt = connection.prepareStatement("SELECT challenge.* FROM challenge GROUP BY challenge.nom_challenge");
ResultSet results = stmt.executeQuery();
while(results.next()){
Challenge challenge = new Challenge(
results.getString("challenge.id_challenge"),
results.getString("challenge.nom_challenge"),
results.getDate("challenge.date_challenge"),
results.getTime("challenge.heure_challenge"),
results.getString("challenge.description_challenge"),
results.getString("challenge.id_adresse"));
listeTypeChallenge.add(challenge);
}
//Fermer la connexion
results.close();
stmt.close();
connection.close();
}
catch (SQLException e){
e.printStackTrace();
}
return listeTypeChallenge;
}
public void ajouterChallenge (Challenge challenge){
try {
Connection connection = DataSourceProvider.getDataSource().getConnection();
// Utiliser la connexion
PreparedStatement stmt = connection.prepareStatement("INSERT INTO challenge (id_challenge, nom_challenge, date_challenge, heure_challenge, description_challenge, id_adresse) VALUES (?, ?, ?, ?, ?, ?)");
stmt.setString(1, challenge.getId_challenge());
stmt.setString(2, challenge.getNom_challenge());
stmt.setDate(3, new Date(challenge.getDate_challenge().getTime()));
stmt.setTime(4, new Time(challenge.getHeure_challenge().getTime()));
stmt.setString(5, challenge.getDescription_challenge());
stmt.setString(6, challenge.getId_adrChal());
stmt.executeUpdate();
// Fermer la connexion
stmt.close();
connection.close();
}catch (SQLException e) {
e.printStackTrace();
}
}
public void supprimerChallenge (String id_challenge){
try {
Connection connection = DataSourceProvider.getDataSource().getConnection();
//Utiliser la connexion
PreparedStatement stmt = connection.prepareStatement("DELETE FROM challenge WHERE id_challenge = ?");
stmt.setString(1, id_challenge);
stmt.executeUpdate();
stmt.close();
//Fermer la connexion
connection.close();
}
catch (SQLException e){
e.printStackTrace();
}
}
}
|
gaetanregaud/Projet_BDS
|
projet/src/main/java/bds/devweb/dao/ChallengeDao.java
|
Java
|
epl-1.0
| 7,553
|
package com.intuit.tank.harness.test.data;
/*
* #%L
* Intuit Tank Agent (apiharness)
* %%
* Copyright (C) 2011 - 2015 Intuit Inc.
* %%
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
* #L%
*/
import org.junit.*;
import com.intuit.tank.harness.test.data.ValidationItem;
import static org.junit.Assert.*;
/**
* The class <code>ValidationItemTest</code> contains tests for the class <code>{@link ValidationItem}</code>.
*
* @generatedBy CodePro at 9/3/14 9:21 PM
*/
public class ValidationItemTest {
/**
* Run the ValidationItem(String,String,String) constructor test.
*
* @throws Exception
*
* @generatedBy CodePro at 9/3/14 9:21 PM
*/
@Test
public void testValidationItem_1()
throws Exception {
String name = "";
String value = "";
String condition = "";
ValidationItem result = new ValidationItem(name, value, condition);
// An unexpected exception was thrown in user code while executing this test:
// java.lang.ExceptionInInitializerError
// at org.apache.log4j.LogManager.getLogger(Logger.java:117)
// at com.intuit.tank.harness.test.data.DataItem.<clinit>(DataItem.java:7)
assertNotNull(result);
}
/**
* Run the String getCondition() method test.
*
* @throws Exception
*
* @generatedBy CodePro at 9/3/14 9:21 PM
*/
@Test
public void testGetCondition_1()
throws Exception {
ValidationItem fixture = new ValidationItem("", "", "");
String result = fixture.getCondition();
// An unexpected exception was thrown in user code while executing this test:
// java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.harness.test.data.ValidationItem
assertNotNull(result);
}
/**
* Run the String toString() method test.
*
* @throws Exception
*
* @generatedBy CodePro at 9/3/14 9:21 PM
*/
@Test
public void testToString_1()
throws Exception {
ValidationItem fixture = new ValidationItem("", "", "");
String result = fixture.toString();
// An unexpected exception was thrown in user code while executing this test:
// java.lang.NoClassDefFoundError: Could not initialize class com.intuit.tank.harness.test.data.ValidationItem
assertNotNull(result);
}
}
|
kevinmcgoldrick/Tank
|
agent/apiharness/src/test/java/com/intuit/tank/harness/test/data/ValidationItemTest.java
|
Java
|
epl-1.0
| 2,618
|
# com.7theta/elastica
[](https://clojars.org/com.7theta/elastica)
[](https://circleci.com/gh/7theta/elastica)
[](https://jarkeeper.com/7theta/elastica)
A high performance elasticsearch library that supports an asynchronous
interface in addition to the synchronous interface.
The library has been designed around Elasticsearch >= 2.0
## Contributing
Unfortunately pull requests are not being accepted at this time, but
please feel free to submit bug reports and requests by raising issues.
## Copyright and License
Copyright © 2015, 2016, 2017, 2018, 2019, 2020 7theta
Distributed under the Eclipse Public License.
|
7theta/elastica
|
README.md
|
Markdown
|
epl-1.0
| 840
|
/*******************************************************************************
* Copyright (c) 2008-2011 Chair for Applied Software Engineering,
* Technische Universitaet Muenchen.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Otto von Wesendonk - initial API and implementation
******************************************************************************/
package org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.conflict.conflicts;
// BEGIN COMPLEX CODE
//
import static org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.util.DecisionUtil.getClassAndName;
import java.text.MessageFormat;
import java.util.List;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.DecisionManager;
import org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.conflict.ConflictDescription;
import org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.conflict.ConflictOption;
import org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.conflict.ConflictOption.OptionType;
import org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.conflict.VisualConflict;
import org.eclipse.emf.emfstore.internal.client.model.changeTracking.merging.util.DecisionUtil;
import org.eclipse.emf.emfstore.internal.server.conflictDetection.ConflictBucket;
import org.eclipse.emf.emfstore.internal.server.model.versioning.operations.MultiReferenceOperation;
import org.eclipse.emf.emfstore.internal.server.model.versioning.operations.MultiReferenceSetOperation;
public class MultiReferenceSetConflict extends VisualConflict {
private static final String MULTIREF_GIF = "multiref.gif"; //$NON-NLS-1$
private static final String OTHER_CONTAINER_KEY = "othercontainer"; //$NON-NLS-1$
private static final String TARGET_KEY = "target"; //$NON-NLS-1$
private static final String MULTIREFERENCE_SET_CONFLICT_MY_KEY = "multireferencesetconflict.my"; //$NON-NLS-1$
private static final String MULTIREFERENCE_SET_CONFLICT_THEIR_KEY = "multireferencesetconflict.their"; //$NON-NLS-1$
private static final String MULTIREFERENCE_SET_CONFLICT_CONTAINMENT_KEY = "multireferencesetconflict.containment"; //$NON-NLS-1$
private final boolean containmentConflict;
/**
* Default constructor.
*
* @param decisionManager {@link DecisionManager}
* @param myMultiRef is my multireference
*/
public MultiReferenceSetConflict(ConflictBucket conf, DecisionManager decisionManager,
boolean myMultiRef) {
super(conf, decisionManager, myMultiRef, false);
containmentConflict = ((MultiReferenceOperation) getLeftOperation()).isAdd()
&& !getLeftOperation().getModelElementId().equals(getRightOperation().getModelElementId());
init();
}
/**
* LEFT MultiRef, Right MultiRefSet
*/
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.emfstore.internal.client.VisualConflict.dialogs.merge.conflict.Conflict#initConflictDescription()
*/
@Override
protected ConflictDescription initConflictDescription(ConflictDescription description) {
if (containmentConflict) {
description.setDescription(DecisionUtil.getDescription(MULTIREFERENCE_SET_CONFLICT_CONTAINMENT_KEY,
getDecisionManager().isBranchMerge()));
} else if (isLeftMy()) {
description.setDescription(DecisionUtil.getDescription(MULTIREFERENCE_SET_CONFLICT_MY_KEY,
getDecisionManager()
.isBranchMerge()));
} else {
description.setDescription(DecisionUtil.getDescription(MULTIREFERENCE_SET_CONFLICT_THEIR_KEY,
getDecisionManager().isBranchMerge()));
}
description.add(TARGET_KEY, isLeftMy() ? getMyOperation(MultiReferenceOperation.class)
.getReferencedModelElements().get(0) : getMyOperation(MultiReferenceSetOperation.class).getNewValue());
description.add(OTHER_CONTAINER_KEY, getLeftOperation().getModelElementId());
description.setImage(MULTIREF_GIF);
return description;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.emfstore.internal.client.VisualConflict.dialogs.merge.conflict.Conflict#initConflictOptions(java.util.List)
*/
@Override
protected void initConflictOptions(List<ConflictOption> options) {
final ConflictOption myOption = new ConflictOption(StringUtils.EMPTY, OptionType.MyOperation);
myOption.addOperations(getMyOperations());
final ConflictOption theirOption = new ConflictOption(StringUtils.EMPTY, OptionType.TheirOperation);
theirOption.addOperations(getTheirOperations());
if (containmentConflict) {
final EObject target = getDecisionManager().getModelElement(
((MultiReferenceOperation) getLeftOperation()).getReferencedModelElements().get(0));
myOption.setOptionLabel(MessageFormat.format(
Messages.MultiReference_Move_To,
getClassAndName(target),
getClassAndName(getDecisionManager().getModelElement(getMyOperation().getModelElementId()))));
theirOption.setOptionLabel(MessageFormat.format(
Messages.MultiReference_Move_To,
getClassAndName(target),
getClassAndName(getDecisionManager().getModelElement(getTheirOperation().getModelElementId()))));
} else if (isLeftMy()) {
final EObject target = getDecisionManager().getModelElement(
getMyOperation(MultiReferenceOperation.class).getReferencedModelElements().get(0));
myOption.setOptionLabel(Messages.MultiReferenceSetConflict_Remove + DecisionUtil.getClassAndName(target));
theirOption.setOptionLabel(Messages.MultiReferenceSetConflict_Set + DecisionUtil.getClassAndName(target));
} else {
final EObject target = getDecisionManager().getModelElement(
getTheirOperation(MultiReferenceOperation.class).getReferencedModelElements().get(0));
myOption.setOptionLabel(Messages.MultiReferenceSetConflict_Set + DecisionUtil.getClassAndName(target));
theirOption
.setOptionLabel(Messages.MultiReferenceSetConflict_Remove + DecisionUtil.getClassAndName(target));
}
options.add(myOption);
options.add(theirOption);
}
}
|
edgarmueller/emfstore-rest
|
bundles/org.eclipse.emf.emfstore.client/src/org/eclipse/emf/emfstore/internal/client/model/changeTracking/merging/conflict/conflicts/MultiReferenceSetConflict.java
|
Java
|
epl-1.0
| 6,348
|
/**
* Copyright (c) 2010-2018 by the respective copyright holders.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.openhab.binding.nikobus.internal.core;
/**
* NikobusCommand. Represents a (repeated) serial command which was sent to the
* bus or received from the bus.
*
* @author Davy Vanherbergen
* @since 1.3.0
*/
public class NikobusCommand {
public static int MAX_REPEAT = 25;
private String command;
private int repeats = 1;
private long timeout = 100;
private String ack;
private boolean waitForSilence;
private int maxRetryCount = 1;
private boolean allowDuplicates;
private int sentCount;
/**
* Create new command.
*
* @param command
* with CR.
*/
public NikobusCommand(String command) {
this.command = command.toUpperCase();
}
/**
* Create new command.
*
* @param command
* with CR.
* @param ack
* expected ACK to be received after sending command
* @param timeout
* in milliseconds to wait for ACK to be received
*/
public NikobusCommand(String command, String ack, long timeout) {
this.command = command;
this.ack = ack;
this.timeout = timeout;
}
/**
* Create new command.
*
* @param command
* with CR.
* @param repeats
* number of times a command is to be repeated to mimic long
* button presses
*/
public NikobusCommand(String command, int repeats) {
this.command = command;
this.repeats = repeats;
}
/**
* Increment the number of times this command was repeated.
*/
public void incrementCount() {
repeats++;
}
/**
* @return command string with CR
*/
public String getCommand() {
return command;
}
/**
* @return number of times command was or should be repeated
*/
public int getRepeats() {
return repeats;
}
/**
* @return ACK to wait for or null if no ACK is expected
*/
public String getAck() {
return ack;
}
/**
* @return timeout in milliseconds to wait for ACK before throwing a
* TimeoutException.
*/
public long getTimeout() {
return timeout;
}
@Override
public String toString() {
return "NikobusCommand [command=" + command + ", repeats=" + repeats + "]";
}
/**
* @return true if the command represents a button press
*/
public boolean isButtonPress() {
return command != null && command.startsWith("#");
}
/**
* Set the nikobus command string without CR
*
* @param command
* string
*/
public void setCommand(String commandString) {
command = commandString.toUpperCase();
}
@Override
public boolean equals(Object obj) {
if (obj == null || !(obj instanceof NikobusCommand)) {
return false;
}
return command.equals(((NikobusCommand) obj).getCommand());
}
@Override
public int hashCode() {
return command.hashCode();
}
/**
* When true, the command sender will wait until there is no signal on the
* bus before sending the command.
*
* @param wait
* true if we should wait.
*/
public void setWaitForSilence(boolean wait) {
waitForSilence = wait;
}
/**
* @return true if bus should be clear before command is sent.
*/
public boolean getWaitForSilence() {
return waitForSilence;
}
/**
* @return number of times the command may be retransmitted if no ACK was
* received within the specified timeout.
*/
public int getMaxRetryCount() {
return maxRetryCount;
}
/**
* @param maxRetryCount
* number of times the command may be retransmitted if no ACK was
* received within the specified timeout.
*/
public void setMaxRetryCount(int maxRetryCount) {
this.maxRetryCount = maxRetryCount;
}
/**
* @return true when the command can be sent multiple times to the nikobus
*/
public boolean getAllowDuplicates() {
return allowDuplicates;
}
/**
* When no duplicates are allowed, the same command cannot be queued for
* sending when a similar command is already in the to send queue.
*
* @param allowDuplicates
* true to allow.
*/
public void setAllowDuplicates(boolean allowDuplicates) {
this.allowDuplicates = allowDuplicates;
}
/**
* @return number of times the message was sent.
*/
public int getSentCount() {
return sentCount;
}
public void incrementSentCount() {
sentCount++;
}
}
|
falkena/openhab
|
bundles/binding/org.openhab.binding.nikobus/src/main/java/org/openhab/binding/nikobus/internal/core/NikobusCommand.java
|
Java
|
epl-1.0
| 5,126
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>NSIS Modern User Interface - Documentation</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<style type="text/css">
/*<![CDATA[*/body
{
padding: 10px;
background-color: #F0F0F0;
font-size: 13px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-weight: normal;
text-align: justify;
}
p, li
{
font-size: 13px;
}
table
{
margin: auto;
background-color: #FFFFFF;
}
.maintable
{
border: 2px solid #376EAB;
}
.parameter
{
font-weight: bold;
color: #6586AC;
}
h1
{
font-size: 20px;
color: #7A7272;
font-weight: normal;
}
h2
{
font-size: 17px;
font-weight: bold;
color: #303030;
}
h3
{
font-size: 14px;
font-weight: bold;
color: #2B5885;
}
pre
{
font-size: 13px;
}
div
{
margin: 20px;
}
div.settings
{
margin-right: 0;
}
a:link, a:visited, a:active
{
color: #294F75;
text-decoration: none;
}
a:hover
{
color: #182634;
text-decoration: underline;
}
.trigger
{
cursor: pointer;
cursor: hand;
height: 14px;
}
.toggle
{
display: none;
}
.options
{
text-align: center;
cursor: pointer;
cursor: hand;
color: #294F75;
}
/*]]>*/</style>
<script type="text/javascript">
//<![CDATA[
var image_open = new Image();
image_open.src = "images/open.gif";
var image_closed = new Image();
image_closed.src = "images/closed.gif";
function toggle(image, section) {
if(document.all) {
if(document.all[section].style.display == "block") {
document.all[section].style.display = "none";
document.all[image].src = image_closed.src;
}
else
{
document.all[section].style.display = "block";
document.all[image].src = image_open.src;
}
}
else
{
if(document.getElementById(section).style.display == "block") {
document.getElementById(section).style.display = "none";
document.getElementById(image).src = image_closed.src;
}
else
{
document.getElementById(section).style.display = "block";
document.getElementById(image).src = image_open.src;
}
}
}
function expandall() {
var divNodeList = document.getElementsByTagName('div');
for (i = 0; i < divNodeList.length; i++) {
if(divNodeList[i].id) {
divNodeList[i].style.display = "block";
document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/open.gif";
}
}
}
function collapseall() {
var divNodeList = document.getElementsByTagName('div');
for (i = 0; i < divNodeList.length; i++) {
if(divNodeList[i].id) {
divNodeList[i].style.display = "none";
document.getElementById('trigger_' + divNodeList[i].id.substr(7)).src = "images/closed.gif";
}
}
}
//]]>
</script>
</head>
<body>
<table width="750" class="maintable" cellspacing="0" cellpadding="0" align="center">
<tr>
<td>
<img src="images/header.gif" width="750" height="80" alt="" />
<p class="options">
<a onclick="expandall()">[Expand all]</a> <a onclick="collapseall()">[Collapse
all]</a></p>
<div>
<h1>
Introduction</h1>
<div>
<p>
The Modern UI provides a user interface for NSIS installers with a modern wizard
style, similar to the wizards of recent Windows versions. It is based on the basic
user interface that is provided by the NSIS compiler itself and extends it with
more interface features and pages.</p>
<p>
All standard NSIS pages (such as the pages to select components and the installation
folder) are supported as well as a number of additional pages. The welcome page
allows you to provide an introduction to the installation process, while the finish
page provides a way to let the user decide what steps should be performed after
the setup wizard is closed (for example, whether the application should be started
immediately). A finish page can also be used to ask for a system restart is necessary.</p>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_scr" src="images/closed.gif"
onclick="toggle('trigger_scr', 'toggle_scr');" />
Screenshots</h3>
<div class="toggle" id="toggle_scr">
<p>
<img src="images/screen1.png" width="503" height="393" alt="" /></p>
<p>
<img src="images/screen2.png" width="503" height="393" alt="" /></p>
</div>
</div>
<h1>
Modern UI 2.0</h1>
<div>
<p>
This new version makes it easier to customize pages, because the same method can
be used to change standard NSIS pages as well as additional pages provided
by the Modern UI. It is now also possible for other NSIS plug-ins to add new pages
to the Modern UI. You can expect to see examples of this soon.</p>
<p>
The welcome and finish page are no longer implemented using InstallOptions. Instead,
the new nsDialogs plug-in is used. nsDialogs allows you to create custom pages or
customize existing pages directly from the script.</p>
<p>
To upgrade a Modern UI 1.8 script, you should:</p>
<ul>
<li>Insert the MUI2.nsh header file instead of MUI.nsh.</li>
<li>The macros for InstallOptions have been moved to a separate header file unrelated
to the Modern UI. If you are still using InstallOptions for custom pages, insert
InstallOptions.nsh and use the INSTALLOPTIONS_* macros instead of the MUI_INSTALLOPTIONS_*
macros. The macros themselves have remained the same.</li>
<li>Rewrite customization code for the Modern UI 1.8 welcome and finish pages in which
the InstallOptions INI file is used. nsDialogs commands should be used instead.</li>
<li>Use the standard NSIS method to escape special characters in all texts. For example,
$\r$\n creates newline.</li>
</ul>
</div>
<h1>
Script header</h1>
<div>
<p>
The settings for the Modern UI should be inserted in the header of the script file.
It's important to follow the same order as the items below. For example,
interface settings should be defined before you insert pages, because the pages
depend on the interface configuration. It may be useful to look at the <a href="#examples">
example scripts</a> too see how this is done in actual script files.</p>
<p>
Parameters are given in this format: <span class="parameter">required (option1 | option2)
[optional]</span></p>
</div>
<h2>
1. Header file</h2>
<div>
<p>
First of all, add this line to the top of script to include the Modern UI:</p>
<pre>
!include MUI2.nsh
</pre>
</div>
<h2>
2. Interface configuration</h2>
<div>
<p>
Then, you may want to use interface settings to change the look and feel of the
installer. These settings apply to all pages.<p>
The interface settings provided by the NSIS compiler itself (such as LicenseText,
Icon, CheckBitmap, InstallColors) should not be used in Modern UI scripts. The Modern
UI provides equalivent or extended versions of these settings.<p>
Examples:</p>
<pre>
!define MUI_COMPONENTSPAGE_SMALLDESC ;No value
!define MUI_UI "myUI.exe" ;Value
!define MUI_INSTFILESPAGE_COLORS "FFFFFF 000000" ;Two colors
</pre>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_in" src="images/closed.gif"
onclick="toggle('trigger_in', 'toggle_in');" />
Interface settings</h3>
<div class="toggle" id="toggle_in">
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_ingen" src="images/closed.gif"
onclick="toggle('trigger_ingen', 'toggle_ingen');" />
Page header</h3>
<div class="toggle" id="toggle_ingen">
<p>
<strong>MUI_ICON</strong> <span class="parameter">icon_file</span><br />
The icon for the installer.<br />
<em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico</em></p>
<p>
<strong>MUI_UNICON</strong> <span class="parameter">icon_file</span><br />
The icon for the uninstaller.<br />
<em>Default: ${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico</em></p>
<p>
<strong>MUI_HEADERIMAGE</strong><br />
Display an image on the header of the page.</p>
<div class="settings">
<p>
<strong>MUI_HEADERIMAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
Bitmap image to display on the header of installers pages (recommended size: 150x57
pixels).<br />
<em>Default: ${NSISDIR}\Contrib\Graphics\Header\nsis.bmp</em></p>
<div class="settings">
<p>
<strong>MUI_HEADERIMAGE_BITMAP_NOSTRETCH</strong><br />
Do not stretch the installer header bitmap to fit the size of the field. Use this
option only if you have an image that does not use the whole space. If you have
a full size bitmap that fits exactly, you should not use this option because the
size of the field will be different if the user has a custom DPI setting.</p>
<p>
<strong>MUI_HEADERIMAGE_BITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
Bitmap image to display on the header of installers pages when using a RTL language
(recommended size: 150x57 pixels).<br />
<em>Default: Non-RTL bitmap</em></p>
<div class="settings">
<p>
<strong>MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH</strong><br />
Do not stretch the installer header bitmap when using a RTL language to fit the
size of the field. Use this option only if you have an image that does not use the
whole space. If you have a full size bitmap that fits exactly, you should not use
this option because the size of the field will be different if the user has a custom
DPI setting.</p>
</div>
</div>
<p>
<strong>MUI_HEADERIMAGE_UNBITMAP</strong> <span class="parameter">bmp_file</span><br />
Bitmap image to display on the header of uninstaller pages (recommended size: 150x57
pixels).<br />
<em>Default: Installer header bitmap</em></p>
<div class="settings">
<p>
<strong>MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH</strong><br />
Do not stretch the uninstaller header bitmap to fit the size of the field. Use this
option only if you have an image that does not use the whole space. If you have
a full size bitmap that fits exactly, you should not use this option because the
size of the field will be different if the user has a custom DPI setting.</p>
<p>
<strong>MUI_HEADERIMAGE_UNBITMAP_RTL</strong> <span class="parameter">bmp_file</span><br />
Bitmap image to display on the header of uninstallers pages when using a RTL language
(recommended size: 150x57 pixels).<br />
<em>Default: Installer RTL header bitmap</em></p>
<div class="settings">
<p>
<strong>MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH</strong><br />
Do not stretch the uninstaller header bitmap when using a RTL language to fit the
size of the field. Use this option only if you have an image that does not use the
whole space. If you have a full size bitmap that fits exactly, you should not use
this option because the size of the field will be different if the user has a custom
DPI setting.</p>
</div>
</div>
<p>
<strong>MUI_HEADERIMAGE_RIGHT</strong><br />
Display the header image on the right side instead of the left side (when using
a RTL language it will be displayed on the left side instead of the right side).</p>
</div>
<p>
<strong>MUI_BGCOLOR</strong> <span class="parameter">(color: RRGGBBR hexadecimal)</span><br />
Background color for the header, the Welcome page and the Finish page.<br />
<em>Default: FFFFFF</em></p>
<p>
<strong>MUI_HEADER_TRANSPARENT_TEXT</strong><br />
Set a transparent background for the header's label controls. Useful for custom
user interfaces that set a bigger header image.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inres" src="images/closed.gif"
onclick="toggle('trigger_inres', 'toggle_inres');" />
Interface resources</h3>
<div class="toggle" id="toggle_inres">
<p>
<strong>MUI_UI</strong> <span class="parameter">ui_file</span><br />
The interface file with the dialog resources. Change this if you have made your
own customized UI.<br />
<em>Default: ${NSISDIR}\Contrib\UIs\modern.exe</em></p>
<p>
<strong>MUI_UI_HEADERIMAGE</strong> <span class="parameter">ui_file</span><br />
The interface files with the dialog resource IDD_INST that contains a bitmap control
and space for the header bitmap.<br />
<em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmp.exe</em></p>
<p>
<strong>MUI_UI_HEADERIMAGE_RIGHT</strong> <span class="parameter">ui_file</span><br />
The interface files with the dialog resource IDD_INST that contains a bitmap control
and space for the header bitmap on the right side.<br />
<em>Default: ${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe</em></p>
<p>
<strong>MUI_UI_COMPONENTSPAGE_SMALLDESC</strong> <span class="parameter">ui_file</span><br />
The interface files with a customized dialog resource IDD_SELCOM with a small description
area.<br />
<em>Default: ${NSISDIR}\Contrib\UIs\modern_smalldesc.exe</em></p>
<p>
<strong>MUI_UI_COMPONENTSPAGE_NODESC</strong> <span class="parameter">ui_file</span><br />
The interface files with a customized dialog resource IDD_SELCOM without a description
area.<br />
<em>Default: ${NSISDIR}\Contrib\UIs\modern_nodesc.exe</em></p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inwf" src="images/closed.gif"
onclick="toggle('trigger_inwf', 'toggle_inwf');" />
Installer welcome/finish page</h3>
<div class="toggle" id="toggle_inwf">
<p>
<strong>MUI_WELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
<em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
<div class="settings">
<p>
<strong>MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
field. Use this option only if you have an image that does not use the whole space.
If you have a full size bitmap that fits exactly, you should not use this option
because the size of the field will be different if the user has a custom DPI setting.</p>
</div>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inuwf" src="images/closed.gif"
onclick="toggle('trigger_inuwf', 'toggle_inuwf');" />
Uninstaller welcome/finish page</h3>
<div class="toggle" id="toggle_inuwf">
<p>
<strong>MUI_UNWELCOMEFINISHPAGE_BITMAP</strong> <span class="parameter">bmp_file</span><br />
Bitmap for the Welcome page and the Finish page (recommended size: 164x314 pixels).<br />
<em>Default: ${NSISDIR}\Contrib\Graphics\Wizard\win.bmp</em></p>
<div class="settings">
<p>
<strong>MUI_UNWELCOMEFINISHPAGE_BITMAP_NOSTRETCH</strong><br />
Do not stretch the bitmap for the Welcome and Finish page to fit the size of the
field. Use this option only if you have an image that does not use the whole space.
If you have a full size bitmap that fits exactly, you should not use this option
because the size of the field will be different if the user has a custom DPI setting.</p>
</div>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inl" src="images/closed.gif"
onclick="toggle('trigger_inl', 'toggle_inl');" />
License page</h3>
<div class="toggle" id="toggle_inl">
<p>
<strong>MUI_LICENSEPAGE_BGCOLOR</strong> <span class="parameter">(/windows | /grey |
(color: RRGGBB hexadecimal))</span><br />
The background color for the license textbox. Use /windows for the Windows text
background color (usually white). Use the /grey for the window background color
(usually grey).<br />
<em>Default: /windows</em></p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inc" src="images/closed.gif"
onclick="toggle('trigger_inc', 'toggle_inc');" />
Components page</h3>
<div class="toggle" id="toggle_inc">
<p>
<strong>MUI_COMPONENTSPAGE_CHECKBITMAP</strong> <span class="parameter">bitmap_file</span><br />
The bitmap with images for the checks of the component select treeview.<br />
<em>Default: ${NSISDIR}\Contrib\Graphics\Checks\modern.bmp</em></p>
<p>
<strong>MUI_COMPONENTSPAGE_SMALLDESC</strong><br />
A small description area on the bottom of the page. Use this layout if you have
a lot of sections and don't need large descriptions.</p>
<p>
<strong>MUI_COMPONENTSPAGE_NODESC</strong><br />
No description area.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_ind" src="images/closed.gif"
onclick="toggle('trigger_ind', 'toggle_ind');" />
Directory page</h3>
<div class="toggle" id="toggle_ind">
<p>
<strong>MUI_DIRECTORYPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
The background color for the directory textbox.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_ins" src="images/closed.gif"
onclick="toggle('trigger_ins', 'toggle_ins');" />
Start Menu folder page</h3>
<div class="toggle" id="toggle_ins">
<p>
<strong>MUI_STARTMENUPAGE_BGCOLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
The background color for the startmenu directory list and textbox.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_ini" src="images/closed.gif"
onclick="toggle('trigger_ini', 'toggle_ini');" />
Installation page</h3>
<div class="toggle" id="toggle_ini">
<p>
<strong>MUI_INSTFILESPAGE_COLORS</strong> <span class="parameter">(/windows | "(foreground
color: RRGGBB hexadecimal) (background color: RRGGBB hexadecimal)")</span><br />
The colors of the details screen. Use /windows for the default Windows colors.<br />
<em>Default: /windows</em></p>
<p>
<strong>MUI_INSTFILESPAGE_PROGRESSBAR</strong> <span class="parameter">(""
| colored | smooth)</span><br />
The style of the progress bar. Colored makes it use the MUI_INSTALLCOLORS.<br />
<em>Default: smooth</em></p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inf" src="images/closed.gif"
onclick="toggle('trigger_inf', 'toggle_inf');" />
Installer finish page</h3>
<div class="toggle" id="toggle_inf">
<p>
<strong>MUI_FINISHPAGE_NOAUTOCLOSE</strong><br />
Do not automatically jump to the finish page, to allow the user to check the install
log.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_uinf" src="images/closed.gif"
onclick="toggle('trigger_uinf', 'toggle_uinf');" />
Uninstaller finish page</h3>
<div class="toggle" id="toggle_uinf">
<p>
<strong>MUI_UNFINISHPAGE_NOAUTOCLOSE</strong><br />
Do not automatically jump to the finish page, to allow the user to check the uninstall
log.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inaw" src="images/closed.gif"
onclick="toggle('trigger_inaw', 'toggle_inaw');" />
Abort warning</h3>
<div class="toggle" id="toggle_inaw">
<p>
<strong>MUI_ABORTWARNING</strong><br />
Show a message box with a warning when the user wants to close the installer.</p>
<div class="settings">
<p>
<strong>MUI_ABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
Text to display on the abort warning message box.</p>
<p>
<strong>MUI_ABORTWARNING_CANCEL_DEFAULT</strong><br />
Set the Cancel button as the default button on the message box.</p>
</div>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_inuaw" src="images/closed.gif"
onclick="toggle('trigger_inuaw', 'toggle_inuaw');" />
Uninstaller abort warning</h3>
<div class="toggle" id="toggle_inuaw">
<p>
<strong>MUI_UNABORTWARNING</strong><br />
Show a message box with a warning when the user wants to close the uninstaller.</p>
<div class="settings">
<p>
<strong>MUI_UNABORTWARNING_TEXT</strong> <span class="parameter">text</span><br />
Text to display on the abort warning message box.</p>
<p>
<strong>MUI_UNABORTWARNING_CANCEL_DEFAULT</strong><br />
Set the Cancel button as the default button on the message box.</p>
</div>
</div>
</div>
</div>
<h2>
3. Pages</h2>
<div>
<p>
Insert the following macros to set the pages you want to use. The pages will appear
in the order in which you insert them in the script. You can also insert custom
Page commands between the macros to add custom pages.</p>
<p>
You can add multiple pages of certain types (for example, if you want the user to
specify multiple folders).</p>
<p>
Examples:</p>
<pre>
!insertmacro MUI_PAGE_LICENSE "License.rtf"
!insertmacro MUI_PAGE_COMPONENTS
Var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU "Application" $StartMenuFolder
</pre>
<p>
You will need the page ID for the Start Menu folder page when using the Start Menu
folder macros. The folder will be stored in the specified variable.</p>
<p>
<strong>Installer pages</strong><br />
MUI_PAGE_WELCOME<br />
MUI_PAGE_LICENSE <span class="parameter">textfile</span><br />
MUI_PAGE_COMPONENTS<br />
MUI_PAGE_DIRECTORY<br />
MUI_PAGE_STARTMENU <span class="parameter">pageid variable</span><br />
MUI_PAGE_INSTFILES<br />
MUI_PAGE_FINISH</p>
<p>
<strong>Uninstaller pages</strong><br />
MUI_UNPAGE_WELCOME<br />
MUI_UNPAGE_CONFIRM<br />
MUI_UNPAGE_LICENSE <span class="parameter">textfile</span><br />
MUI_UNPAGE_COMPONENTS<br />
MUI_UNPAGE_DIRECTORY<br />
MUI_UNPAGE_INSTFILES<br />
MUI_UNPAGE_FINISH</p>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pg" src="images/closed.gif"
onclick="toggle('trigger_pg', 'toggle_pg');" />
Page settings</h3>
<div class="toggle" id="toggle_pg">
<p>
Page settings apply to a single page and should be set before inserting a page macro.
The same settings can be used for installer and uninstaller pages. You have to repeat
the setting if you want it to apply to multiple pages. Example:</p>
<pre>
;Add a directory page to let the user specify a plug-ins folder
;Store the folder in $PluginsFolder
Var PLUGINS_FOLDER
!define MUI_DIRECTORYPAGE_VARIABLE $PluginsFolder
!insertmacro MUI_PAGE_DIRECTORY
</pre>
<p>
<p>
All standard texts in the user interface are loaded from language files, which are
available for all languages supported by NSIS. So you only need to define these
texts if you want to change the default.</p>
<p>
If the parameter is a text that should be different for each language, define a
language string using LangString and use $(LangStringName) as value. For a license
text in multiple languages, LicenseLangString can be used. Refer the NSIS Users
Manual for more information about installers with multiple languages.</p>
<p>
In all text settings, the doublequote character (") should be escaped in the
following form: $\"</p>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgg" src="images/closed.gif"
onclick="toggle('trigger_pgg', 'toggle_pgg');" />
General page settings</h3>
<div class="toggle" id="toggle_pgg">
<p>
<strong>MUI_PAGE_HEADER_TEXT</strong> <span class="parameter">text</span><br />
Text to display on the header of the page.</p>
<p>
<strong>MUI_PAGE_HEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
Subtext to display on the header of the page.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgw" src="images/closed.gif"
onclick="toggle('trigger_pgw', 'toggle_pgw');" />
Welcome page settings</h3>
<div class="toggle" id="toggle_pgw">
<p>
<strong>MUI_WELCOMEPAGE_TITLE</strong> <span class="parameter">title</span><br />
Title to display on the top of the page.</p>
<p>
<strong>MUI_WELCOMEPAGE_TITLE_3LINES</strong><br />
Extra space for the title area.</p>
<p>
<strong>MUI_WELCOMEPAGE_TEXT</strong> <span class="parameter">text</span><br />
Text to display on the page.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgl" src="images/closed.gif"
onclick="toggle('trigger_pgl', 'toggle_pgl');" />
License page settings</h3>
<div class="toggle" id="toggle_pgl">
<p>
<strong>MUI_LICENSEPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
Text to display on the top of the page.</p>
<p>
<strong>MUI_LICENSEPAGE_TEXT_BOTTOM</strong> <span class="parameter">text</span><br />
Text to display on the bottom of the page.</p>
<p>
<strong>MUI_LICENSEPAGE_BUTTON</strong> <span class="parameter">button_text</span><br />
Text to display on the 'I Agree' button.</p>
<p>
<strong>MUI_LICENSEPAGE_CHECKBOX</strong><br />
Display a checkbox the user has to check to agree with the license terms.</p>
<div class="settings">
<p>
<strong>MUI_LICENSEPAGE_CHECKBOX_TEXT</strong> <span class="parameter">text</span><br />
Text to display next to the checkbox to agree with the license terms.</p>
</div>
<p>
<strong>MUI_LICENSEPAGE_RADIOBUTTONS</strong><br />
Display two radio buttons to allow the user to choose between accepting the license
terms or not.</p>
<div class="settings">
<p>
<strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_ACCEPT</strong> <span class="parameter">text</span><br />
Text to display next to the checkbox to accept the license terms.</p>
<p>
<strong>MUI_LICENSEPAGE_RADIOBUTTONS_TEXT_DECLINE</strong> <span class="parameter">text</span><br />
Text to display next to the checkbox to decline the license terms.</p>
</div>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgc" src="images/closed.gif"
onclick="toggle('trigger_pgc', 'toggle_pgc');" />
Components page settings</h3>
<div class="toggle" id="toggle_pgc">
<p>
<strong>MUI_COMPONENTSPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
Text to display on the top of the page.</p>
<p>
<strong>MUI_COMPONENTSPAGE_TEXT_COMPLIST</strong> <span class="parameter">text</span><br />
Text to display on next to the components list.</p>
<p>
<strong>MUI_COMPONENTSPAGE_TEXT_INSTTYPE</strong> <span class="parameter">text</span><br />
Text to display on next to the installation type combo box.</p>
<p>
<strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_TITLE</strong> <span class="parameter">text</span><br />
Text to display on the of the top of the description box.</p>
<p>
<strong>MUI_COMPONENTSPAGE_TEXT_DESCRIPTION_INFO</strong> <span class="parameter">text</span><br />
Text to display inside the description box when no section is selected.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgd" src="images/closed.gif"
onclick="toggle('trigger_pgd', 'toggle_pgd');" />
Directory page settings</h3>
<div class="toggle" id="toggle_pgd">
<p>
<strong>MUI_DIRECTORYPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
Text to display on top of the page.</p>
<p>
<strong>MUI_DIRECTORYPAGE_TEXT_DESTINATION</strong> <span class="parameter">text</span><br />
Text to display on the destination folder frame.</p>
<p>
<strong>MUI_DIRECTORYPAGE_VARIABLE</strong> <span class="parameter">variable</span><br />
Variable in which to store the selected folder.<br />
<em>Default: $INSTDIR</em></p>
<p>
<strong>MUI_DIRECTORYPAGE_VERIFYONLEAVE</strong><br />
Does not disable the Next button when a folder is invalid but allows you to use
GetInstDirError in the leave function to handle an invalid folder.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgs" src="images/closed.gif"
onclick="toggle('trigger_pgs', 'toggle_pgs');" />
Start Menu folder page settings</h3>
<div class="toggle" id="toggle_pgs">
<p>
<strong>MUI_STARTMENUPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
Text to display on the top of the page.</p>
<p>
<strong>MUI_STARTMENUPAGE_TEXT_CHECKBOX</strong> <span class="parameter">text</span><br />
Text to display next to the checkbox to disable the Start Menu folder creation.</p>
<p>
<strong>MUI_STARTMENUPAGE_DEFAULTFOLDER</strong> <span class="parameter">folder</span><br />
The default Start Menu Folder.</p>
<p>
<strong>MUI_STARTMENUPAGE_NODISABLE</strong><br />
Do not display the checkbox to disable the creation of Start Menu shortcuts.</p>
<p>
<strong>MUI_STARTMENUPAGE_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
<strong>MUI_STARTMENUPAGE_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
<strong>MUI_STARTMENUPAGE_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
The registry key to store the Start Menu folder. The page will use it to remember
the users preference. You should also use for the uninstaller to remove the Start
Menu folders. Don't forget to remove this key during uninstallation.</p>
<p>
For the uninstaller, use the MUI_STARTMENU_GETFOLDER macro to get the Start Menu
folder:</p>
<pre>
!insertmacro MUI_STARTMENU_GETFOLDER page_id $R0
Delete "$SMPROGRAMS\$R0\Your Shortcut.lnk"
</pre>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgi" src="images/closed.gif"
onclick="toggle('trigger_pgi', 'toggle_pgi');" />
Installation page settings</h3>
<div class="toggle" id="toggle_pgi">
<p>
<strong>MUI_INSTFILESPAGE_FINISHHEADER_TEXT</strong> <span class="parameter">text</span><br />
Text to display on the header of the installation page when the installation has
been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
<p>
<strong>MUI_INSTFILESPAGE_FINISHHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
Subtext to display on the header of the installation page when the installation
has been completed (won't be displayed when using a Finish page without MUI_(UN)FINISHPAGE_NOAUTOCLOSE).</p>
<p>
<strong>MUI_INSTFILESPAGE_ABORTHEADER_TEXT</strong> <span class="parameter">text</span><br />
Text to display on the header of the installation page when the installation has
been aborted.</p>
<p>
<strong>MUI_INSTFILESPAGE_ABORTHEADER_SUBTEXT</strong> <span class="parameter">text</span><br />
Subext to display on the header of the installation page when the installation has
been aborted.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgf" src="images/closed.gif"
onclick="toggle('trigger_pgf', 'toggle_pgf');" />
Finish page settings</h3>
<div class="toggle" id="toggle_pgf">
<p>
<strong>MUI_FINISHPAGE_TITLE</strong> <span class="parameter">title</span><br />
Title to display on the top of the page.</p>
<p>
<strong>MUI_FINISHPAGE_TITLE_3LINES</strong><br />
Extra space for the title area.</p>
<p>
<strong>MUI_FINISHPAGE_TEXT</strong> <span class="parameter">text</span><br />
Text to display on the page.</p>
<p>
<strong>MUI_FINISHPAGE_TEXT_LARGE</strong><br />
Extra space for the text area (if using checkboxes).</p>
<p>
<strong>MUI_FINISHPAGE_BUTTON</strong> <span class="parameter">text</span><br />
Text to display on the Finish button.</p>
<p>
<strong>MUI_FINISHPAGE_CANCEL_ENABLED</strong><br />
Enable the Cancel button so the user can skip any options displayed on the finish
page.</p>
<p>
<strong>MUI_FINISHPAGE_TEXT_REBOOT</strong> <span class="parameter">text</span><br />
Text to display on the finish page when asking for a system reboot.</p>
<p>
<strong>MUI_FINISHPAGE_TEXT_REBOOTNOW</strong> <span class="parameter">text</span><br />
Text to display next to the 'Reboot now' option button.</p>
<p>
<strong>MUI_FINISHPAGE_TEXT_REBOOTLATER</strong> <span class="parameter">text</span><br />
Text to display next to the 'Reboot later' option button.</p>
<p>
<strong>MUI_FINISHPAGE_REBOOTLATER_DEFAULT</strong><br />
Sets the 'Reboot later' option as the default option.</p>
<p>
<strong>MUI_FINISHPAGE_RUN</strong> <span class="parameter">exe_file</span><br />
Application which the user can select to run using a checkbox. You don't need to
put quotes around the filename when it contains spaces.</p>
<div class="settings">
<p>
<strong>MUI_FINISHPAGE_RUN_TEXT</strong> <span class="parameter">text</span><br />
Texts to display next to the 'Run program' checkbox.</p>
<p>
<strong>MUI_FINISHPAGE_RUN_PARAMETERS</strong> <span class="parameter">parameters</span><br />
Parameters for the application to run. Don't forget to escape double quotes in the
value (use $\").</p>
<p>
<strong>MUI_FINISHPAGE_RUN_NOTCHECKED</strong><br />
Do not check the 'Run program' checkbox by default</p>
<p>
<strong>MUI_FINISHPAGE_RUN_FUNCTION</strong> <span class="parameter">function</span><br />
Call a function instead of executing an application (define MUI_FINISHPAGE_RUN without
parameters). You can use the function to execute multiple applications or you can
change the checkbox name and use it for other things.</p>
</div>
<p>
<strong>MUI_FINISHPAGE_SHOWREADME</strong> <span class="parameter">file/url</span><br />
File or website which the user can select to view using a checkbox. You don't need
to put quotes around the filename when it contains spaces.</p>
<div class="settings">
<p>
<strong>MUI_FINISHPAGE_SHOWREADME_TEXT</strong> <span class="parameter">text</span><br />
Texts to display next to the 'Show Readme' checkbox.</p>
<p>
<strong>MUI_FINISHPAGE_SHOWREADME_NOTCHECKED</strong><br />
Do not check the 'Show Readme' checkbox by default</p>
<p>
<strong>MUI_FINISHPAGE_SHOWREADME_FUNCTION</strong> <span class="parameter">function</span><br />
Call a function instead of showing a file (define MUI_FINISHPAGE_SHOWREADME without
parameters). You can use the function to show multiple files or you can change the
checkbox name and use it for other things.</p>
</div>
<p>
<strong>MUI_FINISHPAGE_LINK</strong> <span class="parameter">link_text</span><br />
Text for a link on the which the user can click to view a website or file.</p>
<div class="settings">
<p>
<strong>MUI_FINISHPAGE_LINK_LOCATION</strong> <span class="parameter">file/url</span><br />
Website or file which the user can select to view using the link. You don't need
to put quotes around the filename when it contains spaces.</p>
<p>
<strong>MUI_FINISHPAGE_LINK_COLOR</strong> <span class="parameter">(color: RRGGBB hexadecimal)</span><br />
Text color for the link on the Finish page.<br />
<em>Default: 000080</em></p>
</div>
<p>
<strong>MUI_FINISHPAGE_NOREBOOTSUPPORT</strong><br />
Disables support for the page that allows the user to reboot the system. Define
this option to save some space if you are not using the /REBOOTOK flag or SetRebootFlag.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_pgu" src="images/closed.gif"
onclick="toggle('trigger_pgu', 'toggle_pgu');" />
Uninstall confirm page settings</h3>
<div class="toggle" id="toggle_pgu">
<p>
<strong>MUI_UNCONFIRMPAGE_TEXT_TOP</strong> <span class="parameter">text</span><br />
Text to display on the top of the page.</p>
<p>
<strong>MUI_UNCONFIRMPAGE_TEXT_LOCATION</strong> <span class="parameter">text</span><br />
Text to display next to the uninstall location text box.</p>
</div>
</div>
</div>
<h2>
4. Language files</h2>
<div>
<p>
Insert the Modern UI language files for the languages to want to include.</p>
<pre>
!insertmacro MUI_LANGUAGE "English"
</pre>
<p>
The standard NSIS language files are loaded automatically, there is no need to use
LoadLanguageFile.</p>
</div>
<h2>
5. Reserve files</h2>
<div>
<p>
If you are using solid compression, files that are required before the actual installation
should be stored first in the data block, because this will make your installer
start faster. Include reserve file commands for such files before your sections
and functions:</p>
<pre>
ReserveFile /plugin MyPlugin.dll
!insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
...
</pre>
</div>
<h1>
Script code for pages</h1>
<div>
<p>
Some pages allow you to show additional information or can be used to get user input.
Here you can find the script code to use these features.</p>
<h2>
Components page descriptions</h2>
<div>
<p>
The Modern UI components page has a text box in which a description can be shown
when the user hovers the mouse over a component. If you don't want to use these
descriptions, insert the MUI_COMPONENTSPAGE_NODESC interface setting.</p>
<p>
To set a description for a section, an additional parameter needs to be added to
Section commmand with a unique identifier for the section. This name can later be
used to set the description for this section.</p>
<pre>
Section "Section Name 1" Section1
...
SectionEnd
</pre>
<p>
After the sections, use these macros to set the descriptions:</p>
<pre>
LangString DESC_Section1 ${LANG_ENGLISH} "Description of section 1."
LangString DESC_Section2 ${LANG_ENGLISH} "Description of section 2."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
</pre>
<p>
For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END
macros.</p>
</div>
<h2>
Start Menu folder</h2>
<div>
<p>
Put the code to write the shortcuts (using CreateShortcut) between the MUI_STARTMENU_WRITE_BEGIN
and MUI_STARTMENU_WRITE_END macros:</p>
<pre>
!insertmacro MUI_STARTMENU_WRITE_BEGIN pageid
...create shortcuts...
!insertmacro MUI_STARTMENU_WRITE_END
</pre>
<p>
The page ID should be the ID of the page on which the user has selected the folder
for the shortcuts you want to write.</p>
<p>
The variable which contains the folder and the page ID are set as parameters of
the page macro.</p>
</div>
</div>
<h1>
Language selection dialog</h1>
<div>
<p>
If you want the installer to display a language selection dialog (see the the <a
href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a> example),
insert the MUI_LANGDLL_DISPLAY macro in the .onInit function:</p>
<pre>
Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd
</pre>
<p>
This macro can also be used in the un.onInit function.</p>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_lss" src="images/closed.gif"
onclick="toggle('trigger_lss', 'toggle_lss');" />
Settings for registry storage of selected language</h3>
<div class="toggle" id="toggle_lss">
<p>
To remember the user's preference, you can define a registry key. These defines
should be set before inserting the installation page macro.</p>
<p>
<strong>MUI_LANGDLL_REGISTRY_ROOT</strong> <span class="parameter">root</span><br />
<strong>MUI_LANGDLL_REGISTRY_KEY</strong> <span class="parameter">key</span><br />
<strong>MUI_LANGDLL_REGISTRY_VALUENAME</strong> <span class="parameter">value_name</span><br />
The registry key to store the language. The users preference will be remembered.
You can also use it for the uninstaller to display the right language. Don't forget
to remove this key in the uninstaller.</p>
<p>
For the uninstaller, insert the MUI_UNGETLANGUAGE macro in un.onInit to get the
stored language preference:</p>
<pre>
Function un.onInit
!insertmacro MUI_UNGETLANGUAGE
FunctionEnd
</pre>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_lsin" src="images/closed.gif"
onclick="toggle('trigger_lsin', 'toggle_lsin');" />
Interface settings for selection dialog</h3>
<div class="toggle" id="toggle_lsin">
<p>
To customize the language selection dialog interface, use these defines before inserting
the MUI_LANGDLL_DISPLAY macro.</p>
<p>
<strong>MUI_LANGDLL_WINDOWTITLE</strong> <span class="parameter">text</span><br />
The window title of the language selection dialog.</p>
<p>
<strong>MUI_LANGDLL_INFO</strong> <span class="parameter">text</span><br />
The text to display on the language selection dialog.</p>
<p>
<strong>MUI_LANGDLL_ALWAYSSHOW</strong><br />
Always show the language selection dialog, even if a language has been stored in
the registry. The language stored in the registry will be selected by default.</p>
<p>
<strong>MUI_LANGDLL_ALLLANGUAGES</strong><br />
Always show all available languages and don't filter according to their codepage.</p>
</div>
</div>
<h1>
Custom pages</h1>
<div>
<p>
If you want add your custom pages to your installer, you can insert your own page
commands between the page macros.</p>
<pre>
!insertmacro MUI_PAGE_WELCOME
Page custom FunctionName ;Custom page
!insertmacro MUI_PAGE_COMPONENTS
;Uninstaller
!insertmacro MUI_UNPAGE_CONFIRM
UninstPage custom un.FunctionName ;Custom page
!insertmacro MUI_UNPAGE_INSTFILES
</pre>
<p>
Use the MUI_HEADER_TEXT macro to set the text on the page header in a page function:</p>
<pre>
LangString PAGE_TITLE ${LANG_ENGLISH} "Title"
LangString PAGE_SUBTITLE ${LANG_ENGLISH} "Subtitle"
Function CustomPageFunction
!insermacro MUI_HEADER_TEXT $(PAGE_TITLE) $(PAGE_SUBTITLE)
...
FuctionEnd
</pre>
</div>
<h1>
Custom functions</h1>
<div>
<p>
Interface functions provided by NSIS, like the .onGUIInit function and the page
functions are automatically included by the Modern UI and filled with code to support
new interface features. If you want to add additional code to these function, create
a function with the custom script code in the script use the Modern UI functions
call them.</p>
<p>
Example:</p>
<pre class="text">
!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
Function myGUIInit
...
FunctionEnd</pre>
<p>
Modern UI pages can also customized using custom functions.</p>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_cfg" src="images/closed.gif"
onclick="toggle('trigger_cfg', 'toggle_cfg');" />
General Custom Functions</h3>
<div class="toggle" id="toggle_cfg">
<p>
These defines should be set before inserting the language macros.</p>
<p>
<strong>MUI_CUSTOMFUNCTION_GUIINIT</strong> <span class="parameter">function</span><br />
<strong>MUI_CUSTOMFUNCTION_UNGUIINIT</strong> <span class="parameter">function</span><br />
<strong>MUI_CUSTOMFUNCTION_ABORT</strong> <span class="parameter">function</span><br />
<strong>MUI_CUSTOMFUNCTION_UNABORT</strong> <span class="parameter">function</span><br />
<strong>MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION</strong> <span class="parameter">function</span><br />
<strong>MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION</strong> <span class="parameter">function</span></p>
<p>
Mouse over functions are only available when the description macros
(MUI_FUNCTION_DESCRIPTION_BEGIN) are used. When component page descriptions are not
used, regular .onMouseOverSection and un.onMouseOverSection must be used.</p>
</div>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_cfpg" src="images/closed.gif"
onclick="toggle('trigger_cfpg', 'toggle_cfpg');" />
Page Custom Functions</h3>
<div class="toggle" id="toggle_cfpg">
<p>
These defines should be set before inserting a page macro.</p>
<p>
<strong>MUI_PAGE_CUSTOMFUNCTION_PRE</strong> <span class="parameter">function</span><br />
<strong>MUI_PAGE_CUSTOMFUNCTION_SHOW</strong> <span class="parameter">function</span><br />
<strong>MUI_PAGE_CUSTOMFUNCTION_LEAVE</strong> <span class="parameter">function</span><br />
</p>
<p>
The pre function is called first and allows you to initalize variables or decide
whether the page should be skipped. Then, the show function is called, which can
be used to customize the interface. Finally, the user input can be validated in the
leave function. The NSIS Users Manual provides more information about these functions.</p>
<p>
In the show function, the window handles of all controls on the page can be retrieved
from a Modern UI variable. A list of the variables names is not yet available. For
now, refer to the source files of the Modern UI 2.0. The variable declarations can
be found in the first lines of the header file for a certain page.</p>
</div>
</div>
<h1>
<a name="examples" id="examples">Example scripts</a></h1>
<div>
<p>
Basic: <a href="../../Examples/Modern%20UI/Basic.nsi">Basic.nsi</a><br />
Welcome/Finish page: <a href="../../Examples/Modern%20UI/WelcomeFinish.nsi">WelcomeFinish.nsi</a><br />
Multiple languages: <a href="../../Examples/Modern%20UI/MultiLanguage.nsi">MultiLanguage.nsi</a><br />
Header image: <a href="../../Examples/Modern%20UI/HeaderBitmap.nsi">HeaderBitmap.nsi</a><br />
Start Menu Folder page: <a href="../../Examples/Modern%20UI/StartMenu.nsi">StartMenu.nsi</a></p>
</div>
<h1>
Credits</h1>
<div>
<p>
Written by Joost Verburg.<br />
Icons designed by Nikos Adamamas, aka adni18.<br />
Thanks to Amir Szekely, aka KiCHiK, for his work on NSIS to make this possible.</p>
</div>
<h1>
License</h1>
<div>
<p>
The zlib/libpng license applies to the Modern UI.</p>
<h3>
<img class="trigger" alt="Open/Close section" id="trigger_lic" src="images/closed.gif"
onclick="toggle('trigger_lic', 'toggle_lic');" />
License Terms</h3>
<div class="toggle" id="toggle_lic">
<pre>
Copyright © 2002-2009 Joost Verburg
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute
it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented;
you must not claim that you wrote the original software.
If you use this software in a product, an acknowledgment in the
product documentation would be appreciated but is not required.
2. Altered versions must be plainly marked as such,
and must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any distribution.
</pre>
</div>
</div>
</div>
</td>
</tr>
</table>
</body>
</html>
|
tonytheodore/nsis
|
Contrib/Modern UI 2/Readme.html
|
HTML
|
epl-1.0
| 78,486
|
/**
* <copyright>
* </copyright>
*
* $Id$
*/
package examples.flow_diagrams.report;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>State</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link examples.flow_diagrams.report.State#getPlaces <em>Places</em>}</li>
* </ul>
* </p>
*
* @see examples.flow_diagrams.report.ReportPackage#getState()
* @model
* @generated
*/
public interface State extends EObject {
/**
* Returns the value of the '<em><b>Places</b></em>' containment reference list.
* The list contents are of type {@link examples.flow_diagrams.report.Place}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Places</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Places</em>' containment reference list.
* @see examples.flow_diagrams.report.ReportPackage#getState_Places()
* @model containment="true"
* @generated
*/
EList<Place> getPlaces();
} // State
|
jesusc/bento
|
examples/evaluation/bento.examples.flow_diagrams.analysis/src-gen/examples/flow_diagrams/report/State.java
|
Java
|
epl-1.0
| 1,201
|
////////////////////////////////////////////////////////////
// //
// This file is part of the VRPH software package for //
// generating solutions to vehicle routing problems. //
// VRPH was developed by Chris Groer (cgroer@gmail.com). //
// //
// (c) Copyright 2010 Chris Groer. //
// All Rights Reserved. VRPH is licensed under the //
// Common Public License. See LICENSE file for details. //
// //
////////////////////////////////////////////////////////////
#include "VRPH.h"
#include "randvals.h" // included for hashing
VRPRoute::VRPRoute()
{
///
/// Default constructor for the VRPRoute.
///
this->name=NULL;
this->ordering=NULL;
this->x=NULL;
this->y=NULL;
}
VRPRoute::VRPRoute(int n)
{
///
/// Allocates memory for the VRPRoute fields large enough
/// for an n node problem.
///
this->name=new char[8*n];// Used to add as column
this->ordering=new int[n];
this->x=new double[n];
this->y=new double[n];
}
VRPRoute::~VRPRoute()
{
///
/// Destructor for the VRPRoute.
///
if(this->name)
delete [] this->name;
if(this->ordering)
delete [] this->ordering;
if(this->x)
delete [] this->x;
if(this->y)
delete [] this->y;
}
int VRPRoute::hash(int salt)
{
///
/// Computes a hash of the route,
/// returning an integer in the range [0,HASH_TABLE_SIZE-1].
///
// Associate a random integer with each node in the route
// XOR them together and take the low log_2(HASH_TABLE_SIZE) bits
// Return 0 if # customers is 0 (the "NULL" route)
if(this->num_customers==0)
return 0;
int i;
if(this->ordering[num_customers-1]<this->ordering[0])
{
fprintf(stderr,"Route has %d customers\n",this->num_customers);
fprintf(stderr,"end<start! %d<%d\n",this->ordering[num_customers-1],this->ordering[0]);
for(i=0;i<this->num_customers;i++)
fprintf(stderr,"%d ",this->ordering[i]);
fprintf(stderr,"Length=%f;\nLoad=%d\nObj=%fStart=%d\nEnd=%d\n",this->length,this->load,this->obj_val,
this->start,this->end);
report_error("%s: Error in route hash\n",__FUNCTION__);
}
int val = 0;
for(i=0;i<this->num_customers; i++)
val ^= (randvals[(salt + VRPH_ABS(this->ordering[i])+
VRPH_ABS(this->ordering[VRPH_MIN((this->num_customers)-1,i+1)]) )% NUM_RANDVALS]);
for(i=0;i<this->num_customers; i++)
val+=this->ordering[i];
val=val&(HASH_TABLE_SIZE-1);
// Get the right # of bits
return val;
}
void VRPRoute::create_name()
{
///
/// Creates a name for the route as a string. Format is
/// hashval1_hashval2_ordering (delimited by _)
///
// Make sure we have memory for the name
if(!this->name)
{
fprintf(stderr,"No memory allocated for the route name!\n");
exit(-1);
}
int i;
char temp[100];
// Write the hash value
sprintf(this->name,"%d_%d_",this->hash(SALT_1),this->hash(SALT_2));
// Write the ordering
for(i=0;i<this->num_customers-1;i++)
{
sprintf(temp,"%d_",this->ordering[i]);
strcat(this->name,(const char *)temp);
}
sprintf(temp,"%d",this->ordering[this->num_customers-1]);
strcat(this->name,(const char *)temp);
return;
}
VRPRouteWarehouse::VRPRouteWarehouse()
{
///
/// Default constructor for the route warehouse.
///
this->hash_table_size=0;
this->num_unique_routes=0;
}
VRPRouteWarehouse::VRPRouteWarehouse(int h_size)
{
///
/// Constructor for the rote warehouse with h_size entries in the hash
/// table. Best if h_size is a power of 2.
///
// Allocate memory for the hash_table
this->hash_table=new struct htable_entry[h_size];
this->hash_table_size=h_size;
this->num_unique_routes=0;
for(int i=0;i<h_size;i++)
this->hash_table[i].num_vals=0;
}
VRPRouteWarehouse::~VRPRouteWarehouse()
{
///
/// Destructor for the route warehouse.
///
delete [] this->hash_table;
}
void VRPRouteWarehouse::liquidate()
{
///
/// Clears the hash table, removing all routes from the WH.
///
this->num_unique_routes=0;
for(int i=0;i<this->hash_table_size;i++)
this->hash_table[i].num_vals=0;
}
void VRPRouteWarehouse::remove_route(int hash_val, int hash_val2)
{
///
/// Removes a particular route from the hash table, using the
/// second hash value to remove the correct entry if we have duplicates
/// at the same location in the table.
///
int i,j;
if(this->hash_table[hash_val].num_vals==0)
{
fprintf(stderr,"Tried to remove empty hash_table entry!\n");
fprintf(stderr,"hash_val=%d\n;hash_val2=%d\n",hash_val,hash_val2);
report_error("%s: Error removing route from WH\n",__FUNCTION__);
}
// Look for the second hash value
for(i=0;i<this->hash_table[hash_val].num_vals;i++)
{
if( this->hash_table[hash_val].hash_val_2[i]==hash_val2)
{
// This is the one to remove-shift everyone else down one
// and decrement num_vals
for(j=i+1;j<this->hash_table[hash_val].num_vals;j++)
{
// [j] -> [j-1]
this->hash_table[hash_val].length[j-1]=
this->hash_table[hash_val].length[j];
this->hash_table[hash_val].hash_val_2[j-1]=
this->hash_table[hash_val].hash_val_2[j];
}
this->hash_table[hash_val].num_vals--;
this->num_unique_routes--;
return;
}
}
// We shouldn't get here!
// Annoying...
fprintf(stderr,"Never found the route when removing from WH!!!\n");
fprintf(stderr,"Looking for (%d, %d)\n",hash_val, hash_val2);
for(i=0;i<this->hash_table[hash_val].num_vals;i++)
fprintf(stderr,"Position %d: (%d, %d, %f)\n",i, hash_val,
this->hash_table[hash_val].hash_val_2[i], hash_table[hash_val].length[i]);
report_error("%s: Error removing route from WH\n",__FUNCTION__);
}
int VRPRouteWarehouse::add_route(VRPRoute *R)
{
///
/// Adds the given route R to the warehouse, returning true
/// if the addition is made and false otherwise.
///
// Hash the route
int i;
R->hash_val = R->hash(SALT_1);
R->hash_val2 = R->hash(SALT_2);
int hval=R->hash_val;
int hval2=R->hash_val2;
if(this->hash_table[hval].num_vals>0)
{
// The entry is not vacant-must investigate further...
// Make sure that we haven't filled up all the entries--should NEVER happen...
// as long as the hash_table is big enough
if(this->hash_table[hval].num_vals==NUM_ENTRIES)
{
fprintf(stderr, "Route hash table is too small!! \n");
fprintf(stderr, "At entry %d\n",hval);
fflush(stderr);
for(i=0;i<this->hash_table[hval].num_vals;i++)
{
fprintf(stderr,"%d %f\n",i,this->hash_table[hval].length[i]);
fflush(stderr);
}
fflush(stderr);
report_error("%s: Error adding route to WH\n",__FUNCTION__);
}
// Otherwise, there is room in the table
for(i=0;i<this->hash_table[hval].num_vals;i++)
{
// Compare the second hash value-
if(this->hash_table[hval].hash_val_2[i] == hval2)
{
// These surely must cover the same nodes - now see if we have
// a lower cost tour
if(R->length<this->hash_table[hval].length[i] &&
VRPH_ABS(R->length - this->hash_table[hval].length[i])>VRPH_EPSILON)
{
this->hash_table[hval].length[i]=R->length;
return BETTER_ROUTE;
}
else
return DUPLICATE_ROUTE;
// The column/route was the same or worse.
}
}
// We didn't match any of the previous entries with this hval
// New entry at this location
this->hash_table[hval].length[this->hash_table[hval].num_vals]=
R->length ;
this->hash_table[hval].hash_val_2[this->hash_table[hval].num_vals]=
hval2;
this->hash_table[hval].num_vals++;
this->num_unique_routes++;
return ADDED_ROUTE;
}
// ELSE...
// This is a new entry--update the hash table
this->hash_table[hval].num_vals=1;
// Insert the length and h2
this->hash_table[hval].length[0]=R->length ;
this->hash_table[hval].hash_val_2[0]=hval2;
this->num_unique_routes++;
return ADDED_ROUTE;
}
|
snoopyxu/vrph
|
src/VRPRoute.cpp
|
C++
|
epl-1.0
| 9,050
|
/*
* Sonatype Nexus (TM) Open Source Version
* Copyright (c) 2008-present Sonatype, Inc.
* All rights reserved. Includes the third-party code listed at http://links.sonatype.com/products/nexus/oss/attributions.
*
* This program and the accompanying materials are made available under the terms of the Eclipse Public License Version 1.0,
* which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html.
*
* Sonatype Nexus (TM) Professional Version is available from Sonatype, Inc. "Sonatype" and "Sonatype Nexus" are trademarks
* of Sonatype, Inc. Apache Maven is a trademark of the Apache Software Foundation. M2eclipse is a trademark of the
* Eclipse Foundation. All other trademarks are the property of their respective owners.
*/
package org.sonatype.nexus.rapture.internal;
import java.net.URI;
import java.util.List;
import javax.annotation.Nullable;
import javax.servlet.http.HttpServletRequest;
import org.sonatype.goodies.testsupport.TestSupport;
import org.sonatype.nexus.common.app.ApplicationVersion;
import org.sonatype.nexus.common.app.BaseUrlHolder;
import org.sonatype.nexus.common.template.TemplateHelper;
import org.sonatype.nexus.rapture.internal.state.StateComponent;
import org.sonatype.nexus.ui.UiPluginDescriptorSupport;
import com.google.inject.util.Providers;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import static java.util.Arrays.asList;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is;
import static org.mockito.Mockito.when;
public class RaptureWebResourceBundleTest
extends TestSupport
{
@Mock
private ApplicationVersion applicationVersion;
@Mock
private HttpServletRequest httpServletRequest;
@Mock
private StateComponent stateComponent;
@Mock
private TemplateHelper templateHelper;
private RaptureWebResourceBundle underTest;
@Before
public void setup() {
BaseUrlHolder.set("http://baseurl/", ".");
when(httpServletRequest.getParameter("debug")).thenReturn("false");
underTest =
new RaptureWebResourceBundle(applicationVersion, Providers.of(httpServletRequest), Providers.of(stateComponent),
templateHelper, asList(new UiPluginDescriptorImpl()),
asList(new ExtJsUiPluginDescriptorImpl("test-1"), new ExtJsUiPluginDescriptorImpl("test-2")));
}
@Test
public void testGetExtJsPluginConfigs() {
List<String> configs = underTest.getExtJsPluginConfigs();
assertThat(configs, is(asList("id-test-1", "id-test-2")));
}
@Test
public void testGetExtJsNamespaces() {
List<String> namespaces = underTest.getExtJsNamespaces();
assertThat(namespaces, is(asList("namespace-test-1", "namespace-test-2")));
}
@Test
public void testGetStyles() throws Exception {
List<URI> uris = underTest.getStyles();
assertThat(uris, is(asList(new URI("./static/rapture/resources/loading-prod.css"),
new URI("./static/rapture/resources/baseapp-prod.css"),
new URI("./static/rapture/resources/test-1-prod.css"),
new URI("./static/rapture/resources/test-2-prod.css"),
new URI("./react-style-1-test.css"),
new URI("./react-style-2-test.css"))));
}
@Test
public void testGetScripts_prod() throws Exception {
List<URI> uris = underTest.getScripts();
assertThat(uris, is(asList(new URI("./static/rapture/baseapp-prod.js"),
new URI("./static/rapture/extdirect-prod.js"),
new URI("./static/rapture/bootstrap.js"),
new URI("./extjs-script-1-test-1.js"),
new URI("./extjs-script-2-test-1.js"),
new URI("./extjs-script-1-test-2.js"),
new URI("./extjs-script-2-test-2.js"),
new URI("./react-script-1-test-prod.js"),
new URI("./react-script-2-test-prod.js"),
new URI("./static/rapture/test-1-prod.js"),
new URI("./static/rapture/test-2-prod.js"),
new URI("./static/rapture/app.js"))));
}
@Test
public void testGetScripts_debug() throws Exception {
when(httpServletRequest.getParameter("debug")).thenReturn("true");
List<URI> uris = underTest.getScripts();
assertThat(uris, is(asList(new URI("./static/rapture/baseapp-debug.js"),
new URI("./static/rapture/extdirect-debug.js"),
new URI("./static/rapture/bootstrap.js"),
new URI("./extjs-script-1-test-1.js"),
new URI("./extjs-script-2-test-1.js"),
new URI("./extjs-script-1-test-2.js"),
new URI("./extjs-script-2-test-2.js"),
new URI("./react-script-1-test-debug.js"),
new URI("./react-script-2-test-debug.js"),
new URI("./static/rapture/app.js"))));
}
private final class UiPluginDescriptorImpl
extends UiPluginDescriptorSupport
{
public UiPluginDescriptorImpl() {
super("test");
}
@Override
public List<String> getStyles() {
return asList("/react-style-1-" + getName() + ".css", "/react-style-2-" + getName() + ".css");
}
@Override
public List<String> getScripts(final boolean isDebug) {
String suffix = getName() + (isDebug ? "-debug" : "-prod") + ".js";
return asList("/react-script-1-" + suffix, "/react-script-2-" + suffix);
}
}
private final class ExtJsUiPluginDescriptorImpl
extends org.sonatype.nexus.rapture.UiPluginDescriptorSupport
{
public ExtJsUiPluginDescriptorImpl(final String artifactId) {
super(artifactId);
}
@Nullable
@Override
public String getConfigClassName() {
return "id-" + getPluginId();
}
@Nullable
@Override
public String getNamespace() {
return "namespace-" + getPluginId();
}
@Override
public boolean hasStyle() {
return true;
}
@Override
public boolean hasScript() {
return true;
}
@Override
public List<String> getScripts(final boolean isDebug) {
return asList("/extjs-script-1-" + getPluginId() + ".js", "/extjs-script-2-" + getPluginId() + ".js");
}
}
}
|
sonatype/nexus-public
|
components/nexus-rapture/src/test/java/org/sonatype/nexus/rapture/internal/RaptureWebResourceBundleTest.java
|
Java
|
epl-1.0
| 6,019
|
Folder for Figures used in Wiki pages
===
https://github.com/ModelWriter/WP5/tree/master/Figures/
|
ModelWriter/WP5
|
Figures/README.md
|
Markdown
|
epl-1.0
| 98
|
/*
* Copyright (C) 2005 - 2014 by TESIS DYNAware GmbH
*/
package de.tesis.dynaware.grapheditor.demo;
import java.net.URL;
import de.tesis.dynaware.grapheditor.GraphEditor;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.text.Font;
import javafx.stage.Stage;
/**
* A demo application to show uses of the {@link GraphEditor} library.
*/
public class GraphEditorDemo extends Application {
private static final String APPLICATION_TITLE = "Graph Editor Demo"; //$NON-NLS-1$
private static final String DEMO_STYLESHEET = "demo.css"; //$NON-NLS-1$
private static final String TREE_SKIN_STYLESHEET = "treeskins.css"; //$NON-NLS-1$
private static final String TITLED_SKIN_STYLESHEET = "titledskins.css"; //$NON-NLS-1$
private static final String FONT_AWESOME = "fontawesome.ttf"; //$NON-NLS-1$
@Override
public void start(final Stage stage) throws Exception {
final URL location = getClass().getResource("GraphEditorDemo.fxml"); //$NON-NLS-1$
final FXMLLoader loader = new FXMLLoader();
final Parent root = loader.load(location.openStream());
final Scene scene = new Scene(root, 830, 630);
scene.getStylesheets().add(getClass().getResource(DEMO_STYLESHEET).toExternalForm());
scene.getStylesheets().add(getClass().getResource(TREE_SKIN_STYLESHEET).toExternalForm());
scene.getStylesheets().add(getClass().getResource(TITLED_SKIN_STYLESHEET).toExternalForm());
Font.loadFont(getClass().getResource(FONT_AWESOME).toExternalForm(), 12);
stage.setScene(scene);
stage.setTitle(APPLICATION_TITLE);
stage.show();
final GraphEditorDemoController controller = loader.getController();
controller.panToCenter();
}
public static void main(final String[] args) {
launch(args);
}
}
|
eckig/graph-editor
|
demo/src/main/java/de/tesis/dynaware/grapheditor/demo/GraphEditorDemo.java
|
Java
|
epl-1.0
| 1,931
|
package com.vogella.swt.widgets;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
public class Checkbox extends Canvas {
private List<SelectionListener> selectionListener = new ArrayList<>();
private boolean isSelected;
private String text = "";
private Point textExtent;
private Color checkColor;
private Color centerColor;
public Checkbox(Composite parent, int style) {
super(parent, style);
addListeners();
}
private void addListeners() {
addPaintListener(e -> {
GC gc = e.gc;
gc.setAntialias(SWT.ON);
gc.setBackground(getCenterColor() != null && !getCenterColor().isDisposed() ? getCenterColor()
: getDisplay().getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
gc.setForeground(getForeground());
gc.fillRoundRectangle(4, 4, 16, 16, 6, 6);
gc.drawRoundRectangle(4, 4, 16, 16, 6, 6);
if (getSelection()) {
gc.setLineWidth(4);
gc.setForeground(getCheckColor() != null && !getCheckColor().isDisposed() ? getCheckColor()
: getDisplay().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND));
gc.drawLine(6, 7, 13, 16);
gc.drawLine(11, 16, 21, 0);
}
textExtent = gc.textExtent(text);
gc.setForeground(getForeground());
gc.setBackground(getBackground());
gc.drawText(text, 24, 4);
});
addListener(SWT.MouseDown, e -> {
setSelection(!getSelection());
selectionListener.forEach(l -> l.widgetSelected(new SelectionEvent(e)));
redraw();
});
}
@Override
public Point computeSize(int wHint, int hHint, boolean changed) {
checkWidget();
int textWidth = textExtent != null ? textExtent.x : 0;
return super.computeSize(Math.max(26 + textWidth, wHint), Math.max(26, hHint), changed);
}
public boolean getSelection() {
checkWidget();
return isSelected;
}
public void setSelection(boolean isSelected) {
checkWidget();
this.isSelected = isSelected;
}
public void setText(String string) {
checkWidget();
if (string == null) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
text = string;
redraw();
}
public String getText() {
checkWidget();
return text;
}
public void addSelectionListener(SelectionListener listener) {
checkWidget();
if (null == listener) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
selectionListener.add(listener);
}
public void removeSelectionListener(SelectionListener listener) {
checkWidget();
if (null == listener) {
SWT.error(SWT.ERROR_NULL_ARGUMENT);
}
selectionListener.remove(listener);
}
public Color getCheckColor() {
checkWidget();
return checkColor;
}
public void setCheckColor(Color checkColor) {
checkWidget();
this.checkColor = checkColor;
}
public Color getCenterColor() {
checkWidget();
return centerColor;
}
public void setCenterColor(Color centerColor) {
checkWidget();
this.centerColor = centerColor;
}
}
|
vogellacompany/eclipse4book
|
com.vogella.swt.widgets/src/com/vogella/swt/widgets/Checkbox.java
|
Java
|
epl-1.0
| 3,695
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package em7.optifl.lookupdisplayer;
import java.util.Collection;
import org.openide.awt.StatusDisplayer;
import org.openide.modules.ModuleInstall;
import org.openide.nodes.Node;
import org.openide.util.Lookup;
import org.openide.util.LookupEvent;
import org.openide.util.LookupListener;
import org.openide.util.Utilities;
public class Installer extends ModuleInstall implements LookupListener {
private Lookup.Result<Node> result;
@Override
public void restored() {
result = Utilities.actionsGlobalContext().lookupResult(Node.class);
result.addLookupListener(this);
}
@Override
public void uninstalled() {
result.removeLookupListener(this);
}
@Override
public void resultChanged(LookupEvent ev) {
Collection<? extends Node> allInstances = result.allInstances();
StringBuilder sb = new StringBuilder();
allInstances.stream().forEach((node) -> {
sb.append("[").append(node.toString()).append("] ");
});
StatusDisplayer.getDefault().setStatusText(sb.toString());
}
}
|
em7/em7OptiFl-gui
|
OptiFLGui/lookupDisplayer/lookupDisplayer/src/main/java/em7/optifl/lookupdisplayer/Installer.java
|
Java
|
epl-1.0
| 1,291
|
/*
* Copyright (c) [2012] - [2017] Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/
package com.codenvy.plugin.webhooks.vsts;
enum VSTSWebhookType {
WORK_ITEM_CREATED_WEBHOOK("work-item-created"),
PULL_REQUEST_UPDATED_WEBHOOK("pull-request-updated");
private final String name;
VSTSWebhookType(final String name) {
this.name = name;
}
public String toString() {
return this.name;
}
}
|
codenvy/codenvy
|
plugins/plugin-microsoft/codenvy-plugin-microsoft-vsts-webhooks/src/main/java/com/codenvy/plugin/webhooks/vsts/VSTSWebhookType.java
|
Java
|
epl-1.0
| 698
|
# Copyright 2018 Red Hat, Inc. and others. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import argparse
import logging
import os
logger = logging.getLogger("cli_utils")
def type_input_file(path):
if path == '-':
return path
if not os.path.isfile(path):
logger.error('File "%s" not found' % path)
raise argparse.ArgumentError
return path
def add_common_args(parser):
parser.add_argument("--path",
help="the directory that the parsed data is written into")
parser.add_argument("--transport", default="http",
choices=["http", "https"],
help="transport for connections")
parser.add_argument("-i", "--ip", default="localhost",
help="OpenDaylight ip address")
parser.add_argument("-t", "--port", default="8181",
help="OpenDaylight restconf port, default: 8181")
parser.add_argument("-u", "--user", default="admin",
help="OpenDaylight restconf username, default: admin")
parser.add_argument("-w", "--pw", default="admin",
help="OpenDaylight restconf password, default: admin")
parser.add_argument("-p", "--pretty_print", action="store_true",
help="json dump with pretty_print")
|
opendaylight/netvirt
|
resources/tools/odltools/odltools/cli_utils.py
|
Python
|
epl-1.0
| 1,857
|
/*
Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
*/
CKEDITOR.plugins.setLang("devtools","he",{title:"מידע על האלמנט",dialogName:"שם הדיאלוג",tabName:"שם הטאב",elementId:"ID של האלמנט",elementType:"סוג האלמנט"});
|
wcadena/inventarioFinalApp
|
public/js/plugins/ckeditor/plugins/devtools/lang/he.js
|
JavaScript
|
epl-1.0
| 368
|
/*******************************************************************************
* Copyright (c) 2021 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package com.ibm.ws.wssecurity.fat.cxf.samltoken2.TwoServerTests;
import java.util.ArrayList;
import java.util.List;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.gargoylesoftware.htmlunit.WebClient;
import com.ibm.websphere.simplicity.log.Log;
import com.ibm.ws.security.fat.common.ValidationData.validationData;
import com.ibm.ws.security.saml20.fat.commonTest.SAMLCommonTestHelpers;
import com.ibm.ws.security.saml20.fat.commonTest.SAMLConstants;
import com.ibm.ws.security.saml20.fat.commonTest.SAMLMessageConstants;
import com.ibm.ws.security.saml20.fat.commonTest.SAMLTestSettings;
import com.ibm.ws.wssecurity.fat.cxf.samltoken2.common.CxfSAMLCallerTests;
//issue 18363
import java.util.Set;
import componenttest.annotation.SkipForRepeat;
import componenttest.annotation.AllowedFFDC;
import componenttest.annotation.ExpectedFFDC;
import componenttest.custom.junit.runner.FATRunner;
import componenttest.custom.junit.runner.Mode;
import componenttest.custom.junit.runner.Mode.TestMode;
import componenttest.topology.impl.LibertyServerWrapper;
import static componenttest.annotation.SkipForRepeat.EE9_FEATURES;
import componenttest.rules.repeater.EmptyAction;
import componenttest.rules.repeater.EE8FeatureReplacementAction;
/**
* In general, these tests perform a simple IdP initiated SAML Web SSO, using
* httpunit to simulate browser requests. In this scenario, a Web client
* accesses a static Web page on IdP and obtains a a SAML HTTP-POST link
* to an application installed on a WebSphere SP. When the Web client
* invokes the SP application, it is redirected to a TFIM IdP which issues
* a login challenge to the Web client. The Web Client fills in the login
* form and after a successful login, receives a SAML 2.0 token from the
* TFIM IdP. The client invokes the SP application by sending the SAML
* 2.0 token in the HTTP POST request.
*/
@SkipForRepeat({ EE9_FEATURES })
@LibertyServerWrapper
@Mode(TestMode.FULL)
@RunWith(FATRunner.class)
public class CxfSAMLCaller2ServerTests extends CxfSAMLCallerTests {
private static final Class<?> thisClass = CxfSAMLCaller2ServerTests.class;
String defaultIDPRealm = "testuser";
String defaultIDPIdentifierRealm = "test_realmIdentifier";
String defaultLocalRealm = "BasicRealm";
String defaultServerCfgRealm = "saml.test";
String defaultLocalUser = "testuser";
String defaultIDPUser = "testuser";
String defaultIDPIdentifierUser = "test_userIdentifier";
String defaultIDPUniqueIdentifierUser = "test_userUniqueIdentifer";
String defaultIDPGroup = "testuser";
String defaultIDPIdentifierGroup = "test_groupIdentifier";
String defaultLocalGroups = "group:" + defaultLocalRealm + "/" + defaultIDPIdentifierGroup;
String defaultIDPGroups = "group:" + defaultIDPIdentifierRealm + "/" + defaultIDPIdentifierGroup;
String defaultServerCfgGroups = "group:" + defaultServerCfgRealm + "/" + defaultIDPIdentifierGroup;
String defaultNullGroup = "null";
String default2ServerServiceName = "FatSamlC02aService";
String default2ServerServicePort = "SamlCallerToken02a";
String default2ServerPolicy = "CallerHttpsPolicy";
String default2ServerServiceClientTitle = "CXF SAML Caller Service Client";;
String badValueString = "SomeBadValue";
String userIdentifierString = "userIdentifier";
String userUniqueIdentifierString = "userUniqueIdentifier";
String groupIdentifierString = "groupIdentifier";
String realmIdentifierString = "realmIdentifier";
@BeforeClass
public static void setupBeforeTest() throws Exception {
userName = "testuser";
userPass = "testuserpwd";
flowType = SAMLConstants.SOLICITED_SP_INITIATED;
msgUtils.printClassName(thisClass.toString());
Log.info(thisClass, "setupBeforeTest", "Prep for test");
// add any additional messages that you want the "start" to wait for
// we should wait for any providers that this test requires
List<String> extraMsgs = new ArrayList<String>();
List<String> extraMsgs2 = new ArrayList<String>();
extraMsgs.add("CWWKT0016I.*samlcallerclient.*");
extraMsgs.add("CWWKS5000I");
extraMsgs.add("CWWKS5002I");
extraMsgs2.add("CWWKT0016I.*samlcallertoken.*");
List<String> extraApps = new ArrayList<String>();
List<String> extraApps2 = new ArrayList<String>();
extraApps.add("samlcallerclient");
extraApps2.add("samlcallertoken");
copyMetaData = false;
testIDPServer = commonSetUp("com.ibm.ws.security.saml.sso-2.0_fat.shibboleth", "server_orig.xml", SAMLConstants.SAML_ONLY_SETUP, SAMLConstants.IDP_SERVER_TYPE, null, null, SAMLConstants.SKIP_CHECK_FOR_SECURITY_STARTED);
copyMetaData = true;
testSAMLServer2 = commonSetUp("com.ibm.ws.wssecurity_fat.saml.2servers", "server_2_caller.xml", SAMLConstants.SAML_ONLY_SETUP, SAMLConstants.SAML_SERVER_TYPE, extraApps2, extraMsgs2, SAMLConstants.EXAMPLE_CALLBACK, SAMLConstants.EXAMPLE_CALLBACK_FEATURE);
copyMetaData = true;
testSAMLServer = commonSetUp("com.ibm.ws.wssecurity_fat.saml.caller", "server_1.xml", SAMLConstants.SAML_ONLY_SETUP, SAMLConstants.SAML_SERVER_TYPE, extraApps, extraMsgs);
// now, we need to update the IDP files
shibbolethHelpers.fixSPInfoInShibbolethServer(testSAMLServer, testIDPServer);
shibbolethHelpers.fixVarsInShibbolethServerWithDefaultValues(testIDPServer);
// now, start the shibboleth app with the updated config info
startShibbolethApp(testIDPServer);
testSAMLServer.getServer().copyFileToLibertyInstallRoot("lib/features", "internalFeatures/securitylibertyinternals-1.0.mf");
helpers.setSAMLServer(testSAMLServer);
commonUtils.fixServer2Ports(testSAMLServer2);
servicePort = Integer.toString(testSAMLServer2.getServerHttpPort());
serviceSecurePort = Integer.toString(testSAMLServer2.getServerHttpsPort());
setActionsForFlowType(flowType);
testSettings.setIdpUserName(userName);
testSettings.setIdpUserPwd(userPass);
testSettings.setSpTargetApp(testSAMLServer.getHttpString() + "/samlcallerclient/CxfSamlCallerSvcClient");
testSettings.setSamlTokenValidationData(testSettings.getIdpUserName(), testSettings.getSamlTokenValidationData().getIssuer(), testSettings.getSamlTokenValidationData().getInResponseTo(), testSettings.getSamlTokenValidationData().getMessageID(), testSettings.getSamlTokenValidationData().getEncryptionKeyUser(), testSettings.getSamlTokenValidationData().getRecipient(), SAMLConstants.AES256);
testSAMLServer.addIgnoredServerExceptions(SAMLMessageConstants.CWWKS5207W_SAML_CONFIG_IGNORE_ATTRIBUTES, SAMLMessageConstants.CWWKG0101W_CONFIG_NOT_VISIBLE_TO_OTHER_BUNDLES, SAMLMessageConstants.CWWKF0001E_FEATURE_MISSING);
testSAMLServer2.addIgnoredServerExceptions(SAMLMessageConstants.CWWKS5207W_SAML_CONFIG_IGNORE_ATTRIBUTES, SAMLMessageConstants.CWWKS5207W_SAML_CONFIG_IGNORE_ATTRIBUTES, SAMLMessageConstants.CWWKS3107W_GROUP_USER_MISMATCH, SAMLMessageConstants.CWWKW0232E_CANNOT_CREATE_SUBJECT_FOR_USER, SAMLMessageConstants.CWWKW0210E_CANNOT_CREATE_SUBJECT, SAMLMessageConstants.CWWKW0228E_SAML_ASSERTION_MISSING, SAMLMessageConstants.CWWKG0101W_CONFIG_NOT_VISIBLE_TO_OTHER_BUNDLES, SAMLMessageConstants.CWWKF0001E_FEATURE_MISSING);
//issue 18363
Set<String> features = testSAMLServer.getServer().getServerConfiguration().getFeatureManager().getFeatures();
if (features.contains("jaxws-2.2")) {
setFeatureVersion("EE7");
} else if (features.contains("jaxws-2.3")) {
setFeatureVersion("EE8");
} else if (features.contains("xmlWS-3.0")) {
setFeatureVersion("EE9");
}// End of 18363
}
/**
* Build expecations to validate identity tests
*
* @param settings
* - test settings
* @param realmName
* - the realm name to validate
* @param user
* - user/princ to validate
* @param group
* - group to validate
* @return - a list of expectations
* @throws Exception
*/
public List<validationData> buildExpectationsWithIdentityInfo(SAMLTestSettings settings, String realmName, String user, String group) throws Exception {
String searchString = ".*realm name:.*" + realmName + ".*PrincipalUserID:.*" + user + ".*Groups:.*" + group + ".*";
List<validationData> expectations = helpers.setDefaultGoodSAMLCXFExpectations(null, flowType, settings);
expectations = vData.addExpectation(expectations, SAMLConstants.INVOKE_ACS_WITH_SAML_RESPONSE, SAMLConstants.RESPONSE_FULL, SAMLConstants.STRING_MATCHES, "Did not receive the expected identity settings.", null, searchString);
return expectations;
}
/**
* Sets the CXF settings for caller tests
*
* @param partToCheck
* - what we'll validate in the body of the msg
* @param testMode
* - is this a positive or negative test
* @return - returns updated SAML test settings
* @throws Exception
*/
public SAMLTestSettings setCallerCXFSettings(String partToCheck, String testMode) throws Exception {
SAMLTestSettings updatedTestSettings = testSettings.copyTestSettings();
updatedTestSettings.updatePartnerInSettings("sp1", true);
updatedTestSettings.setCXFSettings(_testName, "cxf", servicePort, serviceSecurePort, "testuser", "testuserpwd", default2ServerServiceName, default2ServerServicePort, "", "False", null, null);
updatedTestSettings.getCXFSettings().setBodyPartToCheck(partToCheck);
updatedTestSettings.getCXFSettings().setTitleToCheck(default2ServerServiceClientTitle);
updatedTestSettings.getCXFSettings().setTestMode(testMode);
return updatedTestSettings;
}
/**
* Performs the common steps of a positive - caller passes in values specific to it's test - all of the "steps" are common to
* a positive test, so these steps are consolidated here
*
* @param serverCfgFile
* - name of the server 2 config file to reconfig to
* @param expectedRealm
* - the realm name used by this test
* @param expectedUser
* - the user used by this test
* @param expectedGroup
* - the group used by this test
* @throws Exception
*/
public void generalPositiveTest(String serverCfgFile, String expectedRealm, String expectedUser, String expectedGroup) throws Exception {
testSAMLServer2.reconfigServer(buildSPServerName(serverCfgFile), _testName, SAMLConstants.NO_EXTRA_MSGS, SAMLConstants.JUNIT_REPORTING);
// Create the conversation object which will maintain state for us
WebClient webClient = SAMLCommonTestHelpers.getWebClient();
// Added to fix hostname mismatch to Common Name on the server certificate. This change ignore this check
// If set to true, the client will accept connections to any host, regardless of whether they have valid certificates or not.
webClient.getOptions().setUseInsecureSSL(true);
String partToCheck = "pass:true::FatSamlC02aService";
String testMode = "positive";
SAMLTestSettings updatedTestSettings = setCallerCXFSettings(partToCheck, testMode);
genericSAML(_testName, webClient, updatedTestSettings, standardFlow, buildExpectationsWithIdentityInfo(updatedTestSettings, expectedRealm, expectedUser, expectedGroup));
}
/**
* Performs the common steps of a not found exception type test - caller passes in values specific to it's test - all of the
* steps are common to a not found exception tests, they these steps are consolidated here
*
* @param serverCfgFile
* - name of the server 2 config file to reconfig to
* @throws Exception
*/
public void notfoundExceptionTest(String serverCfgFile) throws Exception {
testSAMLServer2.reconfigServer(buildSPServerName(serverCfgFile), _testName, SAMLConstants.NO_EXTRA_MSGS, SAMLConstants.JUNIT_REPORTING);
// Create the conversation object which will maintain state for us
WebClient webClient = SAMLCommonTestHelpers.getWebClient();
// Added to fix hostname mismatch to Common Name on the server certificate. This change ignore this check
// If set to true, the client will accept connections to any host, regardless of whether they have valid certificates or not.
webClient.getOptions().setUseInsecureSSL(true);
String partToCheck = ".*pass:false::FatSamlC02aService.*SOAPFaultException.*security token could not be authenticated or authorized.*";
String testMode = "negative";
SAMLTestSettings updatedTestSettings = setCallerCXFSettings(partToCheck, testMode);
List<validationData> expectations = helpers.setErrorSAMLCXFExpectationsMatches(null, flowType, updatedTestSettings, null);
expectations = vData.addExpectation(expectations, SAMLConstants.INVOKE_ACS_WITH_SAML_RESPONSE, SAMLConstants.SAML_MESSAGES_LOG, SAMLConstants.STRING_CONTAINS, "Did not receive the proper failure.", null, "SOAPFaultException");
genericSAML(_testName, webClient, updatedTestSettings, standardFlow, expectations);
}
public void notfoundExceptionTestEE8(String serverCfgFile) throws Exception {
testSAMLServer2.reconfigServer(buildSPServerName(serverCfgFile), _testName, SAMLConstants.NO_EXTRA_MSGS, SAMLConstants.JUNIT_REPORTING);
// Create the conversation object which will maintain state for us
WebClient webClient = SAMLCommonTestHelpers.getWebClient();
// Added to fix hostname mismatch to Common Name on the server certificate. This change ignore this check
// If set to true, the client will accept connections to any host, regardless of whether they have valid certificates or not.
webClient.getOptions().setUseInsecureSSL(true);
String partToCheck = ".*pass:false::FatSamlC02aService.*SOAPFaultException.*An error happened processing a SAML Token: \"invalid user ID\"*";//@AV999 TODO set the message depending on the runtime
String testMode = "negative";
SAMLTestSettings updatedTestSettings = setCallerCXFSettings(partToCheck, testMode);
List<validationData> expectations = helpers.setErrorSAMLCXFExpectationsMatches(null, flowType, updatedTestSettings, null);
expectations = vData.addExpectation(expectations, SAMLConstants.INVOKE_ACS_WITH_SAML_RESPONSE, SAMLConstants.SAML_MESSAGES_LOG, SAMLConstants.STRING_CONTAINS, "Did not receive the proper failure.", null, "SOAPFaultException");
genericSAML(_testName, webClient, updatedTestSettings, standardFlow, expectations);
}
/**
* Performs the common steps of a bad attribute type test - caller passes in values specific to it's test - all of the steps
* are common to a bad attribute exception tests, they these steps are consolidated here
*
* @param serverCfgFile
* - name of the server 2 config file to reconfig to
* @param attrName
* - the attribute name that is bad (and will be checked for in the logged message)
* @throws Exception
*/
public void badAttrValueTest(String serverCfgFile, String attrName) throws Exception {
testSAMLServer2.reconfigServer(buildSPServerName(serverCfgFile), _testName, SAMLConstants.NO_EXTRA_MSGS, SAMLConstants.JUNIT_REPORTING);
// Create the conversation object which will maintain state for us
WebClient webClient = SAMLCommonTestHelpers.getWebClient();
// Added to fix hostname mismatch to Common Name on the server certificate. This change ignore this check
// If set to true, the client will accept connections to any host, regardless of whether they have valid certificates or not.
webClient.getOptions().setUseInsecureSSL(true);
String partToCheck = ".*pass:false::FatSamlC02aService.*CWWKW0228E.*\\[" + badValueString + "\\].*\\[" + attrName + "\\].*";
String testMode = "negative";
SAMLTestSettings updatedTestSettings = setCallerCXFSettings(partToCheck, testMode);
List<validationData> expectations = helpers.setErrorSAMLCXFExpectationsMatches(null, flowType, updatedTestSettings, null);
expectations = vData.addExpectation(expectations, SAMLConstants.INVOKE_ACS_WITH_SAML_RESPONSE, SAMLConstants.SAML_MESSAGES_LOG, SAMLConstants.STRING_CONTAINS, "Did not receive the proper failure.", null, "CWWKW0228E");
genericSAML(_testName, webClient, updatedTestSettings, standardFlow, expectations);
}
/***************************************** TESTS **************************************/
/*
* This test verifies the realm, user and group that are in the subject. The values
* are set based on several configuration options.
* These tests will modify the configuration and then check for the appropriate values in the subject.
*/
/******* mapToUserRegistry = Group *******/
/********** identifiers are Good **********/
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: test_userIdentifier
* Group: An IPD group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_identifiersGood() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_identifiersGood.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPGroups);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_identifiersGood_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPGroups);
} //End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: Default IDP server's realm
* User: test_userIdentifier
* Group: Default IDP Group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_identifiersGood() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_identifiersGood.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPIdentifierGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_identifiersGood_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPIdentifierGroup);
} //End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is Group1 in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: Default IDP server's realm
* User: test_userIdentifier
* Group: Default IDP Group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_groupNotInRegistry_identifiersGood() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_groupNotInRegistry_identifiersGood.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_groupNotInRegistry_identifiersGood_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
} //End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is Group1 in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: Default IDP server's realm
* User: test_userIdentifier
* Group: Default IDP Group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_group2InRegistry_identifiersGood() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_group2InRegistry_identifiersGood.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_group2InRegistry_identifiersGood_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
}//End of 18363
}
/********** identifiers are Omitted **********/
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = omitted
* userUniqueIdentifier = omitted
* groupIdentfier = omitted
* realmIdentifier = omitted
*
* Expected/checked values:
* Realm: Local server's configured realm
* User: testuser
* Group: null
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_identifiersOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_identifiersOmitted.xml", defaultServerCfgRealm, defaultIDPUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_identifiersOmitted_ee8.xml", defaultServerCfgRealm, defaultIDPUser, defaultNullGroup);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = Omitted
* userUniqueIdentifier = Omitted
* groupIdentfier = Omitted
* realmIdentifier = Omitted
*
* Expected/checked values:
* Realm: Configured server's realm
* User: testuser
* Group: null
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_identifiersOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_identifiersOmitted.xml", defaultServerCfgRealm, defaultIDPUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_identifiersOmitted_ee8.xml", defaultServerCfgRealm, defaultIDPUser, defaultNullGroup);
} //End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = omitted
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: test_userIdentifier
* Group: null
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_groupIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_groupIdentifierOmitted.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_groupIdentifierOmitted_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = Omitted
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: test_userIdentifier
* Group: null
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_groupIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_groupIdentifierOmitted.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_groupIdentifierOmitted_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = omitted
*
* Expected/checked values:
* Realm: Local server's realm
* User: test_userIdentifier
* Group: Local server's group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_realmIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_realmIdentifierOmitted.xml", defaultLocalRealm, defaultIDPIdentifierUser, defaultLocalGroups);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_realmIdentifierOmitted_ee8.xml", defaultLocalRealm, defaultIDPIdentifierUser, defaultLocalGroups);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = Omitted
*
* Expected/checked values:
* Realm: Local server's realm
* User: test_userIdentifier
* Group: null
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_realmIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_realmIdentifierOmitted.xml", defaultLocalRealm, defaultIDPIdentifierUser, defaultLocalGroups);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_realmIdentifierOmitted_ee8.xml", defaultLocalRealm, defaultIDPIdentifierUser, defaultLocalGroups);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = omitted
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: testuser
* Group: An IPD group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_userIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_userIdentifierOmitted.xml", defaultIDPIdentifierRealm, defaultIDPUser, defaultIDPGroups);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_userIdentifierOmitted_ee8.xml", defaultIDPIdentifierRealm, defaultIDPUser, defaultIDPGroups);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = Omitted
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: testuser
* Group: Default IDP Group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_userIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_userIdentifierOmitted.xml", defaultIDPIdentifierRealm, defaultIDPUser, defaultIDPGroups);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_userIdentifierOmitted_ee8.xml", defaultIDPIdentifierRealm, defaultIDPUser, defaultIDPGroups);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = valid value
* userUniqueIdentifier = Omitted
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: test_userIdentifier
* Group: An IPD group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_userUniqueIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_userUniqueIdentifierOmitted.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPGroups);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_userUniqueIdentifierOmitted_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPGroups);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = Omitted
* groupIdentfier = valid value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: test_userIdentifier
* Group: Default IDP Group
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_userUniqueIdentifierOmitted() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_userUniqueIdentifierOmitted.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPGroups);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_userUniqueIdentifierOmitted_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultIDPGroups);
}//End of 18363
}
/********** identifiers are Bad **********/
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = BAD value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: Local server's realm
* User: test_userIdentifier
* Group: Local Server groups
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_groupIdentifierBad() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_groupIdentifierBad.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_inRegistry_groupIdentifierBad_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = BAD value
* realmIdentifier = valid value
*
* Expected/checked values:
* Realm: IDP server's realm
* User: test_userIdentifier
* Group: null
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_groupIdentifierBad() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_groupIdentifierBad.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
} else if ("EE8".equals(getFeatureVersion())) {
generalPositiveTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_groupIdentifierBad_ee8.xml", defaultIDPIdentifierRealm, defaultIDPIdentifierUser, defaultNullGroup);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = true
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = BAD value
*
* Expected/checked values:
* Bad Attribute exception - looking for realmIdentifier in the message
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@ExpectedFFDC(value = { "com.ibm.ws.wssecurity.caller.SamlCallerTokenException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@ExpectedFFDC(value = { "com.ibm.ws.wssecurity.caller.SamlCallerTokenException" }, repeatAction = { EmptyAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_inRegistry_realmIdentifierBad() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
badAttrValueTest("server_2_caller_mapToUserRegistry_Group_inRegistry_realmIdentifierBad.xml", realmIdentifierString);
} else if ("EE8".equals(getFeatureVersion())) {
badAttrValueTest("server_2_caller_mapToUserRegistry_Group_inRegistry_realmIdentifierBad_ee8.xml", realmIdentifierString);
}//End of 18363
}
/*
* config settings:
* mapToUserRegistry = Group
* is User in the Registry = False
* userIdentifier = valid value
* userUniqueIdentifier = valid value
* groupIdentfier = valid value
* realmIdentifier = BAD value
*
* Expected/checked values:
* Bad Attribute exception - looking for realmIdentifier in the message
*/
@AllowedFFDC(value = { "java.util.MissingResourceException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@ExpectedFFDC(value = { "com.ibm.ws.wssecurity.caller.SamlCallerTokenException" }, repeatAction = { EE8FeatureReplacementAction.ID })
@ExpectedFFDC(value = { "com.ibm.ws.wssecurity.caller.SamlCallerTokenException" }, repeatAction = { EmptyAction.ID })
@Test
public void testCxfCaller_mapToUserRegistry_Group_notInRegistry_realmIdentifierBad() throws Exception {
//issue 18363
if ("EE7".equals(getFeatureVersion())) {
badAttrValueTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_realmIdentifierBad.xml", realmIdentifierString);
} else if ("EE8".equals(getFeatureVersion())) {
badAttrValueTest("server_2_caller_mapToUserRegistry_Group_notInRegistry_realmIdentifierBad_ee8.xml", realmIdentifierString);
}//End of 18363
}
}
|
OpenLiberty/open-liberty
|
dev/com.ibm.ws.wssecurity_fat.wsscxf.saml.2/fat/src/com/ibm/ws/wssecurity/fat/cxf/samltoken2/TwoServerTests/CxfSAMLCaller2ServerTests.java
|
Java
|
epl-1.0
| 38,936
|
package org.scaledl.overview.diagram.features;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.graphiti.features.IAddFeature;
import org.eclipse.graphiti.features.IFeatureProvider;
import org.eclipse.graphiti.features.IReason;
import org.eclipse.graphiti.features.IRemoveFeature;
import org.eclipse.graphiti.features.IUpdateFeature;
import org.eclipse.graphiti.features.context.IUpdateContext;
import org.eclipse.graphiti.features.context.impl.AddConnectionContext;
import org.eclipse.graphiti.features.context.impl.AddContext;
import org.eclipse.graphiti.features.context.impl.RemoveContext;
import org.eclipse.graphiti.features.context.impl.UpdateContext;
import org.eclipse.graphiti.features.impl.DefaultUpdateDiagramFeature;
import org.eclipse.graphiti.features.impl.Reason;
import org.eclipse.graphiti.mm.pictograms.Anchor;
import org.eclipse.graphiti.mm.pictograms.AnchorContainer;
import org.eclipse.graphiti.mm.pictograms.ContainerShape;
import org.eclipse.graphiti.mm.pictograms.PictogramElement;
import org.eclipse.graphiti.mm.pictograms.Shape;
import org.eclipse.graphiti.services.Graphiti;
import org.scaledl.overview.Overview;
import org.scaledl.overview.architecture.CloudEnvironment;
import org.scaledl.overview.architecture.Connection;
import org.scaledl.overview.architecture.ExternalConnection;
import org.scaledl.overview.architecture.InternalConnection;
import org.scaledl.overview.architecture.Proxy;
public class UpdateDiagramFeature extends DefaultUpdateDiagramFeature{
public UpdateDiagramFeature(IFeatureProvider fp) {
super(fp);
// TODO Auto-generated constructor stub
}
public boolean canUpdate(IUpdateContext context) {
// return true, if linked business object is an EClass
Object bo = getBusinessObjectForPictogramElement(context.getPictogramElement());
return (bo instanceof Overview);
}
public IReason updateNeeded(IUpdateContext context) {
if (updateNeededCloudEnvironments(context))
{
return Reason.createTrueReason("CloudEnvironments out of sync.");
}
if (updateNeededProxies(context))
{
return Reason.createTrueReason("Proxies out of sync.");
}
if (updateNeededConnections(context))
{
return Reason.createTrueReason("Connections out of sync.");
}
return Reason.createFalseReason();
}
public boolean update(IUpdateContext context) {
// retrieve name from business model
updateCloudEnviroments(context);
updateProxies(context);
updateConnections(context);
return true;
}
private boolean updateNeededCloudEnvironments (IUpdateContext context)
{
List<CloudEnvironment> cloudEnvironments = getCloudEnvironments(context);
Map<CloudEnvironment, Shape> ceMap = getCloudEnvironmentsDiagram(context);
Set<CloudEnvironment> cloudEnvironmentsDiagram = ceMap.keySet();
// Easy check
if (cloudEnvironments.size() != cloudEnvironmentsDiagram.size())
return true;
cloudEnvironments.removeAll(cloudEnvironmentsDiagram);
if (!cloudEnvironments.isEmpty())
return true;
return false;
}
private boolean updateNeededProxies (IUpdateContext context)
{
List<Proxy> proxies = getProxies(context);
Map<Proxy, Shape> proxyMap = getProxiesDiagram(context);
Set<Proxy> proxiesDiagram = proxyMap.keySet();
// Easy check
if (proxies.size() != proxiesDiagram.size())
return true;
proxies.removeAll(proxiesDiagram);
if (!proxies.isEmpty())
return true;
return false;
}
private boolean updateNeededConnections (IUpdateContext context)
{
List<Connection> connections = getConnections(context);
Map<Connection, org.eclipse.graphiti.mm.pictograms.Connection> connectionsMap = getConnectionsDiagram(context);
Set<Connection> connectionsDiagram = connectionsMap.keySet();
// Easy check
if (connections.size() != connectionsDiagram.size())
return true;
connections.removeAll(connectionsDiagram);
if (!connections.isEmpty())
return true;
return false;
}
private void updateCloudEnviroments (IUpdateContext context)
{
List<CloudEnvironment> cloudEnvironments = getCloudEnvironments(context);
Map<CloudEnvironment, Shape> ceMap = getCloudEnvironmentsDiagram(context);
Set<CloudEnvironment> cloudEnvironmentsDiagram = ceMap.keySet();
// TODO: Remove deleted cloud environments
// Add created (missing) cloud environments
for (CloudEnvironment ce : cloudEnvironments)
{
if (!cloudEnvironmentsDiagram.contains(ce))
{
addCloudEnvironment(context, ce);
}
}
for (CloudEnvironment ce : cloudEnvironmentsDiagram)
{
if (!cloudEnvironments.contains(ce))
removeElement(ceMap.get(ce));
}
}
private void updateProxies (IUpdateContext context)
{
List<Proxy> proxies = getProxies(context);
Map<Proxy, Shape> proxyMap = getProxiesDiagram(context);
Set<Proxy> proxiesDiagram = proxyMap.keySet();
// TODO: Remove deleted proxies
// Add created (missing) proxies
for (Proxy proxy : proxies)
{
if (!proxiesDiagram.contains(proxy))
{
addProxy(context, proxy);
}
}
for (Proxy proxy : proxiesDiagram)
{
if (!proxies.contains(proxy))
removeElement(proxyMap.get(proxy));
}
}
private void updateConnections (IUpdateContext context)
{
List<Connection> connections = getConnections(context);
Map<Connection, org.eclipse.graphiti.mm.pictograms.Connection> connectionsMap = getConnectionsDiagram(context);
Set<Connection> connectionsDiagram = connectionsMap.keySet();
System.out.println("dd");
// TODO: Remove deleted cloud environments
// Add created (missing) cloud environments
for (Connection connection : connections)
{
if (!connectionsDiagram.contains(connection))
{
addConnection(context, connection);
}
}
for (Connection connection : connectionsDiagram)
{
if (!connections.contains(connection))
removeElement(connectionsMap.get(connection));
}
}
private void addProxy (IUpdateContext context, Proxy proxy)
{
AddContext ac = new AddContext();
ac.setLocation(30, 30);
ac.setSize(100, 100);
ac.setNewObject(proxy);
ac.setTargetContainer(getDiagram());
IAddFeature addFeature = getFeatureProvider().getAddFeature(ac);
if (addFeature.canExecute(ac))
addFeature.execute(ac);
}
private void addConnection (IUpdateContext context, Connection connection)
{
Graphiti.getPeCreateService();
List<PictogramElement> targetElements;
List<PictogramElement> sourceElements;
if (connection instanceof InternalConnection)
{
InternalConnection ic = (InternalConnection) connection;
sourceElements = Graphiti.getLinkService().getPictogramElements(getDiagram(), ic.getSource());
targetElements = Graphiti.getLinkService().getPictogramElements(getDiagram(), ic.getTarget());
}
else
{
ExternalConnection ec = (ExternalConnection) connection;
sourceElements = Graphiti.getLinkService().getPictogramElements(getDiagram(), ec.getSource());
targetElements = Graphiti.getLinkService().getPictogramElements(getDiagram(), ec.getTarget());
}
if (sourceElements.size() != 1 || targetElements.size() != 1)
{
// Ignore
// Source or target does not exist yet
// Probably CloudEnvironment must be updated, which
// updates also diagram
return;
}
PictogramElement source = sourceElements.get(0);
PictogramElement target = targetElements.get(0);
if (!(source instanceof AnchorContainer && target instanceof AnchorContainer))
{
throw new IllegalStateException();
}
Anchor sourceAnchor = ((AnchorContainer)source).getAnchors().get(0);
Anchor targetAnchor = ((AnchorContainer)target).getAnchors().get(0);
AddConnectionContext ac = new AddConnectionContext(sourceAnchor, targetAnchor);
ac.setNewObject(connection);
IAddFeature addFeature = getFeatureProvider().getAddFeature(ac);
if (addFeature.canExecute(ac))
addFeature.execute(ac);
}
private void addCloudEnvironment (IUpdateContext context, CloudEnvironment ce)
{
AddContext ac = new AddContext();
ac.setLocation(30, 30);
ac.setSize(100, 100);
ac.setNewObject(ce);
ac.setTargetContainer(getDiagram());
IAddFeature addFeature = getFeatureProvider().getAddFeature(ac);
if (addFeature.canExecute(ac))
addFeature.execute(ac);
PictogramElement pe = Graphiti.getLinkService().getPictogramElements(getDiagram(), ce).get(0);
// Force update - if not user needs to click on update action to trigger update
// If not updates, service pictograms does not exist and connections cannot be made
UpdateContext uc = new UpdateContext(pe);
IUpdateFeature updateFeature = getFeatureProvider().getUpdateFeature(uc);
if (updateFeature.canExecute(uc))
updateFeature.execute(uc);
}
private void removeElement (PictogramElement element)
{
RemoveContext removeContext = new RemoveContext(element);
IRemoveFeature removeFeature = getFeatureProvider().getRemoveFeature(removeContext);
if (removeFeature.canExecute(removeContext))
removeFeature.execute(removeContext);
}
public Overview getOverview (IUpdateContext context)
{
PictogramElement pictogramElement = context.getPictogramElement();
Overview overview = (Overview) getBusinessObjectForPictogramElement(pictogramElement);
return overview;
}
public List<Proxy> getProxies (IUpdateContext context)
{
Overview overview = getOverview(context);
return new LinkedList<Proxy>(overview.getArchitecture().getProxies());
}
public Map<Proxy, Shape> getProxiesDiagram (IUpdateContext context)
{
HashMap<Proxy, Shape> mapProxies = new HashMap<Proxy, Shape>();
ContainerShape cs = (ContainerShape)context.getPictogramElement();
for (Shape shape : cs.getChildren())
{
if (shape.getLink() != null)
{
if (!shape.getLink().getBusinessObjects().isEmpty());
{
EObject eObject = shape.getLink().getBusinessObjects().get(0);
if (eObject instanceof Proxy)
{
mapProxies.put((Proxy) eObject, shape);
}
}
}
}
return mapProxies;
}
public List<CloudEnvironment> getCloudEnvironments (IUpdateContext context)
{
Overview overview = getOverview(context);
return overview.getArchitecture().getCloudEnvironments();
}
public Map<CloudEnvironment, Shape> getCloudEnvironmentsDiagram (IUpdateContext context)
{
ContainerShape cs = (ContainerShape) context.getPictogramElement();
HashMap<CloudEnvironment, Shape> mapEnvironments = new HashMap<CloudEnvironment, Shape>();
for (Shape shape : cs.getChildren())
{
if (shape.getLink() != null)
{
if (!shape.getLink().getBusinessObjects().isEmpty());
{
EObject eObject = shape.getLink().getBusinessObjects().get(0);
if (eObject instanceof CloudEnvironment)
{
mapEnvironments.put((CloudEnvironment) eObject, shape);
}
}
}
}
return mapEnvironments;
}
public List<Connection> getConnections (IUpdateContext context)
{
Overview overview = getOverview(context);
LinkedList<Connection> connections = new LinkedList<Connection>();
TreeIterator<EObject> allContents = overview.eResource().getAllContents();
while (allContents.hasNext())
{
EObject o = allContents.next();
if (o instanceof Connection)
connections.add((Connection)o);
}
return connections;
}
public Map<Connection, org.eclipse.graphiti.mm.pictograms.Connection> getConnectionsDiagram (IUpdateContext context)
{
HashMap<Connection,org.eclipse.graphiti.mm.pictograms.Connection> mapConnections = new HashMap<Connection, org.eclipse.graphiti.mm.pictograms.Connection>();
for (org.eclipse.graphiti.mm.pictograms.Connection connectionDiagram : getDiagram().getConnections())
{
if (connectionDiagram.getLink() != null)
{
if (!connectionDiagram.getLink().getBusinessObjects().isEmpty())
{
EObject o = connectionDiagram.getLink().getBusinessObjects().get(0);
if (o instanceof Connection)
mapConnections.put((Connection) o, connectionDiagram);
}
}
}
return mapConnections;
}
@SuppressWarnings("unused")
private void removeUnlinkedElements (IUpdateContext context)
{
for (org.eclipse.graphiti.mm.pictograms.Connection connectionDiagram : getDiagram().getConnections())
{
if (connectionDiagram.getLink() == null ||
connectionDiagram.getLink().getBusinessObjects().isEmpty() //||
)
{
if (!connectionDiagram.getLink().getBusinessObjects().isEmpty())
{
EObject o = connectionDiagram.getLink().getBusinessObjects().get(0);
}
}
}
}
}
|
CloudScale-Project/Environment
|
plugins/org.scaledl.overview.diagram/src/org/scaledl/overview/diagram/features/UpdateDiagramFeature.java
|
Java
|
epl-1.0
| 12,639
|
package hu.bme.mit.trainbenchmark.benchmark.orientdb;
import java.io.IOException;
import org.apache.commons.cli.ParseException;
public class OrientDbBenchmarkMain {
public static void main(String[] args) throws IOException, ParseException {
OrientDbBenchmarkLogic benchmarkLogic = new OrientDbBenchmarkLogic(args);
benchmarkLogic.runBenchmark();
}
}
|
zolko/onlab
|
orientdbenchmark/src/main/java/hu/bme/mit/trainbenchmark/benchmark/orientdb/OrientDbBenchmarkMain.java
|
Java
|
epl-1.0
| 361
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>TB9.2 Example Applications: libmexample</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
<link type="text/css" rel="stylesheet" href="../css/common.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="../css/sdl.css" media="screen"/>
<!--[if IE]>
<link href="../css/iefix.css" rel="stylesheet" type="text/css" media="screen" />
<![endif]-->
</head>
<body class="kernelguide">
<?php include_once (CURRENT_SKIN_PATH.'/sdl_header.html'); ?>
<div id="sdl_container">
<div id="leftMenu">
<div id="expandcontractdiv">
<a id="collapseTree" href="javascript:tree.collapseAll()">
Collapse all
</a>
<a id="index" href="index.html">
Symbian^3 Product Developer Library
</a>
</div>
<iframe style="border:none" height="800" width="300" src="index-toc.html"></iframe>
<div id="treeDiv1">
 
</div>
<script type="text/javascript">
var currentIconMode = 0;
YAHOO.util.Event.onDOMReady(buildTree, this,true);
</script>
</div>
<div id="sdl_content">
<!-- Generated by Doxygen 1.6.2 -->
<div class="contents">
<h1><a class="anchor" id="guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b">libmexample </a></h1><p>Source files:</p>
<ul>
<li><a href="_p_i_p_s_2libmexample_2_bld_8inf_source.html">bld.inf</a></li>
<li><a href="libmexample_8c_source.html">libmexample.c</a></li>
<li><a href="libmexample_8mmp_source.html">libmexample.mmp</a> </li>
</ul>
</div>
<hr size="1"/><address style="text-align: right;"><small>Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address>
<p class="copyright">Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).<br /> All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the <a href=" http://www.eclipse.org/legal/epl-v10.html"> Eclipse Public License
v1.0</a>.</p>
</div>
</div>
<?php include_once (CURRENT_SKIN_PATH.'/sdl_footer.html'); ?>
</body>
</html>
|
warlordh/fork_Symbian
|
pdk/guid-6013a680-57f9-415b-8851-c4fa63356636/guid-b6b7503f-d331-4664-a6c8-a3e72b1f6c5b.html
|
HTML
|
epl-1.0
| 2,359
|
#Author velociraptor Genjix <aphidia@hotmail.com>
from PySide.QtGui import *
from PySide.QtCore import *
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
button = QPushButton(self)
button.setGeometry(QRect(100, 100, 100, 100))
machine = QStateMachine(self)
s1 = QState()
s1.assignProperty(button, 'text', 'Outside')
s2 = QState()
s2.assignProperty(button, 'text', 'Inside')
enterTransition = QEventTransition(button, QEvent.Enter)
enterTransition.setTargetState(s2)
s1.addTransition(enterTransition)
leaveTransition = QEventTransition(button, QEvent.Leave)
leaveTransition.setTargetState(s1)
s2.addTransition(leaveTransition)
s3 = QState()
s3.assignProperty(button, 'text', 'Pressing...')
pressTransition = QEventTransition(button, QEvent.MouseButtonPress)
pressTransition.setTargetState(s3)
s2.addTransition(pressTransition)
releaseTransition = QEventTransition(button, QEvent.MouseButtonRelease)
releaseTransition.setTargetState(s2)
s3.addTransition(releaseTransition)
machine.addState(s1)
machine.addState(s2)
machine.addState(s3)
machine.setInitialState(s1)
machine.start()
self.setCentralWidget(button)
self.show()
if __name__ == '__main__':
import sys
app = QApplication(sys.argv)
mainWin = MainWindow()
sys.exit(app.exec_())
|
Southpaw-TACTIC/Team
|
src/python/Lib/site-packages/PySide/examples/state-machine/eventtrans.py
|
Python
|
epl-1.0
| 1,534
|
/*
* Copyright 2016 Axel Faust
*
* Licensed under the Eclipse Public License (EPL), Version 1.0 (the "License"); you may not use
* this file except in compliance with the License. You may obtain a copy of the License at
*
* https://www.eclipse.org/legal/epl-v10.html
*
* Unless required by applicable law or agreed to in writing, software distributed under the
* License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package de.axelfaust.alfresco.nashorn.repo.processor;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import jdk.nashorn.api.scripting.AbstractJSObject;
import org.alfresco.util.ParameterCheck;
/**
* @author Axel Faust
*/
@SuppressWarnings({ "restriction", "resource" })
public class NashornScriptModelAwareContainer extends AbstractJSObject
{
/**
* The set of supported data container types.
*
* @author Axel Faust
*/
public static enum DataContainerType
{
/** Provides a list-/array-like indexed data container */
INDEXED,
/** Provides an object-/map-like associative data container */
ASSOCIATIVE;
}
/**
*
* This single abstract method (SAM) interface allows scripts to provide callback functions to a model-aware container to derive the
* initial value of a field in an associative data container.
*
* @author Axel Faust
*/
@FunctionalInterface
public static interface NamedValueInitializationCallback
{
/**
* Determines the initial value of a specific named member.
*
* @param member
* the name of the member for which to get the initial value
* @return the initial value
*/
Object getInitialValue(String member);
}
private static final Object EXPLICIT_NULL = new Object();
/**
*
* This single abstract method (SAM) interface allows scripts to provide callback functions to a model-aware container to derive the
* initial value of a field in an indexed data container.
*
* @author Axel Faust
*/
@FunctionalInterface
public static interface IndexValueInitializationCallback
{
/**
* Determines the initial value of a specific indexed member.
*
* @param index
* the index of the member for which to get the initial value
* @return the initial value
*/
Object getInitialValue(int index);
}
private final UUID uuid = UUID.randomUUID();
private final DataContainerType type;
private final IndexValueInitializationCallback indexedValueCallback;
private final NamedValueInitializationCallback namedValueCallback;
protected NashornScriptModelAwareContainer(final DataContainerType type)
{
ParameterCheck.mandatory("type", type);
this.type = type;
this.indexedValueCallback = null;
this.namedValueCallback = null;
}
protected NashornScriptModelAwareContainer(final IndexValueInitializationCallback indexValueCallback)
{
ParameterCheck.mandatory("indexValueCallback", indexValueCallback);
this.indexedValueCallback = indexValueCallback;
this.type = DataContainerType.INDEXED;
this.namedValueCallback = null;
}
protected NashornScriptModelAwareContainer(final NamedValueInitializationCallback namedValueCallback)
{
ParameterCheck.mandatory("namedValueCallback", namedValueCallback);
this.namedValueCallback = namedValueCallback;
this.type = DataContainerType.ASSOCIATIVE;
this.indexedValueCallback = null;
}
/**
*
* {@inheritDoc}
*/
@Override
public Object getMember(final String name)
{
Object result;
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
switch (name)
{
case "length":
result = Integer.valueOf(indexContainerData.size());
break;
default:
try
{
final int idx = Integer.parseInt(name);
if (idx >= 0 && idx < indexContainerData.size())
{
result = indexContainerData.get(idx);
}
else
{
result = null;
}
if (result == EXPLICIT_NULL)
{
result = null;
}
else if (result == null && this.indexedValueCallback != null)
{
final Object initialValue = this.indexedValueCallback.getInitialValue(idx);
while (idx > indexContainerData.size())
{
indexContainerData.add(null);
}
indexContainerData.add(initialValue != null ? initialValue : EXPLICIT_NULL);
result = initialValue;
}
}
catch (final NumberFormatException nex)
{
result = null;
}
}
break;
case ASSOCIATIVE:
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
result = associativeContainerData.get(name);
if (result == null)
{
switch (name)
{
case "length":
result = Integer.valueOf(associativeContainerData.size());
break;
default:
if (this.namedValueCallback != null)
{
final Object initialValue = this.namedValueCallback.getInitialValue(name);
associativeContainerData.put(name, initialValue != null ? initialValue : EXPLICIT_NULL);
result = initialValue;
}
}
}
if (result == EXPLICIT_NULL)
{
result = null;
}
break;
default:
result = null;
}
return result;
}
/**
*
* {@inheritDoc}
*/
@Override
public Object getSlot(final int idx)
{
Object result;
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
if (idx >= 0 && idx < indexContainerData.size())
{
result = indexContainerData.get(idx);
}
else
{
result = null;
}
if (result == EXPLICIT_NULL)
{
result = null;
}
else if (result == null && this.indexedValueCallback != null)
{
final Object initialValue = this.indexedValueCallback.getInitialValue(idx);
while (idx > indexContainerData.size())
{
indexContainerData.add(null);
}
indexContainerData.add(initialValue != null ? initialValue : EXPLICIT_NULL);
result = initialValue;
}
break;
case ASSOCIATIVE:
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
result = associativeContainerData.get(Integer.valueOf(idx));
if (result == EXPLICIT_NULL)
{
result = null;
}
break;
default:
result = null;
}
return result;
}
/**
*
* {@inheritDoc}
*/
@Override
public boolean hasMember(final String name)
{
boolean result;
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
try
{
final int idx = Integer.parseInt(name);
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
result = idx >= 0 && idx < indexContainerData.size();
}
catch (final NumberFormatException nex)
{
result = false;
}
break;
case ASSOCIATIVE:
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
result = associativeContainerData.containsKey(name);
break;
default:
result = false;
}
return result;
}
/**
*
* {@inheritDoc}
*/
@Override
public boolean hasSlot(final int idx)
{
boolean result;
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
result = idx >= 0 && idx < indexContainerData.size();
break;
case ASSOCIATIVE:
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
result = associativeContainerData.containsKey(Integer.valueOf(idx));
break;
default:
result = false;
}
return result;
}
/**
*
* {@inheritDoc}
*/
@Override
public void removeMember(final String name)
{
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
try
{
final int idx = Integer.parseInt(name);
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
if (idx >= 0 && idx < indexContainerData.size())
{
indexContainerData.remove(idx);
}
else
{
throw new IllegalArgumentException("Index cannot be negative or equal/larger than current size/length");
}
}
catch (final NumberFormatException nex)
{
throw new IllegalArgumentException("Index must be an integer number");
}
break;
case ASSOCIATIVE:
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
associativeContainerData.remove(name);
break;
default:
throw new UnsupportedOperationException("removeMember not supported by " + this.type);
}
}
/**
*
* {@inheritDoc}
*/
@Override
public void setMember(final String name, final Object value)
{
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
try
{
final int idx = Integer.parseInt(name);
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
if (idx >= 0 && idx < indexContainerData.size())
{
indexContainerData.set(idx, value == null ? EXPLICIT_NULL : value);
}
else if (idx == indexContainerData.size())
{
indexContainerData.add(value == null ? EXPLICIT_NULL : value);
}
else
{
throw new IllegalArgumentException("Index cannot be negative or larger than current size/length");
}
}
catch (final NumberFormatException nex)
{
throw new IllegalArgumentException("Index must be an integer number");
}
break;
case ASSOCIATIVE:
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
associativeContainerData.put(name, value == null ? EXPLICIT_NULL : value);
break;
default:
throw new UnsupportedOperationException("setMember not supported by " + this.type);
}
}
/**
*
* {@inheritDoc}
*/
@Override
public void setSlot(final int idx, final Object value)
{
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
if (idx >= 0 && idx < indexContainerData.size())
{
indexContainerData.set(idx, value == null ? EXPLICIT_NULL : value);
}
else if (idx == indexContainerData.size())
{
indexContainerData.add(value == null ? EXPLICIT_NULL : value);
}
else
{
throw new IllegalArgumentException("Index cannot be negative or larger than current size/length");
}
break;
case ASSOCIATIVE:
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
associativeContainerData.put(Integer.valueOf(idx), value == null ? EXPLICIT_NULL : value);
break;
default:
throw new UnsupportedOperationException("setSlot not supported by " + this.type);
}
}
/**
*
* {@inheritDoc}
*/
@Override
public Set<String> keySet()
{
final Set<String> keys;
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
keys = new LinkedHashSet<String>();
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
for (int idx = 0, max = indexContainerData.size(); idx < max; idx++)
{
keys.add(String.valueOf(idx));
}
break;
case ASSOCIATIVE:
keys = new HashSet<String>();
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
for (final Object key : associativeContainerData.keySet())
{
keys.add(String.valueOf(key));
}
break;
default:
keys = Collections.emptySet();
}
return keys;
}
/**
*
* {@inheritDoc}
*/
@Override
public Collection<Object> values()
{
final Collection<Object> values;
final NashornScriptModel currentModel = NashornScriptModel.getCurrentModel();
switch (this.type)
{
case INDEXED:
values = new ArrayList<Object>();
final List<Object> indexContainerData = currentModel.getOrCreateIndexContainerData(this.uuid);
values.addAll(indexContainerData);
break;
case ASSOCIATIVE:
values = new ArrayList<Object>();
final Map<Object, Object> associativeContainerData = currentModel.getOrCreateAssociativeContainerData(this.uuid);
values.addAll(associativeContainerData.values());
break;
default:
values = Collections.emptySet();
}
return values;
}
// TODO Other hooks
/**
*
* {@inheritDoc}
*/
@Override
public boolean isArray()
{
return this.type == DataContainerType.INDEXED;
}
}
|
AFaust/alfresco-nashorn-script-engine
|
repository/src/main/java/de/axelfaust/alfresco/nashorn/repo/processor/NashornScriptModelAwareContainer.java
|
Java
|
epl-1.0
| 17,784
|
package com.johnhite.casino;
public interface Shuffle {
public void shuffle(Deck deck);
}
|
aikidojohn/casino
|
src/main/java/com/johnhite/casino/Shuffle.java
|
Java
|
epl-1.0
| 92
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 23 08:32:56 PST 2011 -->
<TITLE>
All Classes
</TITLE>
<META NAME="date" CONTENT="2011-12-23">
<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<FONT size="+1" CLASS="FrameHeadingFont">
<B>All Classes</B></FONT>
<BR>
<TABLE BORDER="0" WIDTH="100%" SUMMARY="">
<TR>
<TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="com/t2/biofeedback/device/BioFeedbackDevice.html" title="class in com.t2.biofeedback.device">BioFeedbackDevice</A>
<BR>
<A HREF="com/t2/biofeedback/BioFeedbackService.html" title="class in com.t2.biofeedback">BioFeedbackService</A>
<BR>
<A HREF="com/t2/biofeedback/BioFeedbackService.BroadcastMessage.html" title="class in com.t2.biofeedback">BioFeedbackService.BroadcastMessage</A>
<BR>
<A HREF="com/t2/biofeedback/BioFeedbackService.BroadcastMessage.Id.html" title="class in com.t2.biofeedback">BioFeedbackService.BroadcastMessage.Id</A>
<BR>
<A HREF="com/t2/biofeedback/BioFeedbackService.BroadcastMessage.Type.html" title="class in com.t2.biofeedback">BioFeedbackService.BroadcastMessage.Type</A>
<BR>
<A HREF="com/t2/biofeedback/BioFeedbackServiceManagerReceiver.html" title="class in com.t2.biofeedback">BioFeedbackServiceManagerReceiver</A>
<BR>
<A HREF="com/t2/biofeedback/activity/BTServiceManager.html" title="class in com.t2.biofeedback.activity">BTServiceManager</A>
<BR>
<A HREF="com/t2/biofeedback/Constants.html" title="class in com.t2.biofeedback">Constants</A>
<BR>
<A HREF="com/t2/biofeedback/device/neurosky/DataListener.html" title="interface in com.t2.biofeedback.device.neurosky"><I>DataListener</I></A>
<BR>
<A HREF="com/t2/biofeedback/DeviceManager.html" title="class in com.t2.biofeedback">DeviceManager</A>
<BR>
<A HREF="com/t2/biofeedback/device/Mobi/MobiBH.html" title="class in com.t2.biofeedback.device.Mobi">MobiBH</A>
<BR>
<A HREF="com/t2/biofeedback/device/Mobi/MobiDevice.html" title="class in com.t2.biofeedback.device.Mobi">MobiDevice</A>
<BR>
<A HREF="com/t2/biofeedback/device/Mobi/MobiMessage.html" title="class in com.t2.biofeedback.device.Mobi">MobiMessage</A>
<BR>
<A HREF="com/t2/biofeedback/device/neurosky/NeuroskyBH.html" title="class in com.t2.biofeedback.device.neurosky">NeuroskyBH</A>
<BR>
<A HREF="com/t2/biofeedback/device/neurosky/NeuroskyDevice.html" title="class in com.t2.biofeedback.device.neurosky">NeuroskyDevice</A>
<BR>
<A HREF="com/t2/biofeedback/R.html" title="class in com.t2.biofeedback">R</A>
<BR>
<A HREF="com/t2/biofeedback/R.attr.html" title="class in com.t2.biofeedback">R.attr</A>
<BR>
<A HREF="com/t2/biofeedback/R.drawable.html" title="class in com.t2.biofeedback">R.drawable</A>
<BR>
<A HREF="com/t2/biofeedback/R.id.html" title="class in com.t2.biofeedback">R.id</A>
<BR>
<A HREF="com/t2/biofeedback/R.layout.html" title="class in com.t2.biofeedback">R.layout</A>
<BR>
<A HREF="com/t2/biofeedback/R.string.html" title="class in com.t2.biofeedback">R.string</A>
<BR>
<A HREF="com/t2/biofeedback/device/SerialBTDevice.html" title="class in com.t2.biofeedback.device">SerialBTDevice</A>
<BR>
<A HREF="com/t2/biofeedback/device/SerialBTDevice.DeviceConnectionListener.html" title="interface in com.t2.biofeedback.device"><I>SerialBTDevice.DeviceConnectionListener</I></A>
<BR>
<A HREF="com/t2/biofeedback/device/shimmer/ShimmerBH.html" title="class in com.t2.biofeedback.device.shimmer">ShimmerBH</A>
<BR>
<A HREF="com/t2/biofeedback/device/shimmer/ShimmerDevice.html" title="class in com.t2.biofeedback.device.shimmer">ShimmerDevice</A>
<BR>
<A HREF="com/t2/biofeedback/device/shimmer/ShimmerMessage.html" title="class in com.t2.biofeedback.device.shimmer">ShimmerMessage</A>
<BR>
<A HREF="com/t2/biofeedback/device/Spine/SpineBH.html" title="class in com.t2.biofeedback.device.Spine">SpineBH</A>
<BR>
<A HREF="com/t2/biofeedback/device/Spine/SpineDevice.html" title="class in com.t2.biofeedback.device.Spine">SpineDevice</A>
<BR>
<A HREF="com/t2/biofeedback/SPINEPacketsConstants.html" title="class in com.t2.biofeedback">SPINEPacketsConstants</A>
<BR>
<A HREF="com/t2/biofeedback/SPINESensorConstants.html" title="class in com.t2.biofeedback">SPINESensorConstants</A>
<BR>
<A HREF="com/t2/biofeedback/SPINEServiceMessageConstants.html" title="class in com.t2.biofeedback">SPINEServiceMessageConstants</A>
<BR>
<A HREF="com/t2/biofeedback/device/neurosky/StreamParser.html" title="class in com.t2.biofeedback.device.neurosky">StreamParser</A>
<BR>
<A HREF="com/t2/biofeedback/device/Mobi/Structures.html" title="class in com.t2.biofeedback.device.Mobi">Structures</A>
<BR>
<A HREF="com/t2/biofeedback/Util.html" title="class in com.t2.biofeedback">Util</A>
<BR>
<A HREF="com/t2/biofeedback/device/zephyr/ZephyrBH.html" title="class in com.t2.biofeedback.device.zephyr">ZephyrBH</A>
<BR>
<A HREF="com/t2/biofeedback/device/zephyr/ZephyrDevice.html" title="class in com.t2.biofeedback.device.zephyr">ZephyrDevice</A>
<BR>
<A HREF="com/t2/biofeedback/device/zephyr/ZephyrMessage.html" title="class in com.t2.biofeedback.device.zephyr">ZephyrMessage</A>
<BR>
</FONT></TD>
</TR>
</TABLE>
</BODY>
</HTML>
|
t2health/BSPAN---Bluetooth-Sensor-Processing-for-Android
|
AndroidBTService/doc/allclasses-noframe.html
|
HTML
|
epl-1.0
| 5,339
|
<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="copyright" content="(C) Copyright 2010" />
<meta name="DC.rights.owner" content="(C) Copyright 2010" />
<meta name="DC.Type" content="cxxFile" />
<meta name="DC.Title" content="featureinfoplugin.h" />
<meta name="DC.Format" content="XHTML" />
<meta name="DC.Identifier" content="GUID-F4FE5F92-F44E-37EB-BCCD-7B1A4D145C4E" />
<title>
featureinfoplugin.h
</title>
<link type="text/css" rel="stylesheet" href="css/common.css" media="screen"/>
<link type="text/css" rel="stylesheet" href="css/sdl.css" media="screen"/>
<!--[if IE]>
<link href="css/iefix.css" rel="stylesheet" type="text/css" media="screen" />
<![endif]-->
<meta name="keywords" content="api" />
<link rel="stylesheet" type="text/css" href="cxxref.css" />
</head>
<body class="cxxref" id="GUID-F4FE5F92-F44E-37EB-BCCD-7B1A4D145C4E">
<a name="GUID-F4FE5F92-F44E-37EB-BCCD-7B1A4D145C4E">
<!-- -->
</a>
<?php include_once (CURRENT_SKIN_PATH.'/sdl_header.html'); ?>
<div id="sdl_container">
<div id="leftMenu">
<div id="expandcontractdiv">
<a id="collapseTree" href="javascript:tree.collapseAll()">
Collapse all
</a>
<a id="index" href="index.html">
Symbian^3 Application Developer Library
</a>
</div>
<iframe style="border:none" height="800" width="300" src="index-toc.html"></iframe>
<div id="treeDiv1">
 
</div>
<script type="text/javascript">
var currentIconMode = 0; window.name="id2518338 id2518347 id2858858 id2430050 id2430054 id2430059 ";
YAHOO.util.Event.onDOMReady(buildTree, this,true);
</script>
</div>
<div id="sdl_content">
<div class="breadcrumb">
<a href="index.html" title="Symbian^3 Application Developer Library">
Symbian^3 Application Developer Library
</a>
>
</div>
<h1 class="topictitle1">
featureinfoplugin.h File Reference
</h1>
<div class="nested1" id="GUID-944D3A4B-220A-37F2-B900-4B1A7402B4EE">
<a name="GUID-944D3A4B-220A-37F2-B900-4B1A7402B4EE">
<!-- -->
</a>
<h2 class="topictitle2">
const TUid KFeatureInfoPluginInterfaceUid
</h2>
<table class="signature">
<tr>
<td>
const
<a href="GUID-530281E6-29FC-33F2-BC9B-610FBA389444.html">
TUid
</a>
</td>
<td>
KFeatureInfoPluginInterfaceUid
</td>
</tr>
</table>
<div class="section">
<div>
<p>
This constant holds the ECOM Instantiation Interface UID. This interface UID identifies plug-in implementations that derive from
<a href="GUID-5A2EDFE5-E46E-3F5E-AF1C-FDA857559C91.html#GUID-5A2EDFE5-E46E-3F5E-AF1C-FDA857559C91">
CFeatureInfoPlugin
</a>
. This interface is used by the Feature Manager server when it is started up.
<a href="GUID-5A2EDFE5-E46E-3F5E-AF1C-FDA857559C91.html#GUID-5A2EDFE5-E46E-3F5E-AF1C-FDA857559C91">
CFeatureInfoPlugin
</a>
</p>
</div>
</div>
</div>
<div class="nested1" id="GUID-A226AD44-3FB7-3393-B1E2-C3FFD5E8C4FA">
<a name="GUID-A226AD44-3FB7-3393-B1E2-C3FFD5E8C4FA">
<!-- -->
</a>
<h2 class="topictitle2">
Typedef TFeatureInfoRespPckg
</h2>
<table class="signature">
<tr>
<td>
typedef
<a href="GUID-C7A094BD-846F-3ED2-8CCE-C0743DB3712A.html">
TPckgBuf
</a>
< TFeatureInfo >
</td>
<td>
TFeatureInfoRespPckg
</td>
</tr>
</table>
<div class="section">
<div>
<p>
Data package for ELoadFeatureInfoCmdId response structure
</p>
</div>
</div>
</div>
<div class="nested1" id="GUID-FF81DEEC-82E7-3619-8A5A-FA56F731A444">
<a name="GUID-FF81DEEC-82E7-3619-8A5A-FA56F731A444">
<!-- -->
</a>
<h2 class="topictitle2">
Typedef TEnhancedFeatureInfoRespPckg
</h2>
<table class="signature">
<tr>
<td>
typedef
<a href="GUID-C7A094BD-846F-3ED2-8CCE-C0743DB3712A.html">
TPckgBuf
</a>
< TEnhancedFeatureInfo >
</td>
<td>
TEnhancedFeatureInfoRespPckg
</td>
</tr>
</table>
<div class="section">
<div>
<p>
Data package for ELoadEnhancedFeatureInfoCmdId response structure
</p>
</div>
</div>
</div>
<p class="copyright">Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).<br /> All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the <a href=" http://www.eclipse.org/legal/epl-v10.html"> Eclipse Public License
v1.0</a>.</p>
</div>
</div>
<?php include_once (CURRENT_SKIN_PATH.'/sdl_footer.html'); ?>
</body>
</html>
|
warlordh/fork_Symbian
|
sdk/GUID-F4FE5F92-F44E-37EB-BCCD-7B1A4D145C4E.html
|
HTML
|
epl-1.0
| 5,092
|
<!DOCTYPE html>
<html lang="en">
<!--
/********************************************************************************
** Copyright (c) 2015 Obeo.
** All rights reserved. This program and the accompanying materials
** are made available under the terms of the Eclipse Public License v1.0
** which accompanies this distribution, and is available at
** http://www.eclipse.org/legal/epl-v10.html
**
** Contributors:
** Stephane Begaudeau (Obeo) - initial API and implementation
*********************************************************************************/
-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Stéphane Bégaudeau">
<!-- IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="../assets/css/bootstrap.css" rel="stylesheet">
<link href="../assets/css/docs.css" rel="stylesheet">
<title>M2Doc</title>
</head>
<body>
<div class="container">
<header class="jumbotron subhead" id="overview">
<h1>M2Doc Documentation</h1>
<!--<div class="subnav">
<ul class="nav nav-pills">
<li><a href="#introduction">Introduction</a></li>
<li><a href="#language">Language</a></li>
<li><a href="#operations">Operations</a></li>
<li><a href="#standalone">Stand Alone</a></li>
<li><a href="#migration">Migration</a></li>
<li><a href="#textproductionrules">Text Production Rules</a></li>
<li><a href="#onlineresources">Online Resources</a></li>
</ul>
</div>-->
</header>
<section id="services">
<div class="page-header">
<h1>Services available for links</h1>
</div>
<h3>asBookmark(text: java.lang.String, id: java.lang.String) = MBookmark</h3>
<p>
Converts a String to a bookmark declaration
</p>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
</thead><colgroup><col width="60%" /><col width="40%" /></colgroup>
<tbody>
<tr>
<td>'Definition of Artifact1'.asBookmark('Art1')</td>
<td>a bookmark with the ID 'Art1' the label 'Definition of Artifact1'</td>
</tr>
</tbody>
</table>
<p>
</p>
<hr />
<h3>asBookmarkRef(text: java.lang.String, id: java.lang.String) = MBookmark</h3>
<p>
Converts a String to a bookmark reference
</p>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
</thead><colgroup><col width="60%" /><col width="40%" /></colgroup>
<tbody>
<tr>
<td>'Artifact1'.asBookmark('Art1')</td>
<td>a bookmark reference with the ID 'Art1' the label 'Definition of Artifact1'</td>
</tr>
</tbody>
</table>
<p>
</p>
<hr />
<h3>asLink(text: java.lang.String, url: java.lang.String) = MHyperLink</h3>
<p>
Converts a String to an hyperlink
</p>
<table class="table table-striped table-bordered table-condensed">
<thead>
<tr>
<th>Expression</th>
<th>Result</th>
</tr>
</thead><colgroup><col width="60%" /><col width="40%" /></colgroup>
<tbody>
<tr>
<td>'My website'.asLink('http://www.example.org')</td>
<td>a link to http://www.example.org with the label My website</td>
</tr>
</tbody>
</table>
<p>
</p>
<hr />
</section>
</div>
</body>
</html>
|
ylussaud/M2Doc
|
docs/doc/m2doc_service_linkservices.html
|
HTML
|
epl-1.0
| 4,139
|
app.factory("ActivityIndexService",ActivityIndexService);
ActivityIndexService.$inject = ['$http'];
function ActivityIndexService($http){
return {getActivities: function(offsets){
var url = "/index_pagination?page="+offsets;
return $http.get(url);
}
}
}
app.factory("ActivityOtherUserService",ActivityOtherUserService);
ActivityOtherUserService.$inject = ['$http'];
function ActivityOtherUserService($http){
return {
getFeed:function(user_id,trackable_id,trackable_type){
var tr_type = angular.lowercase(trackable_type);
var url = "/show_others_details?trackable_id="+trackable_id+"&user_id="+user_id+"&trackable_type="+trackable_type;
return $http.get(url);
}
}
}
app.factory("ActivityRemoveService",ActivityRemoveService);
ActivityRemoveService.$inject = ['$resource'];
function ActivityRemoveService($resource){
return {
removeFeed:function(){
return $resource("/activities/remove_activity");
}
}
}
|
valekar/explorebee-backup
|
app/assets/javascripts/client/servicesJS/ActivityServices.js
|
JavaScript
|
epl-1.0
| 1,085
|
# Introduction to resume
TODO: write [great documentation](http://jacobian.org/writing/what-to-write/)
|
JeremS/resume
|
doc/intro.md
|
Markdown
|
epl-1.0
| 104
|
/*
// $Id$
// This software is subject to the terms of the Eclipse Public License v1.0
// Agreement, available at the following URL:
// http://www.eclipse.org/legal/epl-v10.html.
// Copyright (C) 2006-2009 Julian Hyde
// All Rights Reserved.
// You must accept the terms of that agreement to use this software.
*/
package mondrian.olap.fun;
import mondrian.olap.*;
import mondrian.calc.Calc;
import mondrian.calc.ExpCompiler;
import mondrian.calc.ListCalc;
import mondrian.calc.impl.ValueCalc;
import mondrian.calc.impl.AbstractDoubleCalc;
import mondrian.mdx.ResolvedFunCall;
import java.util.List;
/**
* Definition of the <code>Covariance</code> and
* <code>CovarianceN</code> MDX functions.
*
* @author jhyde
* @version $Id$
* @since Mar 23, 2006
*/
class CovarianceFunDef extends FunDefBase {
static final ReflectiveMultiResolver CovarianceResolver =
new ReflectiveMultiResolver(
"Covariance",
"Covariance(<Set>, <Numeric Expression>[, <Numeric Expression>])",
"Returns the covariance of two series evaluated over a set (biased).",
new String[]{"fnxn", "fnxnn"},
CovarianceFunDef.class);
static final MultiResolver CovarianceNResolver =
new ReflectiveMultiResolver(
"CovarianceN",
"CovarianceN(<Set>, <Numeric Expression>[, <Numeric Expression>])",
"Returns the covariance of two series evaluated over a set (unbiased).",
new String[]{"fnxn", "fnxnn"},
CovarianceFunDef.class);
private final boolean biased;
public CovarianceFunDef(FunDef dummyFunDef) {
super(dummyFunDef);
this.biased = dummyFunDef.getName().equals("Covariance");
}
public Calc compileCall(ResolvedFunCall call, ExpCompiler compiler) {
final ListCalc listCalc =
compiler.compileList(call.getArg(0));
final Calc calc1 =
compiler.compileScalar(call.getArg(1), true);
final Calc calc2 =
call.getArgCount() > 2
? compiler.compileScalar(call.getArg(2), true)
: new ValueCalc(call);
return new AbstractDoubleCalc(call, new Calc[] {listCalc, calc1, calc2})
{
public double evaluateDouble(Evaluator evaluator) {
List memberList = listCalc.evaluateList(evaluator);
return (Double) covariance(
evaluator.push(false), memberList, calc1, calc2, biased);
}
public boolean dependsOn(Hierarchy hierarchy) {
return anyDependsButFirst(getCalcs(), hierarchy);
}
};
}
}
// End CovarianceFunDef.java
|
inevo/mondrian
|
src/main/mondrian/olap/fun/CovarianceFunDef.java
|
Java
|
epl-1.0
| 2,672
|
/*******************************************************************************
* Copyright (c) 2001, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
* Jens Lukowski/Innoopract - initial renaming/restructuring
*
*******************************************************************************/
package org.eclipse.wst.dtd.core.internal.tokenizer;
class Yytoken {
public int m_charBegin;
public int m_length;
public int m_line;
public String m_text;
public String m_type;
Yytoken(String type) {
m_type = type;
}
Yytoken(String type, String text, int line, int charBegin, int length) {
m_type = type;
m_text = new String(text);
m_line = line;
m_charBegin = charBegin;
m_length = length;
}
public void delete(int start, int length) {
int stringStart = start - m_charBegin;
String oldString = m_text;
m_text = oldString.substring(0, stringStart);
m_text += oldString.substring(stringStart + length);
m_length = m_text.length();
System.out.println("new string = " + m_text); //$NON-NLS-1$
}
public boolean equals(Yytoken other) {
return m_type == other.getType() && m_text.equals(other.getText()) && m_line == other.getStartLine() && m_charBegin == other.getStartOffset() && m_length == other.getLength();
}
public int getEndOffset() {
return m_charBegin + m_length;
}
public int getLength() {
return m_length;
}
public int getStartLine() {
return m_line;
}
public int getStartOffset() {
return m_charBegin;
}
public String getText() {
return m_text;
}
public String getType() {
return m_type;
}
public void setStartOffset(int startOffset) {
m_charBegin = startOffset;
}
public String toString() {
return "Text : " + m_text + "\ntype : " + m_type + "\nline : " + m_line + "\ncBeg. : " + m_charBegin + "\ncEnd. : " + getEndOffset() + "\ncLength. : " + m_length; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$
}
public void updateOffset(int delta) {
m_charBegin += delta;
}
public void updateText(String newText) {
m_text = newText;
m_length = newText.length();
}
}
|
ttimbul/eclipse.wst
|
bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/tokenizer/Yytoken.java
|
Java
|
epl-1.0
| 2,417
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>EscherArrayProperty (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="EscherArrayProperty (POI API Documentation)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EscherArrayProperty.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/poi/ddf/DefaultEscherRecordFactory.html" title="class in org.apache.poi.ddf"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/poi/ddf/EscherBitmapBlip.html" title="class in org.apache.poi.ddf"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/poi/ddf/EscherArrayProperty.html" target="_top">Frames</a></li>
<li><a href="EscherArrayProperty.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#fields_inherited_from_class_org.apache.poi.ddf.EscherComplexProperty">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.poi.ddf</div>
<h2 title="Class EscherArrayProperty" class="title">Class EscherArrayProperty</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/poi/ddf/EscherProperty.html" title="class in org.apache.poi.ddf">org.apache.poi.ddf.EscherProperty</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html" title="class in org.apache.poi.ddf">org.apache.poi.ddf.EscherComplexProperty</a></li>
<li>
<ul class="inheritance">
<li>org.apache.poi.ddf.EscherArrayProperty</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.lang.Iterable<byte[]></dd>
</dl>
<hr>
<br>
<pre>public final class <span class="strong">EscherArrayProperty</span>
extends <a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html" title="class in org.apache.poi.ddf">EscherComplexProperty</a>
implements java.lang.Iterable<byte[]></pre>
<div class="block">Escher array properties are the most wierd construction ever invented
with all sorts of special cases. I'm hopeful I've got them all.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field_summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields_inherited_from_class_org.apache.poi.ddf.EscherComplexProperty">
<!-- -->
</a>
<h3>Fields inherited from class org.apache.poi.ddf.<a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html" title="class in org.apache.poi.ddf">EscherComplexProperty</a></h3>
<code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#_complexData">_complexData</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#EscherArrayProperty(short,%20boolean,%20byte[])">EscherArrayProperty</a></strong>(short propertyNumber,
boolean isBlipId,
byte[] complexData)</code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#EscherArrayProperty(short,%20byte[])">EscherArrayProperty</a></strong>(short id,
byte[] complexData)</code> </td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte[]</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#getElement(int)">getElement</a></strong>(int index)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#getNumberOfElementsInArray()">getNumberOfElementsInArray</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#getNumberOfElementsInMemory()">getNumberOfElementsInMemory</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#getSizeOfElements()">getSizeOfElements</a></strong>()</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.util.Iterator<byte[]></code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#iterator()">iterator</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#serializeSimplePart(byte[],%20int)">serializeSimplePart</a></strong>(byte[] data,
int pos)</code>
<div class="block">Serializes the simple part of this property.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#setArrayData(byte[],%20int)">setArrayData</a></strong>(byte[] data,
int offset)</code>
<div class="block">We have this method because the way in which arrays in escher works
is screwed for seemly arbitary reasons.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#setElement(int,%20byte[])">setElement</a></strong>(int index,
byte[] element)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#setNumberOfElementsInArray(int)">setNumberOfElementsInArray</a></strong>(int numberOfElements)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#setNumberOfElementsInMemory(int)">setNumberOfElementsInMemory</a></strong>(int numberOfElements)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#setSizeOfElements(int)">setSizeOfElements</a></strong>(int sizeOfElements)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#toString()">toString</a></strong>()</code>
<div class="block">Retrieves the string representation for this property.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/apache/poi/ddf/EscherArrayProperty.html#toXml(java.lang.String)">toXml</a></strong>(java.lang.String tab)</code> </td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.poi.ddf.EscherComplexProperty">
<!-- -->
</a>
<h3>Methods inherited from class org.apache.poi.ddf.<a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html" title="class in org.apache.poi.ddf">EscherComplexProperty</a></h3>
<code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#equals(java.lang.Object)">equals</a>, <a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#getComplexData()">getComplexData</a>, <a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#getPropertySize()">getPropertySize</a>, <a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#hashCode()">hashCode</a>, <a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#serializeComplexPart(byte[],%20int)">serializeComplexPart</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.apache.poi.ddf.EscherProperty">
<!-- -->
</a>
<h3>Methods inherited from class org.apache.poi.ddf.<a href="../../../../org/apache/poi/ddf/EscherProperty.html" title="class in org.apache.poi.ddf">EscherProperty</a></h3>
<code><a href="../../../../org/apache/poi/ddf/EscherProperty.html#getId()">getId</a>, <a href="../../../../org/apache/poi/ddf/EscherProperty.html#getName()">getName</a>, <a href="../../../../org/apache/poi/ddf/EscherProperty.html#getPropertyNumber()">getPropertyNumber</a>, <a href="../../../../org/apache/poi/ddf/EscherProperty.html#isBlipId()">isBlipId</a>, <a href="../../../../org/apache/poi/ddf/EscherProperty.html#isComplex()">isComplex</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="EscherArrayProperty(short, byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>EscherArrayProperty</h4>
<pre>public EscherArrayProperty(short id,
byte[] complexData)</pre>
</li>
</ul>
<a name="EscherArrayProperty(short, boolean, byte[])">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>EscherArrayProperty</h4>
<pre>public EscherArrayProperty(short propertyNumber,
boolean isBlipId,
byte[] complexData)</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getNumberOfElementsInArray()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumberOfElementsInArray</h4>
<pre>public int getNumberOfElementsInArray()</pre>
</li>
</ul>
<a name="setNumberOfElementsInArray(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNumberOfElementsInArray</h4>
<pre>public void setNumberOfElementsInArray(int numberOfElements)</pre>
</li>
</ul>
<a name="getNumberOfElementsInMemory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumberOfElementsInMemory</h4>
<pre>public int getNumberOfElementsInMemory()</pre>
</li>
</ul>
<a name="setNumberOfElementsInMemory(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNumberOfElementsInMemory</h4>
<pre>public void setNumberOfElementsInMemory(int numberOfElements)</pre>
</li>
</ul>
<a name="getSizeOfElements()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getSizeOfElements</h4>
<pre>public short getSizeOfElements()</pre>
</li>
</ul>
<a name="setSizeOfElements(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSizeOfElements</h4>
<pre>public void setSizeOfElements(int sizeOfElements)</pre>
</li>
</ul>
<a name="getElement(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getElement</h4>
<pre>public byte[] getElement(int index)</pre>
</li>
</ul>
<a name="setElement(int, byte[])">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setElement</h4>
<pre>public void setElement(int index,
byte[] element)</pre>
</li>
</ul>
<a name="toString()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<div class="block"><strong>Description copied from class: <code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#toString()">EscherComplexProperty</a></code></strong></div>
<div class="block">Retrieves the string representation for this property.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#toString()">toString</a></code> in class <code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html" title="class in org.apache.poi.ddf">EscherComplexProperty</a></code></dd>
</dl>
</li>
</ul>
<a name="toXml(java.lang.String)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toXml</h4>
<pre>public java.lang.String toXml(java.lang.String tab)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#toXml(java.lang.String)">toXml</a></code> in class <code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html" title="class in org.apache.poi.ddf">EscherComplexProperty</a></code></dd>
</dl>
</li>
</ul>
<a name="setArrayData(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setArrayData</h4>
<pre>public int setArrayData(byte[] data,
int offset)</pre>
<div class="block">We have this method because the way in which arrays in escher works
is screwed for seemly arbitary reasons. While most properties are
fairly consistent and have a predictable array size, escher arrays
have special cases.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - The data array containing the escher array information</dd><dd><code>offset</code> - The offset into the array to start reading from.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the number of bytes used by this complex property.</dd></dl>
</li>
</ul>
<a name="serializeSimplePart(byte[], int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>serializeSimplePart</h4>
<pre>public int serializeSimplePart(byte[] data,
int pos)</pre>
<div class="block">Serializes the simple part of this property. ie the first 6 bytes.
Needs special code to handle the case when the size doesn't
include the size of the header block</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html#serializeSimplePart(byte[],%20int)">serializeSimplePart</a></code> in class <code><a href="../../../../org/apache/poi/ddf/EscherComplexProperty.html" title="class in org.apache.poi.ddf">EscherComplexProperty</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>data</code> - the buffer to write to</dd><dd><code>pos</code> - the starting position</dd>
<dt><span class="strong">Returns:</span></dt><dd>the length of the part</dd></dl>
</li>
</ul>
<a name="iterator()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>iterator</h4>
<pre>public java.util.Iterator<byte[]> iterator()</pre>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code>iterator</code> in interface <code>java.lang.Iterable<byte[]></code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/EscherArrayProperty.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../org/apache/poi/ddf/DefaultEscherRecordFactory.html" title="class in org.apache.poi.ddf"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/apache/poi/ddf/EscherBitmapBlip.html" title="class in org.apache.poi.ddf"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/poi/ddf/EscherArrayProperty.html" target="_top">Frames</a></li>
<li><a href="EscherArrayProperty.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#fields_inherited_from_class_org.apache.poi.ddf.EscherComplexProperty">Field</a> | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<i>Copyright 2016 The Apache Software Foundation or
its licensors, as applicable.</i>
</small></p>
</body>
</html>
|
tommylsh/test20170719
|
Desktop/tool/poi-bin-3.15-20160924/poi-3.15/docs/apidocs/org/apache/poi/ddf/EscherArrayProperty.html
|
HTML
|
epl-1.0
| 20,993
|
/*++
/* NAME
/* mylseek 3
/* SUMMARY
/* seek beyond the 32-bit barrier
/* SYNOPSIS
/* #include "fs_tools.h"
/*
/* OFF_T mylseek(int fd, OFF_T offset, int whence)
/* DESCRIPTION
/* mylseek() jumps whatever hoops are needed to seek files
/* with larger than 32-bit offsets.
/* LICENSE
/* This software is distributed under the IBM Public License.
/* AUTHOR(S)
/* Wietse Venema
/* IBM T.J. Watson Research
/* P.O. Box 704
/* Yorktown Heights, NY 10598, USA
/*--*/
#include "fs_tools.h"
#ifdef USE_MYLSEEK
#ifdef HAVE_LLSEEK
#include <errno.h>
#include <unistd.h>
#include <linux/unistd.h>
/*
* This is LINUX, live on the bleeding edge and watch your software break
* with the next release...
*/
static _syscall5(int, _llseek, unsigned int, fd, unsigned long, offset_high,
unsigned long, offset_low, OFF_T *, result,
unsigned int, origin)
/* mylseek - seek beyond the 32-bit barrier */
OFF_T mylseek(int fd, OFF_T offset, int whence)
{
OFF_T result;
int ret;
ret = _llseek(fd, (unsigned long) (offset >> 32),
(unsigned long) (offset & 0xffffffff),
&result, whence);
return (ret < 0 ? -1 : result);
}
#endif
#endif
|
zenfish/tct
|
src/fstools/mylseek.c
|
C
|
epl-1.0
| 1,179
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 23 08:30:01 PST 2011 -->
<TITLE>
Uses of Class spine.payload.codec.emu.CodecInformation
</TITLE>
<META NAME="date" CONTENT="2011-12-23">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class spine.payload.codec.emu.CodecInformation";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../spine/payload/codec/emu/CodecInformation.html" title="class in spine.payload.codec.emu"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?spine/payload/codec/emu/\class-useCodecInformation.html" target="_top"><B>FRAMES</B></A>
<A HREF="CodecInformation.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>spine.payload.codec.emu.CodecInformation</B></H2>
</CENTER>
No usage of spine.payload.codec.emu.CodecInformation
<P>
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../spine/payload/codec/emu/CodecInformation.html" title="class in spine.payload.codec.emu"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html?spine/payload/codec/emu/\class-useCodecInformation.html" target="_top"><B>FRAMES</B></A>
<A HREF="CodecInformation.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|
t2health/BSPAN---Bluetooth-Sensor-Processing-for-Android
|
AndroidSpineServer/doc/spine/payload/codec/emu/class-use/CodecInformation.html
|
HTML
|
epl-1.0
| 6,088
|
package ext.tmt.resource;
import wt.util.resource.RBEntry;
import wt.util.resource.RBUUID;
import wt.util.resource.WTListResourceBundle;
@RBUUID("ext.tmt.resource.CostomRB")
public class CostomRB extends WTListResourceBundle {
@RBEntry("Reports")
public static final String LZR_FIRST_TITLE = "navigation.reports.description";
@RBEntry("Reports")
public static final String LZR_FIRST = "navigation.reports.tooltip";
@RBEntry("custom.gif")
public static final String LZR_FIRST_ICON = "navigation.reports.icon";
@RBEntry("Part Report")
public static final String REPORT_PARTS_DES = "reports.parts.description";
@RBEntry("Part Report")
public static final String REPORT_PARTS_TOOL = "reports.parts.tooltip";
@RBEntry("Doc Report")
public static final String REPORT_DOCS_DES = "reports.docs.description";
@RBEntry("Doc Report")
public static final String REPORT_DOCS_TOOL = "reports.docs.tooltip";
@RBEntry("BOM Report")
public static final String REPORT_BOMS_DES = "reports.boms.description";
@RBEntry("BOM Report")
public static final String REPORT_BOMS_TOOL = "reports.boms.tooltip";
@RBEntry("Standard Report")
public static final String PART_STAND_DES = "part.standardReport.description";
@RBEntry("Standard Report")
public static final String PART_STAND_TOOL = "part.standardReport.tooltip";
}
|
sgewuhan/visionadapter
|
tmt/Windchill/src/ext/tmt/resource/CostomRB.java
|
Java
|
epl-1.0
| 1,415
|
package es.optsicom.lib.expresults.manager;
import java.util.List;
import es.optsicom.lib.expresults.model.Event;
import es.optsicom.lib.expresults.model.Execution;
public class ExecutionManager {
private Execution execution;
private ExperimentRepositoryManager manager;
public ExecutionManager(Execution execution, ExperimentRepositoryManager manager) {
this.execution = execution;
this.manager = manager;
}
public double countEvents(String eventName){
return manager.countEvents(execution, eventName);
}
public List<Event> getEvents(String eventName){
return manager.getEvents(execution, eventName);
}
public Event getLastEvent(String eventName){
return manager.getLastEvent(execution, eventName);
}
public Event getLastEvent(String eventName, long timelimit){
return manager.getLastEvent(execution, eventName, timelimit);
}
public Execution getExecution(){
return execution;
}
public List<Event> getEvents() {
return execution.getEvents();
}
}
|
samuelmartingc/optsicom-framework
|
es.optsicom.lib.analysis/src/main/java/es/optsicom/lib/expresults/manager/ExecutionManager.java
|
Java
|
epl-1.0
| 993
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<title>Uses of Class org.apache.poi.xssf.XLSBUnsupportedException (POI API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.poi.xssf.XLSBUnsupportedException (POI API Documentation)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/apache/poi/xssf/XLSBUnsupportedException.html" title="class in org.apache.poi.xssf">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/xssf/class-use/XLSBUnsupportedException.html" target="_top">Frames</a></li>
<li><a href="XLSBUnsupportedException.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class org.apache.poi.xssf.XLSBUnsupportedException" class="title">Uses of Class<br>org.apache.poi.xssf.XLSBUnsupportedException</h2>
</div>
<div class="classUseContainer">No usage of org.apache.poi.xssf.XLSBUnsupportedException</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/apache/poi/xssf/XLSBUnsupportedException.html" title="class in org.apache.poi.xssf">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/poi/xssf/class-use/XLSBUnsupportedException.html" target="_top">Frames</a></li>
<li><a href="XLSBUnsupportedException.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>
<i>Copyright 2016 The Apache Software Foundation or
its licensors, as applicable.</i>
</small></p>
</body>
</html>
|
tommylsh/test20170719
|
Desktop/tool/poi-bin-3.15-20160924/poi-3.15/docs/apidocs/org/apache/poi/xssf/class-use/XLSBUnsupportedException.html
|
HTML
|
epl-1.0
| 4,300
|
/*
* Copyright 2012 PRODYNA AG
*
* Licensed under the Eclipse Public License (EPL), Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/eclipse-1.0.php or
* http://www.nabucco.org/License.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.nabucco.framework.base.impl.service.interceptor.service;
import java.lang.reflect.Method;
import javax.interceptor.InvocationContext;
import org.nabucco.framework.base.facade.datatype.logger.InvocationIdentifierThreadLocal;
import org.nabucco.framework.base.facade.datatype.logger.NabuccoLogger;
import org.nabucco.framework.base.facade.datatype.logger.UserIdThreadLocal;
import org.nabucco.framework.base.facade.datatype.security.Subject;
import org.nabucco.framework.base.facade.exception.service.ServiceException;
import org.nabucco.framework.base.facade.message.ServiceMessage;
import org.nabucco.framework.base.facade.message.ServiceRequest;
import org.nabucco.framework.base.facade.message.ServiceResponse;
import org.nabucco.framework.base.facade.message.context.ServiceContextContainer;
import org.nabucco.framework.base.facade.message.context.ServiceMessageContext;
import org.nabucco.framework.base.facade.message.tracing.InvocationIdentifier;
import org.nabucco.framework.base.impl.service.ServiceSupport;
import org.nabucco.framework.base.impl.service.interceptor.Interceptor;
import org.nabucco.framework.base.impl.service.interceptor.context.InterceptorContext;
import org.nabucco.framework.base.impl.service.interceptor.context.InterceptorContextType;
/**
* ServiceInterceptor
*
* @author Nicolas Moser, PRODYNA AG
*/
public class ServiceInterceptor implements Interceptor {
private static final long serialVersionUID = 1L;
/** The appropriate invocation strategy holding delegate strategies. */
private ServiceInterceptorStrategy strategy = new ServiceInterceptorStrategyDelegate();
@Override
@SuppressWarnings("unchecked")
public Object intercept(InvocationContext ctx) throws ServiceException {
ServiceSupport service = null;
Method operation = null;
ServiceRequest<?> request = null;
ServiceResponse<ServiceMessage> response = null;
NabuccoLogger logger = null;
Exception exception = null;
boolean skipAfterExecution = false;
InterceptorContext interceptorContext = new InterceptorContext();
String userId = "";
String invocationIdentifier = "";
try {
service = (ServiceSupport) ctx.getTarget();
logger = service.getLogger();
operation = ctx.getMethod();
request = this.getServiceRequest(ctx.getParameters());
invocationIdentifier = this.getInvocationIdentifierId(request);
InvocationIdentifierThreadLocal.setInvocationIdentifier(invocationIdentifier);
userId = this.getUserId(request);
UserIdThreadLocal.setUserId(userId);
this.strategy.beforeInvocation(interceptorContext, service, operation, request, logger);
if (interceptorContext.isShorten()) {
// stopp chaining, returning response without proceeding
response = (ServiceResponse<ServiceMessage>) interceptorContext.get(InterceptorContextType.RESPONSE);
} else {
response = this.getServiceResponse(ctx.proceed());
}
if (response == null || response.getResponseMessage() == null) {
logger.warning("Service call of method:", ctx.getMethod().getName(), " did not respond acceptable.");
return response;
}
} catch (ServiceException se) {
if (logger != null) {
logger.debug(se, invocationIdentifier, " ServiceException during service call of method: ", ctx
.getMethod().getName());
}
exception = se;
throw se;
} catch (Exception e) {
if (logger != null) {
logger.debug(e, invocationIdentifier, " Exception during service call of method: ", ctx.getMethod()
.getName());
}
exception = e;
throw new ServiceException(e.getMessage(), e);
} catch (Throwable t) {
if (logger != null) {
logger.fatal(t, invocationIdentifier, " Error during service call of method: ", ctx.getMethod()
.getName());
}
// Skip after execution when error occurs.
skipAfterExecution = true;
throw new ServiceException(t.getMessage(), t);
} finally {
if (!skipAfterExecution) {
this.strategy.afterInvocation(interceptorContext, service, operation, request, response, logger,
exception);
}
}
return response;
}
/**
* Converts the service operation parameters NullPointerException-save to the service request.
*
* @param params
* the service operation parameters
*
* @return the converted service request
*/
@SuppressWarnings("unchecked")
private ServiceRequest<ServiceMessage> getServiceRequest(Object[] params) {
if (params == null) {
return null;
}
if (params.length < 1) {
return null;
}
Object o = params[0];
if (o instanceof ServiceRequest<?>) {
return (ServiceRequest<ServiceMessage>) o;
}
return null;
}
/**
* Converts the service operation result NullPointerException-save to the service response.
*
* @param object
* the service operation return object
*
* @return the converted service response
*/
@SuppressWarnings("unchecked")
private ServiceResponse<ServiceMessage> getServiceResponse(Object object) {
if (object instanceof ServiceResponse<?>) {
return (ServiceResponse<ServiceMessage>) object;
}
return null;
}
/**
* Extracts the invocation identifier ID from the request/response objects.
*
* @param contextContainer
* the request/response object
*
* @return the invocation identifier ID
*/
private String getInvocationIdentifierId(ServiceContextContainer<ServiceMessageContext> contextContainer) {
StringBuilder invocationIdentifierId = new StringBuilder();
if (contextContainer != null) {
ServiceMessageContext context = contextContainer.getContext();
if (context != null) {
InvocationIdentifier invocationIdentifier = context.getInvocationIdentifier();
if (invocationIdentifier != null) {
long id = invocationIdentifier.getId();
invocationIdentifierId.append(id);
}
}
}
return invocationIdentifierId.toString();
}
/**
* Extracts the user ID from the request/response objects.
*
* @param contextContainer
* the request/response object
*
* @return the user ID
*/
private String getUserId(ServiceContextContainer<ServiceMessageContext> contextContainer) {
StringBuilder userId = new StringBuilder();
if (contextContainer != null && contextContainer.getContext() != null) {
ServiceMessageContext context = contextContainer.getContext();
Subject subject = context.getSubject();
if (subject != null) {
if (subject.getUserId() != null && subject.getUserId().getValue() != null) {
userId.append(subject.getUserId().getValue());
}
}
}
return userId.toString();
}
}
|
NABUCCO/org.nabucco.framework.base
|
org.nabucco.framework.base.impl.service/src/main/man/org/nabucco/framework/base/impl/service/interceptor/service/ServiceInterceptor.java
|
Java
|
epl-1.0
| 8,242
|
/*
* Copyright 2012 PRODYNA AG
*
* Licensed under the Eclipse Public License (EPL), Version 1.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/eclipse-1.0.php or
* http://www.nabucco.org/License.html
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.nabucco.framework.common.authorization.ui.rcp.command.group;
import org.nabucco.framework.plugin.base.command.CommandHandler;
/**
* OpenCorrespondingGroupEditViewFromBrowserElementCommandHandler
*
* @author Undefined
*/
public interface OpenCorrespondingGroupEditViewFromBrowserElementCommandHandler extends CommandHandler {
/** OpenCorrespondingGroupEditViewFromBrowserElementCommand. */
public void openCorrespondingGroupEditViewFromBrowserElementCommand();
}
|
NABUCCO/org.nabucco.framework.common.authorization
|
org.nabucco.framework.common.authorization.ui.rcp/src/main/gen/org/nabucco/framework/common/authorization/ui/rcp/command/group/OpenCorrespondingGroupEditViewFromBrowserElementCommandHandler.java
|
Java
|
epl-1.0
| 1,144
|
/*******************************************************************************
* Copyright (c) 2012-2015 Codenvy, S.A.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Codenvy, S.A. - initial API and implementation
*******************************************************************************/
package org.eclipse.che.ide.api.project.node;
import javax.annotation.Nonnull;
/**
* Indicates that specified node can contains data object, e.g. project descriptor or item reference.
*
* @author Vlad Zhukovskiy
*/
public interface HasDataObject<D> {
/**
* Retrieve stored data object.
*
* @return data object
*/
@Nonnull
D getData();
/**
* Store data object.
*
* @param data
* data object
*/
void setData(@Nonnull D data);
}
|
vitaliy0922/cop_che-core
|
ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/node/HasDataObject.java
|
Java
|
epl-1.0
| 1,028
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.