answer
stringlengths 15
1.25M
|
|---|
package com.taobao.zeus.broadcast.alarm;
import java.net.InetAddress;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.<API key>;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import com.taobao.zeus.model.LogDescriptor;
import com.taobao.zeus.store.UserManager;
import com.taobao.zeus.store.mysql.MysqlLogManager;
import com.taobao.zeus.store.mysql.persistence.ZeusUser;
import com.taobao.zeus.util.Environment;
public class MailAlarm extends AbstractZeusAlarm {
private static Logger log = LoggerFactory.getLogger(MailAlarm.class);
@Autowired
private UserManager userManager;
@Autowired
private MysqlLogManager zeusLogManager;
private static String host = Environment.getHost();
private static String port = Environment.getPort();
private static String from = Environment.getSendFrom();
private static String user = Environment.getUsername();
private static String password = Environment.getPassword();
@Override
public void alarm(String jobId, List<String> users, String title, String content)
throws Exception {
List<ZeusUser> userList = userManager.<API key>(users);
List<String> emails = new ArrayList<String>();
if (userList != null && userList.size() > 0) {
for (ZeusUser user : userList) {
String userEmail = user.getEmail();
if (userEmail != null && !userEmail.isEmpty()
&& userEmail.contains("@")) {
if (userEmail.contains(";")) {
String[] userEmails = userEmail.split(";");
for (String ems : userEmails) {
if (ems.contains("@")) {
emails.add(ems);
}
}
} else {
emails.add(userEmail);
}
}
}
if (emails.size() > 0) {
content = content.replace("<br/>", "\r\n");
sendEmail(jobId, emails, title, content);
/*try{
LogDescriptor logDescriptor = new LogDescriptor();
logDescriptor.setLogType("email");
logDescriptor.setIp(InetAddress.getLocalHost().getHostAddress());
logDescriptor.setUserName("zeus");
logDescriptor.setUrl(jobId);
logDescriptor.setRpc(emails.toString());
logDescriptor.setDelegate(title);
logDescriptor.setMethod("");
// logDescriptor.setDescription((content.length()>4000 ? content.substring(4000) : content));
logDescriptor.setDescription("");
zeusLogManager.addLog(logDescriptor);
}catch(Exception ex){
log.error(ex.toString());
}*/
}
}
}
public void sendEmail(String jobId, List<String> emails, String subject,
String body) {
try {
log.info( "jobId: " + jobId +" begin to send the email!");
Properties props = new Properties();
props.put("mail.smtp.host", host);
props.put("mail.smtp.port", port);
props.put("mail.smtp.auth", "true");
Transport transport = null;
Session session = Session.getDefaultInstance(props, null);
transport = session.getTransport("smtp");
transport.connect(host, user, password);
MimeMessage msg = new MimeMessage(session);
msg.setSentDate(new Date());
InternetAddress fromAddress = new InternetAddress(from);
msg.setFrom(fromAddress);
InternetAddress[] toAddress = new InternetAddress[emails.size()];
for (int i = 0; i < emails.size(); i++) {
toAddress[i] = new InternetAddress(emails.get(i));
}
msg.setRecipients(Message.RecipientType.TO, toAddress);
msg.setSubject(subject, "UTF-8");
msg.setText(body, "UTF-8");
msg.saveChanges();
transport.sendMessage(msg, msg.getAllRecipients());
log.info("jobId: " + jobId + " send email: " + emails + "; from: " + from + " subject: "
+ subject + ", send success!");
} catch (<API key> e) {
log.error("jobId: " + jobId + " fail to send the mail. ", e);
} catch (MessagingException e) {
log.error("jobId: " + jobId + " fail to send the mail. ", e);
} catch (Exception e) {
log.error("jobId: " + jobId + " fail to send the mail. ", e);
}
}
}
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head>
<!-- template designed by Marco Von Ballmoos -->
<title></title>
<link rel="stylesheet" href="media/stylesheet.css" />
</head>
<body>
<a name="top"></a>
<h2>[log4php] element index</h2>
<a href="elementindex.html">All elements</a>
<br />
<div class="index-letter-menu">
<a class="index-letter" href="<API key>.html#a">a</a>
<a class="index-letter" href="<API key>.html#c">c</a>
<a class="index-letter" href="<API key>.html#d">d</a>
<a class="index-letter" href="<API key>.html#e">e</a>
<a class="index-letter" href="<API key>.html#f">f</a>
<a class="index-letter" href="<API key>.html#g">g</a>
<a class="index-letter" href="<API key>.html#h">h</a>
<a class="index-letter" href="<API key>.html#i">i</a>
<a class="index-letter" href="<API key>.html#l">l</a>
<a class="index-letter" href="<API key>.html#m">m</a>
<a class="index-letter" href="<API key>.html#n">n</a>
<a class="index-letter" href="<API key>.html#o">o</a>
<a class="index-letter" href="<API key>.html#p">p</a>
<a class="index-letter" href="<API key>.html#r">r</a>
<a class="index-letter" href="<API key>.html#s">s</a>
<a class="index-letter" href="<API key>.html#t">t</a>
<a class="index-letter" href="<API key>.html#u">u</a>
<a class="index-letter" href="<API key>.html#w">w</a>
<a class="index-letter" href="<API key>.html#x">x</a>
<a class="index-letter" href="<API key>.html
</div>
<a name="_"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">_</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Create a new <API key> for the specified Object.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerRoot.html#method__construct">LoggerRoot::__construct()</a> in LoggerRoot.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#method__construct">LoggerLoggingEvent::__construct()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Instantiate a LoggingEvent from the supplied parameters.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#method__construct">LoggerLocationInfo::__construct()</a> in LoggerLocationInfo.php</div>
<div class="<API key>">Instantiate location information based on a <a href="http:
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#method__construct">LoggerHierarchy::__construct()</a> in LoggerHierarchy.php</div>
<div class="<API key>">Create a new logger hierarchy.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#method__construct">Logger::__construct()</a> in Logger.php</div>
<div class="<API key>">Constructor.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#method__construct">LoggerAppender::__construct()</a> in LoggerAppender.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__sleep</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#method__sleep">LoggerLoggingEvent::__sleep()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Avoid serialization of the $logger object</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#method__construct">LoggerAppenderAdodb::__construct()</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Constructor.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#method__construct">LoggerAppenderPDO::__construct()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Constructor.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPhp.html#method__construct">LoggerAppenderPhp::__construct()</a> in LoggerAppenderPhp.php</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#method__construct">LoggerAppenderMail::__construct()</a> in LoggerAppenderMail.php</div>
<div class="<API key>">Constructor.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#method__construct">LoggerAppenderFile::__construct()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderEcho.html#method__construct">LoggerAppenderEcho::__construct()</a> in LoggerAppenderEcho.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__destruct"><API key>::__destruct()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPhp.html#method__destruct">LoggerAppenderPhp::__destruct()</a> in LoggerAppenderPhp.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__destruct"><API key>::__destruct()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__destruct"><API key>::__destruct()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__destruct"><API key>::__destruct()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__destruct"><API key>::__destruct()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#method__destruct">LoggerAppenderPDO::__destruct()</a> in LoggerAppenderPDO.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderEcho.html#method__destruct">LoggerAppenderEcho::__destruct()</a> in LoggerAppenderEcho.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#method__destruct"><API key>::__destruct()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderNull.html#method__destruct">LoggerAppenderNull::__destruct()</a> in LoggerAppenderNull.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#method__destruct">LoggerAppenderFile::__destruct()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">__destruct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#method__destruct">LoggerAppenderMail::__destruct()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#method__construct">LoggerPatternParser::__construct()</a> in LoggerPatternParser.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#method__construct"><API key>::__construct()</a> in <API key>.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#method__construct">LoggerLayoutTTCC::__construct()</a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutSimple.html#method__construct">LoggerLayoutSimple::__construct()</a> in LoggerLayoutSimple.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutPattern.html#method__construct">LoggerLayoutPattern::__construct()</a> in LoggerLayoutPattern.php</div>
<div class="<API key>">Constructs a PatternLayout using the <API key>.</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#method__construct">LoggerLayoutHtml::__construct()</a> in LoggerLayoutHtml.php</div>
<div class="<API key>">Constructor</div>
</dd>
<dt class="field">
<span class="method-title">__construct</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/LoggerRendererMap.html#method__construct">LoggerRendererMap::__construct()</a> in LoggerRendererMap.php</div>
<div class="<API key>">Constructor</div>
</dd>
</dl>
<a name="a"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">a</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$appenderPool</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppenderPool.html#var$appenderPool">LoggerAppenderPool::$appenderPool</a> in LoggerAppenderPool.php</div>
</dd>
<dt class="field">
ACCEPT
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#constACCEPT">LoggerFilter::ACCEPT</a> in LoggerFilter.php</div>
<div class="<API key>">The log event must be logged immediately without consulting with the remaining filters, if any, in the chain.</div>
</dd>
<dt class="field">
<span class="method-title">activate</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html#methodactivate"><API key>::activate()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#<API key>">LoggerFilter::activateOptions()</a> in LoggerFilter.php</div>
<div class="<API key>">Usually filters options become active when set. We provide a default do-nothing implementation for convenience.</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#<API key>">LoggerAppender::activateOptions()</a> in LoggerAppender.php</div>
<div class="<API key>">Derived appenders should override this method if option structure requires it.</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLayout.html#<API key>">LoggerLayout::activateOptions()</a> in LoggerLayout.php</div>
<div class="<API key>">Activates options for this layout.</div>
</dd>
<dt class="field">
<span class="method-title">addAppender</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodaddAppender">Logger::addAppender()</a> in Logger.php</div>
<div class="<API key>">Add a new Appender to the list of appenders of this Category instance.</div>
</dd>
<dt class="field">
<span class="method-title">addFilter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodaddFilter">LoggerAppender::addFilter()</a> in LoggerAppender.php</div>
<div class="<API key>">Add a filter to the end of the filter list.</div>
</dd>
<dt class="field">
<span class="method-title">addNext</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#methodaddNext">LoggerFilter::addNext()</a> in LoggerFilter.php</div>
<div class="<API key>">Adds a new filter to the filter chain this filter is a part of.</div>
</dd>
<dt class="field">
ALL
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#constALL">LoggerLevel::ALL</a> in LoggerLevel.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodappend">LoggerAppender::append()</a> in LoggerAppender.php</div>
<div class="<API key>">Subclasses of <a href="log4php/LoggerAppender.html">LoggerAppender</a> should implement this method to perform actual logging.</div>
</dd>
<dt class="field">
<span class="method-title">assertLog</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodassertLog">Logger::assertLog()</a> in Logger.php</div>
<div class="<API key>">If assertion parameter is false, then logs msg as an error statement.</div>
</dd>
<dt class="field">
<span class="method-title">autoload</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodautoload">Logger::autoload()</a> in Logger.php</div>
<div class="<API key>">Class autoloader This method is provided to be invoked within an __autoload() magic method.</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::activateOptions()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#<API key>">LoggerAppenderMail::activateOptions()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#<API key>">LoggerAppenderAdodb::activateOptions()</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Setup db connection.</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderNull.html#<API key>">LoggerAppenderNull::activateOptions()</a> in LoggerAppenderNull.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#<API key>">LoggerAppenderPDO::activateOptions()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Setup db connection.</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPhp.html#<API key>">LoggerAppenderPhp::activateOptions()</a> in LoggerAppenderPhp.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::activateOptions()</a> in <API key>.php</div>
<div class="<API key>">Create a socket connection using defined parameters</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::activateOptions()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::activateOptions()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#<API key>">LoggerAppenderFile::activateOptions()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderEcho.html#<API key>">LoggerAppenderEcho::activateOptions()</a> in LoggerAppenderEcho.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodappend"><API key>::append()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPhp.html#methodappend">LoggerAppenderPhp::append()</a> in LoggerAppenderPhp.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodappend"><API key>::append()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodappend"><API key>::append()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodappend"><API key>::append()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodappend"><API key>::append()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodappend">LoggerAppenderAdodb::append()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderEcho.html#methodappend">LoggerAppenderEcho::append()</a> in LoggerAppenderEcho.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodappend">LoggerAppenderFile::append()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderNull.html#methodappend">LoggerAppenderNull::append()</a> in LoggerAppenderNull.php</div>
<div class="<API key>">Do nothing.</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#methodappend">LoggerAppenderMail::append()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">append</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodappend">LoggerAppenderPDO::append()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Appends a new event to the database.</div>
</dd>
<dt class="field">
ADDITIVITY_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::ADDITIVITY_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
APPENDER_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::APPENDER_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
APPENDER_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constAPPENDER_STATE"><API key>::APPENDER_STATE</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">addConverter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#methodaddConverter">LoggerPatternParser::addConverter()</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">addToList</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#methodaddToList">LoggerPatternParser::addToList()</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">activateOptions</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::activateOptions()</a> in LoggerLayoutXml.php</div>
<div class="<API key>">No options to activate.</div>
</dd>
<dt class="field">
<span class="method-title">addRenderer</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/LoggerRendererMap.html#methodaddRenderer">LoggerRendererMap::addRenderer()</a> in LoggerRendererMap.php</div>
<div class="<API key>">Add a renderer to a hierarchy passed as parameter.</div>
</dd>
</dl>
<a name="c"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">c</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$className</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#var$className">LoggerLocationInfo::$className</a> in LoggerLocationInfo.php</div>
</dd>
<dt class="field">
<span class="var-title">$closed</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#var$closed">LoggerAppender::$closed</a> in LoggerAppender.php</div>
</dd>
<dt class="field">
<span class="method-title">callAppenders</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodcallAppenders">Logger::callAppenders()</a> in Logger.php</div>
<div class="<API key>">Call the appenders in the hierarchy starting at this.</div>
</dd>
<dt class="field">
<span class="method-title">clear</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodclear">Logger::clear()</a> in Logger.php</div>
<div class="<API key>">Clears all logger definitions</div>
</dd>
<dt class="field">
<span class="method-title">clear</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodclear">LoggerHierarchy::clear()</a> in LoggerHierarchy.php</div>
<div class="<API key>">This call will clear all logger definitions from the internal hashtable.</div>
</dd>
<dt class="field">
<span class="method-title">clear</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodclear">LoggerNDC::clear()</a> in LoggerNDC.php</div>
<div class="<API key>">Clear any nested diagnostic information if any. This method is useful in cases where the same thread can be potentially used over and over in different unrelated contexts.</div>
</dd>
<dt class="field">
<span class="method-title">clearFilters</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodclearFilters">LoggerAppender::clearFilters()</a> in LoggerAppender.php</div>
<div class="<API key>">Clear the list of filters by removing all the filters in it.</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodclose">LoggerAppender::close()</a> in LoggerAppender.php</div>
<div class="<API key>">Release any resources allocated.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerConfigurator.html#<API key>">LoggerConfigurator::<API key></a> in LoggerConfigurator.php</div>
<div class="<API key>">Special level value signifying inherited behaviour. The current value of this string constant is <strong>inherited</strong>.</div>
</dd>
<dt class="field">
CONFIGURATOR_NULL
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerConfigurator.html#<API key>">LoggerConfigurator::CONFIGURATOR_NULL</a> in LoggerConfigurator.php</div>
<div class="<API key>">Special level signifying inherited behaviour, same as <API key>.</div>
</dd>
<dt class="field">
<span class="method-title">configure</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerConfigurator.html#methodconfigure">LoggerConfigurator::configure()</a> in LoggerConfigurator.php</div>
<div class="<API key>">Interpret a resource pointed by a <var>url</var> and configure accordingly.</div>
</dd>
<dt class="field">
<span class="method-title">configure</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodconfigure">Logger::configure()</a> in Logger.php</div>
<div class="<API key>">Configures Log4PHP.</div>
</dd>
<dt class="field">
<span class="method-title">createObject</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html#methodcreateObject"><API key>::createObject()</a> in <API key>.php</div>
<div class="<API key>">Creates an instances from the given class name.</div>
</dd>
<dt class="field">
<span class="var-title">$createTable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$createTable">LoggerAppenderAdodb::$createTable</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Create the log table if it does not exists (optional).</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodclose">LoggerAppenderPDO::close()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Closes the connection to the logging database</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPhp.html#methodclose">LoggerAppenderPhp::close()</a> in LoggerAppenderPhp.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodclose"><API key>::close()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodclose"><API key>::close()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderNull.html#methodclose">LoggerAppenderNull::close()</a> in LoggerAppenderNull.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#methodclose">LoggerAppenderMail::close()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodclose">LoggerAppenderAdodb::close()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodclose"><API key>::close()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderEcho.html#methodclose">LoggerAppenderEcho::close()</a> in LoggerAppenderEcho.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodclose">LoggerAppenderFile::close()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">close</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodclose"><API key>::close()</a> in <API key>.php</div>
</dd>
<dt class="field">
CATEGORY_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::CATEGORY_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">configure</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#methodconfigure"><API key>::configure()</a> in <API key>.php</div>
<div class="<API key>">Configure the default repository using the resource pointed by <strong>url</strong>.</div>
</dd>
<dt class="field">
<span class="method-title">configure</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#methodconfigure"><API key>::configure()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">configure</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#methodconfigure"><API key>::configure()</a> in <API key>.php</div>
<div class="<API key>">Read configuration from a file.</div>
</dd>
<dt class="field">
<span class="method-title">configure</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#methodconfigure"><API key>::configure()</a> in <API key>.php</div>
<div class="<API key>">Add a <a href="log4php/appenders/<API key>.html"><API key></a> that uses the <a href="log4php/layouts/LoggerLayoutTTCC.html">LoggerLayoutTTCC</a> to the root category.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key></a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">convert</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodconvert"><API key>::convert()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">convert</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodconvert"><API key>::convert()</a> in <API key>.php</div>
<div class="<API key>">Derived pattern converters must override this method in order to convert conversion specifiers in the correct way.</div>
</dd>
<dt class="field">
<span class="method-title">convert</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodconvert"><API key>::convert()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">convert</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodconvert"><API key>::convert()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">convert</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodconvert"><API key>::convert()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">convert</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodconvert"><API key>::convert()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">convert</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodconvert"><API key>::convert()</a> in <API key>.php</div>
</dd>
<dt class="field">
CONVERTER_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::CONVERTER_STATE</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="var-title">$categoryPrefixing</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#var$categoryPrefixing">LoggerLayoutTTCC::$categoryPrefixing</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="var-title">$contextPrinting</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#var$contextPrinting">LoggerLayoutTTCC::$contextPrinting</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
CDATA_EMBEDDED_END
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::CDATA_EMBEDDED_END</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
CDATA_END
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#constCDATA_END">LoggerLayoutXml::CDATA_END</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
CDATA_PSEUDO_END
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::CDATA_PSEUDO_END</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
CDATA_START
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#constCDATA_START">LoggerLayoutXml::CDATA_START</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
<span class="method-title">clear</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/LoggerRendererMap.html#methodclear">LoggerRendererMap::clear()</a> in LoggerRendererMap.php</div>
</dd>
</dl>
<a name="d"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">d</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$defaultFactory</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#var$defaultFactory">LoggerHierarchy::$defaultFactory</a> in LoggerHierarchy.php</div>
<div class="<API key>">Default Factory</div>
</dd>
<dt class="field">
<span class="method-title">debug</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methoddebug">Logger::debug()</a> in Logger.php</div>
<div class="<API key>">Log a message object with the DEBUG level including the caller.</div>
</dd>
<dt class="field">
DEBUG
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#constDEBUG">LoggerLevel::DEBUG</a> in LoggerLevel.php</div>
</dd>
<dt class="field">
<span class="method-title">decide</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#methoddecide">LoggerFilter::decide()</a> in LoggerFilter.php</div>
<div class="<API key>">Decide what to do.</div>
</dd>
<dt class="field">
DENY
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#constDENY">LoggerFilter::DENY</a> in LoggerFilter.php</div>
<div class="<API key>">The log event must be dropped immediately without consulting with the remaining filters, if any, in the chain.</div>
</dd>
<dt class="field">
<span class="method-title">doAppend</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methoddoAppend">LoggerAppender::doAppend()</a> in LoggerAppender.php</div>
<div class="<API key>">This method performs threshold checks and invokes filters before delegating actual logging to the subclasses specific <em>append()</em> method.</div>
</dd>
<dt class="field">
<span class="var-title">$database</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$database">LoggerAppenderAdodb::$database</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Name of the database to connect to</div>
</dd>
<dt class="field">
<span class="var-title">$datePattern</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#var$datePattern"><API key>::$datePattern</a> in <API key>.php</div>
<div class="<API key>">Format date.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::<API key></a> in <API key>.php</div>
</dd>
<dt class="field">
DEFAULT_FILENAME
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::DEFAULT_FILENAME</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">decide</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#methoddecide"><API key>::decide()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">decide</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#methoddecide"><API key>::decide()</a> in <API key>.php</div>
<div class="<API key>">Return the decision of this filter.</div>
</dd>
<dt class="field">
<span class="method-title">decide</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#methoddecide"><API key>::decide()</a> in <API key>.php</div>
<div class="<API key>">Return the decision of this filter.</div>
</dd>
<dt class="field">
<span class="method-title">decide</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/LoggerFilterDenyAll.html#methoddecide">LoggerFilterDenyAll::decide()</a> in LoggerFilterDenyAll.php</div>
<div class="<API key>">Always returns the integer constant <a href="log4php/LoggerFilter.html#constDENY">LoggerFilter::DENY</a> regardless of the <a href="log4php/LoggerLoggingEvent.html">LoggerLoggingEvent</a> parameter.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key></a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
DATE_FORMAT_DATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::DATE_FORMAT_DATE</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
DATE_FORMAT_ISO8601
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::DATE_FORMAT_ISO8601</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
DELIM_START
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#constDELIM_START"><API key>::DELIM_START</a> in <API key>.php</div>
</dd>
<dt class="field">
DELIM_START_LEN
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#<API key>"><API key>::DELIM_START_LEN</a> in <API key>.php</div>
</dd>
<dt class="field">
DELIM_STOP
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#constDELIM_STOP"><API key>::DELIM_STOP</a> in <API key>.php</div>
</dd>
<dt class="field">
DELIM_STOP_LEN
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#constDELIM_STOP_LEN"><API key>::DELIM_STOP_LEN</a> in <API key>.php</div>
</dd>
<dt class="field">
DOT_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#constDOT_STATE">LoggerPatternParser::DOT_STATE</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">dump</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methoddump"><API key>::dump()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="var-title">$dateFormat</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#var$dateFormat">LoggerLayoutTTCC::$dateFormat</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutPattern.html#<API key>">LoggerLayoutPattern::<API key></a> in LoggerLayoutPattern.php</div>
<div class="<API key>">Default conversion Pattern</div>
</dd>
</dl>
<a name="e"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">e</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">equals</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodequals">LoggerLevel::equals()</a> in LoggerLevel.php</div>
<div class="<API key>">Two priorities are equal if their level fields are equal.</div>
</dd>
<dt class="field">
<span class="method-title">error</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methoderror">Logger::error()</a> in Logger.php</div>
<div class="<API key>">Log a message object with the ERROR level including the caller.</div>
</dd>
<dt class="field">
ERROR
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#constERROR">LoggerLevel::ERROR</a> in LoggerLevel.php</div>
</dd>
<dt class="field">
<span class="method-title">exists</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodexists">LoggerHierarchy::exists()</a> in LoggerHierarchy.php</div>
<div class="<API key>">Check if the named logger exists in the hierarchy.</div>
</dd>
<dt class="field">
<span class="method-title">exists</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodexists">Logger::exists()</a> in Logger.php</div>
<div class="<API key>">check if a given logger exists.</div>
</dd>
<dt class="field">
ESCAPE_CHAR
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#constESCAPE_CHAR">LoggerPatternParser::ESCAPE_CHAR</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">extractOption</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#methodextractOption">LoggerPatternParser::extractOption()</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key>()</a> in LoggerPatternParser.php</div>
<div class="<API key>">The option is expected to be in decimal and positive. In case of error, zero is returned.</div>
</dd>
</dl>
<a name="f"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">f</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$fileName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#var$fileName">LoggerLocationInfo::$fileName</a> in LoggerLocationInfo.php</div>
</dd>
<dt class="field">
<span class="var-title">$filter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#var$filter">LoggerAppender::$filter</a> in LoggerAppender.php</div>
<div class="<API key>">The first filter in the filter chain</div>
</dd>
<dt class="field">
<span class="var-title">$fullInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#var$fullInfo">LoggerLocationInfo::$fullInfo</a> in LoggerLocationInfo.php</div>
</dd>
<dt class="field">
FATAL
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#constFATAL">LoggerLevel::FATAL</a> in LoggerLevel.php</div>
</dd>
<dt class="field">
<span class="method-title">fatal</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodfatal">Logger::fatal()</a> in Logger.php</div>
<div class="<API key>">Log a message object with the FATAL level including the caller.</div>
</dd>
<dt class="field">
<span class="method-title">forcedLog</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodforcedLog">Logger::forcedLog()</a> in Logger.php</div>
<div class="<API key>">This method creates a new logging event and logs the event without further checks.</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLayout.html#methodformat">LoggerLayout::format()</a> in LoggerLayout.php</div>
<div class="<API key>">Override this method to create your own layout format.</div>
</dd>
<dt class="field">
<span class="var-title">$fileName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#var$fileName">LoggerAppenderFile::$fileName</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="var-title">$fp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#var$fp">LoggerAppenderFile::$fp</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="var-title">$fp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#var$fp"><API key>::$fp</a> in <API key>.php</div>
</dd>
<dt class="field">
FACTORY_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constFACTORY_PREFIX"><API key>::FACTORY_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
FILTER_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constFILTER_STATE"><API key>::FILTER_STATE</a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key></a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">finalizeConverter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::finalizeConverter()</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">findAndSubst</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodfindAndSubst"><API key>::findAndSubst()</a> in <API key>.php</div>
<div class="<API key>">Find the value corresponding to <var>$key</var> in <var>$props</var>. Then perform variable substitution on the found value.</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodformat"><API key>::format()</a> in <API key>.php</div>
<div class="<API key>">A template method for formatting in a converter specific way.</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodformat"><API key>::format()</a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key></a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#methodformat">LoggerLayoutTTCC::format()</a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">In addition to the level of the statement and message, the returned string includes time, thread, category.</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutSimple.html#methodformat">LoggerLayoutSimple::format()</a> in LoggerLayoutSimple.php</div>
<div class="<API key>">Returns the log statement in a format consisting of the</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#methodformat">LoggerLayoutHtml::format()</a> in LoggerLayoutHtml.php</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutPattern.html#methodformat">LoggerLayoutPattern::format()</a> in LoggerLayoutPattern.php</div>
<div class="<API key>">Produces a formatted string as specified by the conversion pattern.</div>
</dd>
<dt class="field">
<span class="method-title">format</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#methodformat">LoggerLayoutXml::format()</a> in LoggerLayoutXml.php</div>
<div class="<API key>">Formats a <a href="log4php/LoggerLoggingEvent.html">LoggerLoggingEvent</a> in conformance with the log4php.dtd.</div>
</dd>
<dt class="field">
<span class="method-title">formatToArray</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutPattern.html#methodformatToArray">LoggerLayoutPattern::formatToArray()</a> in LoggerLayoutPattern.php</div>
<div class="<API key>">Returns an array with the formatted elements.</div>
</dd>
<dt class="field">
<span class="method-title">findAndRender</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/LoggerRendererMap.html#methodfindAndRender">LoggerRendererMap::findAndRender()</a> in LoggerRendererMap.php</div>
<div class="<API key>">Find the appropriate renderer for the class type of the <var>o</var> parameter.</div>
</dd>
</dl>
<a name="g"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">g</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">get</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodget">LoggerNDC::get()</a> in LoggerNDC.php</div>
<div class="<API key>">Never use this method directly, use the <a href="log4php/LoggerLoggingEvent.html#methodgetNDC">LoggerLoggingEvent::getNDC()</a> method instead.</div>
</dd>
<dt class="field">
<span class="method-title">get</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerMDC.html#methodget">LoggerMDC::get()</a> in LoggerMDC.php</div>
<div class="<API key>">Get the context identified by the key parameter.</div>
</dd>
<dt class="field">
<span class="method-title">getAdditivity</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetAdditivity">Logger::getAdditivity()</a> in Logger.php</div>
<div class="<API key>">Get the additivity flag for this Category instance.</div>
</dd>
<dt class="field">
<span class="method-title">getAllAppenders</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::getAllAppenders()</a> in Logger.php</div>
<div class="<API key>">Get the appenders contained in this category as an array.</div>
</dd>
<dt class="field">
<span class="method-title">getAppender</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetAppender">Logger::getAppender()</a> in Logger.php</div>
<div class="<API key>">Look for the appender named as name.</div>
</dd>
<dt class="field">
<span class="method-title">getAppenderFromPool</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppenderPool.html#<API key>">LoggerAppenderPool::getAppenderFromPool()</a> in LoggerAppenderPool.php</div>
</dd>
<dt class="field">
<span class="method-title">getChainedLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerRoot.html#<API key>">LoggerRoot::getChainedLevel()</a> in LoggerRoot.php</div>
</dd>
<dt class="field">
<span class="method-title">getClassName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#methodgetClassName">LoggerLocationInfo::getClassName()</a> in LoggerLocationInfo.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::<API key>()</a> in Logger.php</div>
<div class="<API key>">Returns the current configurator</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::<API key>()</a> in Logger.php</div>
<div class="<API key>">Returns the current configuration file</div>
</dd>
<dt class="field">
<span class="method-title">getContentType</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLayout.html#<API key>">LoggerLayout::getContentType()</a> in LoggerLayout.php</div>
<div class="<API key>">Returns the content type output by this layout.</div>
</dd>
<dt class="field">
<span class="method-title">getCurrentLoggers</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#<API key>">LoggerHierarchy::getCurrentLoggers()</a> in LoggerHierarchy.php</div>
<div class="<API key>">Returns all the currently defined categories in this hierarchy as an array.</div>
</dd>
<dt class="field">
<span class="method-title">getCurrentLoggers</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::getCurrentLoggers()</a> in Logger.php</div>
<div class="<API key>">Returns an array this whole Logger instances.</div>
</dd>
<dt class="field">
<span class="method-title">getDepth</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodgetDepth">LoggerNDC::getDepth()</a> in LoggerNDC.php</div>
<div class="<API key>">Get the current nesting depth of this diagnostic context.</div>
</dd>
<dt class="field">
<span class="method-title">getEffectiveLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::getEffectiveLevel()</a> in Logger.php</div>
<div class="<API key>">Starting from this category, search the category hierarchy for a non-null level and return it.</div>
</dd>
<dt class="field">
<span class="method-title">getFileName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#methodgetFileName">LoggerLocationInfo::getFileName()</a> in LoggerLocationInfo.php</div>
<div class="<API key>">Return the file name of the caller.</div>
</dd>
<dt class="field">
<span class="method-title">getFilter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodgetFilter">LoggerAppender::getFilter()</a> in LoggerAppender.php</div>
<div class="<API key>">Return the first filter in the filter chain for this Appender.</div>
</dd>
<dt class="field">
<span class="method-title">getFirstFilter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#<API key>">LoggerAppender::getFirstFilter()</a> in LoggerAppender.php</div>
<div class="<API key>">Return the first filter in the filter chain for this Appender.</div>
</dd>
<dt class="field">
<span class="method-title">getFooter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLayout.html#methodgetFooter">LoggerLayout::getFooter()</a> in LoggerLayout.php</div>
<div class="<API key>">Returns the footer for the layout format.</div>
</dd>
<dt class="field">
<span class="method-title">getFullInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#methodgetFullInfo">LoggerLocationInfo::getFullInfo()</a> in LoggerLocationInfo.php</div>
<div class="<API key>">Returns the full information of the caller.</div>
</dd>
<dt class="field">
<span class="method-title">getHeader</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLayout.html#methodgetHeader">LoggerLayout::getHeader()</a> in LoggerLayout.php</div>
<div class="<API key>">Returns the header for the layout format.</div>
</dd>
<dt class="field">
<span class="method-title">getHierarchy</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetHierarchy">Logger::getHierarchy()</a> in Logger.php</div>
<div class="<API key>">Returns the hierarchy used by this Logger.</div>
</dd>
<dt class="field">
<span class="method-title">getLayout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodgetLayout">LoggerAppender::getLayout()</a> in LoggerAppender.php</div>
<div class="<API key>">Returns this appender layout.</div>
</dd>
<dt class="field">
<span class="method-title">getLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetLevel">Logger::getLevel()</a> in Logger.php</div>
<div class="<API key>">Returns the assigned Level, if any, for this Category.</div>
</dd>
<dt class="field">
<span class="method-title">getLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetLevel">LoggerLoggingEvent::getLevel()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Return the level of this event. Use this form instead of directly accessing the $level field.</div>
</dd>
<dt class="field">
<span class="method-title">getLevelAll</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodgetLevelAll">LoggerLevel::getLevelAll()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns an All Level</div>
</dd>
<dt class="field">
<span class="method-title">getLevelDebug</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodgetLevelDebug">LoggerLevel::getLevelDebug()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns a Debug Level</div>
</dd>
<dt class="field">
<span class="method-title">getLevelError</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodgetLevelError">LoggerLevel::getLevelError()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns an Error Level</div>
</dd>
<dt class="field">
<span class="method-title">getLevelFatal</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodgetLevelFatal">LoggerLevel::getLevelFatal()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns a Fatal Level</div>
</dd>
<dt class="field">
<span class="method-title">getLevelInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodgetLevelInfo">LoggerLevel::getLevelInfo()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns an Info Level</div>
</dd>
<dt class="field">
<span class="method-title">getLevelOff</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodgetLevelOff">LoggerLevel::getLevelOff()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns an Off Level</div>
</dd>
<dt class="field">
<span class="method-title">getLevelWarn</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodgetLevelWarn">LoggerLevel::getLevelWarn()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns a Warn Level</div>
</dd>
<dt class="field">
<span class="method-title">getLineNumber</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#methodgetLineNumber">LoggerLocationInfo::getLineNumber()</a> in LoggerLocationInfo.php</div>
<div class="<API key>">Returns the line number of the caller.</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#<API key>">LoggerLoggingEvent::<API key>()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Set the location information for this logging event. The collected information is cached for future use.</div>
</dd>
<dt class="field">
<span class="method-title">getLogger</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodgetLogger">LoggerHierarchy::getLogger()</a> in LoggerHierarchy.php</div>
<div class="<API key>">Return a new logger instance named as the first parameter using the default factory.</div>
</dd>
<dt class="field">
<span class="method-title">getLogger</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetLogger">Logger::getLogger()</a> in Logger.php</div>
<div class="<API key>">Get a Logger by name (Delegate to <a href="log4php/Logger.html">Logger</a>)</div>
</dd>
<dt class="field">
<span class="method-title">getLoggerName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetLoggerName">LoggerLoggingEvent::getLoggerName()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Return the name of the logger. Use this form instead of directly accessing the $categoryName field.</div>
</dd>
<dt class="field">
<span class="method-title">getMDC</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetMDC">LoggerLoggingEvent::getMDC()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Returns the the context corresponding to the <div class="src-code"><ol><li><div class="src-line"><a href="http:
</ol></div> parameter.</div>
</dd>
<dt class="field">
<span class="method-title">getMessage</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetMessage">LoggerLoggingEvent::getMessage()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Return the message for this logging event.</div>
</dd>
<dt class="field">
<span class="method-title">getMethodName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#methodgetMethodName">LoggerLocationInfo::getMethodName()</a> in LoggerLocationInfo.php</div>
<div class="<API key>">Returns the method name of the caller.</div>
</dd>
<dt class="field">
<span class="method-title">getName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetName">Logger::getName()</a> in Logger.php</div>
<div class="<API key>">Return the category name.</div>
</dd>
<dt class="field">
<span class="method-title">getName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodgetName">LoggerAppender::getName()</a> in LoggerAppender.php</div>
<div class="<API key>">Get the name of this appender.</div>
</dd>
<dt class="field">
<span class="method-title">getNDC</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetNDC">LoggerLoggingEvent::getNDC()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">This method returns the NDC for this event. It will return the correct content even if the event was generated in a different thread or even on a different machine. The <a href="log4php/LoggerNDC.html#methodget">LoggerNDC::get()</a> method should <strong>never</strong> be called directly.</div>
</dd>
<dt class="field">
<span class="method-title">getNext</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#methodgetNext">LoggerFilter::getNext()</a> in LoggerFilter.php</div>
<div class="<API key>">Returns the next filter in this chain</div>
</dd>
<dt class="field">
<span class="method-title">getParent</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetParent">Logger::getParent()</a> in Logger.php</div>
<div class="<API key>">Returns the parent of this category.</div>
</dd>
<dt class="field">
<span class="method-title">getRenderedMessage</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#<API key>">LoggerLoggingEvent::getRenderedMessage()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Render message.</div>
</dd>
<dt class="field">
<span class="method-title">getRendererMap</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#<API key>">LoggerHierarchy::getRendererMap()</a> in LoggerHierarchy.php</div>
</dd>
<dt class="field">
<span class="method-title">getRootLogger</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodgetRootLogger">Logger::getRootLogger()</a> in Logger.php</div>
<div class="<API key>">get the Root Logger (Delegate to <a href="log4php/Logger.html">Logger</a>)</div>
</dd>
<dt class="field">
<span class="method-title">getRootLogger</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodgetRootLogger">LoggerHierarchy::getRootLogger()</a> in LoggerHierarchy.php</div>
</dd>
<dt class="field">
<span class="method-title">getStartTime</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetStartTime">LoggerLoggingEvent::getStartTime()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Returns the time when the application started, in seconds elapsed since 01.01.1970 plus microseconds if available.</div>
</dd>
<dt class="field">
<span class="method-title">getSyslogEquivalent</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#<API key>">LoggerLevel::getSyslogEquivalent()</a> in LoggerLevel.php</div>
<div class="<API key>">Return the syslog equivalent of this priority as an integer.</div>
</dd>
<dt class="field">
<span class="method-title">getThreadName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetThreadName">LoggerLoggingEvent::getThreadName()</a> in LoggerLoggingEvent.php</div>
</dd>
<dt class="field">
<span class="method-title">getThreshold</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodgetThreshold">LoggerAppender::getThreshold()</a> in LoggerAppender.php</div>
<div class="<API key>">Returns this appenders threshold level.</div>
</dd>
<dt class="field">
<span class="method-title">getThreshold</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodgetThreshold">LoggerHierarchy::getThreshold()</a> in LoggerHierarchy.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#<API key>">LoggerLoggingEvent::<API key>()</a> in LoggerLoggingEvent.php</div>
</dd>
<dt class="field">
<span class="method-title">getTime</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetTime">LoggerLoggingEvent::getTime()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Calculates the time of this event.</div>
</dd>
<dt class="field">
<span class="method-title">getTimeStamp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodgetTimeStamp">LoggerLoggingEvent::getTimeStamp()</a> in LoggerLoggingEvent.php</div>
</dd>
<dt class="field">
<span class="method-title">getAppend</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodgetAppend">LoggerAppenderFile::getAppend()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">getCreateTable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#<API key>">LoggerAppenderAdodb::getCreateTable()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getDatabase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodgetDatabase">LoggerAppenderAdodb::getDatabase()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getDatabaseHandle</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#<API key>">LoggerAppenderPDO::getDatabaseHandle()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sometimes databases allow only one connection to themselves in one thread.</div>
</dd>
<dt class="field">
<span class="method-title">getDatePattern</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::getDatePattern()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getFile</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodgetFile">LoggerAppenderFile::getFile()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">getFileName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodgetFileName">LoggerAppenderFile::getFileName()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">getHost</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodgetHost">LoggerAppenderAdodb::getHost()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getHostname</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodgetHostname"><API key>::getHostname()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getLocationInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::getLocationInfo()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getLog4jNamespace</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::getLog4jNamespace()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getPassword</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodgetPassword">LoggerAppenderAdodb::getPassword()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getPort</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodgetPort"><API key>::getPort()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getRemoteHost</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodgetRemoteHost"><API key>::getRemoteHost()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getSql</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodgetSql">LoggerAppenderAdodb::getSql()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getTable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodgetTable">LoggerAppenderAdodb::getTable()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getTimeout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodgetTimeout"><API key>::getTimeout()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getType</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodgetType">LoggerAppenderAdodb::getType()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getUser</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodgetUser">LoggerAppenderAdodb::getUser()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">getUseXml</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodgetUseXml"><API key>::getUseXml()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#<API key>"><API key>::<API key>()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#<API key>"><API key>::<API key>()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#<API key>"><API key>::<API key>()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">getSystemProperty</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#<API key>"><API key>::getSystemProperty()</a> in <API key>.php</div>
<div class="<API key>">Read a predefined var.</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::<API key>()</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="method-title">getContentType</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#<API key>">LoggerLayoutHtml::getContentType()</a> in LoggerLayoutHtml.php</div>
</dd>
<dt class="field">
<span class="method-title">getContextPrinting</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::getContextPrinting()</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="method-title">getDateFormat</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#methodgetDateFormat">LoggerLayoutTTCC::getDateFormat()</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="method-title">getFooter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#methodgetFooter">LoggerLayoutXml::getFooter()</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
<span class="method-title">getFooter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#methodgetFooter">LoggerLayoutHtml::getFooter()</a> in LoggerLayoutHtml.php</div>
</dd>
<dt class="field">
<span class="method-title">getHeader</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#methodgetHeader">LoggerLayoutXml::getHeader()</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
<span class="method-title">getHeader</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#methodgetHeader">LoggerLayoutHtml::getHeader()</a> in LoggerLayoutHtml.php</div>
</dd>
<dt class="field">
<span class="method-title">getLocationInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::getLocationInfo()</a> in LoggerLayoutXml.php</div>
<div class="<API key>">Whether or not file name and line number will be included in the output.</div>
</dd>
<dt class="field">
<span class="method-title">getLocationInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#<API key>">LoggerLayoutHtml::getLocationInfo()</a> in LoggerLayoutHtml.php</div>
<div class="<API key>">Returns the current value of the <strong>LocationInfo</strong> option.</div>
</dd>
<dt class="field">
<span class="method-title">getLog4jNamespace</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::getLog4jNamespace()</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::<API key>()</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="method-title">getThreadPrinting</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::getThreadPrinting()</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="method-title">getTitle</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#methodgetTitle">LoggerLayoutHtml::getTitle()</a> in LoggerLayoutHtml.php</div>
</dd>
<dt class="field">
<span class="method-title">getByClassName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/LoggerRendererMap.html#<API key>">LoggerRendererMap::getByClassName()</a> in LoggerRendererMap.php</div>
<div class="<API key>">Search the parents of <var>clazz</var> for a renderer.</div>
</dd>
<dt class="field">
<span class="method-title">getByObject</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/LoggerRendererMap.html#methodgetByObject">LoggerRendererMap::getByObject()</a> in LoggerRendererMap.php</div>
<div class="<API key>">Syntactic sugar method that calls <a href="http:
</dd>
</dl>
<a name="h"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">h</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$ht</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#var$ht">LoggerHierarchy::$ht</a> in LoggerHierarchy.php</div>
<div class="<API key>">array hierarchy tree. saves here all loggers</div>
</dd>
<dt class="field">
HT_SIZE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#constHT_SIZE">LoggerNDC::HT_SIZE</a> in LoggerNDC.php</div>
</dd>
<dt class="field">
<span class="var-title">$host</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$host">LoggerAppenderAdodb::$host</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Database host to connect to</div>
</dd>
</dl>
<a name="i"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">i</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">info</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodinfo">Logger::info()</a> in Logger.php</div>
<div class="<API key>">Log a message object with the INFO Level.</div>
</dd>
<dt class="field">
INFO
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#constINFO">LoggerLevel::INFO</a> in LoggerLevel.php</div>
</dd>
<dt class="field">
<span class="method-title">initialize</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodinitialize">Logger::initialize()</a> in Logger.php</div>
<div class="<API key>">Initializes the log4php framework.</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#<API key>">LoggerAppender::<API key>()</a> in LoggerAppender.php</div>
<div class="<API key>">Check whether the message level is below the appender's threshold.</div>
</dd>
<dt class="field">
<span class="method-title">isAttached</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodisAttached">Logger::isAttached()</a> in Logger.php</div>
<div class="<API key>">Is the appender passed as parameter attached to this category?</div>
</dd>
<dt class="field">
<span class="method-title">isDebugEnabled</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::isDebugEnabled()</a> in Logger.php</div>
<div class="<API key>">Check whether this category is enabled for the DEBUG Level.</div>
</dd>
<dt class="field">
<span class="method-title">isDisabled</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodisDisabled">LoggerHierarchy::isDisabled()</a> in LoggerHierarchy.php</div>
<div class="<API key>">This method will return true if this repository is disabled for level object passed as parameter and false otherwise.</div>
</dd>
<dt class="field">
<span class="method-title">isEnabledFor</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodisEnabledFor">Logger::isEnabledFor()</a> in Logger.php</div>
<div class="<API key>">Check whether this category is enabled for a given Level passed as parameter.</div>
</dd>
<dt class="field">
<span class="method-title">isGreaterOrEqual</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#<API key>">LoggerLevel::isGreaterOrEqual()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns <em>true</em> if this level has a higher or equal level than the level passed as argument, <em>false</em> otherwise.</div>
</dd>
<dt class="field">
<span class="method-title">isInfoEnabled</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodisInfoEnabled">Logger::isInfoEnabled()</a> in Logger.php</div>
<div class="<API key>">Check whether this category is enabled for the info Level.</div>
</dd>
<dt class="field">
INTERNAL_ROOT_NAME
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::INTERNAL_ROOT_NAME</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">ignoresThrowable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::ignoresThrowable()</a> in LoggerLayoutTTCC.php</div>
</dd>
</dl>
<a name="l"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">l</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$layout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#var$layout">LoggerAppender::$layout</a> in LoggerAppender.php</div>
<div class="<API key>">LoggerLayout for this appender. It can be null if appender has its own layout</div>
</dd>
<dt class="field">
<span class="var-title">$level</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#var$level">LoggerLoggingEvent::$level</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Level of logging event.</div>
</dd>
<dt class="field">
<span class="var-title">$lineNumber</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#var$lineNumber">LoggerLocationInfo::$lineNumber</a> in LoggerLocationInfo.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderAdodb.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerAppenderAdodb.php</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderEcho.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerAppenderEcho.php</a> in LoggerAppenderEcho.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderFile.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerAppenderFile.php</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderMail.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerAppenderMail.php</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderNull.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerAppenderNull.php</a> in LoggerAppenderNull.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderPDO.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerAppenderPDO.php</a> in LoggerAppenderPDO.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderPhp.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerAppenderPhp.php</a> in LoggerAppenderPhp.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerFilterDenyAll.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerFilterDenyAll.php</a> in LoggerFilterDenyAll.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerPatternParser.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerPatternParser.php</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLayoutHtml.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerLayoutHtml.php</a> in LoggerLayoutHtml.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLayoutPattern.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerLayoutPattern.php</a> in LoggerLayoutPattern.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLayoutSimple.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerLayoutSimple.php</a> in LoggerLayoutSimple.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLayoutTTCC.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerLayoutTTCC.php</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLayoutXml.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerLayoutXml.php</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
LOCATION_INFO_NA
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#<API key>">LoggerLocationInfo::LOCATION_INFO_NA</a> in LoggerLocationInfo.php</div>
<div class="<API key>">When location information is not available the constant <em>NA</em> is returned. Current value of this string constant is <strong>?</strong>.</div>
</dd>
<dt class="field">
<span class="method-title">log</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodlog">Logger::log()</a> in Logger.php</div>
<div class="<API key>">This generic form is intended to be used by wrappers.</div>
</dd>
<dt class="field">
<span class="const-title">LOG4PHP_DIR</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_Logger.php.html#defineLOG4PHP_DIR">LOG4PHP_DIR</a> in Logger.php</div>
<div class="<API key>">LOG4PHP_DIR points to the log4php root directory.</div>
</dd>
<dt class="field">
Logger
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html">Logger</a> in Logger.php</div>
<div class="<API key>">This is the central class in the log4j package. Most logging operations, except configuration, are done through this class.</div>
</dd>
<dt class="field">
<span class="include-title">Logger.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_Logger.php.html">Logger.php</a> in Logger.php</div>
</dd>
<dt class="field">
LoggerAppender
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html">LoggerAppender</a> in LoggerAppender.php</div>
<div class="<API key>">Abstract class that defines output logs strategies.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppender.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerAppender.php.html">LoggerAppender.php</a> in LoggerAppender.php</div>
</dd>
<dt class="field">
LoggerAppenderPool
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppenderPool.html">LoggerAppenderPool</a> in LoggerAppenderPool.php</div>
<div class="<API key>">Pool implmentation for LoggerAppender instances</div>
</dd>
<dt class="field">
<span class="include-title">LoggerAppenderPool.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerAppenderPool.php.html">LoggerAppenderPool.php</a> in LoggerAppenderPool.php</div>
</dd>
<dt class="field">
LoggerConfigurator
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerConfigurator.html">LoggerConfigurator</a> in LoggerConfigurator.php</div>
<div class="<API key>">Implemented by classes capable of configuring log4php using a URL.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerConfigurator.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerConfigurator.php.html">LoggerConfigurator.php</a> in LoggerConfigurator.php</div>
</dd>
<dt class="field">
LoggerException
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerException.html">LoggerException</a> in LoggerException.php</div>
<div class="<API key>">LoggerException class</div>
</dd>
<dt class="field">
<span class="include-title">LoggerException.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerException.php.html">LoggerException.php</a> in LoggerException.php</div>
</dd>
<dt class="field">
LoggerFilter
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html">LoggerFilter</a> in LoggerFilter.php</div>
<div class="<API key>">Users should extend this class to implement customized logging</div>
</dd>
<dt class="field">
<span class="include-title">LoggerFilter.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerFilter.php.html">LoggerFilter.php</a> in LoggerFilter.php</div>
</dd>
<dt class="field">
LoggerHierarchy
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html">LoggerHierarchy</a> in LoggerHierarchy.php</div>
<div class="<API key>">This class is specialized in retrieving loggers by name and also maintaining the logger hierarchy. The logger hierarchy is dealing with the several Log-Levels Logger can have. From log4j website:</div>
</dd>
<dt class="field">
<span class="include-title">LoggerHierarchy.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerHierarchy.php.html">LoggerHierarchy.php</a> in LoggerHierarchy.php</div>
</dd>
<dt class="field">
LoggerLayout
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLayout.html">LoggerLayout</a> in LoggerLayout.php</div>
<div class="<API key>">Extend this abstract class to create your own log layout format.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLayout.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerLayout.php.html">LoggerLayout.php</a> in LoggerLayout.php</div>
</dd>
<dt class="field">
LoggerLevel
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html">LoggerLevel</a> in LoggerLevel.php</div>
<div class="<API key>">Defines the minimum set of levels recognized by the system, that is <em>OFF</em>, <em>FATAL</em>, <em>ERROR</em>, <em>WARN</em>, <em>INFO</em>, <em>DEBUG</em> and <em>ALL</em>.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLevel.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerLevel.php.html">LoggerLevel.php</a> in LoggerLevel.php</div>
</dd>
<dt class="field">
LoggerLocationInfo
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html">LoggerLocationInfo</a> in LoggerLocationInfo.php</div>
<div class="<API key>">The internal representation of caller location information.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLocationInfo.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerLocationInfo.php.html">LoggerLocationInfo.php</a> in LoggerLocationInfo.php</div>
</dd>
<dt class="field">
LoggerLoggingEvent
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html">LoggerLoggingEvent</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">The internal representation of logging event.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerLoggingEvent.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerLoggingEvent.php.html">LoggerLoggingEvent.php</a> in LoggerLoggingEvent.php</div>
</dd>
<dt class="field">
LoggerMDC
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerMDC.html">LoggerMDC</a> in LoggerMDC.php</div>
<div class="<API key>">The LoggerMDC class provides <em>mapped diagnostic contexts</em>.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerMDC.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerMDC.php.html">LoggerMDC.php</a> in LoggerMDC.php</div>
</dd>
<dt class="field">
LoggerNDC
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html">LoggerNDC</a> in LoggerNDC.php</div>
<div class="<API key>">The NDC class implements <em>nested diagnostic contexts</em>.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerNDC.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerNDC.php.html">LoggerNDC.php</a> in LoggerNDC.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Provides methods for reflective use on php objects</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
LoggerRoot
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerRoot.html">LoggerRoot</a> in LoggerRoot.php</div>
<div class="<API key>">The root logger.</div>
</dd>
<dt class="field">
<span class="include-title">LoggerRoot.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/_LoggerRoot.php.html">LoggerRoot.php</a> in LoggerRoot.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="include-title">LoggerRendererMap.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html">LoggerRendererMap.php</a> in LoggerRendererMap.php</div>
</dd>
<dt class="field">
<span class="include-title"><API key>.php</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.php.html"><API key>.php</a> in <API key>.php</div>
</dd>
<dt class="field">
LoggerAppenderAdodb
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html">LoggerAppenderAdodb</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Appends log events to a db table using adodb class.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">ConsoleAppender appends log events to STDOUT or STDERR.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">An Appender that automatically creates a new logfile each day.</div>
</dd>
<dt class="field">
LoggerAppenderEcho
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderEcho.html">LoggerAppenderEcho</a> in LoggerAppenderEcho.php</div>
<div class="<API key>">LoggerAppenderEcho uses <a href="http:
</dd>
<dt class="field">
LoggerAppenderFile
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html">LoggerAppenderFile</a> in LoggerAppenderFile.php</div>
<div class="<API key>">FileAppender appends log events to a file.</div>
</dd>
<dt class="field">
LoggerAppenderMail
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html">LoggerAppenderMail</a> in LoggerAppenderMail.php</div>
<div class="<API key>">Appends log events to mail using php function <a href="http:
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Log every events as a separate email.</div>
</dd>
<dt class="field">
LoggerAppenderNull
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderNull.html">LoggerAppenderNull</a> in LoggerAppenderNull.php</div>
<div class="<API key>">A NullAppender merely exists, it never outputs a message to any device.</div>
</dd>
<dt class="field">
LoggerAppenderPDO
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html">LoggerAppenderPDO</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Appends log events to a db table using PDO.</div>
</dd>
<dt class="field">
LoggerAppenderPhp
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPhp.html">LoggerAppenderPhp</a> in LoggerAppenderPhp.php</div>
<div class="<API key>">Log events using php <a href="http:
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>"><API key> extends LoggerAppenderFile to backup the log files when they reach a certain size.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Serialize events and send them to a network socket.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Log events using php <a href="http:
</dd>
<dt class="field">
LAYOUT_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constLAYOUT_STATE"><API key>::LAYOUT_STATE</a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Use this class to quickly configure the package.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Allows the configuration of log4php from an external file.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>"><API key> class</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Use this class to initialize the log4php environment using XML files.</div>
</dd>
<dt class="field">
LOGGER_DEBUG_KEY
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::LOGGER_DEBUG_KEY</a> in <API key>.php</div>
</dd>
<dt class="field">
LOGGER_FACTORY_KEY
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::LOGGER_FACTORY_KEY</a> in <API key>.php</div>
<div class="<API key>">Key for specifying the LoggerFactory.</div>
</dd>
<dt class="field">
LOGGER_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constLOGGER_PREFIX"><API key>::LOGGER_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
LOGGER_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constLOGGER_STATE"><API key>::LOGGER_STATE</a> in <API key>.php</div>
</dd>
<dt class="field">
LoggerFilterDenyAll
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/LoggerFilterDenyAll.html">LoggerFilterDenyAll</a> in LoggerFilterDenyAll.php</div>
<div class="<API key>">This filter drops all logging events.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">This is a very simple filter based on level matching.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">This is a very simple filter based on level matching, which can be used to reject messages with priorities outside a certain range.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">This is a very simple filter based on string matching.</div>
</dd>
<dt class="field">
<span class="var-title">$leftAlign</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#var$leftAlign"><API key>::$leftAlign</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="var-title">$leftAlign</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#var$leftAlign"><API key>::$leftAlign</a> in <API key>.php</div>
</dd>
<dt class="field">
LEVEL_CONVERTER
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::LEVEL_CONVERTER</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key></a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
LITERAL_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#constLITERAL_STATE">LoggerPatternParser::LITERAL_STATE</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">This class encapsulates the information obtained when parsing formatting modifiers in conversion modifiers.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">A convenience class to convert property values to specific types.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>"><API key> is an abstract class that provides the formatting functionality that derived classes need.</div>
</dd>
<dt class="field">
LoggerPatternParser
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html">LoggerPatternParser</a> in LoggerPatternParser.php</div>
<div class="<API key>">Most of the work of the LoggerPatternLayout class is delegated to the <a href="log4php/helpers/LoggerPatternParser.html">LoggerPatternParser</a> class.</div>
</dd>
<dt class="field">
LOG4J_NS
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#constLOG4J_NS">LoggerLayoutXml::LOG4J_NS</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
LOG4J_NS_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::LOG4J_NS_PREFIX</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::<API key></a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">String constant designating no time information. Current value of this constant is <strong>NULL</strong>.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::<API key></a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">String constant designating relative time. Current value of this constant is <strong>RELATIVE</strong>.</div>
</dd>
<dt class="field">
LOG4PHP_NS
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#constLOG4PHP_NS">LoggerLayoutXml::LOG4PHP_NS</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
LOG4PHP_NS_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::LOG4PHP_NS_PREFIX</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
LoggerLayoutHtml
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html">LoggerLayoutHtml</a> in LoggerLayoutHtml.php</div>
<div class="<API key>">This layout outputs events in a HTML table.</div>
</dd>
<dt class="field">
LoggerLayoutPattern
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutPattern.html">LoggerLayoutPattern</a> in LoggerLayoutPattern.php</div>
<div class="<API key>">A flexible layout configurable with pattern string.</div>
</dd>
<dt class="field">
LoggerLayoutSimple
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutSimple.html">LoggerLayoutSimple</a> in LoggerLayoutSimple.php</div>
<div class="<API key>">A simple layout.</div>
</dd>
<dt class="field">
LoggerLayoutTTCC
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html">LoggerLayoutTTCC</a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">TTCC layout format consists of <strong>t</strong>ime, <strong>t</strong>hread, <strong>c</strong>ategory and nested diagnostic <strong>c</strong>ontext information, hence the name.</div>
</dd>
<dt class="field">
LoggerLayoutXml
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html">LoggerLayoutXml</a> in LoggerLayoutXml.php</div>
<div class="<API key>">The output of the LoggerXmlLayout consists of a series of log4php:event elements.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">The default Renderer renders objects by type casting.</div>
</dd>
<dt class="field">
LoggerRendererMap
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/LoggerRendererMap.html">LoggerRendererMap</a> in LoggerRendererMap.php</div>
<div class="<API key>">Log objects using customized renderers that implement <a href="log4php/renderers/<API key>.html"><API key></a>.</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/<API key>.html"><API key></a> in <API key>.php</div>
<div class="<API key>">Implement this interface in order to render objects as strings using <a href="log4php/renderers/LoggerRendererMap.html">LoggerRendererMap</a>.</div>
</dd>
</dl>
<a name="m"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">m</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$methodName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLocationInfo.html#var$methodName">LoggerLocationInfo::$methodName</a> in LoggerLocationInfo.php</div>
</dd>
<dt class="field">
<span class="var-title">$max</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#var$max"><API key>::$max</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="var-title">$max</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#var$max"><API key>::$max</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="var-title">$min</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#var$min"><API key>::$min</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="var-title">$min</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#var$min"><API key>::$min</a> in <API key>.php</div>
</dd>
<dt class="field">
MAX_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#constMAX_STATE">LoggerPatternParser::MAX_STATE</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
MESSAGE_CONVERTER
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::MESSAGE_CONVERTER</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key></a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
MINUS_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#constMINUS_STATE">LoggerPatternParser::MINUS_STATE</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
MIN_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#constMIN_STATE">LoggerPatternParser::MIN_STATE</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="var-title">$<API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#var$<API key>">LoggerLayoutTTCC::$<API key></a> in LoggerLayoutTTCC.php</div>
</dd>
</dl>
<a name="n"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">n</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$name</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#var$name">LoggerAppender::$name</a> in LoggerAppender.php</div>
</dd>
<dt class="field">
<span class="var-title">$next</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#var$next">LoggerFilter::$next</a> in LoggerFilter.php</div>
</dd>
<dt class="field">
NEUTRAL
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerFilter.html#constNEUTRAL">LoggerFilter::NEUTRAL</a> in LoggerFilter.php</div>
<div class="<API key>">This filter is neutral with respect to the log event. The remaining filters, if any, should be consulted for a final decision.</div>
</dd>
<dt class="field">
<span class="var-title">$next</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#var$next"><API key>::$next</a> in <API key>.php</div>
</dd>
<dt class="field">
NDC_CONVERTER
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#constNDC_CONVERTER">LoggerPatternParser::NDC_CONVERTER</a> in LoggerPatternParser.php</div>
</dd>
</dl>
<a name="o"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">o</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
OFF
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#constOFF">LoggerLevel::OFF</a> in LoggerLevel.php</div>
</dd>
</dl>
<a name="p"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">p</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">peek</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodpeek">LoggerNDC::peek()</a> in LoggerNDC.php</div>
<div class="<API key>">Looks at the last diagnostic context at the top of this NDC without removing it.</div>
</dd>
<dt class="field">
<span class="method-title">pop</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodpop">LoggerNDC::pop()</a> in LoggerNDC.php</div>
<div class="<API key>">Clients should call this method before leaving a diagnostic context.</div>
</dd>
<dt class="field">
<span class="method-title">push</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodpush">LoggerNDC::push()</a> in LoggerNDC.php</div>
<div class="<API key>">Push new diagnostic context information for the current thread.</div>
</dd>
<dt class="field">
<span class="method-title">put</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerMDC.html#methodput">LoggerMDC::put()</a> in LoggerMDC.php</div>
<div class="<API key>">Put a context value as identified with the key parameter into the current thread's context map.</div>
</dd>
<dt class="field">
<span class="var-title">$password</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$password">LoggerAppenderAdodb::$password</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Database password</div>
</dd>
<dt class="field">
<span class="method-title">parse</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#methodparse">LoggerPatternParser::parse()</a> in LoggerPatternParser.php</div>
<div class="<API key>">Parser.</div>
</dd>
</dl>
<a name="r"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">r</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$rendererMap</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#var$rendererMap">LoggerHierarchy::$rendererMap</a> in LoggerHierarchy.php</div>
<div class="<API key>">LoggerRendererMap</div>
</dd>
<dt class="field">
<span class="var-title">$requiresLayout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#var$requiresLayout">LoggerAppender::$requiresLayout</a> in LoggerAppender.php</div>
</dd>
<dt class="field">
<span class="var-title">$root</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#var$root">LoggerHierarchy::$root</a> in LoggerHierarchy.php</div>
<div class="<API key>">The root Logger</div>
</dd>
<dt class="field">
<span class="method-title">remove</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodremove">LoggerNDC::remove()</a> in LoggerNDC.php</div>
<div class="<API key>">Remove the diagnostic context for this thread.</div>
</dd>
<dt class="field">
<span class="method-title">remove</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerMDC.html#methodremove">LoggerMDC::remove()</a> in LoggerMDC.php</div>
<div class="<API key>">Remove the the context identified by the key parameter.</div>
</dd>
<dt class="field">
<span class="method-title">removeAllAppenders</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::removeAllAppenders()</a> in Logger.php</div>
<div class="<API key>">Remove all previously added appenders from this Category instance.</div>
</dd>
<dt class="field">
<span class="method-title">removeAppender</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::removeAppender()</a> in Logger.php</div>
<div class="<API key>">Remove the appender passed as parameter form the list of appenders.</div>
</dd>
<dt class="field">
<span class="method-title">requiresLayout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#<API key>">LoggerAppender::requiresLayout()</a> in LoggerAppender.php</div>
<div class="<API key>">Configurators call this method to determine if the appender requires a layout.</div>
</dd>
<dt class="field">
<span class="method-title">resetConfiguration</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#<API key>">Logger::resetConfiguration()</a> in Logger.php</div>
<div class="<API key>">Destroy configurations for logger definitions</div>
</dd>
<dt class="field">
<span class="method-title">resetConfiguration</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#<API key>">LoggerHierarchy::resetConfiguration()</a> in LoggerHierarchy.php</div>
<div class="<API key>">Reset all values contained in this hierarchy instance to their default.</div>
</dd>
<dt class="field">
<span class="var-title">$requiresLayout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderNull.html#var$requiresLayout">LoggerAppenderNull::$requiresLayout</a> in LoggerAppenderNull.php</div>
</dd>
<dt class="field">
<span class="var-title">$requiresLayout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#var$requiresLayout"><API key>::$requiresLayout</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="var-title">$requiresLayout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#var$requiresLayout"><API key>::$requiresLayout</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">reset</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodreset"><API key>::reset()</a> in <API key>.php</div>
</dd>
<dt class="field">
RENDERER_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::RENDERER_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::<API key></a> in <API key>.php</div>
</dd>
<dt class="field">
ROOT_LOGGER_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::ROOT_LOGGER_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
ROOT_STATE
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constROOT_STATE"><API key>::ROOT_STATE</a> in <API key>.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::<API key></a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">reset</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodreset"><API key>::reset()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">render</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/<API key>.html#methodrender"><API key>::render()</a> in <API key>.php</div>
<div class="<API key>">Render the entity passed as parameter as a String.</div>
</dd>
<dt class="field">
<span class="method-title">render</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/renderers/<API key>.html#methodrender"><API key>::render()</a> in <API key>.php</div>
<div class="<API key>">Render objects by type casting</div>
</dd>
</dl>
<a name="s"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">s</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="method-title">setAdditivity</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodsetAdditivity">Logger::setAdditivity()</a> in Logger.php</div>
<div class="<API key>">Set the additivity flag for this Category instance.</div>
</dd>
<dt class="field">
<span class="method-title">setLayout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodsetLayout">LoggerAppender::setLayout()</a> in LoggerAppender.php</div>
<div class="<API key>">Set the Layout for this appender.</div>
</dd>
<dt class="field">
<span class="method-title">setLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodsetLevel">Logger::setLevel()</a> in Logger.php</div>
<div class="<API key>">Set the level of this Category.</div>
</dd>
<dt class="field">
<span class="method-title">setLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerRoot.html#methodsetLevel">LoggerRoot::setLevel()</a> in LoggerRoot.php</div>
<div class="<API key>">Setting a null value to the level of the root category may have catastrophic results.</div>
</dd>
<dt class="field">
<span class="method-title">setMaxDepth</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerNDC.html#methodsetMaxDepth">LoggerNDC::setMaxDepth()</a> in LoggerNDC.php</div>
<div class="<API key>">Set maximum depth of this diagnostic context. If the current depth is smaller or equal to <var>maxDepth</var>, then no action is taken.</div>
</dd>
<dt class="field">
<span class="method-title">setName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodsetName">LoggerAppender::setName()</a> in LoggerAppender.php</div>
<div class="<API key>">Set the name of this appender.</div>
</dd>
<dt class="field">
<span class="method-title">setParent</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodsetParent">Logger::setParent()</a> in Logger.php</div>
<div class="<API key>">Sets the parent logger of this logger</div>
</dd>
<dt class="field">
<span class="method-title">setParent</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerRoot.html#methodsetParent">LoggerRoot::setParent()</a> in LoggerRoot.php</div>
<div class="<API key>">Always returns false.</div>
</dd>
<dt class="field">
<span class="method-title">setProperties</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html#methodsetProperties"><API key>::setProperties()</a> in <API key>.php</div>
<div class="<API key>">Set the properites for the object that match the <div class="src-code"><ol><li><div class="src-line"><span class="src-id">prefix</span></div></li>
</ol></div> passed as parameter.</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html#<API key>"><API key>::<API key>()</a> in <API key>.php</div>
<div class="<API key>">Set the properties of an object passed as a parameter in one go. The <div class="src-code"><ol><li><div class="src-line"><span class="src-id">properties</span></div></li>
</ol></div> are parsed relative to a <div class="src-code"><ol><li><div class="src-line"><span class="src-id">prefix</span></div></li>
</ol></div>.</div>
</dd>
<dt class="field">
<span class="method-title">setProperty</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html#methodsetProperty"><API key>::setProperty()</a> in <API key>.php</div>
<div class="<API key>">Set a property on this PropertySetter's Object. If successful, this</div>
</dd>
<dt class="field">
<span class="method-title">setter</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/<API key>.html#methodsetter"><API key>::setter()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setThreshold</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodsetThreshold">LoggerHierarchy::setThreshold()</a> in LoggerHierarchy.php</div>
<div class="<API key>">set a new threshold level</div>
</dd>
<dt class="field">
<span class="method-title">setThreshold</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#methodsetThreshold">LoggerAppender::setThreshold()</a> in LoggerAppender.php</div>
<div class="<API key>">Set the threshold level of this appender.</div>
</dd>
<dt class="field">
<span class="method-title">shutdown</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodshutdown">Logger::shutdown()</a> in Logger.php</div>
<div class="<API key>">Safely close all appenders.</div>
</dd>
<dt class="field">
<span class="method-title">shutdown</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#methodshutdown">LoggerHierarchy::shutdown()</a> in LoggerHierarchy.php</div>
<div class="<API key>">Shutting down a hierarchy will <em>safely</em> close and remove all appenders in all categories including the root logger.</div>
</dd>
<dt class="field">
<span class="var-title">$sql</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$sql">LoggerAppenderAdodb::$sql</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">A LoggerPatternLayout string used to format a valid insert query (mandatory).</div>
</dd>
<dt class="field">
<span class="method-title">setAppend</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodsetAppend">LoggerAppenderFile::setAppend()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">setCreateTable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#<API key>">LoggerAppenderPDO::setCreateTable()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Indicator if the logging table should be created on startup, if its not existing.</div>
</dd>
<dt class="field">
<span class="method-title">setCreateTable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#<API key>">LoggerAppenderAdodb::setCreateTable()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setDatabase</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodsetDatabase">LoggerAppenderAdodb::setDatabase()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setDatePattern</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::setDatePattern()</a> in <API key>.php</div>
<div class="<API key>">Sets date format for the file name.</div>
</dd>
<dt class="field">
<span class="method-title">setDry</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetDry"><API key>::setDry()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setDry</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetDry"><API key>::setDry()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setDry</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#methodsetDry">LoggerAppenderMail::setDry()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">setDry</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetDry"><API key>::setDry()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setDSN</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodsetDSN">LoggerAppenderPDO::setDSN()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sets the DSN string for this connection. In case of</div>
</dd>
<dt class="field">
<span class="method-title">setFacility</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetFacility"><API key>::setFacility()</a> in <API key>.php</div>
<div class="<API key>">Set the facility value for the syslog message.</div>
</dd>
<dt class="field">
<span class="method-title">setFile</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetFile"><API key>::setFile()</a> in <API key>.php</div>
<div class="<API key>">The File property takes a string value which should be the name of the file to append to.</div>
</dd>
<dt class="field">
<span class="method-title">setFile</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodsetFile">LoggerAppenderFile::setFile()</a> in LoggerAppenderFile.php</div>
<div class="<API key>">Sets and opens the file where the log output will go.</div>
</dd>
<dt class="field">
<span class="method-title">setFileName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderFile.html#methodsetFileName">LoggerAppenderFile::setFileName()</a> in LoggerAppenderFile.php</div>
</dd>
<dt class="field">
<span class="method-title">setFileName</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetFileName"><API key>::setFileName()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setFrom</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetFrom"><API key>::setFrom()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setFrom</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#methodsetFrom">LoggerAppenderMail::setFrom()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">setHost</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodsetHost">LoggerAppenderAdodb::setHost()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setIdent</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetIdent"><API key>::setIdent()</a> in <API key>.php</div>
<div class="<API key>">Set the ident of the syslog message.</div>
</dd>
<dt class="field">
<span class="method-title">setInsertPattern</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#<API key>">LoggerAppenderPDO::setInsertPattern()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sets the <a href="log4php/layouts/LoggerLayoutPattern.html">LoggerLayoutPattern</a> format strings for $insertSql.</div>
</dd>
<dt class="field">
<span class="method-title">setInsertSql</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodsetInsertSql">LoggerAppenderPDO::setInsertSql()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sets the SQL INSERT string to use with $insertPattern.</div>
</dd>
<dt class="field">
<span class="method-title">setLocationInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::setLocationInfo()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setLog4jNamespace</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::setLog4jNamespace()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setMaxBackupIndex</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::setMaxBackupIndex()</a> in <API key>.php</div>
<div class="<API key>">Set the maximum number of backup files to keep around.</div>
</dd>
<dt class="field">
<span class="method-title">setMaxFileSize</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::setMaxFileSize()</a> in <API key>.php</div>
<div class="<API key>">Set the maximum size that the output file is allowed to reach before being rolled over to backup files.</div>
</dd>
<dt class="field">
<span class="method-title">setMaximumFileSize</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::setMaximumFileSize()</a> in <API key>.php</div>
<div class="<API key>">Set the maximum size that the output file is allowed to reach before being rolled over to backup files.</div>
</dd>
<dt class="field">
<span class="method-title">setOption</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetOption"><API key>::setOption()</a> in <API key>.php</div>
<div class="<API key>">Set the option value for the syslog message.</div>
</dd>
<dt class="field">
<span class="method-title">setOverridePriority</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#<API key>"><API key>::setOverridePriority()</a> in <API key>.php</div>
<div class="<API key>">If the priority of the message to be sent can be defined by a value in the properties-file, set parameter value to "true".</div>
</dd>
<dt class="field">
<span class="method-title">setPassword</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodsetPassword">LoggerAppenderAdodb::setPassword()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setPassword</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodsetPassword">LoggerAppenderPDO::setPassword()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sets the password for this connection.</div>
</dd>
<dt class="field">
<span class="method-title">setPort</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetPort"><API key>::setPort()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setPort</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetPort"><API key>::setPort()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setPriority</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetPriority"><API key>::setPriority()</a> in <API key>.php</div>
<div class="<API key>">Set the priority value for the syslog message.</div>
</dd>
<dt class="field">
<span class="method-title">setRemoteHost</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetRemoteHost"><API key>::setRemoteHost()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setSmtpHost</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetSmtpHost"><API key>::setSmtpHost()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setSql</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodsetSql">LoggerAppenderAdodb::setSql()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setSql</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodsetSql">LoggerAppenderPDO::setSql()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sets the SQL string into which the event should be transformed.</div>
</dd>
<dt class="field">
<span class="method-title">setSubject</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetSubject"><API key>::setSubject()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setSubject</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#methodsetSubject">LoggerAppenderMail::setSubject()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">setTable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodsetTable">LoggerAppenderPDO::setTable()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sets the tablename to which this appender should log.</div>
</dd>
<dt class="field">
<span class="method-title">setTable</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodsetTable">LoggerAppenderAdodb::setTable()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setTarget</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetTarget"><API key>::setTarget()</a> in <API key>.php</div>
<div class="<API key>">Set console target.</div>
</dd>
<dt class="field">
<span class="method-title">setTimeout</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetTimeout"><API key>::setTimeout()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setTo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetTo"><API key>::setTo()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setTo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderMail.html#methodsetTo">LoggerAppenderMail::setTo()</a> in LoggerAppenderMail.php</div>
</dd>
<dt class="field">
<span class="method-title">setType</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodsetType">LoggerAppenderAdodb::setType()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setUser</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderPDO.html#methodsetUser">LoggerAppenderPDO::setUser()</a> in LoggerAppenderPDO.php</div>
<div class="<API key>">Sets the username for this connection.</div>
</dd>
<dt class="field">
<span class="method-title">setUser</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#methodsetUser">LoggerAppenderAdodb::setUser()</a> in LoggerAppenderAdodb.php</div>
</dd>
<dt class="field">
<span class="method-title">setUseXml</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#methodsetUseXml"><API key>::setUseXml()</a> in <API key>.php</div>
</dd>
<dt class="field">
STDERR
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#constSTDERR"><API key>::STDERR</a> in <API key>.php</div>
</dd>
<dt class="field">
STDOUT
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/<API key>.html#constSTDOUT"><API key>::STDOUT</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setAcceptOnMatch</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#<API key>"><API key>::setAcceptOnMatch()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setAcceptOnMatch</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#<API key>"><API key>::setAcceptOnMatch()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setAcceptOnMatch</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#<API key>"><API key>::setAcceptOnMatch()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setLevelMax</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#methodsetLevelMax"><API key>::setLevelMax()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setLevelMin</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#methodsetLevelMin"><API key>::setLevelMin()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setLevelToMatch</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#<API key>"><API key>::setLevelToMatch()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">setStringToMatch</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/filters/<API key>.html#<API key>"><API key>::setStringToMatch()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">spacePad</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodspacePad"><API key>::spacePad()</a> in <API key>.php</div>
<div class="<API key>">Fast space padding method.</div>
</dd>
<dt class="field">
<span class="method-title">substVars</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodsubstVars"><API key>::substVars()</a> in <API key>.php</div>
<div class="<API key>">Perform variable substitution in string <var>$val</var> from the values of keys found with the getSystemProperty() method.</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::<API key>()</a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">The <strong>CategoryPrefixing</strong> option specifies whether Category name is part of log output or not. This is true by default.</div>
</dd>
<dt class="field">
<span class="method-title">setContextPrinting</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::setContextPrinting()</a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">The <strong>ContextPrinting</strong> option specifies log output will include the nested context information belonging to the current thread.</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutPattern.html#<API key>">LoggerLayoutPattern::<API key>()</a> in LoggerLayoutPattern.php</div>
<div class="<API key>">Set the <strong>ConversionPattern</strong> option. This is the string which controls formatting and consists of a mix of literal content and conversion specifiers.</div>
</dd>
<dt class="field">
<span class="method-title">setDateFormat</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#methodsetDateFormat">LoggerLayoutTTCC::setDateFormat()</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<span class="method-title">setLocationInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::setLocationInfo()</a> in LoggerLayoutXml.php</div>
<div class="<API key>">The $locationInfo option takes a boolean value. By default,</div>
</dd>
<dt class="field">
<span class="method-title">setLocationInfo</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#<API key>">LoggerLayoutHtml::setLocationInfo()</a> in LoggerLayoutHtml.php</div>
<div class="<API key>">The <strong>LocationInfo</strong> option takes a boolean value. By</div>
</dd>
<dt class="field">
<span class="method-title">setLog4jNamespace</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutXml.html#<API key>">LoggerLayoutXml::setLog4jNamespace()</a> in LoggerLayoutXml.php</div>
</dd>
<dt class="field">
<span class="method-title"><API key></span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::<API key>()</a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">The <strong><API key></strong> option specifies if microseconds infos should be printed at the end of timestamp.</div>
</dd>
<dt class="field">
<span class="method-title">setThreadPrinting</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#<API key>">LoggerLayoutTTCC::setThreadPrinting()</a> in LoggerLayoutTTCC.php</div>
<div class="<API key>">The <strong>ThreadPrinting</strong> option specifies whether the name of the current thread is part of log output or not. This is true by default.</div>
</dd>
<dt class="field">
<span class="method-title">setTitle</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutHtml.html#methodsetTitle">LoggerLayoutHtml::setTitle()</a> in LoggerLayoutHtml.php</div>
<div class="<API key>">The <strong>Title</strong> option takes a String value. This option sets the document title of the generated HTML document.</div>
</dd>
</dl>
<a name="t"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">t</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$threshold</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerAppender.html#var$threshold">LoggerAppender::$threshold</a> in LoggerAppender.php</div>
</dd>
<dt class="field">
<span class="var-title">$threshold</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerHierarchy.html#var$threshold">LoggerHierarchy::$threshold</a> in LoggerHierarchy.php</div>
<div class="<API key>">LoggerLevel main level threshold</div>
</dd>
<dt class="field">
<span class="var-title">$timeStamp</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#var$timeStamp">LoggerLoggingEvent::$timeStamp</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">The number of seconds elapsed from 1/1/1970 until logging event was created plus microseconds if available.</div>
</dd>
<dt class="field">
<span class="method-title">toInt</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodtoInt">LoggerLevel::toInt()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns the integer representation of this level.</div>
</dd>
<dt class="field">
<span class="method-title">toLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodtoLevel">LoggerLevel::toLevel()</a> in LoggerLevel.php</div>
<div class="<API key>">Convert the string passed as argument to a level. If the conversion fails, then this method returns a DEBUG Level.</div>
</dd>
<dt class="field">
<span class="method-title">toString</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLoggingEvent.html#methodtoString">LoggerLoggingEvent::toString()</a> in LoggerLoggingEvent.php</div>
<div class="<API key>">Serialize this object</div>
</dd>
<dt class="field">
<span class="method-title">toString</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#methodtoString">LoggerLevel::toString()</a> in LoggerLevel.php</div>
<div class="<API key>">Returns the string representation of this priority.</div>
</dd>
<dt class="field">
<span class="var-title">$table</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$table">LoggerAppenderAdodb::$table</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Table name to write events. Used only if $createTable is true.</div>
</dd>
<dt class="field">
<span class="var-title">$type</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$type">LoggerAppenderAdodb::$type</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">The type of database to connect to</div>
</dd>
<dt class="field">
THRESHOLD_PREFIX
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#<API key>"><API key>::THRESHOLD_PREFIX</a> in <API key>.php</div>
</dd>
<dt class="field">
THREAD_CONVERTER
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/LoggerPatternParser.html#<API key>">LoggerPatternParser::THREAD_CONVERTER</a> in LoggerPatternParser.php</div>
</dd>
<dt class="field">
<span class="method-title">toBoolean</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodtoBoolean"><API key>::toBoolean()</a> in <API key>.php</div>
<div class="<API key>">If <var>$value</var> is <em>true</em>, then <em>true</em> is returned. If <var>$value</var> is <em>false</em>, then <em>true</em> is returned. Otherwise, <var>$default</var> is returned.</div>
</dd>
<dt class="field">
<span class="method-title">toFileSize</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodtoFileSize"><API key>::toFileSize()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">toInt</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodtoInt"><API key>::toInt()</a> in <API key>.php</div>
</dd>
<dt class="field">
<span class="method-title">toLevel</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/helpers/<API key>.html#methodtoLevel"><API key>::toLevel()</a> in <API key>.php</div>
<div class="<API key>">Converts a standard or custom priority level to a Level object.</div>
</dd>
<dt class="field">
<span class="var-title">$threadPrinting</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutTTCC.html#var$threadPrinting">LoggerLayoutTTCC::$threadPrinting</a> in LoggerLayoutTTCC.php</div>
</dd>
<dt class="field">
<API key>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/layouts/LoggerLayoutPattern.html#<API key>">LoggerLayoutPattern::<API key></a> in LoggerLayoutPattern.php</div>
<div class="<API key>">Default conversion TTCC Pattern</div>
</dd>
</dl>
<a name="u"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">u</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
<span class="var-title">$user</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/appenders/LoggerAppenderAdodb.html#var$user">LoggerAppenderAdodb::$user</a> in LoggerAppenderAdodb.php</div>
<div class="<API key>">Database user name</div>
</dd>
</dl>
<a name="w"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">w</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
WARN
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/LoggerLevel.html#constWARN">LoggerLevel::WARN</a> in LoggerLevel.php</div>
</dd>
<dt class="field">
<span class="method-title">warn</span>
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/Logger.html#methodwarn">Logger::warn()</a> in Logger.php</div>
<div class="<API key>">Log a message with the WARN level.</div>
</dd>
</dl>
<a name="x"></a>
<div class="<API key>">
<div style="float: left" class="index-letter-title">x</div>
<div style="float: right"><a href="#top">top</a></div>
<div style="clear: both"></div>
</div>
<dl>
<dt class="field">
XMLNS
</dt>
<dd class="index-item-body">
<div class="index-item-details"><a href="log4php/configurators/<API key>.html#constXMLNS"><API key>::XMLNS</a> in <API key>.php</div>
</dd>
</dl>
<div class="index-letter-menu">
<a class="index-letter" href="<API key>.html#a">a</a>
<a class="index-letter" href="<API key>.html#c">c</a>
<a class="index-letter" href="<API key>.html#d">d</a>
<a class="index-letter" href="<API key>.html#e">e</a>
<a class="index-letter" href="<API key>.html#f">f</a>
<a class="index-letter" href="<API key>.html#g">g</a>
<a class="index-letter" href="<API key>.html#h">h</a>
<a class="index-letter" href="<API key>.html#i">i</a>
<a class="index-letter" href="<API key>.html#l">l</a>
<a class="index-letter" href="<API key>.html#m">m</a>
<a class="index-letter" href="<API key>.html#n">n</a>
<a class="index-letter" href="<API key>.html#o">o</a>
<a class="index-letter" href="<API key>.html#p">p</a>
<a class="index-letter" href="<API key>.html#r">r</a>
<a class="index-letter" href="<API key>.html#s">s</a>
<a class="index-letter" href="<API key>.html#t">t</a>
<a class="index-letter" href="<API key>.html#u">u</a>
<a class="index-letter" href="<API key>.html#w">w</a>
<a class="index-letter" href="<API key>.html#x">x</a>
<a class="index-letter" href="<API key>.html
</div> </body>
</html>
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_111) on Thu Aug 18 01:51:14 UTC 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>org.apache.hadoop.registry.client.impl (Apache Hadoop Main 2.7.3 API)</title>
<meta name="date" content="2016-08-18">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<h1 class="bar"><a href="../../../../../../org/apache/hadoop/registry/client/impl/package-summary.html" target="classFrame">org.apache.hadoop.registry.client.impl</a></h1>
<div class="indexContainer">
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="<API key>.html" title="class in org.apache.hadoop.registry.client.impl" target="classFrame"><API key></a></li>
</ul>
</div>
</body>
</html>
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" >
<title>Silicon Valley 2013
- Proposal</title>
<meta name="author" content="Andrew Hay" >
<link rel="alternate" type="application/rss+xml" title="devopsdays RSS Feed" href="http:
<script type="text/javascript" src="https:
<script type="text/javascript">
google.load('jquery', '1.3.2');
</script>
<!---This is a combined jAmpersand, jqwindont , jPullquote -->
<script type="text/javascript" src="/js/devops.js"></script>
<!--- Blueprint CSS Framework Screen + Fancytype-Screen + jedi.css -->
<link rel="stylesheet" href="/css/devops.min.css" type="text/css" media="screen, projection">
<link rel="stylesheet" href="/css/blueprint/print.css" type="text/css" media="print">
<!--[if IE]>
<link rel="stylesheet" href="/css/blueprint/ie.css" type="text/css" media="screen, projection">
<![endif]
</head>
<body onload="initialize()">
<div class="container ">
<div class="span-24 last" id="header">
<div class="span-16 first">
<img src="/images/devopsdays-banner.png" title="devopsdays banner" width="801" height="115" alt="devopdays banner" ><br>
</div>
<div class="span-8 last">
</div>
</div>
<div class="span-24 last">
<div class="span-15 first">
<div id="headermenu">
<table >
<tr>
<td>
<a href="/"><img alt="home" title="home" src="/images/home.png"></a>
<a href="/">Home</a>
</td>
<td>
<a href="/contact/"><img alt="contact" title="contact" src="/images/contact.png"></a>
<a href="/contact/">Contact</a>
</td>
<td>
<a href="/events/"><img alt="events" title="events" src="/images/events.png"></a>
<a href="/events/">Events</a>
</td>
<td>
<a href="/presentations/"><img alt="presentations" title="presentations" src="/images/presentations.png"></a>
<a href="/presentations/">Presentations</a>
</td>
<td>
<a href="/blog/"><img alt="blog" title="blog" src="/images/blog.png"></a>
<a href="/blog/">Blog</a>
</td>
</tr>
</table>
</div>
</div>
<div class="span-8 last">
</div>
<div class="span-24 last" id="title">
<div class="span-15 first">
<h1>Silicon Valley 2013
- Proposal </h1>
</div>
<div class="span-8 last">
</div>
<h1>Gold sponsors</h1>
</div>
<div class="span-15 ">
<div class="span-15 last ">
<div class="submenu">
<h3>
<a href="/events/2013-mountainview/">welcome</a>
<a href="/events/2013-mountainview/propose">propose</a>
<a href="/events/2013-mountainview/program">program</a>
<a href="/events/2013-mountainview/location">location</a>
<a href="/events/2013-mountainview/registration">register</a>
<a href="/events/2013-mountainview/sponsor">sponsor</a>
<a href="/events/2013-mountainview/contact">contact</a>
</h3>
</div>
Back to <a href='..'>proposals overview</a> - <a href='../../program'>program</a>
<hr>
<h3>DevOps for Security: Automation is your only hope to protect Cloud IaaS</h3>
<p><strong>Abstract:</strong></p>
<p>Enterprises today are adopting the cloud in all shapes and sizes:
public, private, hybrid, even (cloud)washed. For some security teams
this is a nightmare, but that won’t stop the business from moving
ahead because on-demand computing simply helps improve business
agility too much.</p>
<p>There is hope though. Whether you are building applications in public
CSPs (Amazon EC2/VPC, Rackspace Cloud, etc), private
<API key> (OpenStack, CloudStack, VMware even) the
security controls you care about are the same, but they way they need
to be deployed and run is very very different.</p>
<p>DevOps teams have fallen in love with automation tools like Chef,
Puppet, and others, but how can security teams leverage automation to
improve their life? How do we let the business realize the promise of
fully automated self-service provisioning of resources by end users,
while keeping our necessary controls in place and ensuring continuous
compliance?</p>
<p>In this session, Rand Wacker (VP of Product for CloudPassage) will
share experience learned from some of the largest and most advanced
organizations in the world as they have pioneered the cloud security
automation trail.</p>
<p>Please join us to learn and discuss:
· Why the DevOps, Marketing, and BU teams love cloud, and where adoption is going
· How security must re-think their approach to enable the business to get the most out of IaaS, in both public and private environments
· Who is responsible for cloud security, both in your org as well as with your providers
· What it takes to maintain security visibility and compliance in a self-service world
· When you can expect your org to be using cloud resources that aren’t adequately secured (spoiler alert: its probably already happening)</p>
<p><strong>Speaker:</strong></p>
<p>Andrew Hay Director of Applied Security Research CloudPassage Inc.</p>
</div>
<div class="span-15 first last">
<script type="text/javascript">
// var disqus_developer = 1;
</script>
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'devopsdays';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
(document.<API key>('head')[0] || document.<API key>('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
<hr>
</div>
</div>
<div class="span-8 last">
<div class="span-8 last">
<a href='http:
<a href='http:
<a href='http://opscode.com/'><img border=0 alt='Opscode' title='Opscode' width=100px height=100px src='/events/2013-mountainview/logos/opscode.png'></a>
<a href='http:
<a href='http://www8.hp.com/us/en/software-solutions/software.html?compURI=1234839&jumpid=<API key>'><img border=0 alt='HP' title='HP' width=100px height=100px src='/events/2013-mountainview/logos/hp.png'></a>
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<h1>Special sponsors</h1>
<a href='http:
<a href='http:
<a href='http:
<h1>Gold sponsors</h1>
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http://ca.com/lisa'><img border=0 alt='Ca Technologies' title='Ca Technologies' width=100px height=100px src='/events/2013-mountainview/logos/ca.png'></a>
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http://cumulusnetworks.com/'><img border=0 alt='Cumulus Networks' title='Cumulus Networks' width=100px height=100px src='/events/2013-mountainview/logos/cumulusnetworks.png'></a>
<h1>Silver sponsors</h1>
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<a href='http:
<h1>Media sponsors</h1>
<a href='http:
<a href='http:
<a href='http://lopsa.org'><img border=0 alt='Lopsa' title='Lopsa' width=100px height=100px src='/events/2013-mountainview/logos/lopsa.png'></a>
</div>
<div class="span-8 last">
</div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-9713393-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https:
var s = document.<API key>('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
|
// Account.h
// CardFlightLibrary
#import <Foundation/Foundation.h>
@interface CFTAccount : NSObject
@property (nonatomic, strong) NSString *apiToken;
@property (nonatomic, strong) NSString *accountToken;
/**
* Create the account object with the api token and account token
* @param apiToken The API Token associated with this developer account
* @param accountToken The Merchant Account Token associated with this developer account
*/
-(id) initWithApiToken:(NSString *)apiToken andAccountToken:(NSString *)accountToken;
@end
|
<?php
namespace ctala\transaccion\classes;
/**
* Description of Helper
*
* @author ctala
*/
class Helper {
public static function redirect($url, $variables) {
foreach ($variables as $key => $value) {
$args_array[] = '<input type="hidden" name="' . $key . '" value="' . $value . '" />';
}
?>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
</head>
<body style="background-image:url('https://webpay3g.transbank.cl/webpayserver/imagenes/background.gif')">
<form name="WS1" id="WS1" action="<?= $url ?>" method="POST" onl>
<?php
foreach ($args_array as $arg) {
echo $arg;
}
?>
<input type="submit" id="<API key>" style="visibility: hidden;">
</form>
<script>
$(document).ready(function () {
$("#WS1").submit();
});
</script>
</body>
</html>
<?php
}
}
|
package org.zstack.sdk.zwatch.monitorgroup.api;
import org.zstack.sdk.zwatch.monitorgroup.entity.<API key>;
public class <API key> {
public <API key> inventory;
public void setInventory(<API key> inventory) {
this.inventory = inventory;
}
public <API key> getInventory() {
return this.inventory;
}
}
|
foam.CLASS({
package: 'foam.nanos.jetty',
name: '<API key>',
documentation: 'model of org.eclipse.jetty.server.ThreadPool',
properties: [
{
name: 'minThreads',
class: 'Int',
value: 8
},
{
name: 'maxThreads',
class: 'Int',
value: 200
},
{
name: 'idleTimeout',
class: 'Int',
value: 60000
}
]
});
|
package org.hoteia.qalingo.core.service.pojo;
import java.util.List;
import java.util.Set;
import org.dozer.Mapper;
import org.hoteia.qalingo.core.domain.Customer;
import org.hoteia.qalingo.core.domain.CustomerMarketArea;
import org.hoteia.qalingo.core.domain.CustomerWishlist;
import org.hoteia.qalingo.core.domain.MarketArea;
import org.hoteia.qalingo.core.pojo.customer.CustomerPojo;
import org.hoteia.qalingo.core.pojo.customer.<API key>;
import org.hoteia.qalingo.core.pojo.util.mapper.PojoUtil;
import org.hoteia.qalingo.core.service.CustomerService;
import org.hoteia.qalingo.core.service.MarketService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service("customerPojoService")
@Transactional(readOnly = true)
public class CustomerPojoService {
private final Logger logger = LoggerFactory.getLogger(getClass());
@Autowired
private Mapper dozerBeanMapper;
@Autowired
protected MarketService marketService;
@Autowired
private CustomerService customerService;
public List<CustomerPojo> getAllCustomers() {
List<Customer> customers = customerService.findCustomers();
logger.debug("Found {} customers", customers.size());
return PojoUtil.mapAll(dozerBeanMapper, customers, CustomerPojo.class);
}
public CustomerPojo getCustomerById(final String id) {
Customer customer = customerService.getCustomerById(id);
logger.debug("Found customer {} for id {}", customer, id);
return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
}
public CustomerPojo <API key>(final String usernameOrEmail) {
Customer customer = customerService.<API key>(usernameOrEmail);
logger.debug("Found customer {} for usernameOrEmail {}", customer, usernameOrEmail);
return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
}
public CustomerPojo <API key>(final String permalink) {
Customer customer = customerService.<API key>(permalink);
logger.debug("Found customer {} for usernameOrEmail {}", customer, permalink);
return customer == null ? null : dozerBeanMapper.map(customer, CustomerPojo.class);
}
@Transactional
public void saveOrUpdate(final CustomerPojo customerJsonPojo) throws Exception {
Customer customer = dozerBeanMapper.map(customerJsonPojo, Customer.class);
logger.info("Saving customer {}", customer);
customerService.<API key>(customer);
}
public List<<API key>> getWishlist(final Customer customer, final MarketArea marketArea) {
final CustomerMarketArea customerMarketArea = customer.<API key>(marketArea.getId());
Set<CustomerWishlist> wishlistProducts = customerMarketArea.getWishlistProducts();
List<<API key>> wishlists = PojoUtil.mapAll(dozerBeanMapper, wishlistProducts, <API key>.class);
return wishlists;
}
public void <API key>(MarketArea marketArea, Customer customer, String catalogCategoryCode, String productSkuCode) throws Exception {
customerService.<API key>(marketArea, customer, catalogCategoryCode, productSkuCode);
}
}
|
<?php
abstract class OC_Archive{
/**
* open any of the supported archive types
* @param string $path
* @return OC_Archive|void
*/
public static function open($path) {
$ext=substr($path, strrpos($path, '.'));
switch($ext) {
case '.zip':
return new OC_Archive_ZIP($path);
case '.gz':
case '.bz':
case '.bz2':
case '.tgz':
case '.tar':
return new OC_Archive_TAR($path);
}
}
/**
* @param $source
*/
abstract function __construct($source);
/**
* add an empty folder to the archive
* @param string $path
* @return bool
*/
abstract function addFolder($path);
/**
* add a file to the archive
* @param string $path
* @param string $source either a local file or string data
* @return bool
*/
abstract function addFile($path, $source='');
/**
* rename a file or folder in the archive
* @param string $source
* @param string $dest
* @return bool
*/
abstract function rename($source, $dest);
/**
* get the uncompressed size of a file in the archive
* @param string $path
* @return int
*/
abstract function filesize($path);
/**
* get the last modified time of a file in the archive
* @param string $path
* @return int
*/
abstract function mtime($path);
/**
* get the files in a folder
* @param string $path
* @return array
*/
abstract function getFolder($path);
/**
* get all files in the archive
* @return array
*/
abstract function getFiles();
/**
* get the content of a file
* @param string $path
* @return string
*/
abstract function getFile($path);
/**
* extract a single file from the archive
* @param string $path
* @param string $dest
* @return bool
*/
abstract function extractFile($path, $dest);
/**
* extract the archive
* @param string $dest
* @return bool
*/
abstract function extract($dest);
/**
* check if a file or folder exists in the archive
* @param string $path
* @return bool
*/
abstract function fileExists($path);
/**
* remove a file or folder from the archive
* @param string $path
* @return bool
*/
abstract function remove($path);
/**
* get a file handler
* @param string $path
* @param string $mode
* @return resource
*/
abstract function getStream($path, $mode);
/**
* add a folder and all its content
* @param string $path
* @param string $source
* @return boolean|null
*/
function addRecursive($path, $source) {
$dh = opendir($source);
if(is_resource($dh)) {
$this->addFolder($path);
while (($file = readdir($dh)) !== false) {
if($file=='.' or $file=='..') {
continue;
}
if(is_dir($source.'/'.$file)) {
$this->addRecursive($path.'/'.$file, $source.'/'.$file);
}else{
$this->addFile($path.'/'.$file, $source.'/'.$file);
}
}
}
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_26) on Tue Feb 14 08:16:37 UTC 2012 -->
<TITLE>
Uses of Class org.apache.hadoop.security.<API key> (Hadoop 1.0.1 API)
</TITLE>
<META NAME="date" CONTENT="2012-02-14">
<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 org.apache.hadoop.security.<API key> (Hadoop 1.0.1 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<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="../../../../../org/apache/hadoop/security/<API key>.html" title="class in org.apache.hadoop.security"><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-all.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?org/apache/hadoop/security//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.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>
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.apache.hadoop.security.<API key></B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Packages that use <A HREF="../../../../../org/apache/hadoop/security/<API key>.html" title="class in org.apache.hadoop.security"><API key></A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.apache.hadoop.security.authorize"><B>org.apache.hadoop.security.authorize</B></A></TD>
<TD> </TD>
</TR>
</TABLE>
<P>
<A NAME="org.apache.hadoop.security.authorize"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
Uses of <A HREF="../../../../../org/apache/hadoop/security/<API key>.html" title="class in org.apache.hadoop.security"><API key></A> in <A HREF="../../../../../org/apache/hadoop/security/authorize/package-summary.html">org.apache.hadoop.security.authorize</A></FONT></TH>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="<API key>">
<TH ALIGN="left" COLSPAN="2">Subclasses of <A HREF="../../../../../org/apache/hadoop/security/<API key>.html" title="class in org.apache.hadoop.security"><API key></A> in <A HREF="../../../../../org/apache/hadoop/security/authorize/package-summary.html">org.apache.hadoop.security.authorize</A></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/security/authorize/<API key>.html" title="class in org.apache.hadoop.security.authorize"><API key></A></B></CODE>
<BR>
An exception class for <API key> issues.</TD>
</TR>
</TABLE>
<P>
<HR>
<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="<API key>"></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="../../../../../org/apache/hadoop/security/<API key>.html" title="class in org.apache.hadoop.security"><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-all.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?org/apache/hadoop/security//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.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>
<HR>
Copyright © 2009 The Apache Software Foundation
</BODY>
</HTML>
|
# Parser Error Handler
Parser Error Handler validation is enabled by calling [IParser#<API key>(IParserErrorHandler)](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/parser/IParser.html#<API key>(ca.uhn.fhir.parser.IParserErrorHandler)) on either the FhirContext or on individual parser instances. This method takes an [IParserErrorHandler](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/parser/IParserErrorHandler.html), which is a callback that will be invoked any time a parse issue is detected.
There are two implementations of IParserErrorHandler that come built into HAPI FHIR. You can also supply your own implementation if you want.
* [**LenientErrorHandler**](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/parser/LenientErrorHandler.html) logs any errors but does not abort parsing. By default this handler is used, and it logs errors at "warning" level. It can also be configured to silently ignore issues. LenientErrorHandler is the default.
* [**StrictErrorHandler**](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/parser/StrictErrorHandler.html) throws a [DataFormatException](/hapi-fhir/apidocs/hapi-fhir-base/ca/uhn/fhir/parser/DataFormatException.html) if any errors are detected.
The following example shows how to configure a parser to use strict validation.
java
{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|parserValidation}}
You can also configure the error handler at the FhirContext level, which is useful for clients.
java
{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|clientValidation}}
FhirContext level validators can also be useful on servers.
java
{{snippet:classpath:/ca/uhn/hapi/fhir/docs/ValidatorExamples.java|serverValidation}}
|
package nak.liblinear;
import static nak.liblinear.Linear.info;
/**
* Trust Region Newton Method optimization
*/
class Tron {
private final Function fun_obj;
private final double eps;
private final int max_iter;
public Tron( final Function fun_obj ) {
this(fun_obj, 0.1);
}
public Tron( final Function fun_obj, double eps ) {
this(fun_obj, eps, 1000);
}
public Tron( final Function fun_obj, double eps, int max_iter ) {
this.fun_obj = fun_obj;
this.eps = eps;
this.max_iter = max_iter;
}
void tron(double[] w) {
// Parameters for updating the iterates.
double eta0 = 1e-4, eta1 = 0.25, eta2 = 0.75;
// Parameters for updating the trust region size delta.
double sigma1 = 0.25, sigma2 = 0.5, sigma3 = 4;
int n = fun_obj.get_nr_variable();
int i, cg_iter;
double delta, snorm, one = 1.0;
double alpha, f, fnew, prered, actred, gs;
int search = 1, iter = 1;
double[] s = new double[n];
double[] r = new double[n];
double[] w_new = new double[n];
double[] g = new double[n];
for (i = 0; i < n; i++)
w[i] = 0;
f = fun_obj.fun(w);
fun_obj.grad(w, g);
delta = euclideanNorm(g);
double gnorm1 = delta;
double gnorm = gnorm1;
if (gnorm <= eps * gnorm1) search = 0;
iter = 1;
while (iter <= max_iter && search != 0) {
cg_iter = trcg(delta, g, s, r);
System.arraycopy(w, 0, w_new, 0, n);
daxpy(one, s, w_new);
gs = dot(g, s);
prered = -0.5 * (gs - dot(s, r));
fnew = fun_obj.fun(w_new);
// Compute the actual reduction.
actred = f - fnew;
// On the first iteration, adjust the initial step bound.
snorm = euclideanNorm(s);
if (iter == 1) delta = Math.min(delta, snorm);
// Compute prediction alpha*snorm of the step.
if (fnew - f - gs <= 0)
alpha = sigma3;
else
alpha = Math.max(sigma1, -0.5 * (gs / (fnew - f - gs)));
// Update the trust region bound according to the ratio of actual to
// predicted reduction.
if (actred < eta0 * prered)
delta = Math.min(Math.max(alpha, sigma1) * snorm, sigma2 * delta);
else if (actred < eta1 * prered)
delta = Math.max(sigma1 * delta, Math.min(alpha * snorm, sigma2 * delta));
else if (actred < eta2 * prered)
delta = Math.max(sigma1 * delta, Math.min(alpha * snorm, sigma3 * delta));
else
delta = Math.max(delta, Math.min(alpha * snorm, sigma3 * delta));
info("iter %2d act %5.3e pre %5.3e delta %5.3e f %5.3e |g| %5.3e CG %3d%n", iter, actred, prered, delta, f, gnorm, cg_iter);
if (actred > eta0 * prered) {
iter++;
System.arraycopy(w_new, 0, w, 0, n);
f = fnew;
fun_obj.grad(w, g);
gnorm = euclideanNorm(g);
if (gnorm <= eps * gnorm1) break;
}
if (f < -1.0e+32) {
info("WARNING: f < -1.0e+32%n");
break;
}
if (Math.abs(actred) <= 0 && prered <= 0) {
info("WARNING: actred and prered <= 0%n");
break;
}
if (Math.abs(actred) <= 1.0e-12 * Math.abs(f) && Math.abs(prered) <= 1.0e-12 * Math.abs(f)) {
info("WARNING: actred and prered too small%n");
break;
}
}
}
private int trcg(double delta, double[] g, double[] s, double[] r) {
int n = fun_obj.get_nr_variable();
double one = 1;
double[] d = new double[n];
double[] Hd = new double[n];
double rTr, rnewTrnew, cgtol;
for (int i = 0; i < n; i++) {
s[i] = 0;
r[i] = -g[i];
d[i] = r[i];
}
cgtol = 0.1 * euclideanNorm(g);
int cg_iter = 0;
rTr = dot(r, r);
while (true) {
if (euclideanNorm(r) <= cgtol) break;
cg_iter++;
fun_obj.Hv(d, Hd);
double alpha = rTr / dot(d, Hd);
daxpy(alpha, d, s);
if (euclideanNorm(s) > delta) {
info("cg reaches trust region boundary%n");
alpha = -alpha;
daxpy(alpha, d, s);
double std = dot(s, d);
double sts = dot(s, s);
double dtd = dot(d, d);
double dsq = delta * delta;
double rad = Math.sqrt(std * std + dtd * (dsq - sts));
if (std >= 0)
alpha = (dsq - sts) / (std + rad);
else
alpha = (rad - std) / dtd;
daxpy(alpha, d, s);
alpha = -alpha;
daxpy(alpha, Hd, r);
break;
}
alpha = -alpha;
daxpy(alpha, Hd, r);
rnewTrnew = dot(r, r);
double beta = rnewTrnew / rTr;
scale(beta, d);
daxpy(one, r, d);
rTr = rnewTrnew;
}
return (cg_iter);
}
/**
* constant times a vector plus a vector
*
* <pre>
* vector2 += constant * vector1
* </pre>
*
* @since 1.8
*/
private static void daxpy(double constant, double vector1[], double vector2[]) {
if (constant == 0) return;
assert vector1.length == vector2.length;
for (int i = 0; i < vector1.length; i++) {
vector2[i] += constant * vector1[i];
}
}
/**
* returns the dot product of two vectors
*
* @since 1.8
*/
private static double dot(double vector1[], double vector2[]) {
double product = 0;
assert vector1.length == vector2.length;
for (int i = 0; i < vector1.length; i++) {
product += vector1[i] * vector2[i];
}
return product;
}
/**
* returns the euclidean norm of a vector
*
* @since 1.8
*/
private static double euclideanNorm(double vector[]) {
int n = vector.length;
if (n < 1) {
return 0;
}
if (n == 1) {
return Math.abs(vector[0]);
}
// this algorithm is (often) more accurate than just summing up the squares and taking the square-root afterwards
double scale = 0; // scaling factor that is factored out
double sum = 1; // basic sum of squares from which scale has been factored out
for (int i = 0; i < n; i++) {
if (vector[i] != 0) {
double abs = Math.abs(vector[i]);
// try to get the best scaling factor
if (scale < abs) {
double t = scale / abs;
sum = 1 + sum * (t * t);
scale = abs;
} else {
double t = abs / scale;
sum += t * t;
}
}
}
return scale * Math.sqrt(sum);
}
/**
* scales a vector by a constant
*
* @since 1.8
*/
private static void scale(double constant, double vector[]) {
if (constant == 1.0) return;
for (int i = 0; i < vector.length; i++) {
vector[i] *= constant;
}
}
}
|
package geotrellis.test.multiband.cassandra
import geotrellis.config.Dataset
import geotrellis.raster.MultibandTile
import geotrellis.spark._
import geotrellis.spark.io._
import geotrellis.test.CassandraTest
import geotrellis.test.multiband.load.HadoopLoad
import geotrellis.vector.ProjectedExtent
import org.apache.spark.SparkContext
abstract class HadoopIngestTest(dataset: Dataset) extends CassandraTest[ProjectedExtent, SpatialKey, MultibandTile](dataset) with HadoopLoad
object HadoopIngestTest {
def apply(implicit dataset: Dataset, _sc: SparkContext) = new HadoopIngestTest(dataset) {
@transient implicit val sc = _sc
}
}
|
<!-- BEGIN MUNGE: UNVERSIONED_WARNING -->
<!-- END MUNGE: UNVERSIONED_WARNING -->
# Kubernetes Multi-AZ Clusters
## (previously nicknamed "Ubernetes-Lite")
## Introduction
Full Cluster Federation will offer sophisticated federation between multiple kubernetes
clusters, offering true high-availability, multiple provider support &
cloud-bursting, multiple region support etc. However, many users have
expressed a desire for a "reasonably" high-available cluster, that runs in
multiple zones on GCE or availability zones in AWS, and can tolerate the failure
of a single zone without the complexity of running multiple clusters.
Multi-AZ Clusters aim to deliver exactly that functionality: to run a single
Kubernetes cluster in multiple zones. It will attempt to make reasonable
scheduling decisions, in particular so that a replication controller's pods are
spread across zones, and it will try to be aware of constraints - for example
that a volume cannot be mounted on a node in a different zone.
Multi-AZ Clusters are deliberately limited in scope; for many advanced functions
the answer will be "use full Cluster Federation". For example, multiple-region
support is not in scope. Routing affinity (e.g. so that a webserver will
prefer to talk to a backend service in the same zone) is similarly not in
scope.
## Design
These are the main requirements:
1. kube-up must allow bringing up a cluster that spans multiple zones.
1. pods in a replication controller should attempt to spread across zones.
1. pods which require volumes should not be scheduled onto nodes in a different zone.
1. load-balanced services should work reasonably
kube-up support
kube-up support for multiple zones will initially be considered
advanced/experimental functionality, so the interface is not initially going to
be particularly user-friendly. As we design the evolution of kube-up, we will
make multiple zones better supported.
For the initial implementation, kube-up must be run multiple times, once for
each zone. The first kube-up will take place as normal, but then for each
additional zone the user must run kube-up again, specifying
`<API key>=true` and `KUBE_SUBNET_CIDR=172.20.x.0/24`. This will then
create additional nodes in a different zone, but will register them with the
existing master.
Zone spreading
This will be implemented by modifying the existing scheduler priority function
`SelectorSpread`. Currently this priority function aims to put pods in an RC
on different hosts, but it will be extended first to spread across zones, and
then to spread across hosts.
So that the scheduler does not need to call out to the cloud provider on every
scheduling decision, we must somehow record the zone information for each node.
The implementation of this will be described in the implementation section.
Note that zone spreading is 'best effort'; zones are just be one of the factors
in making scheduling decisions, and thus it is not guaranteed that pods will
spread evenly across zones. However, this is likely desirable: if a zone is
overloaded or failing, we still want to schedule the requested number of pods.
Volume affinity
Most cloud providers (at least GCE and AWS) cannot attach their persistent
volumes across zones. Thus when a pod is being scheduled, if there is a volume
attached, that will dictate the zone. This will be implemented using a new
scheduler predicate (a hard constraint): `VolumeZonePredicate`.
When `VolumeZonePredicate` observes a pod scheduling request that includes a
volume, if that volume is zone-specific, `VolumeZonePredicate` will exclude any
nodes not in that zone.
Again, to avoid the scheduler calling out to the cloud provider, this will rely
on information attached to the volumes. This means that this will only support
<API key>, because direct mounts do not have a place to attach
zone information. PersistentVolumes will then include zone information where
volumes are zone-specific.
Load-balanced services should operate reasonably
For both AWS & GCE, Kubernetes creates a native cloud load-balancer for each
service of type LoadBalancer. The native cloud load-balancers on both AWS &
GCE are region-level, and support load-balancing across instances in multiple
zones (in the same region). For both clouds, the behaviour of the native cloud
load-balancer is reasonable in the face of failures (indeed, this is why clouds
provide load-balancing as a primitve).
For multi-AZ clusters we will therefore simply rely on the native cloud provider
load balancer behaviour, and we do not anticipate substantial code changes.
One notable shortcoming here is that load-balanced traffic still goes through
kube-proxy controlled routing, and kube-proxy does not (currently) favor
targeting a pod running on the same instance or even the same zone. This will
likely produce a lot of unnecessary cross-zone traffic (which is likely slower
and more expensive). This might be sufficiently low-hanging fruit that we
choose to address it in kube-proxy / multi-AZ clusters, but this can be addressed
after the initial implementation.
## Implementation
The main implementation points are:
1. how to attach zone information to Nodes and PersistentVolumes
1. how nodes get zone information
1. how volumes get zone information
Attaching zone information
We must attach zone information to Nodes and PersistentVolumes, and possibly to
other resources in future. There are two obvious alternatives: we can use
labels/annotations, or we can extend the schema to include the information.
For the initial implementation, we propose to use labels. The reasoning is:
1. It is considerably easier to implement.
1. We will reserve the two labels `failure-domain.alpha.kubernetes.io/zone` and
`failure-domain.alpha.kubernetes.io/region` for the two pieces of information
we need. By putting this under the `kubernetes.io` namespace there is no risk
of collision, and by putting it under `alpha.kubernetes.io` we clearly mark
this as an experimental feature.
1. We do not yet know whether these labels will be sufficient for all
environments, nor which entities will require zone information. Labels give us
more flexibility here.
1. Because the labels are reserved, we can move to schema-defined fields in
future using our cross-version mapping techniques.
Node labeling
We do not want to require an administrator to manually label nodes. We instead
modify the kubelet to include the appropriate labels when it registers itself.
The information is easily obtained by the kubelet from the cloud provider.
Volume labeling
As with nodes, we do not want to require an administrator to manually label
volumes. We will create an admission controller `<API key>`.
`<API key>` will intercept requests to create PersistentVolumes,
and will label them appropriately by calling in to the cloud provider.
## AWS Specific Considerations
The AWS implementation here is fairly straightforward. The AWS API is
region-wide, meaning that a single call will find instances and volumes in all
zones. In addition, instance ids and volume ids are unique per-region (and
hence also per-zone). I believe they are actually globally unique, but I do
not know if this is guaranteed; in any case we only need global uniqueness if
we are to span regions, which will not be supported by multi-AZ clusters (to do
that correctly requires a full Cluster Federation type approach).
## GCE Specific Considerations
The GCE implementation is more complicated than the AWS implementation because
GCE APIs are zone-scoped. To perform an operation, we must perform one REST
call per zone and combine the results, unless we can determine in advance that
an operation references a particular zone. For many operations, we can make
that determination, but in some cases - such as listing all instances, we must
combine results from calls in all relevant zones.
A further complexity is that GCE volume names are scoped per-zone, not
per-region. Thus it is permitted to have two volumes both named `myvolume` in
two different GCE zones. (Instance names are currently unique per-region, and
thus are not a problem for multi-AZ clusters).
The volume scoping leads to a (small) behavioural change for multi-AZ clusters on
GCE. If you had two volumes both named `myvolume` in two different GCE zones,
this would not be ambiguous when Kubernetes is operating only in a single zone.
But, when operating a cluster across multiple zones, `myvolume` is no longer
sufficient to specify a volume uniquely. Worse, the fact that a volume happens
to be unambigious at a particular time is no guarantee that it will continue to
be unambigious in future, because a volume with the same name could
subsequently be created in a second zone. While perhaps unlikely in practice,
we cannot automatically enable multi-AZ clusters for GCE users if this then causes
volume mounts to stop working.
This suggests that (at least on GCE), multi-AZ clusters must be optional (i.e.
there must be a feature-flag). It may be that we can make this feature
semi-automatic in future, by detecting whether nodes are running in multiple
zones, but it seems likely that kube-up could instead simply set this flag.
For the initial implementation, creating volumes with identical names will
yield undefined results. Later, we may add some way to specify the zone for a
volume (and possibly require that volumes have their zone specified when
running in multi-AZ cluster mode). We could add a new `zone` field to the
PersistentVolume type for GCE PD volumes, or we could use a DNS-style dotted
name for the volume name (<name>.<zone>)
Initially therefore, the GCE changes will be to:
1. change kube-up to support creation of a cluster in multiple zones
1. pass a flag enabling multi-AZ clusters with kube-up
1. change the kubernetes cloud provider to iterate through relevant zones when resolving items
1. tag GCE PD volumes with the appropriate zone information
<!-- BEGIN MUNGE: IS_VERSIONED -->
<!-- TAG IS_VERSIONED -->
<!-- END MUNGE: IS_VERSIONED -->
<!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[]()
<!-- END MUNGE: GENERATED_ANALYTICS -->
|
// file at the top-level directory of this distribution and at
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use core::prelude::*;
use io::prelude::*;
use os::unix::prelude::*;
use ffi::{self, CString, OsString, AsOsStr, OsStr};
use io::{self, Error, Seek, SeekFrom};
use libc::{self, c_int, c_void, size_t, off_t, c_char, mode_t};
use mem;
use path::{Path, PathBuf};
use ptr;
use rc::Rc;
use sys::fd::FileDesc;
use sys::{c, cvt, cvt_r};
use sys_common::FromInner;
use vec::Vec;
pub struct File(FileDesc);
pub struct FileAttr {
stat: libc::stat,
}
pub struct ReadDir {
dirp: *mut libc::DIR,
root: Rc<PathBuf>,
}
pub struct DirEntry {
buf: Vec<u8>,
dirent: *mut libc::dirent_t,
root: Rc<PathBuf>,
}
#[derive(Clone)]
pub struct OpenOptions {
flags: c_int,
read: bool,
write: bool,
mode: mode_t,
}
#[derive(Clone, PartialEq, Eq, Debug)]
pub struct FilePermissions { mode: mode_t }
impl FileAttr {
pub fn is_dir(&self) -> bool {
(self.stat.st_mode as mode_t) & libc::S_IFMT == libc::S_IFDIR
}
pub fn is_file(&self) -> bool {
(self.stat.st_mode as mode_t) & libc::S_IFMT == libc::S_IFREG
}
pub fn size(&self) -> u64 { self.stat.st_size as u64 }
pub fn perm(&self) -> FilePermissions {
FilePermissions { mode: (self.stat.st_mode as mode_t) & 0o777 }
}
pub fn accessed(&self) -> u64 {
self.mktime(self.stat.st_atime as u64, self.stat.st_atime_nsec as u64)
}
pub fn modified(&self) -> u64 {
self.mktime(self.stat.st_mtime as u64, self.stat.st_mtime_nsec as u64)
}
// times are in milliseconds (currently)
fn mktime(&self, secs: u64, nsecs: u64) -> u64 {
secs * 1000 + nsecs / 1000000
}
}
impl FilePermissions {
pub fn readonly(&self) -> bool { self.mode & 0o222 == 0 }
pub fn set_readonly(&mut self, readonly: bool) {
if readonly {
self.mode &= !0o222;
} else {
self.mode |= 0o222;
}
}
}
impl FromInner<i32> for FilePermissions {
fn from_inner(mode: i32) -> FilePermissions {
FilePermissions { mode: mode as mode_t }
}
}
impl Iterator for ReadDir {
type Item = io::Result<DirEntry>;
fn next(&mut self) -> Option<io::Result<DirEntry>> {
extern {
fn rust_dirent_t_size() -> c_int;
}
let mut buf: Vec<u8> = Vec::with_capacity(unsafe {
rust_dirent_t_size() as usize
});
let ptr = buf.as_mut_ptr() as *mut libc::dirent_t;
let mut entry_ptr = ptr::null_mut();
loop {
if unsafe { libc::readdir_r(self.dirp, ptr, &mut entry_ptr) != 0 } {
return Some(Err(Error::last_os_error()))
}
if entry_ptr.is_null() {
return None
}
let entry = DirEntry {
buf: buf,
dirent: entry_ptr,
root: self.root.clone()
};
if entry.name_bytes() == b"." || entry.name_bytes() == b".." {
buf = entry.buf;
} else {
return Some(Ok(entry))
}
}
}
}
impl Drop for ReadDir {
fn drop(&mut self) {
let r = unsafe { libc::closedir(self.dirp) };
debug_assert_eq!(r, 0);
}
}
impl DirEntry {
pub fn path(&self) -> PathBuf {
self.root.join(<OsStr as OsStrExt>::from_bytes(self.name_bytes()))
}
fn name_bytes(&self) -> &[u8] {
extern {
fn rust_list_dir_val(ptr: *mut libc::dirent_t) -> *const c_char;
}
unsafe {
let ptr = rust_list_dir_val(self.dirent);
ffi::c_str_to_bytes(mem::copy_lifetime(self, &ptr))
}
}
}
impl OpenOptions {
pub fn new() -> OpenOptions {
OpenOptions {
flags: 0,
read: false,
write: false,
mode: 0o666,
}
}
pub fn read(&mut self, read: bool) {
self.read = read;
}
pub fn write(&mut self, write: bool) {
self.write = write;
}
pub fn append(&mut self, append: bool) {
self.flag(libc::O_APPEND, append);
}
pub fn truncate(&mut self, truncate: bool) {
self.flag(libc::O_TRUNC, truncate);
}
pub fn create(&mut self, create: bool) {
self.flag(libc::O_CREAT, create);
}
pub fn mode(&mut self, mode: i32) {
self.mode = mode as mode_t;
}
fn flag(&mut self, bit: c_int, on: bool) {
if on {
self.flags |= bit;
} else {
self.flags &= !bit;
}
}
}
impl File {
pub fn open(path: &Path, opts: &OpenOptions) -> io::Result<File> {
let flags = opts.flags | match (opts.read, opts.write) {
(true, true) => libc::O_RDWR,
(false, true) => libc::O_WRONLY,
(true, false) |
(false, false) => libc::O_RDONLY,
};
let path = cstr(path);
let fd = try!(cvt_r(|| unsafe {
libc::open(path.as_ptr(), flags, opts.mode)
}));
Ok(File(FileDesc::new(fd)))
}
pub fn file_attr(&self) -> io::Result<FileAttr> {
let mut stat: libc::stat = unsafe { mem::zeroed() };
try!(cvt(unsafe { libc::fstat(self.0.raw(), &mut stat) }));
Ok(FileAttr { stat: stat })
}
pub fn fsync(&self) -> io::Result<()> {
try!(cvt_r(|| unsafe { libc::fsync(self.0.raw()) }));
Ok(())
}
pub fn datasync(&self) -> io::Result<()> {
try!(cvt_r(|| unsafe { os_datasync(self.0.raw()) }));
return Ok(());
#[cfg(any(target_os = "macos", target_os = "ios"))]
unsafe fn os_datasync(fd: c_int) -> c_int {
libc::fcntl(fd, libc::F_FULLFSYNC)
}
#[cfg(target_os = "linux")]
unsafe fn os_datasync(fd: c_int) -> c_int { libc::fdatasync(fd) }
#[cfg(not(any(target_os = "macos",
target_os = "ios",
target_os = "linux")))]
unsafe fn os_datasync(fd: c_int) -> c_int { libc::fsync(fd) }
}
pub fn truncate(&self, size: u64) -> io::Result<()> {
try!(cvt_r(|| unsafe {
libc::ftruncate(self.0.raw(), size as libc::off_t)
}));
Ok(())
}
pub fn read(&self, buf: &mut [u8]) -> io::Result<usize> {
self.0.read(buf)
}
pub fn write(&self, buf: &[u8]) -> io::Result<usize> {
self.0.write(buf)
}
pub fn flush(&self) -> io::Result<()> { Ok(()) }
pub fn seek(&self, pos: SeekFrom) -> io::Result<u64> {
let (whence, pos) = match pos {
SeekFrom::Start(off) => (libc::SEEK_SET, off as off_t),
SeekFrom::End(off) => (libc::SEEK_END, off as off_t),
SeekFrom::Current(off) => (libc::SEEK_CUR, off as off_t),
};
let n = try!(cvt(unsafe { libc::lseek(self.0.raw(), pos, whence) }));
Ok(n as u64)
}
pub fn fd(&self) -> &FileDesc { &self.0 }
}
fn cstr(path: &Path) -> CString {
CString::from_slice(path.as_os_str().as_bytes())
}
pub fn mkdir(p: &Path) -> io::Result<()> {
let p = cstr(p);
try!(cvt(unsafe { libc::mkdir(p.as_ptr(), 0o777) }));
Ok(())
}
pub fn readdir(p: &Path) -> io::Result<ReadDir> {
let root = Rc::new(p.to_path_buf());
let p = cstr(p);
unsafe {
let ptr = libc::opendir(p.as_ptr());
if ptr.is_null() {
Err(Error::last_os_error())
} else {
Ok(ReadDir { dirp: ptr, root: root })
}
}
}
pub fn unlink(p: &Path) -> io::Result<()> {
let p = cstr(p);
try!(cvt(unsafe { libc::unlink(p.as_ptr()) }));
Ok(())
}
pub fn rename(old: &Path, new: &Path) -> io::Result<()> {
let old = cstr(old);
let new = cstr(new);
try!(cvt(unsafe { libc::rename(old.as_ptr(), new.as_ptr()) }));
Ok(())
}
pub fn set_perm(p: &Path, perm: FilePermissions) -> io::Result<()> {
let p = cstr(p);
try!(cvt_r(|| unsafe { libc::chmod(p.as_ptr(), perm.mode) }));
Ok(())
}
pub fn rmdir(p: &Path) -> io::Result<()> {
let p = cstr(p);
try!(cvt(unsafe { libc::rmdir(p.as_ptr()) }));
Ok(())
}
pub fn chown(p: &Path, uid: isize, gid: isize) -> io::Result<()> {
let p = cstr(p);
try!(cvt_r(|| unsafe {
libc::chown(p.as_ptr(), uid as libc::uid_t, gid as libc::gid_t)
}));
Ok(())
}
pub fn readlink(p: &Path) -> io::Result<PathBuf> {
let c_path = cstr(p);
let p = c_path.as_ptr();
let mut len = unsafe { libc::pathconf(p as *mut _, libc::_PC_NAME_MAX) };
if len < 0 {
len = 1024; // FIXME: read PATH_MAX from C ffi?
}
let mut buf: Vec<u8> = Vec::with_capacity(len as usize);
unsafe {
let n = try!(cvt({
libc::readlink(p, buf.as_ptr() as *mut c_char, len as size_t)
}));
buf.set_len(n as usize);
}
let s: OsString = OsStringExt::from_vec(buf);
Ok(PathBuf::new(&s))
}
pub fn symlink(src: &Path, dst: &Path) -> io::Result<()> {
let src = cstr(src);
let dst = cstr(dst);
try!(cvt(unsafe { libc::symlink(src.as_ptr(), dst.as_ptr()) }));
Ok(())
}
pub fn link(src: &Path, dst: &Path) -> io::Result<()> {
let src = cstr(src);
let dst = cstr(dst);
try!(cvt(unsafe { libc::link(src.as_ptr(), dst.as_ptr()) }));
Ok(())
}
pub fn stat(p: &Path) -> io::Result<FileAttr> {
let p = cstr(p);
let mut stat: libc::stat = unsafe { mem::zeroed() };
try!(cvt(unsafe { libc::stat(p.as_ptr(), &mut stat) }));
Ok(FileAttr { stat: stat })
}
pub fn lstat(p: &Path) -> io::Result<FileAttr> {
let p = cstr(p);
let mut stat: libc::stat = unsafe { mem::zeroed() };
try!(cvt(unsafe { libc::lstat(p.as_ptr(), &mut stat) }));
Ok(FileAttr { stat: stat })
}
pub fn utimes(p: &Path, atime: u64, mtime: u64) -> io::Result<()> {
let p = cstr(p);
let buf = [super::ms_to_timeval(atime), super::ms_to_timeval(mtime)];
try!(cvt(unsafe { c::utimes(p.as_ptr(), buf.as_ptr()) }));
Ok(())
}
|
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
* @var yii\base\View $this
* @var app\modules\workflow\models\WorkflowForm $model
* @var yii\widgets\ActiveForm $form
*/
?>
<div class="workflow-search">
<?php $form = ActiveForm::begin(array('method' => 'get')); ?>
<?= $form->field($model, 'id'); ?>
<?= $form->field($model, 'previous_user_id'); ?>
<?= $form->field($model, 'next_user_id'); ?>
<?= $form->field($model, 'module'); ?>
<?= $form->field($model, 'wf_table'); ?>
<?php // echo $form->field($model, 'wf_id'); ?>
<?php // echo $form->field($model, 'status_from'); ?>
<?php // echo $form->field($model, 'status_to'); ?>
<?php // echo $form->field($model, 'actions_next'); ?>
<?php // echo $form->field($model, 'date_create'); ?>
<div class="form-group">
<?= Html::submitButton('Search', array('class' => 'btn btn-primary')); ?>
<?= Html::resetButton('Reset', array('class' => 'btn btn-default')); ?>
</div>
<?php ActiveForm::end(); ?>
</div>
|
/*
* @description Prace s binarnim vyheldavacim stromem
* @author Marek Salat - xsalat00
* @projekt IFJ11
* @date
*/
#ifndef <API key>
#define <API key>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#define INS_OK 1 // vlozeno v poradku
#define INS_NODE_EXIST 0 // prvek se zadanym klicem uz existuje
#define INS_MALLOC -5 // chyba pri alokaci
#define INS_TREE_NULL -5 // misto stromu NULL
#define INS_KEY_NULL -5 // misto klice NULL
typedef enum {
DEFAULT, // data budou void repektive zadna, nijak se nemazou
FUNCIONS, // data se pretypuji na TFunction*
VAR, // tady jeste nevim 28.10.2011 jak bude vypadat polozka pro symbol|identifikator
} EBTreeDataType;
typedef struct TBTreeNode {
struct TBTreeNode *left; // levy podstrom
struct TBTreeNode *right; // pravy podstrom
char *key; // vyhledavaci klic
int height; // vyska nejdelsi vetve podstromu
void *data; // data uzivatele, predem nevim jaka, data si prida uzivatel
} *TNode;
typedef struct {
TNode root; // koren stromu
TNode lastAdded; // ukazatel na posledni pridanou polozku(nekdy se to muze hodit)
int nodeCount; // pocet uzlu
EBTreeDataType type; // podle typu stromu poznam jak TNode->data smazat
} TBTree;
/*
* inicializace stromu
* @param strom
* @param typ stromu
*/
void BTreeInit(TBTree*, EBTreeDataType);
/*
* funkce prida polozku do stromu
* konevce - data pridava uzivatel
* @param ukazatel na strom
* @param ukazatel na retezec
* @param ukazatel na data(jedno jaka)
* @return INS_OK pri uspesnem volozeni,
* INS_NODE_EXIST pri nevlozeni(polozka se stejnym klicem jiz ve stromu existuje),
* INS_MALLOC pri nepovedene alokaci
* INS_TREE_NULL misto stromu NULL
* INS_KEY_NULL misto klice NULL
* T->lastAdded se ulozi pozice posledni PRIDANE polozky
*/
int BTreeInsert(TBTree*, char*, void*);
/*
* smaze cely strom
* @param ukazatel na strom
*/
void BTreeDelete(TBTree*);
/*
* vyhleda ve stromu podle klice
* @param ukazatel na strom
* @param klic hledaneho uzlu
* @return pozice uzlu, pokud uzel nebyl nalezen vraci NULL
*/
TNode BTreeSearch(TBTree*, char*);
#endif // <API key>
|
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
#include "./av1_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/<API key>.h"
#include "test/util.h"
#include "av1/common/enums.h"
namespace {
using std::tr1::tuple;
using libaom_test::ACMRandom;
typedef void (*Predictor)(uint8_t *dst, ptrdiff_t stride, int bs,
const uint8_t *above, const uint8_t *left);
// Note:
// Test parameter list:
// Reference predictor, optimized predictor, prediction mode, block size
typedef tuple<Predictor, Predictor, int> PredFuncMode;
typedef tuple<PredFuncMode, int> PredParams;
#if <API key>
typedef void (*HbdPredictor)(uint16_t *dst, ptrdiff_t stride, int bs,
const uint16_t *above, const uint16_t *left,
int bd);
// Note:
// Test parameter list:
// Reference predictor, optimized predictor, prediction mode, block size,
// bit depth
typedef tuple<HbdPredictor, HbdPredictor, int> HbdPredFuncMode;
typedef tuple<HbdPredFuncMode, int, int> HbdPredParams;
#endif
const int MaxBlkSize = 32;
// By default, disable speed test
#define <API key> (0)
#if <API key>
const int MaxTestNum = 100000;
#else
const int MaxTestNum = 100;
#endif
class <API key>
: public ::testing::TestWithParam<PredParams> {
public:
virtual ~<API key>() {}
virtual void SetUp() {
PredFuncMode funcMode = GET_PARAM(0);
predFuncRef_ = std::tr1::get<0>(funcMode);
predFunc_ = std::tr1::get<1>(funcMode);
mode_ = std::tr1::get<2>(funcMode);
blockSize_ = GET_PARAM(1);
alloc_ = new uint8_t[3 * MaxBlkSize + 2];
predRef_ = new uint8_t[MaxBlkSize * MaxBlkSize];
pred_ = new uint8_t[MaxBlkSize * MaxBlkSize];
}
virtual void TearDown() {
delete[] alloc_;
delete[] predRef_;
delete[] pred_;
libaom_test::ClearSystemState();
}
protected:
void RunTest() const {
int tstIndex = 0;
int stride = blockSize_;
uint8_t *left = alloc_;
uint8_t *above = alloc_ + MaxBlkSize + 1;
while (tstIndex < MaxTestNum) {
PrepareBuffer();
predFuncRef_(predRef_, stride, blockSize_, &above[1], left);
<API key>(
predFunc_(pred_, stride, blockSize_, &above[1], left));
DiffPred(tstIndex);
tstIndex += 1;
}
}
void RunSpeedTestC() const {
int tstIndex = 0;
int stride = blockSize_;
uint8_t *left = alloc_;
uint8_t *above = alloc_ + MaxBlkSize + 1;
PrepareBuffer();
while (tstIndex < MaxTestNum) {
predFuncRef_(predRef_, stride, blockSize_, &above[1], left);
tstIndex += 1;
}
}
void RunSpeedTestSSE() const {
int tstIndex = 0;
int stride = blockSize_;
uint8_t *left = alloc_;
uint8_t *above = alloc_ + MaxBlkSize + 1;
PrepareBuffer();
while (tstIndex < MaxTestNum) {
predFunc_(predRef_, stride, blockSize_, &above[1], left);
tstIndex += 1;
}
}
private:
void PrepareBuffer() const {
ACMRandom rnd(ACMRandom::DeterministicSeed());
int i = 0;
while (i < (3 * MaxBlkSize + 2)) {
alloc_[i] = rnd.Rand8();
i += 1;
}
}
void DiffPred(int testNum) const {
int i = 0;
while (i < blockSize_ * blockSize_) {
EXPECT_EQ(predRef_[i], pred_[i]) << "Error at position: " << i << " "
<< "Block size: " << blockSize_ << " "
<< "Test number: " << testNum;
i += 1;
}
}
Predictor predFunc_;
Predictor predFuncRef_;
int mode_;
int blockSize_;
uint8_t *alloc_;
uint8_t *pred_;
uint8_t *predRef_;
};
#if <API key>
class <API key>
: public ::testing::TestWithParam<HbdPredParams> {
public:
virtual ~<API key>() {}
virtual void SetUp() {
HbdPredFuncMode funcMode = GET_PARAM(0);
predFuncRef_ = std::tr1::get<0>(funcMode);
predFunc_ = std::tr1::get<1>(funcMode);
mode_ = std::tr1::get<2>(funcMode);
blockSize_ = GET_PARAM(1);
bd_ = GET_PARAM(2);
alloc_ = new uint16_t[3 * MaxBlkSize + 2];
predRef_ = new uint16_t[MaxBlkSize * MaxBlkSize];
pred_ = new uint16_t[MaxBlkSize * MaxBlkSize];
}
virtual void TearDown() {
delete[] alloc_;
delete[] predRef_;
delete[] pred_;
libaom_test::ClearSystemState();
}
protected:
void RunTest() const {
int tstIndex = 0;
int stride = blockSize_;
uint16_t *left = alloc_;
uint16_t *above = alloc_ + MaxBlkSize + 1;
while (tstIndex < MaxTestNum) {
PrepareBuffer();
predFuncRef_(predRef_, stride, blockSize_, &above[1], left, bd_);
<API key>(
predFunc_(pred_, stride, blockSize_, &above[1], left, bd_));
DiffPred(tstIndex);
tstIndex += 1;
}
}
void RunSpeedTestC() const {
int tstIndex = 0;
int stride = blockSize_;
uint16_t *left = alloc_;
uint16_t *above = alloc_ + MaxBlkSize + 1;
PrepareBuffer();
while (tstIndex < MaxTestNum) {
predFuncRef_(predRef_, stride, blockSize_, &above[1], left, bd_);
tstIndex += 1;
}
}
void RunSpeedTestSSE() const {
int tstIndex = 0;
int stride = blockSize_;
uint16_t *left = alloc_;
uint16_t *above = alloc_ + MaxBlkSize + 1;
PrepareBuffer();
while (tstIndex < MaxTestNum) {
predFunc_(predRef_, stride, blockSize_, &above[1], left, bd_);
tstIndex += 1;
}
}
private:
void PrepareBuffer() const {
ACMRandom rnd(ACMRandom::DeterministicSeed());
int i = 0;
while (i < (3 * MaxBlkSize + 2)) {
alloc_[i] = rnd.Rand16() & ((1 << bd_) - 1);
i += 1;
}
}
void DiffPred(int testNum) const {
int i = 0;
while (i < blockSize_ * blockSize_) {
EXPECT_EQ(predRef_[i], pred_[i]) << "Error at position: " << i << " "
<< "Block size: " << blockSize_ << " "
<< "Bit depth: " << bd_ << " "
<< "Test number: " << testNum;
i += 1;
}
}
HbdPredictor predFunc_;
HbdPredictor predFuncRef_;
int mode_;
int blockSize_;
int bd_;
uint16_t *alloc_;
uint16_t *pred_;
uint16_t *predRef_;
};
#endif // <API key>
TEST_P(<API key>, BitExactCheck) { RunTest(); }
#if <API key>
TEST_P(<API key>, SpeedCheckC) { RunSpeedTestC(); }
TEST_P(<API key>, SpeedCheckSSE) { RunSpeedTestSSE(); }
#endif
#if <API key>
TEST_P(<API key>, BitExactCheck) { RunTest(); }
#if <API key>
TEST_P(<API key>, SpeedCheckC) { RunSpeedTestC(); }
TEST_P(<API key>, SpeedCheckSSE) { RunSpeedTestSSE(); }
#endif // <API key>
#endif // <API key>
using std::tr1::make_tuple;
const PredFuncMode kPredFuncMdArray[] = {
make_tuple(<API key>, <API key>,
DC_PRED),
make_tuple(<API key>, <API key>, V_PRED),
make_tuple(<API key>, <API key>, H_PRED),
make_tuple(<API key>, <API key>,
D45_PRED),
make_tuple(<API key>, <API key>,
D135_PRED),
make_tuple(<API key>, <API key>,
D117_PRED),
make_tuple(<API key>, <API key>,
D153_PRED),
make_tuple(<API key>, <API key>,
D207_PRED),
make_tuple(<API key>, <API key>,
D63_PRED),
make_tuple(<API key>, <API key>,
TM_PRED),
};
const int kBlkSize[] = { 4, 8, 16, 32 };
<API key>(
SSE4_1, <API key>,
::testing::Combine(::testing::ValuesIn(kPredFuncMdArray),
::testing::ValuesIn(kBlkSize)));
#if <API key>
const HbdPredFuncMode kHbdPredFuncMdArray[] = {
make_tuple(<API key>,
<API key>, DC_PRED),
make_tuple(<API key>,
<API key>, V_PRED),
make_tuple(<API key>,
<API key>, H_PRED),
make_tuple(<API key>,
<API key>, D45_PRED),
make_tuple(<API key>,
<API key>, D135_PRED),
make_tuple(<API key>,
<API key>, D117_PRED),
make_tuple(<API key>,
<API key>, D153_PRED),
make_tuple(<API key>,
<API key>, D207_PRED),
make_tuple(<API key>,
<API key>, D63_PRED),
make_tuple(<API key>,
<API key>, TM_PRED),
};
const int kBd[] = { 10, 12 };
<API key>(
SSE4_1, <API key>,
::testing::Combine(::testing::ValuesIn(kHbdPredFuncMdArray),
::testing::ValuesIn(kBlkSize),
::testing::ValuesIn(kBd)));
#endif // <API key>
} // namespace
|
package net.imagej.ops.create.img;
import net.imagej.ops.Ops;
import net.imagej.ops.special.chain.UFViaUFSameIO;
import net.imagej.ops.special.function.Functions;
import net.imagej.ops.special.function.UnaryFunctionOp;
import net.imglib2.Interval;
import net.imglib2.img.Img;
import net.imglib2.type.numeric.real.DoubleType;
import org.scijava.plugin.Plugin;
/**
* Creates an {@link Img} from an {@link Interval} with no additional hints.
* {@link Interval} contents are not copied.
*
* @author Curtis Rueden
*/
@Plugin(type = Ops.Create.Img.class)
public class <API key> extends
UFViaUFSameIO<Interval, Img<DoubleType>> implements Ops.Create.Img
{
@Override
@SuppressWarnings({"rawtypes", "unchecked"})
public UnaryFunctionOp<Interval, Img<DoubleType>> createWorker(
final Interval input)
{
// NB: Intended to match <API key>.
return (UnaryFunctionOp) Functions.unary(ops(), Ops.Create.Img.class,
Img.class, input, new DoubleType());
}
}
|
# <API key>: true
require "unpack_strategy"
shared_examples "UnpackStrategy::detect" do
it "is correctly detected" do
expect(UnpackStrategy.detect(path)).to be_a described_class
end
end
shared_examples "#extract" do |children: []|
specify "#extract" do
mktmpdir do |unpack_dir|
described_class.new(path).extract(to: unpack_dir)
expect(unpack_dir.children(false).map(&:to_s)).to match_array children
end
end
end
|
// Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu>
// Last Modified: Sat Aug 25 19:47:08 PDT 2018
// Filename: tool-trillspell.cpp
// Syntax: C++11; humlib
// vim: syntax=cpp ts=3 noexpandtab nowrap
// Description: Interface for trill tool, which assigns intervals to
// trill, mordent and turn ornaments based on the key
// signature and previous notes in a measure.
#include "tool-trillspell.h"
#include "Convert.h"
#include "HumRegex.h"
#include <algorithm>
#include <cmath>
using namespace std;
namespace hum {
// START_MERGE
// Tool_trillspell::Tool_trillspell -- Set the recognized options for the tool.
Tool_trillspell::Tool_trillspell(void) {
define("x=b", "mark trills with x (interpretation)");
}
// Tool_trillspell::run -- Primary interfaces to the tool.
bool Tool_trillspell::run(HumdrumFileSet& infiles) {
bool status = true;
for (int i=0; i<infiles.getCount(); i++) {
status &= run(infiles[i]);
}
return status;
}
bool Tool_trillspell::run(const string& indata, ostream& out) {
HumdrumFile infile(indata);
return run(infile, out);
}
bool Tool_trillspell::run(HumdrumFile& infile, ostream& out) {
bool status = run(infile);
return status;
}
bool Tool_trillspell::run(HumdrumFile& infile) {
processFile(infile);
infile.<API key>();
return true;
}
// Tool_trillspell::processFile -- Adjust intervals of ornaments.
void Tool_trillspell::processFile(HumdrumFile& infile) {
m_xmark = getBoolean("x");
<API key>(infile);
}
// Tool_trillspell::<API key> --
bool Tool_trillspell::<API key>(HumdrumFile& infile) {
int i, j, k;
int kindex;
int track;
// ktracks == List of **kern spines in data.
// rtracks == Reverse mapping from track to ktrack index (part/staff index).
vector<HTp> ktracks = infile.<API key>();
vector<int> rtracks(infile.getMaxTrack()+1, -1);
for (i=0; i<(int)ktracks.size(); i++) {
track = ktracks[i]->getTrack();
rtracks[track] = i;
}
int kcount = (int)ktracks.size();
// keysigs == key signature spellings of diatonic pitch classes. This array
// is duplicated into dstates after each barline.
vector<vector<int> > keysigs;
keysigs.resize(kcount);
for (i=0; i<kcount; i++) {
keysigs[i].resize(7);
std::fill(keysigs[i].begin(), keysigs[i].end(), 0);
}
// dstates == diatonic states for every pitch in a spine.
// sub-spines are considered as a single unit, although there are
// score conventions which would keep a separate voices on a staff
// with different accidental states (i.e., two parts superimposed
// on the same staff, but treated as if on separate staves).
// Eventually this algorithm should be adjusted for dealing with
// cross-staff notes, where the cross-staff notes should be following
// the accidentals of a different spine...
vector<vector<int> > dstates; // diatonic states
dstates.resize(kcount);
for (i=0; i<kcount; i++) {
dstates[i].resize(70); // 10 octave limit for analysis
// may cause problems; maybe fix later.
std::fill(dstates[i].begin(), dstates[i].end(), 0);
}
for (i=0; i<infile.getLineCount(); i++) {
if (!infile[i].hasSpines()) {
continue;
}
if (infile[i].isInterpretation()) {
for (j=0; j<infile[i].getFieldCount(); j++) {
if (!infile[i].token(j)->isKern()) {
continue;
}
if (infile[i].token(j)->compare(0, 3, "*k[") == 0) {
track = infile[i].token(j)->getTrack();
kindex = rtracks[track];
fillKeySignature(keysigs[kindex], *infile[i].token(j));
// resetting key states of current measure. What to do if this
// key signature is in the middle of a measure?
<API key>(dstates[kindex],
keysigs[kindex]);
}
}
} else if (infile[i].isBarline()) {
for (j=0; j<infile[i].getFieldCount(); j++) {
if (!infile[i].token(j)->isKern()) {
continue;
}
if (infile[i].token(j)->isInvisible()) {
continue;
}
track = infile[i].token(j)->getTrack();
kindex = rtracks[track];
// reset the accidental states in dstates to match keysigs.
<API key>(dstates[kindex],
keysigs[kindex]);
}
}
if (!infile[i].isData()) {
continue;
}
for (j=0; j<infile[i].getFieldCount(); j++) {
if (!infile[i].token(j)->isKern()) {
continue;
}
if (infile[i].token(j)->isNull()) {
continue;
}
if (infile[i].token(j)->isRest()) {
continue;
}
int subcount = infile[i].token(j)->getSubtokenCount();
track = infile[i].token(j)->getTrack();
HumRegex hre;
int rindex = rtracks[track];
for (k=0; k<subcount; k++) {
string subtok = infile[i].token(j)->getSubtoken(k);
int b40 = Convert::kernToBase40(subtok);
int diatonic = Convert::kernToBase7(subtok);
if (diatonic < 0) {
// Deal with extra-low notes later.
continue;
}
int accid = Convert::<API key>(subtok);
dstates.at(rindex).at(diatonic) = accid;
// check for accidentals on trills, mordents and turns.
// N.B.: augmented-second intervals are not considered.
if ((subtok.find("t") != string::npos) && !hre.search(subtok, "[tT]x")) {
int nextup = getBase40(diatonic + 1, dstates[rindex][diatonic+1]);
int interval = nextup - b40;
if (interval == 6) {
// Set to major-second trill
hre.replaceDestructive(subtok, "T", "t", "g");
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Tt]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
} else {
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Tt]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
}
} else if ((subtok.find("T") != string::npos) && !hre.search(subtok, "[tT]x")) {
int nextup = getBase40(diatonic + 1, dstates[rindex][diatonic+1]);
int interval = nextup - b40;
if (interval == 5) {
// Set to minor-second trill
hre.replaceDestructive(subtok, "t", "T", "g");
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Tt]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
} else {
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Tt]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
}
} else if ((subtok.find("M") != string::npos) && !hre.search(subtok, "[Mm]x")) {
// major-second upper mordent
int nextup = getBase40(diatonic + 1, dstates[rindex][diatonic+1]);
int interval = nextup - b40;
if (interval == 5) {
// Set to minor-second upper mordent
hre.replaceDestructive(subtok, "m", "M", "g");
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Mm]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
} else {
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Mm]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
}
} else if ((subtok.find("m") != string::npos) && !hre.search(subtok, "[Mm]x")) {
// minor-second upper mordent
int nextup = getBase40(diatonic + 1, dstates[rindex][diatonic+1]);
int interval = nextup - b40;
if (interval == 6) {
// Set to major-second upper mordent
hre.replaceDestructive(subtok, "M", "m", "g");
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Mm]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
} else {
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Mm]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
}
} else if ((subtok.find("W") != string::npos) && !hre.search(subtok, "[Ww]x")) {
// major-second lower mordent
int nextdn = getBase40(diatonic - 1, dstates[rindex][diatonic-1]);
int interval = b40 - nextdn;
if (interval == 5) {
// Set to minor-second lower mordent
hre.replaceDestructive(subtok, "w", "W", "g");
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Ww]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
} else {
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Ww]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
}
} else if ((subtok.find("w") != string::npos) && !hre.search(subtok, "[Ww]x")) {
// minor-second lower mordent
int nextdn = getBase40(diatonic - 1, dstates[rindex][diatonic-1]);
int interval = b40 - nextdn;
if (interval == 6) {
// Set to major-second lower mordent
hre.replaceDestructive(subtok, "W", "w", "g");
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Ww]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
} else {
if (m_xmark) {
hre.replaceDestructive(subtok, "$1x", "([Ww]+)", "g");
}
infile[i].token(j)->replaceSubtoken(k, subtok);
}
}
// deal with turns and inverted turns here.
}
}
}
return true;
}
// Tool_trillspell::<API key> -- Only used in
// Tool_trillspell::<API key>(). Resets the accidental
// states for notes
void Tool_trillspell::<API key>(vector<int>&
states, vector<int>& signature) {
for (int i=0; i<(int)states.size(); i++) {
states[i] = signature[i % 7];
}
}
// Tool_trillspell::fillKeySignature -- Read key signature notes and
// assign +1 to sharps, -1 to flats in the diatonic input array. Used
// only by Tool_trillspell::<API key>().
void Tool_trillspell::fillKeySignature(vector<int>& states,
const string& keysig) {
std::fill(states.begin(), states.end(), 0);
if (keysig.find("f#") != string::npos) { states[3] = +1; }
if (keysig.find("c#") != string::npos) { states[0] = +1; }
if (keysig.find("g#") != string::npos) { states[4] = +1; }
if (keysig.find("d#") != string::npos) { states[1] = +1; }
if (keysig.find("a#") != string::npos) { states[5] = +1; }
if (keysig.find("e#") != string::npos) { states[2] = +1; }
if (keysig.find("b#") != string::npos) { states[6] = +1; }
if (keysig.find("b-") != string::npos) { states[6] = -1; }
if (keysig.find("e-") != string::npos) { states[2] = -1; }
if (keysig.find("a-") != string::npos) { states[5] = -1; }
if (keysig.find("d-") != string::npos) { states[1] = -1; }
if (keysig.find("g-") != string::npos) { states[4] = -1; }
if (keysig.find("c-") != string::npos) { states[0] = -1; }
if (keysig.find("f-") != string::npos) { states[3] = -1; }
}
// Tool_trillspell::getBase40 --
int Tool_trillspell::getBase40(int diatonic, int accidental) {
return Convert::base7ToBase40(diatonic) + accidental;
}
// END_MERGE
} // end namespace hum
|
package api_test
import (
"testing"
"github.com/remind101/empire/pkg/heroku"
)
func <API key>(t *testing.T) {
c, s := NewTestClient(t)
defer s.Close()
mustDeploy(t, c, DefaultImage)
q := 2
f := <API key>(t, c, "acme-inc", []heroku.<API key>{
{
Process: "web",
Quantity: &q,
},
})
if got, want := f[0].Quantity, 2; got != want {
t.Fatalf("Quantity => %d; want %d", got, want)
}
}
func <API key>(t testing.TB, c *heroku.Client, appName string, updates []heroku.<API key>) []heroku.Formation {
f, err := c.<API key>(appName, updates, "")
if err != nil {
t.Fatal(err)
}
return f
}
|
#include "vu2.h"
#include "vu_priv.h"
// VuStandardFilter
VuStandardFilter::VuStandardFilter(VuFlagBits mask, VU_TRI_STATE localSession) : VuFilter()
{
localSession_ = localSession;
idmask_.breakdown_ = mask;
}
VuStandardFilter::VuStandardFilter(ushort mask, VU_TRI_STATE localSession) : VuFilter()
{
localSession_ = localSession;
idmask_.val_ = mask;
}
VuStandardFilter::VuStandardFilter(VuStandardFilter* other) : VuFilter(other)
{
localSession_ = DONT_CARE;
idmask_.val_ = 0;
if (other)
{
idmask_.val_ = other->idmask_.val_;
localSession_ = other->localSession_;
}
}
VuStandardFilter::~VuStandardFilter()
{
// empty
}
VU_BOOL
VuStandardFilter::Notice(VuMessage* event)
{
if ((localSession_ not_eq DONT_CARE) and ((event->Type() == VU_TRANSFER_EVENT)))
{
return TRUE;
}
return FALSE;
}
VU_BOOL VuStandardFilter::Test(VuEntity* ent)
{
if
(
((ushort)(ent->FlagValue()) bitand idmask_.val_) and
(
(localSession_ == DONT_CARE) or
((localSession_ == TRUE) and (ent->IsLocal())) or
((localSession_ == FALSE) and ( not ent->IsLocal()))
)
)
{
return TRUE;
}
else
{
return FALSE;
}
}
int VuStandardFilter::Compare(VuEntity* ent1, VuEntity* ent2)
{
return (int)ent1->Id() - (int)ent2->Id();
}
VuFilter *VuStandardFilter::Copy()
{
return new VuStandardFilter(this);
}
|
class Openrct2 < Formula
desc "Open source re-implementation of RollerCoaster Tycoon 2"
homepage "https://openrct2.io/"
url "https://github.com/OpenRCT2/OpenRCT2.git",
:tag => "v0.2.4",
:revision => "<SHA1-like>"
head "https://github.com/OpenRCT2/OpenRCT2.git", :branch => "develop"
bottle do
cellar :any
sha256 "<SHA256-like>" => :catalina
sha256 "<SHA256-like>" => :mojave
sha256 "<SHA256-like>" => :high_sierra
end
depends_on "cmake" => :build
depends_on "pkg-config" => :build
depends_on "freetype" # for sdl2_ttf
depends_on "icu4c"
depends_on "jansson"
depends_on "libpng"
depends_on "libzip"
depends_on :macos => :high_sierra # "missing: Threads_FOUND" on Sierra
depends_on "openssl@1.1"
depends_on "sdl2"
depends_on "sdl2_ttf"
depends_on "speexdsp"
resource "title-sequences" do
url "https://github.com/OpenRCT2/title-sequences/releases/download/v0.1.2a/title-sequence-v0.1.2a.zip"
sha256 "<SHA256-like>"
end
resource "objects" do
url "https://github.com/OpenRCT2/objects/releases/download/v1.0.10/objects.zip"
sha256 "<SHA256-like>"
end
def install
# Avoid letting CMake download things during the build process.
(buildpath/"data/title").install resource("title-sequences")
(buildpath/"data/object").install resource("objects")
mkdir "build" do
system "cmake", "..", *std_cmake_args
system "make", "install"
end
# By default macOS build only looks up data in app bundle Resources
libexec.install bin/"openrct2"
(bin/"openrct2").write <<~EOS
#!/bin/bash
exec "#{libexec}/openrct2" "$@" "--openrct-data-path=#{pkgshare}"
EOS
end
test do
assert_match "OpenRCT2, v#{version}", shell_output("#{bin}/openrct2 -v")
end
end
|
class JbossForge < Formula
desc "Tools to help set up and configure a project"
homepage "https://forge.jboss.org/"
url "https://downloads.jboss.org/forge/releases/3.9.0.Final/<API key>.9.0.Final-offline.zip"
version "3.9.0.Final"
sha256 "<SHA256-like>"
bottle :unneeded
depends_on :java => "1.8+"
def install
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http:
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Shared Memory Logging and Statistics — Varnish version 3.0.3 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<script type="text/javascript">
var <API key> = {
URL_ROOT: '../',
VERSION: '3.0.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="Varnish version 3.0.3 documentation" href="../index.html" />
<link rel="up" title="The Varnish Reference Manual" href="index.html" />
<link rel="next" title="VMOD - Varnish Modules" href="vmod.html" />
<link rel="prev" title="varnishtop" href="varnishtop.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="vmod.html" title="VMOD - Varnish Modules"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="varnishtop.html" title="varnishtop"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">Varnish version 3.0.3 documentation</a> »</li>
<li><a href="index.html" accesskey="U">The Varnish Reference Manual</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="<API key>">
<h1>Shared Memory Logging and Statistics<a class="headerlink" href="
<p>Varnish uses shared memory for logging and statistics, because it
is faster and much more efficient. But it is also tricky in ways
a regular logfile is not.</p>
<p>When you open a file in "append" mode, the operating system guarantees
that whatever you write will not overwrite existing data in the file.
The neat result of this is that multiple procesess or threads writing
to the same file does not even need to know about each other, it all
works just as you would expect.</p>
<p>With a shared memory log, we get no help from the kernel, the writers
need to make sure they do not stomp on each other, and they need to
make it possible and safe for the readers to access the data.</p>
<p>The "CS101" way, is to introduce locks, and much time is spent examining
the relative merits of the many kinds of locks available.</p>
<p>Inside the varnishd (worker) process, we use mutexes to guarantee
consistency, both with respect to allocations, log entries and stats
counters.</p>
<p>We do not want a varnishncsa trying to push data through a stalled
ssh connection to stall the delivery of content, so readers like
that are purely read-only, they do not get to affect the varnishd
process and that means no locks for them.</p>
<p>Instead we use "stable storage" concepts, to make sure the view
seen by the readers is consistent at all times.</p>
<p>As long as you only add stuff, that is trivial, but taking away
stuff, such as when a backend is taken out of the configuration,
we need to give the readers a chance to discover this, a "cooling
off" period.</p>
<p>When Varnishd starts, if it finds an existing shared memory file,
and it can safely read the master_pid field, it will check if that
process is running, and if so, fail with an error message, indicating
that -n arguments collide.</p>
<p>In all other cases, it will delete and create a new shmlog file,
in order to provide running readers a cooling off period, where
they can discover that there is a new shmlog file, by doing a
stat(2) call and checking the st_dev & st_inode fields.</p>
<div class="section" id="allocations">
<h2>Allocations<a class="headerlink" href="
<p>Sections inside the shared memory file are allocated dynamically,
for instance when a new backend is added.</p>
<p>While changes happen to the linked list of allocations, the "alloc_seq"
header field is zero, and after the change, it gets a value different
from what it had before.</p>
</div>
<div class="section" id="deallocations">
<h2>Deallocations<a class="headerlink" href="
<p>When a section is freed, its class will change to "Cool" for at
least 10 seconds, giving programs using it time to detect the
change in alloc_seq header field and/or the change of class.</p>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="<API key>">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">Shared Memory Logging and Statistics</a><ul>
<li><a class="reference internal" href="#allocations">Allocations</a></li>
<li><a class="reference internal" href="#deallocations">Deallocations</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="varnishtop.html"
title="previous chapter">varnishtop</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="vmod.html"
title="next chapter">VMOD - Varnish Modules</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/reference/shmem.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="vmod.html" title="VMOD - Varnish Modules"
>next</a> |</li>
<li class="right" >
<a href="varnishtop.html" title="varnishtop"
>previous</a> |</li>
<li><a href="../index.html">Varnish version 3.0.3 documentation</a> »</li>
<li><a href="index.html" >The Varnish Reference Manual</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2010, Varnish Project.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
</div>
</body>
</html>
|
#pragma once
#include <stddef.h>
#if defined (__cplusplus)
extern "C" {
#endif
/**
* @brief Encodes 'inputSize' bytes from 'source' into 'dest'.
* If 'inputSize' is not divisible by 4 with no remainder, 'source' is padded.
* Destination buffer must be already allocated. Use <API key>() to
* evaluate size of the destination buffer.
*
* @param source in, input buffer (binary string to be encoded)
* @param dest out, destination buffer
* @param inputSize in, number of bytes to be encoded
* @return number of printable symbols written into 'dest' or 0 if something goes wrong
*/
size_t <API key>(const char* source, char* dest, size_t inputSize);
/**
* @brief Decodes 'inputSize' printable symbols from 'source' into 'dest',
* encoded with <API key>().
* Destination buffer must be already allocated. Use <API key>() to
* evaluate size of the destination buffer.
*
* @param source in, input buffer (printable string to be decoded)
* @param dest out, destination buffer
* @param inputSize in, number of symbols to be decoded
* @return number of bytes written into 'dest' or 0 if something goes wrong
*/
size_t <API key>(const char* source, char* dest, size_t inputSize);
/**
* @brief Evaluates a size of output buffer needed to encode 'size' bytes
* into string of printable symbols using <API key>().
*
* @param size in, number of bytes to be encoded
* @return minimal size of output buffer in bytes
*/
size_t <API key>(size_t size);
/**
* @brief Evaluates a size of output buffer needed to decode 'size' symbols
* into binary string using <API key>().
*
* @param source in, input buffer (first symbol is read from 'source' to evaluate padding)
* @param size in, number of symbols to be decoded
* @return minimal size of output buffer in bytes
*/
size_t <API key>(const char* source, size_t size);
/**
* @brief Encodes 'inputSize' bytes from 'source' into 'dest'.
* If 'inputSize' is not divisible by 4 with no remainder, 0 is retured.
* Destination buffer must be already allocated. Use Z85_encode_bound() to
* evaluate size of the destination buffer.
*
* @param source in, input buffer (binary string to be encoded)
* @param dest out, destination buffer
* @param inputSize in, number of bytes to be encoded
* @return number of printable symbols written into 'dest' or 0 if something goes wrong
*/
size_t Z85_encode(const char* source, char* dest, size_t inputSize);
/**
* @brief Decodes 'inputSize' printable symbols from 'source' into 'dest'.
* If 'inputSize' is not divisible by 5 with no remainder, 0 is returned.
* Destination buffer must be already allocated. Use Z85_decode_bound() to
* evaluate size of the destination buffer.
*
* @param source in, input buffer (printable string to be decoded)
* @param dest out, destination buffer
* @param inputSize in, number of symbols to be decoded
* @return number of bytes written into 'dest' or 0 if something goes wrong
*/
size_t Z85_decode(const char* source, char* dest, size_t inputSize);
/**
* @brief Evaluates a size of output buffer needed to encode 'size' bytes
* into string of printable symbols using Z85_encode().
*
* @param size in, number of bytes to be encoded
* @return minimal size of output buffer in bytes
*/
size_t Z85_encode_bound(size_t size);
/**
* @brief Evaluates a size of output buffer needed to decode 'size' symbols
* into binary string using Z85_decode().
*
* @param size in, number of symbols to be decoded
* @return minimal size of output buffer in bytes
*/
size_t Z85_decode_bound(size_t size);
/**
* @brief Encodes bytes from [source;sourceEnd) range into 'dest'.
* It can be used for implementation of your own padding scheme.
* Preconditions:
* - (sourceEnd - source) % 4 == 0
* - destination buffer must be already allocated
*
* @param source in, begin of input buffer
* @param sourceEnd in, end of input buffer (not included)
* @param dest out, output buffer
* @return a pointer immediately after last symbol written into the 'dest'
*/
char* Z85_encode_unsafe(const char* source, const char* sourceEnd, char* dest);
/**
* @brief Decodes symbols from [source;sourceEnd) range into 'dest'.
* It can be used for implementation of your own padding scheme.
* Preconditions:
* - (sourceEnd - source) % 5 == 0
* - destination buffer must be already allocated
*
* @param source in, begin of input buffer
* @param sourceEnd in, end of input buffer (not included)
* @param dest out, output buffer
* @return a pointer immediately after last byte written into the 'dest'
*/
char* Z85_decode_unsafe(const char* source, const char* sourceEnd, char* dest);
#if defined (__cplusplus)
}
#endif
|
#include "stdafx.h"
#include "com4j.h"
void error( JNIEnv* env, const char* file, int line, HRESULT hr, const char* msg ... ) {
// format the message
va_list va;
va_start(va,msg);
int len = _vscprintf(msg,va);
char* w = reinterpret_cast<char*>(alloca(len+1)); // +1 for '\0'
vsprintf(w,msg,va);
env->ExceptionClear();
env->Throw( (jthrowable)comexception_new_hr( env, env->NewStringUTF(w), hr, env->NewStringUTF(file), line ) );
}
void error( JNIEnv* env, const char* file, int line, const char* msg ... ) {
// format the message
va_list va;
va_start(va,msg);
int len = _vscprintf(msg,va);
char* w = reinterpret_cast<char*>(alloca(len+1)); // +1 for '\0'
vsprintf(w,msg,va);
env->ExceptionClear();
env->Throw( (jthrowable)comexception_new( env, env->NewStringUTF(w), env->NewStringUTF(file), line ) );
}
|
{% extends "base.html" %}
{% load filters %}
{% block title %}{{project_name}}: {{record.label}}{% endblock %}
{% block css %}
<link href="/static/css/dataTables.bootstrap.css" rel="stylesheet">
{% endblock %}
{% block navbar %}
<li><a href="..">{{project_name}}</a></li>
<li><a href="/{{project_name}}/{{record.label}}/"> {{record.label}}</a></li>
{% endblock %}
{% block content %}
<!-- General information -->
<div class="panel panel-info">
<div class="panel-heading clearfix">
{% if not read_only %}
<div class="pull-right" role="group">
<button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#deleteModal"><span class="glyphicon glyphicon-trash"></span> Delete record</button>
</div>
{% endif %}
<h2 class="panel-title" style="padding-top: 6px;">{{record.label}}</h2>
</div>
<div class="panel-body">
<div class="well well-sm"><code>$ {{record.command_line}}</code></div>
<p>Run on {{record.timestamp|date:"d/m/Y H:i:s"}} by {{record.user}}</p>
<dl class="dl-horizontal">
<dt>Working directory:</dt><dd>{{record.working_directory}}</dd>
<dt>Code version:</dt><dd>{{record.version}}{% if record.diff %}* (<a href="diff">diff</a>){% endif %}</dd>
<dt>Repository:</dt><dd>{{record.repository.url}}
{% if record.repository.upstream %} - cloned from {{record.repository.upstream|urlize}}{% endif %}</dd>
<dt>{{record.executable.name}} version:</dt><dd>{{record.executable.version}}</dd>
<dt>Reason:</dt><dd>
{% if not read_only %}
<button type="button" class="btn btn-xs pull-right" data-toggle="modal" data-target="#editReasonModal"><span class="glyphicon glyphicon-pencil"></span> Edit</button>
{% endif %}
{{record.reason|restructuredtext}}</dd>
<dt>Tags:</dt><dd>
{% if not read_only %}
<button type="button" class="btn btn-xs pull-right" data-toggle="modal" data-target="#editTagsModal"><span class="glyphicon glyphicon-pencil"></span> Edit</button>
{% endif %}
{% for tag in record.tag_objects %}{{tag.name|labelize_tag}} {% endfor %}</dd>
</dl>
{% if not read_only and not record.outcome %}
<p><button type="button" class="btn btn-xs btn-success pull-right" data-toggle="modal" data-target="#editOutcomeModal"><span class="glyphicon glyphicon-plus"></span> Add outcome</button></p>
{% endif %}
</div>
</div>
<!-- Outcome -->
{% if record.outcome %}
<div class="panel panel-default">
<div class="panel-heading">
{% if not read_only %}
<button type="button" class="btn btn-xs pull-right" data-toggle="modal" data-target="#editOutcomeModal"><span class="glyphicon glyphicon-pencil"></span> Edit</button>
{% endif %}
<h4 class="panel-title">
<a data-toggle="collapse" href="#outcome-panel">Outcome</a>
</h4>
</div>
<div class="panel-body collapse in" id="#outcome-panel">
{{record.outcome|restructuredtext}}
</div>
</div>
{% endif %}
<!-- Parameters -->
{% if parameters %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#parameters-panel">Parameters</a>
</h4>
</div>
<div class="panel-body collapse in" id="parameters-panel">
{% with dict=parameters template="nested_dict.html" %}
{% include template %}
{% endwith %}
</div>
</div>
{% endif %}
<!-- Input data -->
{% if record.input_data.count %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#input-data-panel">Input data</a></h4>
</div>
<div class="panel-body collapse in" id="input-data-panel">
<table id="input-data" class="table table-striped table-condensed">
<thead>
<tr>
<th>Filename</th>
<th>Path</th>
<th>Digest</th>
<th>Size</th>
<th>Date/Time</th>
<th>Output of</th>
<th>Input to</th>
</tr>
</thead>
<tbody>
{% for data in record.input_data.all %}
<tr>
<td>
<a href="/{{project_name}}/data/datafile?path={{data.path|urlencode}}&digest={{data.digest}}&creation={{data.creation|date:"c"}}">
{{data.path|basename|ubreak}}
</a>
</td>
<td>
{{data.path|ubreak}}
</td>
<td>
{{data.digest|truncatechars:12 }}
</td>
<td>
{{data|eval_metadata:'size'|filesizeformat}}
</td>
<td>
<span style='display:none;'>
<!-- hack for correct sorting -->
{{data.output_from_record.timestamp|date:"YmdHis"}}
</span>
{{data.output_from_record.timestamp|date:"d/m/Y H:i:s"}}
</td>
<td>
<a href="/{{project_name}}/{{data.output_from_record.label}}/">
{{data.output_from_record.label|ubreak}}
</a>
</td>
<td>
{% for record in data.input_to_records.all %}
<a href="/{{project_name}}/{{record.label}}/">
{{record.label|ubreak}}<!
-->{% if not forloop.last %}, {% endif %}
</a>
{% endfor %}
</td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
</div>
{% endif %}
<!-- Output data -->
{% if record.output_data.count %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#output-data-panel">Output data</a>
</h4>
</div>
<div class="panel-body collapse in" id="output-data-panel">
<table id="output-data" class="table table-striped table-condensed">
<thead>
<tr>
<th>Filename</th>
<th>Path</th>
<th>Digest</th>
<th>Size</th>
<th>Date/Time</th>
<th>Output of</th>
<th>Input to</th>
</tr>
</thead>
<tbody>
{% for data in record.output_data.all %}
<tr>
<td>
<a href="/{{project_name}}/data/datafile?path={{data.path|urlencode}}&digest={{data.digest}}&creation={{data.creation|date:"c"}}">
{{data.path|basename|ubreak}}
</a>
</td>
<td>
{{data.path|ubreak}}
</td>
<td>
{{data.digest|truncatechars:12 }}
</td>
<td>
{{data|eval_metadata:'size'|filesizeformat}}
</td>
<td>
<span style='display:none;'>
<!-- hack for correct sorting -->
{{data.output_from_record.timestamp|date:"YmdHis"}}
</span>
{{data.output_from_record.timestamp|date:"d/m/Y H:i:s"}}
</td>
<td>
<a href="/{{project_name}}/{{data.output_from_record.label}}/">
{{data.output_from_record.label|ubreak}}
</a>
</td>
<td>
{% for record in data.input_to_records.all %}
<a href="/{{project_name}}/{{record.label}}/">
{{record.label|ubreak}}<!
-->{% if not forloop.last %}, {% endif %}
</a>
{% endfor %}
</td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
</div>
{% endif %}
<!-- Dependencies -->
{% if record.dependencies.count %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#dependencies-panel">Dependencies</a>
</h4>
</div>
<div id="dependencies-panel" class="panel-body collapse in">
<table id="dependencies" class="table table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Path</th>
<th>Version</th>
</tr>
</thead>
<tbody>
{% for dep in record.dependencies.all %}
<tr>
<td>{{dep.name}}</td>
<td>{{dep.path}}</td>
<td>{{dep.version}}{% if dep.diff %}* (<a href="diff/{{dep.name}}">diff</a>){% endif %}</td>
</tr>
{% endfor %}
<tbody>
</table>
</div>
</div>
{% endif %}
<!-- Platform information -->
{% if record.platforms.count %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#platform-info-panel">Platform information</a>
</h4>
</div>
<div id="platform-info-panel" class="panel-body collapse in">
<table id="platform-info" class="table table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>IP address</th>
<th>Processor</th>
<th colspan="2">Architecture</th>
<th>System type</th>
<th>Release</th>
<th>Version</th>
</tr>
</thead>
<tbody>
{% for platform in record.platforms.all %}
<tr class="{% cycle 'odd' 'even' %}">
<td>{{platform.network_name}}</td>
<td>{{platform.ip_addr}}</td>
<td>{{platform.processor}} {{platform.machine}}</td>
<td style='padding-right:5px'>{{platform.architecture_bits}}</td>
<td>{{platform.<API key>}}</td>
<td>{{platform.system_name}}</td>
<td>{{platform.release}}</td>
<td>{{platform.version}}</td>
</tr>{% endfor %}
<tbody>
</table>
</div>
</div>
{% endif %}
<!-- stdout and stderr -->
{% if record.stdout_stderr %}
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">
<a data-toggle="collapse" href="#stdout-stderr-panel">Stdout & Stderr</a>
</h4>
</div>
<div id="stdout-stderr-panel" class="panel-body collapse in">
<code>{{ record.stdout_stderr | linebreaksbr }}</code>
</div>
</div>
{% endif %}
{% endblock content %}
<! -- Dialog boxes for editing -->
{% block dialogs %}
<div class="modal fade" id="editReasonModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Reason/Motivation</h4>
</div>
<div class="modal-body">
<div class="form-group">
<p>Use <a href="http://sphinx-doc.org/rest.html" target="_blank">reStructuredText</a> for formatting.</p>
<textarea class="form-control" rows="10" id="reason">{{record.reason}}</textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="saveReason">Save</button>
</div>
</div> <!-- modal-content -->
</div> <!-- modal-dialog -->
</div> <!-- modal -->
<div class="modal fade" id="editOutcomeModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Outcome</h4>
</div>
<div class="modal-body">
<div class="form-group">
<p>Use <a href="http://sphinx-doc.org/rest.html" target="_blank">reStructuredText</a> for formatting.</p>
<textarea class="form-control" rows="10" id="outcome">{{record.outcome}}</textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="saveOutcome">Save</button>
</div>
</div> <!-- modal-content -->
</div> <!-- modal-dialog -->
</div> <!-- modal -->
<div class="modal fade" id="editTagsModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Tags</h4>
</div>
<div class="modal-body">
<div class="form-group">
<p>Separate tags with commas. Tags may contain spaces.</p>
<input type="text" class="form-control" id="tag_list" value="{{record.tags}}">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="saveTags">Save</button>
</div>
</div> <!-- modal-content -->
</div> <!-- modal-dialog -->
</div> <!-- modal -->
<div class="modal fade" id="editStatusModal">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Status</h4>
</div>
<div class="modal-body">
<div class="form-group">
<select id="status">
{% with "initialized pre_run running finished failed killed succeeded crashed" as statuses %}
{% for status in statuses.split %}
<option value={{status}}
{% if status == record.status %}selected="selected"{% endif %}>
{{status|title}}
</option>
{% endfor %}
{% endwith %}
</select>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-primary" id="saveStatus">Save</button>
</div>
</div> <!-- modal-content -->
</div> <!-- modal-dialog -->
</div> <!-- modal -->
<div class="modal fade" id="deleteModal">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Delete record</h4>
</div>
<div class="modal-body">
<p>Are you sure you want to delete this record?</p>
<div class="form-group">
<label>
<input type="checkbox" id='is_data'> Delete associated data
</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
<button type="button" class="btn btn-primary" id="confirm-delete">Yes</button>
</div>
</div> <!-- modal-content -->
</div> <!-- modal-dialog -->
</div> <!-- modal -->
{% endblock %}
<! -- Javascript -->
{% block scripts %}
<script type="text/javascript" language="javascript" src="/static/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="/static/js/dataTables.bootstrap.js"></script>
<script type="text/javascript">
$(document).ready(function() {
/* Configure DataTable */
var table = $('#output-data').dataTable( {
"info": false,
"paging": false,
"ordering": false,
"filter": false
} );
/* Save the reason/motivation */
$('#saveReason').click(function() {
$.ajax({
type: 'POST',
url: '.',
data: {'reason': $('#reason').val()},
success: function() {
success = true;
},
async: false
});
if (success) {
window.open('.','_self');
};
});
/* Save the outcome */
$('#saveOutcome').click(function() {
$.ajax({
type: 'POST',
url: '.',
data: {'outcome': $('#outcome').val()},
success: function() {
success = true;
},
async: false
});
if (success) {
window.open('.','_self');
};
});
/* Save tags */
$('#saveTags').click(function() {
$.ajax({
type: 'POST',
url: '.',
data: {'tags': $('#tag_list').val()},
success: function() {
success = true;
},
async: false
});
if (success) {
window.open('.','_self');
};
});
/* Save status */
$('#saveStatus').click(function() {
$.ajax({
type: 'POST',
url: '.',
data: {'status': $('#status').val()},
success: function() {
success = true;
},
async: false
});
if (success) {
window.open('.','_self');
};
});
/* Delete this record */
$('#confirm-delete').click(function() {
var success = false;
var includeData = function(){
if ($('#is_data').attr('checked')) {
return true;
} else {
return false;
};
};
var deleteArr = new Array(); // records to delete
deleteArr.push('{{record.label}}');
console.log(deleteArr);
$.ajax({
type: 'POST',
url: '../delete/',
data: {'delete': deleteArr,
'delete_data': includeData()},
success: function() {
success = true;
},
async: false
});
if (success) {
window.open('..', '_self');
};
});
} );
</script>
{% endblock %}
<!-- TODO: initialize input-data DataTable -->
|
#ifndef <API key>
#define <API key>
#include "Definition.h"
#include "DefinitionVisitor.h"
namespace rxml {
struct <API key> : public Definition {
void accept(DefinitionVisitor &visitor) const {
visitor.visit(*this);
}
AUID elementType;
unsigned int elementCount;
};
}
#endif
|
from PyQt4 import QtGui, QtCore, QtSvg
from PyQt4.QtCore import QMimeData
from PyQt4.QtGui import QGraphicsScene, QGraphicsView, QWidget, QApplication
from Orange.data.io import FileFormat
class ImgFormat(FileFormat):
@staticmethod
def _get_buffer(size, filename):
raise NotImplementedError
@staticmethod
def _get_target(scene, painter, buffer):
raise NotImplementedError
@staticmethod
def _save_buffer(buffer, filename):
raise NotImplementedError
@staticmethod
def _get_exporter():
raise NotImplementedError
@staticmethod
def _export(self, exporter, filename):
raise NotImplementedError
@classmethod
def write_image(cls, filename, scene):
try:
scene = scene.scene()
scenerect = scene.sceneRect() #preserve scene bounding rectangle
viewrect = scene.views()[0].sceneRect()
scene.setSceneRect(viewrect)
backgroundbrush = scene.backgroundBrush() #preserve scene background brush
scene.setBackgroundBrush(QtCore.Qt.white)
exporter = cls._get_exporter()
cls._export(exporter(scene), filename)
scene.setBackgroundBrush(backgroundbrush) # reset scene background brush
scene.setSceneRect(scenerect) # reset scene bounding rectangle
except Exception:
if isinstance(scene, (QGraphicsScene, QGraphicsView)):
rect = scene.sceneRect()
elif isinstance(scene, QWidget):
rect = scene.rect()
rect = rect.adjusted(-15, -15, 15, 15)
buffer = cls._get_buffer(rect.size(), filename)
painter = QtGui.QPainter()
painter.begin(buffer)
painter.setRenderHint(QtGui.QPainter.Antialiasing)
target = cls._get_target(scene, painter, buffer, rect)
try:
scene.render(painter, target, rect)
except TypeError:
scene.render(painter) # PyQt4 QWidget.render() takes different params
cls._save_buffer(buffer, filename)
painter.end()
@classmethod
def write(cls, filename, scene):
if type(scene) == dict:
scene = scene['scene']
cls.write_image(filename, scene)
class PngFormat(ImgFormat):
EXTENSIONS = ('.png',)
DESCRIPTION = 'Portable Network Graphics'
PRIORITY = 50
@staticmethod
def _get_buffer(size, filename):
return QtGui.QPixmap(int(size.width()), int(size.height()))
@staticmethod
def _get_target(scene, painter, buffer, source):
try:
brush = scene.backgroundBrush()
if brush.style() == QtCore.Qt.NoBrush:
brush = QtGui.QBrush(scene.palette().color(QtGui.QPalette.Base))
except AttributeError: # not a QGraphicsView/Scene
brush = QtGui.QBrush(QtCore.Qt.white)
painter.fillRect(buffer.rect(), brush)
return QtCore.QRectF(0, 0, source.width(), source.height())
@staticmethod
def _save_buffer(buffer, filename):
buffer.save(filename, "png")
@staticmethod
def _get_exporter():
from pyqtgraph.exporters.ImageExporter import ImageExporter
return ImageExporter
@staticmethod
def _export(exporter, filename):
buffer = exporter.export(toBytes=True)
buffer.save(filename, "png")
class ClipboardFormat(PngFormat):
EXTENSIONS = ()
DESCRIPTION = 'System Clipboard'
PRIORITY = 50
@staticmethod
def _save_buffer(buffer, _):
QApplication.clipboard().setPixmap(buffer)
@staticmethod
def _export(exporter, _):
buffer = exporter.export(toBytes=True)
mimedata = QMimeData()
mimedata.setData("image/png", buffer)
QApplication.clipboard().setMimeData(mimedata)
class SvgFormat(ImgFormat):
EXTENSIONS = ('.svg',)
DESCRIPTION = 'Scalable Vector Graphics'
PRIORITY = 100
@staticmethod
def _get_buffer(size, filename):
buffer = QtSvg.QSvgGenerator()
buffer.setFileName(filename)
buffer.setSize(QtCore.QSize(int(size.width()), int(size.height())))
return buffer
@staticmethod
def _get_target(scene, painter, buffer, source):
return QtCore.QRectF(0, 0, source.width(), source.height())
@staticmethod
def _save_buffer(buffer, filename):
pass
@staticmethod
def _get_exporter():
from pyqtgraph.exporters.SVGExporter import SVGExporter
return SVGExporter
@staticmethod
def _export(exporter, filename):
exporter.export(filename)
|
#ifndef HTMLOListElement_h
#define HTMLOListElement_h
#include "HTMLElement.h"
namespace WebCore {
class HTMLOListElement : public HTMLElement {
public:
static PassRefPtr<HTMLOListElement> create(Document*);
static PassRefPtr<HTMLOListElement> create(const QualifiedName&, Document*);
int start() const { return m_hasExplicitStart ? m_start : (m_isReversed ? itemCount() : 1); }
void setStart(int);
bool isReversed() const { return m_isReversed; }
void itemCountChanged() { <API key> = true; }
private:
HTMLOListElement(const QualifiedName&, Document*);
void updateItemValues();
unsigned itemCount() const
{
if (<API key>)
const_cast<HTMLOListElement*>(this)-><API key>();
return m_itemCount;
}
void <API key>();
virtual void parseAttribute(const Attribute&) OVERRIDE;
virtual bool <API key>(const QualifiedName&) const OVERRIDE;
virtual void <API key>(const Attribute&, StylePropertySet*) OVERRIDE;
int m_start;
unsigned m_itemCount;
bool m_hasExplicitStart : 1;
bool m_isReversed : 1;
bool <API key> : 1;
};
} //namespace
#endif
|
cask "inso" do
version "2.4.1"
sha256 "<SHA256-like>"
url "https://github.com/Kong/insomnia/releases/download/lib%40#{version}/inso-macos-#{version}.zip",
verified: "github.com/Kong/insomnia/"
name "inso"
desc "CLI HTTP and GraphQL Client"
homepage "https://insomnia.rest/products/inso"
livecheck do
url "https://github.com/Kong/insomnia/releases?q=prerelease%3Afalse+Inso+CLI"
strategy :page_match
regex(/href=.*?inso-macos-(?:latest-)*(\d+(?:\.\d+)+)\.zip/i)
end
conflicts_with cask: "homebrew/cask-versions/inso-beta"
binary "inso"
end
|
class Timidity < Formula
desc "Software synthesizer"
homepage "http://timidity.sourceforge.net/"
url "https://downloads.sourceforge.net/project/timidity/TiMidity++/TiMidity++-2.14.0/TiMidity++-2.14.0.tar.bz2"
sha256 "<SHA256-like>"
bottle do
sha256 "<SHA256-like>" => :el_capitan
sha256 "<SHA256-like>" => :yosemite
sha256 "<SHA256-like>" => :mavericks
sha256 "<SHA256-like>" => :mountain_lion
end
option "without-darwin", "Build without Darwin CoreAudio support"
option "without-freepats", "Build without the Freepats instrument patches from http://freepats.zenvoid.org/"
depends_on "libogg" => :recommended
depends_on "libvorbis" => :recommended
depends_on "flac" => :recommended
depends_on "speex" => :recommended
depends_on "libao" => :recommended
resource "freepats" do
url "http://freepats.zenvoid.org/freepats-20060219.zip"
sha256 "<SHA256-like>"
end
def install
args = ["--disable-debug",
"--<API key>",
"--prefix=#{prefix}",
"--mandir=#{man}"
]
formats = []
formats << "darwin" if build.with? "darwin"
formats << "vorbis" if build.with?("libogg") && build.with?("libvorbis")
formats << "flac" if build.with? "flac"
formats << "speex" if build.with? "speex"
formats << "ao" if build.with? "libao"
if formats.any?
args << "--enable-audio=" + formats.join(",")
end
system "./configure", *args
system "make", "install"
if build.with? "freepats"
(share/"freepats").install resource("freepats")
(share/"timidity").install_symlink share/"freepats/Tone_000",
share/"freepats/Drum_000",
share/"freepats/freepats.cfg" => "timidity.cfg"
end
end
test do
system "#{bin}/timidity"
end
end
|
class HapiFhirCli < Formula
desc "Command-line interface for the HAPI FHIR library"
homepage "https://hapifhir.io/hapi-fhir/docs/tools/hapi_fhir_cli.html"
url "https://github.com/jamesagnew/hapi-fhir/releases/download/v5.3.0/hapi-fhir-5.3.0-cli.zip"
sha256 "<SHA256-like>"
license "Apache-2.0"
livecheck do
url :stable
strategy :github_latest
end
bottle :unneeded
depends_on "openjdk"
resource "test_resource" do
url "https://github.com/jamesagnew/hapi-fhir/raw/v5.1.0/<API key>/src/test/resources/specimen-example.json"
sha256 "<SHA256-like>"
end
def install
inreplace "hapi-fhir-cli", /SCRIPTDIR=(.*)/, "SCRIPTDIR=#{libexec}"
libexec.install "hapi-fhir-cli.jar"
bin.install "hapi-fhir-cli"
bin.<API key> libexec/"bin", JAVA_HOME: Formula["openjdk"].opt_prefix
end
test do
testpath.install resource("test_resource")
system bin/"hapi-fhir-cli", "validate", "--file", "specimen-example.json",
"--fhir-version", "dstu3"
end
end
|
require File.expand_path("../../language/php", __FILE__)
class PhpPlantumlwriter < Formula
include Language::PHP::Composer
desc "Create UML diagrams from your PHP source"
homepage "https://github.com/davidfuhr/php-plantumlwriter"
url "https://github.com/davidfuhr/php-plantumlwriter/archive/1.6.0.tar.gz"
sha256 "<SHA256-like>"
bottle do
cellar :any_skip_relocation
sha256 "<SHA256-like>" => :sierra
sha256 "<SHA256-like>" => :el_capitan
sha256 "<SHA256-like>" => :yosemite
sha256 "<SHA256-like>" => :mavericks
end
depends_on "plantuml"
def install
composer_install
libexec.install Dir["*"]
bin.install_symlink "#{libexec}/bin/php-plantumlwriter"
end
test do
(testpath/"testClass.php").write <<-EOS.undent
<?php
class OneClass
{
}
EOS
(testpath/"testClass.puml").write <<-EOS.undent
@startuml
class OneClass {
}
@enduml
EOS
system "#{bin}/php-plantumlwriter write testClass.php > output.puml"
system "diff", "-u", "output.puml", "testClass.puml"
end
end
|
#include <sys/time.h>
#include <time.h>
#include "warnp.h"
#include "monoclock.h"
/**
* monoclock_get(tv):
* Store the current time in ${tv}. If CLOCK_MONOTONIC is available, use
* that clock; otherwise, use gettimeofday(2).
*/
int
monoclock_get(struct timeval * tv)
{
#ifdef CLOCK_MONOTONIC
struct timespec tp;
#endif
#ifdef CLOCK_MONOTONIC
if (clock_gettime(CLOCK_MONOTONIC, &tp)) {
warnp("clock_gettime(CLOCK_MONOTONIC)");
goto err0;
}
tv->tv_sec = tp.tv_sec;
tv->tv_usec = tp.tv_nsec / 1000;
#else
if (gettimeofday(tv, NULL)) {
warnp("gettimeofday");
goto err0;
}
#endif
/* Success! */
return (0);
err0:
/* Failure! */
return (-1);
}
|
class Yaz < Formula
desc "Toolkit for Z39.50/SRW/SRU clients/servers"
homepage "https:
url "http://ftp.indexdata.dk/pub/yaz/yaz-5.15.1.tar.gz"
sha256 "<SHA256-like>"
revision 1
bottle do
cellar :any
sha256 "<SHA256-like>" => :el_capitan
sha256 "<SHA256-like>" => :yosemite
sha256 "<SHA256-like>" => :mavericks
end
option :universal
depends_on "pkg-config" => :build
depends_on "icu4c" => :recommended
def install
ENV.universal_binary if build.universal?
system "./configure", "--<API key>",
"--prefix=#{prefix}",
"--with-xml2"
system "make", "install"
end
test do
# This test converts between MARC8, an obscure mostly-obsolete library
# text encoding supported by yaz-iconv, and UTF8.
marc8file = testpath/"marc8.txt"
marc8file.write "$1!0-!L,i$3i$si$Ki$Ai$O!+=(B"
result = shell_output("#{bin}/yaz-iconv -f marc8 -t utf8 #{marc8file}")
result.force_encoding(Encoding::UTF_8) if result.respond_to?(:force_encoding)
assert_equal "", result
# Test ICU support if building with ICU by running yaz-icu
# with the example icu_chain from its man page.
if build.with? "icu4c"
# The input string should be transformed to be:
# * without control characters (tab)
# * split into tokens at word boundaries (including -)
# * without whitespace and Punctuation
# * xy transformed to z
# * lowercase
configurationfile = testpath/"icu-chain.xml"
configurationfile.write <<-EOS.undent
<?xml version="1.0" encoding="UTF-8"?>
<icu_chain locale="en">
<transform rule="[:Control:] Any-Remove"/>
<tokenize rule="w"/>
<transform rule="[[:WhiteSpace:][:Punctuation:]] Remove"/>
<transliterate rule="xy > z;"/>
<display/>
<casemap rule="l"/>
</icu_chain>
EOS
inputfile = testpath/"icu-test.txt"
inputfile.write "yaz-ICU xy!"
expectedresult = <<-EOS.undent
1 1 'yaz' 'yaz'
2 1 '' ''
3 1 'icuz' 'ICUz'
4 1 '' ''
EOS
result = shell_output("#{bin}/yaz-icu -c #{configurationfile} #{inputfile}")
assert_equal expectedresult, result
end
end
end
|
'use strict';
var React = require('react');
var ReactNative = require('react-native');
var {
Text,
TextInput,
View,
StyleSheet,
} = ReactNative;
var TextEventsExample = React.createClass({
getInitialState: function() {
return {
curText: '<No Event>',
prevText: '<No Event>',
prev2Text: '<No Event>',
};
},
updateText: function(text) {
this.setState((state) => {
return {
curText: text,
prevText: state.curText,
prev2Text: state.prevText,
};
});
},
render: function() {
return (
<View>
<TextInput
autoCapitalize="none"
placeholder="Enter text to see events"
autoCorrect={false}
onFocus={() => this.updateText('onFocus')}
onBlur={() => this.updateText('onBlur')}
onChange={(event) => this.updateText(
'onChange text: ' + event.nativeEvent.text
)}
onEndEditing={(event) => this.updateText(
'onEndEditing text: ' + event.nativeEvent.text
)}
onSubmitEditing={(event) => this.updateText(
'onSubmitEditing text: ' + event.nativeEvent.text
)}
style={styles.singleLine}
/>
<Text style={styles.eventLabel}>
{this.state.curText}{'\n'}
(prev: {this.state.prevText}){'\n'}
(prev2: {this.state.prev2Text})
</Text>
</View>
);
}
});
class <API key> extends React.Component {
constructor(props) {
super(props);
this.state = {
text: 'React Native enables you to build world-class application experiences on native platforms using a consistent developer experience based on JavaScript and React. The focus of React Native is on developer efficiency across all the platforms you care about — learn once, write anywhere. Facebook uses React Native in multiple production apps and will continue investing in React Native.',
height: 0,
};
}
render() {
return (
<TextInput
{...this.props}
multiline={true}
onContentSizeChange={(event) => {
this.setState({height: event.nativeEvent.contentSize.height});
}}
onChangeText={(text) => {
this.setState({text});
}}
style={[styles.default, {height: Math.max(35, this.state.height)}]}
value={this.state.text}
/>
);
}
}
class RewriteExample extends React.Component {
constructor(props) {
super(props);
this.state = {text: ''};
}
render() {
var limit = 20;
var remainder = limit - this.state.text.length;
var remainderColor = remainder > 5 ? 'blue' : 'red';
return (
<View style={styles.rewriteContainer}>
<TextInput
multiline={false}
maxLength={limit}
onChangeText={(text) => {
text = text.replace(/ /g, '_');
this.setState({text});
}}
style={styles.default}
value={this.state.text}
/>
<Text style={[styles.remainder, {color: remainderColor}]}>
{remainder}
</Text>
</View>
);
}
}
class <API key> extends React.Component {
constructor(props) {
super(props);
this.state = {text: 'Hello #World'};
}
render() {
//define delimiter
let delimiter = /\s+/;
//split string
let _text = this.state.text;
let token, index, parts = [];
while (_text) {
delimiter.lastIndex = 0;
token = delimiter.exec(_text);
if (token === null) {
break;
}
index = token.index;
if (token[0].length === 0) {
index = 1;
}
parts.push(_text.substr(0, index));
parts.push(token[0]);
index = index + token[0].length;
_text = _text.slice(index);
}
parts.push(_text);
//highlight hashtags
parts = parts.map((text) => {
if (/^#/.test(text)) {
return <Text key={text} style={styles.hashtag}>{text}</Text>;
} else {
return text;
}
});
return (
<View>
<TextInput
multiline={true}
style={styles.multiline}
onChangeText={(text) => {
this.setState({text});
}}>
<Text>{parts}</Text>
</TextInput>
</View>
);
}
}
var BlurOnSubmitExample = React.createClass({
focusNextField(nextField) {
this.refs[nextField].focus();
},
render: function() {
return (
<View>
<TextInput
ref="1"
style={styles.singleLine}
placeholder="blurOnSubmit = false"
returnKeyType="next"
blurOnSubmit={false}
onSubmitEditing={() => this.focusNextField('2')}
/>
<TextInput
ref="2"
style={styles.singleLine}
keyboardType="email-address"
placeholder="blurOnSubmit = false"
returnKeyType="next"
blurOnSubmit={false}
onSubmitEditing={() => this.focusNextField('3')}
/>
<TextInput
ref="3"
style={styles.singleLine}
keyboardType="url"
placeholder="blurOnSubmit = false"
returnKeyType="next"
blurOnSubmit={false}
onSubmitEditing={() => this.focusNextField('4')}
/>
<TextInput
ref="4"
style={styles.singleLine}
keyboardType="numeric"
placeholder="blurOnSubmit = false"
blurOnSubmit={false}
onSubmitEditing={() => this.focusNextField('5')}
/>
<TextInput
ref="5"
style={styles.singleLine}
keyboardType="<API key>"
placeholder="blurOnSubmit = true"
returnKeyType="done"
/>
</View>
);
}
});
var styles = StyleSheet.create({
multiline: {
height: 60,
fontSize: 16,
padding: 4,
marginBottom: 10,
},
eventLabel: {
margin: 3,
fontSize: 12,
},
singleLine: {
fontSize: 16,
padding: 4,
},
<API key>: {
height: 30,
},
hashtag: {
color: 'blue',
fontWeight: 'bold',
},
});
exports.title = '<TextInput>';
exports.description = 'Single and multi-line text inputs.';
exports.examples = [
{
title: 'Auto-focus',
render: function() {
return (
<TextInput
autoFocus={true}
style={styles.singleLine}
accessibilityLabel="I am the accessibility label for text input"
/>
);
}
},
{
title: "Live Re-Write (<sp> -> '_')",
render: function() {
return <RewriteExample />;
}
},
{
title: 'Auto-capitalize',
render: function() {
var autoCapitalizeTypes = [
'none',
'sentences',
'words',
'characters',
];
var examples = autoCapitalizeTypes.map((type) => {
return (
<TextInput
key={type}
autoCapitalize={type}
placeholder={'autoCapitalize: ' + type}
style={styles.singleLine}
/>
);
});
return <View>{examples}</View>;
}
},
{
title: 'Auto-correct',
render: function() {
return (
<View>
<TextInput
autoCorrect={true}
placeholder="This has autoCorrect"
style={styles.singleLine}
/>
<TextInput
autoCorrect={false}
placeholder="This does not have autoCorrect"
style={styles.singleLine}
/>
</View>
);
}
},
{
title: 'Keyboard types',
render: function() {
var keyboardTypes = [
'default',
'email-address',
'numeric',
'phone-pad',
];
var examples = keyboardTypes.map((type) => {
return (
<TextInput
key={type}
keyboardType={type}
placeholder={'keyboardType: ' + type}
style={styles.singleLine}
/>
);
});
return <View>{examples}</View>;
}
},
{
title: 'Blur on submit',
render: function(): ReactElement { return <BlurOnSubmitExample />; },
},
{
title: 'Event handling',
render: function(): ReactElement { return <TextEventsExample />; },
},
{
title: 'Colors and text inputs',
render: function() {
return (
<View>
<TextInput
style={[styles.singleLine]}
defaultValue="Default color text"
/>
<TextInput
style={[styles.singleLine, {color: 'green'}]}
defaultValue="Green Text"
/>
<TextInput
placeholder="Default placeholder text color"
style={styles.singleLine}
/>
<TextInput
placeholder="Red placeholder text color"
<API key>="red"
style={styles.singleLine}
/>
<TextInput
placeholder="Default underline color"
style={styles.singleLine}
/>
<TextInput
placeholder="Blue underline color"
style={styles.singleLine}
<API key>="blue"
/>
<TextInput
defaultValue="Same BackgroundColor as View "
style={[styles.singleLine, {backgroundColor: 'rgba(100, 100, 100, 0.3)'}]}>
<Text style={{backgroundColor: 'rgba(100, 100, 100, 0.3)'}}>
Darker backgroundColor
</Text>
</TextInput>
<TextInput
defaultValue="Highlight Color is red"
selectionColor={'red'}
style={styles.singleLine}>
</TextInput>
</View>
);
}
},
{
title: 'Text input, themes and heights',
render: function() {
return (
<TextInput
placeholder="If you set height, beware of padding set from themes"
style={[styles.<API key>]}
/>
);
}
},
{
title: 'fontFamily, fontWeight and fontStyle',
render: function() {
return (
<View>
<TextInput
style={[styles.singleLine, {fontFamily: 'sans-serif'}]}
placeholder="Custom fonts like Sans-Serif are supported"
/>
<TextInput
style={[styles.singleLine, {fontFamily: 'sans-serif', fontWeight: 'bold'}]}
placeholder="Sans-Serif bold"
/>
<TextInput
style={[styles.singleLine, {fontFamily: 'sans-serif', fontStyle: 'italic'}]}
placeholder="Sans-Serif italic"
/>
<TextInput
style={[styles.singleLine, {fontFamily: 'serif'}]}
placeholder="Serif"
/>
</View>
);
}
},
{
title: 'Passwords',
render: function() {
return (
<View>
<TextInput
defaultValue="iloveturtles"
secureTextEntry={true}
style={styles.singleLine}
/>
<TextInput
secureTextEntry={true}
style={[styles.singleLine, {color: 'red'}]}
placeholder="color is supported too"
<API key>="red"
/>
</View>
);
}
},
{
title: 'Editable',
render: function() {
return (
<TextInput
defaultValue="Can't touch this! (>'-')> ^(' - ')^ <('-'<) (>'-')> ^(' - ')^"
editable={false}
style={styles.singleLine}
/>
);
}
},
{
title: 'Multiline',
render: function() {
return (
<View>
<TextInput
autoCorrect={true}
placeholder="multiline, aligned top-left"
<API key>="red"
multiline={true}
style={[styles.multiline, {textAlign: "left", textAlignVertical: "top"}]}
/>
<TextInput
autoCorrect={true}
placeholder="multiline, aligned center"
<API key>="green"
multiline={true}
style={[styles.multiline, {textAlign: "center", textAlignVertical: "center"}]}
/>
<TextInput
autoCorrect={true}
multiline={true}
style={[styles.multiline, {color: 'blue'}, {textAlign: "right", textAlignVertical: "bottom"}]}>
<Text style={styles.multiline}>multiline with children, aligned bottom-right</Text>
</TextInput>
</View>
);
}
},
{
title: 'Fixed number of lines',
platform: 'android',
render: function() {
return (
<View>
<TextInput numberOfLines={2}
multiline={true}
placeholder="Two line input"
/>
<TextInput numberOfLines={5}
multiline={true}
placeholder="Five line input"
/>
</View>
);
}
},
{
title: 'Auto-expanding',
render: function() {
return (
<View>
<<API key>
placeholder="height increases with content"
<API key>={true}
returnKeyType="done"
/>
</View>
);
}
},
{
title: 'Attributed text',
render: function() {
return <<API key> />;
}
},
{
title: 'Return key',
render: function() {
var returnKeyTypes = [
'none',
'go',
'search',
'send',
'done',
'previous',
'next',
];
var returnKeyLabels = [
'Compile',
'React Native',
];
var examples = returnKeyTypes.map((type) => {
return (
<TextInput
key={type}
returnKeyType={type}
placeholder={'returnKeyType: ' + type}
style={styles.singleLine}
/>
);
});
var types = returnKeyLabels.map((type) => {
return (
<TextInput
key={type}
returnKeyLabel={type}
placeholder={'returnKeyLabel: ' + type}
style={styles.singleLine}
/>
);
});
return <View>{examples}{types}</View>;
}
},
{
title: 'Inline Images',
render: function() {
return (
<View>
<TextInput
inlineImageLeft="ic_menu_black_24dp"
placeholder="This has drawableLeft set"
style={styles.singleLine}
/>
<TextInput
inlineImageLeft="ic_menu_black_24dp"
inlineImagePadding={30}
placeholder="This has drawableLeft and drawablePadding set"
style={styles.singleLine}
/>
<TextInput
placeholder="This does not have drawable props set"
style={styles.singleLine}
/>
</View>
);
}
},
];
|
<?php
/**
* TOP API: taobao.tmc.user.get request
*
* @author auto create
* @since 1.0, 2015.12.04
*/
class TmcUserGetRequest
{
/**
* TmcUsertopic
**/
private $fields;
private $nick;
/**
* tbUIC:; icbu: icbu
**/
private $userPlatform;
private $apiParas = array();
public function setFields($fields)
{
$this->fields = $fields;
$this->apiParas["fields"] = $fields;
}
public function getFields()
{
return $this->fields;
}
public function setNick($nick)
{
$this->nick = $nick;
$this->apiParas["nick"] = $nick;
}
public function getNick()
{
return $this->nick;
}
public function setUserPlatform($userPlatform)
{
$this->userPlatform = $userPlatform;
$this->apiParas["user_platform"] = $userPlatform;
}
public function getUserPlatform()
{
return $this->userPlatform;
}
public function getApiMethodName()
{
return "taobao.tmc.user.get";
}
public function getApiParas()
{
return $this->apiParas;
}
public function check()
{
RequestCheckUtil::checkNotNull($this->fields,"fields");
RequestCheckUtil::checkNotNull($this->nick,"nick");
RequestCheckUtil::checkMaxLength($this->nick,100,"nick");
}
public function putOtherTextParam($key, $value) {
$this->apiParas[$key] = $value;
$this->$key = $value;
}
}
|
# Linux Eclipse Dev
Eclipse can be used on Linux (and probably Windows and Mac) as an IDE for
developing Chromium. It's unpolished, but here's what works:
* Editing code works well (especially if you're used to it or Visual Studio).
* Navigating around the code works well. There are multiple ways to do this
(F3, control-click, outlines).
* Building works fairly well and it does a decent job of parsing errors so
that you can click and jump to the problem spot.
* Debugging is hit & miss. You can set breakpoints and view variables. STL
containers give it (and gdb) a bit of trouble. Also, the debugger can get
into a bad state occasionally and eclipse will need to be restarted.
* Refactoring seems to work in some instances, but be afraid of refactors that
touch a lot of files.
[TOC]
## Setup
Get & Configure Eclipse
Eclipse 4.3 (Kepler) is known to work with Chromium for Linux.
* [Download](http:
for your OS. For example, for Linux 64-bit/Java 64-bit, use the Linux 64 bit
package (Eclipse Packages Tab -> Linux 64 bit (link in bottom right)).
* Tip: The packaged version of eclipse in distros may not work correctly
with the latest CDT plugin (installed below). Best to get them all from
the same source.
* Googlers: The version installed on Goobuntu works fine. The UI will be
much more responsive if you do not install the google3 plug-ins. Just
uncheck all the boxes at first launch.
* Unpack the distribution and edit the eclipse/eclipse.ini to increase the
heap available to java. For instance:
* Change `-Xms40m` to `-Xms1024m` (minimum heap) and `-Xmx256m` to
`-Xmx3072m` (maximum heap).
* Googlers: Edit `~/.eclipse/init.sh` to add this:
export ECLIPSE_MEM_START="1024M"
export ECLIPSE_MEM_MAX="3072M"
The large heap size prevents out of memory errors if you include many Chrome
subprojects that Eclipse is maintaining code indices for.
* Turn off Hyperlink detection in the Eclipse preferences. (Window ->
Preferences, search for "Hyperlinking, and uncheck "Enable on demand
hyperlink style navigation").
Pressing the control key on (for keyboard shortcuts such as copy/paste) can
trigger the hyperlink detector. This occurs on the UI thread and can result in
the reading of jar files on the Eclipse classpath, which can tie up the editor
due to the size of the classpath in Chromium.
A short word about paths
Before you start setting up your work space - here are a few hints:
* Don't put your checkout on a remote file system (e.g. NFS filer). It's too
slow both for building and for Eclipse.
* Make sure there is no file system link in your source path because Ninja
will resolve it for a faster build and Eclipse / GDB will get confused.
(Note: This means that the source will possibly not reside in your user
directory since it would require a link from filer to your local
repository.)
* You may want to start Eclipse from the source root. To do this you can add
an icon to your task bar as launcher. It should point to a shell script
which will set the current path to your source base, and then start Eclipse.
The result would probably look like this:
shell
~/.bashrc
cd /usr/local/google/chromium/src
export PATH=/home/skuhne/depot_tools:/usr/local/google/goma/goma:/opt/eclipse:/usr/local/symlinks:/usr/local/scripts:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/opt/eclipse/eclipse -vm /usr/bin/java
(Note: Things work fine for me without launching Eclipse from a special
directory. jamescook@chromium.org 2012-06-1)
Run Eclipse & Set your workspace
Run eclipse/eclipse in a way that your regular build environment (export CC,
CXX, etc...) will be visible to the eclipse process.
Set the Workspace to be a directory on a local disk (e.g.
`/work/workspaces/chrome`). Placing it on an NFS share is not recommended
it's too slow and Eclipse will block on access. Don't put the workspace in the
same directory as your checkout.
Install the C Development Tools ("CDT")
1. From the Help menu, select Install New Software...
1. Select the 'Workd with' URL for the CDT
If it's not there you can click Add... and add it.
See https://eclipse.org/cdt/downloads.php for up to date versions,
e.g. with CDT 8.7.0 for Eclipse Mars, use
http://download.eclipse.org/tools/cdt/releases/8.7
1. Googlers: We have a local mirror, but be sure you run prodaccess before
trying to use it.
1. Select & install the Main and Optional features.
1. Restart Eclipse
1. Go to Window > Open Perspective > Other... > C/C++ to switch to the C++
perspective (window layout).
1. Right-click on the "Java" perspective in the top-right corner and select
"Close" to remove it.
Create your project(s)
First, turn off automatic workspace refresh and automatic building, as Eclipse
tries to do these too often and gets confused:
1. Open Window > Preferences
1. Search for "workspace"
1. Turn off "Build automatically"
1. Turn off "Refresh using native hooks or polling"
1. Click "Apply"
Chromium uses C++11, so tell the indexer about it. Otherwise it will get
confused about things like std::unique_ptr.
1. Open Window > Preferences > C/C++ > Build > Settings > Discovery >
CDT GCC Build-in Compiler Settings
1. In the text box entitled Command to get compiler specs append "-std=c++11"
Create a single Eclipse project for everything:
1. From the File menu, select New > Project...
1. Select C/C++ Project > Makefile Project with Existing Code
1. Name the project the exact name of the directory: "src"
1. Provide a path to the code, like /work/chromium/src
1. Select toolchain: Linux GCC
1. Click Finish.
Chromium has a huge amount of code, enough that Eclipse can take a very long
time to perform operations like "go to definition" and "open resource". You need
to set it up to operate on a subset of the code.
In the Project Explorer on the left side:
1. Right-click on "src" and select "Properties..."
1. Open Resource > Resource Filters
1. Click "Add..."
1. Add the following filter:
* Include only
* Files, all children (recursive)
* Name matches
`.*\.(c|cc|cpp|h|mm|inl|idl|js|json|css|html|gyp|gypi|grd|grdp|gn)`
regular expression
1. Add another filter:
* Exclude all
* Folders
* Name matches `out_.*|\.git|\.svn|LayoutTests` regular expression
* If you aren't working on WebKit, adding `|WebKit` will remove more
files
1. Click "OK"
Don't exclude the primary "out" directory, as it contains generated header files
for things like string resources and Eclipse will miss a lot of symbols if you
do.
Eclipse will refresh the workspace and start indexing your code. It won't find
most header files, however. Give it more help finding them:
1. Open Window > Preferences
1. Search for "Indexer"
1. Turn on "Allow heuristic resolution of includes"
1. Select "Use active build configuration"
1. Set Cache limits > Index database > Limit relative... to 20%
1. Set Cache limits > Index database > Absolute limit to 256 MB
1. Click "OK"
Now the indexer will find many more include files, regardless of which approach
you take below.
# Optional: Manual header paths and symbols
You can manually tell Eclipse where to find header files, which will allow it to
create the source code index before you do a real build.
1. Right-click on "src" and select "Properties..."
* Open C++ General > Paths and Symbols > Includes
* Click "GNU C++"
* Click "Add..."
* Add `/path/to/chromium/src`
* Check "Add to all configurations" and "Add to all languages"
1. Repeat the above for:
* `/path/to/chromium/src/testing/gtest/include`
You may also find it helpful to define some symbols.
1. Add `OS_LINUX`:
* Select the "Symbols" tab
* Click "GNU C++"
* Click "Add..."
* Add name `OS_LINUX` with value 1
* Click "Add to all configurations" and "Add to all languages"
1. Repeat for `ENABLE_EXTENSIONS 1`
1. Repeat for `<API key> 1`
1. Click "OK".
1. Eclipse will ask if you want to rebuild the index. Click "Yes".
Let the C++ indexer run. It will take a while (10s of minutes).
Optional: Building inside Eclipse
This allows Eclipse to automatically discover include directories and symbols.
If you use gold or ninja (both recommended) you'll need to tell Eclipse about
your path.
1. echo $PATH from a shell and copy it to the clipboard
1. Open Window > Preferences > C/C++ > Build > Environment
1. Select "Replace native environment with specified one" (since gold and ninja
must be at the start of your path)
1. Click "Add..."
1. For name, enter `PATH`
1. For value, paste in your path with the ninja and gold directories.
1. Click "OK"
To create a Make target:
1. From the Window menu, select Show View > Make Target
1. In the Make Target view, right-click on the project and select New...
1. name the target (e.g. base\_unittests)
1. Unclick the Build Command: Use builder Settings and type whatever build
command you would use to build this target (e.g.
`ninja -C out/Debug base_unittests`).
1. Return to the project properties page a under the C/C++ Build, change the
Build Location/Build Directory to be /path/to/chromium/src
1. In theory `${workspace_loc}` should work, but it doesn't for me.
1. If you put your workspace in `/path/to/chromium`, then
`${workspace_loc:/src}` will work too.
1. Now in the Make Targets view, select the target and click the hammer icon
(Build Make Target).
You should see the build proceeding in the Console View and errors will be
parsed and appear in the Problems View. (Note that sometimes multi-line compiler
errors only show up partially in the Problems view and you'll want to look at
the full error in the Console).
(Eclipse 3.8 has a bug where the console scrolls too slowly if you're doing a
fast build, e.g. with goma. To work around, go to Window > Preferences and
search for "console". Under C/C++ console, set "Limit console output" to
2147483647, the maximum value.)
Optional: Multiple build targets
If you want to build multiple different targets in Eclipse (`chrome`,
`unit_tests`, etc.):
1. Window > Show Toolbar (if you had it off)
1. Turn on special toolbar menu item (hammer) or menu bar item (Project > Build
configurations > Set Active > ...)
1. Window > Customize Perspective... > "Command Groups Availability"
1. Check "Build configuration"
1. Add more Build targets
1. Project > Properties > C/C++ Build > Manage Configurations
1. Select "New..."
1. Duplicate from current and give it a name like "Unit tests".
1. Change under “Behavior” > Build > the target to e.g. `unit_tests`.
You can also drag the toolbar to the bottom of your window to save vertical
space.
Optional: Debugging
1. From the toolbar at the top, click the arrow next to the debug icon and
select Debug Configurations...
1. Select C/C++ Application and click the New Launch Configuration icon. This
will create a new run/debug con figuration under the C/C++ Application header.
1. Name it something useful (e.g. `base_unittests`).
1. Under the Main Tab, enter the path to the executable (e.g.
`.../out/Debug/base_unittests`)
1. Select the Debugger Tab, select Debugger: gdb and unclick "Stop on startup
in (main)" unless you want this.
1. Set a breakpoint somewhere in your code and click the debug icon to start
debugging.
Optional: Accurate symbol information
If setup properly, Eclipse can do a great job of semantic navigation of C++ code
(showing type hierarchies, finding all references to a particular method even
when other classes have methods of the same name, etc.). But doing this well
requires the Eclipse knows correct include paths and pre-processor definitions.
After fighting with with a number of approaches, I've found the below to work
best for me.
*The instrcutions below are out-of-date since it references GYP. Please see
`gn help gen` for how to generate an Eclipse CDT file in GN. If you use
Eclipse and make it work, please update this documentation.*
1. From a shell in your src directory, run
`GYP_GENERATORS=ninja,eclipse build/gyp_chromium`
1. This generates <project root>/out/Debug/<API key>.xml which
is used below.
1. This creates a single list of include directories and preprocessor
definitions to be used for all source files, and so is a little
inaccurate. Here are some tips for compensating for the limitations:
1. Use `-R <target>` to restrict the output to considering only certain
targets (avoiding unnecessary includes that are likely to cause
trouble). Eg. for a blink project, use `-R blink`.
1. If you care about blink, move 'third\_party/Webkit/Source' to the
top of the list to better resolve ambiguous include paths (eg.
`config.h`).
1. Import paths and symbols
1. Right click on the project and select Properties > C/C++ General > Paths
and Symbols
1. Click Restore Defaults to clear any old settings
1. Click Import Settings... > Browse... and select
`<project root>/out/Debug/<API key>.xml`
1. Click the Finish button. The entire preferences dialog should go away.
1. Right click on the project and select Index > Rebuild
Alternative: Per-file accurate include/pre-processor information
Instead of generating a fixed list of include paths and pre-processor
definitions for a project (above), it is also possible to have Eclipse determine
the correct setting on a file-by-file basis using a built output parser. I
(rbyers) used this successfully for a long time, but it doesn't seem much better
in practice than the simpler (and less bug-prone) approach above.
1. Install the latest version of Eclipse IDE for C/C++ developers
([Juno SR1](http:
at the time of this writing)
1. Setup build to generate a build log that includes the g++ command lines for
the files you want to index:
1. Project Properties -> C/C++ Build
1. Uncheck "Use default build command"
1. Enter your build command, eg: `ninja -v`
1. Note that for better performance, you can use a command that
doesn't actually builds, just prints the commands that would be
run. For ninja/make this means adding -n. This only prints the
compile commands for changed files (so be sure to move your
existing out directory out of the way temporarily to force a
full "build"). ninja also supports "-t commands" which will
print all build commands for the specified target and runs even
faster as it doesn't have to check file timestamps.
1. Build directory: your build path including out/Debug
1. Note that for the relative paths to be parsed correctly you
can't use ninja's `-C <dir>` to change directories as you might
from the command line.
1. Build: potentially change `all` to the target you want to analyze,
eg. `chrome`
1. Deselect 'clean'
1. If you're using Ninja, you need to teach eclipse to ignore the prefix it
adds (eg. `[10/1234]` to each line in build output):
1. Project properties -> C/C++ General -> Preprocessor includes
1. Providers -> CDT GCC Build Output Parser -> Compiler command pattern
1. `(\[.*\] )?((gcc)|([gc]\+\+)|(clang(\+\+)?))`
1. Note that there appears to be a bug with "Share setting entries
between projects" - it will keep resetting to off. I suggest using
per-project settings and using the "folder" as the container to keep
discovered entries ("file" may work as well).
1. Eclipse / GTK has bugs where lots of output to the build console can
slow down the UI dramatically and cause it to hang (basically spends all
it's time trying to position the cursor correctly in the build console
window). To avoid this, close the console window and disable
automatically opening it on build:
1. Preferences->C/C++->Build->Console -> Uncheck "Open console when
building"
1. note you can still see the build log in
`<workspace>/.metadata/.plugins/org.eclipse.cdt.ui`
1. Now build the project (select project, click on hammer). If all went well:
1. Right click on a cpp file -> properties -> C/C++ general -> Preprocessor
includes -> GNU C++ -> CDT GCC Build output Parser
1. You will be able to expand and see all the include paths and
pre-processor definitions used for this file
1. Rebuild index (right-click on project, index, rebuild). If all went well:
1. Open a CPP file and look at problems windows
1. Should be no (or very few) errors
1. Should be able to hit F3 on most symbols and jump to their definitioin
1. CDT has some issues with complex C++ syntax like templates (eg.
`PassOwnPtr` functions)
1. See
[this page](http://wiki.eclipse.org/CDT/User/FAQ#<API key>.28F3.29_not_work.3F_.<API key>.29)
for more information.
Optional: static code and style guide analysis using cpplint.py
1. From the toolbar at the top, click the Project -> Properties and go to
C/C++Build.
1. Click on the right side of the pop up windows, "Manage
Configurations...", then on New, and give it a name, f.i. "Lint current
file", and close the small window, then select it in the Configuration
drop down list.
1. Under Builder settings tab, unclick "Use default build command" and type
as build command the full path to your `depot_tools/cpplint.py`
1. Under behaviour tab, unselect Clean, select Build(incremental build) and
in Make build target, add `--verbose=0 ${<API key>}`
1. Go back to the left side of the current window, and to C/C++Build ->
Settings, and click on error parsers tab, make sure CDT GNU C/C++ Error
Parser, CDT pushd/popd CWD Locator are set, then click Apply and OK.
1. Select a file and click on the hammer icon drop down triangle next to it,
and make sure the build configuration is selected "Lint current file", then
click on the hammer.
1. Note: If you get the `cpplint.py help` output, make sure you have selected a
file, by clicking inside the editor window or on its tab header, and make
sure the editor is not maximized inside Eclipse, i.e. you should see more
subwindows around.
Additional tips
1. Mozilla's
[Eclipse CDT guide](https://developer.mozilla.org/en-US/docs/Eclipse_CDT)
is helpful:
1. For improved performance, I use medium-granularity projects (eg. one for
WebKit/Source) instead of putting all of 'src/' in one project.
1. For working in Blink (which uses WebKit code style), feel free to use
[this](https://drive.google.com/file/d/<API key>/view?usp=sharing)
code-style formatter XML profile
|
#ifndef <API key>
#define <API key>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/strings/string_piece.h"
#include "base/sys_byteorder.h"
#include "net/base/net_export.h"
#include "net/spdy/hpack/hpack_decoder.h"
#include "net/spdy/hpack/hpack_encoder.h"
#include "net/spdy/<API key>.h"
#include "net/spdy/spdy_header_block.h"
#include "net/spdy/spdy_protocol.h"
// TODO(akalin): Remove support for CREDENTIAL frames.
typedef struct z_stream_s z_stream; // Forward declaration for zlib.
namespace net {
class <API key>;
class HttpNetworkLayer;
class <API key>;
class SpdyHttpStreamTest;
class <API key>;
class <API key>;
class SpdySessionTest;
class SpdyStreamTest;
class SpdyFramer;
class SpdyFrameBuilder;
namespace test {
class TestSpdyVisitor;
class SpdyFramerPeer;
} // namespace test
// A datastructure for holding the ID and flag fields for SETTINGS.
// Conveniently handles converstion to/from wire format.
class NET_EXPORT_PRIVATE SettingsFlagsAndId {
public:
static SettingsFlagsAndId FromWireFormat(SpdyMajorVersion version,
uint32 wire);
SettingsFlagsAndId() : flags_(0), id_(0) {}
// TODO(hkhalil): restrict to enums instead of free-form ints.
SettingsFlagsAndId(uint8 flags, uint32 id);
uint32 GetWireFormat(SpdyMajorVersion version) const;
uint32 id() const { return id_; }
uint8 flags() const { return flags_; }
private:
static void <API key>(uint32* val);
uint8 flags_;
uint32 id_;
};
// SettingsMap has unique (flags, value) pair for given SpdySettingsIds ID.
typedef std::pair<SpdySettingsFlags, uint32> <API key>;
typedef std::map<SpdySettingsIds, <API key>> SettingsMap;
// <API key> is a set of callbacks for the SpdyFramer.
// Implement this interface to receive event callbacks as frames are
// decoded from the framer.
// Control frames that contain SPDY header blocks (SYN_STREAM, SYN_REPLY,
// HEADER, and PUSH_PROMISE) are processed in fashion that allows the
// decompressed header block to be delivered in chunks to the visitor.
// The following steps are followed:
// 1. OnSynStream, OnSynReply, OnHeaders, or OnPushPromise is called.
// 2. Repeated: <API key> is called with chunks of the
// decompressed header block. In each call the len parameter is greater
// than zero.
// 3. <API key> is called with len set to zero, indicating
// that the full header block has been delivered for the control frame.
// During step 2 the visitor may return false, indicating that the chunk of
// header data could not be handled by the visitor (typically this indicates
// resource exhaustion). If this occurs the framer will discontinue
// delivering chunks to the visitor, set a <API key>
// error, and clean up appropriately. Note that this will cause the header
// decompressor to lose synchronization with the sender's header compressor,
// making the SPDY session unusable for future work. The visitor's OnError
// function should deal with this condition by closing the SPDY connection.
class NET_EXPORT_PRIVATE <API key> {
public:
virtual ~<API key>() {}
// Called if an error is detected in the SpdyFrame protocol.
virtual void OnError(SpdyFramer* framer) = 0;
// Called when a data frame header is received. The frame's data
// payload will be provided via subsequent calls to
// OnStreamFrameData().
virtual void OnDataFrameHeader(SpdyStreamId stream_id,
size_t length,
bool fin) = 0;
// Called when data is received.
// |stream_id| The stream receiving data.
// |data| A buffer containing the data received.
// |len| The length of the data buffer.
// When the other side has finished sending data on this stream,
// this method will be called with a zero-length buffer.
virtual void OnStreamFrameData(SpdyStreamId stream_id,
const char* data,
size_t len,
bool fin) = 0;
// Called when padding is received (padding length field or padding octets).
// |stream_id| The stream receiving data.
// |len| The number of padding octets.
virtual void OnStreamPadding(SpdyStreamId stream_id, size_t len) = 0;
// Called when a chunk of header data is available. This is called
// after OnSynStream, OnSynReply, OnHeaders(), or OnPushPromise.
// |stream_id| The stream receiving the header data.
// |header_data| A buffer containing the header data chunk received.
// |len| The length of the header data buffer. A length of zero indicates
// that the header data block has been completely sent.
// When this function returns true the visitor indicates that it accepted
// all of the data. Returning false indicates that that an unrecoverable
// error has occurred, such as bad header data or resource exhaustion.
virtual bool <API key>(SpdyStreamId stream_id,
const char* header_data,
size_t len) = 0;
// Called when a SYN_STREAM frame is received.
// Note that header block data is not included. See
// <API key>().
virtual void OnSynStream(SpdyStreamId stream_id,
SpdyStreamId <API key>,
SpdyPriority priority,
bool fin,
bool unidirectional) = 0;
// Called when a SYN_REPLY frame is received.
// Note that header block data is not included. See
// <API key>().
virtual void OnSynReply(SpdyStreamId stream_id, bool fin) = 0;
// Called when a RST_STREAM frame has been parsed.
virtual void OnRstStream(SpdyStreamId stream_id,
SpdyRstStreamStatus status) = 0;
// Called when a SETTINGS frame is received.
// |clear_persisted| True if the respective flag is set on the SETTINGS frame.
virtual void OnSettings(bool clear_persisted) {}
// Called when a complete setting within a SETTINGS frame has been parsed and
// validated.
virtual void OnSetting(SpdySettingsIds id, uint8 flags, uint32 value) = 0;
// Called when a SETTINGS frame is received with the ACK flag set.
virtual void OnSettingsAck() {}
// Called before and after parsing SETTINGS id and value tuples.
virtual void OnSettingsEnd() = 0;
// Called when a PING frame has been parsed.
virtual void OnPing(SpdyPingId unique_id, bool is_ack) = 0;
// Called when a GOAWAY frame has been parsed.
virtual void OnGoAway(SpdyStreamId <API key>,
SpdyGoAwayStatus status) = 0;
// Called when a HEADERS frame is received.
// Note that header block data is not included. See
// <API key>().
// |stream_id| The stream receiving the header.
// |has_priority| Whether or not the headers frame included a priority value,
// and, if protocol version >= HTTP2, stream dependency info.
// |priority| If |has_priority| is true and protocol version > SPDY3,
// priority value for the receiving stream, else 0.
// |parent_stream_id| If |has_priority| is true and protocol
// version >= HTTP2, the parent stream of the receiving stream, else 0.
// |exclusive| If |has_priority| is true and protocol
// version >= HTTP2, the exclusivity of dependence on the parent stream,
// else false.
// |fin| Whether FIN flag is set in frame headers.
// |end| False if HEADERs frame is to be followed by a CONTINUATION frame,
// or true if not.
virtual void OnHeaders(SpdyStreamId stream_id,
bool has_priority,
SpdyPriority priority,
SpdyStreamId parent_stream_id,
bool exclusive,
bool fin,
bool end) = 0;
// Called when a WINDOW_UPDATE frame has been parsed.
virtual void OnWindowUpdate(SpdyStreamId stream_id,
int delta_window_size) = 0;
// Called when a goaway frame opaque data is available.
// |goaway_data| A buffer containing the opaque GOAWAY data chunk received.
// |len| The length of the header data buffer. A length of zero indicates
// that the header data block has been completely sent.
// When this function returns true the visitor indicates that it accepted
// all of the data. Returning false indicates that that an error has
// occurred while processing the data. Default implementation returns true.
virtual bool OnGoAwayFrameData(const char* goaway_data, size_t len);
// Called when rst_stream frame opaque data is available.
// |rst_stream_data| A buffer containing the opaque RST_STREAM
// data chunk received.
// |len| The length of the header data buffer. A length of zero indicates
// that the opaque data has been completely sent.
// When this function returns true the visitor indicates that it accepted
// all of the data. Returning false indicates that that an error has
// occurred while processing the data. Default implementation returns true.
virtual bool <API key>(const char* rst_stream_data, size_t len);
// Called when a BLOCKED frame has been parsed.
virtual void OnBlocked(SpdyStreamId stream_id) {}
// Called when a PUSH_PROMISE frame is received.
// Note that header block data is not included. See
// <API key>().
virtual void OnPushPromise(SpdyStreamId stream_id,
SpdyStreamId promised_stream_id,
bool end) = 0;
// Called when a CONTINUATION frame is received.
// Note that header block data is not included. See
// <API key>().
virtual void OnContinuation(SpdyStreamId stream_id, bool end) = 0;
// Called when an ALTSVC frame has been parsed.
virtual void OnAltSvc(
SpdyStreamId stream_id,
base::StringPiece origin,
const <API key>::<API key>& altsvc_vector) {}
// Called when a PRIORITY frame is received.
virtual void OnPriority(SpdyStreamId stream_id,
SpdyStreamId parent_stream_id,
uint8 weight,
bool exclusive) {}
// Called when a frame type we don't recognize is received.
// Return true if this appears to be a valid extension frame, false otherwise.
// We distinguish between extension frames and nonsense by checking
// whether the stream id is valid.
virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) = 0;
};
// Optionally, and in addition to <API key>, a class supporting
// <API key> may be used in conjunction with SpdyFramer in
// order to extract debug/internal information about the SpdyFramer as it
// operates.
// Most SPDY implementations need not bother with this interface at all.
class NET_EXPORT_PRIVATE <API key> {
public:
virtual ~<API key>() {}
// Called after compressing a frame with a payload of
// a list of name-value pairs.
// |payload_len| is the uncompressed payload size.
// |frame_len| is the compressed frame size.
virtual void <API key>(SpdyStreamId stream_id,
SpdyFrameType type,
size_t payload_len,
size_t frame_len) {}
// Called when a frame containing a compressed payload of
// name-value pairs is received.
// |frame_len| is the compressed frame size.
virtual void <API key>(SpdyStreamId stream_id,
SpdyFrameType type,
size_t frame_len) {}
};
class NET_EXPORT_PRIVATE SpdyFramer {
public:
// SPDY states.
// TODO(mbelshe): Can we move these into the implementation
// and avoid exposing through the header. (Needed for test)
enum SpdyState {
SPDY_ERROR,
<API key>, // Framer is ready for reading the next frame.
SPDY_FRAME_COMPLETE, // Framer has finished reading a frame, need to reset.
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
};
// SPDY error codes.
enum SpdyError {
SPDY_NO_ERROR,
<API key>, // Control frame is mal-formatted.
<API key>, // Control frame payload was too large.
<API key>, // The Zlib library could not initialize.
<API key>, // Control frame has unsupported version.
<API key>, // There was an error decompressing.
<API key>, // There was an error compressing.
<API key>, // GOAWAY frame could not be parsed.
<API key>, // RST_STREAM frame could not be parsed.
<API key>, // Data frame has invalid flags.
<API key>, // Control frame has invalid flags.
<API key>, // Frame received out of order.
LAST_ERROR, // Must be the last entry in the enum.
};
// Constant for invalid (or unknown) stream IDs.
static const SpdyStreamId kInvalidStream;
// The maximum size of header data chunks delivered to the framer visitor
// through <API key>. (It is exposed here for unit test
// purposes.)
static const size_t <API key>;
// Serializes a SpdyHeaderBlock.
static void WriteHeaderBlock(SpdyFrameBuilder* frame,
const SpdyMajorVersion spdy_version,
const SpdyHeaderBlock* headers);
// Retrieve serialized length of SpdyHeaderBlock.
// TODO(hkhalil): Remove, or move to quic code.
static size_t GetSerializedLength(
const SpdyMajorVersion spdy_version,
const SpdyHeaderBlock* headers);
// Create a new Framer, provided a SPDY version.
explicit SpdyFramer(SpdyMajorVersion version);
virtual ~SpdyFramer();
// Set callbacks to be called from the framer. A visitor must be set, or
// else the framer will likely crash. It is acceptable for the visitor
// to do nothing. If this is called multiple times, only the last visitor
// will be used.
void set_visitor(<API key>* visitor) {
visitor_ = visitor;
}
// Set debug callbacks to be called from the framer. The debug visitor is
// completely optional and need not be set in order for normal operation.
// If this is called multiple times, only the last visitor will be used.
void set_debug_visitor(<API key>* debug_visitor) {
debug_visitor_ = debug_visitor;
}
// Sets whether or not ProcessInput returns after finishing a frame, or
// continues processing additional frames. Normally ProcessInput processes
// all input, but this method enables the caller (and visitor) to work with
// a single frame at a time (or that portion of the frame which is provided
// as input). Reset() does not change the value of this flag.
void <API key>(bool v) {
<API key> = v;
}
// Pass data into the framer for parsing.
// Returns the number of bytes consumed. It is safe to pass more bytes in
// than may be consumed.
size_t ProcessInput(const char* data, size_t len);
// Resets the framer state after a frame has been successfully decoded.
// TODO(mbelshe): can we make this private?
void Reset();
// Check the state of the framer.
SpdyError error_code() const { return error_code_; }
SpdyState state() const { return state_; }
bool HasError() const { return state_ == SPDY_ERROR; }
// Given a buffer containing a decompressed header block in SPDY
// serialized format, parse out a SpdyHeaderBlock, putting the results
// in the given header block.
// Returns number of bytes consumed if successfully parsed, 0 otherwise.
size_t <API key>(const char* header_data,
size_t header_length,
SpdyHeaderBlock* block) const;
// Serialize a data frame.
SpdySerializedFrame* SerializeData(const SpdyDataIR& data) const;
// Serializes the data frame header and optionally padding length fields,
// excluding actual data payload and padding.
SpdySerializedFrame* <API key>(
const SpdyDataIR& data) const;
// Serializes a SYN_STREAM frame.
SpdySerializedFrame* SerializeSynStream(const SpdySynStreamIR& syn_stream);
// Serialize a SYN_REPLY SpdyFrame.
SpdySerializedFrame* SerializeSynReply(const SpdySynReplyIR& syn_reply);
SpdySerializedFrame* SerializeRstStream(
const SpdyRstStreamIR& rst_stream) const;
// Serializes a SETTINGS frame. The SETTINGS frame is
// used to communicate name/value pairs relevant to the communication channel.
SpdySerializedFrame* SerializeSettings(const SpdySettingsIR& settings) const;
// Serializes a PING frame. The unique_id is used to
// identify the ping request/response.
SpdySerializedFrame* SerializePing(const SpdyPingIR& ping) const;
// Serializes a GOAWAY frame. The GOAWAY frame is used
// prior to the shutting down of the TCP connection, and includes the
// stream_id of the last stream the sender of the frame is willing to process
// to completion.
SpdySerializedFrame* SerializeGoAway(const SpdyGoAwayIR& goaway) const;
// Serializes a HEADERS frame. The HEADERS frame is used
// for sending additional headers outside of a SYN_STREAM/SYN_REPLY.
SpdySerializedFrame* SerializeHeaders(const SpdyHeadersIR& headers);
// Serializes a WINDOW_UPDATE frame. The WINDOW_UPDATE
// frame is used to implement per stream flow control in SPDY.
SpdySerializedFrame* <API key>(
const SpdyWindowUpdateIR& window_update) const;
// Serializes a BLOCKED frame. The BLOCKED frame is used to
// indicate to the remote endpoint that this endpoint believes itself to be
// flow-control blocked but otherwise ready to send data. The BLOCKED frame
// is purely advisory and optional.
SpdySerializedFrame* SerializeBlocked(const SpdyBlockedIR& blocked) const;
// Serializes a PUSH_PROMISE frame. The PUSH_PROMISE frame is used
// to inform the client that it will be receiving an additional stream
// in response to the original request. The frame includes synthesized
// headers to explain the upcoming data.
SpdySerializedFrame* <API key>(
const SpdyPushPromiseIR& push_promise);
// Serializes a CONTINUATION frame. The CONTINUATION frame is used
// to continue a sequence of header block fragments.
// TODO(jgraettinger): This implementation is incorrect. The continuation
// frame continues a previously-begun HPACK encoding; it doesn't begin a
// new one. Figure out whether it makes sense to keep <API key>().
SpdySerializedFrame* <API key>(
const SpdyContinuationIR& continuation);
// Serializes an ALTSVC frame. The ALTSVC frame advertises the
// availability of an alternative service to the client.
SpdySerializedFrame* SerializeAltSvc(const SpdyAltSvcIR& altsvc);
// Serializes a PRIORITY frame. The PRIORITY frame advises a change in
// the relative priority of the given stream.
SpdySerializedFrame* SerializePriority(const SpdyPriorityIR& priority) const;
// Serialize a frame of unknown type.
SpdySerializedFrame* SerializeFrame(const SpdyFrameIR& frame);
// NOTES about frame compression.
// We want spdy to compress headers across the entire session. As long as
// the session is over TCP, frames are sent serially. The client & server
// can each compress frames in the same order and then compress them in that
// order, and the remote can do the reverse. However, we ultimately want
// the creation of frames to be less sensitive to order so that they can be
// placed over a UDP based protocol and yet still benefit from some
// compression. We don't know of any good compression protocol which does
// not build its state in a serial (stream based) manner.... For now, we're
// using zlib anyway.
// Compresses a SpdyFrame.
// On success, returns a new SpdyFrame with the payload compressed.
// Compression state is maintained as part of the SpdyFramer.
// Returned frame must be freed with "delete".
// On failure, returns NULL.
SpdyFrame* CompressFrame(const SpdyFrame& frame);
// For ease of testing and experimentation we can tweak compression on/off.
void <API key>(bool value) {
enable_compression_ = value;
}
// Used only in log messages.
void <API key>(const std::string& protocol) {
display_protocol_ = protocol;
}
// Returns the (minimum) size of frames (sans variable-length portions).
size_t <API key>() const;
size_t <API key>() const;
size_t <API key>() const;
size_t <API key>() const;
size_t <API key>() const;
size_t <API key>() const;
size_t GetPingSize() const;
size_t <API key>() const;
size_t <API key>() const;
size_t GetWindowUpdateSize() const;
size_t GetBlockedSize() const;
size_t <API key>() const;
size_t <API key>() const;
size_t <API key>() const;
size_t GetPrioritySize() const;
// Returns the minimum size a frame can be (data or control).
size_t GetFrameMinimumSize() const;
// Returns the maximum size a frame can be (data or control).
size_t GetFrameMaximumSize() const;
// Returns the maximum payload size of a DATA frame.
size_t <API key>() const;
// Returns the prefix length for the given frame type.
size_t GetPrefixLength(SpdyFrameType type) const;
// For debugging.
static const char* StateToString(int state);
static const char* ErrorCodeToString(int error_code);
static const char* StatusCodeToString(int status_code);
static const char* FrameTypeToString(SpdyFrameType type);
SpdyMajorVersion protocol_version() const { return protocol_version_; }
bool <API key>() const { return <API key>; }
SpdyPriority GetLowestPriority() const {
return protocol_version_ < SPDY3 ? 3 : 7;
}
SpdyPriority GetHighestPriority() const { return 0; }
// Interpolates SpdyPriority values into SPDY4/HTTP2 priority weights,
// and vice versa.
static uint8 MapPriorityToWeight(SpdyPriority priority);
static SpdyPriority MapWeightToPriority(uint8 weight);
// Deliver the given control frame's compressed headers block to the visitor
// in decompressed form, in chunks. Returns true if the visitor has
// accepted all of the chunks.
bool <API key>(
SpdyStreamId stream_id,
const char* data,
size_t len);
// Updates the maximum size of header compression table.
void <API key>(uint32 value);
// Returns bound of header compression table size.
size_t <API key>() const;
protected:
friend class HttpNetworkLayer; // This is temporary for the server.
friend class <API key>;
friend class <API key>;
friend class SpdyHttpStreamTest;
friend class <API key>;
friend class <API key>;
friend class SpdySessionTest;
friend class SpdyStreamTest;
friend class test::TestSpdyVisitor;
friend class test::SpdyFramerPeer;
private:
class CharBuffer {
public:
explicit CharBuffer(size_t capacity);
~CharBuffer();
void CopyFrom(const char* data, size_t size);
void Rewind();
const char* data() const { return buffer_.get(); }
size_t len() const { return len_; }
private:
scoped_ptr<char[]> buffer_;
size_t capacity_;
size_t len_;
};
// Scratch space necessary for processing SETTINGS frames.
struct SpdySettingsScratch {
SpdySettingsScratch();
void Reset();
// Buffer contains up to one complete key/value pair.
CharBuffer buffer;
// The ID of the last setting that was processed in the current SETTINGS
// frame. Used for detecting out-of-order or duplicate keys within a
// settings frame. Set to -1 before first key/value pair is processed.
int last_setting_id;
};
// Internal breakouts from ProcessInput. Each returns the number of bytes
// consumed from the data.
size_t ProcessCommonHeader(const char* data, size_t len);
size_t <API key>(const char* data, size_t len);
size_t <API key>(const char* data, size_t len);
// HPACK data is re-encoded as SPDY3 and re-entrantly delivered through
// |<API key>()|. |<API key>| controls
// whether data is treated as HPACK- vs SPDY3-encoded.
size_t <API key>(const char* data,
size_t len,
bool <API key>);
size_t <API key>(const char* data, size_t len);
size_t ProcessFramePadding(const char* data, size_t len);
size_t <API key>(const char* data, size_t len);
size_t <API key>(const char* data, size_t len);
size_t <API key>(const char* data, size_t len);
size_t <API key>(const char* data, size_t len);
size_t <API key>(const char* data, size_t len);
size_t <API key>(/*const char* data,*/ size_t len);
// TODO(jgraettinger): To be removed with migration to
// <API key>. Serializes the last-processed
// header block of |hpack_decoder_| as a SPDY3 format block, and
// delivers it to the visitor via reentrant call to
// <API key>(). |compressed_len| is used for
// logging compression percentage.
void <API key>(size_t compressed_len);
// Helpers for above internal breakouts from ProcessInput.
void <API key>(int <API key>);
// Always passed exactly 1 setting's worth of data.
bool ProcessSetting(const char* data);
// Retrieve serialized length of SpdyHeaderBlock. If compression is enabled, a
// maximum estimate is returned.
size_t GetSerializedLength(const SpdyHeaderBlock& headers);
// Get (and lazily initialize) the ZLib state.
z_stream* GetHeaderCompressor();
z_stream* <API key>();
// Get (and lazily initialize) the HPACK state.
HpackEncoder* GetHpackEncoder();
HpackDecoder* GetHpackDecoder();
size_t <API key>(size_t size);
void <API key>(SpdyFrameBuilder* builder,
const std::string& hpack_encoding,
SpdyStreamId stream_id,
SpdyFrameType type,
int padding_payload_len);
// Deliver the given control frame's uncompressed headers block to the
// visitor in chunks. Returns true if the visitor has accepted all of the
// chunks.
bool <API key>(SpdyStreamId stream_id,
const char* data,
size_t len);
// Utility to copy the given data block to the current frame buffer, up
// to the given maximum number of bytes, and update the buffer
// data (pointer and length). Returns the number of bytes
// read, and:
// *data is advanced the number of bytes read.
// *len is reduced by the number of bytes read.
size_t <API key>(const char** data, size_t* len,
size_t max_bytes);
void WriteHeaderBlockToZ(const SpdyHeaderBlock* headers,
z_stream* out) const;
void <API key>(
SpdyFrameBuilder* builder,
const SpdyHeaderBlock& header_block) const;
// Compresses automatically according to enable_compression_.
void <API key>(SpdyFrameBuilder* builder,
const <API key>& frame);
// Set the error code and moves the framer into the error state.
void set_error(SpdyError error);
// The size of the control frame buffer.
// Since this is only used for control frame headers, the maximum control
// frame header size (SYN_STREAM) is sufficient; all remaining control
// frame data is streamed to the visitor.
static const size_t <API key>;
// The maximum size of the control frames that we support.
// This limit is arbitrary. We can enforce it here or at the application
// layer. We chose the framing layer, but this can be changed (or removed)
// if necessary later down the line.
static const size_t <API key>;
SpdyState state_;
SpdyState previous_state_;
SpdyError error_code_;
// Note that for DATA frame, <API key> is sum of lengths of
// frame header, padding length field (optional), data payload (optional) and
// padding payload (optional).
size_t <API key>;
// The length (in bytes) of the padding payload to be processed.
size_t <API key>;
// The number of bytes remaining to read from the current control frame's
// headers. Note that header data blocks (for control types that have them)
// are part of the frame's payload, and not the frame's headers.
size_t <API key>;
CharBuffer <API key>;
// The type of the frame currently being read.
SpdyFrameType current_frame_type_;
// The total length of the frame currently being read, including frame header.
uint32 <API key>;
// The stream ID field of the frame currently being read, if applicable.
SpdyStreamId <API key>;
// Set this to the current stream when we receive a HEADERS, PUSH_PROMISE, or
// CONTINUATION frame without the END_HEADERS(0x4) bit set. These frames must
// be followed by a CONTINUATION frame, or else we throw a PROTOCOL_ERROR.
// A value of 0 indicates that we are not expecting a CONTINUATION frame.
SpdyStreamId <API key>;
// Scratch space for handling SETTINGS frames.
// TODO(hkhalil): Unify memory for this scratch space with
// <API key>.
SpdySettingsScratch settings_scratch_;
scoped_ptr<CharBuffer> altsvc_scratch_;
// SPDY header compressors.
scoped_ptr<z_stream> header_compressor_;
scoped_ptr<z_stream> <API key>;
scoped_ptr<HpackEncoder> hpack_encoder_;
scoped_ptr<HpackDecoder> hpack_decoder_;
<API key>* visitor_;
<API key>* debug_visitor_;
std::string display_protocol_;
// The protocol version to be spoken/understood by this framer.
const SpdyMajorVersion protocol_version_;
// The flags field of the frame currently being read.
uint8 <API key>;
// Determines whether HPACK or gzip compression is used.
bool enable_compression_;
// Tracks if we've ever gotten far enough in framing to see a control frame of
// type SYN_STREAM or SYN_REPLY.
// If we ever get something which looks like a data frame before we've had a
// SYN, we explicitly check to see if it looks like we got an HTTP response
// to a SPDY request. This boolean lets us do that.
bool <API key>;
// If we ever get a data frame before a SYN frame, we check to see if it
// starts with HTTP. If it does, we likely have an HTTP response. This
// isn't guaranteed though: we could have gotten a settings frame and then
// corrupt data that just looks like HTTP, but deterministic checking requires
// a lot more state.
bool <API key>;
// If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM
// flag is still carried in the HEADERS frame. If it's set, flip this so that
// we know to terminate the stream when the entire header block has been
// processed.
bool <API key>;
// If true, then ProcessInput returns after processing a full frame,
// rather than reading all available input.
bool <API key> = false;
// Last acknowledged value for <API key>.
size_t <API key>;
};
} // namespace net
#endif // <API key>
|
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.utils.decorators import method_decorator
from django.views import generic
from regressiontests.generic_views.models import Artist, Author, Book, Page
from regressiontests.generic_views.forms import AuthorForm
class CustomTemplateView(generic.TemplateView):
template_name = 'generic_views/about.html'
def get_context_data(self, **kwargs):
return {
'params': kwargs,
'key': 'value'
}
class ObjectDetail(generic.DetailView):
template_name = 'generic_views/detail.html'
def get_object(self):
return {'foo': 'bar'}
class ArtistDetail(generic.DetailView):
queryset = Artist.objects.all()
class AuthorDetail(generic.DetailView):
queryset = Author.objects.all()
class PageDetail(generic.DetailView):
queryset = Page.objects.all()
template_name_field = 'template'
class DictList(generic.ListView):
"""A ListView that doesn't use a model."""
queryset = [
{'first': 'John', 'last': 'Lennon'},
{'last': 'Yoko', 'last': 'Ono'}
]
template_name = 'generic_views/list.html'
class AuthorList(generic.ListView):
queryset = Author.objects.all()
class ArtistCreate(generic.CreateView):
model = Artist
class NaiveAuthorCreate(generic.CreateView):
queryset = Author.objects.all()
class AuthorCreate(generic.CreateView):
model = Author
success_url = '/list/authors/'
class <API key>(generic.CreateView):
model = Author
form_class = AuthorForm
template_name = 'generic_views/form.html'
context_object_name = 'thingy'
def get_success_url(self):
return reverse('author_detail', args=[self.object.id,])
class <API key>(AuthorCreate):
post = method_decorator(login_required)(AuthorCreate.post)
class ArtistUpdate(generic.UpdateView):
model = Artist
class NaiveAuthorUpdate(generic.UpdateView):
queryset = Author.objects.all()
class AuthorUpdate(generic.UpdateView):
model = Author
success_url = '/list/authors/'
class <API key>(generic.UpdateView):
model = Author
form_class = AuthorForm
template_name = 'generic_views/form.html'
context_object_name = 'thingy'
def get_success_url(self):
return reverse('author_detail', args=[self.object.id,])
class NaiveAuthorDelete(generic.DeleteView):
queryset = Author.objects.all()
class AuthorDelete(generic.DeleteView):
model = Author
success_url = '/list/authors/'
class <API key>(generic.DeleteView):
queryset = Author.objects.all()
template_name = 'generic_views/confirm_delete.html'
context_object_name = 'thingy'
def get_success_url(self):
return reverse('authors_list')
class BookConfig(object):
queryset = Book.objects.all()
date_field = 'pubdate'
class BookArchive(BookConfig, generic.ArchiveIndexView):
pass
class BookYearArchive(BookConfig, generic.YearArchiveView):
pass
class BookMonthArchive(BookConfig, generic.MonthArchiveView):
pass
class BookWeekArchive(BookConfig, generic.WeekArchiveView):
pass
class BookDayArchive(BookConfig, generic.DayArchiveView):
pass
class BookTodayArchive(BookConfig, generic.TodayArchiveView):
pass
class BookDetail(BookConfig, generic.DateDetailView):
pass
|
#include <utility>
#include "base/bind.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "remoting/base/constants.h"
#include "remoting/protocol/fake_session.h"
#include "remoting/protocol/fake_video_renderer.h"
#include "remoting/protocol/<API key>.h"
#include "remoting/protocol/<API key>.h"
#include "remoting/protocol/<API key>.h"
#include "remoting/protocol/transport_context.h"
#include "remoting/protocol/video_stream.h"
#include "remoting/protocol/<API key>.h"
#include "remoting/protocol/<API key>.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_capturer.h"
#include "third_party/webrtc/modules/desktop_capture/desktop_frame.h"
using ::testing::_;
using ::testing::InvokeWithoutArgs;
using ::testing::NotNull;
using ::testing::StrictMock;
namespace remoting {
namespace protocol {
namespace {
MATCHER_P(<API key>, message, "") {
return arg.capabilities() == message.capabilities();
}
MATCHER_P(EqualsKeyEvent, event, "") {
return arg.usb_keycode() == event.usb_keycode() &&
arg.pressed() == event.pressed();
}
ACTION_P(QuitRunLoop, run_loop) {
run_loop->Quit();
}
class <API key>
: public ConnectionToHost::HostEventCallback {
public:
<API key>() {}
~<API key>() override {}
MOCK_METHOD2(OnConnectionState,
void(ConnectionToHost::State state, ErrorCode error));
MOCK_METHOD1(OnConnectionReady, void(bool ready));
MOCK_METHOD2(OnRouteChanged,
void(const std::string& channel_name,
const TransportRoute& route));
};
class TestScreenCapturer : public webrtc::DesktopCapturer {
public:
TestScreenCapturer() {}
~TestScreenCapturer() override {}
// webrtc::DesktopCapturer interface.
void Start(Callback* callback) override {
callback_ = callback;
}
void Capture(const webrtc::DesktopRegion& region) override {
// Return black 10x10 frame.
std::unique_ptr<webrtc::DesktopFrame> frame(
new webrtc::BasicDesktopFrame(webrtc::DesktopSize(100, 100)));
memset(frame->data(), 0, frame->stride() * frame->size().height());
frame-><API key>()->SetRect(
webrtc::DesktopRect::MakeSize(frame->size()));
callback_->OnCaptureCompleted(frame.release());
}
private:
Callback* callback_ = nullptr;
};
} // namespace
class ConnectionTest : public testing::Test,
public testing::WithParamInterface<bool> {
public:
ConnectionTest() {}
protected:
bool is_using_webrtc() { return GetParam(); }
void SetUp() override {
// Create fake sessions.
host_session_ = new FakeSession();
<API key>.reset(new FakeSession());
client_session_ = <API key>.get();
// Create Connection objects.
if (is_using_webrtc()) {
host_connection_.reset(new <API key>(
base::WrapUnique(host_session_),
TransportContext::ForTests(protocol::TransportRole::SERVER),
message_loop_.task_runner()));
client_connection_.reset(new <API key>());
} else {
host_connection_.reset(new <API key>(
base::WrapUnique(host_session_),
TransportContext::ForTests(protocol::TransportRole::SERVER),
message_loop_.task_runner()));
client_connection_.reset(new IceConnectionToHost());
}
// Setup host side.
host_connection_->SetEventHandler(&host_event_handler_);
host_connection_->set_clipboard_stub(&<API key>);
host_connection_->set_host_stub(&host_stub_);
host_connection_->set_input_stub(&host_input_stub_);
// Setup client side.
client_connection_->set_client_stub(&client_stub_);
client_connection_->set_clipboard_stub(&<API key>);
client_connection_->set_video_renderer(&<API key>);
}
void Connect() {
{
testing::InSequence sequence;
EXPECT_CALL(host_event_handler_,
<API key>(host_connection_.get()));
EXPECT_CALL(host_event_handler_,
<API key>(host_connection_.get()));
}
EXPECT_CALL(host_event_handler_,
<API key>(host_connection_.get()))
.WillOnce(
InvokeWithoutArgs(this, &ConnectionTest::OnHostConnected));
EXPECT_CALL(host_event_handler_, OnRouteChange(_, _, _))
.Times(testing::AnyNumber());
{
testing::InSequence sequence;
EXPECT_CALL(<API key>,
OnConnectionState(ConnectionToHost::CONNECTING, OK));
EXPECT_CALL(<API key>,
OnConnectionState(ConnectionToHost::AUTHENTICATED, OK));
EXPECT_CALL(<API key>,
OnConnectionState(ConnectionToHost::CONNECTED, OK))
.WillOnce(InvokeWithoutArgs(
this, &ConnectionTest::OnClientConnected));
}
EXPECT_CALL(<API key>, OnRouteChanged(_, _))
.Times(testing::AnyNumber());
client_connection_->Connect(
std::move(<API key>),
TransportContext::ForTests(protocol::TransportRole::CLIENT),
&<API key>);
client_session_->SimulateConnection(host_session_);
run_loop_.reset(new base::RunLoop());
run_loop_->Run();
EXPECT_TRUE(client_connected_);
EXPECT_TRUE(host_connected_);
}
void TearDown() override {
client_connection_.reset();
host_connection_.reset();
base::RunLoop().RunUntilIdle();
}
void OnHostConnected() {
host_connected_ = true;
if (client_connected_ && run_loop_)
run_loop_->Quit();
}
void OnClientConnected() {
client_connected_ = true;
if (host_connected_ && run_loop_)
run_loop_->Quit();
}
base::MessageLoopForIO message_loop_;
std::unique_ptr<base::RunLoop> run_loop_;
<API key> host_event_handler_;
MockClipboardStub <API key>;
MockHostStub host_stub_;
MockInputStub host_input_stub_;
std::unique_ptr<ConnectionToClient> host_connection_;
FakeSession* host_session_; // Owned by |host_connection_|.
bool host_connected_ = false;
<API key> <API key>;
MockClientStub client_stub_;
MockClipboardStub <API key>;
FakeVideoRenderer <API key>;
std::unique_ptr<ConnectionToHost> client_connection_;
FakeSession* client_session_; // Owned by |client_connection_|.
std::unique_ptr<FakeSession> <API key>;
bool client_connected_ = false;
private:
<API key>(ConnectionTest);
};
<API key>(Ice, ConnectionTest, ::testing::Values(false));
<API key>(Webrtc, ConnectionTest, ::testing::Values(true));
TEST_P(ConnectionTest, RejectConnection) {
EXPECT_CALL(<API key>,
OnConnectionState(ConnectionToHost::CONNECTING, OK));
EXPECT_CALL(<API key>,
OnConnectionState(ConnectionToHost::CLOSED, OK));
client_connection_->Connect(
std::move(<API key>),
TransportContext::ForTests(protocol::TransportRole::CLIENT),
&<API key>);
client_session_->event_handler()-><API key>(Session::CLOSED);
}
TEST_P(ConnectionTest, Disconnect) {
Connect();
EXPECT_CALL(<API key>,
OnConnectionState(ConnectionToHost::CLOSED, OK));
EXPECT_CALL(host_event_handler_,
OnConnectionClosed(host_connection_.get(), OK));
client_session_->Close(OK);
base::RunLoop().RunUntilIdle();
}
TEST_P(ConnectionTest, Control) {
Connect();
Capabilities capabilities_msg;
capabilities_msg.set_capabilities("test_capability");
base::RunLoop run_loop;
EXPECT_CALL(client_stub_,
SetCapabilities(<API key>(capabilities_msg)))
.WillOnce(QuitRunLoop(&run_loop));
// Send capabilities from the host.
host_connection_->client_stub()->SetCapabilities(capabilities_msg);
run_loop.Run();
}
TEST_P(ConnectionTest, Events) {
Connect();
KeyEvent event;
event.set_usb_keycode(3);
event.set_pressed(true);
base::RunLoop run_loop;
EXPECT_CALL(host_event_handler_,
<API key>(host_connection_.get(), _));
EXPECT_CALL(host_input_stub_, InjectKeyEvent(EqualsKeyEvent(event)))
.WillOnce(QuitRunLoop(&run_loop));
// Send capabilities from the client.
client_connection_->input_stub()->InjectKeyEvent(event);
run_loop.Run();
}
TEST_P(ConnectionTest, Video) {
Connect();
std::unique_ptr<VideoStream> video_stream =
host_connection_->StartVideoStream(
base::WrapUnique(new TestScreenCapturer()));
base::RunLoop run_loop;
// Expect frames to be passed to FrameConsumer when WebRTC is used, or to
// VideoStub otherwise.
if (is_using_webrtc()) {
<API key>.GetFrameConsumer()-><API key>(
base::Bind(&base::RunLoop::Quit, base::Unretained(&run_loop)));
} else {
<API key>.GetVideoStub()-><API key>(
base::Bind(&base::RunLoop::Quit, base::Unretained(&run_loop)));
}
run_loop.Run();
if (is_using_webrtc()) {
EXPECT_EQ(
<API key>.GetFrameConsumer()->received_frames().size(),
1U);
EXPECT_EQ(<API key>.GetVideoStub()->received_packets().size(),
0U);
} else {
EXPECT_EQ(
<API key>.GetFrameConsumer()->received_frames().size(),
0U);
EXPECT_EQ(<API key>.GetVideoStub()->received_packets().size(),
1U);
}
}
} // namespace protocol
} // namespace remoting
|
<html>
<head>
<script src="../../../http/tests/inspector/inspector-test.js"></script>
<script src="../../../http/tests/inspector/debugger-test.js"></script>
<script>
var a = 1;
function testFunction()
{
var a = 2;
debugger;
}
var test = function()
{
InspectorTest.startDebuggerTest(step1);
function step1()
{
InspectorTest.<API key>(step2);
}
function step2()
{
InspectorTest.evaluateInConsole("a", step3);
}
function step3(result)
{
InspectorTest.addResult("Evaluated in console in the top frame context: a = " + result);
InspectorTest.<API key>();
}
}
</script>
</head>
<body onload="runTest()">
<p>
Test that evaluation in the context of top frame will see values
of its local variables, even if there are global variables with
same names. On success the test will print a = 2(value of the
local variable a). <a href="https://bugs.webkit.org/show_bug.cgi?id=47358">Bug 47358.</a>
</p>
</body>
</html>
|
"""A connection adapter that tries to use the best polling method for the
platform pika is running on.
"""
import os
import logging
import socket
import select
import errno
import time
from operator import itemgetter
from collections import defaultdict
import threading
import pika.compat
from pika.compat import dictkeys
from pika.adapters.base_connection import BaseConnection
LOGGER = logging.getLogger(__name__)
# One of select, epoll, kqueue or poll
SELECT_TYPE = None
# Use epoll's constants to keep life easy
READ = 0x0001
WRITE = 0x0004
ERROR = 0x0008
if pika.compat.PY2:
_SELECT_ERROR = select.error
else:
# select.error was deprecated and replaced by OSError in python 3.3
_SELECT_ERROR = OSError
def _get_select_errno(error):
if pika.compat.PY2:
assert isinstance(error, select.error), repr(error)
return error.args[0]
else:
assert isinstance(error, OSError), repr(error)
return error.errno
class SelectConnection(BaseConnection):
"""An asynchronous connection adapter that attempts to use the fastest
event loop adapter for the given platform.
"""
def __init__(self,
parameters=None,
on_open_callback=None,
<API key>=None,
on_close_callback=None,
<API key>=True,
custom_ioloop=None):
"""Create a new instance of the Connection object.
:param pika.connection.Parameters parameters: Connection parameters
:param method on_open_callback: Method to call on connection open
:param <API key>: Method to call if the connection cant
be opened
:type <API key>: method
:param method on_close_callback: Method to call on connection close
:param bool <API key>: Call ioloop.stop() if disconnected
:param custom_ioloop: Override using the global IOLoop in Tornado
:raises: RuntimeError
"""
ioloop = custom_ioloop or IOLoop()
super(SelectConnection, self).__init__(parameters, on_open_callback,
<API key>,
on_close_callback, ioloop,
<API key>)
def _adapter_connect(self):
"""Connect to the RabbitMQ broker, returning True on success, False
on failure.
:rtype: bool
"""
error = super(SelectConnection, self)._adapter_connect()
if not error:
self.ioloop.add_handler(self.socket.fileno(), self._handle_events,
self.event_state)
return error
def _adapter_disconnect(self):
"""Disconnect from the RabbitMQ broker"""
if self.socket:
self.ioloop.remove_handler(self.socket.fileno())
super(SelectConnection, self)._adapter_disconnect()
class IOLoop(object):
"""Singlton wrapper that decides which type of poller to use, creates an
instance of it in start_poller and keeps the invoking application in a
blocking state by calling the pollers start method. Poller should keep
looping until IOLoop.instance().stop() is called or there is a socket
error.
Passes through all operations to the loaded poller object.
"""
def __init__(self):
self._poller = self._get_poller()
def __getattr__(self, attr):
return getattr(self._poller, attr)
def _get_poller(self):
"""Determine the best poller to use for this enviroment."""
poller = None
if hasattr(select, 'epoll'):
if not SELECT_TYPE or SELECT_TYPE == 'epoll':
LOGGER.debug('Using EPollPoller')
poller = EPollPoller()
if not poller and hasattr(select, 'kqueue'):
if not SELECT_TYPE or SELECT_TYPE == 'kqueue':
LOGGER.debug('Using KQueuePoller')
poller = KQueuePoller()
if (not poller and hasattr(select, 'poll') and
hasattr(select.poll(), 'modify')): # pylint: disable=E1101
if not SELECT_TYPE or SELECT_TYPE == 'poll':
LOGGER.debug('Using PollPoller')
poller = PollPoller()
if not poller:
LOGGER.debug('Using SelectPoller')
poller = SelectPoller()
return poller
class SelectPoller(object):
"""Default behavior is to use Select since it's the widest supported and has
all of the methods we need for child classes as well. One should only need
to override the update_handler and start methods for additional types.
"""
# Drop out of the poll loop every POLL_TIMEOUT secs as a worst case, this
# is only a backstop value. We will run timeouts when they are scheduled.
POLL_TIMEOUT = 5
# if the poller uses MS specify 1000
POLL_TIMEOUT_MULT = 1
def __init__(self):
"""Create an instance of the SelectPoller
"""
# fd-to-handler function mappings
self._fd_handlers = dict()
# event-to-fdset mappings
self._fd_events = {READ: set(), WRITE: set(), ERROR: set()}
self._stopping = False
self._timeouts = {}
self._next_timeout = None
self.<API key> = {}
# Mutex for controlling critical sections where ioloop-interrupt sockets
# are created, used, and destroyed. Needed in case `stop()` is called
# from a thread.
self._mutex = threading.Lock()
# ioloop-interrupt socket pair; initialized in start()
self._r_interrupt = None
self._w_interrupt = None
def get_interrupt_pair(self):
""" Use a socketpair to be able to interrupt the ioloop if called
from another thread. Socketpair() is not supported on some OS (Win)
so use a pair of simple UDP sockets instead. The sockets will be
closed and garbage collected by python when the ioloop itself is.
"""
try:
read_sock, write_sock = socket.socketpair()
except AttributeError:
LOGGER.debug("Using custom socketpair for interrupt")
read_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
read_sock.bind(('localhost', 0))
write_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
write_sock.connect(read_sock.getsockname())
read_sock.setblocking(0)
write_sock.setblocking(0)
return read_sock, write_sock
def read_interrupt(self, interrupt_sock,
events, write_only): # pylint: disable=W0613
""" Read the interrupt byte(s). We ignore the event mask and write_only
flag as we can ony get here if there's data to be read on our fd.
:param int interrupt_sock: The file descriptor to read from
:param int events: (unused) The events generated for this fd
:param bool write_only: (unused) True if poll was called to trigger a
write
"""
try:
os.read(interrupt_sock, 512)
except OSError as err:
if err.errno != errno.EAGAIN:
raise
def add_timeout(self, deadline, callback_method):
"""Add the callback_method to the IOLoop timer to fire after deadline
seconds. Returns a handle to the timeout. Do not confuse with
Tornado's timeout where you pass in the time you want to have your
callback called. Only pass in the seconds until it's to be called.
:param int deadline: The number of seconds to wait to call callback
:param method callback_method: The callback method
:rtype: str
"""
timeout_at = time.time() + deadline
value = {'deadline': timeout_at, 'callback': callback_method}
timeout_id = hash(frozenset(value.items()))
self._timeouts[timeout_id] = value
if not self._next_timeout or timeout_at < self._next_timeout:
self._next_timeout = timeout_at
return timeout_id
def remove_timeout(self, timeout_id):
"""Remove a timeout if it's still in the timeout stack
:param str timeout_id: The timeout id to remove
"""
try:
timeout = self._timeouts.pop(timeout_id)
if timeout['deadline'] == self._next_timeout:
self._next_timeout = None
except KeyError:
pass
def get_next_deadline(self):
"""Get the interval to the next timeout event, or a default interval
"""
if self._next_timeout:
timeout = max((self._next_timeout - time.time(), 0))
elif self._timeouts:
deadlines = [t['deadline'] for t in self._timeouts.values()]
self._next_timeout = min(deadlines)
timeout = max((self._next_timeout - time.time(), 0))
else:
timeout = SelectPoller.POLL_TIMEOUT
timeout = min((timeout, SelectPoller.POLL_TIMEOUT))
return timeout * SelectPoller.POLL_TIMEOUT_MULT
def process_timeouts(self):
"""Process the self._timeouts event stack"""
now = time.time()
to_run = [timer for timer in self._timeouts.values()
if timer['deadline'] <= now]
# Run the timeouts in order of deadlines. Although this shouldn't
# be strictly necessary it preserves old behaviour when timeouts
# were only run periodically.
for t in sorted(to_run, key=itemgetter('deadline')):
t['callback']()
del self._timeouts[hash(frozenset(t.items()))]
self._next_timeout = None
def add_handler(self, fileno, handler, events):
"""Add a new fileno to the set to be monitored
:param int fileno: The file descriptor
:param method handler: What is called when an event happens
:param int events: The event mask
"""
self._fd_handlers[fileno] = handler
self.update_handler(fileno, events)
def update_handler(self, fileno, events):
"""Set the events to the current events
:param int fileno: The file descriptor
:param int events: The event mask
"""
for ev in (READ, WRITE, ERROR):
if events & ev:
self._fd_events[ev].add(fileno)
else:
self._fd_events[ev].discard(fileno)
def remove_handler(self, fileno):
"""Remove a file descriptor from the set
:param int fileno: The file descriptor
"""
try:
del self.<API key>[fileno]
except KeyError:
pass
self.update_handler(fileno, 0)
del self._fd_handlers[fileno]
def start(self):
"""Start the main poller loop. It will loop here until self._stopping"""
LOGGER.debug('Starting IOLoop')
self._stopping = False
with self._mutex:
# Watch out for reentry
if self._r_interrupt is None:
# Create ioloop-interrupt socket pair and register read handler.
# NOTE: we defer their creation because some users (e.g.,
# BlockingConnection adapter) don't use the event loop and these
# sockets would get reported as leaks
self._r_interrupt, self._w_interrupt = self.get_interrupt_pair()
self.add_handler(self._r_interrupt.fileno(),
self.read_interrupt,
READ)
<API key> = True
else:
<API key> = False
try:
# Run event loop
while not self._stopping:
self.poll()
self.process_timeouts()
finally:
# Unregister and close ioloop-interrupt socket pair
if <API key>:
with self._mutex:
self.remove_handler(self._r_interrupt.fileno())
self._r_interrupt.close()
self._r_interrupt = None
self._w_interrupt.close()
self._w_interrupt = None
def stop(self):
"""Request exit from the ioloop."""
LOGGER.debug('Stopping IOLoop')
self._stopping = True
with self._mutex:
if self._w_interrupt is None:
return
try:
# Send byte to interrupt the poll loop, use write() for
# consitency.
os.write(self._w_interrupt.fileno(), b'X')
except OSError as err:
if err.errno != errno.EWOULDBLOCK:
raise
except Exception as err:
# There's nothing sensible to do here, we'll exit the interrupt
# loop after POLL_TIMEOUT secs in worst case anyway.
LOGGER.warning("Failed to send ioloop interrupt: %s", err)
raise
def poll(self, write_only=False):
"""Wait for events on interested filedescriptors.
:param bool write_only: Passed through to the hadnlers to indicate
that they should only process write events.
"""
while True:
try:
read, write, error = select.select(self._fd_events[READ],
self._fd_events[WRITE],
self._fd_events[ERROR],
self.get_next_deadline())
break
except _SELECT_ERROR as error:
if _get_select_errno(error) == errno.EINTR:
continue
else:
raise
# Build an event bit mask for each fileno we've recieved an event for
fd_event_map = defaultdict(int)
for fd_set, ev in zip((read, write, error), (READ, WRITE, ERROR)):
for fileno in fd_set:
fd_event_map[fileno] |= ev
self._process_fd_events(fd_event_map, write_only)
def _process_fd_events(self, fd_event_map, write_only):
""" Processes the callbacks for each fileno we've recieved events.
Before doing so we re-calculate the event mask based on what is
currently set in case it has been changed under our feet by a
previous callback. We also take a store a refernce to the
fd_event_map in the class so that we can detect removal of an
fileno during processing of another callback and not generate
spurious callbacks on it.
:param dict fd_event_map: Map of fds to events recieved on them.
"""
self.<API key> = fd_event_map
for fileno in dictkeys(fd_event_map):
if fileno not in fd_event_map:
# the fileno has been removed from the map under our feet.
continue
events = fd_event_map[fileno]
for ev in [READ, WRITE, ERROR]:
if fileno not in self._fd_events[ev]:
events &= ~ev
if events:
handler = self._fd_handlers[fileno]
handler(fileno, events, write_only=write_only)
class KQueuePoller(SelectPoller):
"""KQueuePoller works on BSD based systems and is faster than select"""
def __init__(self):
"""Create an instance of the KQueuePoller
:param int fileno: The file descriptor to check events for
:param method handler: What is called when an event happens
:param int events: The events to look for
"""
self._kqueue = select.kqueue()
super(KQueuePoller, self).__init__()
def update_handler(self, fileno, events):
"""Set the events to the current events
:param int fileno: The file descriptor
:param int events: The event mask
"""
kevents = list()
if not events & READ:
if fileno in self._fd_events[READ]:
kevents.append(select.kevent(fileno,
filter=select.KQ_FILTER_READ,
flags=select.KQ_EV_DELETE))
else:
if fileno not in self._fd_events[READ]:
kevents.append(select.kevent(fileno,
filter=select.KQ_FILTER_READ,
flags=select.KQ_EV_ADD))
if not events & WRITE:
if fileno in self._fd_events[WRITE]:
kevents.append(select.kevent(fileno,
filter=select.KQ_FILTER_WRITE,
flags=select.KQ_EV_DELETE))
else:
if fileno not in self._fd_events[WRITE]:
kevents.append(select.kevent(fileno,
filter=select.KQ_FILTER_WRITE,
flags=select.KQ_EV_ADD))
for event in kevents:
self._kqueue.control([event], 0)
super(KQueuePoller, self).update_handler(fileno, events)
def _map_event(self, kevent):
"""return the event type associated with a kevent object
:param kevent kevent: a kevent object as returned by kqueue.control()
"""
if kevent.filter == select.KQ_FILTER_READ:
return READ
elif kevent.filter == select.KQ_FILTER_WRITE:
return WRITE
elif kevent.flags & select.KQ_EV_ERROR:
return ERROR
def poll(self, write_only=False):
"""Check to see if the events that are cared about have fired.
:param bool write_only: Don't look at self.events, just look to see if
the adapter can write.
"""
while True:
try:
kevents = self._kqueue.control(None, 1000,
self.get_next_deadline())
break
except _SELECT_ERROR as error:
if _get_select_errno(error) == errno.EINTR:
continue
else:
raise
fd_event_map = defaultdict(int)
for event in kevents:
fileno = event.ident
fd_event_map[fileno] |= self._map_event(event)
self._process_fd_events(fd_event_map, write_only)
class PollPoller(SelectPoller):
"""Poll works on Linux and can have better performance than EPoll in
certain scenarios. Both are faster than select.
"""
POLL_TIMEOUT_MULT = 1000
def __init__(self):
"""Create an instance of the KQueuePoller
:param int fileno: The file descriptor to check events for
:param method handler: What is called when an event happens
:param int events: The events to look for
"""
self._poll = self.create_poller()
super(PollPoller, self).__init__()
def create_poller(self):
return select.poll() # pylint: disable=E1101
def add_handler(self, fileno, handler, events):
"""Add a file descriptor to the poll set
:param int fileno: The file descriptor to check events for
:param method handler: What is called when an event happens
:param int events: The events to look for
"""
self._poll.register(fileno, events)
super(PollPoller, self).add_handler(fileno, handler, events)
def update_handler(self, fileno, events):
"""Set the events to the current events
:param int fileno: The file descriptor
:param int events: The event mask
"""
super(PollPoller, self).update_handler(fileno, events)
self._poll.modify(fileno, events)
def remove_handler(self, fileno):
"""Remove a fileno to the set
:param int fileno: The file descriptor
"""
super(PollPoller, self).remove_handler(fileno)
self._poll.unregister(fileno)
def poll(self, write_only=False):
"""Poll until the next timeout waiting for an event
:param bool write_only: Only process write events
"""
while True:
try:
events = self._poll.poll(self.get_next_deadline())
break
except _SELECT_ERROR as error:
if _get_select_errno(error) == errno.EINTR:
continue
else:
raise
fd_event_map = defaultdict(int)
for fileno, event in events:
fd_event_map[fileno] |= event
self._process_fd_events(fd_event_map, write_only)
class EPollPoller(PollPoller):
"""EPoll works on Linux and can have better performance than Poll in
certain scenarios. Both are faster than select.
"""
POLL_TIMEOUT_MULT = 1
def create_poller(self):
return select.epoll() # pylint: disable=E1101
|
#include <map>
#include <memory>
#include "webrtc/sdk/android/src/jni/<API key>.h"
#include "webrtc/sdk/android/src/jni/jni_helpers.h"
#include "webrtc/system_wrappers/include/metrics.h"
#include "webrtc/system_wrappers/include/metrics_default.h"
// Enables collection of native histograms and creating them.
namespace webrtc_jni {
JOW(void, <API key>)(JNIEnv* jni, jclass) {
webrtc::metrics::Enable();
}
// Gets and clears native histograms.
JOW(jobject, <API key>)(JNIEnv* jni, jclass) {
jclass j_metrics_class = jni->FindClass("org/webrtc/Metrics");
jmethodID j_add =
GetMethodID(jni, j_metrics_class, "add",
"(Ljava/lang/String;Lorg/webrtc/Metrics$HistogramInfo;)V");
jclass j_info_class = jni->FindClass("org/webrtc/Metrics$HistogramInfo");
jmethodID j_add_sample = GetMethodID(jni, j_info_class, "addSample", "(II)V");
// Create |Metrics|.
jobject j_metrics = jni->NewObject(
j_metrics_class, GetMethodID(jni, j_metrics_class, "<init>", "()V"));
std::map<std::string, std::unique_ptr<webrtc::metrics::SampleInfo>>
histograms;
webrtc::metrics::GetAndReset(&histograms);
for (const auto& kv : histograms) {
// Create and add samples to |HistogramInfo|.
jobject j_info = jni->NewObject(
j_info_class, GetMethodID(jni, j_info_class, "<init>", "(III)V"),
kv.second->min, kv.second->max,
static_cast<int>(kv.second->bucket_count));
for (const auto& sample : kv.second->samples) {
jni->CallVoidMethod(j_info, j_add_sample, sample.first, sample.second);
}
// Add |HistogramInfo| to |Metrics|.
jstring j_name = jni->NewStringUTF(kv.first.c_str());
jni->CallVoidMethod(j_metrics, j_add, j_name, j_info);
jni->DeleteLocalRef(j_name);
jni->DeleteLocalRef(j_info);
}
CHECK_EXCEPTION(jni);
return j_metrics;
}
} // namespace webrtc_jni
|
{% extends 'djangopypi/base.html' %}
{% block title %}Manage {{ package.name }}{% endblock %}
{% block body %}
<h1>Manage {{ package.name }}</h1>
<div>
<form action="" method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="Submit">
</form>
</div>
{% endblock %}
|
// modification, are permitted provided that the following conditions are
// met:
// the distribution.
// * Neither the name of John Haddon nor the names of
// any other contributors to this software may be used to endorse or
// promote products derived from this software without specific prior
// IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// 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.
#ifndef <API key>
#define <API key>
#include "GafferScene/SceneProcessor.h"
#include <bitset>
namespace GafferScene
{
class GAFFERSCENE_API MergeScenes : public SceneProcessor
{
public :
MergeScenes( const std::string &name=defaultName<MergeScenes>() );
~MergeScenes() override;
<API key>( GafferScene::MergeScenes, MergeScenesTypeId, SceneProcessor );
enum class Mode
{
Keep,
Replace,
Merge
};
Gaffer::IntPlug *transformModePlug();
const Gaffer::IntPlug *transformModePlug() const;
Gaffer::IntPlug *attributesModePlug();
const Gaffer::IntPlug *attributesModePlug() const;
Gaffer::IntPlug *objectModePlug();
const Gaffer::IntPlug *objectModePlug() const;
Gaffer::IntPlug *globalsModePlug();
const Gaffer::IntPlug *globalsModePlug() const;
Gaffer::BoolPlug *adjustBoundsPlug();
const Gaffer::BoolPlug *adjustBoundsPlug() const;
void affects( const Gaffer::Plug *input, <API key> &outputs ) const override;
protected :
void hash( const Gaffer::ValuePlug *output, const Gaffer::Context *context, IECore::MurmurHash &h ) const override;
void compute( Gaffer::ValuePlug *output, const Gaffer::Context *context ) const override;
void hashBound( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
Imath::Box3f computeBound( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const override;
void hashTransform( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
Imath::M44f computeTransform( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const override;
void hashAttributes( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
IECore::<API key> computeAttributes( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const override;
void hashObject( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
IECore::ConstObjectPtr computeObject( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const override;
void hashChildNames( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
IECore::<API key> computeChildNames( const ScenePath &path, const Gaffer::Context *context, const ScenePlug *parent ) const override;
void hashGlobals( const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
IECore::<API key> computeGlobals( const Gaffer::Context *context, const ScenePlug *parent ) const override;
void hashSetNames( const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
IECore::<API key> computeSetNames( const Gaffer::Context *context, const ScenePlug *parent ) const override;
void hashSet( const IECore::InternedString &setName, const Gaffer::Context *context, const ScenePlug *parent, IECore::MurmurHash &h ) const override;
IECore::<API key> computeSet( const IECore::InternedString &setName, const Gaffer::Context *context, const ScenePlug *parent ) const override;
private :
using InputMask = std::bitset<32>;
// Plugs used to track which inputs are valid
// at the current location. The value can be
// converted directly to an `InputMask` for use
// with `visit()`.
Gaffer::IntPlug *activeInputsPlug();
const Gaffer::IntPlug *activeInputsPlug() const;
Gaffer::AtomicBox3fPlug *<API key>();
const Gaffer::AtomicBox3fPlug *<API key>() const;
void hashActiveInputs( const Gaffer::Context *context, IECore::MurmurHash &h ) const;
int computeActiveInputs( const Gaffer::Context *context ) const;
void <API key>( const Gaffer::Context *context, IECore::MurmurHash &h ) const;
const Imath::Box3f <API key>( const Gaffer::Context *context ) const;
enum class InputType
{
Sole,
First,
Other
};
enum VisitOrder
{
Forwards,
Backwards,
FirstOnly,
LastOnly
};
VisitOrder visitOrder( Mode mode, VisitOrder replaceOrder = VisitOrder::LastOnly ) const;
InputMask connectedInputs() const;
// Calls `visitor( inputType, inputIndex, input )` for all inputs specified by `inputMask`.
// Visitor may return `true` to continue to subsequent inputs or `false` to stop iteration.
template<typename Visitor>
void visit( InputMask inputMask, Visitor &&visitor, VisitOrder order = VisitOrder::Forwards ) const;
static size_t g_firstPlugIndex;
};
IE_CORE_DECLAREPTR( MergeScenes )
} // namespace GafferScene
#endif // <API key>
|
#include "libtorrent/udp_socket.hpp"
#include "libtorrent/connection_queue.hpp"
#include "libtorrent/escape_string.hpp"
#include <stdlib.h>
#include <boost/bind.hpp>
#include <boost/array.hpp>
#if BOOST_VERSION < 103500
#include <asio/read.hpp>
#else
#include <boost/asio/read.hpp>
#endif
using namespace libtorrent;
udp_socket::udp_socket(asio::io_service& ios, udp_socket::callback_t const& c
, connection_queue& cc)
: m_callback(c)
, m_ipv4_sock(ios)
#if TORRENT_USE_IPV6
, m_ipv6_sock(ios)
#endif
, m_bind_port(0)
, m_v4_outstanding(0)
#if TORRENT_USE_IPV6
, m_v6_outstanding(0)
#endif
, m_socks5_sock(ios)
, m_connection_ticket(-1)
, m_cc(cc)
, m_resolver(ios)
, m_queue_packets(false)
, m_tunnel_packets(false)
, m_abort(false)
, m_outstanding_ops(0)
{
#ifdef TORRENT_DEBUG
m_magic = 0x1337;
m_started = false;
<API key> = -1;
#endif
}
udp_socket::~udp_socket()
{
#if TORRENT_USE_IPV6
TORRENT_ASSERT(m_v6_outstanding == 0);
#endif
TORRENT_ASSERT(m_v4_outstanding == 0);
TORRENT_ASSERT(m_magic == 0x1337);
TORRENT_ASSERT(!m_callback || !m_started);
#ifdef TORRENT_DEBUG
m_magic = 0;
#endif
TORRENT_ASSERT(m_outstanding_ops == 0);
}
#ifdef TORRENT_DEBUG
#define CHECK_MAGIC check_magic_ cm_(m_magic)
struct check_magic_
{
check_magic_(int& m_): m(m_) { TORRENT_ASSERT(m == 0x1337); }
~check_magic_() { TORRENT_ASSERT(m == 0x1337); }
int& m;
};
#else
#define CHECK_MAGIC do {} while (false)
#endif
bool udp_socket::<API key>(mutex_t::scoped_lock& l)
{
if (m_outstanding_ops + m_v4_outstanding + m_v6_outstanding == 0)
{
// "this" may be destructed in the callback
// that's why we need to unlock
callback_t tmp = m_callback;
m_callback.clear();
l.unlock();
return true;
}
return false;
}
void udp_socket::send(udp::endpoint const& ep, char const* p, int len, error_code& ec)
{
CHECK_MAGIC;
TORRENT_ASSERT(is_open());
// if the sockets are closed, the udp_socket is closing too
if (!is_open()) return;
if (m_tunnel_packets)
{
// send udp packets through SOCKS5 server
wrap(ep, p, len, ec);
return;
}
if (m_queue_packets)
{
m_queue.push_back(queued_packet());
queued_packet& qp = m_queue.back();
qp.ep = ep;
qp.buf.insert(qp.buf.begin(), p, p + len);
return;
}
#if TORRENT_USE_IPV6
if (ep.address().is_v4() && m_ipv4_sock.is_open())
#endif
m_ipv4_sock.send_to(asio::buffer(p, len), ep, 0, ec);
#if TORRENT_USE_IPV6
else
m_ipv6_sock.send_to(asio::buffer(p, len), ep, 0, ec);
#endif
}
void udp_socket::on_read(udp::socket* s, error_code const& e, std::size_t bytes_transferred)
{
TORRENT_ASSERT(m_magic == 0x1337);
mutex_t::scoped_lock l(m_mutex);
#if TORRENT_USE_IPV6
if (s == &m_ipv6_sock)
{
TORRENT_ASSERT(m_v6_outstanding > 0);
--m_v6_outstanding;
}
else
#endif
{
TORRENT_ASSERT(m_v4_outstanding > 0);
--m_v4_outstanding;
}
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (!m_callback) return;
if (e)
{
l.unlock();
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
#if TORRENT_USE_IPV6
if (s == &m_ipv4_sock)
#endif
m_callback(e, m_v4_ep, 0, 0);
#if TORRENT_USE_IPV6
else
m_callback(e, m_v6_ep, 0, 0);
#endif
#ifndef BOOST_NO_EXCEPTIONS
} catch(std::exception&) {}
#endif
l.lock();
// don't stop listening on recoverable errors
if (e != asio::error::host_unreachable
&& e != asio::error::fault
&& e != asio::error::connection_reset
&& e != asio::error::connection_refused
&& e != asio::error::connection_aborted
&& e != asio::error::operation_aborted
&& e != asio::error::message_size)
{
<API key>(l);
return;
}
if (m_abort) return;
#if TORRENT_USE_IPV6
if (s == &m_ipv4_sock && m_v4_outstanding == 0)
#endif
{
++m_v4_outstanding;
s->async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf))
, m_v4_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2));
}
#if TORRENT_USE_IPV6
else if (m_v6_outstanding == 0)
{
++m_v6_outstanding;
s->async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf))
, m_v6_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2));
}
#endif
#ifdef TORRENT_DEBUG
m_started = true;
#endif
return;
}
#if TORRENT_USE_IPV6
if (s == &m_ipv4_sock)
#endif
{
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
if (m_tunnel_packets)
{
l.unlock();
// if the source IP doesn't match the proxy's, ignore the packet
if (m_v4_ep == m_proxy_addr)
unwrap(e, m_v4_buf, bytes_transferred);
}
else
{
l.unlock();
m_callback(e, m_v4_ep, m_v4_buf, bytes_transferred);
}
l.lock();
#ifndef BOOST_NO_EXCEPTIONS
} catch(std::exception&) {}
#endif
if (m_abort) return;
if (m_v4_outstanding == 0)
{
++m_v4_outstanding;
s->async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf))
, m_v4_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2));
}
}
#if TORRENT_USE_IPV6
else
{
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
if (m_tunnel_packets)
{
l.unlock();
// if the source IP doesn't match the proxy's, ignore the packet
if (m_v6_ep == m_proxy_addr)
unwrap(e, m_v6_buf, bytes_transferred);
}
else
{
l.unlock();
m_callback(e, m_v6_ep, m_v6_buf, bytes_transferred);
}
#ifndef BOOST_NO_EXCEPTIONS
} catch(std::exception&) {}
#endif
l.lock();
if (m_abort) return;
if (m_v6_outstanding == 0)
{
++m_v6_outstanding;
s->async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf))
, m_v6_ep, boost::bind(&udp_socket::on_read, self(), s, _1, _2));
}
}
#endif // TORRENT_USE_IPV6
#ifdef TORRENT_DEBUG
m_started = true;
#endif
}
void udp_socket::wrap(udp::endpoint const& ep, char const* p, int len, error_code& ec)
{
CHECK_MAGIC;
using namespace libtorrent::detail;
char header[25];
char* h = header;
write_uint16(0, h); // reserved
write_uint8(0, h); // fragment
write_uint8(ep.address().is_v4()?1:4, h); // atyp
write_address(ep.address(), h);
write_uint16(ep.port(), h);
boost::array<asio::const_buffer, 2> iovec;
iovec[0] = asio::const_buffer(header, h - header);
iovec[1] = asio::const_buffer(p, len);
#if TORRENT_USE_IPV6
if (m_proxy_addr.address().is_v4() && m_ipv4_sock.is_open())
#endif
m_ipv4_sock.send_to(iovec, m_proxy_addr, 0, ec);
#if TORRENT_USE_IPV6
else
m_ipv6_sock.send_to(iovec, m_proxy_addr, 0, ec);
#endif
}
// unwrap the UDP packet from the SOCKS5 header
void udp_socket::unwrap(error_code const& e, char const* buf, int size)
{
CHECK_MAGIC;
using namespace libtorrent::detail;
// the minimum socks5 header size
if (size <= 10) return;
char const* p = buf;
p += 2; // reserved
int frag = read_uint8(p);
// fragmentation is not supported
if (frag != 0) return;
udp::endpoint sender;
int atyp = read_uint8(p);
if (atyp == 1)
{
// IPv4
sender = read_v4_endpoint<udp::endpoint>(p);
}
#if TORRENT_USE_IPV6
else if (atyp == 4)
{
// IPv6
sender = read_v6_endpoint<udp::endpoint>(p);
}
#endif
else
{
// domain name not supported
return;
}
m_callback(e, sender, p, size - (p - buf));
}
void udp_socket::close()
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_magic == 0x1337);
error_code ec;
m_ipv4_sock.close(ec);
#if TORRENT_USE_IPV6
m_ipv6_sock.close(ec);
#endif
m_socks5_sock.close(ec);
m_resolver.cancel();
m_abort = true;
#ifdef TORRENT_DEBUG
<API key> = m_v4_outstanding + m_v6_outstanding;
#endif
if (m_connection_ticket >= 0)
{
m_cc.done(m_connection_ticket);
m_connection_ticket = -1;
// we just called done, which means on_timeout
// won't be called. Decrement the outstanding
// ops counter for that
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
}
<API key>(l);
}
void udp_socket::bind(udp::endpoint const& ep, error_code& ec)
{
mutex_t::scoped_lock l(m_mutex);
CHECK_MAGIC;
TORRENT_ASSERT(m_abort == false);
if (m_abort) return;
if (m_ipv4_sock.is_open()) m_ipv4_sock.close(ec);
#if TORRENT_USE_IPV6
if (m_ipv6_sock.is_open()) m_ipv6_sock.close(ec);
#endif
if (ep.address().is_v4())
{
m_ipv4_sock.open(udp::v4(), ec);
if (ec) return;
m_ipv4_sock.bind(ep, ec);
if (ec) return;
if (m_v4_outstanding == 0)
{
++m_v4_outstanding;
m_ipv4_sock.async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf))
, m_v4_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv4_sock, _1, _2));
}
}
#if TORRENT_USE_IPV6
else
{
m_ipv6_sock.set_option(v6only(true), ec);
if (ec) return;
m_ipv6_sock.bind(ep, ec);
if (ec) return;
if (m_v6_outstanding == 0)
{
++m_v6_outstanding;
m_ipv6_sock.async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf))
, m_v6_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv6_sock, _1, _2));
}
}
#endif
#ifdef TORRENT_DEBUG
m_started = true;
#endif
m_bind_port = ep.port();
}
void udp_socket::bind(int port)
{
mutex_t::scoped_lock l(m_mutex);
CHECK_MAGIC;
TORRENT_ASSERT(m_abort == false);
if (m_abort) return;
error_code ec;
if (m_ipv4_sock.is_open()) m_ipv4_sock.close(ec);
#if TORRENT_USE_IPV6
if (m_ipv6_sock.is_open()) m_ipv6_sock.close(ec);
#endif
m_ipv4_sock.open(udp::v4(), ec);
if (!ec)
{
m_ipv4_sock.bind(udp::endpoint(address_v4::any(), port), ec);
if (m_v4_outstanding == 0)
{
++m_v4_outstanding;
m_ipv4_sock.async_receive_from(asio::buffer(m_v4_buf, sizeof(m_v4_buf))
, m_v4_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv4_sock, _1, _2));
}
}
#if TORRENT_USE_IPV6
m_ipv6_sock.open(udp::v6(), ec);
if (!ec)
{
m_ipv6_sock.set_option(v6only(true), ec);
m_ipv6_sock.bind(udp::endpoint(address_v6::any(), port), ec);
if (m_v6_outstanding == 0)
{
++m_v6_outstanding;
m_ipv6_sock.async_receive_from(asio::buffer(m_v6_buf, sizeof(m_v6_buf))
, m_v6_ep, boost::bind(&udp_socket::on_read, self(), &m_ipv6_sock, _1, _2));
}
}
#endif // TORRENT_USE_IPV6
#ifdef TORRENT_DEBUG
m_started = true;
#endif
m_bind_port = port;
}
void udp_socket::set_proxy_settings(proxy_settings const& ps)
{
mutex_t::scoped_lock l(m_mutex);
CHECK_MAGIC;
error_code ec;
m_socks5_sock.close(ec);
m_tunnel_packets = false;
m_proxy_settings = ps;
if (ps.type == proxy_settings::socks5
|| ps.type == proxy_settings::socks5_pw)
{
m_queue_packets = true;
// connect to socks5 server and open up the UDP tunnel
tcp::resolver::query q(ps.hostname, to_string(ps.port).elems);
++m_outstanding_ops;
m_resolver.async_resolve(q, boost::bind(
&udp_socket::on_name_lookup, self(), _1, _2));
}
}
void udp_socket::on_name_lookup(error_code const& e, tcp::resolver::iterator i)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e == asio::error::operation_aborted) return;
if (e)
{
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
m_callback(e, udp::endpoint(), 0, 0);
#ifndef BOOST_NO_EXCEPTIONS
} catch(std::exception&) {}
#endif
return;
}
m_proxy_addr.address(i->endpoint().address());
m_proxy_addr.port(i->endpoint().port());
l.unlock();
// on_connect may be called from within this thread
// the semantics for on_connect and on_timeout is
// a bit complicated. See comments in connection_queue.hpp
// for more details. This semantic determines how and
// when m_outstanding_ops may be decremented
// To simplyfy this, it's probably a good idea to
// merge on_connect and on_timeout to a single function
++m_outstanding_ops;
m_cc.enqueue(boost::bind(&udp_socket::on_connect, self(), _1)
, boost::bind(&udp_socket::on_timeout, self()), seconds(10));
}
void udp_socket::on_timeout()
{
mutex_t::scoped_lock l(m_mutex);
CHECK_MAGIC;
error_code ec;
m_socks5_sock.close(ec);
m_connection_ticket = -1;
}
void udp_socket::on_connect(int ticket)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (is_closed()) return;
m_connection_ticket = ticket;
// at this point on_timeout may be called before on_connected
// so increment the outstanding ops
// it may also not be called in case we call
// connection_queue::done first, so be sure to
// decrement if that happens
++m_outstanding_ops;
error_code ec;
m_socks5_sock.open(m_proxy_addr.address().is_v4()?tcp::v4():tcp::v6(), ec);
++m_outstanding_ops;
m_socks5_sock.async_connect(tcp::endpoint(m_proxy_addr.address(), m_proxy_addr.port())
, boost::bind(&udp_socket::on_connected, self(), _1));
}
void udp_socket::on_connected(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e == asio::error::operation_aborted) return;
m_cc.done(m_connection_ticket);
m_connection_ticket = -1;
// we just called done, which meand on_timeout
// won't be called. Decrement the outstanding
// ops counter for that
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
if (e)
{
#ifndef BOOST_NO_EXCEPTIONS
try {
#endif
m_callback(e, udp::endpoint(), 0, 0);
#ifndef BOOST_NO_EXCEPTIONS
} catch(std::exception&) {}
#endif
return;
}
if (is_closed()) return;
using namespace libtorrent::detail;
// send SOCKS5 authentication methods
char* p = &m_tmp_buf[0];
write_uint8(5, p); // SOCKS VERSION 5
if (m_proxy_settings.username.empty()
|| m_proxy_settings.type == proxy_settings::socks5)
{
write_uint8(1, p); // 1 authentication method (no auth)
write_uint8(0, p); // no authentication
}
else
{
write_uint8(2, p); // 2 authentication methods
write_uint8(0, p); // no authentication
write_uint8(2, p); // username/password
}
++m_outstanding_ops;
asio::async_write(m_socks5_sock, asio::buffer(m_tmp_buf, p - m_tmp_buf)
, boost::bind(&udp_socket::handshake1, self(), _1));
}
void udp_socket::handshake1(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e) return;
++m_outstanding_ops;
asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 2)
, boost::bind(&udp_socket::handshake2, self(), _1));
}
void udp_socket::handshake2(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e) return;
using namespace libtorrent::detail;
char* p = &m_tmp_buf[0];
int version = read_uint8(p);
int method = read_uint8(p);
if (version < 5) return;
if (method == 0)
{
socks_forward_udp(l);
}
else if (method == 2)
{
if (m_proxy_settings.username.empty())
{
error_code ec;
m_socks5_sock.close(ec);
return;
}
// start sub-negotiation
char* p = &m_tmp_buf[0];
write_uint8(1, p);
write_uint8(m_proxy_settings.username.size(), p);
write_string(m_proxy_settings.username, p);
write_uint8(m_proxy_settings.password.size(), p);
write_string(m_proxy_settings.password, p);
++m_outstanding_ops;
asio::async_write(m_socks5_sock, asio::buffer(m_tmp_buf, p - m_tmp_buf)
, boost::bind(&udp_socket::handshake3, self(), _1));
}
else
{
error_code ec;
m_socks5_sock.close(ec);
return;
}
}
void udp_socket::handshake3(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e) return;
++m_outstanding_ops;
asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 2)
, boost::bind(&udp_socket::handshake4, self(), _1));
}
void udp_socket::handshake4(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e) return;
using namespace libtorrent::detail;
char* p = &m_tmp_buf[0];
int version = read_uint8(p);
int status = read_uint8(p);
if (version != 1) return;
if (status != 0) return;
socks_forward_udp(l);
}
void udp_socket::socks_forward_udp(mutex_t::scoped_lock& l)
{
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
using namespace libtorrent::detail;
// send SOCKS5 UDP command
char* p = &m_tmp_buf[0];
write_uint8(5, p); // SOCKS VERSION 5
write_uint8(3, p); // UDP ASSOCIATE command
write_uint8(0, p); // reserved
write_uint8(1, p); // ATYP IPv4
write_uint32(0, p); // IP any
write_uint16(m_bind_port, p);
++m_outstanding_ops;
asio::async_write(m_socks5_sock, asio::buffer(m_tmp_buf, p - m_tmp_buf)
, boost::bind(&udp_socket::connect1, self(), _1));
}
void udp_socket::connect1(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e) return;
++m_outstanding_ops;
asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 10)
, boost::bind(&udp_socket::connect2, self(), _1));
}
void udp_socket::connect2(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
m_queue.clear();
<API key>(l);
return;
}
CHECK_MAGIC;
if (e)
{
m_queue.clear();
return;
}
using namespace libtorrent::detail;
char* p = &m_tmp_buf[0];
int version = read_uint8(p); // VERSION
int status = read_uint8(p); // STATUS
++p; // RESERVED
int atyp = read_uint8(p); // address type
if (version != 5 || status != 0)
{
m_queue.clear();
return;
}
if (atyp == 1)
{
m_proxy_addr.address(address_v4(read_uint32(p)));
m_proxy_addr.port(read_uint16(p));
}
else
{
// in this case we need to read more data from the socket
TORRENT_ASSERT(false && "not implemented yet!");
m_queue.clear();
return;
}
m_tunnel_packets = true;
m_queue_packets = false;
// forward all packets that were put in the queue
while (!m_queue.empty())
{
queued_packet const& p = m_queue.front();
error_code ec;
udp_socket::send(p.ep, &p.buf[0], p.buf.size(), ec);
m_queue.pop_front();
}
++m_outstanding_ops;
asio::async_read(m_socks5_sock, asio::buffer(m_tmp_buf, 10)
, boost::bind(&udp_socket::hung_up, self(), _1));
}
void udp_socket::hung_up(error_code const& e)
{
mutex_t::scoped_lock l(m_mutex);
TORRENT_ASSERT(m_outstanding_ops > 0);
--m_outstanding_ops;
if (m_abort)
{
<API key>(l);
return;
}
CHECK_MAGIC;
if (e == asio::error::operation_aborted || m_abort) return;
l.unlock();
// the socks connection was closed, re-open it
set_proxy_settings(m_proxy_settings);
}
<API key>::<API key>(io_service& ios
, callback_t const& c, connection_queue& cc)
: udp_socket(ios, c, cc)
, m_timer(ios)
, m_queue_size_limit(200)
, m_rate_limit(4000)
, m_quota(4000)
, m_last_tick(time_now())
{
error_code ec;
m_timer.expires_from_now(seconds(1), ec);
m_timer.async_wait(boost::bind(&<API key>::on_tick
, boost::intrusive_ptr<<API key>>(this), _1));
TORRENT_ASSERT(!ec);
}
bool <API key>::send(udp::endpoint const& ep, char const* p, int len, error_code& ec, int flags)
{
if (m_quota < len)
{
// bit 1 of flags means "don't drop"
if (int(m_queue.size()) >= m_queue_size_limit && (flags & 1) == 0)
return false;
m_queue.push_back(queued_packet());
queued_packet& qp = m_queue.back();
qp.ep = ep;
qp.buf.insert(qp.buf.begin(), p, p + len);
return true;
}
m_quota -= len;
udp_socket::send(ep, p, len, ec);
return true;
}
void <API key>::on_tick(error_code const& e)
{
if (e) return;
if (is_closed()) return;
error_code ec;
ptime now = time_now_hires();
m_timer.expires_at(now + seconds(1), ec);
m_timer.async_wait(boost::bind(&<API key>::on_tick
, boost::intrusive_ptr<<API key>>(this), _1));
time_duration delta = now - m_last_tick;
m_last_tick = now;
if (m_quota < m_rate_limit) m_quota += m_rate_limit * total_milliseconds(delta) / 1000;
if (m_queue.empty()) return;
while (!m_queue.empty() && int(m_queue.front().buf.size()) <= m_quota)
{
queued_packet const& p = m_queue.front();
TORRENT_ASSERT(m_quota >= int(p.buf.size()));
m_quota -= p.buf.size();
error_code ec;
udp_socket::send(p.ep, &p.buf[0], p.buf.size(), ec);
m_queue.pop_front();
}
}
void <API key>::close()
{
error_code ec;
m_timer.cancel(ec);
udp_socket::close();
}
|
package VCP::DB_File::sdbm;
=head1 NAME
VCP::DB_File::sdbm - Subclass providing SDBM_File storage
=head1 SYNOPSIS
use VCP::DB_File;
VCP::DB_File->new;
=head1 DESCRIPTION
To write your own DB_File filetype, copy this file and alter it. Then
ask us to add an option to the .vcp file parsing to enable it.
=over
=for test_script t/01db_file_sdbm.t
=cut
$VERSION = 1 ;
@ISA = qw( VCP::DB_File );
use strict ;
use VCP::Debug qw( :debug );
use Fcntl;
use File::Spec;
use SDBM_File;
use VCP::DB_File;
use VCP::Debug qw( :debug );
use VCP::Logger qw( BUG );
#use base qw( VCP::DB_File );
#use fields (
# 'Hash', ## The hash we tie
sub db_file {
my $self = shift;
return File::Spec->catfile(
$self->store_loc,
"db"
);
}
sub close_db {
my $self = shift;
return unless $self->{Hash};
$self->SUPER::close_db;
$self->{Hash} = undef;
}
sub delete_db {
my $self = shift;
|
#ifndef LINKER_H_
#define LINKER_H_
#include <elf.h>
#define ANDROID_ARM_LINKER 1
#define SOINFO_NAME_LEN 128
struct link_map
{
uintptr_t l_addr;
char * l_name;
uintptr_t l_ld;
struct link_map * l_next;
struct link_map * l_prev;
};
struct soinfo
{
const char name[SOINFO_NAME_LEN];
Elf32_Phdr *phdr;
int phnum;
unsigned entry;
unsigned base;
unsigned size;
int unused; // DO NOT USE, maintained for compatibility.
unsigned *dynamic;
unsigned wrprotect_start;
unsigned wrprotect_end;
struct soinfo *next;
unsigned flags;
const char *strtab;
Elf32_Sym *symtab;
unsigned nbucket;
unsigned nchain;
unsigned *bucket;
unsigned *chain;
unsigned *plt_got;
Elf32_Rel *plt_rel;
unsigned plt_rel_count;
Elf32_Rel *rel;
unsigned rel_count;
unsigned *preinit_array;
unsigned preinit_array_count;
unsigned *init_array;
unsigned init_array_count;
unsigned *fini_array;
unsigned fini_array_count;
void (*init_func)(void);
void (*fini_func)(void);
#ifdef ANDROID_ARM_LINKER
/* ARM EABI section used for stack unwinding. */
unsigned *ARM_exidx;
unsigned ARM_exidx_count;
#endif
unsigned refcount;
struct link_map linkmap;
int constructors_called;
Elf32_Addr gnu_relro_start;
unsigned gnu_relro_len;
};
#define R_ARM_ABS32 2
#define R_ARM_COPY 20
#define R_ARM_GLOB_DAT 21
#define R_ARM_JUMP_SLOT 22
#define R_ARM_RELATIVE 23
#endif
|
Specifies a list of libraries and projects to link against.
lua
links { "references" }
Parameters
`references` is a list of library and project names.
When linking against another project in the same workspace, specify the project name here, rather than the library name. Premake will figure out the correct library to link against for the current configuration, and will also create a dependency between the projects to ensure a proper build order.
When linking against system libraries, do not include any prefix or file extension. Premake will use the appropriate naming conventions for the current platform. With two exceptions:
* Managed C++ projects can link against managed assemblies by explicitly specifying the ".dll" file extension. Unmanaged libraries should continue to be specified without any decoration.
* Objective C frameworks can be linked by explicitly including the ".framework" file extension.
* For Visual Studio, this will add the specified project into References. In contrast, 'dependson' generates a build order dependency in the solution between two projects.
Applies To
Project configurations.
Availability
Premake 4.0 or later.
Examples
Link against some system libraries.
lua
filter { "system:windows" }
links { "user32", "gdi32" }
filter { "system:linux" }
links { "m", "png" }
filter { "system:macosx" }
-- OS X frameworks need the extension to be handled properly
links { "Cocoa.framework", "png" }
In a workspace with two projects, link the library into the executable. Note that the project name is used to specify the link; Premake will automatically figure out the correct library file name and directory and create a project dependency.
lua
workspace "MyWorkspace"
configurations { "Debug", "Release" }
language "C++"
project "MyExecutable"
kind "ConsoleApp"
files "**.cpp"
links { "MyLibrary" }
project "MyLibrary"
kind "SharedLib"
files "**.cpp"
You may also create links between non-library projects. In this case, Premake will generate a build dependency (the linked project will build first), but not an actual link. In this example, MyProject uses a build dependency to ensure that MyTool gets built first. It then uses MyTool as part of its build process.
lua
workspace "MyWorkspace"
configurations { "Debug", "Release" }
language "C++"
project "MyProject"
kind "ConsoleApp"
files "**.cpp"
links { "MyTool" }
prebuildcommands { "MyTool --dosomething" }
project "MyTool"
kind "ConsoleApp"
files "**.cpp"
|
<!DOCTYPE html>
<html>
<head>
<title>Flatty - Flat Administration Template</title>
<meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
<meta content='text/html;charset=utf-8' http-equiv='content-type'>
<meta content='Flat administration template for Twitter Bootstrap.' name='description'>
<link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/favicon.ico' rel='shortcut icon' type='image/x-icon'>
<link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/apple-touch-icon.png' rel='<API key>'>
<link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/<API key>.png' rel='<API key>' sizes='57x57'>
<link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/<API key>.png' rel='<API key>' sizes='72x72'>
<link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/<API key>.png' rel='<API key>' sizes='114x114'>
<link href='<?php echo Yii::app()->theme->baseUrl; ?>/assets/images/meta_icons/<API key>.png' rel='<API key>' sizes='144x144'>
<!--[if lt IE 9]>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/html5shiv.js" type="text/javascript"></script>
<![endif]
<!-- / bootstrap [required files] -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/bootstrap/bootstrap.css" media="all" rel="stylesheet" type="text/css" />
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/bootstrap/<API key>.css" media="all" rel="stylesheet" type="text/css" />
<!-- / jquery ui -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/jquery_ui/jquery.ui-1.10.0.custom.css" media="all" rel="stylesheet" type="text/css" />
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/jquery_ui/jquery.ui.1.10.0.ie.css" media="all" rel="stylesheet" type="text/css" />
<!-- / switch buttons -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/bootstrap_switch/bootstrap-switch.css" media="all" rel="stylesheet" type="text/css" />
<!-- / xeditable -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/xeditable/bootstrap-editable.css" media="all" rel="stylesheet" type="text/css" />
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/common/bootstrap-wysihtml5.css" media="all" rel="stylesheet" type="text/css" />
<!-- / wysihtml5 (wysywig) -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/common/bootstrap-wysihtml5.css" media="all" rel="stylesheet" type="text/css" />
<!-- / jquery file upload -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/jquery_fileupload/jquery.fileupload-ui.css" media="all" rel="stylesheet" type="text/css" />
<!-- / full calendar -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/fullcalendar/fullcalendar.css" media="all" rel="stylesheet" type="text/css" />
<!-- / select2 -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/select2/select2.css" media="all" rel="stylesheet" type="text/css" />
<!-- / mention -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/mention/mention.css" media="all" rel="stylesheet" type="text/css" />
<!-- / tabdrop (responsive tabs) -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/tabdrop/tabdrop.css" media="all" rel="stylesheet" type="text/css" />
<!-- / jgrowl notifications -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/jgrowl/jquery.jgrowl.min.css" media="all" rel="stylesheet" type="text/css" />
<!-- / datatables -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/datatables/bootstrap-datatable.css" media="all" rel="stylesheet" type="text/css" />
<!-- / dynatrees (file trees) -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/dynatree/ui.dynatree.css" media="all" rel="stylesheet" type="text/css" />
<!-- / color picker -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/<API key>/<API key>.css" media="all" rel="stylesheet" type="text/css" />
<!-- / datetime picker -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/<API key>/<API key>.min.css" media="all" rel="stylesheet" type="text/css" />
<!-- / daterange picker) -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/<API key>/<API key>.css" media="all" rel="stylesheet" type="text/css" />
<!-- / flags (country flags) -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/flags/flags.css" media="all" rel="stylesheet" type="text/css" />
<!-- / slider nav (address book) -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/slider_nav/slidernav.css" media="all" rel="stylesheet" type="text/css" />
<!-- / fuelux (wizard) -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/plugins/fuelux/wizard.css" media="all" rel="stylesheet" type="text/css" />
<!-- / theme files [required files] -->
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/light-theme.css" media="all" id="<API key>" rel="stylesheet" type="text/css" />
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/theme-colors.css" media="all" rel="stylesheet" type="text/css" />
<link href="<?php echo Yii::app()->theme->baseUrl; ?>/assets/stylesheets/demo.css" media="all" rel="stylesheet" type="text/css" />
</head>
<body class='contrast-purple sign-in contrast-background'>
<div id='wrapper'>
<div class='application'>
<div class='application-content'>
<a href='
<div class='icon-heart'></div>
<span>Yincart</span>
</a>
</div>
</div>
<div class='controls'>
<div class='caret'></div>
<div class='form-wrapper'>
<h1 class='text-center'>Sign in</h1>
<!-- <form action='--><?php //echo Yii::app()->createUrl('/site/login') ?><!--' method='post'>-->
<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm', array(
'id'=>'user-login',
// 'type'=>'horizontal',
'<API key>'=>true,
'clientOptions'=>array(
'validateOnSubmit'=>true,
),
)); ?>
<?php echo $form->errorSummary($model); ?>
<div class='row-fluid'>
<div class='span12 icon-over-input'>
<input value="" placeholder="Username" class="span12" name="UserLogin[username]" type="text" />
<i class='icon-user muted'></i>
</div>
</div>
<div class='row-fluid'>
<div class='span12 icon-over-input'>
<input value="" placeholder="Password" class="span12" name="UserLogin[password]" type="password" />
<i class='icon-lock muted'></i>
</div>
</div>
<label class='checkbox' for='remember_me'>
<input id='<API key>' name='UserLogin[rememberMe]' type='checkbox' value='1'>
</label>
<button class='btn btn-block'></button>
</form>
<div class='text-center'>
<hr class='hr-normal'>
<?php //echo CHtml::link("Forgot your password?", array('/user/recovery/recovery')); ?>
</div>
<?php $this->endWidget(); ?>
</div>
</div>
<div class='login-action text-center'>
<!-- <a href='--><?php //echo Yii::app()->createUrl('/site/sign_up') ?><!--'>-->
<!-- <i class='icon-user'></i>-->
<!-- New to Yincart?-->
<!-- <strong>Sign up</strong>-->
<span style="color:#ffffff">admin admin123</span>
</div>
</div>
<!-- / jquery -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/jquery/jquery.min.js" type="text/javascript"></script>
<!-- / jquery mobile events (for touch and slide) -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/mobile_events/jquery.mobile-events.min.js" type="text/javascript"></script>
<!-- / jquery migrate (for compatibility with new jquery) -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/jquery/jquery-migrate.min.js" type="text/javascript"></script>
<!-- / jquery ui -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/jquery_ui/jquery-ui.min.js" type="text/javascript"></script>
<!-- / jQuery UI Touch Punch -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/<API key>/jquery.ui.touch-punch.min.js" type="text/javascript"></script>
<!-- / bootstrap -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/bootstrap/bootstrap.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/excanvas.js" type="text/javascript"></script>
<!-- / sparklines -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/sparklines/jquery.sparkline.min.js" type="text/javascript"></script>
<!-- / flot charts -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/flot.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/flot.resize.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/flot/flot.pie.js" type="text/javascript"></script>
<!-- / bootstrap switch -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_switch/bootstrapSwitch.min.js" type="text/javascript"></script>
<!-- / fullcalendar -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fullcalendar/fullcalendar.min.js" type="text/javascript"></script>
<!-- / datatables -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/datatables/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/datatables/jquery.dataTables.columnFilter.js" type="text/javascript"></script>
<!-- / wysihtml5 -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/common/wysihtml5.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/common/bootstrap-wysihtml5.js" type="text/javascript"></script>
<!-- / select2 -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/select2/select2.js" type="text/javascript"></script>
<!-- / color picker -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/<API key>/<API key>.min.js" type="text/javascript"></script>
<!-- / mention -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/mention/mention.min.js" type="text/javascript"></script>
<!-- / input mask -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/input_mask/bootstrap-inputmask.min.js" type="text/javascript"></script>
<!-- / fileinput -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileinput/bootstrap-fileinput.js" type="text/javascript"></script>
<!-- / modernizr -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/modernizr/modernizr.min.js" type="text/javascript"></script>
<!-- / retina -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/retina/retina.js" type="text/javascript"></script>
<!-- / fileupload -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/tmpl.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/load-image.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/canvas-to-blob.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.iframe-transport.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload-fp.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload-ui.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fileupload/jquery.fileupload-init.js" type="text/javascript"></script>
<!-- / timeago -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/timeago/jquery.timeago.js" type="text/javascript"></script>
<!-- / slimscroll -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
<!-- / autosize (for textareas) -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/autosize/jquery.autosize-min.js" type="text/javascript"></script>
<!-- / charCount -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/charCount/charCount.js" type="text/javascript"></script>
<!-- / validate -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/validate/jquery.validate.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/validate/additional-methods.js" type="text/javascript"></script>
<!-- / naked password -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/naked_password/naked_password-0.2.4.min.js" type="text/javascript"></script>
<!-- / nestable -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/nestable/jquery.nestable.js" type="text/javascript"></script>
<!-- / tabdrop -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/tabdrop/bootstrap-tabdrop.js" type="text/javascript"></script>
<!-- / jgrowl -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/jgrowl/jquery.jgrowl.min.js" type="text/javascript"></script>
<!-- / bootbox -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootbox/bootbox.min.js" type="text/javascript"></script>
<!-- / inplace editing -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/xeditable/bootstrap-editable.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/xeditable/wysihtml5.js" type="text/javascript"></script>
<!-- / ckeditor -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/ckeditor/ckeditor.js" type="text/javascript"></script>
<!-- / filetrees -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/dynatree/jquery.dynatree.min.js" type="text/javascript"></script>
<!-- / datetime picker -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/<API key>/<API key>.js" type="text/javascript"></script>
<!-- / daterange picker -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/<API key>/moment.min.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/<API key>/<API key>.js" type="text/javascript"></script>
<!-- / max length -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/bootstrap_maxlength/bootstrap-maxlength.min.js" type="text/javascript"></script>
<!-- / dropdown hover -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/<API key>/<TwitterConsumerkey>.min.js" type="text/javascript"></script>
<!-- / slider nav (address book) -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/slider_nav/slidernav-min.js" type="text/javascript"></script>
<!-- / fuelux -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/plugins/fuelux/wizard.js" type="text/javascript"></script>
<!-- / flatty theme [required files] -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/nav.js" type="text/javascript"></script>
<!-- / flatty theme -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/tables.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/theme.js" type="text/javascript"></script>
<!-- / demo -->
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/jquery.mockjax.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/inplace_editing.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/charts.js" type="text/javascript"></script>
<script src="<?php echo Yii::app()->theme->baseUrl; ?>/assets/javascripts/demo/demo.js" type="text/javascript"></script>
</body>
</html>
|
package org.hisp.dhis.system.filter;
import com.google.common.collect.Sets;
import org.hisp.dhis.common.ValueType;
import org.hisp.dhis.commons.filter.Filter;
import org.hisp.dhis.dataelement.DataElement;
import java.util.Set;
/**
* @author Lars Helge Overland
*/
public class <API key>
implements Filter<DataElement>
{
public static final <API key> INSTANCE = new <API key>();
private static final Set<ValueType> VALUE_TYPES = Sets.newHashSet(
ValueType.BOOLEAN, ValueType.TRUE_ONLY, ValueType.TEXT, ValueType.LONG_TEXT, ValueType.LETTER,
ValueType.INTEGER, ValueType.INTEGER_POSITIVE, ValueType.INTEGER_NEGATIVE, ValueType.<API key>,
ValueType.NUMBER, ValueType.UNIT_INTERVAL, ValueType.PERCENTAGE, ValueType.COORDINATE
);
@Override
public boolean retain( DataElement object )
{
return object != null && VALUE_TYPES.contains( object.getValueType() );
}
}
|
#ifndef <API key>
#define <API key>
#include <map>
#include "base/basictypes.h"
#include "base/memory/ref_counted.h"
#include "base/memory/singleton.h"
#include "components/keyed_service/content/<API key>.h"
class Profile;
namespace base {
class SequencedTaskRunner;
}
namespace content {
class BrowserContext;
}
namespace policy {
class <API key>;
// <API key> implementation
// for <API key> instances that initialize per-profile
// cloud policy settings on ChromeOS.
// <API key> is handled different than other
// KeyedServices because it is a dependency of PrefService.
// Therefore, lifetime of instances is managed by Profile, Profile startup code
// invokes CreateForProfile() explicitly, takes ownership, and the instance
// is only deleted after PrefService destruction.
// TODO(mnissler): Remove the special lifetime management in favor of
// PrefService directly depending on <API key> once the
// former has been converted to a KeyedService.
class <API key>
: public <API key> {
public:
// Returns an instance of the <API key> singleton.
static <API key>* GetInstance();
// Returns the <API key> instance associated with
// |profile|.
static <API key>* GetForProfile(Profile* profile);
// Creates an instance for |profile|. Note that the caller is responsible for
// managing the lifetime of the instance. Subsequent calls to GetForProfile()
// will return the created instance as long as it lives.
// If |<API key>| is true, policy is loaded synchronously from
// <API key> at startup.
static scoped_ptr<<API key>> CreateForProfile(
Profile* profile,
bool <API key>,
scoped_refptr<base::SequencedTaskRunner> <API key>);
private:
friend struct <API key><<API key>>;
<API key>();
virtual ~<API key>();
// See comments for the static versions above.
<API key>* <API key>(Profile* profile);
scoped_ptr<<API key>> <API key>(
Profile* profile,
bool <API key>,
scoped_refptr<base::SequencedTaskRunner> <API key>);
// <API key>:
virtual void <API key>(
content::BrowserContext* context) OVERRIDE;
virtual void <API key>(
content::BrowserContext* context) OVERRIDE;
virtual void <API key>(
content::BrowserContext* context) OVERRIDE;
virtual void CreateServiceNow(content::BrowserContext* context) OVERRIDE;
typedef std::map<Profile*, <API key>*> ManagerMap;
ManagerMap managers_;
<API key>(<API key>);
};
} // namespace policy
#endif // <API key>
|
#include "content/browser/mojo/<API key>.h"
#include <stdint.h>
#include <utility>
#include "base/bind.h"
#include "content/browser/mojo/mojo_shell_context.h"
namespace content {
const char kBrowserMojoAppUrl[] = "system:content_browser";
namespace {
void OnGotInstanceID(shell::mojom::ConnectResult result,
const std::string& user_id,
uint32_t remote_id) {}
} // namespace
// static
std::unique_ptr<MojoAppConnection> MojoAppConnection::Create(
const std::string& user_id,
const std::string& name,
const std::string& requestor_name) {
return std::unique_ptr<MojoAppConnection>(
new <API key>(user_id, name, requestor_name));
}
<API key>::<API key>(
const std::string& user_id,
const std::string& name,
const std::string& requestor_name) {
MojoShellContext::<API key>(
user_id, name, requestor_name, mojo::GetProxy(&interfaces_),
shell::mojom::<API key>(), base::Bind(&OnGotInstanceID));
}
<API key>::~<API key>() {
}
void <API key>::GetInterface(
const std::string& interface_name,
mojo::<API key> handle) {
interfaces_->GetInterface(interface_name, std::move(handle));
}
} // namespace content
|
# encoding: utf-8
require_relative './job'
module CartoDB
module Importer2
class FormatLinter
CHARACTER_LIMIT = 1000
def self.supported?(extension)
extension == '.kml'
end
# INFO: importer_config not used but needed for compatibility with other normalizers
def initialize(filepath, job = nil, importer_config = nil)
@filepath = filepath
@job = job || Job.new
end
def run
data = File.open(filepath, 'r')
sample = data.read(CHARACTER_LIMIT)
data.close
raise KmlNetworkLinkError if sample =~ /NetworkLink.*href.*NetworkLink/m
self
end
def converted_filepath
filepath
end
private
attr_reader :filepath, :job
end # FormatLinter
end # Importer2
end # CartoDB
|
from __future__ import division, absolute_import, print_function
import sys
if sys.version_info[0] >= 3:
from io import StringIO
else:
from io import StringIO
import compiler
import inspect
import textwrap
import tokenize
from .compiler_unparse import unparse
class Comment(object):
""" A comment block.
"""
is_comment = True
def __init__(self, start_lineno, end_lineno, text):
# int : The first line number in the block. 1-indexed.
self.start_lineno = start_lineno
# int : The last line number. Inclusive!
self.end_lineno = end_lineno
# str : The text block including '#' character but not any leading spaces.
self.text = text
def add(self, string, start, end, line):
""" Add a new comment line.
"""
self.start_lineno = min(self.start_lineno, start[0])
self.end_lineno = max(self.end_lineno, end[0])
self.text += string
def __repr__(self):
return '%s(%r, %r, %r)' % (self.__class__.__name__, self.start_lineno,
self.end_lineno, self.text)
class NonComment(object):
""" A non-comment block of code.
"""
is_comment = False
def __init__(self, start_lineno, end_lineno):
self.start_lineno = start_lineno
self.end_lineno = end_lineno
def add(self, string, start, end, line):
""" Add lines to the block.
"""
if string.strip():
# Only add if not entirely whitespace.
self.start_lineno = min(self.start_lineno, start[0])
self.end_lineno = max(self.end_lineno, end[0])
def __repr__(self):
return '%s(%r, %r)' % (self.__class__.__name__, self.start_lineno,
self.end_lineno)
class CommentBlocker(object):
""" Pull out contiguous comment blocks.
"""
def __init__(self):
# Start with a dummy.
self.current_block = NonComment(0, 0)
# All of the blocks seen so far.
self.blocks = []
# The index mapping lines of code to their associated comment blocks.
self.index = {}
def process_file(self, file):
""" Process a file object.
"""
if sys.version_info[0] >= 3:
nxt = file.__next__
else:
nxt = file.next
for token in tokenize.generate_tokens(nxt):
self.process_token(*token)
self.make_index()
def process_token(self, kind, string, start, end, line):
""" Process a single token.
"""
if self.current_block.is_comment:
if kind == tokenize.COMMENT:
self.current_block.add(string, start, end, line)
else:
self.new_noncomment(start[0], end[0])
else:
if kind == tokenize.COMMENT:
self.new_comment(string, start, end, line)
else:
self.current_block.add(string, start, end, line)
def new_noncomment(self, start_lineno, end_lineno):
""" We are transitioning from a noncomment to a comment.
"""
block = NonComment(start_lineno, end_lineno)
self.blocks.append(block)
self.current_block = block
def new_comment(self, string, start, end, line):
""" Possibly add a new comment.
Only adds a new comment if this comment is the only thing on the line.
Otherwise, it extends the noncomment block.
"""
prefix = line[:start[1]]
if prefix.strip():
# Oops! Trailing comment, not a comment block.
self.current_block.add(string, start, end, line)
else:
# A comment block.
block = Comment(start[0], end[0], string)
self.blocks.append(block)
self.current_block = block
def make_index(self):
""" Make the index mapping lines of actual code to their associated
prefix comments.
"""
for prev, block in zip(self.blocks[:-1], self.blocks[1:]):
if not block.is_comment:
self.index[block.start_lineno] = prev
def search_for_comment(self, lineno, default=None):
""" Find the comment block just before the given line number.
Returns None (or the specified default) if there is no such block.
"""
if not self.index:
self.make_index()
block = self.index.get(lineno, None)
text = getattr(block, 'text', default)
return text
def <API key>(text):
""" Strip # markers at the front of a block of comment text.
"""
lines = []
for line in text.splitlines():
lines.append(line.lstrip('
text = textwrap.dedent('\n'.join(lines))
return text
def get_class_traits(klass):
""" Yield all of the documentation for trait definitions on a class object.
"""
# FIXME: gracefully handle errors here or in the caller?
source = inspect.getsource(klass)
cb = CommentBlocker()
cb.process_file(StringIO(source))
mod_ast = compiler.parse(source)
class_ast = mod_ast.node.nodes[0]
for node in class_ast.code.nodes:
# FIXME: handle other kinds of assignments?
if isinstance(node, compiler.ast.Assign):
name = node.nodes[0].name
rhs = unparse(node.expr).strip()
doc = <API key>(cb.search_for_comment(node.lineno, default=''))
yield name, rhs, doc
|
package org.bridj;
import static org.bridj.Pointer.allocate;
import static org.bridj.Pointer.allocateArray;
import java.util.AbstractList;
import java.util.Collection;
import java.util.RandomAccess;
import org.bridj.Pointer.ListType;
/**
* TODO : smart rewrite by chunks for removeAll and retainAll !
*
* @author ochafik
* @param <T> component type
*/
class DefaultNativeList<T> extends AbstractList<T> implements NativeList<T>, RandomAccess {
final ListType type;
final PointerIO<T> io;
volatile Pointer<T> pointer;
volatile long size;
public Pointer<?> getPointer() {
return pointer;
}
/**
* Create a native list that uses the provided storage and implementation
* strategy
*
* @param pointer
* @param type Implementation type
*/
DefaultNativeList(Pointer<T> pointer, ListType type) {
if (pointer == null || type == null) {
throw new <API key>("Cannot build a " + getClass().getSimpleName() + " with " + pointer + " and " + type);
}
this.io = pointer.getIO("Cannot create a list out of untyped pointer " + pointer);
this.type = type;
this.size = pointer.getValidElements();
this.pointer = pointer;
}
protected void checkModifiable() {
if (type == ListType.Unmodifiable) {
throw new <API key>("This list is unmodifiable");
}
}
protected int safelyCastLongToInt(long i, String content) {
if (i > Integer.MAX_VALUE) {
throw new RuntimeException(content + " is bigger than Java int's maximum value : " + i);
}
return (int) i;
}
@Override
public int size() {
return safelyCastLongToInt(size, "Size of the native list");
}
@Override
public void clear() {
checkModifiable();
size = 0;
}
@Override
public T get(int i) {
if (i >= size || i < 0) {
throw new <API key>("Invalid index : " + i + " (list has size " + size + ")");
}
return pointer.get(i);
}
@Override
public T set(int i, T e) {
checkModifiable();
if (i >= size || i < 0) {
throw new <API key>("Invalid index : " + i + " (list has size " + size + ")");
}
T old = pointer.get(i);
pointer.set(i, e);
return old;
}
@SuppressWarnings("deprecation")
void add(long i, T e) {
checkModifiable();
if (i > size || i < 0) {
throw new <API key>("Invalid index : " + i + " (list has size " + size + ")");
}
requireSize(size + 1);
if (i < size) {
pointer.moveBytesAtOffsetTo(i, pointer, i + 1, size - i);
}
pointer.set(i, e);
size++;
}
@Override
public void add(int i, T e) {
add((long) i, e);
}
protected void requireSize(long newSize) {
if (newSize > pointer.getValidElements()) {
switch (type) {
case Dynamic:
long nextSize = newSize < 5 ? newSize + 1 : (long) (newSize * 1.6);
Pointer<T> newPointer = allocateArray(io, nextSize);
pointer.copyTo(newPointer);
pointer = newPointer;
break;
case FixedCapacity:
throw new <API key>("This list has a fixed capacity, cannot grow its storage");
case Unmodifiable:
// should not happen !
checkModifiable();
}
}
}
@SuppressWarnings("deprecation")
T remove(long i) {
checkModifiable();
if (i >= size || i < 0) {
throw new <API key>("Invalid index : " + i + " (list has size " + size + ")");
}
T old = pointer.get(i);
long targetSize = io.getTargetSize();
pointer.moveBytesAtOffsetTo((i + 1) * targetSize, pointer, i * targetSize, targetSize);
size
return old;
}
@Override
public T remove(int i) {
return remove((long) i);
}
@Override
public boolean remove(Object o) {
checkModifiable();
long i = indexOf(o, true, 0);
if (i < 0) {
return false;
}
remove(i);
return true;
}
@SuppressWarnings("unchecked")
long indexOf(Object o, boolean last, int offset) {
Pointer<T> pointer = this.pointer;
assert offset >= 0 && (last || offset > 0);
if (offset > 0) {
pointer = pointer.next(offset);
}
Pointer<T> needle = allocate(io);
needle.set((T) o);
Pointer<T> occurrence = last ? pointer.findLast(needle) : pointer.find(needle);
if (occurrence == null) {
return -1;
}
return occurrence.getPeer() - pointer.getPeer();
}
@Override
public int indexOf(Object o) {
return safelyCastLongToInt(indexOf(o, false, 0), "Index of the object");
}
@Override
public int lastIndexOf(Object o) {
return safelyCastLongToInt(indexOf(o, true, 0), "Last index of the object");
}
@Override
public boolean contains(Object o) {
return indexOf(o) >= 0;
}
@Override
public boolean addAll(int i, Collection<? extends T> clctn) {
if (i >= 0 && i < size) {
requireSize(size + clctn.size());
}
return super.addAll(i, clctn);
}
@Override
public Object[] toArray() {
return pointer.validElements(size).toArray();
}
@SuppressWarnings("hiding")
@Override
public <T> T[] toArray(T[] ts) {
return pointer.validElements(size).toArray(ts);
}
}
|
// MCOMessageHeader+Private.h
// mailcore2
#ifndef <API key>
#define <API key>
#ifdef __cplusplus
namespace mailcore {
class MessageHeader;
}
@interface MCOMessageHeader (Private)
- (id) <API key>:(mailcore::MessageHeader *)header;
+ (MCOAddress *) <API key>:(mailcore::MessageHeader *)header;
@end
#endif
#endif
|
#if 0
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
#endif /* LIBC_SCCS and not lint */
#endif
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
/*
* Actual wprintf innards.
*
* Avoid making gratuitous changes to this source file; it should be kept
* as close as possible to vfprintf.c for ease of maintenance.
*/
#include "namespace.h"
#include <sys/types.h>
#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <locale.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include <wctype.h>
#include "un-namespace.h"
#include "libc_private.h"
#include "local.h"
#include "fvwrite.h"
#include "printflocal.h"
#include "xlocale_private.h"
static int __sprint(FILE *, struct __suio *, locale_t);
static int __sbprintf(FILE *, locale_t, const wchar_t *, va_list) __noinline;
static wint_t __xfputwc(wchar_t, FILE *, locale_t);
static wchar_t *__mbsconv(char *, int);
#define CHAR wchar_t
#include "printfcommon.h"
struct grouping_state {
wchar_t thousands_sep; /* locale-specific thousands separator */
const char *grouping; /* locale-specific numeric grouping rules */
int lead; /* sig figs before decimal or group sep */
int nseps; /* number of group separators with ' */
int nrepeats; /* number of repeats of the last group */
};
static const mbstate_t initial_mbs;
static inline wchar_t
get_decpt(locale_t locale)
{
mbstate_t mbs;
wchar_t decpt;
int nconv;
mbs = initial_mbs;
nconv = mbrtowc(&decpt, localeconv_l(locale)->decimal_point, MB_CUR_MAX, &mbs);
if (nconv == (size_t)-1 || nconv == (size_t)-2)
decpt = '.'; /* failsafe */
return (decpt);
}
static inline wchar_t
get_thousep(locale_t locale)
{
mbstate_t mbs;
wchar_t thousep;
int nconv;
mbs = initial_mbs;
nconv = mbrtowc(&thousep, localeconv_l(locale)->thousands_sep,
MB_CUR_MAX, &mbs);
if (nconv == (size_t)-1 || nconv == (size_t)-2)
thousep = '\0'; /* failsafe */
return (thousep);
}
/*
* Initialize the thousands' grouping state in preparation to print a
* number with ndigits digits. This routine returns the total number
* of wide characters that will be printed.
*/
static int
grouping_init(struct grouping_state *gs, int ndigits, locale_t locale)
{
gs->grouping = localeconv_l(locale)->grouping;
gs->thousands_sep = get_thousep(locale);
gs->nseps = gs->nrepeats = 0;
gs->lead = ndigits;
while (*gs->grouping != CHAR_MAX) {
if (gs->lead <= *gs->grouping)
break;
gs->lead -= *gs->grouping;
if (*(gs->grouping+1)) {
gs->nseps++;
gs->grouping++;
} else
gs->nrepeats++;
}
return (gs->nseps + gs->nrepeats);
}
/*
* Print a number with thousands' separators.
*/
static int
grouping_print(struct grouping_state *gs, struct io_state *iop,
const CHAR *cp, const CHAR *ep, locale_t locale)
{
const CHAR *cp0 = cp;
if (io_printandpad(iop, cp, ep, gs->lead, zeroes, locale))
return (-1);
cp += gs->lead;
while (gs->nseps > 0 || gs->nrepeats > 0) {
if (gs->nrepeats > 0)
gs->nrepeats
else {
gs->grouping
gs->nseps
}
if (io_print(iop, &gs->thousands_sep, 1, locale))
return (-1);
if (io_printandpad(iop, cp, ep, *gs->grouping, zeroes, locale))
return (-1);
cp += *gs->grouping;
}
if (cp > ep)
cp = ep;
return (cp - cp0);
}
/*
* Flush out all the vectors defined by the given uio,
* then reset it so that it can be reused.
*
* XXX The fact that we do this a character at a time and convert to a
* multibyte character sequence even if the destination is a wide
* string eclipses the benefits of buffering.
*/
static int
__sprint(FILE *fp, struct __suio *uio, locale_t locale)
{
struct __siov *iov;
wchar_t *p;
int i, len;
iov = uio->uio_iov;
for (; uio->uio_resid != 0; uio->uio_resid -= len, iov++) {
p = (wchar_t *)iov->iov_base;
len = iov->iov_len;
for (i = 0; i < len; i++) {
if (__xfputwc(p[i], fp, locale) == WEOF)
return (-1);
}
}
uio->uio_iovcnt = 0;
return (0);
}
/*
* Helper function for `fprintf to unbuffered unix file': creates a
* temporary buffer. We only work on write-only files; this avoids
* worries about ungetc buffers and so forth.
*/
static int
__sbprintf(FILE *fp, locale_t locale, const wchar_t *fmt, va_list ap)
{
int ret;
FILE fake;
unsigned char buf[BUFSIZ];
/* XXX This is probably not needed. */
if (prepwrite(fp) != 0)
return (EOF);
/* copy the important variables */
fake._flags = fp->_flags & ~__SNBF;
fake._file = fp->_file;
fake._cookie = fp->_cookie;
fake._write = fp->_write;
fake._orientation = fp->_orientation;
fake._mbstate = fp->_mbstate;
/* set up the buffer */
fake._bf._base = fake._p = buf;
fake._bf._size = fake._w = sizeof(buf);
fake._lbfsize = 0; /* not actually used, but Just In Case */
/* do the work, then copy any error status */
ret = __vfwprintf(&fake, locale, fmt, ap);
if (ret >= 0 && __fflush(&fake))
ret = WEOF;
if (fake._flags & __SERR)
fp->_flags |= __SERR;
return (ret);
}
/*
* Like __fputwc, but handles fake string (__SSTR) files properly.
* File must already be locked.
*/
static wint_t
__xfputwc(wchar_t wc, FILE *fp, locale_t locale)
{
mbstate_t mbs;
char buf[MB_LEN_MAX];
struct __suio uio;
struct __siov iov;
size_t len;
if ((fp->_flags & __SSTR) == 0)
return (__fputwc(wc, fp, locale));
mbs = initial_mbs;
if ((len = wcrtomb(buf, wc, &mbs)) == (size_t)-1) {
fp->_flags |= __SERR;
return (WEOF);
}
uio.uio_iov = &iov;
uio.uio_resid = len;
uio.uio_iovcnt = 1;
iov.iov_base = buf;
iov.iov_len = len;
return (__sfvwrite(fp, &uio) != EOF ? (wint_t)wc : WEOF);
}
/*
* Convert a multibyte character string argument for the %s format to a wide
* string representation. ``prec'' specifies the maximum number of bytes
* to output. If ``prec'' is greater than or equal to zero, we can't assume
* that the multibyte char. string ends in a null character.
*/
static wchar_t *
__mbsconv(char *mbsarg, int prec)
{
mbstate_t mbs;
wchar_t *convbuf, *wcp;
const char *p;
size_t insize, nchars, nconv;
if (mbsarg == NULL)
return (NULL);
/*
* Supplied argument is a multibyte string; convert it to wide
* characters first.
*/
if (prec >= 0) {
/*
* String is not guaranteed to be NUL-terminated. Find the
* number of characters to print.
*/
p = mbsarg;
insize = nchars = nconv = 0;
mbs = initial_mbs;
while (nchars != (size_t)prec) {
nconv = mbrlen(p, MB_CUR_MAX, &mbs);
if (nconv == 0 || nconv == (size_t)-1 ||
nconv == (size_t)-2)
break;
p += nconv;
nchars++;
insize += nconv;
}
if (nconv == (size_t)-1 || nconv == (size_t)-2)
return (NULL);
} else {
insize = strlen(mbsarg);
nconv = 0;
}
/*
* Allocate buffer for the result and perform the conversion,
* converting at most `size' bytes of the input multibyte string to
* wide characters for printing.
*/
convbuf = malloc((insize + 1) * sizeof(*convbuf));
if (convbuf == NULL)
return (NULL);
wcp = convbuf;
p = mbsarg;
mbs = initial_mbs;
while (insize != 0) {
nconv = mbrtowc(wcp, p, insize, &mbs);
if (nconv == 0 || nconv == (size_t)-1 || nconv == (size_t)-2)
break;
wcp++;
p += nconv;
insize -= nconv;
}
if (nconv == (size_t)-1 || nconv == (size_t)-2) {
free(convbuf);
return (NULL);
}
*wcp = L'\0';
return (convbuf);
}
/*
* MT-safe version
*/
int
vfwprintf_l(FILE * __restrict fp, locale_t locale,
const wchar_t * __restrict fmt0, va_list ap)
{
int ret;
FIX_LOCALE(locale);
FLOCKFILE(fp);
/* optimise fprintf(stderr) (and other unbuffered Unix files) */
if ((fp->_flags & (__SNBF|__SWR|__SRW)) == (__SNBF|__SWR) &&
fp->_file >= 0)
ret = __sbprintf(fp, locale, fmt0, ap);
else
ret = __vfwprintf(fp, locale, fmt0, ap);
FUNLOCKFILE(fp);
return (ret);
}
int
vfwprintf(FILE * __restrict fp, const wchar_t * __restrict fmt0, va_list ap)
{
return vfwprintf_l(fp, __get_locale(), fmt0, ap);
}
/*
* The size of the buffer we use as scratch space for integer
* conversions, among other things. We need enough space to
* write a uintmax_t in octal (plus one byte).
*/
#if UINTMAX_MAX <= UINT64_MAX
#define BUF 32
#else
#error "BUF must be large enough to format a uintmax_t"
#endif
/*
* Non-MT-safe version
*/
int
__vfwprintf(FILE *fp, locale_t locale, const wchar_t *fmt0, va_list ap)
{
wchar_t *fmt; /* format string */
wchar_t ch; /* character from fmt */
int n, n2; /* handy integer (short term usage) */
wchar_t *cp; /* handy char pointer (short term usage) */
int flags; /* flags as above */
int ret; /* return value accumulator */
int width; /* width from format (%8d), or 0 */
int prec; /* precision from format; <0 for N/A */
wchar_t sign; /* sign prefix (' ', '+', '-', or \0) */
struct grouping_state gs; /* thousands' grouping info */
#ifndef NO_FLOATING_POINT
wchar_t decimal_point; /* locale specific decimal point */
int signflag; /* true if float is negative */
union { /* floating point arguments %[aAeEfFgG] */
double dbl;
long double ldbl;
} fparg;
int expt; /* integer value of exponent */
char expchar; /* exponent character: [eEpP\0] */
char *dtoaend; /* pointer to end of converted digits */
int expsize; /* character count for expstr */
int ndig; /* actual number of digits returned by dtoa */
wchar_t expstr[MAXEXPDIG+2]; /* buffer for exponent string: e+ZZZ */
char *dtoaresult; /* buffer allocated by dtoa */
#endif
u_long ulval; /* integer arguments %[diouxX] */
uintmax_t ujval; /* %j, %ll, %q, %t, %z integers */
int base; /* base for [diouxX] conversion */
int dprec; /* a copy of prec if [diouxX], 0 otherwise */
int realsz; /* field size expanded by dprec, sign, etc */
int size; /* size of converted field or string */
int prsize; /* max size of printed field */
const char *xdigs; /* digits for [xX] conversion */
struct io_state io; /* I/O buffering state */
wchar_t buf[BUF]; /* buffer with space for digits of uintmax_t */
wchar_t ox[2]; /* space for 0x hex-prefix */
union arg *argtable; /* args, built due to positional arg */
union arg statargtable [STATIC_ARG_TBL_SIZE];
int nextarg; /* 1-based argument index */
va_list orgap; /* original argument pointer */
wchar_t *convbuf; /* multibyte to wide conversion result */
static const char xdigs_lower[16] = "0123456789abcdef";
static const char xdigs_upper[16] = "0123456789ABCDEF";
/* BEWARE, these `goto error' on error. */
#define PRINT(ptr, len) do { \
if (io_print(&io, (ptr), (len), locale)) \
goto error; \
} while (0)
#define PAD(howmany, with) { \
if (io_pad(&io, (howmany), (with), locale)) \
goto error; \
}
#define PRINTANDPAD(p, ep, len, with) { \
if (io_printandpad(&io, (p), (ep), (len), (with), locale)) \
goto error; \
}
#define FLUSH() { \
if (io_flush(&io, locale)) \
goto error; \
}
/*
* Get the argument indexed by nextarg. If the argument table is
* built, use it to get the argument. If its not, get the next
* argument (and arguments must be gotten sequentially).
*/
#define GETARG(type) \
((argtable != NULL) ? *((type*)(&argtable[nextarg++])) : \
(nextarg++, va_arg(ap, type)))
/*
* To extend shorts properly, we need both signed and unsigned
* argument extraction methods.
*/
#define SARG() \
(flags&LONGINT ? GETARG(long) : \
flags&SHORTINT ? (long)(short)GETARG(int) : \
flags&CHARINT ? (long)(signed char)GETARG(int) : \
(long)GETARG(int))
#define UARG() \
(flags&LONGINT ? GETARG(u_long) : \
flags&SHORTINT ? (u_long)(u_short)GETARG(int) : \
flags&CHARINT ? (u_long)(u_char)GETARG(int) : \
(u_long)GETARG(u_int))
#define INTMAX_SIZE (INTMAXT|SIZET|PTRDIFFT|LLONGINT)
#define SJARG() \
(flags&INTMAXT ? GETARG(intmax_t) : \
flags&SIZET ? (intmax_t)GETARG(ssize_t) : \
flags&PTRDIFFT ? (intmax_t)GETARG(ptrdiff_t) : \
(intmax_t)GETARG(long long))
#define UJARG() \
(flags&INTMAXT ? GETARG(uintmax_t) : \
flags&SIZET ? (uintmax_t)GETARG(size_t) : \
flags&PTRDIFFT ? (uintmax_t)GETARG(ptrdiff_t) : \
(uintmax_t)GETARG(unsigned long long))
/*
* Get * arguments, including the form *nn$. Preserve the nextarg
* that the argument can be gotten once the type is determined.
*/
#define GETASTER(val) \
n2 = 0; \
cp = fmt; \
while (is_digit(*cp)) { \
n2 = 10 * n2 + to_digit(*cp); \
cp++; \
} \
if (*cp == '$') { \
int hold = nextarg; \
if (argtable == NULL) { \
argtable = statargtable; \
if (__find_warguments (fmt0, orgap, &argtable)) { \
ret = EOF; \
goto error; \
} \
} \
nextarg = n2; \
val = GETARG (int); \
nextarg = hold; \
fmt = ++cp; \
} else { \
val = GETARG (int); \
}
/* sorry, fwprintf(read_only_file, L"") returns WEOF, not 0 */
if (prepwrite(fp) != 0) {
errno = EBADF;
return (EOF);
}
convbuf = NULL;
fmt = (wchar_t *)fmt0;
argtable = NULL;
nextarg = 1;
va_copy(orgap, ap);
io_init(&io, fp);
ret = 0;
#ifndef NO_FLOATING_POINT
decimal_point = get_decpt(locale);
#endif
/*
* Scan the format for conversions (`%' character).
*/
for (;;) {
for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++)
/* void */;
if ((n = fmt - cp) != 0) {
if ((unsigned)ret + n > INT_MAX) {
ret = EOF;
errno = EOVERFLOW;
goto error;
}
PRINT(cp, n);
ret += n;
}
if (ch == '\0')
goto done;
fmt++; /* skip over '%' */
flags = 0;
dprec = 0;
width = 0;
prec = -1;
gs.grouping = NULL;
sign = '\0';
ox[1] = '\0';
rflag: ch = *fmt++;
reswitch: switch (ch) {
case ' ':
/*-
* ``If the space and + flags both appear, the space
* flag will be ignored.''
* -- ANSI X3J11
*/
if (!sign)
sign = ' ';
goto rflag;
case '
flags |= ALT;
goto rflag;
case '*':
/*-
* ``A negative field width argument is taken as a
* - flag followed by a positive field width.''
* -- ANSI X3J11
* They don't exclude field widths read from args.
*/
GETASTER (width);
if (width >= 0)
goto rflag;
width = -width;
/* FALLTHROUGH */
case '-':
flags |= LADJUST;
goto rflag;
case '+':
sign = '+';
goto rflag;
case '\'':
flags |= GROUPING;
goto rflag;
case '.':
if ((ch = *fmt++) == '*') {
GETASTER (prec);
goto rflag;
}
prec = 0;
while (is_digit(ch)) {
prec = 10 * prec + to_digit(ch);
ch = *fmt++;
}
goto reswitch;
case '0':
/*-
* ``Note that 0 is taken as a flag, not as the
* beginning of a field width.''
* -- ANSI X3J11
*/
flags |= ZEROPAD;
goto rflag;
case '1': case '2': case '3': case '4':
case '5': case '6': case '7': case '8': case '9':
n = 0;
do {
n = 10 * n + to_digit(ch);
ch = *fmt++;
} while (is_digit(ch));
if (ch == '$') {
nextarg = n;
if (argtable == NULL) {
argtable = statargtable;
if (__find_warguments (fmt0, orgap,
&argtable)) {
ret = EOF;
goto error;
}
}
goto rflag;
}
width = n;
goto reswitch;
#ifndef NO_FLOATING_POINT
case 'L':
flags |= LONGDBL;
goto rflag;
#endif
case 'h':
if (flags & SHORTINT) {
flags &= ~SHORTINT;
flags |= CHARINT;
} else
flags |= SHORTINT;
goto rflag;
case 'j':
flags |= INTMAXT;
goto rflag;
case 'l':
if (flags & LONGINT) {
flags &= ~LONGINT;
flags |= LLONGINT;
} else
flags |= LONGINT;
goto rflag;
case 'q':
flags |= LLONGINT; /* not necessarily */
goto rflag;
case 't':
flags |= PTRDIFFT;
goto rflag;
case 'z':
flags |= SIZET;
goto rflag;
case 'C':
flags |= LONGINT;
/*FALLTHROUGH*/
case 'c':
if (flags & LONGINT)
*(cp = buf) = (wchar_t)GETARG(wint_t);
else
*(cp = buf) = (wchar_t)btowc(GETARG(int));
size = 1;
sign = '\0';
break;
case 'D':
flags |= LONGINT;
/*FALLTHROUGH*/
case 'd':
case 'i':
if (flags & INTMAX_SIZE) {
ujval = SJARG();
if ((intmax_t)ujval < 0) {
ujval = -ujval;
sign = '-';
}
} else {
ulval = SARG();
if ((long)ulval < 0) {
ulval = -ulval;
sign = '-';
}
}
base = 10;
goto number;
#ifndef NO_FLOATING_POINT
case 'a':
case 'A':
if (ch == 'a') {
ox[1] = 'x';
xdigs = xdigs_lower;
expchar = 'p';
} else {
ox[1] = 'X';
xdigs = xdigs_upper;
expchar = 'P';
}
if (prec >= 0)
prec++;
if (flags & LONGDBL) {
fparg.ldbl = GETARG(long double);
dtoaresult =
__hldtoa(fparg.ldbl, xdigs, prec,
&expt, &signflag, &dtoaend);
} else {
fparg.dbl = GETARG(double);
dtoaresult =
__hdtoa(fparg.dbl, xdigs, prec,
&expt, &signflag, &dtoaend);
}
if (prec < 0)
prec = dtoaend - dtoaresult;
if (expt == INT_MAX)
ox[1] = '\0';
if (convbuf != NULL)
free(convbuf);
ndig = dtoaend - dtoaresult;
cp = convbuf = __mbsconv(dtoaresult, -1);
freedtoa(dtoaresult);
goto fp_common;
case 'e':
case 'E':
expchar = ch;
if (prec < 0) /* account for digit before decpt */
prec = DEFPREC + 1;
else
prec++;
goto fp_begin;
case 'f':
case 'F':
expchar = '\0';
goto fp_begin;
case 'g':
case 'G':
expchar = ch - ('g' - 'e');
if (prec == 0)
prec = 1;
fp_begin:
if (prec < 0)
prec = DEFPREC;
if (convbuf != NULL)
free(convbuf);
if (flags & LONGDBL) {
fparg.ldbl = GETARG(long double);
dtoaresult =
__ldtoa(&fparg.ldbl, expchar ? 2 : 3, prec,
&expt, &signflag, &dtoaend);
} else {
fparg.dbl = GETARG(double);
dtoaresult =
dtoa(fparg.dbl, expchar ? 2 : 3, prec,
&expt, &signflag, &dtoaend);
if (expt == 9999)
expt = INT_MAX;
}
ndig = dtoaend - dtoaresult;
cp = convbuf = __mbsconv(dtoaresult, -1);
freedtoa(dtoaresult);
fp_common:
if (signflag)
sign = '-';
if (expt == INT_MAX) { /* inf or nan */
if (*cp == 'N') {
cp = (ch >= 'a') ? L"nan" : L"NAN";
sign = '\0';
} else
cp = (ch >= 'a') ? L"inf" : L"INF";
size = 3;
flags &= ~ZEROPAD;
break;
}
flags |= FPT;
if (ch == 'g' || ch == 'G') {
if (expt > -4 && expt <= prec) {
/* Make %[gG] smell like %[fF] */
expchar = '\0';
if (flags & ALT)
prec -= expt;
else
prec = ndig - expt;
if (prec < 0)
prec = 0;
} else {
/*
* Make %[gG] smell like %[eE], but
* trim trailing zeroes if no # flag.
*/
if (!(flags & ALT))
prec = ndig;
}
}
if (expchar) {
expsize = exponent(expstr, expt - 1, expchar);
size = expsize + prec;
if (prec > 1 || flags & ALT)
++size;
} else {
/* space for digits before decimal point */
if (expt > 0)
size = expt;
else
size = 1;
/* space for decimal pt and following digits */
if (prec || flags & ALT)
size += prec + 1;
if ((flags & GROUPING) && expt > 0)
size += grouping_init(&gs, expt, locale);
}
break;
#endif /* !NO_FLOATING_POINT */
case 'n':
/*
* Assignment-like behavior is specified if the
* value overflows or is otherwise unrepresentable.
* C99 says to use `signed char' for %hhn conversions.
*/
if (flags & LLONGINT)
*GETARG(long long *) = ret;
else if (flags & SIZET)
*GETARG(ssize_t *) = (ssize_t)ret;
else if (flags & PTRDIFFT)
*GETARG(ptrdiff_t *) = ret;
else if (flags & INTMAXT)
*GETARG(intmax_t *) = ret;
else if (flags & LONGINT)
*GETARG(long *) = ret;
else if (flags & SHORTINT)
*GETARG(short *) = ret;
else if (flags & CHARINT)
*GETARG(signed char *) = ret;
else
*GETARG(int *) = ret;
continue; /* no output */
case 'O':
flags |= LONGINT;
/*FALLTHROUGH*/
case 'o':
if (flags & INTMAX_SIZE)
ujval = UJARG();
else
ulval = UARG();
base = 8;
goto nosign;
case 'p':
/*-
* ``The argument shall be a pointer to void. The
* value of the pointer is converted to a sequence
* of printable characters, in an implementation-
* defined manner.''
* -- ANSI X3J11
*/
ujval = (uintmax_t)(uintptr_t)GETARG(void *);
base = 16;
xdigs = xdigs_lower;
flags = flags | INTMAXT;
ox[1] = 'x';
goto nosign;
case 'S':
flags |= LONGINT;
/*FALLTHROUGH*/
case 's':
if (flags & LONGINT) {
if ((cp = GETARG(wchar_t *)) == NULL)
cp = L"(null)";
} else {
char *mbp;
if (convbuf != NULL)
free(convbuf);
if ((mbp = GETARG(char *)) == NULL)
cp = L"(null)";
else {
convbuf = __mbsconv(mbp, prec);
if (convbuf == NULL) {
fp->_flags |= __SERR;
goto error;
}
cp = convbuf;
}
}
size = (prec >= 0) ? wcsnlen(cp, prec) : wcslen(cp);
sign = '\0';
break;
case 'U':
flags |= LONGINT;
/*FALLTHROUGH*/
case 'u':
if (flags & INTMAX_SIZE)
ujval = UJARG();
else
ulval = UARG();
base = 10;
goto nosign;
case 'X':
xdigs = xdigs_upper;
goto hex;
case 'x':
xdigs = xdigs_lower;
hex:
if (flags & INTMAX_SIZE)
ujval = UJARG();
else
ulval = UARG();
base = 16;
/* leading 0x/X only if non-zero */
if (flags & ALT &&
(flags & INTMAX_SIZE ? ujval != 0 : ulval != 0))
ox[1] = ch;
flags &= ~GROUPING;
/* unsigned conversions */
nosign: sign = '\0';
/*-
* ``... diouXx conversions ... if a precision is
* specified, the 0 flag will be ignored.''
* -- ANSI X3J11
*/
number: if ((dprec = prec) >= 0)
flags &= ~ZEROPAD;
/*-
* ``The result of converting a zero value with an
* explicit precision of zero is no characters.''
* -- ANSI X3J11
*
* ``The C Standard is clear enough as is. The call
* printf("%#.0o", 0) should print 0.''
* -- Defect Report #151
*/
cp = buf + BUF;
if (flags & INTMAX_SIZE) {
if (ujval != 0 || prec != 0 ||
(flags & ALT && base == 8))
cp = __ujtoa(ujval, cp, base,
flags & ALT, xdigs);
} else {
if (ulval != 0 || prec != 0 ||
(flags & ALT && base == 8))
cp = __ultoa(ulval, cp, base,
flags & ALT, xdigs);
}
size = buf + BUF - cp;
if (size > BUF) /* should never happen */
abort();
if ((flags & GROUPING) && size != 0)
size += grouping_init(&gs, size, locale);
break;
default: /* "%?" prints ?, unless ? is NUL */
if (ch == '\0')
goto done;
/* pretend it was %c with argument ch */
cp = buf;
*cp = ch;
size = 1;
sign = '\0';
break;
}
/*
* All reasonable formats wind up here. At this point, `cp'
* points to a string which (if not flags&LADJUST) should be
* padded out to `width' places. If flags&ZEROPAD, it should
* first be prefixed by any sign or other prefix; otherwise,
* it should be blank padded before the prefix is emitted.
* After any left-hand padding and prefixing, emit zeroes
* required by a decimal [diouxX] precision, then print the
* string proper, then emit zeroes required by any leftover
* floating precision; finally, if LADJUST, pad with blanks.
*
* Compute actual size, so we know how much to pad.
* size excludes decimal prec; realsz includes it.
*/
realsz = dprec > size ? dprec : size;
if (sign)
realsz++;
if (ox[1])
realsz += 2;
prsize = width > realsz ? width : realsz;
if ((unsigned)ret + prsize > INT_MAX) {
ret = EOF;
errno = EOVERFLOW;
goto error;
}
/* right-adjusting blank padding */
if ((flags & (LADJUST|ZEROPAD)) == 0)
PAD(width - realsz, blanks);
/* prefix */
if (sign)
PRINT(&sign, 1);
if (ox[1]) { /* ox[1] is either x, X, or \0 */
ox[0] = '0';
PRINT(ox, 2);
}
/* right-adjusting zero padding */
if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD)
PAD(width - realsz, zeroes);
/* the string or number proper */
#ifndef NO_FLOATING_POINT
if ((flags & FPT) == 0) {
#endif
/* leading zeroes from decimal precision */
PAD(dprec - size, zeroes);
if (gs.grouping) {
if (grouping_print(&gs, &io, cp, buf+BUF, locale) < 0)
goto error;
} else {
PRINT(cp, size);
}
#ifndef NO_FLOATING_POINT
} else { /* glue together f_p fragments */
if (!expchar) { /* %[fF] or sufficiently short %[gG] */
if (expt <= 0) {
PRINT(zeroes, 1);
if (prec || flags & ALT)
PRINT(&decimal_point, 1);
PAD(-expt, zeroes);
/* already handled initial 0's */
prec += expt;
} else {
if (gs.grouping) {
n = grouping_print(&gs, &io,
cp, convbuf + ndig, locale);
if (n < 0)
goto error;
cp += n;
} else {
PRINTANDPAD(cp, convbuf + ndig,
expt, zeroes);
cp += expt;
}
if (prec || flags & ALT)
PRINT(&decimal_point, 1);
}
PRINTANDPAD(cp, convbuf + ndig, prec, zeroes);
} else { /* %[eE] or sufficiently long %[gG] */
if (prec > 1 || flags & ALT) {
buf[0] = *cp++;
buf[1] = decimal_point;
PRINT(buf, 2);
PRINT(cp, ndig-1);
PAD(prec - ndig, zeroes);
} else /* XeYYY */
PRINT(cp, 1);
PRINT(expstr, expsize);
}
}
#endif
/* left-adjusting padding (always blank) */
if (flags & LADJUST)
PAD(width - realsz, blanks);
/* finally, adjust ret */
ret += prsize;
FLUSH(); /* copy out the I/O vectors */
}
done:
FLUSH();
error:
va_end(orgap);
if (convbuf != NULL)
free(convbuf);
if (__sferror(fp))
ret = EOF;
if ((argtable != NULL) && (argtable != statargtable))
free (argtable);
return (ret);
/* NOTREACHED */
}
|
from django.conf.urls.defaults import patterns, url
urlpatterns = patterns(
'popcorn_gallery.users.views',
url(r'^edit/$', 'edit', name='users_edit'),
url(r'^delete/$', 'delete_profile', name='users_delete'),
url(r'^(?P<username>[\w-]+)/$', 'profile', name='users_profile'),
)
|
#ifndef <API key>
#define <API key>
#include "core/CSSPropertyNames.h"
#include "core/CSSValueKeywords.h"
#include "platform/graphics/Color.h"
#include "platform/heap/Handle.h"
#include "wtf/Allocator.h"
#include "wtf/Forward.h"
namespace blink {
class CSSValue;
class CSSParserFastPaths {
STATIC_ONLY(CSSParserFastPaths);
public:
// Parses simple values like '10px' or 'green', but makes no guarantees
// about handling any property completely.
static CSSValue* maybeParseValue(CSSPropertyID, const String&, CSSParserMode);
// Properties handled here shouldn't be explicitly handled in CSSPropertyParser
static bool isKeywordPropertyID(CSSPropertyID);
static bool <API key>(CSSPropertyID, CSSValueID, CSSParserMode);
static CSSValue* parseColor(const String&, CSSParserMode);
};
} // namespace blink
#endif // <API key>
|
package org.lwjgl.util.lz4;
import javax.annotation.*;
import java.nio.*;
import org.lwjgl.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.util.lz4.LZ4HC.<API key>;
/**
* <h3>Layout</h3>
*
* <pre><code>
* union LZ4_streamHC_t {
* size_t table[<API key>];
* {@link LZ4HCCCtxInternal struct LZ4HC_CCtx_internal} internal_donotuse;
* }</code></pre>
*/
@NativeType("union LZ4_streamHC_t")
public class LZ4StreamHC extends Struct {
/** The struct size in bytes. */
public static final int SIZEOF;
/** The struct alignment in bytes. */
public static final int ALIGNOF;
/** The struct member offsets. */
public static final int
TABLE,
INTERNAL_DONOTUSE;
static {
Layout layout = __union(
__array(POINTER_SIZE, <API key>),
__member(LZ4HCCCtxInternal.SIZEOF, LZ4HCCCtxInternal.ALIGNOF)
);
SIZEOF = layout.getSize();
ALIGNOF = layout.getAlignment();
TABLE = layout.offsetof(0);
INTERNAL_DONOTUSE = layout.offsetof(1);
}
/**
* Creates a {@code LZ4StreamHC} instance at the current position of the specified {@link ByteBuffer} container. Changes to the buffer's content will be
* visible to the struct instance and vice versa.
*
* <p>The created instance holds a strong reference to the container object.</p>
*/
public LZ4StreamHC(ByteBuffer container) {
super(memAddress(container), __checkContainer(container, SIZEOF));
}
@Override
public int sizeof() { return SIZEOF; }
/** @return a {@link PointerBuffer} view of the {@code table} field. */
@NativeType("size_t[<API key>]")
public PointerBuffer table() { return ntable(address()); }
/** @return the value at the specified index of the {@code table} field. */
@NativeType("size_t")
public long table(int index) { return ntable(address(), index); }
/** @return a {@link LZ4HCCCtxInternal} view of the {@code internal_donotuse} field. */
@NativeType("struct LZ4HC_CCtx_internal")
public LZ4HCCCtxInternal internal_donotuse() { return ninternal_donotuse(address()); }
/** Returns a new {@code LZ4StreamHC} instance for the specified memory address. */
public static LZ4StreamHC create(long address) {
return wrap(LZ4StreamHC.class, address);
}
/** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static LZ4StreamHC createSafe(long address) {
return address == NULL ? null : wrap(LZ4StreamHC.class, address);
}
/**
* Create a {@link LZ4StreamHC.Buffer} instance at the specified memory.
*
* @param address the memory address
* @param capacity the buffer capacity
*/
public static LZ4StreamHC.Buffer create(long address, int capacity) {
return wrap(Buffer.class, address, capacity);
}
/** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */
@Nullable
public static LZ4StreamHC.Buffer createSafe(long address, int capacity) {
return address == NULL ? null : wrap(Buffer.class, address, capacity);
}
/** Unsafe version of {@link #table}. */
public static PointerBuffer ntable(long struct) { return memPointerBuffer(struct + LZ4StreamHC.TABLE, <API key>); }
/** Unsafe version of {@link #table(int) table}. */
public static long ntable(long struct, int index) {
return memGetAddress(struct + LZ4StreamHC.TABLE + check(index, <API key>) * POINTER_SIZE);
}
/** Unsafe version of {@link #internal_donotuse}. */
public static LZ4HCCCtxInternal ninternal_donotuse(long struct) { return LZ4HCCCtxInternal.create(struct + LZ4StreamHC.INTERNAL_DONOTUSE); }
/** An array of {@link LZ4StreamHC} structs. */
public static class Buffer extends StructBuffer<LZ4StreamHC, Buffer> {
private static final LZ4StreamHC ELEMENT_FACTORY = LZ4StreamHC.create(-1L);
/**
* Creates a new {@code LZ4StreamHC.Buffer} instance backed by the specified container.
*
* Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
* will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
* by {@link LZ4StreamHC#SIZEOF}, and its mark will be undefined.
*
* <p>The created buffer instance holds a strong reference to the container object.</p>
*/
public Buffer(ByteBuffer container) {
super(container, container.remaining() / SIZEOF);
}
public Buffer(long address, int cap) {
super(address, null, -1, 0, cap, cap);
}
Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) {
super(address, container, mark, pos, lim, cap);
}
@Override
protected Buffer self() {
return this;
}
@Override
protected LZ4StreamHC getElementFactory() {
return ELEMENT_FACTORY;
}
/** @return a {@link PointerBuffer} view of the {@code table} field. */
@NativeType("size_t[<API key>]")
public PointerBuffer table() { return LZ4StreamHC.ntable(address()); }
/** @return the value at the specified index of the {@code table} field. */
@NativeType("size_t")
public long table(int index) { return LZ4StreamHC.ntable(address(), index); }
/** @return a {@link LZ4HCCCtxInternal} view of the {@code internal_donotuse} field. */
@NativeType("struct LZ4HC_CCtx_internal")
public LZ4HCCCtxInternal internal_donotuse() { return LZ4StreamHC.ninternal_donotuse(address()); }
}
}
|
import copy
from django import forms
from django.db import models
from django.core.exceptions import ValidationError, <API key>
from django.db.models.fields.subclassing import Creator
from djangae.forms.fields import ListFormField
from django.utils.text import capfirst
class _FakeModel(object):
"""
An object of this class can pass itself off as a model instance
when used as an arguments to Field.pre_save method (item_fields
of iterable fields are not actually fields of any model).
"""
def __init__(self, field, value):
setattr(self, field.attname, value)
class IterableField(models.Field):
__metaclass__ = models.SubfieldBase
@property
def _iterable_type(self): raise NotImplementedError()
def db_type(self, connection):
return 'list'
def get_prep_lookup(self, lookup_type, value):
if hasattr(value, 'prepare'):
return value.prepare()
if hasattr(value, '_prepare'):
return value._prepare()
if value is None:
raise ValueError("You can't query an iterable field with None")
if lookup_type == 'isnull' and value in (True, False):
return value
if lookup_type != 'exact' and lookup_type != 'in':
raise ValueError("You can only query using exact and in lookups on iterable fields")
if isinstance(value, (list, set)):
return [ self.item_field_type.to_python(x) for x in value ]
return self.item_field_type.to_python(value)
def get_prep_value(self, value):
if value is None:
raise ValueError("You can't set a {} to None (did you mean {}?)".format(
self.__class__.__name__, str(self._iterable_type())
))
if isinstance(value, basestring):
# Catch accidentally assigning a string to a ListField
raise ValueError("Tried to assign a string to a {}".format(self.__class__.__name__))
return super(IterableField, self).get_prep_value(value)
def __init__(self, item_field_type, *args, **kwargs):
# This seems bonkers, we shout at people for specifying null=True, but then do it ourselves. But this is because
# *we* abuse None values for our own purposes (to represent an empty iterable) if someone else tries to then
# all hell breaks loose
if kwargs.get("null", False):
raise RuntimeError("IterableFields cannot be set as nullable (as the datastore doesn't differentiate None vs []")
kwargs["null"] = True
default = kwargs.get("default", [])
self.<API key> = copy.deepcopy(item_field_type) # For deconstruction purposes
if default is not None and not callable(default):
kwargs["default"] = lambda: self._iterable_type(default)
if hasattr(item_field_type, 'attname'):
item_field_type = item_field_type.__class__
if callable(item_field_type):
item_field_type = item_field_type()
if isinstance(item_field_type, models.ForeignKey):
raise <API key>("Lists of ForeignKeys aren't supported, use RelatedSetField instead")
self.item_field_type = item_field_type
# We'll be pretending that item_field is a field of a model
# with just one "value" field.
assert not hasattr(self.item_field_type, 'attname')
self.item_field_type.<API key>('value')
super(IterableField, self).__init__(*args, **kwargs)
def deconstruct(self):
name, path, args, kwargs = super(IterableField, self).deconstruct()
args = (self.<API key>,)
del kwargs["null"]
return name, path, args, kwargs
def contribute_to_class(self, cls, name):
self.item_field_type.model = cls
self.item_field_type.name = name
super(IterableField, self).contribute_to_class(cls, name)
# If items' field uses SubfieldBase we also need to.
item_metaclass = getattr(self.item_field_type, '__metaclass__', None)
if item_metaclass and issubclass(item_metaclass, models.SubfieldBase):
setattr(cls, self.name, Creator(self))
def _map(self, function, iterable, *args, **kwargs):
return self._iterable_type(function(element, *args, **kwargs) for element in iterable)
def to_python(self, value):
if value is None:
return self._iterable_type([])
# Because a set cannot be defined in JSON, we must allow a list to be passed as the value
# of a SetField, as otherwise SetField data can't be loaded from fixtures
if not hasattr(value, "__iter__"): # Allows list/set, not string
raise ValueError("Tried to assign a {} to a {}".format(value.__class__.__name__, self.__class__.__name__))
return self._map(self.item_field_type.to_python, value)
def pre_save(self, model_instance, add):
"""
Gets our value from the model_instance and passes its items
through item_field's pre_save (using a fake model instance).
"""
value = getattr(model_instance, self.attname)
if value is None:
return None
return self._map(lambda item: self.item_field_type.pre_save(_FakeModel(self.item_field_type, item), add), value)
def get_db_prep_value(self, value, connection, prepared=False):
if not prepared:
value = self.get_prep_value(value)
if value is None:
return None
# If the value is an empty iterable, store None
if value == self._iterable_type([]):
return None
return self._map(self.item_field_type.get_db_prep_save, value,
connection=connection)
def get_db_prep_lookup(self, lookup_type, value, connection,
prepared=False):
"""
Passes the value through get_db_prep_lookup of item_field.
"""
return self.item_field_type.get_db_prep_lookup(
lookup_type, value, connection=connection, prepared=prepared)
def validate(self, value_list, model_instance):
""" We want to override the default validate method from django.db.fields.Field, because it
is only designed to deal with a single choice from the user.
"""
if not self.editable:
# Skip validation for non-editable fields
return
# Validate choices
if self.choices:
valid_values = []
for choice in self.choices:
if isinstance(choice[0], (list, tuple)):
# this is an optgroup, so look inside it for the options
for optgroup_choice in choice[0]:
valid_values.append(optgroup_choice[0])
else:
valid_values.append(choice[0])
for value in value_list:
if value not in valid_values:
# TODO: if there is more than 1 invalid value then this should show all of the invalid values
raise ValidationError(self.error_messages['invalid_choice'] % value)
# Validate null-ness
if value_list is None and not self.null:
raise ValidationError(self.error_messages['null'])
if not self.blank and not value_list:
raise ValidationError(self.error_messages['blank'])
# apply the default items validation rules
for value in value_list:
self.item_field_type.clean(value, model_instance)
def formfield(self, **kwargs):
""" If this field has choices, then we can use a multiple choice field.
NB: The choices must be set on *this* field, e.g. this_field = ListField(CharField(), choices=x)
as opposed to: this_field = ListField(CharField(choices=x))
"""
#Largely lifted straight from Field.formfield() in django.models.__init__.py
defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
if self.has_default(): #No idea what this does
if callable(self.default):
defaults['initial'] = self.default
defaults['show_hidden_initial'] = True
else:
defaults['initial'] = self.get_default()
if self.choices:
form_field_class = forms.MultipleChoiceField
defaults['choices'] = self.get_choices(include_blank=False) #no empty value on a multi-select
else:
form_field_class = ListFormField
defaults.update(**kwargs)
return form_field_class(**defaults)
class ListField(IterableField):
def __init__(self, *args, **kwargs):
self.ordering = kwargs.pop('ordering', None)
if self.ordering is not None and not callable(self.ordering):
raise TypeError("'ordering' has to be a callable or None, "
"not of type %r." % type(self.ordering))
super(ListField, self).__init__(*args, **kwargs)
def pre_save(self, model_instance, add):
value = super(ListField, self).pre_save(model_instance, add)
if value and self.ordering:
value.sort(key=self.ordering)
return value
@property
def _iterable_type(self):
return list
def deconstruct(self):
name, path, args, kwargs = super(ListField, self).deconstruct()
kwargs['ordering'] = self.ordering
return name, path, args, kwargs
class SetField(IterableField):
@property
def _iterable_type(self):
return set
def db_type(self, connection):
return 'set'
def get_db_prep_save(self, *args, **kwargs):
ret = super(SetField, self).get_db_prep_save(*args, **kwargs)
if ret:
ret = list(ret)
return ret
def get_db_prep_lookup(self, *args, **kwargs):
ret = super(SetField, self).get_db_prep_lookup(*args, **kwargs)
if ret:
ret = list(ret)
return ret
def value_to_string(self, obj):
"""
Custom method for serialization, as JSON doesn't support
serializing sets.
"""
return str(list(self._get_val_from_obj(obj)))
|
from __future__ import absolute_import
from datetime import datetime
from django.utils import timezone
from django.core.urlresolvers import reverse
from sentry.models import (
ProcessingIssue, EventError, RawEvent, <API key>
)
from sentry.testutils import APITestCase
class <API key>(APITestCase):
def test_simple(self):
self.login_as(user=self.user)
team = self.create_team()
project1 = self.create_project(team=team, name='foo')
raw_event = RawEvent.objects.create(
project_id=project1.id,
event_id='abc'
)
issue, _ = ProcessingIssue.objects.get_or_create(
project_id=project1.id,
checksum='abc',
type=EventError.NATIVE_MISSING_DSYM
)
<API key>.objects.get_or_create(
raw_event=raw_event,
processing_issue=issue,
)
url = reverse('<API key>', kwargs={
'organization_slug': project1.organization.slug,
'project_slug': project1.slug,
})
response = self.client.get(url, format='json')
assert response.status_code == 200, response.content
assert response.data['hasIssues'] is True
assert response.data['<API key>'] is False
assert response.data['numIssues'] == 1
assert response.data['issuesProcessing'] == 0
assert response.data['resolveableIssues'] == 0
def test_issues(self):
self.login_as(user=self.user)
team = self.create_team()
project1 = self.create_project(team=team, name='foo')
raw_event = RawEvent.objects.create(
project_id=project1.id,
event_id='abc'
)
issue, _ = ProcessingIssue.objects.get_or_create(
project_id=project1.id,
checksum='abc',
type=EventError.NATIVE_MISSING_DSYM,
datetime=datetime(2013, 8, 13, 3, 8, 25, tzinfo=timezone.utc),
)
issue2, _ = ProcessingIssue.objects.get_or_create(
project_id=project1.id,
checksum='abcd',
type=EventError.NATIVE_MISSING_DSYM,
datetime=datetime(2014, 8, 13, 3, 8, 25, tzinfo=timezone.utc),
)
<API key>.objects.get_or_create(
raw_event=raw_event,
processing_issue=issue,
)
url = reverse('<API key>', kwargs={
'organization_slug': project1.organization.slug,
'project_slug': project1.slug,
})
response = self.client.get(url + '?detailed=1', format='json')
assert response.status_code == 200, response.content
assert len(response.data['issues']) == 2
assert response.data['numIssues'] == 2
assert response.data['lastSeen'] == issue2.datetime
assert response.data['hasIssues'] is True
assert response.data['<API key>'] is False
assert response.data['issuesProcessing'] == 0
assert response.data['resolveableIssues'] == 0
assert response.data['issues'][0]['checksum'] == issue.checksum
assert response.data['issues'][0]['numEvents'] == 1
assert response.data['issues'][0]['type'] == EventError.NATIVE_MISSING_DSYM
assert response.data['issues'][1]['checksum'] == issue2.checksum
def <API key>(self):
self.login_as(user=self.user)
team = self.create_team()
project1 = self.create_project(team=team, name='foo')
RawEvent.objects.create(
project_id=project1.id,
event_id='abc'
)
url = reverse('<API key>', kwargs={
'organization_slug': project1.organization.slug,
'project_slug': project1.slug,
})
response = self.client.get(url + '?detailed=1', format='json')
assert response.status_code == 200, response.content
assert response.data['numIssues'] == 0
assert response.data['resolveableIssues'] == 1
assert response.data['lastSeen'] is None
assert response.data['hasIssues'] is False
assert response.data['<API key>'] is False
assert response.data['numIssues'] == 0
assert response.data['issuesProcessing'] == 0
|
#include "base/basictypes.h"
#include "chrome/browser/sync/<API key>.h"
#include "chrome/test/live_sync/<API key>.h"
class <API key> : public LiveThemesSyncTest {
public:
<API key>() : LiveThemesSyncTest(SINGLE_CLIENT) {}
virtual ~<API key>() {}
private:
<API key>(<API key>);
};
// TODO(akalin): Add tests for model association (i.e., tests that
// start with SetupClients(), change the theme state, then call
// SetupSync()).
<API key>(<API key>, CustomTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
ASSERT_FALSE(UsingCustomTheme(GetProfile(0)));
ASSERT_FALSE(UsingCustomTheme(verifier()));
UseCustomTheme(GetProfile(0), 0);
UseCustomTheme(verifier(), 0);
ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0)));
ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier()));
ASSERT_TRUE(GetClient(0)-><API key>(
"Waiting for custom themes change."));
ASSERT_EQ(GetCustomTheme(0), GetThemeID(GetProfile(0)));
ASSERT_EQ(GetCustomTheme(0), GetThemeID(verifier()));
}
<API key>(<API key>, NativeTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
UseCustomTheme(GetProfile(0), 0);
UseCustomTheme(verifier(), 0);
ASSERT_FALSE(UsingNativeTheme(GetProfile(0)));
ASSERT_FALSE(UsingNativeTheme(verifier()));
ASSERT_TRUE(GetClient(0)-><API key>(
"Waiting for custom themes change."));
UseNativeTheme(GetProfile(0));
UseNativeTheme(verifier());
ASSERT_TRUE(UsingNativeTheme(GetProfile(0)));
ASSERT_TRUE(UsingNativeTheme(verifier()));
ASSERT_TRUE(GetClient(0)-><API key>(
"Waiting for native themes change."));
ASSERT_TRUE(UsingNativeTheme(GetProfile(0)));
ASSERT_TRUE(UsingNativeTheme(verifier()));
}
<API key>(<API key>, DefaultTheme) {
ASSERT_TRUE(SetupSync()) << "SetupSync() failed.";
UseCustomTheme(GetProfile(0), 0);
UseCustomTheme(verifier(), 0);
ASSERT_FALSE(UsingDefaultTheme(GetProfile(0)));
ASSERT_FALSE(UsingDefaultTheme(verifier()));
ASSERT_TRUE(GetClient(0)-><API key>(
"Waiting for custom themes change."));
UseDefaultTheme(GetProfile(0));
UseDefaultTheme(verifier());
ASSERT_TRUE(UsingDefaultTheme(GetProfile(0)));
ASSERT_TRUE(UsingDefaultTheme(verifier()));
ASSERT_TRUE(GetClient(0)-><API key>(
"Waiting for native themes change."));
ASSERT_TRUE(UsingDefaultTheme(GetProfile(0)));
ASSERT_TRUE(UsingDefaultTheme(verifier()));
}
|
#ifndef <API key>
#define <API key>
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "chrome/browser/download/<API key>.h"
#include "chrome/browser/ui/gtk/menu_gtk.h"
class DownloadItemGtk;
class DownloadItemModel;
class <API key> : public <API key>,
public MenuGtk::Delegate {
public:
<API key>(DownloadItemModel* model,
DownloadItemGtk* download_item,
content::PageNavigator* navigator);
virtual ~<API key>();
void Popup(GtkWidget* widget, GdkEventButton* event);
private:
// MenuGtk::Delegate:
virtual void StoppedShowing() OVERRIDE;
virtual GtkWidget* <API key>(int command_id) const OVERRIDE;
// The menu we show on Popup(). We keep a pointer to it for a couple reasons:
// * we don't want to have to recreate the menu every time it's popped up.
// * we have to keep it in scope for longer than the duration of Popup(), or
// completing the user-selected action races against the menu's
// destruction.
scoped_ptr<MenuGtk> menu_;
// The download item that created us.
DownloadItemGtk* download_item_gtk_;
<API key>(<API key>);
};
#endif // <API key>
|
$.ajax({
url: './data/population.json',
success: function (data) {
var max = -Infinity;
data = data.map(function (item) {
max = Math.max(item[2], max);
return {
geoCoord: item.slice(0, 2),
value: item[2]
}
});
data.forEach(function (item) {
item.barHeight = item.value / max * 50 + 0.1
});
myChart.setOption({
title : {
text: 'Gridded Population of the World (2000)',
subtext: 'Data from Socioeconomic Data and Applications Center',
sublink : 'http://sedac.ciesin.columbia.edu/data/set/<API key>/data-download#close',
x:'center',
y:'top',
textStyle: {
color: 'white'
}
},
tooltip: {
formatter: '{b}'
},
dataRange: {
min: 0,
max: max,
text:['High','Low'],
realtime: false,
calculable : true,
color: ['red','yellow','lightskyblue']
},
series: [{
type: 'map3d',
mapType: 'world',
baseLayer: {
backgroundColor: 'rgba(0, 150, 200, 0.5)'
},
data: [{}],
itemStyle: {
normal: {
areaStyle: {
color: 'rgba(0, 150, 200, 0.8)'
},
borderColor: '#777'
}
},
markBar: {
barSize: 0.6,
data: data
},
autoRotate: true,
}]
});
}
});
|
#ifndef Element_h
#define Element_h
#include "core/CSSPropertyNames.h"
#include "core/CoreExport.h"
#include "core/HTMLNames.h"
#include "core/css/CSSPrimitiveValue.h"
#include "core/css/CSSSelector.h"
#include "core/dom/AXObjectCache.h"
#include "core/dom/Attribute.h"
#include "core/dom/ContainerNode.h"
#include "core/dom/Document.h"
#include "core/dom/ElementData.h"
#include "core/dom/SpaceSplitString.h"
#include "core/html/CollectionType.h"
#include "platform/heap/Handle.h"
#include "public/platform/WebFocusType.h"
namespace blink {
class ElementAnimations;
class Attr;
class Attribute;
class CSSStyleDeclaration;
class ClientRect;
class ClientRectList;
class CompositorMutation;
class <API key>;
class DOMStringMap;
class DOMTokenList;
class Dictionary;
class ElementRareData;
class ElementShadow;
class ExceptionState;
class Image;
class IntSize;
class Locale;
class <API key>;
class <API key>;
class <API key>;
class PseudoElement;
class ScrollState;
class ScrollStateCallback;
class ScrollToOptions;
class ShadowRoot;
class ShadowRootInit;
class StylePropertySet;
class StylePropertyMap;
enum <API key> {
<API key>,
<API key>,
<API key>
};
enum ElementFlags {
<API key> = 1 << 0,
<API key> = 1 << 1,
IsInCanvasSubtree = 1 << 2,
<API key> = 1 << 3,
IsInTopLayer = 1 << 4,
HasPendingResources = 1 << 5,
<API key> = 6, // Required size of bitfield used to store the flags.
};
enum class ShadowRootType;
enum class <API key> {
Reset,
Restore,
None,
};
struct FocusParams {
STACK_ALLOCATED();
FocusParams() {}
FocusParams(<API key> selection, WebFocusType focusType, <API key>* capabilities)
: selectionBehavior(selection)
, type(focusType)
, sourceCapabilities(capabilities) {}
<API key> selectionBehavior = <API key>::Restore;
WebFocusType type = WebFocusTypeNone;
Member<<API key>> sourceCapabilities = nullptr;
};
typedef HeapVector<Member<Attr>> AttrNodeList;
class CORE_EXPORT Element : public ContainerNode {
<API key>();
public:
static Element* create(const QualifiedName&, Document*);
~Element() override;
<API key>(beforecopy);
<API key>(beforecut);
<API key>(beforepaste);
<API key>(copy);
<API key>(cut);
<API key>(gotpointercapture);
<API key>(lostpointercapture);
<API key>(paste);
<API key>(search);
<API key>(selectstart);
<API key>(wheel);
bool hasAttribute(const QualifiedName&) const;
const AtomicString& getAttribute(const QualifiedName&) const;
// Passing nullAtom as the second parameter removes the attribute when calling either of these set methods.
void setAttribute(const QualifiedName&, const AtomicString& value);
void <API key>(const QualifiedName&, const AtomicString& value);
void removeAttribute(const QualifiedName&);
// Typed getters and setters for language bindings.
int <API key>(const QualifiedName& attributeName) const;
void <API key>(const QualifiedName& attributeName, int value);
void <API key>(const QualifiedName& attributeName, unsigned value);
double <API key>(const QualifiedName& attributeName, double fallbackValue = std::numeric_limits<double>::quiet_NaN()) const;
void <API key>(const QualifiedName& attributeName, double value);
// Call this to get the value of an attribute that is known not to be the style
// attribute or one of the SVG animatable attributes.
bool fastHasAttribute(const QualifiedName&) const;
const AtomicString& fastGetAttribute(const QualifiedName&) const;
#if DCHECK_IS_ON()
bool <API key>(const QualifiedName&) const;
#endif
#ifdef <API key>
bool hasNamedNodeMap() const;
#endif
bool hasAttributes() const;
bool hasAttribute(const AtomicString& name) const;
bool hasAttributeNS(const AtomicString& namespaceURI, const AtomicString& localName) const;
const AtomicString& getAttribute(const AtomicString& name) const;
const AtomicString& getAttributeNS(const AtomicString& namespaceURI, const AtomicString& localName) const;
void setAttribute(const AtomicString& name, const AtomicString& value, ExceptionState&);
static bool parseAttributeName(QualifiedName&, const AtomicString& namespaceURI, const AtomicString& qualifiedName, ExceptionState&);
void setAttributeNS(const AtomicString& namespaceURI, const AtomicString& qualifiedName, const AtomicString& value, ExceptionState&);
const AtomicString& getIdAttribute() const;
void setIdAttribute(const AtomicString&);
const AtomicString& getNameAttribute() const;
const AtomicString& getClassAttribute() const;
bool <API key>() const;
// Call this to get the value of the id attribute for style resolution purposes.
// The value will already be lowercased if the document is in compatibility mode,
// so this function is not suitable for non-style uses.
const AtomicString& <API key>() const;
// This getter takes care of synchronizing all attributes before returning the
// AttributeCollection. If the Element has no attributes, an empty AttributeCollection
// will be returned. This is not a trivial getter and its return value should be cached
// for performance.
AttributeCollection attributes() const;
// This variant will not update the potentially invalid attributes. To be used when not interested
// in style attribute or one of the SVG animation attributes.
AttributeCollection <API key>() const;
void scrollIntoView(bool alignToTop = true);
void <API key>(bool centerIfNeeded = true);
int offsetLeft();
int offsetTop();
int offsetWidth();
int offsetHeight();
Element* offsetParent();
int clientLeft();
int clientTop();
int clientWidth();
int clientHeight();
double scrollLeft();
double scrollTop();
void setScrollLeft(double);
void setScrollTop(double);
int scrollWidth();
int scrollHeight();
void scrollBy(double x, double y);
virtual void scrollBy(const ScrollToOptions&);
void scrollTo(double x, double y);
virtual void scrollTo(const ScrollToOptions&);
IntRect boundsInViewport() const;
ClientRectList* getClientRects();
ClientRect* <API key>();
bool <API key>() const;
const AtomicString& computedRole();
String computedName();
void <API key>(Document&) override;
void removeAttribute(const AtomicString& name);
void removeAttributeNS(const AtomicString& namespaceURI, const AtomicString& localName);
Attr* detachAttribute(size_t index);
Attr* getAttributeNode(const AtomicString& name);
Attr* getAttributeNodeNS(const AtomicString& namespaceURI, const AtomicString& localName);
Attr* setAttributeNode(Attr*, ExceptionState&);
Attr* setAttributeNodeNS(Attr*, ExceptionState&);
Attr* removeAttributeNode(Attr*, ExceptionState&);
Attr* attrIfExists(const QualifiedName&);
Attr* ensureAttr(const QualifiedName&);
AttrNodeList* attrNodeList();
CSSStyleDeclaration* style();
StylePropertyMap* styleMap();
const QualifiedName& tagQName() const { return m_tagName; }
String tagName() const { return nodeName(); }
bool hasTagName(const QualifiedName& tagName) const { return m_tagName.matches(tagName); }
bool hasTagName(const HTMLQualifiedName& tagName) const { return ContainerNode::hasTagName(tagName); }
bool hasTagName(const SVGQualifiedName& tagName) const { return ContainerNode::hasTagName(tagName); }
// Should be called only by Document::createElementNS to fix up m_tagName immediately after construction.
void <API key>(const QualifiedName&);
// A fast function for checking the local name against another atomic string.
bool hasLocalName(const AtomicString& other) const { return m_tagName.localName() == other; }
const AtomicString& localName() const { return m_tagName.localName(); }
AtomicString <API key>() const;
const AtomicString& prefix() const { return m_tagName.prefix(); }
const AtomicString& namespaceURI() const { return m_tagName.namespaceURI(); }
const AtomicString& <API key>(const AtomicString& namespaceURI) const;
String nodeName() const override;
Element* <API key>();
Element* <API key>();
void <API key>();
void setBooleanAttribute(const QualifiedName&, bool);
virtual const StylePropertySet* <API key>() { return nullptr; }
void <API key>();
const StylePropertySet* inlineStyle() const { return elementData() ? elementData()->m_inlineStyle.get() : nullptr; }
void <API key>(CSSPropertyID, CSSValueID identifier, bool important = false);
void <API key>(CSSPropertyID, double value, CSSPrimitiveValue::UnitType, bool important = false);
void <API key>(CSSPropertyID, CSSValue*, bool important = false);
bool <API key>(CSSPropertyID, const String& value, bool important = false);
bool <API key>(CSSPropertyID);
void <API key>();
void <API key>() const;
const StylePropertySet* <API key>();
virtual bool <API key>(const QualifiedName&) const { return false; }
virtual void <API key>(const QualifiedName&, const AtomicString&, <API key>*) { }
// For exposing to DOM only.
NamedNodeMap* <API key>() const;
enum <API key> {
ModifiedDirectly,
ModifiedByCloning
};
// This method is called whenever an attribute is added, changed or removed.
virtual void attributeChanged(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue, <API key> = ModifiedDirectly);
virtual void parseAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue);
virtual bool <API key>(const QualifiedName&) const;
virtual const QualifiedName& <API key>() const;
// Only called by the parser immediately after element construction.
void parserSetAttributes(const Vector<Attribute>&);
// Remove attributes that might introduce scripting from the vector leaving the element unchanged.
void <API key>(Vector<Attribute>&) const;
bool <API key>(const Element& other) const { return elementData() == other.elementData(); }
// Clones attributes only.
void <API key>(const Element&);
// Clones all attribute-derived data, including subclass specifics (through <API key>.)
void <API key>(const Element&);
bool <API key>(const Element* other) const;
virtual void <API key>(const Element&) { }
void attach(const AttachContext& = AttachContext()) override;
void detach(const AttachContext& = AttachContext()) override;
virtual LayoutObject* createLayoutObject(const ComputedStyle&);
virtual bool <API key>(const ComputedStyle&);
void recalcStyle(StyleRecalcChange, Text* nextTextSibling = nullptr);
void pseudoStateChanged(CSSSelector::PseudoType);
void <API key>(bool);
void <API key>();
void <API key>();
void <API key>();
bool <API key>() const;
ElementShadow* shadow() const;
ElementShadow& ensureShadow();
// If type of ShadowRoot (either closed or open) is explicitly specified, creation of multiple
// shadow roots is prohibited in any combination and throws an exception. Multiple shadow roots
// are allowed only when createShadowRoot() is used without any parameters from JavaScript.
ShadowRoot* createShadowRoot(const ScriptState*, ExceptionState&);
ShadowRoot* attachShadow(const ScriptState*, const ShadowRootInit&, ExceptionState&);
ShadowRoot* <API key>(ShadowRootType, ExceptionState&);
ShadowRoot* openShadowRoot() const;
ShadowRoot* closedShadowRoot() const;
ShadowRoot* authorShadowRoot() const;
ShadowRoot* userAgentShadowRoot() const;
ShadowRoot* youngestShadowRoot() const;
ShadowRoot* shadowRootIfV1() const;
ShadowRoot& <API key>();
bool <API key>(const Element* shadowHost) const;
const ComputedStyle* ensureComputedStyle(PseudoId = PseudoIdNone);
// Methods for indicating the style is affected by dynamic updates (e.g., children changing, our position changing in our sibling list, etc.)
bool <API key>() const { return hasElementFlag(<API key>); }
void <API key>() { setElementFlag(<API key>); }
void <API key>(bool value) { setElementFlag(IsInCanvasSubtree, value); }
bool isInCanvasSubtree() const { return hasElementFlag(IsInCanvasSubtree); }
bool isDefined() const { return <API key>() != CustomElementState::Undefined; }
bool <API key>() { return <API key>() == V0Upgraded; }
bool <API key>() { return <API key>() == V0WaitingForUpgrade; }
AtomicString <API key>() const;
Locale& locale() const;
virtual void accessKeyAction(bool /*sendToAnyEvent*/) { }
virtual bool isURLAttribute(const Attribute&) const { return false; }
virtual bool <API key>(const Attribute&) const { return false; }
bool <API key>(const Attribute&) const;
virtual bool <API key>(const Attribute&) const { return false; }
virtual bool isLiveLink() const { return false; }
KURL hrefURL() const;
KURL getURLAttribute(const QualifiedName&) const;
KURL <API key>(const QualifiedName&) const;
virtual const AtomicString imageSourceURL() const;
virtual Image* imageContents() { return nullptr; }
virtual void focus(const FocusParams& = FocusParams());
virtual void <API key>(<API key>);
virtual void blur();
void setDistributeScroll(ScrollStateCallback*, String <API key>);
void <API key>(ScrollState&);
void setApplyScroll(ScrollStateCallback*, String <API key>);
void removeApplyScroll();
void nativeApplyScroll(ScrollState&);
void <API key>(ScrollState&);
void callApplyScroll(ScrollState&);
ScrollStateCallback* getApplyScroll();
// Whether this element can receive focus at all. Most elements are not
// focusable but some elements, such as form controls and links, are. Unlike
// <API key>(), this method may be called when layout is not up to
// date, so it must not use the layoutObject to determine focusability.
virtual bool supportsFocus() const;
// isFocusable(), isKeyboardFocusable(), and isMouseFocusable() check
// whether the element can actually be focused. Callers should ensure
// ComputedStyle is up to date;
// e.g. by calling Document::<API key>().
bool isFocusable() const;
virtual bool isKeyboardFocusable() const;
virtual bool isMouseFocusable() const;
bool <API key>() const;
virtual void dispatchFocusEvent(Element* oldFocusedElement, WebFocusType, <API key>* sourceCapabilities = nullptr);
virtual void dispatchBlurEvent(Element* newFocusedElement, WebFocusType, <API key>* sourceCapabilities = nullptr);
virtual void <API key>(const AtomicString& eventType, Element* oldFocusedElement, WebFocusType, <API key>* sourceCapabilities = nullptr);
void <API key>(const AtomicString& eventType, Element* newFocusedElement, <API key>* sourceCapabilities = nullptr);
String innerText();
String outerText();
String innerHTML() const;
String outerHTML() const;
void setInnerHTML(const String&, ExceptionState&);
void setOuterHTML(const String&, ExceptionState&);
Element* <API key>(const String& where, Element* newChild, ExceptionState&);
void insertAdjacentText(const String& where, const String& text, ExceptionState&);
void insertAdjacentHTML(const String& where, const String& html, ExceptionState&);
void setPointerCapture(int pointerId, ExceptionState&);
void <API key>(int pointerId, ExceptionState&);
String textFromChildren();
virtual String title() const { return String(); }
virtual String defaultToolTip() const { return String(); }
virtual const AtomicString& shadowPseudoId() const;
// The specified string must start with "-webkit-" or "-internal-". The
// former can be used as a selector in any places, and the latter can be
// used only in UA stylesheet.
void setShadowPseudoId(const AtomicString&);
LayoutSize <API key>() const;
void <API key>(const LayoutSize&);
virtual void <API key>() { }
virtual void <API key>() { }
// Called by the parser when this element's close tag is reached,
// signaling that all child tags have been parsed and added.
// This is needed for <applet> and <object> elements, which can't lay themselves out
// until they know all of their nested <param>s. [Radar 3603191, 4040848].
// Also used for script elements and some SVG elements for similar purposes,
// but making parsing a special case in this respect should be avoided if possible.
virtual void <API key>();
void <API key>() { <API key>(false); }
PseudoElement* pseudoElement(PseudoId) const;
LayoutObject* <API key>(PseudoId) const;
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
bool matches(const String& selectors, ExceptionState&);
Element* closest(const String& selectors, ExceptionState&);
virtual bool <API key>() const { return false; }
DOMTokenList& classList();
DOMStringMap& dataset();
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool isSpinButtonElement() const { return false; }
virtual bool isTextFormControl() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
virtual bool willValidate() const { return false; }
virtual bool isValidElement() { return false; }
virtual bool isInRange() const { return false; }
virtual bool isOutOfRange() const { return false; }
virtual bool <API key>() const { return false; }
bool <API key>() const override { return true; }
// Used for disabled form elements; if true, prevents mouse events from being dispatched
// to event listeners, and prevents DOMActivate events from being sent at all.
virtual bool <API key>() const { return false; }
bool hasPendingResources() const { return hasElementFlag(HasPendingResources); }
void <API key>() { setElementFlag(HasPendingResources); }
void <API key>() { clearElementFlag(HasPendingResources); }
virtual void <API key>() { }
void <API key>(<API key>*);
<API key>* <API key>() const;
bool <API key>() const { return hasElementFlag(<API key>); }
void <API key>(bool);
void <API key>(bool);
bool isInTopLayer() const { return hasElementFlag(IsInTopLayer); }
void setIsInTopLayer(bool);
void requestPointerLock();
bool <API key>() const;
// FIXME: public for LayoutTreeBuilder, we shouldn't expose this though.
PassRefPtr<ComputedStyle> <API key>();
bool hasID() const;
bool hasClass() const;
const SpaceSplitString& classNames() const;
IntSize <API key>() const;
void <API key>(const IntSize&);
ElementAnimations* elementAnimations() const;
ElementAnimations& <API key>();
bool hasAnimations() const;
void <API key>(const AtomicString& localName) const;
<API key>& <API key>();
void <API key>();
void setTabIndex(int);
short tabIndex() const override;
// A compositor proxy is a very limited wrapper around an element. It
// exposes only those properties that are requested at the time the proxy is
// created. In order to know which properties are actually proxied, we
// maintain a count of the number of compositor proxies associated with each
// property.
bool hasCompositorProxy() const;
void <API key>(uint32_t mutableProperties);
void <API key>(uint32_t mutableProperties);
uint32_t <API key>() const;
void <API key>(const CompositorMutation&);
// Helpers for V8DOMActivityLogger::logEvent. They call logEvent only if
// the element is <API key>() and the context is an isolated world.
void <API key>(const char element[], const QualifiedName& attr1);
void <API key>(const char element[], const QualifiedName& attr1, const QualifiedName& attr2);
void <API key>(const char element[], const QualifiedName& attr1, const QualifiedName& attr2, const QualifiedName& attr3);
void <API key>(const char element[], const QualifiedName& attributeName, const AtomicString& oldValue, const AtomicString& newValue);
<API key>();
<API key>();
<API key> <API key>() const;
<API key>* <API key>() const;
<API key>& <API key>();
protected:
Element(const QualifiedName& tagName, Document*, ConstructionType);
const ElementData* elementData() const { return m_elementData.get(); }
UniqueElementData& <API key>();
void <API key>(<API key>*, CSSPropertyID, CSSValueID identifier);
void <API key>(<API key>*, CSSPropertyID, double value, CSSPrimitiveValue::UnitType);
void <API key>(<API key>*, CSSPropertyID, const String& value);
void <API key>(<API key>*, CSSPropertyID, CSSValue*);
<API key> insertedInto(ContainerNode*) override;
void removedFrom(ContainerNode*) override;
void childrenChanged(const ChildrenChange&) override;
virtual void willRecalcStyle(StyleRecalcChange);
virtual void didRecalcStyle(StyleRecalcChange);
virtual PassRefPtr<ComputedStyle> <API key>();
virtual bool <API key>() const { return false; }
virtual bool <API key>() const { return false; }
bool <API key>() const;
void <API key>();
void <API key>(short);
// Subclasses may override this method to affect focusability. This method
// must be called on an up-to-date ComputedStyle, so it may use existence of
// layoutObject and the LayoutObject::style() to reason about focusability.
// However, it must not retrieve layout information like position and size.
// This method cannot be moved to LayoutObject because some focusable nodes
// don't have layoutObjects. e.g., HTMLOptionElement.
// TODO(tkent): Rename this to isFocusableStyle.
virtual bool <API key>() const;
// <API key>() exists to share code between
// parseAttribute (called via setAttribute()) and
// svgAttributeChanged (called when element.className.baseValue is set)
void <API key>(const AtomicString& newClassString);
static bool <API key>(const Attribute&);
PassRefPtr<ComputedStyle> <API key>();
Node* insertAdjacent(const String& where, Node* newChild, ExceptionState&);
virtual void <API key>() { }
private:
void scrollLayoutBoxBy(const ScrollToOptions&);
void scrollLayoutBoxTo(const ScrollToOptions&);
void scrollFrameBy(const ScrollToOptions&);
void scrollFrameTo(const ScrollToOptions&);
bool hasElementFlag(ElementFlags mask) const { return hasRareData() && <API key>(mask); }
void setElementFlag(ElementFlags, bool value = true);
void clearElementFlag(ElementFlags);
bool <API key>(ElementFlags) const;
bool isElementNode() const = delete; // This will catch anyone doing an unnecessary check.
bool isDocumentFragment() const = delete; // This will catch anyone doing an unnecessary check.
bool isDocumentNode() const = delete; // This will catch anyone doing an unnecessary check.
void <API key>(const AtomicString& newStyleString, <API key>);
void <API key>();
void inlineStyleChanged();
<API key>* <API key>();
void <API key>(const AtomicString&);
StyleRecalcChange recalcOwnStyle(StyleRecalcChange);
inline void <API key>();
void updatePseudoElement(PseudoId, StyleRecalcChange);
bool updateFirstLetter(Element*);
inline void <API key>(PseudoId);
ShadowRoot* shadowRoot() const;
// FIXME: Everyone should allow author shadows.
virtual bool are<API key>() const { return true; }
virtual void <API key>(ShadowRoot&) { }
virtual bool <API key>() const { return false; }
enum <API key> { <API key> = 0, <API key> };
void didAddAttribute(const QualifiedName&, const AtomicString&);
void willModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue);
void didModifyAttribute(const QualifiedName&, const AtomicString& oldValue, const AtomicString& newValue);
void didRemoveAttribute(const QualifiedName&, const AtomicString& oldValue);
void <API key>() const;
void <API key>(const QualifiedName&) const;
void updateId(const AtomicString& oldId, const AtomicString& newId);
void updateId(TreeScope&, const AtomicString& oldId, const AtomicString& newId);
void updateName(const AtomicString& oldName, const AtomicString& newName);
NodeType getNodeType() const final;
bool childTypeAllowed(NodeType) const final;
void <API key>(size_t index, const QualifiedName&, const AtomicString& value, <API key>);
void <API key>(const QualifiedName&, const AtomicString& value, <API key>);
void <API key>(size_t index, <API key>);
void <API key>(const QualifiedName&, const AtomicString&, <API key>);
#ifndef NDEBUG
void formatForDebugger(char* buffer, unsigned length) const override;
#endif
bool <API key>(const ComputedStyle* currentStyle, ComputedStyle* newStyle);
void <API key>();
const ComputedStyle* <API key>(PseudoId <API key> = PseudoIdNone) override { return ensureComputedStyle(<API key>); }
inline void <API key>(const ComputedStyle* oldStyle, const ComputedStyle* newStyle);
inline void <API key>();
inline void <API key>();
// cloneNode is private so that non-virtual <API key> and <API key>
// are used instead.
Node* cloneNode(bool deep) override;
virtual Element* <API key>();
QualifiedName m_tagName;
void <API key>(const AtomicString& oldName, const AtomicString& newName);
void <API key>(const AtomicString& oldName, const AtomicString& newName);
void <API key>();
bool <API key>(ElementShadow*, const QualifiedName&, const AtomicString&);
ElementRareData* elementRareData() const;
ElementRareData& <API key>();
AttrNodeList& ensureAttrNodeList();
void removeAttrNodeList();
void <API key>();
void <API key>(Attr*, const AtomicString& value);
void <API key>(Attr*, size_t index);
v8::Local<v8::Object> wrapCustomElement(v8::Isolate*, v8::Local<v8::Object> creationContext);
Member<ElementData> m_elementData;
};
<API key>(Element, isElementNode());
template <typename T> bool isElementOfType(const Node&);
template <> inline bool isElementOfType<const Element>(const Node& node) { return node.isElementNode(); }
template <typename T> inline bool isElementOfType(const Element& element) { return isElementOfType<T>(static_cast<const Node&>(element)); }
template <> inline bool isElementOfType<const Element>(const Element&) { return true; }
// Type casting.
template<typename T> inline T& toElement(Node& node)
{
<API key>(isElementOfType<const T>(node));
return static_cast<T&>(node);
}
template<typename T> inline T* toElement(Node* node)
{
<API key>(!node || isElementOfType<const T>(*node));
return static_cast<T*>(node);
}
template<typename T> inline const T& toElement(const Node& node)
{
<API key>(isElementOfType<const T>(node));
return static_cast<const T&>(node);
}
template<typename T> inline const T* toElement(const Node* node)
{
<API key>(!node || isElementOfType<const T>(*node));
return static_cast<const T*>(node);
}
template<typename T, typename U> inline T* toElement(const RefPtr<U>& node) { return toElement<T>(node.get()); }
inline bool <API key>(const Node* node)
{
return node->isElementNode() && toElement(node)-><API key>();
}
inline Element* Node::parentElement() const
{
ContainerNode* parent = parentNode();
return parent && parent->isElementNode() ? toElement(parent) : nullptr;
}
inline bool Element::fastHasAttribute(const QualifiedName& name) const
{
#if DCHECK_IS_ON()
DCHECK(<API key>(name));
#endif
return elementData() && elementData()->attributes().findIndex(name) != kNotFound;
}
inline const AtomicString& Element::fastGetAttribute(const QualifiedName& name) const
{
#if DCHECK_IS_ON()
DCHECK(<API key>(name));
#endif
if (elementData()) {
if (const Attribute* attribute = elementData()->attributes().find(name))
return attribute->value();
}
return nullAtom;
}
inline AttributeCollection Element::attributes() const
{
if (!elementData())
return AttributeCollection();
<API key>();
return elementData()->attributes();
}
inline AttributeCollection Element::<API key>() const
{
if (!elementData())
return AttributeCollection();
return elementData()->attributes();
}
inline bool Element::hasAttributes() const
{
return !attributes().isEmpty();
}
inline const AtomicString& Element::<API key>() const
{
DCHECK(hasID());
return elementData()-><API key>();
}
inline const AtomicString& Element::getIdAttribute() const
{
return hasID() ? fastGetAttribute(HTMLNames::idAttr) : nullAtom;
}
inline const AtomicString& Element::getNameAttribute() const
{
return hasName() ? fastGetAttribute(HTMLNames::nameAttr) : nullAtom;
}
inline const AtomicString& Element::getClassAttribute() const
{
if (!hasClass())
return nullAtom;
if (isSVGElement())
return getAttribute(HTMLNames::classAttr);
return fastGetAttribute(HTMLNames::classAttr);
}
inline void Element::setIdAttribute(const AtomicString& value)
{
setAttribute(HTMLNames::idAttr, value);
}
inline const SpaceSplitString& Element::classNames() const
{
DCHECK(hasClass());
DCHECK(elementData());
return elementData()->classNames();
}
inline bool Element::hasID() const
{
return elementData() && elementData()->hasID();
}
inline bool Element::hasClass() const
{
return elementData() && elementData()->hasClass();
}
inline UniqueElementData& Element::<API key>()
{
if (!elementData() || !elementData()->isUnique())
<API key>();
return toUniqueElementData(*m_elementData);
}
inline Node::<API key> Node::insertedInto(ContainerNode* insertionPoint)
{
DCHECK(!<API key>());
DCHECK(!<API key>());
DCHECK(insertionPoint-><API key>() || insertionPoint->isInShadowTree() || isContainerNode());
if (insertionPoint-><API key>()) {
setFlag(InDocumentFlag);
insertionPoint->document().incrementNodeCount();
}
if (<API key>()->isInShadowTree())
setFlag(IsInShadowTreeFlag);
if (<API key>() && !insertionPoint-><API key>())
insertionPoint-><API key>();
if (document().shadowCascadeOrder() == ShadowCascadeOrder::ShadowCascadeV1)
<API key>(insertionPoint);
return InsertionDone;
}
inline void Node::removedFrom(ContainerNode* insertionPoint)
{
DCHECK(insertionPoint-><API key>() || isContainerNode() || isInShadowTree());
if (insertionPoint-><API key>()) {
clearFlag(InDocumentFlag);
insertionPoint->document().decrementNodeCount();
}
if (isInShadowTree() && !treeScope().rootNode().isShadowRoot())
clearFlag(IsInShadowTreeFlag);
if (AXObjectCache* cache = document().<API key>())
cache->remove(this);
}
inline void Element::<API key>()
{
DCHECK(elementData());
elementData()-><API key> = true;
}
inline const StylePropertySet* Element::<API key>()
{
if (!elementData())
return nullptr;
if (elementData()-><API key>)
<API key>();
// Need to call elementData() again since <API key>()
// might swap it with a UniqueElementData.
return elementData()-><API key>();
}
inline void Element::<API key>(const QualifiedName& tagName)
{
// We expect this method to be called only to reset the prefix.
DCHECK_EQ(tagName.localName(), m_tagName.localName());
DCHECK_EQ(tagName.namespaceURI(), m_tagName.namespaceURI());
m_tagName = tagName;
}
inline AtomicString Element::<API key>() const
{
if (isHTMLElement() || !document().isHTMLDocument())
return localName();
return localName().lower();
}
inline bool isShadowHost(const Node* node)
{
return node && node->isElementNode() && toElement(node)->shadow();
}
inline bool isShadowHost(const Node& node)
{
return node.isElementNode() && toElement(node).shadow();
}
inline bool isShadowHost(const Element* element)
{
return element && element->shadow();
}
inline bool isShadowHost(const Element& element)
{
return element.shadow();
}
inline bool isAtShadowBoundary(const Element* element)
{
if (!element)
return false;
ContainerNode* parentNode = element->parentNode();
return parentNode && parentNode->isShadowRoot();
}
// These macros do the same as their NODE equivalents but additionally provide a template specialization
// for isElementOfType<>() so that the Traversal<> API works for these Element types.
#define <API key>(thisType, predicate) \
template <> inline bool isElementOfType<const thisType>(const Node& node) { return node.predicate; } \
<API key>(thisType, predicate)
#define <API key>(thisType) \
template <> inline bool isElementOfType<const thisType>(const Node& node) { return is##thisType(node); } \
<API key>(thisType)
#define <API key>(T) \
static T* create(const QualifiedName&, Document&)
#define <API key>(T) \
T* T::create(const QualifiedName& tagName, Document& document) \
{ \
return new T(tagName, document); \
}
} // namespace blink
#endif // Element_h
|
#include <stdexcept>
#include "mitkTestingMacros.h"
#include <mitkITKImageImport.h>
#include <<API key>.h>
#define TestImageType(type, dim) \
MITK_TEST_CONDITION(typeid(type) == typeid(TPixel) && dim == VDimension, \
"Checking for correct type itk::Image<" #type "," #dim ">")
#define TestVectorImageType(type, dim) \
MITK_TEST_CONDITION(typeid(type) == typeid(TPixel) && dim == VDimension && \
typeid(itk::<API key><type>) == typeid(typename ImageType::PixelType), \
"Checking for correct type itk::VectorImage<" #type "," #dim ">")
class AccessByItkTest
{
public:
typedef AccessByItkTest Self;
typedef itk::Image<int, 2> IntImage2D;
typedef itk::Image<int, 3> IntImage3D;
typedef itk::Image<float, 2> FloatImage2D;
typedef itk::Image<float, 3> FloatImage3D;
typedef itk::VectorImage<int, 3> IntVectorImage3D;
enum EImageType
{
Unknown = 0,
Int2D,
Int3D,
Float2D,
Float3D
};
void testAccessByItk()
{
mitk::Image::Pointer mitkIntImage2D = createMitkImage<IntImage2D>();
mitk::Image::ConstPointer mitkIntImage3D(createMitkImage<IntImage3D>());
mitk::Image::ConstPointer mitkFloatImage2D(createMitkImage<FloatImage2D>());
mitk::Image::Pointer mitkFloatImage3D = createMitkImage<FloatImage3D>();
AccessByItk(mitkIntImage2D, AccessItkImage);
AccessByItk(mitkIntImage3D, AccessItkImage);
AccessByItk(mitkFloatImage2D, AccessItkImage);
AccessByItk(mitkFloatImage3D, AccessItkImage);
AccessByItk_n(mitkIntImage2D, AccessItkImage, (Int2D, 2));
AccessByItk_n(mitkIntImage3D, AccessItkImage, (Int3D, 2));
AccessByItk_n(mitkFloatImage2D, AccessItkImage, (Float2D, 2));
AccessByItk_n(mitkFloatImage3D, AccessItkImage, (Float3D, 2));
mitk::Image::Pointer <API key> = createMitkImage<IntVectorImage3D>(2);
// Test for wrong pixel type (the AccessByItk macro multi-plexes integral
// types only by default)
<API key>(const mitk::<API key> &)
AccessByItk(<API key>, AccessItkImage);
<API key>(const mitk::<API key> &)
// Test for correct handling of vector images
<API key>(<API key>, AccessItkImage);
<API key>(<API key>, AccessItkImage, (Int3D, 2));
}
void <API key>()
{
mitk::Image::Pointer mitkIntImage2D = createMitkImage<IntImage2D>();
mitk::Image::ConstPointer mitkIntImage3D(createMitkImage<IntImage3D>());
mitk::Image::ConstPointer mitkFloatImage2D(createMitkImage<FloatImage2D>());
mitk::Image::Pointer mitkFloatImage3D = createMitkImage<FloatImage3D>();
<API key>(mitkIntImage2D, AccessItkImage, 2);
<API key>(mitkIntImage3D, AccessItkImage, 3);
<API key>(mitkFloatImage2D, AccessItkImage, 2);
<API key>(mitkFloatImage3D, AccessItkImage, 3);
<API key>(mitkIntImage2D, AccessItkImage, 2, (Int2D, 2));
<API key>(mitkIntImage3D, AccessItkImage, 3, (Int3D, 2));
<API key>(mitkFloatImage2D, AccessItkImage, 2, (Float2D, 2));
<API key>(mitkFloatImage3D, AccessItkImage, 3, (Float3D, 2));
// Test for wrong dimension
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, 2);
<API key>(const mitk::<API key> &)
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, 2, (Float3D, 2));
<API key>(const mitk::<API key> &)
}
void <API key>()
{
mitk::Image::Pointer mitkIntImage2D = createMitkImage<IntImage2D>();
mitk::Image::ConstPointer mitkIntImage3D(createMitkImage<IntImage3D>());
mitk::Image::ConstPointer mitkFloatImage2D(createMitkImage<FloatImage2D>());
mitk::Image::Pointer mitkFloatImage3D = createMitkImage<FloatImage3D>();
<API key>(mitkIntImage2D, AccessItkImage, (int)(float));
<API key>(mitkIntImage3D, AccessItkImage, (int)(float));
<API key>(mitkFloatImage2D, AccessItkImage, (int)(float));
<API key>(mitkFloatImage3D, AccessItkImage, (int)(float));
<API key>(mitkIntImage2D, AccessItkImage, (int)(float), (Int2D, 2));
<API key>(mitkIntImage3D, AccessItkImage, (int)(float), (Int3D, 2));
<API key>(mitkFloatImage2D, AccessItkImage, (int)(float), (Float2D, 2));
<API key>(mitkFloatImage3D, AccessItkImage, (int)(float), (Float3D, 2));
// Test for wrong pixel type
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, (int));
<API key>(const mitk::<API key> &)
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, (int), (Float3D, 2));
<API key>(const mitk::<API key> &)
}
void <API key>()
{
mitk::Image::Pointer mitkIntImage2D = createMitkImage<IntImage2D>();
mitk::Image::ConstPointer mitkIntImage3D(createMitkImage<IntImage3D>());
mitk::Image::ConstPointer mitkFloatImage2D(createMitkImage<FloatImage2D>());
mitk::Image::Pointer mitkFloatImage3D = createMitkImage<FloatImage3D>();
<API key>(mitkIntImage2D, AccessItkImage, (int)(float), (2)(3));
<API key>(mitkIntImage3D, AccessItkImage, (int)(float), (2)(3));
<API key>(mitkFloatImage2D, AccessItkImage, (int)(float), (2)(3));
<API key>(mitkFloatImage3D, AccessItkImage, (int)(float), (2)(3));
<API key>(mitkIntImage2D, AccessItkImage, (int)(float), (2)(3), (Int2D, 2));
<API key>(mitkIntImage3D, AccessItkImage, (int)(float), (2)(3), (Int3D, 2));
<API key>(mitkFloatImage2D, AccessItkImage, (int)(float), (2)(3), (Float2D, 2));
<API key>(mitkFloatImage3D, AccessItkImage, (int)(float), (2)(3), (Float3D, 2));
// Test for wrong dimension
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, (float), (2));
<API key>(const mitk::<API key> &)
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, (float), (2), (Float3D, 2));
<API key>(const mitk::<API key> &)
// Test for wrong pixel type
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, (int), (3));
<API key>(const mitk::<API key> &)
<API key>(const mitk::<API key> &)
<API key>(mitkFloatImage3D, AccessItkImage, (int), (3), (Float3D, 2));
<API key>(const mitk::<API key> &)
}
void <API key>()
{
mitk::Image::Pointer mitkIntImage2D = createMitkImage<IntImage2D>();
mitk::Image::ConstPointer mitkFloatImage2D(createMitkImage<FloatImage2D>());
<API key>(mitkIntImage2D, mitkFloatImage2D, AccessTwoItkImages, 2);
}
template <typename TPixel, unsigned int VDimension>
void AccessItkImage(const itk::Image<TPixel, VDimension> *,
EImageType param1 = Unknown,
int param2 = 0,
int param3 = 0)
{
switch (param1)
{
case Int2D:
TestImageType(int, 2) break;
case Int3D:
TestImageType(int, 3) break;
case Float2D:
TestImageType(float, 2) break;
case Float3D:
TestImageType(float, 3) break;
default:
break;
}
if (param2)
{
MITK_TEST_CONDITION(param2 == 2, "Checking for correct second parameter")
}
if (param3)
{
MITK_TEST_CONDITION(param3 == 3, "Checking for correct third parameter")
}
}
template <typename TPixel, unsigned int VDimension>
void AccessItkImage(itk::VectorImage<TPixel, VDimension> *,
EImageType param1 = Unknown,
int param2 = 0,
int param3 = 0)
{
typedef itk::VectorImage<TPixel, VDimension> ImageType;
switch (param1)
{
case Int2D:
TestVectorImageType(int, 2) break;
case Int3D:
TestVectorImageType(int, 3) break;
case Float2D:
TestVectorImageType(float, 2) break;
case Float3D:
TestVectorImageType(float, 3) break;
default:
break;
}
if (param2)
{
MITK_TEST_CONDITION(param2 == 2, "Checking for correct second parameter")
}
if (param3)
{
MITK_TEST_CONDITION(param3 == 3, "Checking for correct third parameter")
}
}
private:
template <typename TPixel1, unsigned int VDimension1, typename TPixel2, unsigned int VDimension2>
void AccessTwoItkImages(itk::Image<TPixel1, VDimension1> * /*itkImage1*/,
itk::Image<TPixel2, VDimension2> * /*itkImage2*/)
{
if (!(typeid(int) == typeid(TPixel1) && typeid(float) == typeid(TPixel2) && VDimension1 == 2 && VDimension2 == 2))
{
throw std::runtime_error("Image type mismatch");
}
}
template <typename ImageType>
mitk::Image::Pointer createMitkImage()
{
typename ImageType::Pointer itkImage = ImageType::New();
typename ImageType::IndexType start;
start.Fill(0);
typename ImageType::SizeType size;
size.Fill(3);
typename ImageType::RegionType region;
region.SetSize(size);
region.SetIndex(start);
itkImage->SetRegions(region);
itkImage->Allocate();
return mitk::GrabItkImageMemory(itkImage);
}
template <typename ImageType>
mitk::Image::Pointer createMitkImage(std::size_t vectorLength)
{
typename ImageType::Pointer itkImage = ImageType::New();
typename ImageType::IndexType start;
start.Fill(0);
typename ImageType::SizeType size;
size.Fill(3);
typename ImageType::RegionType region;
region.SetSize(size);
region.SetIndex(start);
itkImage->SetRegions(region);
itkImage->SetVectorLength(vectorLength);
itkImage->Allocate();
return mitk::GrabItkImageMemory(itkImage);
}
};
int mitkAccessByItkTest(int /*argc*/, char * /*argv*/ [])
{
MITK_TEST_BEGIN("AccessByItk")
AccessByItkTest accessTest;
MITK_TEST_OUTPUT(<< "Testing AccessByItk macro")
accessTest.testAccessByItk();
MITK_TEST_OUTPUT(<< "Testing <API key> macro")
accessTest.<API key>();
MITK_TEST_OUTPUT(<< "Testing <API key> macro")
accessTest.<API key>();
MITK_TEST_OUTPUT(<< "Testing <API key> macro")
accessTest.<API key>();
MITK_TEST_OUTPUT(<< "Testing <API key> macro")
accessTest.<API key>();
MITK_TEST_END()
}
|
#include "config.h"
#include <stdlib.h>
#include "alMain.h"
#include "alu.h"
#include "alFilter.h"
#include "alThunk.h"
#include "alError.h"
static void InitFilterParams(ALfilter *filter, ALenum type);
AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters)
{
ALCcontext *Context;
ALsizei cur = 0;
Context = GetContextRef();
if(!Context) return;
al_try
{
ALCdevice *device = Context->Device;
ALenum err;
CHECK_VALUE(Context, n >= 0);
for(cur = 0;cur < n;cur++)
{
ALfilter *filter = calloc(1, sizeof(ALfilter));
if(!filter)
{
alDeleteFilters(cur, filters);
al_throwerr(Context, AL_OUT_OF_MEMORY);
}
InitFilterParams(filter, AL_FILTER_NULL);
err = NewThunkEntry(&filter->id);
if(err == AL_NO_ERROR)
err = InsertUIntMapEntry(&device->FilterMap, filter->id, filter);
if(err != AL_NO_ERROR)
{
FreeThunkEntry(filter->id);
memset(filter, 0, sizeof(ALfilter));
free(filter);
alDeleteFilters(cur, filters);
al_throwerr(Context, err);
}
filters[cur] = filter->id;
}
}
al_endtry;
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters)
{
ALCcontext *Context;
ALfilter *Filter;
ALsizei i;
Context = GetContextRef();
if(!Context) return;
al_try
{
ALCdevice *device = Context->Device;
CHECK_VALUE(Context, n >= 0);
for(i = 0;i < n;i++)
{
if(filters[i] && LookupFilter(device, filters[i]) == NULL)
al_throwerr(Context, AL_INVALID_NAME);
}
for(i = 0;i < n;i++)
{
if((Filter=RemoveFilter(device, filters[i])) == NULL)
continue;
FreeThunkEntry(Filter->id);
memset(Filter, 0, sizeof(*Filter));
free(Filter);
}
}
al_endtry;
ALCcontext_DecRef(Context);
}
AL_API ALboolean AL_APIENTRY alIsFilter(ALuint filter)
{
ALCcontext *Context;
ALboolean result;
Context = GetContextRef();
if(!Context) return AL_FALSE;
result = ((!filter || LookupFilter(Context->Device, filter)) ?
AL_TRUE : AL_FALSE);
ALCcontext_DecRef(Context);
return result;
}
AL_API ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint value)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
if(param == AL_FILTER_TYPE)
{
if(value == AL_FILTER_NULL || value == AL_FILTER_LOWPASS)
InitFilterParams(ALFilter, value);
else
alSetError(Context, AL_INVALID_VALUE);
}
else
{
/* Call the appropriate handler */
ALfilter_SetParami(ALFilter, Context, param, value);
}
}
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, const ALint *values)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
switch(param)
{
case AL_FILTER_TYPE:
alFilteri(filter, param, values[0]);
return;
}
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
/* Call the appropriate handler */
ALfilter_SetParamiv(ALFilter, Context, param, values);
}
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat value)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
/* Call the appropriate handler */
ALfilter_SetParamf(ALFilter, Context, param, value);
}
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, const ALfloat *values)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
/* Call the appropriate handler */
ALfilter_SetParamfv(ALFilter, Context, param, values);
}
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *value)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
if(param == AL_FILTER_TYPE)
*value = ALFilter->type;
else
{
/* Call the appropriate handler */
ALfilter_GetParami(ALFilter, Context, param, value);
}
}
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *values)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
switch(param)
{
case AL_FILTER_TYPE:
alGetFilteri(filter, param, values);
return;
}
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
/* Call the appropriate handler */
ALfilter_GetParamiv(ALFilter, Context, param, values);
}
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *value)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
/* Call the appropriate handler */
ALfilter_GetParamf(ALFilter, Context, param, value);
}
ALCcontext_DecRef(Context);
}
AL_API ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *values)
{
ALCcontext *Context;
ALCdevice *Device;
ALfilter *ALFilter;
Context = GetContextRef();
if(!Context) return;
Device = Context->Device;
if((ALFilter=LookupFilter(Device, filter)) == NULL)
alSetError(Context, AL_INVALID_NAME);
else
{
/* Call the appropriate handler */
ALfilter_GetParamfv(ALFilter, Context, param, values);
}
ALCcontext_DecRef(Context);
}
void ALfilterState_clear(ALfilterState *filter)
{
filter->x[0] = 0.0f;
filter->x[1] = 0.0f;
filter->y[0] = 0.0f;
filter->y[1] = 0.0f;
}
void <API key>(ALfilterState *filter, ALfilterType type, ALfloat gain, ALfloat freq_scale, ALfloat bandwidth)
{
ALfloat alpha;
ALfloat w0;
// Limit gain to -100dB
gain = maxf(gain, 0.00001f);
w0 = 2.0f*F_PI * freq_scale;
/* Calculate filter coefficients depending on filter type */
switch(type)
{
case <API key>:
alpha = sinf(w0) / 2.0f * sqrtf((gain + 1.0f/gain) *
(1.0f/0.75f - 1.0f) + 2.0f);
filter->b[0] = gain * ((gain + 1.0f) +
(gain - 1.0f) * cosf(w0) +
2.0f * sqrtf(gain) * alpha);
filter->b[1] = -2.0f * gain * ((gain - 1.0f) +
(gain + 1.0f) * cosf(w0));
filter->b[2] = gain * ((gain + 1.0f) +
(gain - 1.0f) * cosf(w0) -
2.0f * sqrtf(gain) * alpha);
filter->a[0] = (gain + 1.0f) -
(gain - 1.0f) * cosf(w0) +
2.0f * sqrtf(gain) * alpha;
filter->a[1] = 2.0f * ((gain - 1.0f) -
(gain + 1.0f) * cosf(w0));
filter->a[2] = (gain + 1.0f) -
(gain - 1.0f) * cosf(w0) -
2.0f * sqrtf(gain) * alpha;
break;
case <API key>:
alpha = sinf(w0) / 2.0f * sqrtf((gain + 1.0f / gain) *
(1.0f / 0.75f - 1.0f) + 2.0f);
filter->b[0] = gain * ((gain + 1.0f) -
(gain - 1.0f) * cosf(w0) +
2.0f * sqrtf(gain) * alpha);
filter->b[1] = 2.0f * gain * ((gain - 1.0f) -
(gain + 1.0f) * cosf(w0));
filter->b[2] = gain * ((gain + 1.0f) -
(gain - 1.0f) * cosf(w0) -
2.0f * sqrtf(gain) * alpha);
filter->a[0] = (gain + 1.0f) +
(gain - 1.0f) * cosf(w0) +
2.0f * sqrtf(gain) * alpha;
filter->a[1] = -2.0f * ((gain - 1.0f) +
(gain + 1.0f) * cosf(w0));
filter->a[2] = (gain + 1.0f) +
(gain - 1.0f) * cosf(w0) -
2.0f * sqrtf(gain) * alpha;
break;
case <API key>:
alpha = sinf(w0) * sinhf(logf(2.0f) / 2.0f * bandwidth * w0 / sinf(w0));
filter->b[0] = 1.0f + alpha * gain;
filter->b[1] = -2.0f * cosf(w0);
filter->b[2] = 1.0f - alpha * gain;
filter->a[0] = 1.0f + alpha / gain;
filter->a[1] = -2.0f * cosf(w0);
filter->a[2] = 1.0f - alpha / gain;
break;
case <API key>:
alpha = sinf(w0) * sinhf(logf(2.0f) / 2.0f * bandwidth * w0 / sinf(w0));
filter->b[0] = (1.0f - cosf(w0)) / 2.0f;
filter->b[1] = 1.0f - cosf(w0);
filter->b[2] = (1.0f - cosf(w0)) / 2.0f;
filter->a[0] = 1.0f + alpha;
filter->a[1] = -2.0f * cosf(w0);
filter->a[2] = 1.0f - alpha;
break;
case <API key>:
alpha = sinf(w0) * sinhf(logf(2.0f) / 2.0f * bandwidth * w0 / sinf(w0));
filter->b[0] = alpha;
filter->b[1] = 0;
filter->b[2] = -alpha;
filter->a[0] = 1.0f + alpha;
filter->a[1] = -2.0f * cosf(w0);
filter->a[2] = 1.0f - alpha;
break;
}
filter->b[2] /= filter->a[0];
filter->b[1] /= filter->a[0];
filter->b[0] /= filter->a[0];
filter->a[2] /= filter->a[0];
filter->a[1] /= filter->a[0];
filter->a[0] /= filter->a[0];
}
static void lp_SetParami(ALfilter *filter, ALCcontext *context, ALenum param, ALint val)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)val; }
static void lp_SetParamiv(ALfilter *filter, ALCcontext *context, ALenum param, const ALint *vals)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)vals; }
static void lp_SetParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{
switch(param)
{
case AL_LOWPASS_GAIN:
if(!(val >= AL_LOWPASS_MIN_GAIN && val <= AL_LOWPASS_MAX_GAIN))
<API key>(context, AL_INVALID_VALUE);
filter->Gain = val;
break;
case AL_LOWPASS_GAINHF:
if(!(val >= <API key> && val <= <API key>))
<API key>(context, AL_INVALID_VALUE);
filter->GainHF = val;
break;
default:
<API key>(context, AL_INVALID_ENUM);
}
}
static void lp_SetParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{
lp_SetParamf(filter, context, param, vals[0]);
}
static void lp_GetParami(ALfilter *filter, ALCcontext *context, ALenum param, ALint *val)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)val; }
static void lp_GetParamiv(ALfilter *filter, ALCcontext *context, ALenum param, ALint *vals)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)vals; }
static void lp_GetParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{
switch(param)
{
case AL_LOWPASS_GAIN:
*val = filter->Gain;
break;
case AL_LOWPASS_GAINHF:
*val = filter->GainHF;
break;
default:
<API key>(context, AL_INVALID_ENUM);
}
}
static void lp_GetParamfv(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *vals)
{
lp_GetParamf(filter, context, param, vals);
}
static void null_SetParami(ALfilter *filter, ALCcontext *context, ALenum param, ALint val)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)val; }
static void null_SetParamiv(ALfilter *filter, ALCcontext *context, ALenum param, const ALint *vals)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)vals; }
static void null_SetParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat val)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)val; }
static void null_SetParamfv(ALfilter *filter, ALCcontext *context, ALenum param, const ALfloat *vals)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)vals; }
static void null_GetParami(ALfilter *filter, ALCcontext *context, ALenum param, ALint *val)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)val; }
static void null_GetParamiv(ALfilter *filter, ALCcontext *context, ALenum param, ALint *vals)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)vals; }
static void null_GetParamf(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *val)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)val; }
static void null_GetParamfv(ALfilter *filter, ALCcontext *context, ALenum param, ALfloat *vals)
{ <API key>(context, AL_INVALID_ENUM); (void)filter;(void)param;(void)vals; }
ALvoid ReleaseALFilters(ALCdevice *device)
{
ALsizei i;
for(i = 0;i < device->FilterMap.size;i++)
{
ALfilter *temp = device->FilterMap.array[i].value;
device->FilterMap.array[i].value = NULL;
// Release filter structure
FreeThunkEntry(temp->id);
memset(temp, 0, sizeof(ALfilter));
free(temp);
}
}
static void InitFilterParams(ALfilter *filter, ALenum type)
{
if(type == AL_FILTER_LOWPASS)
{
filter->Gain = <API key>;
filter->GainHF = <API key>;
filter->SetParami = lp_SetParami;
filter->SetParamiv = lp_SetParamiv;
filter->SetParamf = lp_SetParamf;
filter->SetParamfv = lp_SetParamfv;
filter->GetParami = lp_GetParami;
filter->GetParamiv = lp_GetParamiv;
filter->GetParamf = lp_GetParamf;
filter->GetParamfv = lp_GetParamfv;
}
else
{
filter->SetParami = null_SetParami;
filter->SetParamiv = null_SetParamiv;
filter->SetParamf = null_SetParamf;
filter->SetParamfv = null_SetParamfv;
filter->GetParami = null_GetParami;
filter->GetParamiv = null_GetParamiv;
filter->GetParamf = null_GetParamf;
filter->GetParamfv = null_GetParamfv;
}
filter->type = type;
}
|
# Enthought library imports.
from tvtk.tools.tvtk_doc import TVTKFilterChooser, TVTK_FILTERS
# Local imports.
from mayavi.filters.filter_base import FilterBase
from mayavi.core.common import <API key>, error
from mayavi.core.pipeline_info import PipelineInfo
# `UserDefined` class.
class UserDefined(FilterBase):
"""
This filter lets the user define their own filter
dynamically/interactively. It is like `FilterBase` but allows a
user to specify the class without writing any code.
"""
# The version of this class. Used for persistence.
__version__ = 0
input_info = PipelineInfo(datasets=['any'],
attribute_types=['any'],
attributes=['any'])
output_info = PipelineInfo(datasets=['any'],
attribute_types=['any'],
attributes=['any'])
# `object` interface.
def __set_pure_state__(self, state):
# Create and set the filter.
children = [f for f in [self.filter] if f is not None]
<API key>(children, [state.filter])
self.filter = children[0]
self.update_pipeline()
# Restore our state.
super(UserDefined, self).__set_pure_state__(state)
# `UserDefined` interface.
def setup_filter(self):
"""Setup the filter if none has been set or check it if it
already has been."""
obj = self.filter
if not self._check_object(obj):
if obj is not None:
cname = obj.__class__.__name__
error('Invalid filter %s chosen! Try again!'%cname)
obj = self._choose_filter()
self.filter = obj
# Non-public interface.
def _choose_filter(self):
chooser = TVTKFilterChooser()
chooser.edit_traits(kind='livemodal')
obj = chooser.object
if obj is None:
error('Invalid filter chosen! Try again!')
return obj
def _check_object(self, obj):
if obj is None:
return False
if obj.__class__.__name__ in TVTK_FILTERS:
return True
return False
def _filter_changed(self, old, new):
self.name = 'UserDefined:%s'%new.__class__.__name__
super(UserDefined, self)._filter_changed(old, new)
|
<!doctype html>
<title>ProgressEvent constructor</title>
<script src=../../../../resources/testharness.js></script>
<script src=../../../../resources/testharnessreport.js></script>
<div id=log></div>
<script>
test(function() {
var ev = new ProgressEvent("test")
assert_equals(ev.type, "test")
assert_equals(ev.target, null)
assert_equals(ev.currentTarget, null)
assert_equals(ev.eventPhase, Event.NONE)
assert_equals(ev.bubbles, false)
assert_equals(ev.cancelable, false)
assert_equals(ev.defaultPrevented, false)
assert_equals(ev.isTrusted, false)
assert_true(ev.timeStamp > 0)
assert_true("initEvent" in ev)
}, "Default event values.")
test(function() {
var e = document.createEvent("ProgressEvent");
var eProto = Object.getPrototypeOf(e);
assert_equals(eProto, ProgressEvent.prototype);
}, "document.createEvent() should work with ProgressEvent.");
</script>
|
# Contributing
Contributions to Respect\Validation are always welcome. You make our lives
easier by sending us your contributions through
[GitHub pull requests](http://help.github.com/pull-requests).
Pull requests for bug fixes must be based on the current stable branch whereas
pull requests for new features must be based on `master`.
Due to time constraints, we are not always able to respond as quickly as we
would like. Please do not take delays personal and feel free to remind us here,
on IRC, or on Gitter if you feel that we forgot to respond.
Please see the [project documentation](http://documentup.com/Respect/Validation)
before proceeding. You should also know about [PHP-FIG](http:
standards and basic unit testing, but we're sure you can learn that just by
looking at other rules. Pick the simple ones like `Int` to begin.
Before writing anything, make sure there is no validator that already does what
you need. Also, it would be awesome if you
[open an issue](http://github.com/Respect/Validation/issues) before starting,
so if anyone has the same idea the guy will see that you're already doing that.
## Adding a new validator
A common validator (rule) on Respect\Validation is composed of three classes:
* `library/Rules/YourRuleName.php`: the rule itself
* `library/Exceptions/<API key>.php`: the exception thrown by the rule
* `tests/Rules/YourRuleNameTest.php`: tests for the rule
Classes are pretty straightforward. In the sample below, we're going to create a
validator that validates if a string is equal "Hello World".
## Samples
The rule itself needs to implement the `Validatable` interface.
Also, it is convenient to extend the `AbstractRule`.
Doing that, you'll only need to declare one method: `validate($input)`.
This method must return `true` or `false`.
If your validator class is `HelloWorld`, it will be available as `v::helloWorld()`
and will natively have support for chaining and everything else.
php
namespace Respect\Validation\Rules;
class HelloWorld extends AbstractRule
{
public function validate($input)
{
return $input === 'Hello World';
}
}
Just that and we're done with the rule code. The Exception requires you to
declare messages used by `assert()` and `check()`. Messages are declared in
affirmative and negative moods, so if anyone calls `v::not(v::helloWorld())` the
library will show the appropriate message.
php
namespace Respect\Validation\Exceptions;
class HelloWorldException extends ValidationException
{
public static $defaultTemplates = array(
self::MODE_DEFAULT => array(
self::STANDARD => '{{name}} must be a Hello World',
),
self::MODE_NEGATIVE => array(
self::STANDARD => '{{name}} must not be a Hello World',
)
);
}
Finally, we need to test if everything is running smooth:
php
namespace Respect\Validation\Rules;
class HelloWorldTest extends \<API key>
{
public function <API key>()
{
$rule = new HelloWorld();
$this->assertTrue($rule->validate('Hello World'));
}
public function <API key>()
{
$rule = new HelloWorld();
$this->assertFalse($rule->validate('Hello Moon'));
}
/**
* @expectedException Respect\Validation\Exceptions\HelloWorldException
* @<API key> "Hello Mars" must be a Hello World
*/
public function <API key>()
{
$rule = new HelloWorld();
$rule->check('Hello Mars');
}
}
PS.: We strongly recommend you use [Data Providers](https://phpunit.de/manual/current/en/<API key>.html#<API key>.data-providers).
## Documentation
Our docs at http://documentup.com/Respect/Validation are generated from our
Markdown files. Add your brand new rule there and everything will be updated as
soon as possible.
## Running Tests
After run `composer install` on the library's root directory you must run PHPUnit.
Linux
You can test the project using the commands:
sh
$ vendor/bin/phpunit
Windows
You can test the project using the commands:
sh
> vendor\bin\phpunit
No test should fail.
You can tweak the PHPUnit's settings by copying `phpunit.xml.dist` to `phpunit.xml`
and changing it according to your needs.
|
/* PIED DE PAGE*/
#nom_ input[type="text"]
{ /*le input ou le textarea*/
background-color: #fffffa; /*la couleur du champ*/
height: 25px; /*la hauteur du champ input*/
width: 100%; /* la largeur du champ input*/
}
#prenom_ input[type="text"]
{ /*le input ou le textarea*/
background-color: #fffffa; /*la couleur du champ*/
height: 25px; /*la hauteur du champ input*/
width: 100%; /* la largeur du champ input*/
}
#date_ input[type="text"]
{ /*le input ou le textarea*/
background-color: #fffffa; /*la couleur du champ*/
height: 25px; /*la hauteur du champ input*/
width: 100%; /* la largeur du champ input*/
}
#sexe_ input[type="text"]
{ /*le input ou le textarea*/
background-color: #fffffa; /*la couleur du champ*/
height: 25px; /*la hauteur du champ input*/
width: 100%; /* la largeur du champ input*/
}
#adresse_ input[type="text"]
{ /*le input ou le textarea*/
background-color: #fffffa; /*la couleur du champ*/
height: 25px; /*la hauteur du champ input*/
width: 100%; /* la largeur du champ input*/
}
#nationalite_ input[type="text"]
{ /*le input ou le textarea*/
background-color: #fffffa; /*la couleur du champ*/
height: 25px; /*la hauteur du champ input*/
width: 100%; /* la largeur du champ input*/
}
#effectuer_ input[type="text"]
{ /*le input ou le textarea*/
background-color: #fffffa; /*la couleur du champ*/
height: 25px; /*la hauteur du champ input*/
width: 100%; /* la largeur du champ input*/
}
/* EN TETE*/
#nom
{
width: 13%;
}
#prenom
{
width: 15%;
}
#date
{
width: 12%;
}
#sexe
{
width: 7%;
}
#adresse
{
width: 28%;
}
#nationalite
{
width: 15%;
}
#effectuer
{
width: 10%;
}
/* STYLE POUR LA LISTE DE SELECTION DE LA TABLE*/
#listeDataTable{
margin-top: 0px;
margin-bottom: 0px;
margin-left: -10px;
}
.dataTables_paginate *
{
background: #e9e8e8;
padding-top: 6px;
padding-bottom: 6px;
padding-left: 6px;
padding-right: 6px;
color: black;
/*margin-top: 100px;*/
cursor: pointer;
}
div .dataTables_paginate
{
margin-bottom: 20px;
}
.dataTables_paginate .first
{
margin-right: 0px;
}
.dataTables_paginate .last
{
margin-left: 0px;
}
.dataTables_paginate .previous
{
margin-right: 2px;
border-left: 1px solid #bdb9b9;
}
.dataTables_paginate .next
{
margin-left: 3px;
border-right: 1px solid #bdb9b9;
}
.dataTables_paginate a:hover
{
text-decoration: none;
background-color: #c3c1c1;
color: white;
}
.dataTables_paginate .paginate_active
{
text-decoration: none;
background-color: #b5b2b2;
color: white;
}
#liste_personnel select
{
border-right-width: 2px;
border-left-width: 2px;
border-top-width: 2px;
border-bottom-width: 2px;
border-color: #cccccc;"
}
.foot_style th
{
font-size: 14px;
font-weight: normal;
color: #fefefe;
padding-top: 10px;
padding-right: 8px;
padding-bottom: 5px;
padding-left: 8px;
border-bottom-width: 0px;
}
#titre, #titre2 {
height: 30px;
border: 2px solid #ccc;
<API key>: 10px;
<API key>: 10px;
border-bottom: 2px solid #cccccc;
background : #fff;
padding-left: 10px;
padding-bottom: 5px;
padding-top : 13px;
box-shadow: 0pt 0pt 12px rgba(0, 0, 0, 0.5);
}
#contenu {
background: #fff; max-height: 1000px;
border: 2px solid #ccc ;
<API key>: 10px;
<API key>: 10px;
border-top: 2px solid #cccccc;
padding-left: 20px;
padding-right: 25px;
padding-top: 5px;
padding-bottom: 10px;
box-shadow: 0pt 5pt 12px rgba(0, 0, 0, 0.5);
}
tr:hover
{
background: white;
}
#vue_patient{
min-height:385px;
background: #fff;
border: 2px solid #ccc;
border-top: 2px solid #cccccc;
<API key>: 10px;
<API key>: 10px;
box-shadow: 0pt 5pt 12px rgba(0, 0, 0, 0.5);
}
#circonstance_deces{
width: 260px;
height: 80px;
border: 1px solid #ccc ;
<API key>: 10px;
<API key>: 10px;
<API key>: 10px;
}
#photo, #modifier_photo /*photo*/
{
width: 100px;
float: left;
border-top-width: 10px;
border-right-width: 10px;
<API key>: physical;
<API key>: physical;
border-bottom-width: 10px;
border-left-width: 10px;
<API key>: physical;
<API key>: physical;
border-top-style: solid;
border-right-style: solid;
<API key>: physical;
<API key>: physical;
border-bottom-style: solid;
border-left-style: solid;
<API key>: physical;
<API key>: physical;
border-top-color: white;
border-right-color: white;
<API key>: physical;
<API key>: physical;
border-bottom-color: white;
border-left-color: white;
<API key>: physical;
<API key>: physical;
box-shadow: 0pt 0pt 12px rgba(0, 0, 0, 0.2);
}
#thoughtbot button
{
width:auto;
padding:8px 0;
text-align:center;
display: inline-block;
float:left;
margin:0 0px 0 0;
border-radius:7px;
font-size: 0.85em;
font-weight: bold;
width:80px;
color:#000;
font-family: Arial,sans-serif;
box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1);
text-shadow: 0px 1px 0px rgba( 255, 255, 255, 0.3);
}
#thoughtbot button:hover
{
background: #ccc;
background: -<API key>( #eee, #aaa);
background: -moz-linear-gradient( #eee, #aaa);
background: -ms-linear-gradient( #eee, #aaa);
background: -o-linear-gradient( #eee, #aaa);
background: linear-gradient( #eee, #aaa);
}
#titre_info_admis{
font-style: italic;
font-family: Times New Roman;
font-size: 18px;
color: green;
margin-top: 210px;
margin-left: 18%;
}
#barre_separateur {
border-bottom: 2px solid #ccc;
margin-top: 2px;
margin-left: 18%;
}
#<API key> {
border-bottom: 2px solid #ccc;
margin-top: 3px;
margin-left: 195px;
}
a{
color: black;
}
p{
font-family: Times New Roman;
color: #065d10;
}
#inform{
font-family: Times New Roman;
color: #065d10;
}
#<API key>{
font-style: italic;
font-family: Times New Roman;
font-size: 18px;
color: green;
margin-top: 180px;
margin-left: 195px;
}
#<API key> {
height: 510px;
background: #fff;
border: 2px solid #ccc;
border-top: 2px solid #cccccc;
<API key>: 10px;
<API key>: 10px;
box-shadow: 0pt 5pt 12px rgba(0, 0, 0, 0.5);
}
#barre_vertical{
width: 2px;
height: 190px;
float: left;
margin-right: 2px;
margin-left: 10px;
background-color: #cccccc;
margin-top:20px;
}
#menu{
width:5%;
height: 150px;
float: left;
margin-right: 2px;
background-color: #ffffff;
margin-top:20px;
}
.vider_formulaire,.modifer_donnees,.supprimer_photo,.ajouter_photo{
position:relative;
width:20px;
height:20px;
display: inline;float:left;border:transparent; margin-bottom: 10px;
}
.vider_formulaire {
background: url("/<API key>/public/images_icons/annuler1.PNG") no-repeat right top;
}
.modifer_donnees {
background: url("/<API key>/public/images_icons/modifier.png") no-repeat right top;
}
.supprimer_photo {
background: url("/<API key>/public/images_icons/mod.png") no-repeat right top;
}
.ajouter_photo {
background: url("/<API key>/public/images_icons/ajouterphoto.png") no-repeat right top;
}
.vider_formulaire input, .modifer_donnees input, .ajouter_photo input, .supprimer_photo input{
position:absolute;
right:0;
top:0;
font-size:100px;
opacity:0;
-moz-opacity:0;
filter:alpha(opacity=0);
cursor:pointer;
text-align:right;
width:20px;
height:20px;
}
#form_patient .<API key> label, #form_patient .comment-form-email label, #form_patient .comment-form-url label, #form_patient .<API key> label
{/* le label*/
line-height: 1.5em;
background-color: #eeeeee;
background-image: none;
background-repeat: repeat;
<API key>: scroll;
background-position: 0% 0%;
background-clip: border-box;
background-origin: padding-box;
/*<API key>: 15px; */
<API key>: 15px;
background-size: auto auto;
box-shadow: 1px 2px 2px rgba(204, 204, 204, 0.8);
color: #555555;
display: inline-block;
font-size: 13px;
left: 0px;
min-width: 60px;
padding-top: 4px;
padding-right: 10px;
padding-bottom: 4px;
padding-left: 10px;
position: relative;
top: 5px;
z-index: 1;
}
#form_patient select
{
background-image: none;
background-repeat: repeat;
<API key>: scroll;
background-position: 0% 0%;
background-clip: border-box;
background-origin: padding-box;
background-size: auto auto;
border-top-width: 4px;
<API key>: 4px;
<API key>: 10px;
<API key>: physical;
<API key>: physical;
border-bottom-width: 4px;
<API key>: 4px;
<API key>: physical;
<API key>: physical;
border-top-style: solid;
<API key>: solid;
<API key>: physical;
<API key>: physical;
border-bottom-style: solid;
<API key>: solid;
<API key>: physical;
<API key>: physical;
border-top-color: #cccccc;
<API key>: #eeeeee;
<API key>: physical;
<API key>: physical;
border-bottom-color: #cccccc;
<API key>: #eeeeee;
<API key>: physical;
<API key>: physical;
<API key>: 5px;
<API key>: 10px;
<API key>: 5px;
<API key>: 5px;
box-shadow: 0pt 1px 3px rgba(204, 204, 204, 0.95) inset;
position: relative;
border-right-width: 2px;
border-left-width: 2px;
border-top-width: 2px;
border-bottom-width: 2px;
border-left-color: #cccccc;
border-right-color: #cccccc;
float: left;
margin-left: 0px;
margin-right: 25px;
margin-bottom: 15px;
/*enlever l'icone select*/
}
#form_patient option{
min-width:100px;
color:#00f;
background-color:#eee;
font-size: 13pt;
overflow: auto;
}
#form_patient input[type="text"], #form_patient textarea
{ /*le input ou le textarea*/
background-image: none;
background-repeat: repeat;
<API key>: scroll;
background-position: 0% 0%;
background-clip: border-box;
background-origin: padding-box;
background-size: auto auto;
border-top-width: 2px;
<API key>: 2px;
<API key>: physical;
<API key>: physical;
border-bottom-width: 2px;
<API key>: 2px;
<API key>: physical;
<API key>: physical;
border-top-style: solid;
<API key>: solid;
<API key>: physical;
<API key>: physical;
border-bottom-style: solid;
<API key>: solid;
<API key>: physical;
<API key>: physical;
<API key>: #eeeeee;
<API key>: physical;
<API key>: physical;
<API key>: #eeeeee;
<API key>: physical;
<API key>: physical;
<API key>: 5px;
<API key>: 10px;
<API key>: 5px;
<API key>: 5px;
box-shadow: 0pt 1px 3px rgba(204, 204, 204, 0.95) inset;
/* le texte des champs*/
padding-top: 5px;
padding-right: 10px;
padding-bottom: 5px;
margin-bottom : 15px;
margin-right: 25px;
padding-left: 10px; /* padding du text dans le champ*/
text-indent: 0px; /* alignement du text dans le champ input*/
font-size: 16px;
}
#form_patient select
{
display: block;
height: 30px; /*la hauteur du champ input*/
width: 87%;/*225px; /*la largeur du champ input*/
}
#form_patient input
{
height: 30px;
width: 87%;
}
#form_patient textarea
{
height: 90px;
width: 87%;
}
#terminer_annuler{
float: left;
width: 200px;
height: 40px;
margin-left: 490px;
margin-top: 10px;
}
#thoughtbot button
{
width:auto;
padding:8px 0;
text-align:center;
display: inline-block;
float:left;
margin:0 8px 0 0;
border-radius:7px;
font-size: 0.85em;
font-weight: bold;
width:80px;
color:#000;
font-family: Arial,sans-serif;
box-shadow: 0 0 1px rgba( 0, 0, 0, 0.2), 0 -1px 0 rgba( 255, 255, 255, 0.1);
text-shadow: 0px 1px 0px rgba( 255, 255, 255, 0.3);
}
#thoughtbot button:hover
{
background: #ccc;
background: -<API key>( #eee, #aaa);
background: -moz-linear-gradient( #eee, #aaa);
background: -ms-linear-gradient( #eee, #aaa);
background: -o-linear-gradient( #eee, #aaa);
background: linear-gradient( #eee, #aaa);
}
#zoneTexte{
height: 40px;
border: 2px solid #cccccc ;
<API key>: 10px;
<API key>: 10px;
}
#zoneChampInfo{
height: 40px;
border: 2px solid #cccccc ;
<API key>: 10px;
<API key>: 10px;
}
#zoneChampInfo1{
min-height: 30px;
border: 1px solid #cccccc ;
<API key>: 10px;
<API key>: 10px;
margin-right: 8px;
font-family: Iskoola Pota;
}
#zoneChampInfoVue{
width: 95%;
min-height: 25px;
font-size: 17px;
border: 1px solid #cccccc ;
<API key>: 10px;
}
#labelHeureLABEL
{
line-height: 1.5em;
background-color: #ececec;
background-image: none;
background-repeat: repeat;
<API key>: scroll;
background-position: 0% 0%;
background-clip: border-box;
background-origin: padding-box;
<API key>: 10px;
background-size: auto auto;
box-shadow: 1px 2px 2px rgba(204, 204, 204, 0.8);
color: black;
display: inline-block;
font-size: 16px;
min-width: 60px;
padding-top: 4px;
padding-right: 5px;
padding-bottom: 0px;
padding-left: 10px;
position: relative;
font-family: Goudy Old Style;
top: 0px;
z-index: 1;
}
#labelHeureLABELVue
{
line-height: 1.2em;
background-color: #e1e1e1;
background-image: none;
background-repeat: repeat;
<API key>: scroll;
background-position: 0% 0%;
background-clip: border-box;
background-origin: padding-box;
<API key>: 10px;
background-size: auto auto;
box-shadow: 1px 2px 2px rgba(204, 204, 204, 0.7);
color: #555555;
display: inline-block;
font-size: 6px;
width: 95%;
padding-top: 4px;
padding-bottom: 0px;
padding-left: 10px;
position: relative;
top: 0px;
z-index: 1;
}
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0;URL=Home.action">
</head>
<body>
<p>Loading ...</p>
</body>
</html>
|
// texture_format_util:
// Contains helper functions for <API key>
#include "libANGLE/renderer/d3d/d3d11/texture_format_util.h"
#include "libANGLE/renderer/d3d/d3d11/formatutils11.h"
#include "libANGLE/renderer/d3d/loadimage.h"
#include "libANGLE/renderer/d3d/loadimage_etc.h"
namespace rx
{
namespace d3d11
{
namespace
{
// ES3 image loading functions vary based on:
// - the GL internal format (supplied to glTex*Image*D)
// - the GL data type given (supplied to glTex*Image*D)
// - the target DXGI_FORMAT that the image will be loaded into (which is chosen based on the D3D
// device's capabilities)
// This map type determines which loading function to use, based on these three parameters.
// Source formats and types are taken from Tables 3.2 and 3.3 of the ES 3 spec.
void <API key>(size_t width,
size_t height,
size_t depth,
const uint8_t *input,
size_t inputRowPitch,
size_t inputDepthPitch,
uint8_t *output,
size_t outputRowPitch,
size_t outputDepthPitch)
{
UNIMPLEMENTED();
}
void <API key>(size_t width,
size_t height,
size_t depth,
const uint8_t *input,
size_t inputRowPitch,
size_t inputDepthPitch,
uint8_t *output,
size_t outputRowPitch,
size_t outputDepthPitch)
{
UNREACHABLE();
}
// A helper function to insert data into the <API key> with fewer characters.
inline void InsertLoadFunction(<API key> *map, GLenum internalFormat, GLenum type,
DXGI_FORMAT dxgiFormat, LoadImageFunction loadFunc)
{
(*map)[internalFormat].push_back(<API key>(type, <API key>(dxgiFormat, loadFunc)));
}
} // namespace
// TODO: This will be generated by a JSON file
const <API key> &<API key>()
{
static <API key> map;
// clang-format off
// | Internal format | Type | Target DXGI Format | Load function |
InsertLoadFunction(&map, GL_RGBA8, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 4> );
InsertLoadFunction(&map, GL_RGB5_A1, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 4> );
InsertLoadFunction(&map, GL_RGBA4, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 4> );
InsertLoadFunction(&map, GL_SRGB8_ALPHA8, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 4> );
InsertLoadFunction(&map, GL_RGBA8_SNORM, GL_BYTE, <API key>, LoadToNative<GLbyte, 4> );
InsertLoadFunction(&map, GL_RGBA4, <API key>, <API key>, LoadRGBA4ToRGBA8 );
InsertLoadFunction(&map, GL_RGBA4, <API key>, <API key>, LoadRGBA4ToARGB4 );
InsertLoadFunction(&map, GL_RGB10_A2, <API key>, <API key>, LoadToNative<GLuint, 1> );
InsertLoadFunction(&map, GL_RGB5_A1, <API key>, <API key>, LoadRGB5A1ToRGBA8 );
InsertLoadFunction(&map, GL_RGB5_A1, <API key>, <API key>, LoadRGB5A1ToA1RGB5 );
InsertLoadFunction(&map, GL_RGB5_A1, <API key>, <API key>, LoadRGB10A2ToRGBA8 );
InsertLoadFunction(&map, GL_RGBA16F, GL_HALF_FLOAT, <API key>, LoadToNative<GLhalf, 4> );
InsertLoadFunction(&map, GL_RGBA16F, GL_HALF_FLOAT_OES, <API key>, LoadToNative<GLhalf, 4> );
InsertLoadFunction(&map, GL_RGBA32F, GL_FLOAT, <API key>, LoadToNative<GLfloat, 4> );
InsertLoadFunction(&map, GL_RGBA16F, GL_FLOAT, <API key>, Load32FTo16F<4> );
InsertLoadFunction(&map, GL_RGBA8UI, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 4> );
InsertLoadFunction(&map, GL_RGBA8I, GL_BYTE, <API key>, LoadToNative<GLbyte, 4> );
InsertLoadFunction(&map, GL_RGBA16UI, GL_UNSIGNED_SHORT, <API key>, LoadToNative<GLushort, 4> );
InsertLoadFunction(&map, GL_RGBA16I, GL_SHORT, <API key>, LoadToNative<GLshort, 4> );
InsertLoadFunction(&map, GL_RGBA32UI, GL_UNSIGNED_INT, <API key>, LoadToNative<GLuint, 4> );
InsertLoadFunction(&map, GL_RGBA32I, GL_INT, <API key>, LoadToNative<GLint, 4> );
InsertLoadFunction(&map, GL_RGB10_A2UI, <API key>, <API key>, LoadToNative<GLuint, 1> );
InsertLoadFunction(&map, GL_RGB8, GL_UNSIGNED_BYTE, <API key>, LoadToNative3To4<GLubyte, 0xFF> );
InsertLoadFunction(&map, GL_RGB565, GL_UNSIGNED_BYTE, <API key>, LoadToNative3To4<GLubyte, 0xFF> );
InsertLoadFunction(&map, GL_SRGB8, GL_UNSIGNED_BYTE, <API key>, LoadToNative3To4<GLubyte, 0xFF> );
InsertLoadFunction(&map, GL_RGB8_SNORM, GL_BYTE, <API key>, LoadToNative3To4<GLbyte, 0x7F> );
InsertLoadFunction(&map, GL_RGB565, <API key>, <API key>, LoadR5G6B5ToRGBA8 );
InsertLoadFunction(&map, GL_RGB565, <API key>, <API key>, LoadToNative<GLushort, 1> );
InsertLoadFunction(&map, GL_R11F_G11F_B10F, <API key>, <API key>, LoadToNative<GLuint, 1> );
InsertLoadFunction(&map, GL_RGB9_E5, <API key>, <API key>, LoadToNative<GLuint, 1> );
InsertLoadFunction(&map, GL_RGB16F, GL_HALF_FLOAT, <API key>, LoadToNative3To4<GLhalf, gl::Float16One>);
InsertLoadFunction(&map, GL_RGB16F, GL_HALF_FLOAT_OES, <API key>, LoadToNative3To4<GLhalf, gl::Float16One>);
InsertLoadFunction(&map, GL_R11F_G11F_B10F, GL_HALF_FLOAT, <API key>, <API key> );
InsertLoadFunction(&map, GL_R11F_G11F_B10F, GL_HALF_FLOAT_OES, <API key>, <API key> );
InsertLoadFunction(&map, GL_RGB9_E5, GL_HALF_FLOAT, <API key>, LoadRGB16FToRGB9E5 );
InsertLoadFunction(&map, GL_RGB9_E5, GL_HALF_FLOAT_OES, <API key>, LoadRGB16FToRGB9E5 );
InsertLoadFunction(&map, GL_RGB32F, GL_FLOAT, <API key>, LoadToNative3To4<GLfloat, gl::Float32One>);
InsertLoadFunction(&map, GL_RGB16F, GL_FLOAT, <API key>, LoadRGB32FToRGBA16F );
InsertLoadFunction(&map, GL_R11F_G11F_B10F, GL_FLOAT, <API key>, <API key> );
InsertLoadFunction(&map, GL_RGB9_E5, GL_FLOAT, <API key>, LoadRGB32FToRGB9E5 );
InsertLoadFunction(&map, GL_RGB8UI, GL_UNSIGNED_BYTE, <API key>, LoadToNative3To4<GLubyte, 0x01> );
InsertLoadFunction(&map, GL_RGB8I, GL_BYTE, <API key>, LoadToNative3To4<GLbyte, 0x01> );
InsertLoadFunction(&map, GL_RGB16UI, GL_UNSIGNED_SHORT, <API key>, LoadToNative3To4<GLushort, 0x0001> );
InsertLoadFunction(&map, GL_RGB16I, GL_SHORT, <API key>, LoadToNative3To4<GLshort, 0x0001> );
InsertLoadFunction(&map, GL_RGB32UI, GL_UNSIGNED_INT, <API key>, LoadToNative3To4<GLuint, 0x00000001> );
InsertLoadFunction(&map, GL_RGB32I, GL_INT, <API key>, LoadToNative3To4<GLint, 0x00000001> );
InsertLoadFunction(&map, GL_RG8, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 2> );
InsertLoadFunction(&map, GL_RG8_SNORM, GL_BYTE, <API key>, LoadToNative<GLbyte, 2> );
InsertLoadFunction(&map, GL_RG16F, GL_HALF_FLOAT, <API key>, LoadToNative<GLhalf, 2> );
InsertLoadFunction(&map, GL_RG16F, GL_HALF_FLOAT_OES, <API key>, LoadToNative<GLhalf, 2> );
InsertLoadFunction(&map, GL_RG32F, GL_FLOAT, <API key>, LoadToNative<GLfloat, 2> );
InsertLoadFunction(&map, GL_RG16F, GL_FLOAT, <API key>, Load32FTo16F<2> );
InsertLoadFunction(&map, GL_RG8UI, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 2> );
InsertLoadFunction(&map, GL_RG8I, GL_BYTE, <API key>, LoadToNative<GLbyte, 2> );
InsertLoadFunction(&map, GL_RG16UI, GL_UNSIGNED_SHORT, <API key>, LoadToNative<GLushort, 2> );
InsertLoadFunction(&map, GL_RG16I, GL_SHORT, <API key>, LoadToNative<GLshort, 2> );
InsertLoadFunction(&map, GL_RG32UI, GL_UNSIGNED_INT, <API key>, LoadToNative<GLuint, 2> );
InsertLoadFunction(&map, GL_RG32I, GL_INT, <API key>, LoadToNative<GLint, 2> );
InsertLoadFunction(&map, GL_R8, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 1> );
InsertLoadFunction(&map, GL_R8_SNORM, GL_BYTE, <API key>, LoadToNative<GLbyte, 1> );
InsertLoadFunction(&map, GL_R16F, GL_HALF_FLOAT, <API key>, LoadToNative<GLhalf, 1> );
InsertLoadFunction(&map, GL_R16F, GL_HALF_FLOAT_OES, <API key>, LoadToNative<GLhalf, 1> );
InsertLoadFunction(&map, GL_R32F, GL_FLOAT, <API key>, LoadToNative<GLfloat, 1> );
InsertLoadFunction(&map, GL_R16F, GL_FLOAT, <API key>, Load32FTo16F<1> );
InsertLoadFunction(&map, GL_R8UI, GL_UNSIGNED_BYTE, DXGI_FORMAT_R8_UINT, LoadToNative<GLubyte, 1> );
InsertLoadFunction(&map, GL_R8I, GL_BYTE, DXGI_FORMAT_R8_SINT, LoadToNative<GLbyte, 1> );
InsertLoadFunction(&map, GL_R16UI, GL_UNSIGNED_SHORT, <API key>, LoadToNative<GLushort, 1> );
InsertLoadFunction(&map, GL_R16I, GL_SHORT, <API key>, LoadToNative<GLshort, 1> );
InsertLoadFunction(&map, GL_R32UI, GL_UNSIGNED_INT, <API key>, LoadToNative<GLuint, 1> );
InsertLoadFunction(&map, GL_R32I, GL_INT, <API key>, LoadToNative<GLint, 1> );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_SHORT, <API key>, LoadToNative<GLushort, 1> );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_SHORT, <API key>, LoadToNative<GLushort, 1> );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_INT, <API key>, LoadR32ToR24G8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_INT, <API key>, LoadR32ToR24G8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_INT, <API key>, LoadR32ToR16 );
InsertLoadFunction(&map, <API key>, GL_FLOAT, <API key>, LoadToNative<GLfloat, 1> );
InsertLoadFunction(&map, <API key>, GL_FLOAT, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_DEPTH24_STENCIL8, <API key>, <API key>, LoadR32ToR24G8 );
InsertLoadFunction(&map, GL_DEPTH24_STENCIL8, <API key>, <API key>, LoadR32ToR24G8 );
InsertLoadFunction(&map, <API key>, <API key>, <API key>, LoadToNative<GLuint, 2> );
InsertLoadFunction(&map, <API key>, <API key>, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_STENCIL_INDEX8, <API key>, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_STENCIL_INDEX8, <API key>, DXGI_FORMAT_UNKNOWN, <API key> );
// Unsized formats
// Load functions are unreachable because they are converted to sized internal formats based on
// the format and type before loading takes place.
InsertLoadFunction(&map, GL_RGBA, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_RGBA, <API key>, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_RGBA, <API key>, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_RGB, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_RGB, <API key>, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_LUMINANCE, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_ALPHA, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key> );
InsertLoadFunction(&map, GL_BGRA_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key> );
// From <API key>
InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_FLOAT, <API key>, LoadLA32FToRGBA32F );
InsertLoadFunction(&map, GL_LUMINANCE, GL_FLOAT, <API key>, LoadL32FToRGBA32F );
InsertLoadFunction(&map, GL_ALPHA, GL_FLOAT, <API key>, LoadA32FToRGBA32F );
// From <API key>
InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT, <API key>, LoadLA16FToRGBA16F );
InsertLoadFunction(&map, GL_LUMINANCE_ALPHA, GL_HALF_FLOAT_OES, <API key>, LoadLA16FToRGBA16F );
InsertLoadFunction(&map, GL_LUMINANCE, GL_HALF_FLOAT, <API key>, LoadL16FToRGBA16F );
InsertLoadFunction(&map, GL_LUMINANCE, GL_HALF_FLOAT_OES, <API key>, LoadL16FToRGBA16F );
InsertLoadFunction(&map, GL_ALPHA, GL_HALF_FLOAT, <API key>, LoadA16FToRGBA16F );
InsertLoadFunction(&map, GL_ALPHA, GL_HALF_FLOAT_OES, <API key>, LoadA16FToRGBA16F );
// From <API key>
InsertLoadFunction(&map, GL_ALPHA8_EXT, GL_UNSIGNED_BYTE, <API key>, LoadToNative<GLubyte, 1> );
InsertLoadFunction(&map, GL_ALPHA8_EXT, GL_UNSIGNED_BYTE, <API key>, LoadA8ToRGBA8 );
InsertLoadFunction(&map, GL_LUMINANCE8_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadL8ToRGBA8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadLA8ToRGBA8 );
InsertLoadFunction(&map, GL_ALPHA32F_EXT, GL_FLOAT, DXGI_FORMAT_UNKNOWN, LoadA32FToRGBA32F );
InsertLoadFunction(&map, GL_LUMINANCE32F_EXT, GL_FLOAT, DXGI_FORMAT_UNKNOWN, LoadL32FToRGBA32F );
InsertLoadFunction(&map, <API key>, GL_FLOAT, DXGI_FORMAT_UNKNOWN, LoadLA32FToRGBA32F );
InsertLoadFunction(&map, GL_ALPHA16F_EXT, GL_HALF_FLOAT, DXGI_FORMAT_UNKNOWN, LoadA16FToRGBA16F );
InsertLoadFunction(&map, GL_ALPHA16F_EXT, GL_HALF_FLOAT_OES, DXGI_FORMAT_UNKNOWN, LoadA16FToRGBA16F );
InsertLoadFunction(&map, GL_LUMINANCE16F_EXT, GL_HALF_FLOAT, DXGI_FORMAT_UNKNOWN, LoadL16FToRGBA16F );
InsertLoadFunction(&map, GL_LUMINANCE16F_EXT, GL_HALF_FLOAT_OES, DXGI_FORMAT_UNKNOWN, LoadL16FToRGBA16F );
InsertLoadFunction(&map, <API key>, GL_HALF_FLOAT, DXGI_FORMAT_UNKNOWN, LoadLA16FToRGBA16F );
InsertLoadFunction(&map, <API key>, GL_HALF_FLOAT_OES, DXGI_FORMAT_UNKNOWN, LoadLA16FToRGBA16F );
// From <API key>
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_INT, DXGI_FORMAT_UNKNOWN, LoadR32ToR24G8 );
// From <API key>
InsertLoadFunction(&map, GL_BGRA8_EXT, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadToNative<GLubyte, 4> );
InsertLoadFunction(&map, GL_BGRA4_ANGLEX, <API key>, DXGI_FORMAT_UNKNOWN, LoadRGBA4ToRGBA8 );
InsertLoadFunction(&map, GL_BGRA4_ANGLEX, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadToNative<GLubyte, 4> );
InsertLoadFunction(&map, GL_BGR5_A1_ANGLEX, <API key>, DXGI_FORMAT_UNKNOWN, LoadRGB5A1ToRGBA8 );
InsertLoadFunction(&map, GL_BGR5_A1_ANGLEX, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, LoadToNative<GLubyte, 4> );
// Compressed formats
// From ES 3.0.1 spec, table 3.16
// | Internal format | Type | Target DXGI Format | Load function
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, LoadEACR11ToR8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, LoadEACR11SToR8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, LoadEACRG11ToRG8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, LoadEACRG11SToRG8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, LoadETC2RGB8ToRGBA8 );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, <API key> );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, <API key> );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, <API key>);
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, <API key> );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, <API key>, <API key>);
// From GL_ETC1_RGB8_OES
InsertLoadFunction(&map, GL_ETC1_RGB8_OES, GL_UNSIGNED_BYTE, <API key>, LoadETC1RGB8ToRGBA8 );
// From <API key>
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key><4, 4, 8> );
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key><4, 4, 8> );
// From <API key>
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key><4, 4, 16> );
// From <API key>
InsertLoadFunction(&map, <API key>, GL_UNSIGNED_BYTE, DXGI_FORMAT_UNKNOWN, <API key><4, 4, 16> );
// clang-format on
return map;
}
typedef std::pair<<API key>, <API key>>
<API key>;
// TODO: This should be generated by a JSON file
const <API key> &<API key>()
{
static <API key> map;
map.insert(<API key>(
<API key>(GL_RGB8, <API key>),
<API key><GLubyte, 0x00, 0x00, 0x00, 0xFF>));
map.insert(<API key>(
<API key>(GL_RGB565, <API key>),
<API key><GLubyte, 0x00, 0x00, 0x00, 0xFF>));
map.insert(<API key>(
<API key>(GL_SRGB8, <API key>),
<API key><GLubyte, 0x00, 0x00, 0x00, 0xFF>));
map.insert(<API key>(
<API key>(GL_RGB16F, <API key>),
<API key><GLhalf, 0x0000, 0x0000, 0x0000, gl::Float16One>));
map.insert(<API key>(
<API key>(GL_RGB32F, <API key>),
<API key><GLfloat, 0x00000000, 0x00000000, 0x00000000, gl::Float32One>));
map.insert(<API key>(
<API key>(GL_RGB8UI, <API key>),
<API key><GLubyte, 0x00, 0x00, 0x00, 0x01>));
map.insert(<API key>(
<API key>(GL_RGB8I, <API key>),
<API key><GLbyte, 0x00, 0x00, 0x00, 0x01>));
map.insert(<API key>(
<API key>(GL_RGB16UI, <API key>),
<API key><GLushort, 0x0000, 0x0000, 0x0000, 0x0001>));
map.insert(<API key>(
<API key>(GL_RGB16I, <API key>),
<API key><GLshort, 0x0000, 0x0000, 0x0000, 0x0001>));
map.insert(<API key>(
<API key>(GL_RGB32UI, <API key>),
<API key><GLuint, 0x00000000, 0x00000000, 0x00000000, 0x00000001>));
map.insert(<API key>(
<API key>(GL_RGB32I, <API key>),
<API key><GLint, 0x00000000, 0x00000000, 0x00000000, 0x00000001>));
return map;
}
} // namespace d3d11
} // namespace rx
|
#include "atlas_misc.h"
#include "camm_strat1.h"
void ATL_USET(int len, const SCALAR alpha, TYPE *X, const int incX)
{
NO_INLINE;
#ifndef SREAL
len+=len;
#endif
#ifdef DCPLX
len+=len;
#endif
#define VERS 3
#define N Mjoin(set_,VERS)
#ifndef BITS
#define BITS 4
#endif
#ifndef CL
#define CL 24
#endif
#ifdef SREAL
#undef BITS
#define BITS 3
#endif
#ifdef DREAL
#undef BITS
#define BITS 3
#endif
#ifdef SCPLX
#undef BITS
#define BITS 3
#endif
#ifdef DCPLX
#undef BITS
#define BITS 3
#endif
/* #include "out.h" */
/* #include "foo.h" */
ASM(
#if defined(SREAL) || defined(DREAL)
pls(0,cx,0)
ps(0,0,0)
#elif defined(SCPLX)
pld(0,cx,0)
plh(0,0)
#else
pl(0,cx,0)
#endif
#define ALIGN
#define INC(a_) a(a_,ax)
#define LR dx
#include "camm_tpipe.h"
#undef N
::"a" (X),
#if defined(SCPLX) || defined(DCPLX)
"c" (alpha),
#else
"c" (&alpha),
#endif
"d" (len)
: "di","memory" );
}
|

Free peer-to-peer file transfers in your browser
Cooked up by [Alex Kern](http:
[.
## Requirements
* node `0.12.x`
* npm `2.x.x`
## Installation
$ npm install filepizza -g
$ filepizza
You can specify the port that FilePizza's HTTP server uses by setting the `PORT` environment variable (default 3000):
$ env PORT=8080 filepizza
If you'd like to use [Twilio's STUN/TURN service](https:
$ env TWILIO_SID=abcdef TWILIO_TOKEN=ghijkl filepizza
## Development
$ git clone https://github.com/kern/filepizza.git
$ npm install
$ npm start
FilePizza is an isomorphic React application which uses the Flux application architecture. ES6 features are used liberally and compiled using Babel. Views are rendered on the server, store data is serialized and sent to the client, which then picks up where the server left off.
Both client and server JavaScript files can be found in `lib/`. `lib/server.js` and `lib/client.js` are the server and client entrypoints, respectively. `lib/components/`, `lib/stores/`, and `lib/actions/` contain the corresponding Flux modules, implemented using [alt](https:
Stylesheets are automatically compiled using Stylus and are available at `/css`. Client-side JavaScript is compiled using Browserify and is available at `/js`.
## FAQ
**Where are my files sent?** Your files never touch our server. Instead, they are sent directly from the uploader's browser to the downloader's browser using WebTorrent and WebRTC. This requires that the uploader leave their browser window open until the transfer is complete.
**Can multiple people download my file at once?** Yes! Just send them your tempalink.
**How big can my files be?** Chrome has issues supporting files >500 MB. Firefox does not have any issues with large files, however.
**What happens when I close my browser?** The tempalink is invalidated. If a downloader has completed the transfer, that downloader will continue to seed to incomplete downloaders, but no new downloads may be initiated.
**Are my files encrypted?** Yes, all WebRTC communications are automatically encrypted using public-key cryptography.
**My files are sending slowly!** Transfer speed is dependent on your network connection.
## Troubleshooting
If you receive a `Error: EMFILE, too many open files` error when running `npm
start` on a Mac, this is a result of Browserify's compilation step opening up a
large number of npm modules all at once. You'll have to increase the maximum
number of open files allowed on your system:
$ sysctl -w kern.maxfiles=20480
FilePizza is released under the [BSD 3-Clause license](https:
|
// <API key>.h
// mailcore2
#ifndef <API key>
#define <API key>
#include <MailCore/MCIMAPOperation.h>
#ifdef __cplusplus
namespace mailcore {
class <API key> : public IMAPOperation {
public:
<API key>();
virtual ~<API key>();
// Result.
virtual HashMap * namespaces();
public: // subclass behavior
virtual void main();
private:
HashMap * mNamespaces;
};
}
#endif
#endif
|
#include "ui/events/platform/x11/<API key>.h"
#include <X11/extensions/XInput.h>
#include <X11/extensions/XInput2.h>
#include <cmath>
#include <set>
#include <string>
#include <vector>
#include "base/command_line.h"
#include "base/files/file_enumerator.h"
#include "base/logging.h"
#include "base/process/launch.h"
#include "base/strings/string_util.h"
#include "base/sys_info.h"
#include "ui/events/<API key>.h"
#include "ui/events/touchscreen_device.h"
#include "ui/gfx/x/x11_types.h"
namespace ui {
namespace {
// We consider the touchscreen to be internal if it is an I2c device.
// With the device id, we can query X to get the device's dev input
// node eventXXX. Then we search all the dev input nodes registered
// by I2C devices to see if we can find eventXXX.
bool <API key>(XDisplay* dpy, int device_id) {
using base::FileEnumerator;
using base::FilePath;
#if !defined(CHROMEOS)
return false;
#else
if (!base::SysInfo::IsRunningOnChromeOS())
return false;
#endif
// Input device has a property "Device Node" pointing to its dev input node,
// e.g. Device Node (250): "/dev/input/event8"
Atom device_node = XInternAtom(dpy, "Device Node", False);
if (device_node == None)
return false;
Atom actual_type;
int actual_format;
unsigned long nitems, bytes_after;
unsigned char* data;
XDevice* dev = XOpenDevice(dpy, device_id);
if (!dev)
return false;
if (XGetDeviceProperty(dpy, dev, device_node, 0, 1000, False, AnyPropertyType,
&actual_type, &actual_format, &nitems, &bytes_after,
&data) != Success) {
XCloseDevice(dpy, dev);
return false;
}
base::FilePath dev_node_path(reinterpret_cast<char*>(data));
XFree(data);
XCloseDevice(dpy, dev);
std::string event_node = dev_node_path.BaseName().value();
if (event_node.empty() || !StartsWithASCII(event_node, "event", false))
return false;
// Extract id "XXX" from "eventXXX"
std::string event_node_id = event_node.substr(5);
// I2C input device registers its dev input node at
// /sys/bus/i2c/devices/*/input/inputXXX/eventXXX
FileEnumerator i2c_enum(FilePath(FILE_PATH_LITERAL("/sys/bus/i2c/devices/")),
false, base::FileEnumerator::DIRECTORIES);
for (FilePath i2c_name = i2c_enum.Next(); !i2c_name.empty();
i2c_name = i2c_enum.Next()) {
FileEnumerator input_enum(i2c_name.Append(FILE_PATH_LITERAL("input")),
false, base::FileEnumerator::DIRECTORIES,
FILE_PATH_LITERAL("input*"));
for (base::FilePath input = input_enum.Next(); !input.empty();
input = input_enum.Next()) {
if (input.BaseName().value().substr(5) == event_node_id)
return true;
}
}
return false;
}
} // namespace
<API key>::<API key>(
<API key>* delegate)
: delegate_(delegate) {
}
<API key>::~<API key>() {
}
void <API key>::OnHotplugEvent() {
const XIDeviceList& device_list =
DeviceListCacheX::GetInstance()->GetXI2DeviceList(gfx::GetXDisplay());
<API key>(device_list);
}
void <API key>::<API key>(
const XIDeviceList& x11_devices) {
std::vector<TouchscreenDevice> devices;
Display* display = gfx::GetXDisplay();
Atom valuator_x = XInternAtom(display, "Abs MT Position X", False);
Atom valuator_y = XInternAtom(display, "Abs MT Position Y", False);
if (valuator_x == None || valuator_y == None)
return;
std::set<int> <API key>;
for (int i = 0; i < x11_devices.count; i++) {
if (!x11_devices[i].enabled || x11_devices[i].use != XIFloatingSlave)
continue; // Assume all touchscreens are floating slaves
double width = -1.0;
double height = -1.0;
bool is_direct_touch = false;
for (int j = 0; j < x11_devices[i].num_classes; j++) {
XIAnyClassInfo* class_info = x11_devices[i].classes[j];
if (class_info->type == XIValuatorClass) {
XIValuatorClassInfo* valuator_info =
reinterpret_cast<XIValuatorClassInfo*>(class_info);
if (valuator_x == valuator_info->label) {
// Ignore X axis valuator with unexpected properties
if (valuator_info->number == 0 && valuator_info->mode == Absolute &&
valuator_info->min == 0.0) {
width = valuator_info->max;
}
} else if (valuator_y == valuator_info->label) {
// Ignore Y axis valuator with unexpected properties
if (valuator_info->number == 1 && valuator_info->mode == Absolute &&
valuator_info->min == 0.0) {
height = valuator_info->max;
}
}
}
#if defined(USE_XI2_MT)
if (class_info->type == XITouchClass) {
XITouchClassInfo* touch_info =
reinterpret_cast<XITouchClassInfo*>(class_info);
is_direct_touch = touch_info->mode == XIDirectTouch;
}
#endif
}
// Touchscreens should have absolute X and Y axes, and be direct touch
// devices.
if (width > 0.0 && height > 0.0 && is_direct_touch) {
bool is_internal =
<API key>(display, x11_devices[i].deviceid);
devices.push_back(TouchscreenDevice(
x11_devices[i].deviceid, gfx::Size(width, height), is_internal));
}
}
delegate_-><API key>(devices);
}
} // namespace ui
|
<?php
/**
* ALIPAY API: alipay.pass.instance.update request
*
* @author auto create
* @since 1.0, 2015-07-23 11:37:35
*/
class <API key>
{
private $bizContent;
private $apiParas = array();
private $terminalType;
private $terminalInfo;
private $prodCode;
private $apiVersion="1.0";
private $notifyUrl;
public function setBizContent($bizContent)
{
$this->bizContent = $bizContent;
$this->apiParas["biz_content"] = $bizContent;
}
public function getBizContent()
{
return $this->bizContent;
}
public function getApiMethodName()
{
return "alipay.pass.instance.update";
}
public function setNotifyUrl($notifyUrl)
{
$this->notifyUrl=$notifyUrl;
}
public function getNotifyUrl()
{
return $this->notifyUrl;
}
public function getApiParas()
{
return $this->apiParas;
}
public function getTerminalType()
{
return $this->terminalType;
}
public function setTerminalType($terminalType)
{
$this->terminalType = $terminalType;
}
public function getTerminalInfo()
{
return $this->terminalInfo;
}
public function setTerminalInfo($terminalInfo)
{
$this->terminalInfo = $terminalInfo;
}
public function getProdCode()
{
return $this->prodCode;
}
public function setProdCode($prodCode)
{
$this->prodCode = $prodCode;
}
public function setApiVersion($apiVersion)
{
$this->apiVersion=$apiVersion;
}
public function getApiVersion()
{
return $this->apiVersion;
}
}
|
#ifndef GRAPHCLASS
#define GRAPHCLASS
#include <deque>
class GraphControlPane;
enum GRAPH_UNITS
{
UNIT_PIXELS,
UNIT_ARCSEC,
};
// accumulator for trend line calculation
struct TrendLineAccum
{
double sum_y;
double sum_xy;
double sum_y2;
};
struct S_HISTORY
{
wxLongLong_t timestamp;
double dx;
double dy;
double ra;
double dec;
int raDur;
int decDur;
double starSNR;
double starMass;
bool raLimited;
bool decLimited;
S_HISTORY() { }
S_HISTORY(const GuideStepInfo& step)
: timestamp(::wxGetUTCTimeMillis().GetValue()),
dx(step.cameraOffset->X), dy(step.cameraOffset->Y), ra(step.mountOffset->X), dec(step.mountOffset->Y),
raDur(step.durationRA), decDur(step.durationDec), starSNR(step.starSNR), starMass(step.starMass),
raLimited(step.raLimited), decLimited(step.decLimited) { }
};
struct DitherInfo
{
wxLongLong_t timestamp;
double dRa;
double dDec;
};
struct SummaryStats
{
S_HISTORY cur;
double rms_ra;
double rms_dec;
double rms_tot;
double osc_index;
bool osc_alert;
double ra_peak;
double dec_peak;
unsigned int star_lost_cnt;
unsigned int ra_limit_cnt;
unsigned int dec_limit_cnt;
};
class <API key> : public wxWindow
{
public:
enum GRAPH_MODE
{
MODE_RADEC,
MODE_DXDY,
};
private:
static const int <API key> = 50;
static const int m_yDivisions = 3;
wxColour m_raOrDxColor, m_decOrDyColor;
wxStaticText *m_pRaRMS, *m_pDecRMS, *m_pTotRMS, *m_pOscIndex;
unsigned int m_minLength;
unsigned int m_minHeight;
unsigned int m_maxHeight;
circular_buffer<S_HISTORY> m_history;
std::deque<DitherInfo> m_dithers;
wxPoint *m_line1;
wxPoint *m_line2;
TrendLineAccum m_trendLineAccum[4]; // dx, dy, ra, dec
int m_raSameSides; // accumulator for RA osc index
SummaryStats m_stats;
GRAPH_MODE m_mode;
unsigned int m_length;
unsigned int m_height;
GRAPH_UNITS m_heightUnits;
bool m_showTrendlines;
bool m_showCorrections;
bool m_showStarMass;
bool m_showStarSNR;
friend class GraphLogWindow;
public:
<API key>(wxWindow *parent);
~<API key>(void);
bool SetMinLength(unsigned int minLength);
bool SetMaxLength(unsigned int maxLength);
bool SetMinHeight(unsigned int minLength);
bool SetMaxHeight(unsigned int minHeight);
void AppendData(const GuideStepInfo& step);
void AppendData(const FrameDroppedInfo& info);
void AppendData(const DitherInfo& info);
unsigned int GetItemCount() const;
void ResetData(void);
private:
void <API key>(void);
void UpdateStats(unsigned int nr, const S_HISTORY *cur);
void OnPaint(wxPaintEvent& evt);
void OnLeftBtnDown(wxMouseEvent& evt);
DECLARE_EVENT_TABLE()
};
inline unsigned int <API key>::GetItemCount() const
{
return wxMin(m_history.size(), m_length);
}
class GraphLogWindow : public wxWindow
{
OptionsButton *m_pLengthButton;
OptionsButton *m_pHeightButton;
int <API key>; // value currently displayed on height button: <0 for arc-sec, >0 for pixels
OptionsButton *m_pSettingsButton;
wxCheckBox *<API key>;
wxCheckBox *<API key>;
wxStaticText *RALabel;
wxStaticText *DecLabel;
wxStaticText *OscIndexLabel;
wxStaticText *RMSLabel;
wxFlexGridSizer *m_pControlSizer;
int m_ControlNbRows;
GraphControlPane *m_pXControlPane;
GraphControlPane *m_pYControlPane;
GraphControlPane *m_pScopePane;
bool m_visible;
<API key> *m_pClient;
int StringWidth(const wxString& string);
void <API key>(void);
void <API key>(void);
public:
enum {
DefaultMinLength = 50,
DefaultMaxLength = 400,
DefaultMinHeight = 1,
DefaultMaxHeight = 16,
};
GraphLogWindow(wxWindow *parent);
~GraphLogWindow(void);
void AppendData(const GuideStepInfo& step);
void AppendData(const FrameDroppedInfo& info);
void AppendData(const DitherInfo& info);
void UpdateControls(void);
void SetState(bool is_active);
void EnableTrendLines(bool enable);
<API key>::GRAPH_MODE SetMode(<API key>::GRAPH_MODE newMode);
int GetLength(void) const;
void SetLength(int length);
int GetHeight(void) const;
void SetHeight(int height);
wxMenu *GetLengthMenu(void);
unsigned int GetHistoryItemCount(void) const;
void OnPaint(wxPaintEvent& evt);
void OnButtonSettings(wxCommandEvent& evt);
void OnRADecDxDy(wxCommandEvent& evt);
void OnArcsecsPixels(wxCommandEvent& evt);
void OnRADxColor(wxCommandEvent& evt);
void OnDecDyColor(wxCommandEvent& evt);
void OnMenuStarMass(wxCommandEvent& evt);
void OnMenuStarSNR(wxCommandEvent& evt);
void OnButtonLength(wxCommandEvent& evt);
void OnMenuLength(wxCommandEvent& evt);
void OnButtonHeight(wxCommandEvent& evt);
void OnMenuHeight(wxCommandEvent& evt);
void OnButtonClear(wxCommandEvent& evt);
void <API key>(wxCommandEvent& evt);
void <API key>(wxCommandEvent& evt);
void OnButtonZoomIn(wxCommandEvent& evt);
void OnButtonZoomOut(wxCommandEvent& evt);
wxStaticText *m_pLabel1, *m_pLabel2;
wxColor GetRaOrDxColor(void);
wxColor GetDecOrDyColor(void);
const SummaryStats& Stats(void) const { return m_pClient->m_stats; }
DECLARE_EVENT_TABLE()
};
class GraphControlPane : public wxWindow
{
public:
GraphControlPane(wxWindow *pParent, const wxString& label);
~GraphControlPane(void);
protected:
wxBoxSizer *m_pControlSizer;
int StringWidth(const wxString& string);
void DoAdd(wxControl *pCtrl, const wxString& lbl);
};
#endif
|
# coding=utf-8
from __future__ import absolute_import
from .base import *
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": ":memory:",
},
}
|
#include "ios/chrome/browser/search_engines/<API key>.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/no_destructor.h"
#include "components/keyed_service/core/service_access_type.h"
#include "components/keyed_service/ios/<API key>.h"
#include "components/search_engines/<API key>.h"
#include "components/search_engines/<API key>.h"
#include "ios/chrome/browser/application_context.h"
#include "ios/chrome/browser/browser_state/<API key>.h"
#include "ios/chrome/browser/browser_state/<API key>.h"
#include "ios/chrome/browser/history/<API key>.h"
#include "ios/chrome/browser/search_engines/<API key>.h"
#include "ios/chrome/browser/search_engines/<API key>.h"
#include "ios/chrome/browser/webdata_services/<API key>.h"
#include "rlz/buildflags/buildflags.h"
#if BUILDFLAG(ENABLE_RLZ)
#include "components/rlz/rlz_tracker.h" // nogncheck
#endif
namespace ios {
namespace {
base::RepeatingClosure <API key>() {
#if BUILDFLAG(ENABLE_RLZ)
return base::BindRepeating(
base::IgnoreResult(&rlz::RLZTracker::RecordProductEvent), rlz_lib::CHROME,
rlz::RLZTracker::ChromeOmnibox(), rlz_lib::SET_TO_GOOGLE);
#else
return base::RepeatingClosure();
#endif
}
std::unique_ptr<KeyedService> <API key>(
web::BrowserState* context) {
ChromeBrowserState* browser_state =
ChromeBrowserState::FromBrowserState(context);
return std::make_unique<TemplateURLService>(
browser_state->GetPrefs(),
std::make_unique<ios::<API key>>(),
ios::<API key>::<API key>(
browser_state, ServiceAccessType::EXPLICIT_ACCESS),
std::make_unique<ios::<API key>>(
ios::<API key>::GetForBrowserState(
browser_state, ServiceAccessType::EXPLICIT_ACCESS)),
<API key>());
}
} // namespace
// static
TemplateURLService* <API key>::GetForBrowserState(
ChromeBrowserState* browser_state) {
return static_cast<TemplateURLService*>(
GetInstance()-><API key>(browser_state, true));
}
// static
<API key>* <API key>::GetInstance() {
static base::NoDestructor<<API key>> instance;
return instance.get();
}
// static
<API key>::TestingFactory
<API key>::GetDefaultFactory() {
return base::BindRepeating(&<API key>);
}
<API key>::<API key>()
: <API key>(
"TemplateURLService",
<API key>::GetInstance()) {
DependsOn(ios::<API key>::GetInstance());
DependsOn(ios::<API key>::GetInstance());
}
<API key>::~<API key>() {}
void <API key>::<API key>(
user_prefs::<API key>* registry) {
<API key>::<API key>(registry);
TemplateURLService::<API key>(registry);
}
std::unique_ptr<KeyedService>
<API key>::<API key>(
web::BrowserState* context) const {
return <API key>(context);
}
web::BrowserState* <API key>::<API key>(
web::BrowserState* context) const {
return <API key>(context);
}
bool <API key>::<API key>() const {
return true;
}
} // namespace ios
|
#!/bin/bash -ex
# Buildbot annotator script for the main waterfall. Tester only.
BB_DIR="$(dirname $0)"
BB_SRC_ROOT="$(cd "$BB_DIR/../../.."; pwd)"
. "$BB_DIR/buildbot_functions.sh"
# SHERIFF: if you need to quickly turn the main waterfall android bots
# green (preventing tree closures), uncomment the next line (and send
# appropriate email out):
## <API key>
bb_baseline_setup "$BB_SRC_ROOT" "$@"
<API key>
bb_extract_build
bb_reboot_phones
bb_run_unit_tests
<API key>
bb_print_logcat
|
#include "base/threading/platform_thread.h"
#include <errno.h>
#include <sched.h>
#include <stddef.h>
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/threading/<API key>.h"
#include "base/threading/<API key>.h"
#if 0
#include "base/tracked_objects.h"
#endif
#include "build/build_config.h"
#if !defined(OS_NACL)
#include <pthread.h>
#include <sys/types.h>
#include <unistd.h>
#endif
namespace base {
namespace internal {
namespace {
#if !defined(OS_NACL)
const struct sched_param kRealTimePrio = {8};
#endif
} // namespace
const <API key> <API key>[4] = {
{ThreadPriority::BACKGROUND, 10},
{ThreadPriority::NORMAL, 0},
{ThreadPriority::DISPLAY, -6},
{ThreadPriority::REALTIME_AUDIO, -10},
};
bool <API key>(ThreadPriority priority) {
#if !defined(OS_NACL)
return priority == ThreadPriority::REALTIME_AUDIO &&
<API key>(pthread_self(), SCHED_RR, &kRealTimePrio) == 0;
#else
return false;
#endif
}
bool <API key>(ThreadPriority* priority) {
#if !defined(OS_NACL)
int maybe_sched_rr = 0;
struct sched_param maybe_realtime_prio = {0};
if (<API key>(pthread_self(), &maybe_sched_rr,
&maybe_realtime_prio) == 0 &&
maybe_sched_rr == SCHED_RR &&
maybe_realtime_prio.sched_priority == kRealTimePrio.sched_priority) {
*priority = ThreadPriority::REALTIME_AUDIO;
return true;
}
#endif
return false;
}
} // namespace internal
// static
void PlatformThread::SetName(const std::string& name) {
ThreadIdNameManager::GetInstance()->SetName(CurrentId(), name);
#if 0
tracked_objects::ThreadData::<API key>(name);
#endif
#if !defined(OS_NACL)
// On FreeBSD we can get the thread names to show up in the debugger by
// setting the process name for the LWP. We don't want to do this for the
// main thread because that would rename the process, causing tools like
// killall to stop working.
if (PlatformThread::CurrentId() == getpid())
return;
setproctitle("%s", name.c_str());
#endif // !defined(OS_NACL)
}
void InitThreading() {}
void TerminateOnThread() {}
size_t <API key>(const pthread_attr_t& attributes) {
#if !defined(THREAD_SANITIZER)
return 0;
#else
// ThreadSanitizer bloats the stack heavily. Evidence has been that the
// default stack size isn't enough for some browser tests.
return 2 * (1 << 23); // 2 times 8192K (the default stack size on Linux).
#endif
}
} // namespace base
|
/* Based on
*
SUBROUTINE DGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
SUBROUTINE ZGBTF2( M, N, KL, KU, AB, LDAB, IPIV, INFO )
*
* -- LAPACK routine (version 3.2) --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
* November 2006
*/
#ifndef <API key>
#define <API key> 1
#include <flens/lapack/typedefs.h>
#include <flens/matrixtypes/matrixtypes.h>
#include <flens/vectortypes/vectortypes.h>
namespace flens { namespace lapack {
// Real and complex variant
template <typename MA, typename VPIV>
typename RestrictTo<IsGbMatrix<MA>::value
&& <API key><VPIV>::value,
typename RemoveRef<MA>::Type::IndexType>::Type
tf2(MA &&A, VPIV &&piv);
} } // namespace lapack, flens
#endif // <API key>
|
# - Try to find the CHECK libraries
# Once done this will define
# CHECK_FOUND - system has check
# CHECK_INCLUDE_DIR - the check include directory
# CHECK_LIBRARIES - check library
# This configuration file for finding libcheck is originally from
# the opensync project. The originally was downloaded from here:
# opensync.org/browser/branches/<API key>/modules/FindCheck.cmake
# For details see the accompanying <API key> file.
INCLUDE( FindPkgConfig )
# Take care about check.pc settings
PKG_SEARCH_MODULE( CHECK check )
# Look for CHECK include dir and libraries
IF( NOT CHECK_FOUND )
IF ( CHECK_INSTALL_DIR )
MESSAGE ( STATUS "Using override CHECK_INSTALL_DIR to find check" )
SET ( CHECK_INCLUDE_DIR "${CHECK_INSTALL_DIR}/include" )
SET ( CHECK_INCLUDE_DIRS "${CHECK_INCLUDE_DIR}" )
FIND_LIBRARY( CHECK_LIBRARY NAMES check PATHS "${CHECK_INSTALL_DIR}/lib" )
FIND_LIBRARY( COMPAT_LIBRARY NAMES compat PATHS "${CHECK_INSTALL_DIR}/lib" )
SET ( CHECK_LIBRARIES "${CHECK_LIBRARY}" "${COMPAT_LIBRARY}" )
ELSE ( CHECK_INSTALL_DIR )
FIND_PATH( CHECK_INCLUDE_DIR check.h )
FIND_LIBRARY( CHECK_LIBRARIES NAMES check )
ENDIF ( CHECK_INSTALL_DIR )
IF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
SET( CHECK_FOUND 1 )
IF ( NOT Check_FIND_QUIETLY )
MESSAGE ( STATUS "Found CHECK: ${CHECK_LIBRARIES}" )
ENDIF ( NOT Check_FIND_QUIETLY )
ELSE ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
IF ( Check_FIND_REQUIRED )
MESSAGE( FATAL_ERROR "Could NOT find CHECK" )
ELSE ( Check_FIND_REQUIRED )
IF ( NOT Check_FIND_QUIETLY )
MESSAGE( STATUS "Could NOT find CHECK" )
ENDIF ( NOT Check_FIND_QUIETLY )
ENDIF ( Check_FIND_REQUIRED )
ENDIF ( CHECK_INCLUDE_DIR AND CHECK_LIBRARIES )
ENDIF( NOT CHECK_FOUND )
# Hide advanced variables from CMake GUIs
MARK_AS_ADVANCED( CHECK_INCLUDE_DIR CHECK_LIBRARIES )
|
<?php
error_reporting(E_ALL);
trait THello {
public abstract function hello();
}
class TraitsTest {
use THello;
public function hello() {
echo 'Hello';
}
}
$test = new TraitsTest();
$test->hello();
?>
|
// modification, are permitted provided that the following conditions are met:
// and/or other materials provided with the distribution.
// * Neither the name of ARM Limited nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// 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.
// This file is auto generated using tools/<API key>.py.
// PLEASE DO NOT EDIT.
#ifndef <API key>
#define <API key>
const uint32_t <API key>[] = {
0x00027f00, 0x00007f00, 0x00000000, 0x00000000,
0x00017f00, 0x00007f40, 0x00000000, 0x00000000,
0x00017f40, 0x00003f80, 0x00000000, 0x00000000,
0x00013f80, 0x00803f80, 0x00000000, 0x00000000,
0x00813f80, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x001273d6, 0x00000000, 0x00000000,
0x001373d6, 0x00803f7f, 0x00000000, 0x00000000,
0x00813f7f, 0x00003f81, 0x00000000, 0x00000000,
0x00013f81, 0x00003f80, 0x00000000, 0x00000000,
0x00013f80, 0x807fc080, 0x00000000, 0x00000000,
0x807ec080, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x8011f4d6, 0x00000000, 0x00000000,
0x8011f4d6, 0x807fc03f, 0x00000000, 0x00000000,
0x807fc07f, 0x00003fbf, 0x00000000, 0x00000000,
0x00003f7f, 0x00003fc0, 0x00000000, 0x00000000,
0x00003f80, 0x00803fc0, 0x00000000, 0x00000000,
0x00803f80, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x00127416, 0x00000000, 0x00000000,
0x001273d6, 0x00803fbf, 0x00000000, 0x00000000,
0x00803f7f, 0x00003fc1, 0x00000000, 0x00000000,
0x00003f81, 0x00003fc0, 0x00000000, 0x00000000,
0x00003f80, 0x807fc040, 0x00000000, 0x00000000,
0x807fc080, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x8011f496, 0x00000000, 0x00000000,
0x8011f496, 0x807fffff, 0x00000000, 0x00000000,
0x807fc03f, 0x80000001, 0x00000000, 0x00000000,
0x00003fbf, 0x00000000, 0x00000000, 0x00000000,
0x00003fc0, 0x00800000, 0x00000000, 0x00000000,
0x00803fc0, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x00123456, 0x00000000, 0x00000000,
0x00127416, 0x007fffff, 0x00000000, 0x00000000,
0x00803fbf, 0x00000001, 0x00000000, 0x00000000,
0x00003fc1, 0x00000000, 0x00000000, 0x00000000,
0x00003fc0, 0x80800000, 0x00000000, 0x00000000,
0x807fc040, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x80123456, 0x00000000, 0x00000000,
0x80123456, 0x00000001, 0x00000000, 0x00000000,
0x807fffff, 0x007fffff, 0x00000000, 0x00000000,
0x80000001, 0x00800000, 0x00000000, 0x00000000,
0x00000000, 0x01000000, 0x00000000, 0x00000000,
0x00800000, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x00923456, 0x00000000, 0x00000000,
0x00123456, 0x00ffffff, 0x00000000, 0x00000000,
0x007fffff, 0x00800001, 0x00000000, 0x00000000,
0x00000001, 0x00800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x80800000, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x006dcbaa, 0x00000000, 0x00000000,
0x006dcbaa, 0x3effffff, 0x00000000, 0x00000000,
0x00000001, 0x3effffff, 0x00000000, 0x00000000,
0x007fffff, 0x3effffff, 0x00000000, 0x00000000,
0x00800000, 0x3effffff, 0x00000000, 0x00000000,
0x01000000, 0x3f7fffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f000000, 0x3f800000, 0x00000000, 0x00000000,
0x3f000001, 0x3fbfffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800000, 0x3fc00001, 0x00000000, 0x00000000,
0x3f800001, 0x40000000, 0x00000000, 0x00000000,
0x3fc00000, 0x41280000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x3effffff, 0x00000000, 0x00000000,
0x00923456, 0x3effffff, 0x00000000, 0x00000000,
0x00ffffff, 0x3effffff, 0x00000000, 0x00000000,
0x00800001, 0x3effffff, 0x00000000, 0x00000000,
0x00800000, 0x3effffff, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xbeffffff, 0xb3000000, 0x00000000, 0x00000000,
0xbf000000, 0xb3c00000, 0x00000000, 0x00000000,
0xbf000001, 0xbeffffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf800000, 0xbf000002, 0x00000000, 0x00000000,
0xbf800001, 0xbf800000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1180000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3fc00000, 0x00000000, 0x00000000,
0x3fbfffff, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x3fc00001, 0x00000000, 0x00000000,
0x3fc00001, 0x40000000, 0x00000000, 0x00000000,
0x40000000, 0x41280000, 0x00000000, 0x00000000,
0x41280000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x33000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xb3000000, 0xb3800000, 0x00000000, 0x00000000,
0xb3c00000, 0xbefffffe, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000002, 0x00000000, 0x00000000,
0xbf000002, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xc1180000, 0x00000000, 0x00000000,
0xc1180000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x3fc00002, 0x00000000, 0x00000000,
0x3fc00001, 0x40000000, 0x00000000, 0x00000000,
0x40000000, 0x41280000, 0x00000000, 0x00000000,
0x41280000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000000, 0x33c00000, 0x00000000, 0x00000000,
0x33000000, 0x33800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xb3800000, 0xbefffffc, 0x00000000, 0x00000000,
0xbefffffe, 0xbefffffe, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000002, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf800000, 0xc1180000, 0x00000000, 0x00000000,
0xc1180000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3fbfffff, 0x00000000, 0x00000000,
0x3f800000, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800000, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fffffff, 0x00000000, 0x00000000,
0x3fc00000, 0x40000000, 0x00000000, 0x00000000,
0x3fc00000, 0x40000000, 0x00000000, 0x00000000,
0x3fc00002, 0x40200000, 0x00000000, 0x00000000,
0x40000000, 0x41300000, 0x00000000, 0x00000000,
0x41280000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3effffff, 0x00000000, 0x00000000,
0x33c00000, 0x3efffffe, 0x00000000, 0x00000000,
0x33800000, 0x3efffffc, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xbefffffc, 0xb3800000, 0x00000000, 0x00000000,
0xbefffffe, 0xb4400000, 0x00000000, 0x00000000,
0xbf000001, 0xbf000001, 0x00000000, 0x00000000,
0xbf7fffff, 0xc1100000, 0x00000000, 0x00000000,
0xc1180000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3fc00000, 0x00000000, 0x00000000,
0x3fbfffff, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x40000000, 0x00000000, 0x00000000,
0x3fffffff, 0x40000000, 0x00000000, 0x00000000,
0x40000000, 0x40000000, 0x00000000, 0x00000000,
0x40000000, 0x40200000, 0x00000000, 0x00000000,
0x40200000, 0x41300000, 0x00000000, 0x00000000,
0x41300000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f000000, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3efffffe, 0x3efffffe, 0x00000000, 0x00000000,
0x3efffffc, 0x33800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xb3800000, 0xb4000000, 0x00000000, 0x00000000,
0xb4400000, 0xbf000000, 0x00000000, 0x00000000,
0xbf000001, 0xc1100000, 0x00000000, 0x00000000,
0xc1100000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3fc00001, 0x00000000, 0x00000000,
0x3fc00000, 0x3fc00001, 0x00000000, 0x00000000,
0x3fc00000, 0x3fc00002, 0x00000000, 0x00000000,
0x3fc00000, 0x40000000, 0x00000000, 0x00000000,
0x40000000, 0x40000000, 0x00000000, 0x00000000,
0x40000000, 0x40000001, 0x00000000, 0x00000000,
0x40000000, 0x40200000, 0x00000000, 0x00000000,
0x40200000, 0x41300000, 0x00000000, 0x00000000,
0x41300000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800000, 0x3f000002, 0x00000000, 0x00000000,
0x3f000000, 0x3f000002, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3efffffe, 0x34400000, 0x00000000, 0x00000000,
0x33800000, 0x34000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xb4000000, 0xbefffffc, 0x00000000, 0x00000000,
0xbf000000, 0xc1100000, 0x00000000, 0x00000000,
0xc1100000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x40000000, 0x00000000, 0x00000000,
0x3fc00001, 0x40000000, 0x00000000, 0x00000000,
0x3fc00001, 0x40000000, 0x00000000, 0x00000000,
0x3fc00002, 0x40200000, 0x00000000, 0x00000000,
0x40000000, 0x40200000, 0x00000000, 0x00000000,
0x40000000, 0x40200000, 0x00000000, 0x00000000,
0x40000001, 0x40400000, 0x00000000, 0x00000000,
0x40200000, 0x41380000, 0x00000000, 0x00000000,
0x41300000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3f800001, 0x3f800000, 0x00000000, 0x00000000,
0x3f000002, 0x3f800000, 0x00000000, 0x00000000,
0x3f000002, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f000001, 0x3f000001, 0x00000000, 0x00000000,
0x34400000, 0x3f000000, 0x00000000, 0x00000000,
0x34000000, 0x3efffffc, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xbefffffc, 0xc1080000, 0x00000000, 0x00000000,
0xc1100000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41280000, 0x00000000, 0x00000000,
0x40000000, 0x41280000, 0x00000000, 0x00000000,
0x40000000, 0x41280000, 0x00000000, 0x00000000,
0x40000000, 0x41300000, 0x00000000, 0x00000000,
0x40200000, 0x41300000, 0x00000000, 0x00000000,
0x40200000, 0x41300000, 0x00000000, 0x00000000,
0x40200000, 0x41380000, 0x00000000, 0x00000000,
0x40400000, 0x41a00000, 0x00000000, 0x00000000,
0x41380000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x3fc00000, 0x41180000, 0x00000000, 0x00000000,
0x3f800000, 0x41180000, 0x00000000, 0x00000000,
0x3f800000, 0x41180000, 0x00000000, 0x00000000,
0x3f7fffff, 0x41100000, 0x00000000, 0x00000000,
0x3f000001, 0x41100000, 0x00000000, 0x00000000,
0x3f000000, 0x41100000, 0x00000000, 0x00000000,
0x3efffffc, 0x41080000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0xc1080000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41280000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41280000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41280000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41300000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41300000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41300000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41380000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41a00000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fcfffff, 0x00000000, 0x00000000,
0x7f800000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fd23456, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fc00000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fd23456, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fc00001, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41180000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41180000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41180000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41100000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41100000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41100000, 0x7fcfffff, 0x00000000, 0x00000000,
0x41080000, 0x7fcfffff, 0x00000000, 0x00000000,
0x00000000, 0x7fcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0x7fcfffff, 0x00000000, 0x00000000,
0xff800000, 0x7fcfffff, 0x00000000, 0x00000000,
0xffd23456, 0x7fcfffff, 0x00000000, 0x00000000,
0xffc00000, 0x7fcfffff, 0x00000000, 0x00000000,
0xffd23456, 0x7fcfffff, 0x00000000, 0x00000000,
0xffc00001, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fc00000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fc00001, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7fcfffff, 0xffcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fc00000, 0x00000000, 0x00000000,
0x7fcfffff, 0xffd23456, 0x00000000, 0x00000000,
0x7fcfffff, 0xffc00000, 0x00000000, 0x00000000,
0x7fcfffff, 0xffd23456, 0x00000000, 0x00000000,
0x7fcfffff, 0xffc00001, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7f800000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0xffd23456, 0x7fd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fd23456, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00001, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0xffcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0xffd23456, 0x7fd23456, 0x00000000, 0x00000000,
0xffc00001, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x806dcba9, 0x00000000, 0x00000000,
0x7fc00001, 0x00123455, 0x00000000, 0x00000000,
0x7fc00001, 0x00123456, 0x00000000, 0x00000000,
0x7fc00001, 0x00923456, 0x00000000, 0x00000000,
0x7fc00001, 0x3effffff, 0x00000000, 0x00000000,
0x7fc00001, 0x3f000000, 0x00000000, 0x00000000,
0x7fc00001, 0x3f000001, 0x00000000, 0x00000000,
0x7fc00001, 0x3f7fffff, 0x00000000, 0x00000000,
0x7fc00001, 0x3f800000, 0x00000000, 0x00000000,
0x7fc00001, 0x3f800001, 0x00000000, 0x00000000,
0x7fc00001, 0x3fc00000, 0x00000000, 0x00000000,
0x7fc00001, 0x41200000, 0x00000000, 0x00000000,
0x7fc00001, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fc00001, 0x7f800000, 0x00000000, 0x00000000,
0x7fc00001, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00001, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00001, 0x7fd23456, 0x00000000, 0x00000000,
0x7fc00001, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x002468ac, 0x00000000, 0x00000000,
0x7fc00001, 0x00923455, 0x00000000, 0x00000000,
0x7fc00001, 0x00123457, 0x00000000, 0x00000000,
0x7fc00001, 0x00123456, 0x00000000, 0x00000000,
0x7fc00001, 0x806dcbaa, 0x00000000, 0x00000000,
0x7fc00001, 0xbeffffff, 0x00000000, 0x00000000,
0x7fc00001, 0xbf000000, 0x00000000, 0x00000000,
0x7fc00001, 0xbf000001, 0x00000000, 0x00000000,
0x7fc00001, 0xbf7fffff, 0x00000000, 0x00000000,
0x7fc00001, 0xbf800000, 0x00000000, 0x00000000,
0x7fc00001, 0xbf800001, 0x00000000, 0x00000000,
0x7fc00001, 0xbfc00000, 0x00000000, 0x00000000,
0x7fc00001, 0xc1200000, 0x00000000, 0x00000000,
0x7fc00001, 0xffcfffff, 0x00000000, 0x00000000,
0x7fc00001, 0xff800000, 0x00000000, 0x00000000,
0x7fc00001, 0xffd23456, 0x00000000, 0x00000000,
0x7fc00001, 0xffc00000, 0x00000000, 0x00000000,
0x7fc00001, 0xffd23456, 0x00000000, 0x00000000,
0x7fc00001, 0xffc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x806dcba9, 0x007ffffe, 0x00000000, 0x00000000,
0x00123455, 0x007fffff, 0x00000000, 0x00000000,
0x00123456, 0x00ffffff, 0x00000000, 0x00000000,
0x00923456, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x00923455, 0x00000000, 0x00000000,
0x002468ac, 0x00fffffe, 0x00000000, 0x00000000,
0x00923455, 0x00800000, 0x00000000, 0x00000000,
0x00123457, 0x007fffff, 0x00000000, 0x00000000,
0x00123456, 0x80000001, 0x00000000, 0x00000000,
0x806dcbaa, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x006dcba9, 0x00000000, 0x00000000,
0x006dcba9, 0x807ffffe, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x007ffffe, 0x00000001, 0x00000000, 0x00000000,
0x007fffff, 0x00800001, 0x00000000, 0x00000000,
0x00ffffff, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x00123457, 0x00000000, 0x00000000,
0x00923455, 0x00800000, 0x00000000, 0x00000000,
0x00fffffe, 0x00000002, 0x00000000, 0x00000000,
0x00800000, 0x00000001, 0x00000000, 0x00000000,
0x007fffff, 0x807fffff, 0x00000000, 0x00000000,
0x80000001, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x80123455, 0x00000000, 0x00000000,
0x80123455, 0x807fffff, 0x00000000, 0x00000000,
0x807ffffe, 0x80000001, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000001, 0x00800000, 0x00000000, 0x00000000,
0x00800001, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x00123456, 0x00000000, 0x00000000,
0x00123457, 0x007fffff, 0x00000000, 0x00000000,
0x00800000, 0x00000001, 0x00000000, 0x00000000,
0x00000002, 0x80000000, 0x00000000, 0x00000000,
0x00000001, 0x80800000, 0x00000000, 0x00000000,
0x807fffff, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x80123456, 0x00000000, 0x00000000,
0x80123456, 0x80ffffff, 0x00000000, 0x00000000,
0x807fffff, 0x80800001, 0x00000000, 0x00000000,
0x80000001, 0x80800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00800000, 0x3effffff, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000001, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x3f800001, 0x00000000, 0x00000000,
0x3f800001, 0x3fc00000, 0x00000000, 0x00000000,
0x3fc00000, 0x41200000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0x806dcbaa, 0x00000000, 0x00000000,
0x00123456, 0x80000001, 0x00000000, 0x00000000,
0x007fffff, 0x807fffff, 0x00000000, 0x00000000,
0x00000001, 0x80800000, 0x00000000, 0x00000000,
0x80000000, 0x81000000, 0x00000000, 0x00000000,
0x80800000, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x80923456, 0x00000000, 0x00000000,
0x80923456, 0xbeffffff, 0x00000000, 0x00000000,
0x80ffffff, 0xbeffffff, 0x00000000, 0x00000000,
0x80800001, 0xbeffffff, 0x00000000, 0x00000000,
0x80800000, 0xbeffffff, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x3effffff, 0x33000000, 0x00000000, 0x00000000,
0x3f000000, 0x33c00000, 0x00000000, 0x00000000,
0x3f000001, 0x3effffff, 0x00000000, 0x00000000,
0x3f7fffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f800000, 0x3f000002, 0x00000000, 0x00000000,
0x3f800001, 0x3f800000, 0x00000000, 0x00000000,
0x3fc00000, 0x41180000, 0x00000000, 0x00000000,
0x41200000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xbeffffff, 0x00000000, 0x00000000,
0x806dcbaa, 0xbeffffff, 0x00000000, 0x00000000,
0x80000001, 0xbeffffff, 0x00000000, 0x00000000,
0x807fffff, 0xbeffffff, 0x00000000, 0x00000000,
0x80800000, 0xbeffffff, 0x00000000, 0x00000000,
0x81000000, 0xbf7fffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf000000, 0xbf800000, 0x00000000, 0x00000000,
0xbf000001, 0xbfbfffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800000, 0xbfc00001, 0x00000000, 0x00000000,
0xbf800001, 0xc0000000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1280000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xbeffffff, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xb3000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x33000000, 0x33800000, 0x00000000, 0x00000000,
0x33c00000, 0x3efffffe, 0x00000000, 0x00000000,
0x3effffff, 0x3f000000, 0x00000000, 0x00000000,
0x3f000000, 0x3f000002, 0x00000000, 0x00000000,
0x3f000002, 0x3f800000, 0x00000000, 0x00000000,
0x3f800000, 0x41180000, 0x00000000, 0x00000000,
0x41180000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbfc00000, 0x00000000, 0x00000000,
0xbfbfffff, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xbfc00001, 0x00000000, 0x00000000,
0xbfc00001, 0xc0000000, 0x00000000, 0x00000000,
0xc0000000, 0xc1280000, 0x00000000, 0x00000000,
0xc1280000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xbf000000, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xb3c00000, 0x00000000, 0x00000000,
0xb3000000, 0xb3800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x33800000, 0x3efffffc, 0x00000000, 0x00000000,
0x3efffffe, 0x3efffffe, 0x00000000, 0x00000000,
0x3f000000, 0x3f000001, 0x00000000, 0x00000000,
0x3f000002, 0x3f7fffff, 0x00000000, 0x00000000,
0x3f800000, 0x41180000, 0x00000000, 0x00000000,
0x41180000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbf000000, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xbfc00002, 0x00000000, 0x00000000,
0xbfc00001, 0xc0000000, 0x00000000, 0x00000000,
0xc0000000, 0xc1280000, 0x00000000, 0x00000000,
0xc1280000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xbf000001, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbeffffff, 0x00000000, 0x00000000,
0xb3c00000, 0xbefffffe, 0x00000000, 0x00000000,
0xb3800000, 0xbefffffc, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x3efffffc, 0x33800000, 0x00000000, 0x00000000,
0x3efffffe, 0x34400000, 0x00000000, 0x00000000,
0x3f000001, 0x3f000001, 0x00000000, 0x00000000,
0x3f7fffff, 0x41100000, 0x00000000, 0x00000000,
0x41180000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbfbfffff, 0x00000000, 0x00000000,
0xbf800000, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800000, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfffffff, 0x00000000, 0x00000000,
0xbfc00000, 0xc0000000, 0x00000000, 0x00000000,
0xbfc00000, 0xc0000000, 0x00000000, 0x00000000,
0xbfc00002, 0xc0200000, 0x00000000, 0x00000000,
0xc0000000, 0xc1300000, 0x00000000, 0x00000000,
0xc1280000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf000000, 0x00000000, 0x00000000,
0xbeffffff, 0xbf000000, 0x00000000, 0x00000000,
0xbefffffe, 0xbefffffe, 0x00000000, 0x00000000,
0xbefffffc, 0xb3800000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x33800000, 0x34000000, 0x00000000, 0x00000000,
0x34400000, 0x3f000000, 0x00000000, 0x00000000,
0x3f000001, 0x41100000, 0x00000000, 0x00000000,
0x41100000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbf800000, 0x00000000, 0x00000000,
0xbf7fffff, 0xbfc00000, 0x00000000, 0x00000000,
0xbfbfffff, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc0000000, 0x00000000, 0x00000000,
0xbfffffff, 0xc0000000, 0x00000000, 0x00000000,
0xc0000000, 0xc0000000, 0x00000000, 0x00000000,
0xc0000000, 0xc0200000, 0x00000000, 0x00000000,
0xc0200000, 0xc1300000, 0x00000000, 0x00000000,
0xc1300000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xbf800000, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf000002, 0x00000000, 0x00000000,
0xbf000000, 0xbf000002, 0x00000000, 0x00000000,
0xbf000000, 0xbf000001, 0x00000000, 0x00000000,
0xbefffffe, 0xb4400000, 0x00000000, 0x00000000,
0xb3800000, 0xb4000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x34000000, 0x3efffffc, 0x00000000, 0x00000000,
0x3f000000, 0x41100000, 0x00000000, 0x00000000,
0x41100000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbf800001, 0x00000000, 0x00000000,
0xbf800000, 0xbfc00001, 0x00000000, 0x00000000,
0xbfc00000, 0xbfc00001, 0x00000000, 0x00000000,
0xbfc00000, 0xbfc00002, 0x00000000, 0x00000000,
0xbfc00000, 0xc0000000, 0x00000000, 0x00000000,
0xc0000000, 0xc0000000, 0x00000000, 0x00000000,
0xc0000000, 0xc0000001, 0x00000000, 0x00000000,
0xc0000000, 0xc0200000, 0x00000000, 0x00000000,
0xc0200000, 0xc1300000, 0x00000000, 0x00000000,
0xc1300000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xbf800001, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbf800000, 0x00000000, 0x00000000,
0xbf000002, 0xbf800000, 0x00000000, 0x00000000,
0xbf000002, 0xbf7fffff, 0x00000000, 0x00000000,
0xbf000001, 0xbf000001, 0x00000000, 0x00000000,
0xb4400000, 0xbf000000, 0x00000000, 0x00000000,
0xb4000000, 0xbefffffc, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x3efffffc, 0x41080000, 0x00000000, 0x00000000,
0x41100000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xbfc00000, 0x00000000, 0x00000000,
0xbf800001, 0xc0000000, 0x00000000, 0x00000000,
0xbfc00001, 0xc0000000, 0x00000000, 0x00000000,
0xbfc00001, 0xc0000000, 0x00000000, 0x00000000,
0xbfc00002, 0xc0200000, 0x00000000, 0x00000000,
0xc0000000, 0xc0200000, 0x00000000, 0x00000000,
0xc0000000, 0xc0200000, 0x00000000, 0x00000000,
0xc0000001, 0xc0400000, 0x00000000, 0x00000000,
0xc0200000, 0xc1380000, 0x00000000, 0x00000000,
0xc1300000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xbfc00000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1180000, 0x00000000, 0x00000000,
0xbf800000, 0xc1180000, 0x00000000, 0x00000000,
0xbf800000, 0xc1180000, 0x00000000, 0x00000000,
0xbf7fffff, 0xc1100000, 0x00000000, 0x00000000,
0xbf000001, 0xc1100000, 0x00000000, 0x00000000,
0xbf000000, 0xc1100000, 0x00000000, 0x00000000,
0xbefffffc, 0xc1080000, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x41080000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0x7f800000, 0x00000000, 0x00000000,
0x7f800000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00000, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1200000, 0x00000000, 0x00000000,
0xbfc00000, 0xc1280000, 0x00000000, 0x00000000,
0xc0000000, 0xc1280000, 0x00000000, 0x00000000,
0xc0000000, 0xc1280000, 0x00000000, 0x00000000,
0xc0000000, 0xc1300000, 0x00000000, 0x00000000,
0xc0200000, 0xc1300000, 0x00000000, 0x00000000,
0xc0200000, 0xc1300000, 0x00000000, 0x00000000,
0xc0200000, 0xc1380000, 0x00000000, 0x00000000,
0xc0400000, 0xc1a00000, 0x00000000, 0x00000000,
0xc1380000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xc1200000, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1180000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1180000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1180000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1100000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1100000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1100000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1080000, 0xffcfffff, 0x00000000, 0x00000000,
0x00000000, 0xffcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0xffcfffff, 0x00000000, 0x00000000,
0x7f800000, 0xffcfffff, 0x00000000, 0x00000000,
0x7fd23456, 0xffcfffff, 0x00000000, 0x00000000,
0x7fc00000, 0xffcfffff, 0x00000000, 0x00000000,
0x7fd23456, 0xffcfffff, 0x00000000, 0x00000000,
0x7fc00001, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1200000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1280000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1280000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1280000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1300000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1300000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1300000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1380000, 0xffcfffff, 0x00000000, 0x00000000,
0xc1a00000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xffcfffff, 0x00000000, 0x00000000,
0xff800000, 0xffcfffff, 0x00000000, 0x00000000,
0xffd23456, 0xffcfffff, 0x00000000, 0x00000000,
0xffc00000, 0xffcfffff, 0x00000000, 0x00000000,
0xffd23456, 0xffcfffff, 0x00000000, 0x00000000,
0xffc00001, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0x7fcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0x7fc00000, 0x00000000, 0x00000000,
0xffcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0xffcfffff, 0x7fc00000, 0x00000000, 0x00000000,
0xffcfffff, 0x7fd23456, 0x00000000, 0x00000000,
0xffcfffff, 0x7fc00001, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xffcfffff, 0xffd23456, 0x00000000, 0x00000000,
0xffcfffff, 0xffc00000, 0x00000000, 0x00000000,
0xffcfffff, 0xffd23456, 0x00000000, 0x00000000,
0xffcfffff, 0xffc00001, 0x00000000, 0x00000000,
0xffcfffff, 0xff800000, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0xffd23456, 0x00000000, 0x00000000,
0x7fc00000, 0xffd23456, 0x00000000, 0x00000000,
0x7fd23456, 0xffd23456, 0x00000000, 0x00000000,
0x7fc00000, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xffd23456, 0x00000000, 0x00000000,
0xff800000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0x7fcfffff, 0x00000000, 0x00000000,
0x7fcfffff, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0x7fd23456, 0x00000000, 0x00000000,
0x7fd23456, 0x7fc00001, 0x00000000, 0x00000000,
0x7fc00001, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffcfffff, 0x00000000, 0x00000000,
0xffcfffff, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffc00000, 0x00000000, 0x00000000,
0xffd23456, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0xffc00000, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0x7fcfffff, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0x7fd23456, 0xffd23456, 0x00000000, 0x00000000,
0x7fc00001, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffcfffff, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffc00000, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffd23456, 0x00000000, 0x00000000,
0xffc00001, 0xffd23456, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffd23456, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x80923455, 0x00000000, 0x00000000,
0xffc00001, 0x80123457, 0x00000000, 0x00000000,
0xffc00001, 0x80123456, 0x00000000, 0x00000000,
0xffc00001, 0x006dcbaa, 0x00000000, 0x00000000,
0xffc00001, 0x3effffff, 0x00000000, 0x00000000,
0xffc00001, 0x3f000000, 0x00000000, 0x00000000,
0xffc00001, 0x3f000001, 0x00000000, 0x00000000,
0xffc00001, 0x3f7fffff, 0x00000000, 0x00000000,
0xffc00001, 0x3f800000, 0x00000000, 0x00000000,
0xffc00001, 0x3f800001, 0x00000000, 0x00000000,
0xffc00001, 0x3fc00000, 0x00000000, 0x00000000,
0xffc00001, 0x41200000, 0x00000000, 0x00000000,
0xffc00001, 0x7fcfffff, 0x00000000, 0x00000000,
0xffc00001, 0x7f800000, 0x00000000, 0x00000000,
0xffc00001, 0x7fd23456, 0x00000000, 0x00000000,
0xffc00001, 0x7fc00000, 0x00000000, 0x00000000,
0xffc00001, 0x7fd23456, 0x00000000, 0x00000000,
0xffc00001, 0x7fc00001, 0x00000000, 0x00000000,
0xffc00001, 0x00000000, 0x00000000, 0x00000000,
0xffc00001, 0x006dcba9, 0x00000000, 0x00000000,
0xffc00001, 0x80123455, 0x00000000, 0x00000000,
0xffc00001, 0x80123456, 0x00000000, 0x00000000,
0xffc00001, 0x80923456, 0x00000000, 0x00000000,
0xffc00001, 0xbeffffff, 0x00000000, 0x00000000,
0xffc00001, 0xbf000000, 0x00000000, 0x00000000,
0xffc00001, 0xbf000001, 0x00000000, 0x00000000,
0xffc00001, 0xbf7fffff, 0x00000000, 0x00000000,
0xffc00001, 0xbf800000, 0x00000000, 0x00000000,
0xffc00001, 0xbf800001, 0x00000000, 0x00000000,
0xffc00001, 0xbfc00000, 0x00000000, 0x00000000,
0xffc00001, 0xc1200000, 0x00000000, 0x00000000,
0xffc00001, 0xffcfffff, 0x00000000, 0x00000000,
0xffc00001, 0xff800000, 0x00000000, 0x00000000,
0xffc00001, 0xffd23456, 0x00000000, 0x00000000,
0xffc00001, 0xffc00000, 0x00000000, 0x00000000,
0xffc00001, 0xffd23456, 0x00000000, 0x00000000,
0xffc00001, 0xffc00001, 0x00000000, 0x00000000,
0xffc00001, 0x802468ac, 0x00000000, 0x00000000,
};
const unsigned <API key> = 1444;
#endif // <API key>
|
package org.broadinstitute.hellbender.tools.spark.pathseq;
import com.esotericsoftware.kryo.Kryo;
import com.esotericsoftware.kryo.io.Output;
import htsjdk.samtools.SAMSequenceRecord;
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.<API key>;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.broadinstitute.hellbender.exceptions.UserException;
import org.broadinstitute.hellbender.utils.io.IOUtils;
import scala.Tuple2;
import java.io.*;
import java.util.*;
import java.util.zip.GZIPInputStream;
public final class <API key> {
protected static final Logger logger = LogManager.getLogger(<API key>.class);
private static final String <API key> = "\\s*\\|\\s*";
/**
* Build set of accessions contained in the reference.
* Returns: a map from accession to the name and length of the record. If the sequence name contains the
* taxonomic ID, it instead gets added to taxIdToProperties. Later we merge both results into taxIdToProperties.
* Method: First, look for either "taxid|<taxid>|" or "ref|<accession>|" in the sequence name. If neither of
* those are found, use the first word of the name as the accession.
*/
protected static Map<String, Tuple2<String, Long>> <API key>(final List<SAMSequenceRecord> dictionaryList,
final Map<Integer, <API key>> taxIdToProperties) {
final Map<String, Tuple2<String, Long>> <API key> = new HashMap<>();
for (final SAMSequenceRecord record : dictionaryList) {
final String recordName = record.getSequenceName();
final long recordLength = record.getSequenceLength();
final String[] tokens = recordName.split(<API key>);
String recordAccession = null;
int recordTaxId = PSTree.NULL_NODE;
for (int i = 0; i < tokens.length - 1 && recordTaxId == PSTree.NULL_NODE; i++) {
if (tokens[i].equals("ref")) {
recordAccession = tokens[i + 1];
} else if (tokens[i].equals("taxid")) {
recordTaxId = parseTaxonId(tokens[i + 1]);
}
}
if (recordTaxId == PSTree.NULL_NODE) {
if (recordAccession == null) {
final String[] tokens2 = tokens[0].split(" "); //Default accession to first word in the name
recordAccession = tokens2[0];
}
<API key>.put(recordAccession, new Tuple2<>(recordName, recordLength));
} else {
<API key>(recordTaxId, recordName, recordLength, taxIdToProperties);
}
}
return <API key>;
}
private static int parseTaxonId(final String taxonId) {
try {
return Integer.valueOf(taxonId);
} catch (final <API key> e) {
throw new UserException.BadInput("Expected taxonomy ID to be an integer but found \"" + taxonId + "\"", e);
}
}
/**
* Helper classes for defining RefSeq and GenBank catalog formats. Columns should be given as 0-based indices.
*/
private interface <API key> {
int getTaxIdColumn();
int getAccessionColumn();
}
private static final class RefSeqCatalogFormat implements <API key> {
private static final int TAX_ID_COLUMN = 0;
private static final int ACCESSION_COLUMN = 2;
public int getTaxIdColumn() {
return TAX_ID_COLUMN;
}
public int getAccessionColumn() {
return ACCESSION_COLUMN;
}
}
private static final class <API key> implements <API key> {
private static final int TAX_ID_COLUMN = 6;
private static final int ACCESSION_COLUMN = 1;
public int getTaxIdColumn() {
return TAX_ID_COLUMN;
}
public int getAccessionColumn() {
return ACCESSION_COLUMN;
}
}
/**
* Builds maps of reference contig accessions to their taxonomic ids and vice versa.
* Input can be a RefSeq or Genbank catalog file. accNotFound is an initial list of
* accessions from the reference that have not been successfully looked up; if null,
* will be initialized to the accToRefInfo key set by default.
* <p>
* Returns a collection of reference accessions that could not be found, if any.
*/
protected static Set<String> parseCatalog(final BufferedReader reader,
final Map<String, Tuple2<String, Long>> <API key>,
final Map<Integer, <API key>> taxIdToProperties,
final boolean bGenBank,
final Set<String> <API key>) {
final Set<String> <API key>;
try {
String line;
final <API key> catalogFormat = bGenBank ? new <API key>() : new RefSeqCatalogFormat();
final int taxIdColumnIndex = catalogFormat.getTaxIdColumn();
final int <API key> = catalogFormat.getAccessionColumn();
if (<API key> == null) {
//If <API key> is null, this is the first call to parseCatalog, so initialize the set to all accessions
<API key> = new HashSet<>(<API key>.keySet());
} else {
//Otherwise this is a subsequent call and we continue to look for any remaining accessions
<API key> = new HashSet<>(<API key>);
}
final int minColumns = Math.max(taxIdColumnIndex, <API key>) + 1;
long lineNumber = 1;
while ((line = reader.readLine()) != null && !line.isEmpty()) {
final String[] tokens = line.trim().split("\t", minColumns + 1);
if (tokens.length >= minColumns) {
final int taxId = parseTaxonId(tokens[taxIdColumnIndex]);
final String accession = tokens[<API key>];
if (<API key>.containsKey(accession)) {
final Tuple2<String, Long> nameAndLength = <API key>.get(accession);
<API key>(taxId, nameAndLength._1, nameAndLength._2, taxIdToProperties);
<API key>.remove(accession);
}
} else {
throw new UserException.BadInput("Expected at least " + minColumns + " tab-delimited columns in " +
"GenBank catalog file, but only found " + tokens.length + " on line " + lineNumber);
}
lineNumber++;
}
} catch (final IOException e) {
throw new UserException.<API key>("Error reading from catalog file", e);
}
return <API key>;
}
/**
* Parses scientific name of each taxon and puts it in taxIdToProperties
*/
protected static void parseNamesFile(final BufferedReader reader, final Map<Integer, <API key>> taxIdToProperties) {
try {
String line;
while ((line = reader.readLine()) != null) {
//Split into columns delimited by <TAB>|<TAB>
final String[] tokens = line.split(<API key>);
if (tokens.length < 4) {
throw new UserException.BadInput("Expected at least 4 columns in tax dump names file but found " + tokens.length);
}
final String nameType = tokens[3];
if (nameType.equals("scientific name")) {
final int taxId = parseTaxonId(tokens[0]);
final String name = tokens[1];
if (taxIdToProperties.containsKey(taxId)) {
taxIdToProperties.get(taxId).setName(name);
} else {
taxIdToProperties.put(taxId, new <API key>(name));
}
}
}
} catch (final IOException e) {
throw new UserException.<API key>("Error reading from taxonomy dump names file", e);
}
}
/**
* Gets the rank and parent of each taxon.
* Returns a Collection of tax ID's found in the nodes file that are not in taxIdToProperties (i.e. were not found in
* a reference sequence name using the taxid|\<taxid\> tag or the catalog file).
*/
protected static Collection<Integer> parseNodesFile(final BufferedReader reader, final Map<Integer, <API key>> taxIdToProperties) {
try {
final Collection<Integer> taxIdsNotFound = new ArrayList<>();
String line;
while ((line = reader.readLine()) != null) {
final String[] tokens = line.split(<API key>);
if (tokens.length < 3) {
throw new UserException.BadInput("Expected at least 3 columns in tax dump nodes file but found " + tokens.length);
}
final int taxId = parseTaxonId(tokens[0]);
final int parent = parseTaxonId(tokens[1]);
final String rank = tokens[2];
final <API key> taxonProperties;
if (taxIdToProperties.containsKey(taxId)) {
taxonProperties = taxIdToProperties.get(taxId);
} else {
taxonProperties = new <API key>("tax_" + taxId);
taxIdsNotFound.add(taxId);
}
taxonProperties.setRank(rank);
if (taxId != PSTaxonomyConstants.ROOT_ID) { //keep root's parent set to null
taxonProperties.setParent(parent);
}
taxIdToProperties.put(taxId, taxonProperties);
}
return taxIdsNotFound;
} catch (final IOException e) {
throw new UserException.<API key>("Error reading from taxonomy dump nodes file", e);
}
}
/**
* Helper function for building the map from tax id to reference contig accession
*/
private static void <API key>(final int taxId, final String accession, final long length, final Map<Integer, <API key>> taxIdToProperties) {
taxIdToProperties.putIfAbsent(taxId, new <API key>());
taxIdToProperties.get(taxId).addAccession(accession, length);
}
/**
* Removes nodes not in the tree from the <API key> map
*/
static void removeUnusedTaxIds(final Map<Integer, <API key>> taxIdToProperties,
final PSTree tree) {
taxIdToProperties.keySet().retainAll(tree.getNodeIDs());
}
/**
* Create <API key> map (just an inversion on taxIdToProperties)
*/
protected static Map<String, Integer> <API key>(final Map<Integer, <API key>> taxIdToProperties,
final PSTree tree,
final int <API key>) {
final Map<String, Integer> accessionToTaxId = new HashMap<>();
for (final int taxId : taxIdToProperties.keySet()) {
final boolean isVirus = tree.getPathOf(taxId).contains(PSTaxonomyConstants.VIRUS_ID);
final <API key> taxonProperties = taxIdToProperties.get(taxId);
for (final String name : taxonProperties.getAccessions()) {
if (isVirus || taxonProperties.getAccessionLength(name) >= <API key>) {
accessionToTaxId.put(name, taxId);
}
}
}
return accessionToTaxId;
}
/**
* Returns a PSTree representing a reduced taxonomic tree containing only taxa present in the reference
*/
protected static PSTree buildTaxonomicTree(final Map<Integer, <API key>> taxIdToProperties) {
//Build tree of all taxa
final PSTree tree = new PSTree(PSTaxonomyConstants.ROOT_ID);
final Collection<Integer> invalidIds = new HashSet<>(taxIdToProperties.size());
for (final int taxId : taxIdToProperties.keySet()) {
if (taxId != PSTaxonomyConstants.ROOT_ID) {
final <API key> taxonProperties = taxIdToProperties.get(taxId);
if (taxonProperties.getName() != null && taxonProperties.getParent() != PSTree.NULL_NODE && taxonProperties.getRank() != null) {
tree.addNode(taxId, taxonProperties.getName(), taxonProperties.getParent(), taxonProperties.getTotalLength(), taxonProperties.getRank());
} else {
invalidIds.add(taxId);
}
}
}
PSUtils.logItemizedWarning(logger, invalidIds, "The following taxonomic IDs did not have name/taxonomy information (this may happen when the catalog and taxdump files are inconsistent)");
final Set<Integer> unreachableNodes = tree.<API key>();
if (!unreachableNodes.isEmpty()) {
PSUtils.logItemizedWarning(logger, unreachableNodes, "Removed " + unreachableNodes.size() + " unreachable tree nodes");
}
tree.checkStructure();
//Trim tree down to nodes corresponding only to reference taxa (and their ancestors)
final Set<Integer> relevantNodes = new HashSet<>();
for (final int taxonId : taxIdToProperties.keySet()) {
if (!taxIdToProperties.get(taxonId).getAccessions().isEmpty() && tree.hasNode(taxonId)) {
relevantNodes.addAll(tree.getPathOf(taxonId));
}
}
if (relevantNodes.isEmpty()) {
throw new UserException.BadInput("Did not find any taxa corresponding to reference sequence names.\n\n"
+ "Check that reference names follow one of the required formats:\n\n"
+ "\t...|ref|<accession.version>|...\n"
+ "\t...|taxid|<taxonomy_id>|...\n"
+ "\t<accession.version><mask>...");
}
tree.retainNodes(relevantNodes);
return tree;
}
/**
* Gets a buffered reader for a gzipped file
* @param path File path
* @return Reader for the file
*/
public static BufferedReader getBufferedReaderGz(final String path) {
try {
return new BufferedReader(IOUtils.<API key>(new File(path)));
} catch (final IOException e) {
throw new UserException.BadInput("Could not open file " + path, e);
}
}
/**
* Gets a Reader for a file in a gzipped tarball
* @param tarPath Path to the tarball
* @param fileName File within the tarball
* @return The file's reader
*/
public static BufferedReader <API key>(final String tarPath, final String fileName) {
try {
InputStream result = null;
final <API key> tarStream = new <API key>(new GZIPInputStream(new FileInputStream(tarPath)));
TarArchiveEntry entry = tarStream.getNextTarEntry();
while (entry != null) {
if (entry.getName().equals(fileName)) {
result = tarStream;
break;
}
entry = tarStream.getNextTarEntry();
}
if (result == null) {
throw new UserException.BadInput("Could not find file " + fileName + " in tarball " + tarPath);
}
return new BufferedReader(new InputStreamReader(result));
} catch (final IOException e) {
throw new UserException.BadInput("Could not open compressed tarball file " + fileName + " in " + tarPath, e);
}
}
/**
* Writes objects using Kryo to specified local file path.
* NOTE: using setReferences(false), which must also be set when reading the file. Does not work with nested
* objects that reference its parent.
*/
public static void <API key>(final String filePath, final PSTaxonomyDatabase taxonomyDatabase) {
try {
final Kryo kryo = new Kryo();
kryo.setReferences(false);
Output output = new Output(new FileOutputStream(filePath));
kryo.writeObject(output, taxonomyDatabase);
output.close();
} catch (final <API key> e) {
throw new UserException.<API key>("Could not serialize objects to file", e);
}
}
}
|
#include "chrome/browser/banners/<API key>.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents.h"
namespace banners {
const char <API key>[] =
"renderer has requested the banner prompt be cancelled";
const char kManifestEmpty[] =
"manifest could not be fetched, is empty, or could not be parsed";
const char kNoManifest[] = "site has no manifest <link> URL";
const char <API key>[] =
"could not determine the best icon to use";
const char <API key>[] =
"no matching service worker detected. You may need to reload the page, or "
"check that the service worker for the current page also controls the "
"start URL from the manifest";
const char kNoIconAvailable[] = "no icon available to display";
const char <API key>[] =
"the user navigated before the banner could be shown";
const char kStartURLNotValid[] = "start URL in manifest is not valid";
const char <API key>[] =
"one of manifest name or short name must be specified";
const char <API key>[] =
"manifest does not contain a suitable icon - PNG format of at least "
"144x144px is required, and the sizes attribute must be set";
const char <API key>[] = "page not loaded in the main frame";
const char <API key>[] =
"page not served from a secure origin";
// The leading space is intentional as another string is prepended.
const char <API key>[] =
" application ignored: not supported on Android";
const char kIgnoredNoId[] = "play application ignored: no id provided";
const char <API key>[] =
"play application ignored: app URL and id fields were specified in the "
"manifest, but they do not match";
void <API key>(content::WebContents* web_contents,
const std::string& message,
bool is_debug_mode) {
<API key>(web_contents, "not shown: " + message,
is_debug_mode);
}
void <API key>(content::WebContents* web_contents,
const std::string& message,
bool is_debug_mode) {
if (!is_debug_mode || !web_contents)
return;
web_contents->GetMainFrame()->AddMessageToConsole(
content::<API key>, "App banner " + message);
}
} // namespace banners
|
layout: data_model
title: <API key>
this_version: 1.1.1
<div class="alert alert-danger bs-alert-old-docs">
<strong>Heads up!</strong> These docs are for STIX 1.1.1, which is not the latest version (1.2). <a href="/data-model/1.2/cybox/<API key>">View the latest!</a>
</div>
<div class="row">
<div class="col-md-10">
<h1><API key><span class="subdued">CybOX Core Schema</span></h1>
<p class="<API key>">The <a href='/data-model/1.1.1/cybox/<API key>'><API key></a> identifies which of the Properties of this Object are specifically pertinent to this Action.</p>
</div>
<div id="nav-area" class="col-md-2">
<p>
<form id="nav-version">
<select>
<option value="1.2" >STIX 1.2</option>
<option value="1.1.1" selected="selected">STIX 1.1.1</option>
<option value="1.1" >STIX 1.1</option>
<option value="1.0.1" >STIX 1.0.1</option>
<option value="1.0" >STIX 1.0</option>
</select>
</form>
</p>
</div>
</div>
<hr />
<h2>Fields</h2>
<table class="table table-striped table-hover">
<thead>
<tr>
<th>Field Name</th>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>Property<span class="occurrence">1..n</span></td>
<td>
<a href="/data-model/1.1.1/cybox/<API key>"><API key></a>
</td>
<td>
<p>The Property construct identifies a single Object Property that is specifically pertinent to this Action.</p>
</td>
</tr>
</tbody>
</table>
|
using Microsoft.Extensions.DependencyInjection;
namespace OrchardCore.Liquid
{
public static class <API key>
{
public static IServiceCollection AddLiquidFilter<T>(this IServiceCollection services, string name) where T : class, ILiquidFilter
{
services.Configure<LiquidOptions>(options => options.FilterRegistrations[name] = typeof(T));
services.AddScoped<T>();
return services;
}
}
}
|
package org.chromium.content.browser.input;
import android.os.SystemClock;
import android.text.Editable;
import android.text.InputType;
import android.text.Selection;
import android.text.TextUtils;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.BaseInputConnection;
import android.view.inputmethod.EditorInfo;
import android.view.inputmethod.ExtractedText;
import android.view.inputmethod.<API key>;
import org.chromium.base.Log;
import org.chromium.base.VisibleForTesting;
import org.chromium.blink_public.web.WebInputEventType;
import org.chromium.blink_public.web.WebTextInputFlags;
import org.chromium.ui.base.ime.TextInputType;
public class <API key> extends BaseInputConnection {
private static final String TAG = "cr.InputConnection";
private static final boolean DEBUG = false;
/**
* Selection value should be -1 if not known. See EditorInfo.java for details.
*/
public static final int INVALID_SELECTION = -1;
public static final int INVALID_COMPOSITION = -1;
private final View mInternalView;
private final ImeAdapter mImeAdapter;
private final Editable mEditable;
private boolean mSingleLine;
private int <API key> = 0;
private int mPendingAccent;
private int <API key> = INVALID_SELECTION;
private int <API key> = INVALID_SELECTION;
private int <API key> = INVALID_COMPOSITION;
private int <API key> = INVALID_COMPOSITION;
@VisibleForTesting
<API key>(View view, ImeAdapter imeAdapter, Editable editable,
EditorInfo outAttrs) {
super(view, true);
mInternalView = view;
mImeAdapter = imeAdapter;
mImeAdapter.setInputConnection(this);
mEditable = editable;
// The editable passed in might have been in use by a prior keyboard and could have had
// prior composition spans set. To avoid keyboard conflicts, remove all composing spans
// when taking ownership of an existing Editable.
finishComposingText();
mSingleLine = true;
outAttrs.imeOptions = EditorInfo.<API key>
| EditorInfo.<API key>;
outAttrs.inputType = EditorInfo.TYPE_CLASS_TEXT
| EditorInfo.<API key>;
int inputType = imeAdapter.getTextInputType();
int inputFlags = imeAdapter.getTextInputFlags();
if ((inputFlags & WebTextInputFlags.AutocompleteOff) != 0) {
outAttrs.inputType |= EditorInfo.<API key>;
}
if (inputType == TextInputType.TEXT) {
// Normal text field
outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) {
outAttrs.inputType |= EditorInfo.<API key>;
}
} else if (inputType == TextInputType.TEXT_AREA
|| inputType == TextInputType.CONTENT_EDITABLE) {
outAttrs.inputType |= EditorInfo.<API key>;
if ((inputFlags & WebTextInputFlags.AutocorrectOff) == 0) {
outAttrs.inputType |= EditorInfo.<API key>;
}
outAttrs.imeOptions |= EditorInfo.IME_ACTION_NONE;
mSingleLine = false;
} else if (inputType == TextInputType.PASSWORD) {
// Password
outAttrs.inputType = InputType.TYPE_CLASS_TEXT
| InputType.<API key>;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
} else if (inputType == TextInputType.SEARCH) {
// Search
outAttrs.imeOptions |= EditorInfo.IME_ACTION_SEARCH;
} else if (inputType == TextInputType.URL) {
// Url
outAttrs.inputType = InputType.TYPE_CLASS_TEXT
| InputType.<API key>;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
} else if (inputType == TextInputType.EMAIL) {
// Email
outAttrs.inputType = InputType.TYPE_CLASS_TEXT
| InputType.<API key>;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_GO;
} else if (inputType == TextInputType.TELEPHONE) {
// Telephone
// Number and telephone do not have both a Tab key and an
// action in default OSK, so set the action to NEXT
outAttrs.inputType = InputType.TYPE_CLASS_PHONE;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT;
} else if (inputType == TextInputType.NUMBER) {
// Number
outAttrs.inputType = InputType.TYPE_CLASS_NUMBER
| InputType.<API key>
| InputType.<API key>;
outAttrs.imeOptions |= EditorInfo.IME_ACTION_NEXT;
}
// Handling of autocapitalize. Blink will send the flag taking into account the element's
// type. This is not using AutocapitalizeNone because Android does not autocapitalize by
// default and there is no way to express no capitalization.
// Autocapitalize is meant as a hint to the virtual keyboard.
if ((inputFlags & WebTextInputFlags.<API key>) != 0) {
outAttrs.inputType |= InputType.<API key>;
} else if ((inputFlags & WebTextInputFlags.AutocapitalizeWords) != 0) {
outAttrs.inputType |= InputType.<API key>;
} else if ((inputFlags & WebTextInputFlags.<API key>) != 0) {
outAttrs.inputType |= InputType.<API key>;
}
// Content editable doesn't use autocapitalize so we need to set it manually.
if (inputType == TextInputType.CONTENT_EDITABLE) {
outAttrs.inputType |= InputType.<API key>;
}
outAttrs.initialSelStart = Selection.getSelectionStart(mEditable);
outAttrs.initialSelEnd = Selection.getSelectionEnd(mEditable);
<API key> = outAttrs.initialSelStart;
<API key> = outAttrs.initialSelEnd;
if (DEBUG) Log.w(TAG, "Constructor called with outAttrs: " + outAttrs);
Selection.setSelection(mEditable, outAttrs.initialSelStart, outAttrs.initialSelEnd);
<API key>();
}
/**
* Updates the <API key>'s internal representation of the text being edited and
* its selection and composition properties. The resulting Editable is accessible through the
* getEditable() method. If the text has not changed, this also calls updateSelection on the
* InputMethodManager.
*
* @param text The String contents of the field being edited.
* @param selectionStart The character offset of the selection start, or the caret position if
* there is no selection.
* @param selectionEnd The character offset of the selection end, or the caret position if there
* is no selection.
* @param compositionStart The character offset of the composition start, or -1 if there is no
* composition.
* @param compositionEnd The character offset of the composition end, or -1 if there is no
* selection.
* @param isNonImeChange True when the update was caused by non-IME (e.g. Javascript).
*/
@VisibleForTesting
public void updateState(String text, int selectionStart, int selectionEnd, int compositionStart,
int compositionEnd, boolean isNonImeChange) {
if (DEBUG) {
Log.w(TAG, "updateState [" + text + "] [" + selectionStart + " " + selectionEnd + "] ["
+ compositionStart + " " + compositionEnd + "] [" + isNonImeChange + "]");
}
// If this update is from the IME, no further state modification is necessary because the
// state should have been updated already by the IM framework directly.
if (!isNonImeChange) return;
// Non-breaking spaces can cause the IME to get confused. Replace with normal spaces.
text = text.replace('\u00A0', ' ');
selectionStart = Math.min(selectionStart, text.length());
selectionEnd = Math.min(selectionEnd, text.length());
compositionStart = Math.min(compositionStart, text.length());
compositionEnd = Math.min(compositionEnd, text.length());
String prevText = mEditable.toString();
boolean textUnchanged = prevText.equals(text);
if (!textUnchanged) {
mEditable.replace(0, mEditable.length(), text);
}
Selection.setSelection(mEditable, selectionStart, selectionEnd);
if (compositionStart == compositionEnd) {
<API key>(mEditable);
} else {
super.setComposingRegion(compositionStart, compositionEnd);
}
<API key>();
}
/**
* @return Editable object which contains the state of current focused editable element.
*/
@Override
public Editable getEditable() {
return mEditable;
}
/**
* Sends selection update to the InputMethodManager unless we are currently in a batch edit or
* if the exact same selection and composition update was sent already.
*/
private void <API key>() {
if (<API key> != 0) return;
int selectionStart = Selection.getSelectionStart(mEditable);
int selectionEnd = Selection.getSelectionEnd(mEditable);
int compositionStart = <API key>(mEditable);
int compositionEnd = getComposingSpanEnd(mEditable);
// Avoid sending update if we sent an exact update already previously.
if (<API key> == selectionStart
&& <API key> == selectionEnd
&& <API key> == compositionStart
&& <API key> == compositionEnd) {
return;
}
if (DEBUG) {
Log.w(TAG, "<API key> [" + selectionStart + " " + selectionEnd + "] ["
+ compositionStart + " " + compositionEnd + "]");
}
// updateSelection should be called every time the selection or composition changes
// if it happens not within a batch edit, or at the end of each top level batch edit.
<API key>().updateSelection(
mInternalView, selectionStart, selectionEnd, compositionStart, compositionEnd);
<API key> = selectionStart;
<API key> = selectionEnd;
<API key> = compositionStart;
<API key> = compositionEnd;
}
/**
* @see BaseInputConnection#setComposingText(java.lang.CharSequence, int)
*/
@Override
public boolean setComposingText(CharSequence text, int newCursorPosition) {
if (DEBUG) Log.w(TAG, "setComposingText [" + text + "] [" + newCursorPosition + "]");
if (<API key>(text)) return true;
mPendingAccent = 0;
super.setComposingText(text, newCursorPosition);
<API key>();
return mImeAdapter.<API key>(text, newCursorPosition, false);
}
/**
* @see BaseInputConnection#commitText(java.lang.CharSequence, int)
*/
@Override
public boolean commitText(CharSequence text, int newCursorPosition) {
if (DEBUG) Log.w(TAG, "commitText [" + text + "] [" + newCursorPosition + "]");
if (<API key>(text)) return true;
mPendingAccent = 0;
super.commitText(text, newCursorPosition);
<API key>();
return mImeAdapter.<API key>(text, newCursorPosition,
text.length() > 0);
}
/**
* @see BaseInputConnection#performEditorAction(int)
*/
@Override
public boolean performEditorAction(int actionCode) {
if (DEBUG) Log.w(TAG, "performEditorAction [" + actionCode + "]");
if (actionCode == EditorInfo.IME_ACTION_NEXT) {
restartInput();
// Send TAB key event
long timeStampMs = SystemClock.uptimeMillis();
mImeAdapter.<API key>(
WebInputEventType.RawKeyDown, timeStampMs, KeyEvent.KEYCODE_TAB, 0, 0);
} else {
mImeAdapter.<API key>(KeyEvent.KEYCODE_ENTER,
KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.<API key>
| KeyEvent.FLAG_EDITOR_ACTION);
}
return true;
}
/**
* @see BaseInputConnection#<API key>(int)
*/
@Override
public boolean <API key>(int id) {
if (DEBUG) Log.w(TAG, "<API key> [" + id + "]");
switch (id) {
case android.R.id.selectAll:
return mImeAdapter.selectAll();
case android.R.id.cut:
return mImeAdapter.cut();
case android.R.id.copy:
return mImeAdapter.copy();
case android.R.id.paste:
return mImeAdapter.paste();
default:
return false;
}
}
/**
* @see BaseInputConnection#getExtractedText(android.view.inputmethod.<API key>,
* int)
*/
@Override
public ExtractedText getExtractedText(<API key> request, int flags) {
if (DEBUG) Log.w(TAG, "getExtractedText");
ExtractedText et = new ExtractedText();
et.text = mEditable.toString();
et.partialEndOffset = mEditable.length();
et.selectionStart = Selection.getSelectionStart(mEditable);
et.selectionEnd = Selection.getSelectionEnd(mEditable);
et.flags = mSingleLine ? ExtractedText.FLAG_SINGLE_LINE : 0;
return et;
}
/**
* @see BaseInputConnection#beginBatchEdit()
*/
@Override
public boolean beginBatchEdit() {
if (DEBUG) Log.w(TAG, "beginBatchEdit [" + (<API key> == 0) + "]");
<API key>++;
return true;
}
/**
* @see BaseInputConnection#endBatchEdit()
*/
@Override
public boolean endBatchEdit() {
if (<API key> == 0) return false;
--<API key>;
if (DEBUG) Log.w(TAG, "endBatchEdit [" + (<API key> == 0) + "]");
if (<API key> == 0) <API key>();
return <API key> != 0;
}
/**
* @see BaseInputConnection#<API key>(int, int)
*/
@Override
public boolean <API key>(int beforeLength, int afterLength) {
return <API key>(beforeLength, afterLength, false);
}
/**
* Check if the given {@code index} is between UTF-16 surrogate pair.
* @param str The String.
* @param index The index
* @return True if the index is between UTF-16 surrogate pair, false otherwise.
*/
@VisibleForTesting
static boolean <API key>(CharSequence str, int index) {
return index > 0 && index < str.length() && Character.isHighSurrogate(str.charAt(index - 1))
&& Character.isLowSurrogate(str.charAt(index));
}
private boolean <API key>(
int beforeLength, int afterLength, boolean fromPhysicalKey) {
if (DEBUG) {
Log.w(TAG, "<API key> [" + beforeLength + " " + afterLength + " "
+ fromPhysicalKey + "]");
}
if (mPendingAccent != 0) {
finishComposingText();
}
int <API key> = beforeLength;
int originalAfterLength = afterLength;
int selectionStart = Selection.getSelectionStart(mEditable);
int selectionEnd = Selection.getSelectionEnd(mEditable);
int availableBefore = selectionStart;
int availableAfter = mEditable.length() - selectionEnd;
beforeLength = Math.min(beforeLength, availableBefore);
afterLength = Math.min(afterLength, availableAfter);
// Adjust these values even before calling super.<API key>() to be consistent
// with the super class.
if (<API key>(mEditable, selectionStart - beforeLength)) {
beforeLength += 1;
}
if (<API key>(mEditable, selectionEnd + afterLength)) {
afterLength += 1;
}
super.<API key>(beforeLength, afterLength);
<API key>();
// If this was called due to a physical key, no need to generate a key event here as
// the caller will take care of forwarding the original.
if (fromPhysicalKey) {
return true;
}
// For single-char deletion calls |ImeAdapter.<API key>| with the real key
// code. For multi-character deletion, executes deletion by calling
// |ImeAdapter.<API key>| and sends synthetic key events with a dummy key code.
int keyCode = KeyEvent.KEYCODE_UNKNOWN;
if (<API key> == 1 && originalAfterLength == 0) {
keyCode = KeyEvent.KEYCODE_DEL;
} else if (<API key> == 0 && originalAfterLength == 1) {
keyCode = KeyEvent.KEYCODE_FORWARD_DEL;
}
boolean result = true;
if (keyCode == KeyEvent.KEYCODE_UNKNOWN) {
result = mImeAdapter.<API key>(
WebInputEventType.RawKeyDown, SystemClock.uptimeMillis(), keyCode, 0, 0);
result &= mImeAdapter.<API key>(beforeLength, afterLength);
result &= mImeAdapter.<API key>(
WebInputEventType.KeyUp, SystemClock.uptimeMillis(), keyCode, 0, 0);
} else {
mImeAdapter.<API key>(
keyCode, KeyEvent.FLAG_SOFT_KEYBOARD | KeyEvent.<API key>);
}
return result;
}
/**
* @see BaseInputConnection#sendKeyEvent(android.view.KeyEvent)
*/
@Override
public boolean sendKeyEvent(KeyEvent event) {
if (DEBUG) {
Log.w(TAG, "sendKeyEvent [" + event.getAction() + "] [" + event.getKeyCode() + "] ["
+ event.getUnicodeChar() + "]");
}
int action = event.getAction();
int keycode = event.getKeyCode();
int unicodeChar = event.getUnicodeChar();
// If this isn't a KeyDown event, no need to update composition state; just pass the key
// event through and return. But note that some keys, such as enter, may actually be
// handled on ACTION_UP in Blink.
if (action != KeyEvent.ACTION_DOWN) {
mImeAdapter.<API key>(event);
return true;
}
// If this is backspace/del or if the key has a character representation,
// need to update the underlying Editable (i.e. the local representation of the text
// being edited). Some IMEs like Jellybean stock IME and Samsung IME mix in delete
// KeyPress events instead of calling <API key>.
if (keycode == KeyEvent.KEYCODE_DEL) {
<API key>(1, 0, true);
} else if (keycode == KeyEvent.KEYCODE_FORWARD_DEL) {
<API key>(0, 1, true);
} else if (keycode == KeyEvent.KEYCODE_ENTER) {
// Finish text composition when pressing enter, as that may submit a form field.
// TODO(aurimas): remove this workaround when crbug.com/278584 is fixed.
finishComposingText();
} else if ((unicodeChar & KeyCharacterMap.COMBINING_ACCENT) != 0) {
// Store a pending accent character and make it the current composition.
int pendingAccent = unicodeChar & KeyCharacterMap.<API key>;
StringBuilder builder = new StringBuilder();
builder.appendCodePoint(pendingAccent);
setComposingText(builder.toString(), 1);
mPendingAccent = pendingAccent;
return true;
} else if (mPendingAccent != 0 && unicodeChar != 0) {
int combined = KeyEvent.getDeadChar(mPendingAccent, unicodeChar);
if (combined != 0) {
StringBuilder builder = new StringBuilder();
builder.appendCodePoint(combined);
commitText(builder.toString(), 1);
return true;
}
// Noncombinable character; commit the accent character and fall through to sending
// the key event for the character afterwards.
finishComposingText();
}
<API key>(unicodeChar);
mImeAdapter.<API key>(event);
return true;
}
/**
* Update the mEditable state to reflect what Blink will do in response to the KeyDown
* for a unicode-mapped key event.
* @param unicodeChar The Unicode character to update selection with.
*/
private void <API key>(int unicodeChar) {
if (unicodeChar == 0) return;
int selectionStart = Selection.getSelectionStart(mEditable);
int selectionEnd = Selection.getSelectionEnd(mEditable);
if (selectionStart > selectionEnd) {
int temp = selectionStart;
selectionStart = selectionEnd;
selectionEnd = temp;
}
mEditable.replace(selectionStart, selectionEnd, Character.toString((char) unicodeChar));
<API key>();
}
/**
* @see BaseInputConnection#finishComposingText()
*/
@Override
public boolean finishComposingText() {
if (DEBUG) Log.w(TAG, "finishComposingText");
mPendingAccent = 0;
if (<API key>(mEditable) == getComposingSpanEnd(mEditable)) {
return true;
}
super.finishComposingText();
<API key>();
mImeAdapter.finishComposingText();
return true;
}
/**
* @see BaseInputConnection#setSelection(int, int)
*/
@Override
public boolean setSelection(int start, int end) {
if (DEBUG) Log.w(TAG, "setSelection [" + start + " " + end + "]");
int textLength = mEditable.length();
if (start < 0 || end < 0 || start > textLength || end > textLength) return true;
super.setSelection(start, end);
<API key>();
return mImeAdapter.<API key>(start, end);
}
/**
* Informs the InputMethodManager and InputMethodSession (i.e. the IME) that the text
* state is no longer what the IME has and that it needs to be updated.
*/
void restartInput() {
if (DEBUG) Log.w(TAG, "restartInput");
<API key>().restartInput(mInternalView);
<API key> = 0;
mPendingAccent = 0;
}
/**
* @see BaseInputConnection#setComposingRegion(int, int)
*/
@Override
public boolean setComposingRegion(int start, int end) {
if (DEBUG) Log.w(TAG, "setComposingRegion [" + start + " " + end + "]");
int textLength = mEditable.length();
int a = Math.min(start, end);
int b = Math.max(start, end);
if (a < 0) a = 0;
if (b < 0) b = 0;
if (a > textLength) a = textLength;
if (b > textLength) b = textLength;
if (a == b) {
<API key>(mEditable);
} else {
super.setComposingRegion(a, b);
}
<API key>();
CharSequence regionText = null;
if (b > a) {
regionText = mEditable.subSequence(a, b);
}
return mImeAdapter.setComposingRegion(regionText, a, b);
}
boolean isActive() {
return <API key>().isActive(mInternalView);
}
private <API key> <API key>() {
return mImeAdapter.<API key>();
}
/**
* This method works around the issue crbug.com/373934 where Blink does not cancel
* the composition when we send a commit with the empty text.
*
* TODO(aurimas) Remove this once crbug.com/373934 is fixed.
*
* @param text Text that software keyboard requested to commit.
* @return Whether the workaround was performed.
*/
private boolean <API key>(CharSequence text) {
int selectionStart = Selection.getSelectionStart(mEditable);
int selectionEnd = Selection.getSelectionEnd(mEditable);
int compositionStart = <API key>(mEditable);
int compositionEnd = getComposingSpanEnd(mEditable);
if (TextUtils.isEmpty(text) && (selectionStart == selectionEnd)
&& compositionStart != INVALID_COMPOSITION
&& compositionEnd != INVALID_COMPOSITION) {
beginBatchEdit();
finishComposingText();
int selection = Selection.getSelectionStart(mEditable);
<API key>(selection - compositionStart, selection - compositionEnd);
endBatchEdit();
return true;
}
return false;
}
@VisibleForTesting
static class ImeState {
public final String text;
public final int selectionStart;
public final int selectionEnd;
public final int compositionStart;
public final int compositionEnd;
public ImeState(String text, int selectionStart, int selectionEnd,
int compositionStart, int compositionEnd) {
this.text = text;
this.selectionStart = selectionStart;
this.selectionEnd = selectionEnd;
this.compositionStart = compositionStart;
this.compositionEnd = compositionEnd;
}
}
@VisibleForTesting
ImeState <API key>() {
String text = mEditable.toString();
int selectionStart = Selection.getSelectionStart(mEditable);
int selectionEnd = Selection.getSelectionEnd(mEditable);
int compositionStart = <API key>(mEditable);
int compositionEnd = getComposingSpanEnd(mEditable);
return new ImeState(text, selectionStart, selectionEnd, compositionStart, compositionEnd);
}
}
|
#ifndef DUEL6_VERTEX_H
#define DUEL6_VERTEX_H
#include "Type.h"
namespace Duel6 {
class Vertex {
public:
enum Flag {
None = 0,
Flow = 1
};
public:
Float32 x;
Float32 y;
Float32 z;
Float32 u;
Float32 v;
private:
Uint32 flag;
public:
Vertex(Size order, Float32 x, Float32 y, Float32 z, Uint32 flag = None) {
this->x = x;
this->y = y;
this->z = z;
u = (order == 0 || order == 3) ? 0.0f : 0.99f;
v = (order == 0 || order == 1) ? 0.0f : 0.99f;
this->flag = flag;
}
Vertex(Size order, Int32 x, Int32 y, Int32 z, Uint32 flag = Flag::None)
: Vertex(order, Float32(x), Float32(y), Float32(z), flag) {}
Uint32 getFlag() const {
return flag;
}
};
}
#endif
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.