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
/* @flow */ import { Case } from '../Case'; export class PostTitle extends Case { static text = 'Post title'; static parseCriterion(input: *) { return { patt: input }; } static defaultConditions = { patt: '' }; static fields = ['post\'s title contains ', { type: 'text', id: 'patt' }]; static reconcilable = true; static pattern = 'RegEx'; trueText = `title contains ${this.conditions.patt}`; value = Case.buildRegex(this.conditions.patt, { fullMatch: false }); evaluate(thing: *, values: * = [this.value]) { const title = thing.getTitle(); return values.some(v => v.test(title)); } }
andytuba/Reddit-Enhancement-Suite
lib/modules/filteReddit/postCases/PostTitle.js
JavaScript
gpl-3.0
607
#!/bin/sh BUILD=1 PREFIX="/data/data/org.radare.installer/radare2" if [ -z "${NDK}" ]; then echo "use ./android-{arm|mips|x86}.sh" exit 1 fi cd `dirname $PWD/$0` ; cd .. case "$1" in "mips") NDK_ARCH=mips STATIC_BUILD=0 STRIP=mips-linux-android-strip ;; "arm") NDK_ARCH=arm STATIC_BUILD=0 STRIP=arm-eabi-strip ;; "x86") NDK_ARCH=x86 STATIC_BUILD=0 STRIP=strip ;; arm-static|static-arm) NDK_ARCH=arm STATIC_BUILD=1 ;; x86-static|static-x86) NDK_ARCH=x86 STATIC_BUILD=1 ;; mips-static|static-mips) NDK_ARCH=mips # XXX: by default we should build all libs as .a but link binary dinamically STATIC_BUILD=1 STRIP=mips-linux-android-strip ;; ""|"-h") echo "Usage: android-build.sh [arm|x86|mips][-static]" exit 1 ;; *) echo "Unknown argument" exit 1 ;; esac [ -z "${NDK_ARCH}" ] && NDK_ARCH=arm [ -z "${STATIC_BUILD}" ] && STATIC_BUILD=0 # ow yeah STATIC_BUILD=1 export NDK_ARCH export STATIC_BUILD PKG=`./configure --version|head -n1 |cut -d ' ' -f 1` D=${PKG}-android-${NDK_ARCH} echo NDK_ARCH: ${NDK_ARCH} echo "Using NDK_ARCH: ${NDK_ARCH}" echo "Using STATIC_BUILD: ${STATIC_BUILD}" if [ "${BUILD}" = 1 ]; then # start build sleep 2 make mrproper if [ $STATIC_BUILD = 1 ]; then CFGFLAGS="--without-pic --with-nonpic" fi # dup echo ./configure --with-compiler=android \ --with-ostype=android --without-ewf \ --prefix=${PREFIX} ${CFGFLAGS} ./configure --with-compiler=android --with-ostype=android \ --without-ewf --prefix=${PREFIX} ${CFGFLAGS} || exit 1 make -s -j 4 || exit 1 fi rm -rf $D mkdir -p $D INSTALL_PROGRAM=`grep INSTALL_DATA config-user.mk|cut -d = -f 2` make install INSTALL_PROGRAM="${INSTALL_PROGRAM}" DESTDIR=$PWD/$D || exit 1 make purge-dev DESTDIR=${PWD}/${D} STRIP="${STRIP}" make purge-doc DESTDIR=${PWD}/${D} STRIP="${STRIP}" rm -rf ${PWD}/${D}/share rm -rf ${PWD}/${D}/include rm -rf ${PWD}/${D}/lib/pkgconfig rm -rf ${PWD}/${D}/lib/libsdb.a echo rm -rf ${PWD}/${D}/${PREFIX}/bin/* rm -rf "${PWD}/${D}/${PREFIX}/bin/"* #end build # use busybox style symlinkz HERE=${PWD} cd binr/blob make STATIC_BUILD=1 || exit 1 make install PREFIX="${PREFIX}" DESTDIR="${HERE}/${D}" || exit 1 cd ../.. chmod +x "${HERE}/${D}/${PREFIX}/bin/"* # TODO: remove unused files like include files and so on rm -f ${HERE}/${D}/${PREFIX}/lib/radare2/*/*.so rm -f ${HERE}/${D}/${PREFIX}/lib/*.a rm -rf ${HERE}/${D}/${PREFIX}/include rm -rf ${HERE}/${D}/${PREFIX}/doc eval `grep ^VERSION= ${HERE}/config-user.mk` WWWROOT="/data/data/org.radare.installer/radare2/lib/radare2/${VERSION}/www" #ln -fs ${WWWROOT} ${HERE}/${D}/data/data/org.radare.installer/www cp -rf ${WWWROOT} ${HERE}/${D}/data/data/org.radare.installer/www cd ${D} tar --help| grep -q GNU if [ $? = 0 ]; then echo tar -czv -H oldgnu -f ../$D.tar.gz data tar -czv -H oldgnu -f ../$D.tar.gz data else echo tar -czovf ../$D.tar.gz data tar -czovf ../$D.tar.gz data fi cd .. D2=`git log HEAD 2>/dev/null|head -n1|awk '{print $2}'|cut -c 1-8` if [ -n "$D2" ]; then ln -fs $D.tar.gz "${D}-${D2}".tar.gz fi echo `pwd`"/${D}.tar.gz" echo `pwd`"/${D}-${D2}.tar.gz"
jpenalbae/radare2
sys/android-build.sh
Shell
gpl-3.0
3,072
/* * This file is part of EasyRPG Player. * * EasyRPG Player 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. * * EasyRPG Player 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 EasyRPG Player. If not, see <http://www.gnu.org/licenses/>. */ #include "system.h" #ifdef HAVE_MPG123 // Headers #include <cassert> #include "decoder_mpg123.h" #include "output.h" static ssize_t custom_read(void* io, void* buffer, size_t nbyte) { FILE* f = reinterpret_cast<FILE*>(io); return fread(buffer, 1, nbyte, f); } static off_t custom_seek(void* io, off_t offset, int seek_type) { FILE* f = reinterpret_cast<FILE*>(io); fseek(f, offset, seek_type); return ftell(f); } static void custom_close(void* io) { FILE* f = reinterpret_cast<FILE*>(io); fclose(f); } static void noop_close(void*) {} Mpg123Decoder::Mpg123Decoder() : handle(nullptr, mpg123_delete) { music_type = "mp3"; err = mpg123_init(); if (err != MPG123_OK) { error_message = "mpg123: " + std::string(mpg123_plain_strerror(err)); return; } handle.reset(mpg123_new(nullptr, &err)); mpg123_replace_reader_handle(handle.get(), custom_read, custom_seek, custom_close); if (!handle) { error_message = "mpg123: " + std::string(mpg123_plain_strerror(err)); return; } init = true; } Mpg123Decoder::~Mpg123Decoder() { } bool Mpg123Decoder::Open(FILE* file) { if (!init) { return false; } finished = false; err = mpg123_open_handle(handle.get(), file); if (err != MPG123_OK) { error_message = "mpg123: " + std::string(mpg123_plain_strerror(err)); return false; } return true; } bool Mpg123Decoder::Seek(size_t offset, Origin origin) { finished = false; mpg123_seek_frame(handle.get(), offset, (int)origin); return true; } bool Mpg123Decoder::IsFinished() const { return finished; } static int format_to_mpg123_format(AudioDecoder::Format format) { switch (format) { case AudioDecoder::Format::U8: return MPG123_ENC_UNSIGNED_8; case AudioDecoder::Format::S8: return MPG123_ENC_SIGNED_8; case AudioDecoder::Format::U16: return MPG123_ENC_UNSIGNED_16; case AudioDecoder::Format::S16: return MPG123_ENC_SIGNED_16; case AudioDecoder::Format::U32: return MPG123_ENC_UNSIGNED_32; case AudioDecoder::Format::S32: return MPG123_ENC_SIGNED_32; case AudioDecoder::Format::F32: return MPG123_ENC_FLOAT_32; default: assert(false); } return -1; } static AudioDecoder::Format mpg123_format_to_format(int format) { switch (format) { case MPG123_ENC_UNSIGNED_8: return AudioDecoder::Format::U8; case MPG123_ENC_SIGNED_8: return AudioDecoder::Format::S8; case MPG123_ENC_UNSIGNED_16: return AudioDecoder::Format::U16; case MPG123_ENC_SIGNED_16: return AudioDecoder::Format::S16; case MPG123_ENC_UNSIGNED_32: return AudioDecoder::Format::U32; case MPG123_ENC_SIGNED_32: return AudioDecoder::Format::S32; case MPG123_ENC_FLOAT_32: return AudioDecoder::Format::F32; default: assert(false); } return (AudioDecoder::Format)-1; } void Mpg123Decoder::GetFormat(int& frequency, AudioDecoder::Format& format, int& channels) const { long freq; int ch; int fmt; mpg123_getformat(handle.get(), &freq, &ch, &fmt); frequency = (int)freq; channels = ch; format = mpg123_format_to_format(fmt); } bool Mpg123Decoder::SetFormat(int freq, AudioDecoder::Format fmt, int channels) { // mpg123 has a built-in pseudo-resampler, not needing SDL_ConvertAudio later // Remove all available conversion formats // Add just one format to force mpg123 pseudo-resampler work mpg123_format_none(handle.get()); err = mpg123_format(handle.get(), (long)freq, (int)channels, (int)format_to_mpg123_format(fmt)); if (err != MPG123_OK) { err = mpg123_format(handle.get(), (long)44100, (int)channels, (int)format_to_mpg123_format(fmt)); if (err != MPG123_OK) { mpg123_format(handle.get(), (long)44100, (int)2, (int)MPG123_ENC_SIGNED_16); } return false; } return err == MPG123_OK; } bool Mpg123Decoder::IsMp3(FILE* stream) { Mpg123Decoder decoder; // Prevent stream handle destruction mpg123_replace_reader_handle(decoder.handle.get(), custom_read, custom_seek, noop_close); // Prevent skipping of too many garbage, breaks heuristic mpg123_param(decoder.handle.get(), MPG123_RESYNC_LIMIT, 64, 0.0); if (!decoder.Open(stream)) { return false; } unsigned char buffer[1024]; int err = 0; size_t done = 0; int err_count = 0; // Read beginning of assumed MP3 file and count errors as an heuristic to detect MP3 for (int i = 0; i < 10; ++i) { err = mpg123_read(decoder.handle.get(), buffer, 1024, &done); if (err != MPG123_OK) { err_count += 1; } if (err_count >= 3) { break; } } return err_count < 3; } int Mpg123Decoder::FillBuffer(uint8_t* buffer, int length) { int err; size_t done = 0; size_t decoded = 0; // Skip invalid frames until getting a valid one do { err = mpg123_read(handle.get(), reinterpret_cast<unsigned char*>(buffer), length, &done); decoded += done; } while (done && err != MPG123_OK); if (err == MPG123_DONE) { finished = true; } return (int)decoded; } #endif
FaithFeather/Player
src/decoder_mpg123.cpp
C++
gpl-3.0
5,558
--- layout: post title: Simple Framework Websocket server date: 2017-02-18 categories: websocket tags: websocket server gradle --- Following the [previous post about a HTTP server][sf-http] based on the [Simple Framework library][simpleframework], here's the Websocket use case. The example gets a bit more complicated with both a HTTP handler, Websocket handler and client, but still a lot simpler than the [original example code][chat-demo]. Two interfaces have to be implemented to have a meaningful Websocket server: First, the [*Service*][Service] interface, which gets invoked when a new connection and [*Session*][Session] is established. From here it is possible to register a [*FrameListener*][FrameListener] on the session channel, which is the second interface to implement. The FrameListener methods will get invoked when new Frames, whether it is data or control codes is received. This listener also gets notified about errors and when the session or socket is closed. Two minimal examples of these implementations are shown below, followed by the *setup()* method which ties it all together and starts the server. Notice how [*RouterContainer*][RouterContainer] takes both the HTTP and Websocket handlers, and routes the incoming requests appropriately. {% highlight java %} {% include includemethod filename='src/com/rememberjava/http/SfWebsocketServerTest.java' method='class WebsocketService' before=0 after=0 %} {% include includemethod filename='src/com/rememberjava/http/SfWebsocketServerTest.java' method='class WebsocketFrameListener' before=0 after=0 %} {% include includemethod filename='src/com/rememberjava/http/SfWebsocketServerTest.java' method='setup()' before=0 after=0 %} {% endhighlight %} To test the core functionality of the Websocket server, a bit more is needed on the client side. First, a HTTP like handshake has to be requested and the response read, then the client must respond to ping control frames, and finally, it can send frames of data itself. Below is the method which sends the handshake to the server as specified in the [Websocket RFC 6455][rfc6455]. There's a few things to note: Currently, details like target path, the host, origin are hard-coded. In a normal client, they should be resolved and set in a proper way. The security key is also hard-coded, but should be generated according to the specification. Finally, note that the line ending has to be "\r\n" or 0xd, 0xa in hex. Therefore, when using a PrintWriter to wrap the raw OutputStream, be careful not to use the *println()* methods as they might append the incorrect line termination. What's useful about a minimal test client like this, is that's it becomes easy to try out these kind of details in isolation, without distractions from other functionality. Although this example does not go as far as asserting the behaviour, it could easily be extended to an in-memory integration test of the server. {% highlight java %} {% include includemethod filename='src/com/rememberjava/http/SfWebsocketServerTest.java' method='void sendHandshake' before=0 after=0 %} {% include includemethod filename='src/com/rememberjava/http/SfWebsocketServerTest.java' method='void receiveHandshake' before=0 after=0 %} {% endhighlight %} Finally, this test method ties the client together: it first opens the socket connection to the server; gets the IO streams; sends and receives the handshake; starts the ping response handler on a separate thread; sends one frame of its own with a ping, waits for some seconds to observe the server in operation, and finally sends a close operation code before closing the connection. {% highlight java %} {% include includemethod filename='src/com/rememberjava/http/SfWebsocketServerTest.java' method='void testWebsocketRequest' before=0 after=0 %} {% endhighlight %} Here's the full test case listing, which also includes a HTTP request test. A dependency on the Simple Framework library is needed, for example through the Gradle dependency: {% highlight shell %} repositories { mavenCentral() } dependencies { compile 'org.simpleframework:simple-http:6.0.1' } {% endhighlight %} {% include javafile filename='src/com/rememberjava/http/SfWebsocketServerTest.java' %} [sf-http]: /http/2017/02/12/sf_http_server.html [simpleframework]: http://www.simpleframework.org/ [chat-demo]: https://github.com/ngallagher/simpleframework/tree/master/simple-demo/simple-demo-chat [Service]: https://github.com/ngallagher/simpleframework/blob/master/simple/simple-http/src/main/java/org/simpleframework/http/socket/service/Service.java [Session]: https://github.com/ngallagher/simpleframework/blob/master/simple/simple-http/src/main/java/org/simpleframework/http/socket/Session.java [FrameListener]: https://github.com/ngallagher/simpleframework/blob/master/simple/simple-http/src/main/java/org/simpleframework/http/socket/FrameListener.java [RouterContainer]: https://github.com/ngallagher/simpleframework/blob/master/simple/simple-http/src/main/java/org/simpleframework/http/socket/service/RouterContainer.java [rfc6455]: https://tools.ietf.org/html/rfc6455
hblok/rememberjava
_posts/2017-02-18-sf_websocket_server.md
Markdown
gpl-3.0
5,110
$LOAD_PATH << "./lib" require 'pk2_commands' #require 'usbcomm' #require 'common' require 'pic14_f1' include PICkit2::Commands pk = PICkit2::Programmer.new pk.claim #puts pk.readStatus.inspect pk.enterPVMode("HVP") puts pk.readChipID.inspect #puts pk.readProgramMemory.map {|x| "%04X" % x}.inspect pk.exitPVMode pk.enterPVMode("HVP") #pk.bulkEraseProgramMemory puts pk.readConfigMemory.map {|x| "%04X" % x}.inspect pk.exitPVMode #pk.readHexFile("../hexek/proba.X.production.hex") pk.enterPVMode("HVP") pk.writeUID pk.exitPVMode pk.enterPVMode("HVP") #pk.bulkEraseProgramMemory puts pk.readConfigMemory.map {|x| "%04X" % x}.inspect pk.exitPVMode #pk.enterPVMode("HVP") #puts pk.readProgramMemory.map {|x| "%04X" % x}.inspect #pk.exitPVMode pk.close
mrtee/pickit2-f1xxx
thecode/lib_v2/proba13_writeuid.rb
Ruby
gpl-3.0
762
<?php /* IrizimaGe - PHP Image/Media Gallery made easy Copyright (C) 2013 Alexandre Devilliers This file is part of IrizimaGe. IrizimaGe 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. Foobar 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 IrizimaGe. If not, see <http://www.gnu.org/licenses/>. */ // Location of the albums $irizConfig['albums_path'] = '/home/cinthiale/photos'; // Cache location for image files (and preview of video files) $irizConfig['cache_path'] = '/home/cinthiale/cache'; // Items per page $irizConfig['items_per_line'] = 4; $irizConfig['lines_per_page'] = 4; // Image sizes that will be cached $irizConfig['cache_sizes'] = array('50x50','160x160'); ?>
elbereth/IrizimaGe
config.inc.php
PHP
gpl-3.0
1,193
\documentclass[slidestop,compress,mathserif,serif,notes=show]{beamer} % Not to print overlays % \documentclass[handout,slidestop,compress,mathserif,serif]{beamer} % To use PSTricks % \documentclass[slidestop,compress,mathserif,serif,xcolor=pst,dvips]{beamer} \usepackage[utf8]{inputenc} \usepackage{rfiw} %\usepackage{ca} \usepackage{algpseudocode} \def\R{{\mathbb R}} \def\C{{\mathbb C}} \def\bS{{\mathbb S}} \newcommand{\docTitle}{Track Clustering for Artist Disambiguation} \newcommand{\subjectName}{Hack U} \newcommand{\authors}{} % PDF file properties \title{\docTitle} \hypersetup{ pdfauthor={\authors}, pdfsubject={\subjectName}, pdfkeywords={rfiw, atelier, extraction, bibliographic, references} } \begin{document} % Hi, I'm Ramon and I'm going to present you a system that we implemented % last year for generating bibliographic references \input{title.tex} %%%% MOTIVATION %%%% \section{Motivation and Goals} \begin{frame} \frametitle{\secname} \vspace*{0.5cm} \begin{itemize} \item{} Artist-driven recommendations \item{} Multiple artists with the same name \item{} One single artist page/id \item{} Assume that they play different music styles %\item{} %Tracks are tagged accordingly \end{itemize} \bigskip So, how can we distinguish between bands?\\ \pause \medskip \begin{center} \large{Cluster tracks by tag} \end{center} \end{frame} \begin{frame} \frametitle{Example} \vspace*{0.5cm} \begin{figure} \centering \includegraphics[width=0.7\textwidth]{figs/soko.pdf} \label{fig:soko} \end{figure} \begin{itemize} \item{} Some songs: \texttt{french, female vocalist, cute, indie...} \item{} Some other songs: \texttt{instrumental, ambient, jazz...} \end{itemize} \end{frame} \begin{frame} \frametitle{Overview} \vspace{0.5cm} \begin{figure} \centering \includegraphics[width=0.9\textwidth]{figs/diagram.pdf} \label{fig:diagram} \end{figure} \end{frame} %%%% CONCLUSIONS %%%% \section{Thoughts and Conclusions} \begin{frame} \frametitle{\secname{}} \vspace{1cm} \begin{itemize} \item{} Clustering algorithm must be replaced\\ \textcolor{gray}{Currently using hierarchical clustering with a threshold on the max. number of clusters and using complete linkage\\ Other algorithms using frequent tag sets might be more appropiate} \item{} Chrome extension just for the sake of this demo\\ \textcolor{gray}{This procedure just makes sense if we try to distinguish between artists now that the \textit{damage} is done} \end{itemize} \end{frame} \end{document}
rxuriguera/banddisam
doc/slides.tex
TeX
gpl-3.0
2,804
/* eMafiaServer - GameObject.java GNU GENERAL PUBLIC LICENSE V3 Copyright (C) 2012 Matthew 'Apocist' Davis */ package com.inverseinnovations.eMafiaServer.includes.classes.GameObjects; public class GameObject { /** * Object Types: examples are DEFINED * @example * GO_TYPE_ROOM => Room * <br>GO_TYPE_CHAR => Player * <br>GO_TYPE_NPC => Mobile NPC * <br>TYPE_USERGROUP => Usergroup */ protected int type; protected int id; // Entity ID // protected String name; public GameObject(){ } public GameObject(int id, String name, int type){ this.id = id; this.name = name; this.type = type; } /** Returns EID */ public int getEID(){ return this.id; } /** Change/Set the EID */ public void setEID(int id){ this.id = id; } /** Returns type */ public int getType(){ return this.type; } /** Sets type */ public void setType(int type){ this.type = type; } /** Returns name of object */ public String getName(){ return this.name; } /** Sets name of object * @param String new_name*/ public void setName(String newn){ this.name = newn; } }
apocist/eMafiaServer
src/com/inverseinnovations/eMafiaServer/includes/classes/GameObjects/GameObject.java
Java
gpl-3.0
1,091
package View; import javax.sound.sampled.AudioFormat; import javax.swing.*; import Control.SilenceInfo; import java.awt.*; import java.io.FileNotFoundException; import java.io.PrintWriter; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Random; public class SingleWaveformPanel extends JPanel { /** * */ private static final long serialVersionUID = 1L; protected static final Color BACKGROUND_COLOR = Color.gray; protected static final Color REFERENCE_LINE_COLOR = Color.blue; protected static final Color WAVEFORM_COLOR = Color.blue; public ArrayList<DrawnSample> drawnSamples = new ArrayList<DrawnSample>(); private Audio_Info helper; private int channelIndex; private int[] samples; public SingleWaveformPanel(Audio_Info helper, int channelIndex) { this.helper = helper; this.channelIndex = channelIndex; setBackground(BACKGROUND_COLOR); } public int[] GetSamples(){ return this.samples; } @Override protected void paintComponent(Graphics g) { super.paintComponent(g); drawnSamples.clear(); int lineHeight = getHeight() / 2; g.setColor(REFERENCE_LINE_COLOR); g.drawLine(0, lineHeight, (int)getWidth(), lineHeight); drawWaveform(g, helper.getAudio(channelIndex)); } public void drawTheBeach(SilenceInfo silenceInfo){ /*int proportionalS =(int) (silenceInfo.GetStartIndex()*helper.getXScaleFactor(getWidth())/samples.length); int proportionalE =(int) (silenceInfo.GetEndIndex()*helper.getXScaleFactor(getWidth())/samples.length); DrawnSample drawnS = drawnSamples.get((int) (silenceInfo.GetStartIndex()/helper.getXScaleFactor(getWidth()))); DrawnSample drawnE = drawnSamples.get((int) (silenceInfo.GetEndIndex()/helper.getXScaleFactor(getWidth()))); this.getGraphics().drawRect(silenceInfo.GetStartIndex(), getHeight()/2, 30, 30); this.getGraphics().drawRect(silenceInfo.GetEndIndex(), getHeight()/2, 30, 30);*/ } protected void drawWaveform(Graphics g, int[] samples) { if (samples == null) { return; }else this.samples = samples; int oldX = 0; int oldY = (int) (getHeight() / 2); int xIndex = 0; int increment = helper.getIncrement(helper.getXScaleFactor(getWidth())); g.setColor(WAVEFORM_COLOR); int t = 0; for (t = 0; t < increment; t += increment) { g.drawLine(oldX, oldY, xIndex, oldY); drawnSamples.add(new DrawnSample(oldX,oldY,xIndex,oldY)); xIndex++; oldX = xIndex; } for (; t < samples.length; t += increment) { double scaleFactor = helper.getYScaleFactor(getHeight()); double scaledSample = samples[t] * scaleFactor; int y = (int) ((getHeight() / 2) - (scaledSample)); g.drawLine(oldX, oldY, xIndex, y); drawnSamples.add(new DrawnSample(oldX,oldY,xIndex,y)); xIndex++; oldX = xIndex; oldY = y; } } /*standard range of audible frequencies is 20 to 20,000 Hz*/ public ArrayList<SilenceInfo> CheckSilence(AudioFormat format, double Secs, double db) throws Exception{ ArrayList<SilenceInfo> silenceInfo = new ArrayList<SilenceInfo>(); //22050 bytes equivalem a 0.500 segundos double thresholdInSecs = Secs; double maxDb = db; double byteRate = thresholdInSecs * format.getSampleRate(); SilenceInfo silence = new SilenceInfo(-1); int counter = 0; try{ if(samples != null){ for(int i = 0; i < samples.length; i++){ if(counter < byteRate){ if(Math.abs(samples[i]) >= 0 && Math.abs(samples[i]) <= maxDb){ counter = counter + 1; }else{ if(silence.GetStart() != -1){ silence.SetEnd(i); silence.CalculateDuration(format.getSampleRate()); silenceInfo.add(silence); silence = new SilenceInfo(-1); } counter = 0; } }else{ if(silence.GetStart() == -1) silence.SetStart(i-counter); silence.SetEnd(i); counter = 0; } } } } catch (Exception e){ e.printStackTrace(); } return silenceInfo; } }
alosaulo/SoundExtractor
src/View/SingleWaveformPanel.java
Java
gpl-3.0
4,335
import { ProjectOperationCredentials } from "../ProjectOperationCredentials"; import { RepoFilter } from "../repoFilter"; import { RemoteRepoRef, RepoRef, } from "../RepoId"; import { Credentialed } from "./Credentialed"; import { RemoteLocator } from "./RemoteLocator"; import { GitHubNameRegExp } from "./validationPatterns"; /** * Base parameters for working with repo(s). * Allows use of regex. */ export abstract class TargetsParams implements Credentialed, RemoteLocator { public abstract owner: string; /** * Repo name. May be a repo name or a string containing a regular expression. */ public abstract repo: string; public abstract sha: string; public abstract branch: string; public abstract credentials: ProjectOperationCredentials; get usesRegex(): boolean { return !!this.repo && (!GitHubNameRegExp.pattern.test(this.repo) || !this.owner); } public abstract repoRef: RemoteRepoRef; /** * If we're not tied to a single repo ref, test this RepoRef * @param {RepoRef} rr * @return {boolean} */ public test: RepoFilter = rr => { if (this.repoRef) { const my = this.repoRef; return my.owner === rr.owner && my.repo === rr.repo; } if (this.usesRegex) { if (this.owner && this.owner !== rr.owner) { return false; } return new RegExp(this.repo).test(rr.repo); } return false; } }
atomist/automation-client-ts
lib/operations/common/params/TargetsParams.ts
TypeScript
gpl-3.0
1,507
// ****************************************************************************** // Filename: Interpolator.h // Project: Vogue // Author: Steven Ball // // Purpose: // An interpolator helper class that will manage all the interpolations for // your variables. // // Revision History: // Initial Revision - 23/02/12 // // Copyright (c) 2005-20016, Steven Ball // ****************************************************************************** #pragma once #include <vector> #include <stddef.h> typedef void(*FunctionCallback)(void *lpData); class FloatInterpolation { public: float *m_variable; float m_start; float m_end; float m_time; float m_easing; float m_elapsed; bool m_erase; FloatInterpolation* m_pNextInterpolation; FunctionCallback m_Callback; void *m_pCallbackData; }; class IntInterpolation { public: int *m_variable; int m_start; int m_end; float m_time; float m_easing; float m_elapsed; bool m_erase; IntInterpolation* m_pNextInterpolation; FunctionCallback m_Callback; void *m_pCallbackData; }; typedef std::vector<FloatInterpolation*> FloatInterpolationList; typedef std::vector<IntInterpolation*> IntInterpolationList; class Interpolator { public: /* Public methods */ static Interpolator* GetInstance(); void Destroy(); void ClearInterpolators(); FloatInterpolation* CreateFloatInterpolation(float *val, float start, float end, float time, float easing, FloatInterpolation* aNext = NULL, FunctionCallback aCallback = NULL, void *aData = NULL); void LinkFloatInterpolation(FloatInterpolation* aFirst, FloatInterpolation* aSecond); void AddFloatInterpolation(FloatInterpolation* aInterpolation); void AddFloatInterpolation(float *val, float start, float end, float time, float easing, FloatInterpolation* aNext = NULL, FunctionCallback aCallback = NULL, void *aData = NULL); void RemoveFloatInterpolationByVariable(float *val); IntInterpolation* CreateIntInterpolation(int *val, int start, int end, float time, float easing, IntInterpolation* aNext = NULL, FunctionCallback aCallback = NULL, void *aData = NULL); void LinkIntInterpolation(IntInterpolation* aFirst, IntInterpolation* aSecond); void AddIntInterpolation(IntInterpolation* aInterpolation); void AddIntInterpolation(int *val, int start, int end, float time, float easing, IntInterpolation* aNext = NULL, FunctionCallback aCallback = NULL, void *aData = NULL); void RemoveIntInterpolationByVariable(int *val); void SetPaused(bool pause); bool IsPaused(); void Update(float dt); void UpdateFloatInterpolators(float delta); void UpdateIntInterpolators(float delta); protected: /* Protected methods */ Interpolator(); Interpolator(const Interpolator&); Interpolator &operator=(const Interpolator&); private: /* Private methods */ void RemoveCreateFloatInterpolation(FloatInterpolation* aInterpolation); void RemoveFloatInterpolation(FloatInterpolation* aInterpolation); void RemoveCreateIntInterpolation(IntInterpolation* aInterpolation); void RemoveIntInterpolation(IntInterpolation* aInterpolation); public: /* Public members */ protected: /* Protected members */ private: /* Private members */ // A dynamic array of our float interpolation variables FloatInterpolationList m_vpFloatInterpolations; FloatInterpolationList m_vpCreateFloatInterpolations; // A dynamic array of our int interpolation variables IntInterpolationList m_vpIntInterpolations; IntInterpolationList m_vpCreateIntInterpolations; // Singleton instance static Interpolator *c_instance; // Flag to control if we are paused or not bool m_paused; };
AlwaysGeeky/Vogue
source/utils/Interpolator.h
C
gpl-3.0
3,607
[![Switch](../docs/Pictures/Menu/Switch.png)](Home.md)[![Switch](../docs/Pictures/Menu/Gallery.png)](Gallery.md)[![Switch](../docs/Pictures/Menu/Examples.png)](Examples.md)[![Switch](../docs/Pictures/Menu/Downloads.png)](Downloads.md)[![Switch](../docs/Pictures/Menu/Documentation.png)](Documentation.md)[![Switch](../docs/Pictures/Menu/Project.png)](https://sourceforge.net/projects/switchpro)[![Switch](../docs/Pictures/Menu/Sources.png)](https://github.com/gammasoft71/switch)[![Switch](../docs/Pictures/Menu/Contact.png)](Contact.md)[![Switch](../docs/Pictures/Menu/Gammasoft.png)](https://gammasoft71.wixsite.com/gammasoft) Protected members by themselves do not provide any extensibility, but they can make extensibility through subclassing more powerful. They can be used to expose advanced customization options without unnecessarily complicating the main public interface. Framework designers need to be careful with protected members because the name "protected" can give a false sense of security. Anyone is able to subclass an unsealed class and access protected members, and so all the same defensive coding practices used for public members apply to protected members. **✓ CONSIDER** using protected members for advanced customization. **✓ DO** treat protected members in unsealed classes as public for the purpose of security, documentation, and compatibility analysis. Anyone can inherit from a class and access the protected members. # See also ​ Other Resources * [Framework Design Guidelines](FrameworkDesignGuidelines.md) * [Designing for Extensibility](DesigningForExtensibility.md) ______________________________________________________________________________________________ © 2010 - 2018 by Gammasoft.
yfiumefreddo/Pcf
docs/ProtectedMembers.md
Markdown
gpl-3.0
1,743
<?php /** * The <td> tag defines a standard cell in an HTML table. * * An HTML table has two kinds of cells:<ul> * <li>Header cells - contains header information (created with the th element)</li> * <li>Standard cells - contains data (created with the td element)</li></ul> * <p>The text in a th element is bold and centered.</p> * <p>The text in a td element is regular and left-aligned.</p> * {@link http://www.w3schools.com/tags/tag_td.asp } * * PHP version 5 * * @example simple.php How to use * @filesource * @category Element * @package Elements * @author Jens Peters <jens@history-archive.net> * @copyright 2011 Jens Peters * @license http://www.gnu.org/licenses/lgpl.html GNU LGPL v3 * @version 1.1 * @link http://launchpad.net/htmlbuilder */ namespace HTMLBuilder\Elements\Table; /** * The <td> tag defines a standard cell in an HTML table. * * An HTML table has two kinds of cells:<ul> * <li>Header cells - contains header information (created with the th element)</li> * <li>Standard cells - contains data (created with the td element)</li></ul> * <p>The text in a th element is bold and centered.</p> * <p>The text in a td element is regular and left-aligned.</p> * {@link http://www.w3schools.com/tags/tag_td.asp } * * @category Element * @example simple.php see HOW TO USE * @example debug.php see HOW TO DEBUG * @package Elements * @subpackage General * @author Jens Peters <jens@history-archiv.net> * @license http://www.gnu.org/licenses/lgpl.html GNU LGPL v3 * @link http://launchpad.net/htmlbuilder */ class Td extends RootCell { public function initElement() { } }
lasso/textura
src/htmlbuilder/lib/Elements/Table/Td.php
PHP
gpl-3.0
1,680
include DIRS CROSS_COMPILE?=arm-linux-gnueabihf- LIBDIR_APP_LOADER?=../am335x_pru_package/pru_sw/app_loader/lib INCDIR_APP_LOADER?=../am335x_pru_package/pru_sw/app_loader/include PASM?=../am335x_pru_package/pru_sw/utils/pasm_2 BINDIR?=./ CFLAGS+= -Wall -I$(INCDIR_APP_LOADER) -D__DEBUG -O2 -mtune=cortex-a8 -march=armv7-a LDFLAGS+=-L$(LIBDIR_APP_LOADER) -lprussdrv -lpthread -lSDL -lm OBJDIR=./ TARGET=./pjx74 _DEPS = DEPS = $(patsubst %,$(INCDIR_APP_LOADER)/%,$(_DEPS)) _OBJ = pjx74.o OBJ = $(patsubst %,$(OBJDIR)/%,$(_OBJ)) $(OBJDIR)/%.o: %.c $(DEPS) @mkdir -p obj $(CROSS_COMPILE)gcc $(CFLAGS) -c -o $@ $< $(TARGET): $(OBJ) $(CROSS_COMPILE)gcc $(CFLAGS) -o $@ $^ $(LDFLAGS) ${PASM} -V3 -b ./pjx74.p .PHONY: clean clean: rm $(TARGET) *.o *.bin
robotfuel/n64_kbd_bbb
Makefile
Makefile
gpl-3.0
786
'use strict'; angular.module('knowShareVanApp') .directive('events', () => ({ templateUrl: 'components/events/events.html', restrict: 'E', scope: { calHeight: '=height', showTitle: '=showTitle' }, controller: 'EventsController', controllerAs: 'event' }));
dmitryfd/knowsharevan
client/components/events/events.directive.ts
TypeScript
gpl-3.0
296
<?php if($isset($_GET["que"])) { $queCosa = $_GET["que"]; $cargar = "[]"; if($queCosa == "cate") $cargar = get_file_contents("categorias.json"); if($queCosa == "marc") $cargar = get_file_contents("marcas.json"); if($queCosa == "prod") $cargar = get_file_contents("productos.json"); echo $cargar; } else { echo "[]"; } ?>
cafeClases/proyectoPHPbase
datos/conseguir.php
PHP
gpl-3.0
337
--[[ * Copyright (c) 2011-2020 by Adam Hellberg. * * This file is part of KillTrack. * * KillTrack 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. * * KillTrack 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 KillTrack. If not, see <http://www.gnu.org/licenses/>. --]] local NAME, KT = ... _G[NAME] = KT -- Upvalue some functions used in CLEU local UnitGUID = UnitGUID local UnitIsTapDenied = UnitIsTapDenied local CombatLogGetCurrentEventInfo = CombatLogGetCurrentEventInfo local NO_NAME = "<No Name>" KT.Name = NAME KT.Version = GetAddOnMetadata(NAME, "Version") KT.Events = {} KT.Global = {} KT.CharGlobal = {} KT.Temp = {} KT.Sort = { Desc = 0, Asc = 1, CharDesc = 2, CharAsc = 3, AlphaD = 4, AlphaA = 5, IdDesc = 6, IdAsc = 7 } KT.Session = { Count = 0, Kills = {} } KT.Messages = { Announce = "[KillTrack] Session Length: %s. Session Kills: %d. Kills Per Minute: %.2f." } local ET local KTT = KT.Tools local FirstDamage = {} -- Tracks first damage to a mob registered by CLEU local LastDamage = {} -- Tracks whoever did the most recent damage to a mob local DamageValid = {} -- Determines if mob is tapped by player/group local Units = { "target", "targetpet", "focus", "focuspet", "pet", "mouseover", "mouseoverpet", } local combat_log_damage_events = {} do local prefixes = { "SWING", "RANGE", "SPELL", "SPELL_PERIODIC", "SPELL_BUILDING" } local suffixes = { "DAMAGE", "DRAIN", "LEECH", "INSTAKILL" } for _, prefix in pairs(prefixes) do for _, suffix in pairs(suffixes) do combat_log_damage_events[prefix .. "_" .. suffix] = true end end end for i = 1, 40 do if i <= 4 then Units[#Units + 1] = "party" .. i Units[#Units + 1] = "partypet" .. i end Units[#Units + 1] = "raid" .. i Units[#Units + 1] = "raidpet" .. i end for i = 1, #Units * 2 do Units[#Units + 1] = Units[i] .. "target" end if KT.Version == "@" .. "project-version" .. "@" then KT.Version = "Development" KT.Debug = true end local function FindUnitByGUID(guid) for i = 1, #Units do if UnitGUID(Units[i]) == guid then return Units[i] end end return nil end function KT:OnEvent(_, event, ...) if self.Events[event] then self.Events[event](self, ...) end end function KT.Events.ADDON_LOADED(self, ...) local name = (select(1, ...)) if name ~= NAME then return end ET = KT.ExpTracker if type(_G["KILLTRACK"]) ~= "table" then _G["KILLTRACK"] = {} end self.Global = _G["KILLTRACK"] if type(self.Global.PRINTKILLS) ~= "boolean" then self.Global.PRINTKILLS = false end if type(self.Global.PRINTNEW) ~= "boolean" then self.Global.PRINTNEW = false end if type(self.Global.ACHIEV_THRESHOLD) ~= "number" then self.Global.ACHIEV_THRESHOLD = 1000 end if type(self.Global.COUNT_GROUP) ~= "boolean" then self.Global.COUNT_GROUP = false end if type(self.Global.SHOW_EXP) ~= "boolean" then self.Global.SHOW_EXP = false end if type(self.Global.MOBS) ~= "table" then self.Global.MOBS = {} end if type(self.Global.IMMEDIATE) ~= "table" then self.Global.IMMEDIATE = {} end if type(self.Global.IMMEDIATE.POSITION) ~= "table" then self.Global.IMMEDIATE.POSITION = {} end if type(self.Global.IMMEDIATE.THRESHOLD) ~= "number" then self.Global.IMMEDIATE.THRESHOLD = 0 end if type(self.Global.BROKER) ~= "table" then self.Global.BROKER = {} end if type(self.Global.BROKER.SHORT_TEXT) ~= "boolean" then self.Global.BROKER.SHORT_TEXT = false end if type(self.Global.BROKER.MINIMAP) ~= "table" then self.Global.BROKER.MINIMAP = {} end if type(self.Global.DISABLE_DUNGEONS) ~= "boolean" then self.Global.DISABLE_DUNGEONS = false end if type(self.Global.DISABLE_RAIDS) ~= "boolean" then self.Global.DISABLE_RAIDS = false end if type(self.Global.TOOLTIP) ~= "boolean" then self.Global.TOOLTIP = true end if type(_G["KILLTRACK_CHAR"]) ~= "table" then _G["KILLTRACK_CHAR"] = {} end self.CharGlobal = _G["KILLTRACK_CHAR"] if type(self.CharGlobal.MOBS) ~= "table" then self.CharGlobal.MOBS = {} end self.PlayerName = UnitName("player") self:Msg("AddOn Loaded!") self.Session.Start = time() self.Broker:OnLoad() end function KT.Events.COMBAT_LOG_EVENT_UNFILTERED(self) local _, event, _, _, s_name, _, _, d_guid, d_name, _, _ = CombatLogGetCurrentEventInfo() if combat_log_damage_events[event] then if FirstDamage[d_guid] == nil then -- s_name is (probably) the player who first damaged this mob and probably has the tag FirstDamage[d_guid] = s_name end LastDamage[d_guid] = s_name if not DamageValid[d_guid] then -- if DamageValid returns true for a GUID, we can tell with 100% certainty that it's valid -- But this relies on one of the valid unit names currently being the damaged mob local d_unit = FindUnitByGUID(d_guid) if not d_unit then return end DamageValid[d_guid] = not UnitIsTapDenied(d_unit) end return end if event ~= "UNIT_DIED" then return end -- Perform solo/group checks local d_id = KTT:GUIDToID(d_guid) local firstDamage = FirstDamage[d_guid] or "<No One>" local lastDamage = LastDamage[d_guid] or "<No One>" local firstByPlayer = firstDamage == self.PlayerName or firstDamage == UnitName("pet") local firstByGroup = self:IsInGroup(firstDamage) local lastByPlayer = lastDamage == self.PlayerName or lastDamage == UnitName("pet") local pass -- All checks after DamageValid should be safe to remove -- The checks after DamageValid are also not 100% failsafe -- Scenario: You deal the killing blow to an already tapped mob <- Would count as kill with current code -- if DamageValid[guid] is set, it can be used to decide if the kill was valid with 100% certainty if DamageValid[d_guid] ~= nil then pass = DamageValid[d_guid] else -- The one who dealt the very first bit of damage was probably the one who got the tag on the mob -- This should apply in most (if not all) situations and is probably a safe fallback when we couldn't -- retrieve tapped status from GUID->Unit pass = firstByPlayer or firstByGroup end if not self.Global.COUNT_GROUP and pass and not lastByPlayer then pass = false -- Player or player's pet did not deal the killing blow and addon only tracks player kills end if not pass or d_id == nil or d_id == 0 then return end FirstDamage[d_guid] = nil DamageValid[d_guid] = nil self:AddKill(d_id, d_name) if self.Timer:IsRunning() then self.Timer:SetData("Kills", self.Timer:GetData("Kills", true) + 1) end end function KT.Events.UPDATE_MOUSEOVER_UNIT(self) if not self.Global.TOOLTIP then return end if UnitIsPlayer("mouseover") then return end local id = KTT:GUIDToID(UnitGUID("mouseover")) if not id then return end if UnitCanAttack("player", "mouseover") then local mob, charMob = self:InitMob(id, UnitName("mouseover")) local gKills, cKills = mob.Kills, charMob.Kills --self:GetKills(id) local exp = mob.Exp GameTooltip:AddLine(("Killed %d (%d) times."):format(cKills, gKills), 1, 1, 1) if self.Global.SHOW_EXP and exp then local toLevel = exp > 0 and math.ceil((UnitXPMax("player") - UnitXP("player")) / exp) or "N/A" GameTooltip:AddLine(("EXP: %d (%s kills to level)"):format(exp, toLevel), 1, 1, 1) end end if KT.Debug then GameTooltip:AddLine(("ID = %d"):format(id)) end GameTooltip:Show() end function KT.Events.CHAT_MSG_COMBAT_XP_GAIN(self, message) ET:CheckMessage(message) end function KT.Events.ENCOUNTER_START(self, _, _, _, size) if (self.Global.DISABLE_DUNGEONS and size == 5) or (self.Global.DISABLE_RAIDS and size > 5) then self.Frame:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") self.Frame:UnregisterEvent("UPDATE_MOUSEOVER_UNIT") self.Frame:UnregisterEvent("CHAT_MSG_COMBAT_XP_GAIN") end end function KT.Events.ENCOUNTER_END(self, _, _, _, size) if (self.Global.DISABLE_DUNGEONS and size == 5) or (self.Global.DISABLE_RAIDS and size > 5) then self.Frame:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") self.Frame:RegisterEvent("UPDATE_MOUSEOVER_UNIT") self.Frame:RegisterEvent("CHAT_MSG_COMBAT_XP_GAIN") end end function KT:ToggleExp() self.Global.SHOW_EXP = not self.Global.SHOW_EXP if self.Global.SHOW_EXP then KT:Msg("Now showing EXP on tooltips!") else KT:Msg("No longer showing EXP on tooltips.") end end function KT:ToggleDebug() self.Debug = not self.Debug if self.Debug then KT:Msg("Debug enabled!") else KT:Msg("Debug disabled!") end end function KT:IsInGroup(unit) if unit == self.PlayerName then return true end if UnitInParty(unit) then return true end if UnitInRaid(unit) then return true end return false end function KT:SetThreshold(threshold) if type(threshold) ~= "number" then error("KillTrack.SetThreshold: Argument #1 (threshold) must be of type 'number'") end self.Global.ACHIEV_THRESHOLD = threshold if threshold > 0 then self:ResetAchievCount() KT:Msg(("New kill notice (achievement) threshold set to %d."):format(threshold)) else KT:Msg("Kill notices have been disabled (set threshold to a value greater than 0 to re-enable).") end end function KT:SetImmediateThreshold(threshold) if type(threshold) ~= "number" then error("KillTrack.SetImmediateThreshold: Argument #1 (threshold) must be of type 'number'") end self.Global.IMMEDIATE.THRESHOLD = threshold if threshold > 0 then KT:Msg(("New immediate threshold set to %d."):format(threshold)) else KT:Msg("Immediate threshold disabled.") end end function KT:SetImmediateFilter(filter) if type(filter) ~= "string" then error("KillTrack.SetImmediateFilter: Argument #1 (filter) must be of type 'string'") end self.Global.IMMEDIATE.FILTER = filter KT:Msg("New immediate filter set to: " .. filter) end function KT:ClearImmediateFilter() self.Global.IMMEDIATE.FILTER = nil KT:Msg("Immediate filter cleared!") end function KT:ToggleCountMode() self.Global.COUNT_GROUP = not self.Global.COUNT_GROUP if self.Global.COUNT_GROUP then KT:Msg("Now counting kills for every player in the group (party/raid)!") else KT:Msg("Now counting your own killing blows ONLY.") end end function KT:InitMob(id, name) name = name or NO_NAME if type(self.Global.MOBS[id]) ~= "table" then self.Global.MOBS[id] = { Name = name, Kills = 0, AchievCount = 0 } if self.Global.PRINTNEW then self:Msg(("Created new entry for %q"):format(name)) end elseif self.Global.MOBS[id].Name ~= name then self.Global.MOBS[id].Name = name end if type(self.CharGlobal.MOBS[id]) ~= "table" then self.CharGlobal.MOBS[id] = { Name = name, Kills = 0 } if self.Global.PRINTNEW then self:Msg(("Created new entry for %q on this character."):format(name)) end elseif self.CharGlobal.MOBS[id].Name ~= name then self.CharGlobal.MOBS[id].Name = name end return self.Global.MOBS[id], self.CharGlobal.MOBS[id] end function KT:AddKill(id, name) name = name or NO_NAME self:InitMob(id, name) self.Global.MOBS[id].Kills = self.Global.MOBS[id].Kills + 1 self.CharGlobal.MOBS[id].Kills = self.CharGlobal.MOBS[id].Kills + 1 if self.Global.PRINTKILLS then local kills = self.Global.MOBS[id].Kills local cKills = self.CharGlobal.MOBS[id].Kills self:Msg(("Updated %q, new kill count: %d. Kill count on this character: %d"):format(name, kills, cKills)) end self:AddSessionKill(name) if self.Immediate.Active then local filter = self.Global.IMMEDIATE.FILTER local filterPass = not filter or name:match(filter) if filterPass then self.Immediate:AddKill() if self.Global.IMMEDIATE.THRESHOLD > 0 and self.Immediate.Kills % self.Global.IMMEDIATE.THRESHOLD == 0 then PlaySound(SOUNDKIT.RAID_WARNING) PlaySound(SOUNDKIT.PVP_THROUGH_QUEUE) RaidNotice_AddMessage( RaidWarningFrame, ("%d KILLS!"):format(self.Immediate.Kills), ChatTypeInfo.SYSTEM) end end end if self.Global.ACHIEV_THRESHOLD <= 0 then return end if type(self.Global.MOBS[id].AchievCount) ~= "number" then self.Global.MOBS[id].AchievCount = floor(self.Global.MOBS[id].Kills / self.Global.ACHIEV_THRESHOLD) if self.Global.MOBS[id].AchievCount >= 1 then self:KillAlert(self.Global.MOBS[id]) end else local achievCount = self.Global.MOBS[id].AchievCount self.Global.MOBS[id].AchievCount = floor(self.Global.MOBS[id].Kills / self.Global.ACHIEV_THRESHOLD) if self.Global.MOBS[id].AchievCount > achievCount then self:KillAlert(self.Global.MOBS[id]) end end end function KT:SetKills(id, name, globalCount, charCount) if type(id) ~= "number" then error("'id' argument must be a number") end if type(globalCount) ~= "number" then error("'globalCount' argument must be a number") end if type(charCount) ~= "number" then error("'charCount' argument must be a number") end name = name or NO_NAME self:InitMob(id, name) self.Global.MOBS[id].Kills = globalCount self.CharGlobal.MOBS[id].Kills = charCount self:Msg(("Updated %q to %d global and %d character kills"):format(name, globalCount, charCount)) end function KT:AddSessionKill(name) if self.Session.Kills[name] then self.Session.Kills[name] = self.Session.Kills[name] + 1 else self.Session.Kills[name] = 1 end self.Session.Count = self.Session.Count + 1 end function KT:SetExp(name, exp) for _, mob in pairs(self.Global.MOBS) do if mob.Name == name then mob.Exp = tonumber(exp) end end end function KT:GetSortedSessionKills(max) max = tonumber(max) or 3 local t = {} for k,v in pairs(self.Session.Kills) do t[#t + 1] = {Name = k, Kills = v} end table.sort(t, function(a, b) return a.Kills > b.Kills end) -- Trim table to only contain 3 entries local trimmed = {} local c = 0 for i,v in ipairs(t) do trimmed[i] = v c = c + 1 if c >= max then break end end return trimmed end function KT:ResetSession() wipe(self.Session.Kills) self.Session.Count = 0 self.Session.Start = time() end function KT:GetKills(id) local gKills, cKills = 0, 0 local mob = self.Global.MOBS[id] if type(mob) == "table" then gKills = mob.Kills local cMob = self.CharGlobal.MOBS[id] if type(cMob) == "table" then cKills = cMob.Kills end end return gKills, cKills end function KT:GetTotalKills() local count = 0 for _, mob in pairs(self.Global.MOBS) do count = count + mob.Kills end return count end function KT:GetSessionStats() if not self.Session.Start then return 0, 0, 0 end local now = time() local session = now - self.Session.Start local kps = session == 0 and 0 or self.Session.Count / session local kpm = kps * 60 local kph = kpm * 60 return kps, kpm, kph, session end function KT:PrintKills(identifier) local found = false local name = NO_NAME local gKills = 0 local cKills = 0 if type(identifier) ~= "string" and type(identifier) ~= "number" then identifier = NO_NAME end for k,v in pairs(self.Global.MOBS) do if type(v) == "table" and (tostring(k) == tostring(identifier) or v.Name == identifier) then name = v.Name gKills = v.Kills if self.CharGlobal.MOBS[k] then cKills = self.CharGlobal.MOBS[k].Kills end found = true end end if found then self:Msg(("You have killed %q %d times in total, %d times on this character"):format(name, gKills, cKills)) else if UnitExists("target") and not UnitIsPlayer("target") then identifier = UnitName("target") end self:Msg(("Unable to find %q in mob database."):format(tostring(identifier))) end end function KT:Announce(target) if target == "GROUP" then target = ((IsInRaid() and "RAID") or (IsInGroup() and "PARTY")) or "SAY" end local _, kpm, _, length = self:GetSessionStats() local msg = self.Messages.Announce:format(KTT:FormatSeconds(length), self.Session.Count, kpm) SendChatMessage(msg, target) end function KT:Msg(msg) DEFAULT_CHAT_FRAME:AddMessage("\124cff00FF00[KillTrack]\124r " .. msg) end function KT:KillAlert(mob) local data = { Text = ("%d kills on %s!"):format(mob.Kills, mob.Name), Title = "Kill Record!", bTitle = "Congratulations!", Icon = "Interface\\Icons\\ABILITY_Deathwing_Bloodcorruption_Death", FrameStyle = "GuildAchievement" } if IsAddOnLoaded("Glamour") then if not _G.GlamourShowAlert then KT:Msg("ERROR: GlamourShowAlert == nil! Notify AddOn developer.") return end _G.GlamourShowAlert(500, data) else RaidNotice_AddMessage(RaidBossEmoteFrame, data.Text, ChatTypeInfo.SYSTEM) RaidNotice_AddMessage(RaidBossEmoteFrame, data.Text, ChatTypeInfo.SYSTEM) end self:Msg(data.Text) end function KT:GetMob(id) for k,v in pairs(self.Global.MOBS) do if type(v) == "table" and (tostring(k) == tostring(id) or v.Name == id) then return v, self.CharGlobal.MOBS[k] end end return false, nil end function KT:GetSortedMobTable(mode, filter, caseSensitive) if not tonumber(mode) then mode = self.Sort.Desc end if mode < 0 or mode > 7 then mode = self.Sort.Desc end if filter and filter == "" then filter = nil end local t = {} for k,v in pairs(self.Global.MOBS) do assert(type(v) == "table", "Unexpected mob entry type in db: " .. type(v) .. ". Expected table") local matches = nil if filter then local name = caseSensitive and v.Name or v.Name:lower() filter = caseSensitive and filter or filter:lower() local status, result = pcall(string.match, name, filter) matches = status and result end if matches or not filter then local cKills = 0 if self.CharGlobal.MOBS[k] and type(self.CharGlobal.MOBS[k]) == "table" then cKills = self.CharGlobal.MOBS[k].Kills end local entry = {Id = k, Name = v.Name, gKills = v.Kills, cKills = cKills} table.insert(t, entry) end end local function compare(a, b) if mode == self.Sort.Asc then return a.gKills < b.gKills elseif mode == self.Sort.CharDesc then return a.cKills > b.cKills elseif mode == self.Sort.CharAsc then return a.cKills < b.cKills elseif mode == self.Sort.AlphaD then return a.Name > b.Name elseif mode == self.Sort.AlphaA then return a.Name < b.Name elseif mode == self.Sort.IdDesc then return a.Id > b.Id elseif mode == self.Sort.IdAsc then return a.Id < b.Id else return a.gKills > b.gKills -- Descending end end table.sort(t, compare) return t end function KT:Delete(id, charOnly) id = tonumber(id) if not id then error(("Expected 'id' param to be number, got %s."):format(type(id))) end local found = false local name if self.Global.MOBS[id] then name = self.Global.MOBS[id].Name if not charOnly then self.Global.MOBS[id] = nil end if self.CharGlobal.MOBS[id] then self.CharGlobal.MOBS[id] = nil end found = true end if found then self:Msg(("Deleted %q (%d) from database."):format(name, id)) StaticPopup_Show("KILLTRACK_FINISH", 1) else self:Msg(("ID: %d was not found in the database."):format(id)) end end function KT:Purge(threshold) local count = 0 for k,v in pairs(KT.Global.MOBS) do if type(v) == "table" and v.Kills < threshold then self.Global.MOBS[k] = nil count = count + 1 end end for k,v in pairs(KT.CharGlobal.MOBS) do if type(v) == "table" and v.Kills < threshold then self.CharGlobal.MOBS[k] = nil count = count + 1 end end self:Msg(("Purged %d entries with a kill count below %d"):format(count, threshold)) self.Temp.Threshold = nil StaticPopup_Show("KILLTRACK_FINISH", tostring(count)) end function KT:Reset() local count = #KT.Global.MOBS + #KT.CharGlobal.MOBS wipe(self.Global.MOBS) wipe(self.CharGlobal.MOBS) KT:Msg(("%d mob entries have been removed!"):format(count)) StaticPopup_Show("KILLTRACK_FINISH", tostring(count)) end function KT:ResetAchievCount() for _,v in pairs(self.Global.MOBS) do v.AchievCount = floor(v.Kills / self.Global.ACHIEV_THRESHOLD) end end KT.Frame = CreateFrame("Frame") for k,_ in pairs(KT.Events) do KT.Frame:RegisterEvent(k) end KT.Frame:SetScript("OnEvent", function(_, event, ...) KT:OnEvent(_, event, ...) end)
SharpWoW/KillTrack
KillTrack.lua
Lua
gpl-3.0
22,470
<?php namespace Language; class LanguageApplet { /** * Gets the language files for the applet and puts them into the cache. * * @throws Exception If there was an error. * * @return void */ public static function generateAppletLanguageXmlFiles() { // List of the applets [directory => applet_id]. $applets = array( 'memberapplet' => 'JSM2_MemberApplet' ); Log::log(Log::colorize("\nGenerating applet language XMLs:", 'NOTE')); $error = false; try { foreach ($applets as $appletDirectory => $appletLanguageId) { Log::log("[APPLET: ".Log::colorize($appletLanguageId, 'WARNING')."]" ." - [DIR: ".Log::colorize($appletDirectory, 'WARNING')."]\n"); $languages = self::getAppletLanguages($appletLanguageId); if (empty($languages)) { $error = true; throw new \Exception('There is no available languages for the ' . $appletLanguageId . ' applet.', 100); } $path = File::getLanguageCachePath('flash'); foreach ($languages as $language) { $xmlContent = self::getAppletLanguageFile($appletLanguageId, $language); if(empty($xmlContent)) { $error = true; throw new \Exception('There is no XMLContent for applet: ('.$appletLanguageId.')' .' language: ('.$language.')!', 101); } else { $xmlFile = File::checkIfFileExists($path, '/lang_'.$language, '.xml'); if (File::storeLanguageFile($xmlFile, $xmlContent)) { Log::log("\t[LANGUAGE: " . Log::colorize(implode(', ', $languages), 'WARNING') . "] ".Log::colorize("OK", 'SUCCESS')); } else { $error = true; Log::log("\t[LANGUAGE: " . Log::colorize(implode(', ', $languages), 'WARNING') . "] ".Log::colorize("NOK", 'FAILURE')); throw new \Exception('Unable to save applet: ('.$appletLanguageId.')' .'language: ('.$language.') xml ('.$xmlFile.')!', 102); } } } if (!$error) { Log::log("\t[XML CACHED: ".Log::colorize($appletLanguageId, 'WARNING')."] " .Log::colorize("OK", 'SUCCESS')); } else { Log::log("\t[XML CACHED: ".Log::colorize($appletLanguageId, 'WARNING')."] " .Log::colorize("NOK", 'FAILURE')); } } } catch (\Exception $e) { $error = true; Log::log("\n\n[".Log::colorize("ERROR", 'FAILURE').": (".$e->getCode().")]" ." detected \n\tOn file: ".$e->getFile()."," ."\n\tAt line: ".$e->getLine().", with message: " .$e->getMessage()."\n\n"); } if (!$error) { Log::log(Log::colorize("Applet language XMLs generated.\n", 'NOTE')); } else { Log::log(Log::colorize("Error during language XMLs generation.\n", 'FAILURE')); } } /** * Gets the available languages for the given applet. * * @param string $applet The applet identifier. * * @return array The list of the available applet languages. */ protected static function getAppletLanguages($applet) { $result = ApiCall::call( 'system_api', 'language_api', array( 'system' => 'LanguageFiles', 'action' => 'getAppletLanguages' ), array('applet' => $applet) ); try { CheckErrorResults::checkForApiErrorResult($result); } catch (\Exception $e) { throw new \Exception('Getting languages for applet (' . $applet . ') was unsuccessful ', 103); } if (empty($result)) { return; } else { return $result['data']; } } /** * Gets a language xml for an applet. * * @param string $applet The identifier of the applet. * @param string $language The language identifier. * * @return string|false The content of the language file or false if weren't able to get it. */ protected static function getAppletLanguageFile($applet, $language) { $result = ApiCall::call( 'system_api', 'language_api', array( 'system' => 'LanguageFiles', 'action' => 'getAppletLanguageFile' ), array( 'applet' => $applet, 'language' => $language ) ); try { CheckErrorResults::checkForApiErrorResult($result); } catch (\Exception $e) { throw new \Exception('Getting language xml for applet: (' . $applet . ')' . ' on language: (' . $language . ') was unsuccessful: ', 104); } return $result['data']; } }
hjordao/LanguageBatchBo
src/LanguageApplet.php
PHP
gpl-3.0
4,216
// {SHANK_BOT_LICENSE_BEGIN} /**************************************************************** **************************************************************** * * ShankBot - Automation software for the MMORPG Tibia. * Copyright (C) 2016-2017 Mikael Hernvall * * 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 * 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/>. * * Contact: * mikael.hernvall@gmail.com * **************************************************************** ****************************************************************/ // {SHANK_BOT_LICENSE_END} /////////////////////////////////// // Internal ShankBot headers #include "messaging/Message.hpp" #include "utility/utility.hpp" using namespace sb::utility; using namespace sb::messaging; /////////////////////////////////// size_t Message::fromBinary(const char* data, size_t size) { if(size < sizeof(M_MESSAGE_TYPE)) return 0; Type type; readStream(type, data); if(type != M_MESSAGE_TYPE) return 0; size -= sizeof(type); size_t readBytes = fromBinaryDerived(data, size); if(readBytes == -1) return 0; return sizeof(type) + readBytes; } void Message::toBinary(std::vector<char>& out) const { writeStream(M_MESSAGE_TYPE, out); toBinaryDerived(out); } Message::Type Message::readMessageType(const char* data, size_t size) { if(size < sizeof(Type)) return Type::INVALID; return *(Type*)data; } size_t Message::fromBinaryDerived(const char* data, size_t size) { return 0; } void Message::toBinaryDerived(std::vector<char>& out) const { return; }
MickeMakaron/ShankBot
messaging/src/Message.cpp
C++
gpl-3.0
2,123
/* Global Element Styles */ html {overflow-y:scroll;} body {margin:0; padding:0; background:#fff; font:75%/normal Arial, Helvetica, sans-serif;} h1, h2, h3, h4, h5, h6 {margin:.1em 0;} h1, h2.headline {color:#c88039; font-size:1.33em;} h2 {color:#c88039; font-size:1.167em;} h3 {color:#333; font-size:1.167em;} h4 {color:#333; font-size:1em;} h5, h6 {font-size:1em;} a {color:#084482; text-decoration:underline;} a.button {width:auto; border:1px solid #bfbfbf; border-right-color:#908d8d; border-bottom-color:#908d8d; padding:2px .6em; background:#e1e1e1 url(images/btn_bg_default.gif) left center repeat-x; color:#000; font-weight:normal !important; text-decoration:none;} a.button:active {border:1px solid #908d8d; border-right-color:#afafaf; border-bottom-color:#afafaf;} a.button:hover {cursor:pointer;} a.button.primary {background:#ffa822 url(images/btn_bg_submit.gif) left center repeat-x; border:1px solid #d5bd98; border-right-color:#935e0d; border-bottom-color:#935e0d;} a.button.primary:active {border:1px solid #935e0d; border-right-color:#d5bd98; border-bottom-color:#d5bd98;} a img {border:0;} button, input.button {font-size: 11px; width:auto !important; margin-right: 0; border:1px solid #bfbfbf; border-right-color:#908d8d; border-bottom-color:#908d8d; padding:1px .5em; background:#e1e1e1 url(images/btn_bg_default.gif) left center repeat-x; color:#000;} button:active, input.button:active {border:1px solid #908d8d; border-right-color:#afafaf; border-bottom-color:#afafaf;} button:hover, input.button:hover {cursor:pointer;} button.primary, input.button.primary, input.primaryButton {border:1px solid #d5bd98; border-right-color:#935e0d; border-bottom-color:#935e0d; background:#ffa822 url(images/btn_bg_submit.gif) left center repeat-x;} button.primary:active, input.button.primary:active, input.primaryButton:active {border:1px solid #935e0d; border-right-color:#d5bd98; border-bottom-color:#d5bd98;} input.primaryButton:hover {cursor:pointer;} button.disabled, input.button.disabled {border:1px solid #ccc; background:#eee; color:#b3b3b3;} button.disabled:hover, input.button.disabled:hover {cursor:default;} button.mini, input.mini, a.mini {font-size:.9em;} button a {text-decoration: none;} hr {display:none;} form {margin:0; display:inline;} /* Global old Header Styles */ #xptHeader {width:100%; margin:0;} #xptHeader table {width:600px;} #xptHeader tr {vertical-align:middle;} #xptHeader td.cobrand {color:#036; font-size:1.75em; font-weight:bold;} #xptHeader .emphasis {font-weight:bold;} .xptHeader {width:600px;} table.tableWAXDefault {width:760px;} #xptWAXHeader {width:100%;} #xptWAXHeader table.PayPalLogoRow {width:760px; margin-top:5px; margin-bottom:5px;} #xptWAXHeader table.cowpImage {width:760px; height:90px;} #xptWAXHeader table.cowpNoImage {width:760px; height:45px;} #xptWAXHeader table.default {width:760px; height:50px;} #xptWAXHeader .cobrand {color:#000; font-size:1.33em; font-weight:normal;} #xptWAXHeader .cobrandLarge {color:#000; font-size:1.75em; font-weight:bold;} #headerMerchant table {width:760px;} #headerMerchant .logo {margin:8px 0 7px 50px;} #headerMerchant .cobrand {color:#000; font-size:1.75em; font-weight:bold;} div#xptHeader {width:100%;} div#xptHeader table {width:56em;} div#xptHeader .mainTableHeader {width:760px;margin:0 auto;} div#header.mainHeader {width:700px; height:auto; margin:0 auto 17px auto; text-align:left;} div#header.mainHeader h1 {float:left; width:auto; height:50px; overflow:hidden; margin:0; padding:0;} div#header.mainHeader:after {clear:both; display:block; visibility:hidden; height:0; content:".";} div#header.mainHeader div#navGlobal {text-align:right;} div#header.mainHeader div#navGlobal ul {float:right; margin:17px 0 0 0; padding:0; list-style-type:none;} div#header.mainHeader div#navGlobal ul li {display:inline; margin:0; border-right:1px solid #000; padding:0 .5em 0 .25em;} div#xptWAXHeader div.sectionBreak, div#headerMerchant div.sectionBreak {margin-top:-28px; border-bottom:5px solid #369; background:none;} div#ebayCheckoutHeader div.sectionBreak {height:20px;} div.sectionBreak {width:100%; height:28px; margin-bottom:5px; background:#369 url(/en_US/i/nav/secondary_bg.gif) repeat-x 10px 0;} div#footer {clear:both; margin:0 auto !important; border:0; padding:2em 9em 1em 9em !important; color:#999; background:#fff; font-size:.9em; text-align:center; width:640px; line-height:1.25em;} div#footer img {vertical-align:middle;} div#footer ul {margin:.7em 0; padding:0; list-style-type:none;} div#footer ul li {display:inline-block; margin:0; border-right:1px solid #999; padding:0 0 0 .4em !important;} div#footer ul li.last {border-right:0;} div#footer ul li a {margin-right:.5em;color:#084482 !important; text-decoration:underline; white-space:nowrap;} div#footer p {margin:20px 0 0 0; padding:0; font-size:1em;} div#footer ul li:last-child {border-right:none !important;} div#footer p#legal {width:640px; margin:0 auto;} div#footerSecure {margin:10px 0 0 0;} div#footerSecure p {margin:0 0 15px 0;} #xptClickthroughFooter {width:100%; margin:6px 0 0 0;} #xptClickthroughFooter table {width:600px;} #xptClickthroughFooter HR {width:100%; margin:0 0 5px 0; padding:0; border-top:1px solid #999; border-bottom:1px solid #999; color:#036; size:2px;} #xptFootnote {width:100%; margin:20px 0;} #xptFootnote table {width:600px;} #xptFootnote P {font-size:.91em;} #xptFooter {width:100%; margin:24px 0 0 0;} #xptFooter table {width:630px;} #xptFooter td {text-align:center;} #xptFooter P {margin:0 0 12px 0; font-size:.91em;} #xptFooter P.lastPara {margin:0; font-size:.91em;} #xptFooter A.ebayLink {color:#03c; font-size:1.1em; font-weight:bold;} #xptFooter p#legal {width:50%; margin:0 auto; text-align:center;} #xptWAXFooter {width:100%; margin-top:35px;} #xptWAXFooter table {width:760px;} #xptWAXFooter td {font-size:.91em; text-align:center;} #xptWAXFooter P {font-size:.91em;} #xptWAXFooter td.greyNote, #xptWAXFooter P.greyNote {margin:0; color:#999; font-size:.91em;} #xptPopupFooter {width:100%; margin:0;} #xptPopupFooter table {width:100%;} #xptPopupFooter td {text-align:center;} #xptPopupFooter P {margin:0 0 12px 0; font-size:.91em;} #xptFooterCopyright {width:100%; margin:0; padding:5px 0; text-align:center;} #xptFooterCopyright P {font-size:.91em; margin:0 0 12px 0;} #Privacy {width:100%; margin-top:24px; text-align:center;} #Privacy A {padding:20px;} #footerSecure {text-align:center;} #header {position:relative; width:760px !important; height:100px !important; margin:0 auto; font-size:1em;} body > #header {height:auto; min-height:100px;} #header.std {height:130px !important;} #header.std.secondary {height:157px !important;} #header.notab {height:106px !important;} #header h1 {position:absolute; margin:0; padding:24px 0 24px 10px;height:auto;} #header form#searchForm {float:right; width:167px; padding:4px 1px 4px 20px;} #header form#searchForm fieldset {margin:0; border:0; padding:0;} #header form#searchForm legend, #header form#searchForm label {display:block; position:absolute; top:0; left:-500em; width:1px; height:1px; overflow:hidden; text-indent:-9999em; line-height:0;} #header form#searchForm input {margin:0; padding:2px; font-size:.9em;} #header form#searchForm input#searchBox {width:95px; border:1px solid #999999;} #header form#searchForm input.button {margin-left:2px;border:1px solid #bfbfbf; background:#fde9b5; background:#e1e1e1 url(images/btn_bg_default.gif) left center repeat-x; font-size:.9em;} #header ul {margin:0; padding:0; list-style-type:none;} #header ul li {margin:0;} #navGlobal {float:right; margin-top:.45em; text-align:right;width:400px;font-size:0.9em;font-weight:normal;} #navGlobal li {display:inline; border-right:1px solid #333; padding-left:.9em;} #navGlobal li a {margin-right:1em;color:#084482;} #navGlobal .new {padding-right:.5em; font-weight:bold; font-style:italic; color:#ff7900;} #navGlobal .last {border:none;} div#navPrimary {clear:both; z-index:2; position:relative; left:0 !important; width:760px !important; min-height:6px; margin:0 auto !important; padding:0; color:#333; background:none !important; font-size:1em;} #navPrimary.empty {position:absolute; top:92px; height:6px; background:url(images/nav_sprite.gif) left 0 repeat-x !important;} div#navPrimary ul {height:auto !important; overflow:hidden; margin:0 0 3em 0 !important; border:0; padding:0 0 0 10px !important; background:url(images/nav_main_bg.gif) bottom left repeat-x; font-size:1em; list-style-type:none;} div#navPrimary ul li {float:left; display:block; margin:.45em .45em 0 0 !important; padding:.27em .9em !important; background:#1A4773 url(images/nav_prim_bg.gif) top left repeat-x;} div#navPrimary ul li:hover, div#navPrimary ul li.hover {background:#1A4773 url(images/nav_prim_bg_hover.gif) top left repeat-x;} div#navPrimary ul li a {display:block; float:none !important; margin:0 !important; padding:0 !important; color:#fff; background:none !important; font-weight:bold; text-decoration:none; text-align:center;} div#navPrimary ul li.active {margin-top:0 !important; border-left:1px solid #ccc; border-right:1px solid #ccc; padding:.7em .9em .5em .9em !important; background:#f8f8f8 url(images/nav_prim_bg_active.gif) top left repeat-x;} div#navPrimary ul li.active:hover, div#navPrimary ul li.active {background:#f8f8f8 url(images/nav_prim_bg_active.gif) top left repeat-x;} div#navPrimary ul li.active a {color:#333;} div#navPrimary ul li ul {display:none;} div#navPrimary ul li.active ul {display:block; overflow:visible; width:100%; position:absolute; top:2.3em !important; left:0; padding:0 !important; background:url(images/nav_second_bg.gif) left bottom repeat-x;} div#navPrimary ul li.active ul li {margin:0 !important; padding:.45em .9em .8em .9em !important; background:transparent none;} div#navPrimary ul li.active ul li a {display:block; color:#1c4266; font-weight:normal;} div#navPrimary ul li.active ul li a:hover, div#navPrimary ul li.active ul li a:focus {text-decoration:underline;} div#navPrimary ul li.active ul li.active:hover, div#navPrimary ul li.active ul li.active {border:none; background:none;} div#navPrimary ul li.active ul li.active:hover a {text-decoration:underline;} div#navPrimary ul li.active ul li.active a {color:#333; font-weight:bold;} div#navPrimary ul li.active ul li.active:hover ul li a {text-decoration:none;} div#navPrimary ul li ul li ul, div#navPrimary ul li.active ul li ul {display:none;} div#navPrimary ul li.active ul li:hover ul, div#navPrimary ul li.active ul li.hover ul {display:block; z-index:10; width:auto; left:auto; margin:-.1em 0 0 -.9em !important; border:1px solid #ccc; border-top:none; padding:0 1em; background:#fff;} div#navPrimary ul li.active ul li:hover ul li, div#navPrimary ul li.active ul li.hover ul li {float:none !important; margin:1em 0; padding:0; text-align:left;} div#navPrimary ul li.active ul li:hover ul li a, div#navPrimary ul li.active ul li.hover ul li a {display:inline;} div#navPrimary ul li.active ul li:hover ul li a:hover, div#navPrimary ul li.active ul li.hover ul li a:hover {text-decoration:underline;} div#navPrimary ul li.active ul li.active ul li a {color:#1c4266; font-weight:normal;} #header.std div#navPrimary {position:absolute; top:100px; width:100%;} #header.notab .brdcmb {position:absolute; top:72px; width:760px !important;} div#sectionBreak {width:760px; margin:0 auto 1em auto; height:6px; background:url(images/nav_main_bg.gif) bottom left repeat-x;} #navFull {overflow:auto;padding:2em 0 1em 0;margin:0 auto;} #navFull ul {list-style-type:none;} #navFull li {float:left; width:14em;} #navFull ul ul {list-style-type:disc;} #navFull ul ul li {float:none; width:auto;} a.skip:active,a.skip:focus { width:auto !important; height:auto !important;left:10px !important;top:80px !important; line-height:normal !important;text-indent:0 !important;} /* Box(s) */ div.generalBox, div.generalBox div.content, div.generalBox div.title, div.title * {background:#fff url(images/grey_box.gif) no-repeat bottom right;} div.attention, div.attention div.content, div.attention div.title, div.attention div.title * {background-image:url(images/yellow_box.gif);} div.generalBox {margin:0 0 20px 0; padding-right:10px;} div.generalBox div.title {margin-right:-10px; padding-right:10px; background-position:top right;} div.generalBox div.title * {height:auto !important; height:1%; margin:0 !important; border:0; padding:10px 0px 15px 10px; background-position:top left;} div.generalBox div.title * * {padding:0; background:none;} div.generalBox div.title h4 {font-size:.91em !important;} div.generalBox div.content {margin-right:0; padding:1px 0 1px 10px; background-position:bottom left;} div.generalBox div.content p {padding:0; font-size:.91em !important;} div.generalBox div.content ul, div.generalBox div.content ol {padding:0;} div.generalBox div.content ul {margin:0 0 15px 15px;} div.generalBox div.content ol {margin:0 0 15px 21px;} div.generalBox div.content li {margin:0 0 3px 0; font-size:.91em !important;} div.generalBox div.content img {margin-bottom:10px;} div.generalBox div.content p img {display:block; margin:15px auto 0 auto;} div.generalBox div.content ul.resources {margin:0 0 15px 0; list-style-type:none;} div.generalBox div.content h5 {margin:0; font-size:.91em !important;} div.simpleBox {float:right; width:23%; margin:0 0 10px 10px; border:1px solid #DBDBDB; padding:0 10px; font-size:.91em !important;} div.simpleBox h4, div.simpleBox div.h4 {margin:0 -10px; padding:4px; background-color:#f9f9f9; font-size:.91em !important; font-weight:bold; text-align:center;} div.simpleBox li {margin-bottom:.5em;} .preferred {font-weight:bold;} div.messageBox {width:auto; min-height:48px; margin: 0 0 10px 0; border:1px solid #ffcf0f; padding:12px 12px 0 12px; background-repeat:no-repeat; background-position:20px 10px; background-color:#ffd; font-size:1em; color: #000;} div.messageBox.res-center-critical {padding-left:80px; color:#000; background-image:url('images/alert_critical.gif');} div.messageBox.res-center-non-critical {padding-left:80px; color:#000; background-image:url('images/alert_non_critical.gif');} div.messageBox.notification {border-color:#81a4c6; padding-left:55px; background-image:url('images/icon_info_24wx24h.gif'); background-color:#f0f6fd;} div.messageBox.confirmation {border-color:#c4de95; padding-left:55px; background-image:url('images/icon_success_24wx24h.gif'); background-color:#f8feee;} div.messageBox.error, div.messageBox.alert { padding-left:55px; background: #ffffde url('images/icon_alert_24wx24h.gif') no-repeat 20px 14px;} div.messageBox p {margin:0 0 12px 0 !important; line-height:1.5;} div.messageBox ul, div.messageBox ol {margin:0 0 12px 23px; padding:0; line-height:1.5;} table.notificationBox td.notificationIcon {background-image:url('images/icon_notification.gif'); background-repeat:no-repeat; background-position:center;} div#GlobalContentBox{clear:both; width:760px; margin:10px auto; padding-bottom:5px; font-size:.91em; text-align:left; line-height:1.25em;} #xptErrorBox {width:100%; margin:0; padding-bottom:10px;} #xptErrorBox table, #xptErrorModerateBox table, #xptMessageBox table {width:100%; border:1px solid #aaa; background-color:#ffc;} #xptErrorBox table.secondary, #xptErrorModerateBox table.secondary, #xptMessageBox table.secondary {width:100%; border:0; background-color:#ffc;} #xptErrorBox tr, #xptErrorModerateBox tr, #xptMessageBox tr {vertical-align:top;} #xptErrorBox td, #xptErrorModerateBox td, #xptMessageBox td {padding:4px;} #xptErrorBox P, #xptErrorModerateBox P, #xptMessageBox P {padding-bottom:0; color:#f00; font-size:1.1em; font-weight:bold;} #xptErrorModerateBox, #xptMessageBox {width:100%; margin:0 0 10px 0;} #xptSearchBox {margin-bottom:5px; border:1px solid #ccc; background-color:#eee;} /* XPT styles */ td > li {margin-left:15px;} td > hr {margin:8px 0px 4px 0px !important; } td > hr.dottedNoPadding {display:block; margin-bottom:9px !important;} a > span.small, a > span.smallEmphasis, a > span.smallemphasis {line-height:13pt;} a > span.smallerEmphasis {position:relative; top:3px;} h1.heading, .heading h1 {display:inline; padding:0; line-height:125%;} h1 .heading {color:#c88039; font-weight:bold;} h1 .superheading {font-size:1em;} .heading {color:#c88039; font-weight:bold;} code, .codeSample {font:1.1em/normal 'Courier New', Courier, monospace;} img.greyBorder {border:1px solid #ccc;} input#emptyField {display:none; visibility:hidden;} input.default {font-size:1.1em;} input.mediumText {font-size:1em;} input.loginButton {background-color:#f00; letter-spacing:-2px;} input.hotButton {font-weight:bold;} input.emphasis {font-weight:bold;} input.small {font-size:.91em;} input.smallButton {font-size:.91em;} input.smallInputWidth,select.smallInputWidth {width:225px;} input.mediumInputWidth,select.mediumInputWidth {width:255px;} input.textRight {text-align:right;} input.securityInputWidth,select.securityInputWidth {width:282px;} input.globalButtonsSmall {font-size:.91em; color:#000;} input.transparentButton {margin:0; border:none; background-color:#fff; color:#03c; text-decoration:underline; padding:0; text-align:left; cursor:pointer; cursor:hand;} input.transparentAlertButton {margin:0; border:none; background-color:#ffc; text-decoration:underline; color:#03c; padding:0; text-align:left; cursor:pointer; cursor:hand;} input.button-as-link {border:none !important; border-bottom:1px solid blue !important; *border-bottom:none !important;background:transparent !important; color:blue !important; cursor:pointer;margin:0px !important;*margin-left:-.6em !important;*margin-right:-1em !important;padding:0px !important;*text-decoration:underline;width:auto !important;} input.largeInputWidth,select.largeInputWidth {width:325px;} input.tinyInputWidth, select.tinyInputWidth {width:125px;} input.smallInputWidth, select.smallInputWidth {width:155px;} input.mediumInputWidth, select.mediumInputWidth, input.securityInputWidth, select.securityInputWidth {width:255px;} select.optionsLong {width:282px;} select.extraLargeInputWidth {width:445px;} select.optionsLong, input.textLong {width:282px; font-size:1.1em; font-weight:normal;} select.optionsLongSmallFont {width:282px; font-size:.91em; font-weight:normal;} textarea.wide {width:600px;} textarea.agreementSignup {width:478px;} textarea.no_edit_message {width:600px; overflow:hidden; border:none;} .globalButtons input {margin:0 15px 0 0; color:#000; font-size:1.1em;} .globalButtonsLeft input {margin-right:13px; color:#000; font-size:1.1em;} hr.dotted {display:block; width:100%; margin:10px 0 15px 0; border-top:0; border-bottom:2px dotted #aaa;} hr.dottedMarginBottom {display:block; width:100%; margin:0 0 15px 0; border-top:0; border-bottom:2px dotted #aaa;} hr.dottedNoPadding {display:block; width:100%; margin:0; border-left:#fff; border-right:#fff; border-top:#fff; border-bottom:2px dotted #aaa; padding:0;} hr.dottedWhite {display:block; width:100%; margin:0; border-left:#fff; border-right:#fff; border-top:#fff; border-bottom:2px dotted #fff;} hr.solid {display:block; width:100%; margin-top:5px; margin-bottom:0; border-left:#fff; border-right:#fff; border-top:#fff; border-bottom:2px solid #999;} hr.solidWhite {display:block; width:100%; margin-top:0; margin-bottom:0; border-left:#fff; border-right:#fff; border-top:#fff; border-bottom:1px solid #fff;} hr.solidGreen {display:block; margin:0; border-top:1px solid #fff; border-bottom:1px solid #C1DBB9;} hr.SolidLightGreen {display:block; margin:2px 0 6px 0; size:1px; color:#c7d6bf;} hr.solidSmall {display:block; margin:8px 0 6px 0; border-top:1px solid #999; border-bottom:1px solid #999; size:1px; color:#036;} hr.dottedRLMargin {display:block; width:100%; margin:0 5px; border:0; border-bottom:2px dotted #aaa;} br.textSpacer {line-height:20px;} br.fieldSpacer {line-height:28px;} br.fieldSpacerOpt {line-height:35px;} br.h10 {line-height:10px;} br.h5 {line-height:5px;} br.h35 {line-height:35px;} br.clearAll {clear:both;} div.containerWide {width:760px; margin:0 auto 6px auto;} div.containerNarrow {width:600px; margin:0 auto 6px auto;} div.containerWide:after, div.containerNarrow:after {clear:both; display:block; visibility:hidden; height:0;content:".";} div.floatLeft {float:left; padding:0 15px 15px 0;} div.floatRight {float:right; padding:0 0 15px 15px;} div.floatCenter {width:100%; padding:1px 0 15px 15px; text-align:center;} div.textCenter {width:100%; text-align:center;} div.textLeft {width:100%; text-align:left;} div.textRight {width:100%; text-align:right;} div.boxMedRight {width:120px;} div.indented {margin:0 20px 0 20px;} div.instructions {width:100%; border:1px solid #ccc; border-right:0; border-left:0; padding:2px; background-color:#f9f9f9; font-size:.91em; line-height:13px;} div.vcard div, div.vcard span {white-space:nowrap;} p.secureTransaction {font-size:.9em !important; text-align:right;} p.secureTransaction a {padding:2px 20px 2px 0; background:url(images/secure_lock_2.gif) no-repeat right center;} p.instructions {float:left; margin-top:-1.1em; text-align:left;} p.instructions span.requiredText {padding-left:10px; background:url(images/asterisk.gif) no-repeat 0% 37%;} p.note {font-size:.91em !important;} ul.listNoIndent, ol.listNoIndent, .listNoIndent {margin:5px .5em 5px 0; padding-left:1em; _padding-left:1.5em; *padding-left:1.5em;} li.last {border-right:none !important;} form p.helpText {margin:2px 0 0 0 !important; padding:0; color:#808080; font-size:.91em !important;} table.tableRLBlackBorder {border:1px solid #aaa; border-collapse:collapse; background-color:#fff;} table.tableDarkGreyDoubleBorderNoTD {border:2px solid #aaa; background-color:#fff;} table.HomePage3RowsStyle {border:1px solid 1px #DBE7F2;} td.boxRoundPriority1Header {padding:2px 10px 5px 5px; color:#fff; background-color:#83a8cc; font-size:1.1em; font-weight:bold;} td.boxRoundPriority1Top {border-top:1px solid #83a8cc; background-color:#83a8cc;} td.boxRoundPriority1Bottom {border-bottom:1px solid #ebf1f7; background-color:#ebf1f7;} td.boxRoundPriority1Body {border-left:1px solid #ebf1f7; border-right:1px solid #ebf1f7; padding-left:10px; background-color:#ebf1f7;} td.boxRoundPriority2Top {border-top:1px solid #ccc; background-color:#fff;} td.boxRoundPriority2Body {border-left:1px solid #ccc; border-right:1px solid #ccc; padding:0 10px; background-color:#fff;} td.boxRoundPriority2Bottom {border-bottom:1px solid #ccc; padding-bottom:0; background-color:#fff;} td.boxRoundPriority3Header {padding:2px 10px 5px 5px; background-color:#ebf1f7; font-size:1.1em; font-weight:bold;} td.boxRoundPriority3Top {border-top:1px solid #ebf1f7; background-color:#ebf1f7;} td.boxRoundPriority3Body {border-left:1px solid #ebf1f7; border-right:1px solid #ebf1f7; padding-left:10px; background-color:#ebf1f7;} td.boxRoundPriority3Bottom {border-bottom:1px solid #ebf1f7; background-color:#ebf1f7;} td.boxRoundPriority4Header {padding:2px 10px 5px 5px; color:#000; background-color:#e8e8e8; font-size:1.1em; font-weight:bold;} td.boxRoundPriority4Top {border-top:1px solid #e8e8e8; background-color:#e8e8e8;} td.boxRoundPriority4Bottom {border-bottom:1px solid #e8e8e8;} td.boxRoundPriority4Body {border-left:1px solid #e8e8e8; border-right:1px solid #e8e8e8; padding-left:10px;} td.borderBlack {border:1px solid #aaa;} td.noPadding {padding:0;} td.borderNoTop {border:1px solid #aaa; border-top:0;} td.borderNoBottom {border:1px solid #aaa; border-bottom:0; padding:0;} #xptContentInnerWAX {width:760px; margin:0 auto; text-align:center;} #xptTabs {height:59px; margin:17px 0 10px 0; background-image:url(images/bg.gif); font-size:1.1em;} #xptTabs table.secondary {margin:4px 0 0 0;} #xptTabsBlueBar {width:100%; margin:5px 0 10px 0; background-image:url(images/bg_clk.gif); font-size:1.1em;} #xptHeaderBlueBar {width:100%; margin:5px 0 10px 0; background-color:#369;} #smallID td {font-size:.91em; font-weight:normal;} #smallBlackID td {color:#000; font-size:.91em; font-weight:normal;} #smallEmphasisBlackID td {color:#000; font-size:.91em; font-weight:bold;} #smallEmphasisID td {font-size:.91em; font-weight:bold;} #xptNotificationBoxELV table {width:720px;} #xptTitle {width:100%; margin:0;} #xptTitle table.main {width:100%;} #xptTitle table.default {width:600px;} #xptTitle table.popup {width:100%; margin:5px 0 0 0;} #xptTitle td.heading {color:#036; font-size:1.33em; font-weight:bold;} #xptTitle hr {margin:0;} #xptTitle .inlineSmallBlue {color:#369; font-size:.91em; font-weight:bold;} #xptContentCustom {width:760px; margin:0 auto; text-align:left;} #xptContentOuter {width:100%; text-align:center; margin-top:0.5em;} #xptContentInner {width:700px; margin:0 auto; text-align:left;} #xptContentInner td h2 {display:inline; margin:0;} #xptContentInnerPopup {width:100%; padding:40px 0 0 0; background:url(images/PayPal_std.gif) no-repeat 0 5px; text-align:left;} #xptContentLeft, #xptContentInner td.lefty {width:150px;} #xptContentInner td.spacer {width:10px;} #xptContentInner td.righty {width:440px;} #xptContentMain {width:100%;margin-top:0.5em;} #xptContentMain hr {margin:0 0 16px 0;} #xptContentMain hr.box {margin:3px 0; border:1px solid #aaa; padding:3px;} #xptContentMain hr.lastPara {margin:0;} #xptContentMain .emphasis {font-weight:bold;} #xptContentMain .smallHistory {vertical-align:text-top; padding-top:2px; font-size:.91em;} #xptContentMain .smallEmphasis {font-weight:bold;} #xptContentMain hr.heading {margin:0; color:#036; font-size:1.33em; font-weight:bold;} #xptContentMain hr.subheading {color:#036; font-size:1.167em; font-weight:bold;} #xptContentMain hr.subheadingClickthrough {margin:0; font-weight:bold;} #xptContentMain hr.subheadingPopup {margin:0; font-weight:bold;} #xptContentMain ol.paddedList li, #xptContentMain ul.paddedList li {padding:0 0 12px 0;} #xptContentMain ol.paddedListHalf li, #xptContentMain ul.paddedListHalf li {padding:0 0 6px 0;} #xptContentMain ul.ListGrey li {padding:0; color:#666;} #xptContentMain table.defaultWidth {width:600px;} #xptContentMain .containerBox {width:98%; border:2px solid #369;} #xptContentMain .containerBox .header {margin:auto 5px; padding-top:10px 0 5px 0; border-bottom:1px solid #ccc;} #xptContentMain .containerBox .logo {text-align:center;} #xptContentMain .containerBox .content {padding:10px;} #xptLoginBox {width:100%; margin-bottom:12px; background-color:#eee; border:1px solid #ccc; border-collapse:collapse;} #xptLoginBox td {width:100%; padding:8px 10px 0 10px; font-size:.91em;} #xptLoginBox td.head {width:100%; padding:5px; background-color:#ccc; font-size:1.1em; font-weight:bold;} #xptLoginBox td.buttons {width:100%; text-align:right;} #xptLoginBox td.arrow {padding:8px 10px 5px 0; font-size:1em;} #xptLoginBox A {display:block; padding-bottom:6px; text-align:center;} #xptLoginBox input.fields {width:130px;} #xptInfoBox {width:100%; margin-bottom:12px; border:1px solid #ccc; border-collapse:collapse; background-color:#eee;} #xptInfoBox td.head {width:100%; padding:5px; background-color:#ccc; font-size:1.1em; font-weight:bold;} #xptInfoBox A {display:block; padding:8px; font-size:.91em;} #xptHomepageAlert {width:100%; margin-bottom:15px; border:1px solid #cccc33; background-color:#ffc; font-size:1.33em; font-weight:bold; text-align:center; line-height:30px;} #xptHomepageTitles {width:100%; margin-bottom:15px; border-bottom:1px solid #ccc; padding:5px; font-weight:700; background-color:#eee;} #xptCardIcons td {font-size:2px;} #xptDashBoardHeader td, #xptDashBoardHeader div {font-size:.91em; font-weight:bold;} #xptDashBoardHeader td {background-color:#cde; font-weight:bold;} #xptDashBoardBody td, #xptDashBoardBody div {font-size:.91em; font-weight:normal;} #xptDashBoardBody td.emphasis, div.emphasis {font-size:.91em; font-weight:bold;} #xptDemo {width:100%; background-color:#fff;} #xptDemo table {width:420px;} #xptDemo table.theNav {margin:5px 0 0 0;} #xptDemo td {color:#000; font-size:1.1em; font-weight:normal;} #xptDemo td.nav {color:#000; font-size:1.1em; font-weight:bold;} #xptDemo td.navoff {color:#aaa; font-size:1.1em; font-weight:bold;} #xptDemo img.grey {border:1px solid #aaa;} #xptDemo td.theText {padding:15px 0 0 0;} #xptDemo td.theImage {padding:15px 0;} #xptPaymentLoginBox {width:100%; border-top:2px dotted #aaa; border-bottom:2px dotted #aaa; border-collapse:collapse;} #xptPaymentLoginBox td.divider {background-color:#999;} #xptPaymentLoginBoxNoBorder {width:100%; border-top:none; border-bottom:none; border-collapse:collapse;} #xptPaymentLoginBoxNoBorder td.divider {background-color:#999;} #xptPaymentLoginBoxWithBG {width:100%; border:1px solid #ccc; border-collapse:collapse; background-color:#eee;} #xptPaymentLoginBoxWithBG td.divider {background-color:#999;} #requiredWithSecure .labelIndicator {padding-left:10px; background:url(images/asterisk.gif) no-repeat center left;} #xptLeftNav, .xptLeftNav {font-size: 12px; border-top:2px solid #ccc; border-left:2px solid #ccc; border-bottom:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff;} #xptLeftNav td, .xptLeftNav td {border-bottom:1px solid #ccc; border-right:1px solid #ccc; font-size:.91em;} #xptLeftNav td.heading, .xptLeftNav td.heading {border-bottom:1px solid #ccc; border-right:1px solid #ccc; color:#000; background-color:#eee; font-size:1.1em; font-weight:bold;} #xptLeftNav td.on, .xptLeftNav td.on {border-bottom:1px solid #ccc; border-right:1px solid #ccc; padding-left:15px; background-color:#ffc;} #xptLeftNav td.off, .xptLeftNav td.off {border-bottom:1px solid #ccc; border-right:1px solid #ccc; padding-left:5px; background-color:#fff;} #xptLeftNav td.noDivider, .xptLeftNav td.noDivider {border-bottom:1px solid #fff; border-right:1px solid #ccc;} #xptLeftNav td.bottom, .xptLeftNav td.bottom {border-bottom:1px solid #ccc; border-right:1px solid #ccc; background-color:#eee; text-align:center; vertical-align:middle;} #xptLeftNav td div, .xptLeftNav td div {font-size:.91em; font-weight:normal;} #xptLeftNav td.onAndNoDivider {border-bottom:1px solid #fff; border-right:1px solid #ccc; background-color:#ffc;} #xptLeftNav td.offAndNoDivider {border-bottom:1px solid #fff; border-right:1px solid #ccc; background-color:#fff;} div.DemoPrevNextBarTop {width:100%; overflow:hidden; border-top:2px solid #999; padding:5px 0; background-color:#efefef; text-align:right;} div.DemoPrevNextBarTop .Wrapper {float:right; width:300px; margin:0; padding:0;} div.DemoPrevNextBarTop img {vertical-align:middle;} div.DemoPrevNextBarTop .PageNumber {float:left; width:100px; margin:0; padding:0 5px 0 0; text-align:right;} div.DemoPrevNextBarTop .PrevNextLinks {float:left; width:190px; margin:0; padding:0; text-align:center;} div.DemoPrevNextBarBottom {width:100%; overflow:hidden; border-bottom:2px solid #999; padding:5px 0; background-color:#efefef; text-align:right;} div.DemoPrevNextBarBottom .Wrapper {float:right; width:300px; margin:0; padding:0;} div.DemoPrevNextBarBottom img {vertical-align:middle;} div.DemoPrevNextBarBottom .PageNumber {float:left; width:100px; margin:0; padding:0 5px 0 0; text-align:right;} div.DemoPrevNextBarBottom .PrevNextLinks {float:left; width:190px; margin:0; padding:0; text-align:center;} div.xptDemoColumnOne {float:left; width:425px; margin:0; padding:0 10px 10px 0;} div.xptDemoColumnTwo {float:right; width:190px; margin:0; padding:0 0 10px 0;} div.xptDemoColumnTwo .DemoWhiteBox {padding:0 10px 25px 0;} div.xptDemoColumnTwo .DemoBlueBox {background-color:#ebf1f7; padding:10px 10px 5px 10px;} div.DemoWhiteBox ul {margin:0; padding:0; list-style-type:none;} div.DemoWhiteBox ul li {display:block; margin:0; padding:0 0 0 12px; background:url(images/scr_yellowbullet_9x9.gif) no-repeat 0 4px;} div.labelIndicator {padding-left:5px; background:url(images/asterisk.gif) no-repeat center left;} div.labelErrorIndicator {padding-left:5px; background:url(images/asterisk_err.gif) no-repeat center left;} div.leftNotificationBox {width:280px; border:1px solid #036; padding:10px; background-color:#eff7fe;} div.inputNote {padding-left:5px;} div.clickthruButton{text-align:right;} .xptLeftNavNoGrid {border:2px solid #ccc; background-color:#fff;} .xptLeftNavNoGrid td {font-size:.91em;} .xptLeftNavNoGrid td.padded {padding:5px;} .xptLeftNavNoGrid td.heading {border-bottom:1px solid #ccc; color:#000; background-color:#eee; font-size:1.1em; font-weight:bold;} .xptLeftNavBelow {border-right:2px solid #ccc; border-bottom:2px solid #ccc; border-left:2px solid #ccc;} .xptLeftNavBelow td {background-color:#dbe7f2; font-size:.91em;} .labelError, .labelErrorLeft {color:#f00;} .dropDownListWidth {width:285px;} .questionPadding {padding-bottom:6px;} .label, .labelLeft, .labelError, .labelErrorLeft {padding-top:1px; font-weight:bold; text-align:right; vertical-align:text-top;} .formTable td.labelErrorIndicator label {padding-left:5px; background:url(images/asterisk_err.gif) no-repeat 0% 37%;} .formTable td.labelError, .formTable td.labelErrorIndicator {padding-top:1px; color:#f00;font-weight:bold; text-align:right; vertical-align:text-top;} .formTable td {padding-bottom:4px; font-weight:normal;} .formTable td input {vertical-align:top;} .formTable td.topSpacer {padding:0;} .formTable td.label, .formTable td.labelIndicator {vertical-align:text-top; text-align:right; font-weight:bold; padding-top:1px;} .formTable td.labelIndicator label {background:url(images/asterisk.gif) no-repeat; background-position:0% 37%; padding-left:5px;} .paddedHeaderBorder {border-color:#ccc; border-width:1px 0; border-style:solid; padding:5px; background-color:#f9f9f9; font-size:.91em; font-weight:normal;} .singleBorderLine {border-color:#ccc; border-width:1px 0 0 0; border-style:solid;} div.navContainer {width:146px; border:2px solid #ccc;} div.LeftNavFooter a {padding:0; background-color:#fff;} #selected a {margin:0; color:#000; background-color:#ffc; text-decoration:none;} #selected ul a {margin:0; color:#03c; background-color:#fff; text-decoration:underline;} a span.small {line-height:14pt;} a.noUnderLine {text-decoration:none} ul#vtRiskFilterList {margin-top:0; padding:0; list-style-type:none;} ul.listNoIndent {margin-left:0.5em; padding-left:1em;} .navContainer div.LeftNavHeader {width:141px; border-width:none; padding:5px 0 5px 5px; color:#000; background-color:#eee; font-size:1.1em; font-weight:bold; text-align:left;} .navContainer div.LeftNavFooter {width:146px; border-width:2px 0 0 0; border-style:solid; border-color:#ccc; padding:5px 0; color:#000; background-color:#fff; font-size:1.1em; font-weight:bold; text-align:center;} .navContainer a {display:block; width:146px; border:0; padding:5px; background-color:#fff;} .navContainer ul {margin:0; padding:0; list-style-type:none;} .navContainer li {margin:0;} .navContainer ul li.closedParentLevel1 a {width:126px; border-top:1px solid #ccc; padding:5px 5px 5px 15px; background:url(images/icon_closed_parent.gif) no-repeat 3px 8px;} .navContainer ul li.offLevel1 a {width:126px; border-top:1px solid #ccc; padding:5px 5px 5px 15px; background-image:none;} .navContainer ul li.openParentLevel1 a {width:126px; border-top:1px solid #ccc; padding:5px 5px 5px 15px; background:url(images/icon_open_parent.gif) no-repeat 3px 8px;} .navContainer ul li.onLevel1 a {width:126px; border-top:1px solid #ccc; padding:5px 5px 5px 15px; background-image:none; background-color:#fcc;} .navContainer ul ul li.closedParentLevel2 a {width:120px; border-top:0; padding:5px 5px 5px 21px; background:url(images/icon_closed_parent.gif) no-repeat 9px 8px;} .navContainer ul ul li.offLevel2 a {width:120px; border-top:0; padding:5px 5px 5px 21px; background-image:none;} .navContainer ul ul li.openParentLevel2 a {width:120px; border-top:0; padding:5px 5px 5px 21px; background:url(images/icon_open_parent.gif) no-repeat 9px 8px;} .navContainer ul ul li.onLevel2 a {width:120px; border-top:0; padding:5px 5px 5px 21px; background-image:none;} .navContainer ul ul ul li.closedParentLevel3 a {width:112px; border-top:0; padding:5px 5px 5px 29px; background:url(images/icon_closed_parent.gif) no-repeat 17px 8px;} .navContainer ul ul ul li.offLevel3 a {width:112px; border-top:0; padding:5px 5px 5px 29px; background:url(images/icon_bullet.gif) no-repeat 18px 8px;} .navContainer ul ul ul li.openParentLevel3 a {width:112px; border-top:0; padding:5px 5px 5px 29px; background:url(images/icon_open_parent.gif) no-repeat 17px 8px;} .navContainer ul ul ul li.onLevel3 a {width:114px; padding-left:26px; background:url(images/icon_bullet.gif) no-repeat 18px 8px;} .navContainer ul ul ul ul li.offLevel4 a {width:104px; padding:5px 5px 5px 37px; background:url(images/icon_bullet.gif) no-repeat 26px 8px;} .navContainer ul ul ul ul li.onLevel4 a {width:104px; border-top:0; padding:5px 5px 5px 37px; background:url(images/icon_bullet.gif) no-repeat 26px 8px;} .single * {background-image:none !important;} .alignMiddle {vertical-align:middle;} .accessAid {display:block !important; position:absolute !important; top:0 !important; left:-500em !important; overflow:hidden !important; text-indent:-9999em !important; line-height:0 !important; width:1px !important; height:1px !important;} .required {color:#f63;} .default {color:#000;} .defaultSmall {color:#000; font-size:.91em;} .inlineBlueSmall {color:#00f; font-size:.91em;} .optional {font-weight:normal;} .small {font-weight:normal;} .smallMediumGrey2 {color:#666; font-size:.91em; font-weight:normal;} .smallBlack {color:#000; font-size:.91em; font-weight:normal;} .smallDarkGrey2 {color:#999; font-size:.91em; font-weight:normal;} .smallWhite {color:#fff; font-size:.91em; font-weight:normal;} .smaller {font-size:.91em; font-weight:normal;} .smallerEmphasis {font-size:.91em; font-weight:bold;} .smallHighlight {color:#036; font-size:.91em; font-weight:normal;} .medium {font-size:1.167em; font-weight:normal;} .emphasis {font-weight:bold;} .italic {font-style:italic;} .emphasisWhite {color:#fff; font-weight:bold;} .emphasisHighlight {color:#036; font-weight:bold;} .smallEmphasis {font-weight:bold;} .smallEmphasisHighlight {color:#036; font-size:.91em; font-weight:bold;} .mediumEmphasis {font-size:1.167em; font-weight:bold;} .inactiveEmphasis {color:#999; font-size:.91em; font-weight:bold;} .activeEmphasis {color:#369; font-size:.91em; font-weight:bold;} .large {font-size:1.33em;} .extraLarge {font-size:2em;} .extraLargeEmphasis {font-size:2em; font-weight:bold;} .largeEmphasis {font-size:1.33em; font-weight:bold;} .caption {color:#369; font-size:.91em;} .superheading {color:#036; font-size:1.75em; font-weight:bold;} .subheading {color:#036; font-size:1.167em; font-weight:bold;} .subheadingClickthrough, .subheadingPopup {font-weight:bold;} .hidden {display:none; visibility:hidden;} .subheadingLightBlue {color:#369; font-size:1.1em; font-weight:bold;} .smallRed {color:#c60000; font-size:.91em; font-weight:normal;} .mediumRed {color:#c60000; font-size:1.1em; font-weight:normal;} .smallRedEmphasis {color:#c60000; font-size:.91em; font-weight:bold;} .inactive {color:#999; font-size:1.1em; font-weight:normal;} .plainBox {width:300px; height:20px; border:1px solid #999; padding-left:3px;} .digitBox {width:16px; height:20px; border:1px solid #999;} .largeBox {width:570px; border:1px solid #999; padding:4px;} .signatureBox {width:270px; height:80px; border:1px solid #999; padding:4px;} .addressBox, .zipBox {height:20px; border:1px solid #999; padding-left:3px;} .editableBox {height:20px; border:1px solid #999; padding-left:3px; background-color:#ffc;} .separationLine {background-color:#999;} .inlineRed {color:#f00;} .inlineBlue {color:#00f;} .inlinePayPalBlue {color:#369;} .inlineBlue1 {color:#ccc;} .inlineMediumGrey {color:#777;} .inlineMediumGrey2 {color:#666;} .inlineWhite {color:#fff;} .inlineGrey, .substepCompleted {color:#666;} .inlineDarkGrey {color:#aaa;} .inlineDarkGrey2 {color:#999;} .error {color:#f00;} .errorEmphasis {color:#f00; font-weight:bold;} .smallError {color:#f00; font-size:.91em;} .smallErrorEmphasis {color:#f00; font-weight:bold; font-size:.91em;} .savingsReportPadding {padding-left:27px;} .pipe {color:#ccc;} .inlineSubheadingBlue {color:#036;} .inlineYellowBg {background-color:#ffc;} .inlineLightGreyBg {background-color:#e6e6e6;} .inlineDisabled {color:#999;} .notificationBorder {background-color:#036;} .notificationBg {background-color:#eff7fe;} .messageBorderBlue {border:1px solid #036;} .hint {font-size:.91em;} .linkTypeSmall {color:#03c; font-size:.91em; font-weight:normal; text-decoration:underline;} .alignBottom {vertical-align:bottom;} .marginBottom {margin-bottom:3px;} .bulletsNoIndent {margin-left:1em; padding-left:1em;} .notificationBox {width:100%; border:1px solid #83a8CC; background-color:#eff7fe;} .alertBox {width:100%; border:1px solid #cccC33; background-color:#ffc;} .confirmationBox {width:100%; border:1px solid #cccC33; background-color:#ffc;} .openIssuesBox {width:100%; border:1px solid #CC9999; background-color:#fee;} .alertBoxCenter {width:100%; border:1px solid #cccC33; background-color:#ffc; text-align:center;} .saveInformationPadding {padding-left:153px;} .saveInformationPadding2 {padding-left:5px;} .saveInformationPadding3 {padding-left:156px;} .subtabtexton {color:#036; font-size:.91em; font-weight:bold; text-decoration:none;} .headerBorder {border:1px 0 solid #ccc; padding:5px; background-color:#f9f9f9; font-size:.91em;} .formsectionheader {border-top:2px dotted #999; padding-top:5px;} .floatRight {float:right; margin:5px 0 0 10px;} .verticalSpacerLow {height:5px;} .verticalSpacerMedium {height:10px;} .verticalSpacerHigh {height:20px;} .borderBoxType {border:1px solid #aaa; padding:2px;} .breadCrumbActive {color:#036; font-size:.91em; font-weight:bold; text-align:center;} .breadCrumbOff {color:#999; font-size:.91em; font-weight:bold; text-align:center;} .breadCrumbVisited {color:#909; font-size:.91em; font-weight:bold; text-align:center;} .waxLoginBG {color:#000; background-color:#FFF;} .ppWaxLoginBorder {background-color:#000;} .waxHeaderBG {background-color:#ccc;} .bcActive {color:#27537f; font-size:1.1em; font-weight:bold; text-align:center;} .bcOff {color:#606060; font-size:1.1em; text-align:center;} .bcVisited {color:#27537f; font-size:1.1em; text-align:center;} .bcLineActive {background-color:#27537f;} .bcLineOff {background-color:#b5b5b5;} .bcLineVisited {background-color:#27537f;} .textBackgroundHighlightEmphasis {padding:5px; background-color:#ff9; font-size:1.1em; font-weight:bold;} .waxLogin {color:#aaa;} .waxLoginBackground {color:#fff;} .waxTrustBox {height:120px; border:2px solid #aaa; padding:5px;} .pptextboldbghighlite {padding:5px; background-color:#ff9; font-size:1.1em; font-weight:bold;} table.formTable {width:100%;} table.tableDarkRoundBlueBorder {border:2px solid #009;} table.tableLightRoundBlueBorder {border-left:2px solid #83a8cc; border-right:2px solid #83a8cc;} table.tableDarkBlueTopBottom {border-top:2px solid #009; border-bottom:2px solid #009;} table.tableDarkGreyBackground {background-color:#aaa;} table.tableGreyBackground {background-color:#ccc;} table.tableBlackBorder {border-top:1px solid #000; border-left:1px solid #000; background-color:#fff;} table.tableBlackBorder td {border-bottom:1px solid #000; border-right:1px solid #000;} table.tableDarkGreyBorder {border-top:1px solid #aaa; border-left:1px solid #aaa; background-color:#fff;} table.tableDarkGreyBorder td {border-bottom:1px solid #aaa; border-right:1px solid #aaa;} table.tableDarkGreyBorderNoTD {border-left:1px solid #aaa;border-bottom:1px solid #aaa; border-right:1px solid #aaa; background-color:#fff;} table.tableDarkGreyDoubleBorder {border-top:2px solid #aaa; border-left:2px solid #aaa; border-bottom:1px solid #aaa; border-right:1px solid #aaa; background-color:#fff;} table.tableDarkGreyDoubleBorder td {border-bottom:1px solid #aaa; border-right:1px solid #aaa;} table.tableDarkGreyBorderless {border-top:1px solid #aaa; border-left:1px solid #aaa; border-right:1px solid #aaa; background-color:#fff;} table.tableDarkGreyBorderless td {border-bottom:1px solid #aaa;} table.tableDarkGreyOutsideBorder {border:1px solid #aaa;} table.tableGreyBorder {border-top:1px solid #ccc; border-left:1px solid #ccc; background-color:#fff;} table.tableGreyBorder td {border-bottom:1px solid #ccc; border-right:1px solid #ccc;} table.tableGreyOutsideBorder {border:1px solid #ccc;} table.tableLightGreyBorder {border-top:1px solid #eee; border-left:1px solid #eee; background-color:#fff;} table.tableLightGreyBorder td {border-bottom:1px solid #eee; border-right:1px solid #eee;} table.tableLightBlueBorder {border:1px solid #dbe7f2; background-color:#fff;} table.tableGreenBorder {border:1px solid #DBEBE1; background-color:#fff;} table.tableNoBorder {border:0; background-color:#fff;} table.tableNoBorder td {border:0;} table.tableBlueBorder {border-top:1px solid #369; border-left:1px solid #369;} table.tableYellowBorder {border-top:1px solid #cc0; border-left:1px solid #cc0; background-color:#ffc;} table.tableYellowBorder td {border-bottom:1px solid #cc0; border-right:1px solid #cc0;} table.tableYellowBorderWhiteBG {border-top:1px solid #cc0; border-left:1px solid #cc0; background-color:#fff;} table.tableYellowBorderWhiteBG td {border-bottom:1px solid #cc0; border-right:1px solid #cc0;} table.tableDarkBlueBorder {border:10px solid #369; background-color:#fff;} table.tableTransparentBorder {border:0;} table.tableTransparentBorder td {border-bottom:none; border-right:none;} table.tableOrangeBorder {border:2px solid #fc9;} table.tableDarkOrangeBorder {border:2px solid #f60;} table.tableResCenter {border-top:1px solid #aaa; border-left:1px solid #aaa; background-color:#fff; border-right:1px solid #aaa;} table.tableResCenter td {border-bottom:1px solid #aaa;} table.tableContactInfo {border:1px solid #fc0; background-color:#fffde9;} table.tableDarkYellowBorder {border:2px solid #fc0; background-color:#fff;} table.TableBorderonlyforHowTo {border-left:1px solid #D0E0CB;border-bottom:1px solid #D0E0CB; border-right:1px solid #D0E0CB; background-color:#fff;} table.TableBorderonlyforTools {border-left:1px solid #E7C693;border-bottom:1px solid #E7C693; border-right:1px solid #E7C693; background-color:#fff;} table.TableBorderonlyforAlert {border-left:1px solid #F8E7AA;border-bottom:1px solid #F8E7AA; border-right:1px solid #F8E7AA; background-color:#fff;} table.TableBorderonlyforTips {border-left:1px solid #E0E2ED;border-bottom:1px solid #E0E2ED; border-right:1px solid #E0E2ED; background-color:#fff;} table.TableBorderonlyforAnnouncements {border-left:1px solid #EBE7CB;border-bottom:1px solid #EBE7CB; border-right:1px solid #EBE7CB; background-color:#fff;} table tr td.refund {margin-left:5px; color:#000; font-size:1.1em; white-space:nowrap;} tr.tableRowDarkGrey {background-color:#aaa;} tr.tableRowGrey {background-color:#ccc;} tr.tableRowLightGrey {background-color:#eee;} tr.tableRowLighterGrey {background-color:#f6f6f6;} tr.tableRowWhite {background-color:#fff;} tr.tableRowLightBlue {background-color:#cde;} tr.tableRowDarkBlue {background-color:#369;} tr.tableRowDarkerBlueHeading, tr.tableRowLightBlueHeading, tr.tableRowLightGreyHeading, tr.tableRowGreyHeading, td.tableCellHeadingSmall, td.tableCellRegularSmallBold {font-size:.91em; font-weight:bold;} tr.tableRowDarkerBlueHeading {background-color:#036;} tr.tableRowLightBlueHeading {background-color:#cde;} tr.tableRowLightGreyHeading {background-color:#eee;} tr.tableRowGreyHeading {background-color:#ccc;} tr.tableRowOrange {background-color:#fc9;} td.tableCellHeading {font-size:1.1em; font-weight:bold;} td.tableCellRegular {font-size:1.1em; font-weight:normal;} td.tableCellRegularSmall {font-size:.91em; font-weight:normal;} td.tableCellRegularBold {font-size:1.1em; font-weight:bold;} td.TableCellYellow {background-color:#ffc;} td.TableCellSmallYellow {background-color:#fffdca; font-size:.91em; font-weight:normal;} td.TableCellSmall {background-color:#fff; font-size:.91em; font-weight:normal;} td.TableCellGrey {background-color:#eee;} td.oneThirdRow {width:183px;} td.twoThirdRow {width:386px;} td.fullRow {width:589px;} td.oneHalfRow {width:284px;} td.leftNav {width:150px;} td.spacer, td.spacerOneHalfRowNoLeftNav {width:20px;} td.spacerNav, td.spacerOneHalfRow {width:21px;} td.oneThirdRowNoLeftNav {width:240px;} td.twoThirdRowNoLeftNav {width:500px;} td.fullRowNoLeftNav {width:760px;} td.oneHalfRowNoLeftNav {width:370px;} td.tableCellLightBlueSmallBold {background-color:#cde; font-size:.91em; font-weight:bold;} td.TableCellLightYellow {background-color:#fffde9;} td.bgMediumHeaderBox, td.bgMediumHeaderNavBox {padding:1px 10px 6px 10px; color:#fff; background-color:#83a8cc; font-size:1.1em; font-weight:bold;} td.bgMediumBox {background-color:#83a8cc;} td.bgSubheadingMediumHeaderBox, td.bgSubheadingMediumHeaderNavBox {padding:1px 10px 6px 10px; color:#fff; background-color:#83a8cc; font-size:1.167em; font-weight:bold;} td.bgSubheadingMediumBox {background-color:#83a8cc;} td.bgLightHeaderBox, td.bgLightHeaderBoxBlk {padding:5px 10px 6px 10px; color:#000; background-color:#dbe7f2; font-size:1.1em; font-weight:bold;} td.bgLightBox {background-color:#dbe7f2;} td.bgMediumHeader4 {padding:5px 10px 6px 5px; color:#fff; background-color:#83a8cc; font-size:1.1em; font-weight:bold;} td.bgMediumHeader4LP {padding:5px 10px 6px 14px; color:#fff; background-color:#83a8cc; font-size:1.1em; font-weight:bold;} td.bgMediumBox4 {background-color:#83a8cc;} td.bgMediumHeader5 {padding-top:5px; padding-bottom:6px; color:#fff; background-color:#83a8cc; font-size:1.1em; font-weight:bold;} td.bgMediumHeader5LP {padding-top:5px; padding-bottom:6px; padding-left:14px; color:#fff; background-color:#83a8cc; font-size:1.1em; font-weight:bold;} td.bgLightHeaderBlueTxt {padding:5px 10px 6px 10px; color:#369; background-color:#ebf1f7; font-size:1.1em; font-weight:bold;} td.bgLightHeaderBlueTxt5 {padding-top:5px; padding-bottom:6px; color:#369; background-color:#ebf1f7; font-size:1.1em; font-weight:bold;} td.bgLightHeaderGreyTxt5 {padding-top:5px; padding-bottom:6px; color:#999; background-color:#ebf1f7; font-size:1.1em; font-weight:bold;} td.bgLightGreyTxt5Small {padding-top:5px; padding-bottom:6px; color:#999; background-color:#ebf1f7; font-size:.91em;} td.demoBlueTop {border-top:1px solid #999; background-color:#cbdbe8;} td.demoWhiteTop {border-top:1px solid #d6d6d6; background-color:#fff;} td.demoBlueHeader {border-bottom:1px solid #999; border-left:1px solid #999; border-right:1px solid #999; padding-left:20px; padding-bottom:8px; color:#036; background-color:#cbdbe8; font-weight:bold;} td.demoWhiteHeader {border-bottom:1px solid #d6d6d6; border-left:1px solid #d6d6d6; border-right:1px solid #d6d6d6; padding-left:20px; padding-bottom:8px; color:#036; background-color:#fff; font-weight:bold;} td.demoBlueBody {border-left:1px solid #999; border-right:1px solid #999; padding-top:8px; padding-right:10px; padding-left:15px; background-color:#cbdbe8;} td.demoWhiteBody {border-left:1px solid #d6d6d6; border-right:1px solid #d6d6d6; padding-left:15px; padding-right:10px; padding-top:8px; background-color:#fff;} td.demoBlueBottom {border-bottom:1px solid #999; background-color:#cbdbe8;} td.demoWhiteBottom {border-bottom:1px solid #d6d6d6; background-color:#fff;} #historyMiniLog table {border-collapse:collapse;} #historyMiniLog .tableHeader {padding:4px; background-color:#eee; font-size:1.1em;} #historyMiniLog .columnHeader {border:1px solid #aaa; padding:4px; background-color:#cde; font-size:.91em; font-weight:bold;} #historyMiniLog td {border:1px solid #aaa; padding:4px; font-size:.91em; vertical-align:top;} #historyMiniLog .summaryLeft, #historyMiniLog .summaryRight, #historyMiniLog .summaryMiddle {padding:4px; background-color:#fff; font-size:.91em;} #historyMiniLog .summaryLeft {border-right:0; border-left:1px solid #aaa;} #historyMiniLog .summaryRight {border-right:1px solid #c0c0c0; border-left:0;} #historyMiniLog .summaryMiddle {border-right:0; border-left:0;} #historyMiniLog .tableHeader .greyBg {border:0; padding:0; background-color:#eee; font-size:1.1em;} #historyMiniLog .rightcontent{margin-left: 5px;} #inlineGrey td {color:#999;} #currencylabel input.readonly_currency {width:10px; border:0; padding:0; text-align:right;} .tableLightBlueMediumBorder {border-left:2px solid #83a8cc; border-right:2px solid #83a8cc; padding-top:5px; padding-bottom:5px;} .tableLightBlueMediumBorderLeft {border-left:2px solid #83a8cc; padding-top:0; padding-bottom:0;} .tableLightBlueMediumBorderRight {border-right:2px solid #83a8cc; padding-top:0; padding-bottom:0;} .tableLightBlueMediumBorderBottom {border-bottom:2px solid #83a8cc; padding-top:10px; padding-bottom:0;} .tableLightBlueBorder {border-left:2px solid #83a8cc; border-right:2px solid #83a8cc;} .tableLightBlueBorderLP {border-left:2px solid #83a8cc; border-right:2px solid #83a8cc; padding-left:22px;} .tableLightBlueBorderBottom {border-bottom:2px solid #83a8cc;} .tableCellMediumYellow {background-color:#fffcd6;} .tableNoPadding {padding-top:0; padding-bottom:0;} .tableLeftPadding {padding-left:30px;} .demoBodyText {color:#000; font:.91em Arial;} .demoBodyTextBold {color:#000; font:bold .91em Arial;} .borderBoxType td.spacerGrey {border:1px solid #aaa; padding:0;} .ebayEmphasis {font-weight:bold;} .ebayLargeEmphasis {font-weight:bold;font-size:1.33em;} .ebayText {font-size:1.1em;} .ebaySmall {color:#666; font-size:.91em; font-weight:normal;} .ebaySmallEmphasis {color:#600; font-size:.91em; font-weight:bold;} .ebayErrorEmphasis {color:red; font-weight:bold;} .packingSlip {width:560px; border:1px solid #e2e0e0;} .listHeading {border-bottom:thin solid #e2e0e0; padding-top:3px; padding-bottom:4px; font-size:.91em; font-weight:bold; text-align:right; vertical-align:text-top;} .homeInput {width:120px; font-size:.91em; font-weight:normal;} .itemdesc{width:760px;} .green{color:#0a0;} .orange{color:#f90;} .merchantFeatureBgColor {background-color:#e9e6d1;} .smallFontTable td {font-weight:normal;} .table4Boxes .headerColor {background-color:#eee;} .table4Boxes .border {background-color:#e3e3e3;} .bcupsellbox {border:1px solid #ccc; padding:3px; background-color:#ffc; font-size:.91em;} .bcupsellbox td {color:#000;} .bcupsellbox td.smallEmphasis {color:#000;} .bcupsellbox td.small {color:#000;} .bcupsellbox span.smaller {color:blue;} .bcupsellbox a {color:blue;} .bcterms {width:760px; height:160px; overflow:scroll; margin-bottom:10px; border:1px solid #666;} .invoice_note {width:600px; margin-top:10px; margin-bottom:10px;} .invoice {width:600px; border-collapse:collapse; border:1px solid #aaa;} .invoice td {border:1px solid #ccc; padding:2px; font-size:.91em;} .invoice tr.title td {background-color:#cde; font-weight:bold; text-align:left; line-height:20px;} .invoice td.currency {border-right:1px solid #fff;} .invoice td.calc {font-weight:bold; text-align:left;} .currency_highlight {background-color:#ffc;} .tax {float:left; font-weight:normal;} /* Rosetta Styles - Modifications to Rosetta.css is not allowed any more */ #rosetta {border:none; padding:0pt; position:absolute; top:40px; left:490px; z-index:11; width:250px; text-align:right;} #rosetta fieldset {margin:0; border:0; padding:0;} #rosetta legend {display:block; position:absolute; top:0; left:-500em; width:1px; height:1px; overflow:hidden; text-indent:-9999em; line-height:0;} #rosetta label {display:none;} #rosetta button {border:none; padding:0; background:none; vertical-align:top;} /* Rosetta js drop down styles */ #html-rosetta-container{position:absolute;height:1em;width:11em;right:0;z-index:11;} #html-rosetta{background:#fff;position:absolute;right:.7em;top:3.7em;width:11em;font-size:.9em;z-index:11;} #html-rosetta p{text-align:right;text-decoration:underline;cursor:pointer;color:#084482;margin:0;padding-right:1.1em;background:url(images/icon_dropdown.gif) 100% .6em no-repeat;} #html-rosetta ul{width:10.8em;border:1px solid #ccc;margin:.4em 0 0;padding:.2em 0;position:absolute;bottom:0;} #html-rosetta li{list-style-type:none;margin:0;} #html-rosetta li a,#html-rosetta li a:visited{display:block;padding:.2em .7em;color:#000;text-decoration:none;zoom:1;} #html-rosetta li a:hover{background:#084482;color:#fff;} #html-rosetta div{position:relative;height:0;margin-top:.3em;overflow:hidden;} /* Lightbox Styles - Modification to Lightbox.css is not allowed any more */ .yui-overlay {display:block; position:absolute;} .mask {display:none; position:absolute; top:0; left:0; z-index:1000; background-color:#fff; opacity:.80; -moz-opacity:0.8; filter:alpha(opacity=80);} .yui-panel-container {position:absolute !important; z-index:1015; visibility:hidden; overflow:visible; width:440px; background-color:transparent;} .yui-panel-container.shadow {padding:0; background-color:transparent;} .yui-panel-container.shadow .underlay {position:absolute; top:3px; left:3px; z-index:0; visibility:inherit; width:100%; height:100%; background-color:#000; opacity:.30; -moz-opacity:0.3; filter:alpha(opacity=30);} .yui-panel {position:relative; top:0; left:0; z-index:1016; visibility:hidden; overflow:hidden; border:1px solid #369; border-collapse:separate; padding:30px 20px 0 20px; background:#fff url(/en_US/i/pui/lightbox/bg.gif) left bottom repeat-x; color:#333; font:12px/normal Arial, Helvetica, sans-serif;} .yui-panel .messageBox {min-height:48px; margin:1em 0; padding:0 15px 0 50px; background-color:#ffc; background-position:12px 12px;} .yui-panel .messageBox.notification {background-image:url(images/icon_notification.gif);} .yui-panel .messageBox.confirmation {background-image:url(images/icon_confirmation.gif);} .yui-panel .messageBox.error {background-image:url(images/icon_critalert.gif);} .yui-panel .messageBox.alert {background-image:url(images/icon_noncritalert.gif);} .lightbox .yui-panel .header, .lightbox .yui-panel .header * {margin:0; padding:0; background-color:#fff; font-weight:bold;} .lightbox .yui-panel .header * {padding-bottom:.3em; background:url(images/hdr_bg.gif) bottom left repeat-x;} .lightbox .yui-panel .body {overflow:hidden; margin-bottom:20px;} .lightbox .yui-panel .body p {margin:1em 0;} .lightbox .yui-panel .container-close {position:absolute; top:5px; right:5px; z-index:1006; visibility:inherit; width:15px; height:15px; margin:0; padding:0; background:url(images/close.gif) no-repeat; cursor:pointer; text-indent:-1000em;} .lightbox .yui-panel .body .buttons {text-align:right;} .lightbox .yui-panel .footer {border-top:1px solid #dedede; padding:8px 0 12px 0; color:#757575; font-size:11px;} .lightbox .yui-panel .footer .paypal {display:block; float:left; width:49px; height:15px; margin-right:.5em; background:url(images/logo.gif) 0 0 no-repeat;} .lightbox .yui-panel .footer .paypal span {display:block; position:absolute; top:0; left:-500em; width:1px; height:1px; overflow:hidden; text-indent:-9999em; line-height:0;} .lightbox .yui-panel .footer .secure {margin-bottom:4px; padding-left:15px; background:url(images/icon_lock.gif) 2px 50% no-repeat;} .lightboxMarkup {display:none;} .yui-panel button, .yui-panel input.button {width:auto !important; margin-left:.9em; border:1px solid #bfbfbf; border-right-color:#908d8d; border-bottom-color:#908d8d; padding:1px .5em; background:#e1e1e1 url(images/btn_bg_default.gif) left center repeat-x; color:#000;} .yui-panel button:active, .yui-panel input.button:active {border:1px solid #908d8d; border-right-color:#afafaf; border-bottom-color:#afafaf;} .yui-panel button:hover, .yui-panel input.button:hover {cursor:pointer;} .yui-panel button.primary, .yui-panel input.button.primary {border:1px solid #d5bd98; border-right-color:#935e0d; border-bottom-color:#935e0d; background:#ffa822 url(images/btn_bg_submit.gif) left center repeat-x;} .yui-panel button.primary:active, .yui-panel input.button.primary:active {border:1px solid #935e0d; border-right-color:#d5bd98; border-bottom-color:#d5bd98;} .yui-panel button[disabled=disabled]{border:1px solid #ccc; background:#eee; color:#b3b3b3;} .yui-panel button[disabled=disabled]:hover {cursor:default;} .yui-panel button.disabled, .yui-panel input.button.disabled {border:1px solid #ccc; background:#eee; color:#b3b3b3;} .yui-panel button.disabled:hover, .yui-panel input.button.disabled:hover {cursor:default;} /* Tooltips and Balloon Callouts */ .autoTooltip {cursor:pointer;} .tt {z-index:16; width:250px; margin:0; padding:0; line-height:15px;} .tt .header {position:absolute; top:-999px; left:-999px;} .tt .body, .tt .bd {padding:5px;} .balloonCallout .body {padding:10px 15px;} .ttPosUnder {padding:13px 0 0 0; background:url(images/tooltip_top_left.gif) left top no-repeat;} .ttPosUnder .body, .ttPosUnder .bd {border:1px solid #666; border-top-width:0; padding:12px 17px 10px 8px; background:#ffffe5;} .ttPosOver {padding:0 0 13px 0; background:url(images/tooltip_bottom_left.gif) left bottom no-repeat;} .ttPosOver .body, .ttPosOver .bd {border:1px solid #666; border-bottom-width:0; padding:8px 17px 12px 8px; background:#ffffe5;} .balloonControl {border-bottom:1px dashed #084482; text-decoration:none;} .balloon {z-index:1016; width:250px; margin:0; padding:0; line-height:15px;} .balloon .yui-panel {border:none;} .balloon .header {position:absolute; top:-999px; left:-999px;} .balloon .body {padding:10px 15px;} .balloon .posUnder {padding:13px 0 0 0; background:url(images/tooltip_top_left.gif) left top no-repeat;} .balloon .posUnder .body {border:1px solid #666; border-top-width:0; padding:12px 17px 10px 8px; background:#ffffe5;} .balloon .posOver {padding:0 0 13px 0; background:url(images/tooltip_bottom_left.gif) left bottom no-repeat;} .balloon .posOver .body {border:1px solid #666; border-bottom-width:0; padding:8px 17px 12px 8px; background:#ffffe5;} /* Tabbed Cardstack */ .cardstack, .cardstack .card {margin:1em 0;} .cardstack ol.tabs {z-index:1; position:relative; overflow:auto; margin:0 0 -1px 0; list-style-type:none;} .cardstack ol.tabs li {float:left; margin:.4em 0 0 4px; border:1px solid #ccc; padding:.4em .9em .4em .9em; background:#ddd url(images/tab_bg.gif) top left repeat-x;} .cardstack ol.tabs li a:hover, .cardstack ol.tabs li a:active {text-decoration:underline;} .cardstack ol.tabs li a span {display:block; margin-top:1px; color:#666; font-size:1em; text-decoration:none !important;} .cardstack ol.tabs li.top {margin-top:0; border-bottom:1px solid #fff; padding-top:.8em; background:#fff;} .cardstack ol.tabs li.top a {color:#333; font-weight:bold; text-decoration:none; cursor:default;} .cardstack.vertical ol.tabs {float:left; width:20%;} .cardstack.vertical ol.tabs li {float:none; margin:0; border:none; border-top:1px solid #fff; border-bottom:1px solid #ccc; padding:.45em .9em .65em .6em; background:none;} .cardstack.vertical ol.tabs li a {color:#083772; font-size:1.167em;} .cardstack.vertical ol.tabs li a span {font-size:.9em;} .cardstack.vertical ol.tabs li.top {border:none; padding:.55em .9em .55em .6em; background:#fff;} .cardstack.vertical ol.tabs li.top span {color:#333; font-weight:normal;} .cardstack.vertical ol.tabs li.first, .cardstack.vertical ol.tabs li.next {border-top:none;} .cardstack.vertical ol.tabs li.last, .cardstack.vertical ol.tabs li.previous {border-bottom:none;} .cardstack.stacked h2 {position:absolute; top:0; left:-500em; width:1px; height:1px; overflow:hidden; text-indent:-9999em; line-height:0;} .cardstack.stacked .card, .cardstack.stacked .header {position:absolute; top:0; left:-999em; margin:0;} .cardstack.stacked .card.top {position:relative; top:0; left:0; border:1px solid #ccc;} .cardstack.stacked .top .body p, .cardstack.stacked .top .body div, .cardstack.stacked .top .body ul, .cardstack.stacked .top .body ol {margin:.9em;} .cardstack.stacked.vertical {overflow:hidden; border:1px solid #ccc; padding:5px; background:#e8f1fa;} .cardstack.stacked.vertical .card {float:left; width:80%;} .cardstack.stacked.vertical .card.top {float:left; border:none; background:#fff;} .cardstack.stacked.vertical .card.top .header {position:static !important; height:.01em; overflow:hidden;} .cardstack.stacked.vertical .top .body {padding:0 .1em;} /* PPLite Widget Styles */ div#pplite.loading {height:inherit; background: #fff url(images/icon_animated_prog_42wx42h.gif) no-repeat center; } div#pplite_c.lightbox div#pplite.loading {padding-top:212px;} div#pplite_c {width:300px;} div#pplite_c.lightbox{width:400px;} div#pplite.yui-panel div#countryLang select {margin-top:5px; width:100%;} fieldset#rosetta .flag {display:inline; } fieldset#rosetta .flag img {top:3px; right:3px; position:relative;} a#widgetOpener {display:inline; font-size:0.9em; text-decoration:none;} div#pplite div#countryLang div.header {display:none;} div#pplite_c.lightbox div#countryLang div.header {display:block; margin-bottom:1em;} div#pplite_c.lightbox div.underlay {height:100%;} a#widgetOpener img {padding-left:5px; padding-bottom:3px;} a#widgetOpener span {text-decoration:underline;} div#pplite_c.lightbox div.yui-panel {padding:30px 100px 0 20px;} div#pplite.yui-panel .container-close {position:absolute; top:5px; right:5px; z-index:6; visibility:inherit; width:15px; height:15px; margin:0; padding:0; background:url(images/close.gif) no-repeat; cursor:pointer;} div#pplite div#ppliteMain p {margin:1em 0pt; } div#pplite div#ppliteMain input.button {margin-left:0pt;} .acResults { z-index:12; position:absolute; overflow:hidden; background-color:#fff; border:1px solid #ccc; } .acResults ul { overflow-y:auto; margin:0; padding:0; list-style:none; } .acResults li { margin:0; padding:4px; } .acResults li.active { background-color:#fec; cursor:pointer; } span.buttonAsLink {text-decoration:underline; color:#084482;} span.buttonAsLink input {text-align:left; margin:0; padding:0; height:1.4em; color:#084482; background-color:transparent; text-decoration:underline; border:none; cursor:pointer; overflow:visible} span.buttonAsLink.disable{color:#ccc;} span.buttonAsLink.disable input.disable{color:#ccc; cursor:default;} span.buttonAsLink input.small {width:auto;} span.buttonAsLink input::-moz-focus-inner {padding:0;} .show {display:block !important;} .hide {display:none !important;} /*class named clear similar to one present in global.css*/ .clear {clear:both !important;} .cvv2_label {vertical-align: middle; padding-top: 7px;} td.add-new-category { text-align: right; padding: 10px 0; } table.user-detail { border-spacing: 3px; } label { font-size: 11px; } p.notice { color: red; }
kitsudo1412/AngularExchange
src/admin/template/admin-template.css
CSS
gpl-3.0
66,343
/* Copyright (C) 2013 by Maxim Biro <nurupo.contributions@gmail.com> Copyright © 2014-2017 by The qTox Project Contributors This file is part of qTox, a Qt-based graphical interface for Tox. 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. qTox 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 qTox. If not, see <http://www.gnu.org/licenses/>. */ #ifndef CORE_HPP #define CORE_HPP #include "toxfile.h" #include "toxid.h" #include <tox/tox.h> #include <QMutex> #include <QObject> #include <functional> class CoreAV; class ICoreSettings; class GroupInvite; class Profile; class QTimer; enum class Status { Online = 0, Away, Busy, Offline }; class Core : public QObject { Q_OBJECT public: Core(QThread* coreThread, Profile& profile, const ICoreSettings* const settings); static Core* getInstance(); const CoreAV* getAv() const; CoreAV* getAv(); ~Core(); static const QString TOX_EXT; static QStringList splitMessage(const QString& message, int maxLen); QString getPeerName(const ToxPk& id) const; QVector<uint32_t> getFriendList() const; uint32_t getGroupNumberPeers(int groupId) const; QString getGroupPeerName(int groupId, int peerId) const; ToxPk getGroupPeerPk(int groupId, int peerId) const; QStringList getGroupPeerNames(int groupId) const; ToxPk getFriendPublicKey(uint32_t friendNumber) const; QString getFriendUsername(uint32_t friendNumber) const; bool isFriendOnline(uint32_t friendId) const; bool hasFriendWithPublicKey(const ToxPk& publicKey) const; uint32_t joinGroupchat(const GroupInvite& inviteInfo) const; void quitGroupChat(int groupId) const; QString getUsername() const; Status getStatus() const; QString getStatusMessage() const; ToxId getSelfId() const; ToxPk getSelfPublicKey() const; QPair<QByteArray, QByteArray> getKeypair() const; bool isReady() const; void callWhenAvReady(std::function<void(CoreAV* av)>&& toCall); void sendFile(uint32_t friendId, QString filename, QString filePath, long long filesize); public slots: void start(const QByteArray& savedata); void reset(); void process(); void bootstrapDht(); QByteArray getToxSaveData(); void acceptFriendRequest(const ToxPk& friendPk); void requestFriendship(const ToxId& friendAddress, const QString& message); void groupInviteFriend(uint32_t friendId, int groupId); int createGroup(uint8_t type = TOX_CONFERENCE_TYPE_AV); void removeFriend(uint32_t friendId, bool fake = false); void removeGroup(int groupId, bool fake = false); void setStatus(Status status); void setUsername(const QString& username); void setStatusMessage(const QString& message); int sendMessage(uint32_t friendId, const QString& message); void sendGroupMessage(int groupId, const QString& message); void sendGroupAction(int groupId, const QString& message); void changeGroupTitle(int groupId, const QString& title); int sendAction(uint32_t friendId, const QString& action); void sendTyping(uint32_t friendId, bool typing); void sendAvatarFile(uint32_t friendId, const QByteArray& data); void cancelFileSend(uint32_t friendId, uint32_t fileNum); void cancelFileRecv(uint32_t friendId, uint32_t fileNum); void rejectFileRecvRequest(uint32_t friendId, uint32_t fileNum); void acceptFileRecvRequest(uint32_t friendId, uint32_t fileNum, QString path); void pauseResumeFileSend(uint32_t friendId, uint32_t fileNum); void pauseResumeFileRecv(uint32_t friendId, uint32_t fileNum); void setNospam(uint32_t nospam); signals: void connected(); void disconnected(); void friendRequestReceived(const ToxPk& friendPk, const QString& message); void friendMessageReceived(uint32_t friendId, const QString& message, bool isAction); void friendAdded(uint32_t friendId, const ToxPk& friendPk); void requestSent(const ToxPk& friendPk, const QString& message); void friendStatusChanged(uint32_t friendId, Status status); void friendStatusMessageChanged(uint32_t friendId, const QString& message); void friendUsernameChanged(uint32_t friendId, const QString& username); void friendTypingChanged(uint32_t friendId, bool isTyping); void friendAvatarChanged(uint32_t friendId, const QPixmap& pic); void friendAvatarRemoved(uint32_t friendId); void friendRemoved(uint32_t friendId); void friendLastSeenChanged(uint32_t friendId, const QDateTime& dateTime); void emptyGroupCreated(int groupnumber); void groupInviteReceived(const GroupInvite& inviteInfo); void groupMessageReceived(int groupnumber, int peernumber, const QString& message, bool isAction); void groupNamelistChanged(int groupnumber, int peernumber, uint8_t change); void groupTitleChanged(int groupnumber, const QString& author, const QString& title); void groupPeerAudioPlaying(int groupnumber, int peernumber); void usernameSet(const QString& username); void statusMessageSet(const QString& message); void statusSet(Status status); void idSet(const ToxId& id); void messageSentResult(uint32_t friendId, const QString& message, int messageId); void groupSentResult(int groupId, const QString& message, int result); void actionSentResult(uint32_t friendId, const QString& action, int success); void receiptRecieved(int friedId, int receipt); void failedToAddFriend(const ToxPk& friendPk, const QString& errorInfo = QString()); void failedToRemoveFriend(uint32_t friendId); void failedToSetUsername(const QString& username); void failedToSetStatusMessage(const QString& message); void failedToSetStatus(Status status); void failedToSetTyping(bool typing); void failedToStart(); void badProxy(); void fileSendStarted(ToxFile file); void fileReceiveRequested(ToxFile file); void fileTransferAccepted(ToxFile file); void fileTransferCancelled(ToxFile file); void fileTransferFinished(ToxFile file); void fileUploadFinished(const QString& path); void fileDownloadFinished(const QString& path); void fileTransferPaused(ToxFile file); void fileTransferInfo(ToxFile file); void fileTransferRemotePausedUnpaused(ToxFile file, bool paused); void fileTransferBrokenUnbroken(ToxFile file, bool broken); void fileSendFailed(uint32_t friendId, const QString& fname); private: static void onFriendRequest(Tox* tox, const uint8_t* cUserId, const uint8_t* cMessage, size_t cMessageSize, void* core); static void onFriendMessage(Tox* tox, uint32_t friendId, TOX_MESSAGE_TYPE type, const uint8_t* cMessage, size_t cMessageSize, void* core); static void onFriendNameChange(Tox* tox, uint32_t friendId, const uint8_t* cName, size_t cNameSize, void* core); static void onFriendTypingChange(Tox* tox, uint32_t friendId, bool isTyping, void* core); static void onStatusMessageChanged(Tox* tox, uint32_t friendId, const uint8_t* cMessage, size_t cMessageSize, void* core); static void onUserStatusChanged(Tox* tox, uint32_t friendId, TOX_USER_STATUS userstatus, void* core); static void onConnectionStatusChanged(Tox* tox, uint32_t friendId, TOX_CONNECTION status, void* core); static void onGroupInvite(Tox* tox, uint32_t friendId, TOX_CONFERENCE_TYPE type, const uint8_t* cookie, size_t length, void* vCore); static void onGroupMessage(Tox* tox, uint32_t groupId, uint32_t peerId, TOX_MESSAGE_TYPE type, const uint8_t* cMessage, size_t length, void* vCore); static void onGroupNamelistChange(Tox* tox, uint32_t groupId, uint32_t peerId, TOX_CONFERENCE_STATE_CHANGE change, void* core); static void onGroupTitleChange(Tox* tox, uint32_t groupId, uint32_t peerId, const uint8_t* cTitle, size_t length, void* vCore); static void onReadReceiptCallback(Tox* tox, uint32_t friendId, uint32_t receipt, void* core); void sendGroupMessageWithType(int groupId, const QString& message, TOX_MESSAGE_TYPE type); bool parsePeerQueryError(TOX_ERR_CONFERENCE_PEER_QUERY error) const; bool parseConferenceJoinError(TOX_ERR_CONFERENCE_JOIN error) const; bool checkConnection(); void checkEncryptedHistory(); void makeTox(QByteArray savedata); void makeAv(); void loadFriends(); void checkLastOnline(uint32_t friendId); void deadifyTox(); QString getFriendRequestErrorMessage(const ToxId& friendId, const QString& message) const; private slots: void killTimers(bool onlyStop); private: Tox* tox; CoreAV* av; QTimer* toxTimer; Profile& profile; QMutex messageSendMutex; bool ready; const ICoreSettings* const s; std::vector<std::function<void(CoreAV* av)>> toCallWhenAvReady; static QThread* coreThread; friend class Audio; ///< Audio can access our calls directly to reduce latency friend class CoreFile; ///< CoreFile can access tox* and emit our signals friend class CoreAV; ///< CoreAV accesses our toxav* for now }; #endif // CORE_HPP
noavarice/qTox
src/core/core.h
C
gpl-3.0
9,867
<!DOCTYPE html> <html lang="es"> <head> <meta charset="utf-8"> <!-- =================================================================================================== Instituto Municipal de Planeación y Competitividad (IMPLAN) de Torreón. 3er. generación de la Plataforma del Conocimiento Desarrollado por Ing. Guillermo Valdés Lozano <guivaloz en movimientolibre.com> El software que lo construye está bajo la licencia GPL versión 3. © 2014, 2015, 2016, 2017. Una copia está contenida en el archivo LICENCE al bajar desde GitHub. Al usar, estudiar y copiar está aceptando los términos de uso de la información y del sitio web: http://www.trcimplan.gob.mx/terminos/terminos-informacion.html http://www.trcimplan.gob.mx/terminos/terminos-sitio.html Descargue, estudie y colabore bajando todo este sitio web: IMPLAN Torreón https://github.com/TRCIMPLAN/trcimplan.github.io Agradecemos y compartimos las tecnologías abiertas y gratuitas sobre las que se basa: PHP http://php.net Twitter Bootstrap http://getbootstrap.com StartBootStrap http://startbootstrap.com Morris.js https://morrisjs.github.io/morris.js/ Font Awesome http://fontawesome.io DataTables https://www.datatables.net Carto https://carto.com GitHub https://github.com =================================================================================================== --> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="Durante la Onceava Sesión del Consejo Directivo, el Instituto de Planeación y Competitividad de Torreón presentó los resultados obtenidos durante este año y los proyectos que se tienen planeados para el 2019."> <meta name="author" content="Lic. Maira Ivonne Flores Reyes"> <meta name="keywords" content="IMPLAN, Torreon"> <meta name="twitter:card" content="summary"> <meta name="twitter:title" content="IMPLAN presenta resultados anuales y programas de trabajo para el 2019. - IMPLAN Torreón"> <meta name="twitter:description" content="Durante la Onceava Sesión del Consejo Directivo, el Instituto de Planeación y Competitividad de Torreón presentó los resultados obtenidos durante este año y los proyectos que se tienen planeados para el 2019."> <meta name="twitter:image" content="http://www.trcimplan.gob.mx/sala-prensa/2018-11-30-onceava-y-doceava-sesion/imagen-previa.jpg"> <meta name="twitter:url" content="http://www.trcimplan.gob.mx/sala-prensa/2018-11-30-onceava-y-doceava-sesion.html"> <meta name="og:title" content="IMPLAN presenta resultados anuales y programas de trabajo para el 2019. - IMPLAN Torreón"> <meta name="og:description" content="Durante la Onceava Sesión del Consejo Directivo, el Instituto de Planeación y Competitividad de Torreón presentó los resultados obtenidos durante este año y los proyectos que se tienen planeados para el 2019."> <meta name="og:image" content="http://www.trcimplan.gob.mx/sala-prensa/2018-11-30-onceava-y-doceava-sesion/imagen-previa.jpg"> <meta name="og:url" content="http://www.trcimplan.gob.mx/sala-prensa/2018-11-30-onceava-y-doceava-sesion.html"> <title>IMPLAN presenta resultados anuales y programas de trabajo para el 2019. - IMPLAN Torreón</title> <link rel="shortcut icon" type="image/x-icon" href="../imagenes/apple-touch-icon.png"> <link rel="apple-touch-icon" href="../imagenes/apple-touch-icon.png"> <link rel="apple-touch-icon" href="../imagenes/apple-touch-icon-76x76.png" sizes="76x76"> <link rel="apple-touch-icon" href="../imagenes/apple-touch-icon-120x120.png" sizes="120x120"> <link rel="apple-touch-icon" href="../imagenes/apple-touch-icon-152x152.png" sizes="152x152"> <link rel="apple-touch-icon" href="../imagenes/apple-touch-icon-180x180.png" sizes="180x180"> <link rel="icon" href="../imagenes/icon-hires.png" sizes="192x192"> <link rel="icon" href="../imagenes/icon-normal.png" sizes="128x128"> <link rel="alternate" type="application/rss+xml" href="../rss.xml" title="IMPLAN Torreón"> <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> <link rel="stylesheet" type="text/css" href="../vendor/metisMenu/metisMenu.min.css"> <link rel="stylesheet" type="text/css" href="../vendor/datatables-plugins/dataTables.bootstrap.css"> <link rel="stylesheet" type="text/css" href="../vendor/morrisjs/morris.css"> <link rel="stylesheet" type="text/css" href="../vendor/font-awesome/css/font-awesome.min.css"> <link rel="stylesheet" type="text/css" href="../dist/css/sb-admin-2.min.css"> <link rel="stylesheet" type="text/css" href="../dist/css/plataforma-de-conocimiento.css"> <link rel="stylesheet" type="text/css" href="http://fonts.googleapis.com/css?family=Noto+Sans|Roboto+Condensed:400,700"> <link rel="stylesheet" type="text/css" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css"> <link rel="stylesheet" type="text/css" href="../dist/css/estilosvm.css"> <link rel="stylesheet" type="text/css" href="../dist/css/trcimplan.css"> <!-- SOPORTE PARA IE --> <!--[if lt IE 9]> <script type="text/javascript" src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script type="text/javascript" src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> </head> <body> <div id="wrapper"> <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="../index.html"><img class="navbar-brand-img" src="../imagenes/implan-barra-logo-chico-gris.png" alt="IMPLAN Torreón"></a> </div> <div class="navbar-default sidebar" role="navigation"> <div class="sidebar-nav navbar-collapse"> <ul class="nav" id="side-menu"> <li class="sidebar-search"> <form method="get" action="http://www.trcimplan.gob.mx/buscador-resultados.html"> <div class="input-group custom-search-form"> <input type="text" class="form-control" placeholder="Google buscar..." value="" name="q"> <span class="input-group-btn"> <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button> </span> </div> </form> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-lightbulb-o"></i></span> Análisis Publicados<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../blog/index.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Últimos Análisis</a></li> <li><a href="../excolaboradores/index.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Análisis por Autor</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-area-chart"></i></span> Indicadores<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../smi/introduccion.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Introducción al SMI</a></li> <li><a href="../indicadores-categorias/index.html"><span class="navegacion-icono"><i class="fa fa-th-list"></i></span> Indicadores por Categoría</a></li> <li><a href="../smi/por-region.html"><span class="navegacion-icono"><i class="fa fa-table"></i></span> Indicadores por Región</a></li> <li><a href="../smi/niveles-socioeconomicos.html"><span class="navegacion-icono"><i class="fa fa-bar-chart"></i></span> Niveles Socioeconómicos</a></li> <li><a href="../monitores/index.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Monitores</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-puzzle-piece"></i></span> Indicadores Básicos de Colonias<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../ibc/introduccion.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Introducción al IBC</a></li> <li><a href="../ibc-colonias-torreon/index.html"><span class="navegacion-icono"><i class="fa fa-font"></i></span> Colonias de Torreón</a></li> <li><a href="https://implantorreon.carto.com/u/sigimplan/builder/907a6bc0-2c7e-451e-9668-b78d952e52ff/embed" target="_blank"><span class="navegacion-icono"><i class="fa fa-external-link"></i></span> Mapa Completo</a></li> <li><a href="../ibc/torreon-urbano.html"><span class="navegacion-icono"><i class="fa fa-table"></i></span> Torreón Urbano</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-map-marker"></i></span> Información Geográfica<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../sig/introduccion.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Introducción al SIG</a></li> <li><a href="../sig-mapas-torreon/temas-sig.html"><span class="navegacion-icono"><i class="fa fa-map-o"></i></span> Mapas por Tema</a></li> <li><a href="../sig-mapas-torreon/plan-director-desarrollo-urbano.html"><span class="navegacion-icono"><i class="fa fa-map-marker"></i></span> Usos de Suelo</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-book"></i></span> Plan Estratégico Torreón 2040<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../pet/indice.html"><span class="navegacion-icono"><i class="fa fa-list-ul"></i></span> Índice General</a></li> <li><a href="../plan-estrategico-torreon-enfoque-metropolitano-2040/index.html"><span class="navegacion-icono"><i class="fa fa-download"></i></span> Descargar</a></li> <li><a href="../plan-estrategico-metropolitano/descripcion-del-proceso.html"><span class="navegacion-icono"><i class="fa fa-calendar"></i></span> Descripción del proceso</a></li> <li><a href="../proyectos/index.html"><span class="navegacion-icono"><i class="fa fa-check-square"></i></span> Proyectos</a></li> <li><a href="../vision-de-ciudad/vision-de-ciudad.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Visión de Ciudad desde IMPLAN</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-file-pdf-o"></i></span> Documentos<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../sig-planes/index.html"><span class="navegacion-icono"><i class="fa fa-book"></i></span> Planes y Programas</a></li> <li><a href="../investigaciones/index.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Investigaciones</a></li> <li><a href="../estudios/index.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Estudios</a></li> </ul> </li> <li><a href="../consejo-directivo/integrantes.html"><span class="navegacion-icono"><i class="fa fa-users"></i></span> Consejo Directivo</a></li> <li class="active"><a href="../sala-prensa/index.html"><span class="navegacion-icono"><i class="fa fa-newspaper-o"></i></span> Sala de Prensa</a></li> <li><a href="../programas-radio/index.html"><span class="navegacion-icono"><i class="fa fa-microphone"></i></span> Programas de Radio</a></li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Consejo Visión Metrópoli<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../convocatorias/vision-metropoli.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Consejo Juvenil</a></li> <li><a href="../vision-metropoli/integrantes.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Integrantes del Consejo</a></li> <li><a href="../vision-metropoli/index.html"><span class="navegacion-icono"><i class="fa fa-newspaper-o"></i></span> Sala de Prensa</a></li> <li><a href="../vision-metropoli/publicaciones.html"><span class="navegacion-icono"><i class="fa fa-book"></i></span> Publicaciones</a></li> <li><a href="../vision-metropoli/reglamento-vision-metropoli-2022.pdf"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Reglamento</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-building-o"></i></span> Institucional<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../institucional/vision-mision.html"><span class="navegacion-icono"><i class="fa fa-trophy"></i></span> Misión / Visión</a></li> <li><a href="../institucional/NuestrosProyectos.html"><span class="navegacion-icono"><i class="fa fa-pencil-square-o"></i></span> Nuestros Proyectos</a></li> <li><a href="../institucional/mensaje-director.html"><span class="navegacion-icono"><i class="fa fa-comment"></i></span> Mensaje del Director</a></li> <li><a href="../autores/index.html"><span class="navegacion-icono"><i class="fa fa-user"></i></span> Quienes Somos</a></li> <li><a href="../institucional/estructura-organica.html"><span class="navegacion-icono"><i class="fa fa-sitemap"></i></span> Estructura Orgánica</a></li> <li><a href="../institucional/modelo-operativo-universal.html"><span class="navegacion-icono"><i class="fa fa-slideshare"></i></span> Modelo Operativo Univ.</a></li> <li><a href="../institucional/reglamentos.html"><span class="navegacion-icono"><i class="fa fa-gavel"></i></span> Reglamentos</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-external-link"></i></span> Transparencia<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="http://www2.icai.org.mx/ipo/dependencia.php?dep=178#pageload" target="_blank"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Transparencia Estatal (ICAI)</a></li> <li><a href="https://consultapublicamx.inai.org.mx/vut-web/faces/view/consultaPublica.xhtml#inicio" target="_blank"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Plataforma Nacional de Transparencia</a></li> <li><a href="../transparencia/index.html"><span class="navegacion-icono"><i class="fa fa-file-pdf-o"></i></span> Documentos</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-download"></i></span> Datos Abiertos<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../smi/datos-abiertos.html"><span class="navegacion-icono"><i class="fa fa-area-chart"></i></span> Sist. Metropolitano de Indicadores</a></li> <li><a href="../ibc/datos-abiertos.html"><span class="navegacion-icono"><i class="fa fa-puzzle-piece"></i></span> Indicador Básico de Colonias</a></li> <li><a href="../sig/datos-abiertos.html"><span class="navegacion-icono"><i class="fa fa-map-marker"></i></span> Sist. Información Geográfica</a></li> <li><a href="https://arcg.is/0vySSr" target="_blank"><span class="navegacion-icono"><i class="fa fa-globe"></i></span> Atlas de Riesgos</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-share-alt"></i></span> Términos de Uso<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../terminos/terminos-informacion.html"><span class="navegacion-icono"><i class="fa fa-cubes"></i></span> De la información</a></li> <li><a href="../terminos/terminos-sitio.html"><span class="navegacion-icono"><i class="fa fa-globe"></i></span> Del sitio web</a></li> <li><a href="../terminos/privacidad.html"><span class="navegacion-icono"><i class="fa fa-lock"></i></span> Aviso de Privacidad</a></li> </ul> </li> <li> <a href="#"><span class="navegacion-icono"><i class="fa fa-phone"></i></span> Contacto<span class="fa arrow"></span></a> <ul class="nav nav-second-level"> <li><a href="../contacto/contacto.html"><span class="navegacion-icono"><i class="fa fa-phone"></i></span> Medios de contacto</a></li> <li><a href="../preguntas-frecuentes/preguntas-frecuentes.html"><span class="navegacion-icono"><i class="fa fa-question"></i></span> Preguntas Frecuentes</a></li> <li><a href="http://goo.gl/forms/1rdX4X128PpMOif73" target="_blank"><span class="navegacion-icono"><i class="fa fa-external-link"></i></span> Comentarios y Sugerencias</a></li> </ul> </li> <li><a href="../convocatorias/index.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Convocatorias</a></li> <li><a href="http://177.244.42.17/ovie-torreon/#!" target="_blank"><span class="navegacion-icono"><i class="fa fa-map-marker"></i></span> Oficina Virtual de Información Económica (OVIE)</a></li> <li><a href="https://arcg.is/0vySSr" target="_blank"><span class="navegacion-icono"><i class="fa fa-globe"></i></span> Atlas Municipal de Riesgos de Torreón</a></li> <li><a href="../multi-city-challenge/multi-city-challenge.html"><span class="navegacion-icono"><i class="fa fa-file-text-o"></i></span> Multi-City Challenge México 2020</a></li> </ul> </div> </div> </nav> <div id="page-wrapper"> <div class="cuerpo"> <article><div itemscope itemtype="http://schema.org/BlogPosting"> <div class="encabezado"> <h1 itemprop="headline">IMPLAN presenta resultados anuales y programas de trabajo para el 2019.</h1> <div class="encabezado-descripcion" itemprop="description">Durante la Onceava Sesión del Consejo Directivo, el Instituto de Planeación y Competitividad de Torreón presentó los resultados obtenidos durante este año y los proyectos que se tienen planeados para el 2019.</div> <div class="encabezado-autor-fecha"> Por <span itemprop="author">Lic. Maira Ivonne Flores Reyes</span> - <meta itemprop="datePublished" content="2018-11-30T00:00">30/11/2018 </div> </div> <div itemprop="articleBody"> <!-- Contenido: Inicia --> <p></br></br></p> <p style="background-color:#f95666;color:white;"><strong>DIRECCIÓN DE PROYECTOS ESTRATÉGICOS.</strong></p> <h2>En este año se trabajó en lo siguiente:</h2> <p><strong>- Laguna Y2040.</strong></p> <p>Ejercicio de participación ciudadana para universitarios, en el que más de 800 alumnos de 12 universidades de La Laguna se reunieron para discutir sobre problemas actuales de la ciudad y a proponer soluciones. Participaron más de 40 docentes locales y 13 expertos locales y nacionales en los ejes de Desarrollo Social, Desarrollo Económico, Buen Gobierno, Medio Ambiente, Desarrollo Urbano y Movilidad, quienes orientaron a los jóvenes durante el ejercicio. El ejercicio consistió en tres etapas:</p> <p>1- Paneles con Expertos en los ejes de Desarrollo Social, Desarrollo Económico, Buen Gobierno, Medio Ambiente, Desarrollo Urbano y Movilidad y Transporte.</p> <p>2- Mesas de trabajo en los ejes mencionados, en los que los jóvenes identificaron las principales problemáticas que impiden el desarrollo de La Laguna, construyeron una visión ideal de La Laguna hacia el 2040 y propusieron estrategias para llegar a esa visión.</p> <p>3- Los alumnos diseñaron proyectos personales para contribuir a la solución de problemáticas en La Laguna.</p> <p><strong>- Mi Acción de Liderazgo.</strong></p> <p>Ejercicio en el que se apoyó la gestión de proyectos sociales en la Zona Metropolitana de La Laguna. Al final de la actividad 326 estudiantes de 9 universidades ejecutaron 50 acciones de liderazgo con un total de más de 6,200 beneficiados.</p> <p><strong>- Taller Participativo de Política Industrial.</strong></p> <p>Ejercicio de participación ciudadana con empresarios de la Zona Metropolitana de La Laguna para el Plan de Política Industrial en el que 51 ciudadanos, miembros de la iniciativa privada y funcionarios públicos dedicados al desarrollo económico de la región identificaron las fortalezas, oportunidades, debilidades y amenazas de la Industria Manufacturera de La Laguna y propusieron acciones de corto y largo plazo para trabajar en los principales problemas detectados, con el objetivo de construir un diagnóstico robusto del sector industrial y culminar en el diseño de políticas públicas coherentes y efectivas.</p> <p><strong>- Semana i.</strong></p> <p>Gestión de proyectos sociales.- Proyecto con alumnos del Tecnológico de Monterrey sobre instrumentos de gestión para proyectos sociales. Durante una semana se aplicaron instrumentos de gestión en 4 distintos proyectos en los que el IMPLAN trabaja: Residuos Sólidos Urbanos, Redensificación del Centro Histórico, Implementación de Calle Completa en el Paso del Tecnológico y Adaptación de la Guía para el Desarrollo de Proveedores de la ONUDI. Los alumnos capturaron fotos de predios con basura en el primer cuadro del centro de Torreón y recopilaron información para conformar la línea base de medición de desempeño del cambio de horario en la recolección de residuos sólidos por parte de la dirección de servicios de limpieza.</p> <p><strong>- Documento Preliminar del Plan de Política Industrial.</strong></p> <p>Tras el proceso de participación del sector privado, se integró un documento preliminar con diagnóstico técnico y ciudadano, visión y propuestas de política pública para contribuir a la toma de decisiones al sector público y privado en beneficio de la industria manufacturera de La Laguna.</p> <p><strong>- Centro de Capacitación para el Sector Industrial de la ZML.</strong></p> <p>En el marco del convenio de colaboración entre el Implan Torreón y el Clúster Automotriz Laguna (CAL) y en el proceso de realización del Plan de Política Industrial, el equipo técnico del Implan colaboró con el CAL en la realización de un estudio de factibilidad para la constitución de un Instituto de Capacitación para el Trabajo del Estado de Coahuila (ICATEC).</p> <h2>Actividades para el 2019:</h2> <p><strong>- Consejo Visión Metrópoli.</strong></p> <p>Consejo de Participación Joven convocado por el IMPLAN Torreón.- Diseño, selección e integración del Consejo Visión Metrópoli por 21 jóvenes de 18 a 30 años, residentes de La Laguna y con experiencia comprobable en labor social. Los seleccionados comenzarán funciones el año 2019 y participarán con el IMPLAN en la difusión de sus planes y en el desarrollo de propuestas propias. Sesionarán una vez al mes con miembros del cuerpo técnico del IMPLAN.</p> <p><strong>- Ejercicio de Intervención Visión Metrópoli.</strong></p> <p>Ejercicio de concientización, vinculación e intervención ciudadana con universitarios de la ZML.</p> <p><strong>- Sistema Municipal de Evaluación y Gestión de Proyectos.</strong></p> <p>Diseño del sistema de evaluación y gestión de proyectos de inversión en el que se defina el proceso y rol de cada parte involucrada dentro del municipio para la consolidación de un Banco Municipal de Proyectos de Inversión.</p> <p><strong>- Plan de Política Industrial.</strong></p> <p>Continuación de talleres de participación con distintos sectores de la ZML para alimentar el Plan de Política Industrial. Publicación y difusión de un documento y seguimiento de las acciones y políticas propuestas para el desarrollo Industrial en la ZML.</p> <p><strong>- Diálogo Participativo para la Vinculación Academia.</strong></p> <p>Iniciativa Privada.- Mesa de diálogo con 25 representantes de la academia y el sector productivo, el objetivo de este trabajo fue identificar las áreas de oportunidad en los esquemas de vinculación entre universidad y empresas del sector manufacturero. Los resultados fueron insumos para el diseño de políticas públicas coherentes y efectivas.</p> <hr /> <p style="background-color:#f95666;color:white;"><strong>DIRECCIÓN DE PLANEACIÓN URBANA SUSTENTABLE.</strong></p> <h2>En este año se trabajó en lo siguiente:</h2> <p><strong>- Actualización Plan Director de Desarrollo Urbano de Torreón.</strong></p> <p>Actualización del DIAGNÓSTICO del Plan Director de Desarrollo Urbano, el cual es el principal instrumento jurídico y normativo que contiene las disposiciones técnicas para el ordenamiento territorial urbano del municipio. Se actualizó el diagnóstico utilizando la nueva metodología publicada por SEDATU-SEMARNAT-GIZ para elaboración de programas municipales de desarrollo urbano.</p> <p><strong>- Actualización Programa Parcial de Desarrollo Urbano del Centro Histórico.</strong></p> <p>Actualización del PPDUCH, el cual pretende ser el eje rector del mejoramiento y conservación del Centro Histórico de Torreón, el cual busca preservar el patrimonio con valor arquitectónico, artístico y cultural, además de incentivar el desarrollo económico, social y la re densificación de la zona. Se llevó cabo 1 taller de participación ciudadana, donde participaron +70 ciudadanos en diferentes líneas estratégicas como Regeneración Urbana, Desarrollo Económico, Vivienda, Sustentabilidad Ambiental, Patrimonio, Movilidad y Gobernanza.</p> <p><strong>- Plan de Movilidad Activa.</strong></p> <p>Presentación del Plan de Movilidad Activa (no motorizada) como instrumento de planeación para los proyectos, y acciones para los modos no motorizados. Este año, se presentó la Red de Infraestructura ciclista, donde actualmente se trabaja en los primeros proyectos para el corto plazo.</p> <p><strong>- Sistema de Información Geográfica.</strong></p> <p>Adición de nuevas capas al SIG, así como actualización y revisión de las existentes. Incidentes Viales 2018, Encharcamientos e Infraestructura de Agua Potable y Red de Infraestructura Ciclista.</p> <h2>Actividades para el 2019:</h2> <p><strong>- Aprobación, Publicación y Registro del Plan Director de Desarrollo Urbano de Torreón, Elaboración del Programa Parcial de Desarrollo Urbano NORTE, Dictaminación Técnica, entre otros.</strong></p> <p style="background-color:#f95666;color:white;"><strong>DIRECCIÓN DE INVESTIGACIÓN ESTRATÉGICA.</strong></p> <h2>En este año se trabajó en lo siguiente:</h2> <p><strong>- Indicadores.</strong></p> <p>Mantenimiento y actualización de la información del Sistema Metropolitano de Indicadores, que se catalogan en 32 categorías, a nivel ciudad, estatal y nacional. En total acumulan 1,412 indicadores, de los cuales 402 son de Torreón.</p> <p><strong>- Monitores.</strong></p> <p>Creación de los monitores metropolitanos, instrumentos de información que detallan los datos más relevantes respecto a temas selectos en la ciudad y la Zona Metropolitana de La Laguna. Adaptación de la página para presentarlos, así como generar un archivo descargable con la información de los monitores. A la fecha se tienen publicados 9 monitores y se contempla para final del año sean 12 y la actualización anual del resto.</p> <p><strong>- Diagnóstico de violencia de género contra la mujer.</strong></p> <p>Estudio que contempla la aplicación de instrumentos estadísticos, grupos focales y análisis de fuentes secundarias para conocer la realidad del municipio respecto a la violencia de género contra la mujer.</p> <p>Este diagnóstico busca generar políticas públicas a través de un conocimiento más granular de la violencia en el municipio, así como atender problemas específicos que resulten del análisis de la información recabada.</p> <p><strong>- Estudio sobre las finanzas públicas del municipio (Ramo 28).</strong></p> <p>Análisis de las finanzas públicas municipales y su relación con las aportaciones y participaciones del estado y la federación. Este estudio busca conocer las fuentes de ingreso más importantes, que vienen siendo las aportaciones y participaciones, así como la manera en cómo se integran</p> <h2>Actividades para el 2019:</h2> <p><strong>- Sistema Metropolitano de Indicadores.- Actualización y ampliación de los indicadores para integrar micro datos de las encuestas y censos del INEGI:</strong> 1. Encuesta sobre la Dinámica de las Relaciones en los Hogares (Torreón). 2. Encuesta Nacional sobre Ocupación y Empleo (Torreón). 3. Encuesta Nacional sobre la Discriminación (Coahuila).</p> <p><strong>- Indicadores Básicos por Colonia.- Integración de fichas informativas sobre la historia de las colonias, mobiliario urbano, calles y sitios de interés.</strong> Primera etapa: 1. Centro Histórico / Primitivo Centro 2. Primera de Cobián 3. Moderna 4. Torreón Viejo 5. Torreón Jardín</p> <p><strong>- Diagnóstico sobre la Violencia contra las Mujeres en Torreón.</strong></p> <p>Integración y publicación de los resultados sobre el diagnóstico sobre la violencia, adicionalmente se llevarán a cabo mesas de trabajo con grupos y personas interesadas para incluir políticas públicas y estados deseados de la población al diagnóstico.</p> <p><strong>- Estudio sobre las finanzas públicas del municipio.</strong></p> <p>Publicación en el sitio web del monitor de finanzas públicas del municipio, con información histórica del INEGI, integrando:</p> <ol> <li>Análisis histórico de los ingresos del Municipio.</li> <li>Análisis histórico sobre los egresos del Municipio.</li> <li>Análisis de sensibilidad de los ingresos del Municipio.</li> <li>Dependencia del Municipio de Participaciones y Aportaciones Federales y Estatales.</li> </ol> <p><strong>- Monitores metropolitanos.</strong></p> <p>Actualización de los monitores metropolitanos y la inclusión de los siguientes:</p> <ol> <li>Monitor de finanzas públicas.</li> <li>Monitor de violencia de género.</li> <li>Monitor Energético.</li> </ol> <p style="background-color:#f95666;color:white;"><strong>DIRECCIÓN DE COMPETITIVIDAD SECTORIAL.</strong></p> <h2>En este año se trabajó en lo siguiente:</h2> <p><strong>- Proyecto de Reforma al Reglamento de Desarrollo Urbano y Construcción de Torreón.</strong></p> <p>Se elaboró una propuesta de modificación al actual Reglamento de Desarrollo Urbano, Uso de Suelo, Zonificación y Construcción del Municipio de Torreón para armonizarlo con la Nueva Agenda Urbana ONU-HABITAT III, la Ley de Asentamientos Humanos, Ordenamiento Territorial y Desarrollo Urbano, tanto General como Estatal.</p> <p><strong>- Se reestructuró el orden del Reglamento, se reformaron más de 50 artículos, se adicionaron 5 nuevos capítulos y se trabajó con todas las Direcciones Generales en materia, de las cuales se recibieron más de 50 observaciones, atendidas y justificadas.</strong></p> <p><strong>- Propuesta de reforma a la Ley que crea el Instituto Municipal de Planeación y Competitividad de Torreón (IMPLAN).</strong></p> <p>Se elaboró una propuesta para modificación de la Ley que crea en el IMPLAN con el objetivo de hacer correcciones de estética y técnica jurídica en base a una revisión integral del texto del ordenamiento.**</p> <p><strong>- Propuesta del Reglamento Interior IMPLAN Torreón.</strong></p> <p>La propuesta tiene por objeto regular la organización y el funcionamiento del Instituto Municipal de Planeación y Competitividad de Torreón y de su Consejo Directivo.</p> <p> </p> <h2>Actividades para el 2019:</h2> <p><strong>- Red de Espacios Públicos.</strong></p> <p>Elaborar un Programa de Red de Espacio Público que cimiente los lineamientos para aumentar no solo el área por habitante de espacio público, sino la distribución equitativa, la calidad y la accesibilidad, mediante esquemas de espacio tradicional como parques barriales, e innovadores como los parques de bolsillo, conectados mediante corredores con un alto grado de habitabilidad facilitando la movilidad blanda.</p> <p><strong>- Red de Infraestructura Verde.</strong></p> <p>Generar un Plan de Red de Infraestructura Verde estratégicamente planificado de espacios naturales y seminaturales y otros elementos ambientales para su diseño y gestión, integrando al ecosistema urbano de Torreón a su entorno natural con el objetivo de conservar, restaurar y aumentar los servicios ecosistémicos en beneficio de un incremento en la calidad de vida de los habitantes.</p> <!-- Contenido: Termina --> </div> <div class="publicador" itemprop="publisher" itemscope itemtype="http://schema.org/Organization"> <span class="contenido-imagen-previa"><img class="img-responsive" itemprop="image" alt="Instituto Municipal de Planeación y Competitividad de Torreón" src="../imagenes/implan-logo.png"></span> <h3 class="titulo" itemprop="name">Instituto Municipal de Planeación y Competitividad de Torreón</h3> <div class="descripcion" itemprop="description">Órgano técnico responsable de la planeación del desarrollo del municipio de Torreón, Coahuila, México.</div> <div class="contenido-imagen-previa-final"></div> </div> </div></article> <aside> <!-- Extra: Inicia --> <h3>Publicaciones relacionadas</h3> <p><b>Análisis Publicados</b></p> <ul> <li><a href="http://www.trcimplan.gob.mx/blog/caracteristicas-de-un-buen-espacio-publico-ene2020.html">Caracter&iacute;sticas de un Buen Espacio P&uacute;blico</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/agenda-2020-en-el-implan-dic2019.html">La Agenda 2020 en el IMPLAN</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/gestion-y-cambios-de-uso-de-suelo-en-torreon-oct2019.html">Gesti&oacute;n y Cambios de Usos de Suelo en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/el-caso-del-centro-historico-de-torreon-oct2019.html">Patrimonio e Identidad: El Caso del Centro Hist&oacute;rico de Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/planificacion-urbana-en-la-salud-publica-de-la-laguna.html">La planificaci&oacute;n urbana, fundamental en la salud p&uacute;blica de los laguneros.</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/movilidad-con-perspectiva-de-genero-en-la-laguna.html">Movilidad con perspectiva de g&eacute;nero en La Laguna</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/urbanismo-con-enfoque-de-genero-en-la-laguna.html">Urbanismo con enfoque de g&eacute;nero en La Laguna</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/el-ciudadano-como-especialista-urbano-abril2019.html">El Ciudadano como Especialista Urbano</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/el-comercio-a-pie-de-calle.html">El comercio a pie de calle, un acercamiento al antes y el despu&eacute;s del Paseo Morelos</a></li> <li><a href="http://www.trcimplan.gob.mx/blog/laguna-y2040-una-oportunidad-de-liderazgo-para-los-jovenes.html">Laguna Y2040: una oportunidad de liderazgo para los j&oacute;venes</a></li> </ul> <p><b>Sistema Metropolitano de Indicadores</b></p> <ul> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sociedad-estimacion-de-menores-huerfanos-por-agresiones.html">Estimaci&oacute;n de Menores Hu&eacute;rfanos por Agresiones en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sustentabilidad-red-de-transporte-publico.html">Red de Transporte P&uacute;blico en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sustentabilidad-acceso-a-vialidades-pavimentadas.html">Acceso a Vialidades Pavimentadas en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sustentabilidad-destinos-via-terrestre.html">Destinos V&iacute;a Terrestre en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sociedad-promedio-de-descendencia-por-varon.html">Promedio de Descendencia por Var&oacute;n en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sociedad-casos-acumulados-de-covid-19-sospechosos.html">Casos acumulados de COVID-19 sospechosos en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sociedad-casos-acumulados-de-covid-19-negativos.html">Casos acumulados de COVID-19 negativos en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-torreon/sociedad-casos-acumulados-de-covid-19-positivos.html">Casos acumulados de COVID-19 positivos en Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-la-laguna/economia-unidades-economicas-dedicadas-a-la-industria-manufacturera.html">Unidades Econ&oacute;micas Dedicadas a la Industria Manufacturera en La Laguna</a></li> <li><a href="http://www.trcimplan.gob.mx/indicadores-gomez-palacio/sustentabilidad-destinos-via-terrestre.html">Destinos V&iacute;a Terrestre en G&oacute;mez Palacio</a></li> </ul> <p><b>Plan Estratégico Torreón</b></p> <ul> <li><a href="http://www.trcimplan.gob.mx/proyectos/plata-laguna.html">Plata Laguna</a></li> <li><a href="http://www.trcimplan.gob.mx/proyectos/salud-laguna.html">Salud Laguna</a></li> <li><a href="http://www.trcimplan.gob.mx/proyectos/plan-centro-laguna.html">Plan Centro Laguna</a></li> <li><a href="http://www.trcimplan.gob.mx/proyectos/zona-30.html">Zona 30</a></li> <li><a href="http://www.trcimplan.gob.mx/pet/cartera-proyectos-medio-ambiente-sustentabilidad.html">Cartera de Proyectos: Medio Ambiente y Sustentabilidad</a></li> <li><a href="http://www.trcimplan.gob.mx/pet/diagnostico-estrategico-entorno-urbano.html">Diagn&oacute;stico Estrat&eacute;gico: Entorno Urbano</a></li> <li><a href="http://www.trcimplan.gob.mx/proyectos/calle-completa.html">Calle Completa</a></li> <li><a href="http://www.trcimplan.gob.mx/proyectos/plan-estrategico-drenaje-pluvial-torreon.html">Plan Estrat&eacute;gico de Drenaje Pluvial de Torre&oacute;n</a></li> <li><a href="http://www.trcimplan.gob.mx/proyectos/vive-tu-alameda.html">Vive Tu Alameda</a></li> <li><a href="http://www.trcimplan.gob.mx/proyectos/aire-para-todos.html">Aire Para Todos</a></li> </ul> <p><b>Sala de Prensa</b></p> <ul> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2019-05-20-taller-vinculacion.html">Realizan Conversatorio entre Academia, Gobierno y Empresas</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2018-11-15-la-cultura-del-arbol.html">IMPLAN present&oacute; conferencia &ldquo;La cultura del &aacute;rbol: c&oacute;mo reconstruir la ciudad y sus espacios p&uacute;blicos&quot;</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2018-10-31-decima-sesion.html">Presentan &ldquo;Propuesta conceptual para el manejo sustentable del agua&rdquo; en Sesi&oacute;n del IMPLAN.</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2018-11-29-imco-2018.html">Posici&oacute;n de La Laguna en el &Iacute;ndice de Competitividad Urbana 2018</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2020-04-15-comunicado-conferencias-virtuales.html">El IMPLAN Torre&oacute;n y su Consejo Juvenil: Visi&oacute;n Metr&oacute;poli, presentar&aacute;n Conferencias Virtuales</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2020-02-27-segunda-sesion-consejo-2020.html">Presentan en Segunda Sesi&oacute;n de Consejo el &ldquo;Programa Parcial de Desarrollo Urbano para la Zona Norte de Torre&oacute;n&rdquo;</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2020-02-17-comunicado-enoe.html">Disminuye la tasa de desempleo en la Zona Metropolitana de La Laguna (ZML), al cuarto trimestre de 2019</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2020-02-06-comunicado-conferencia-imeplan.html">Postura sobre la creaci&oacute;n de un Instituto Metropolitano de Planeaci&oacute;n.</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2020-01-30-primer-sesion-consejo-2020.html">Primer Sesi&oacute;n de Consejo 2020. Se renueva el Consejo Directivo del IMPLAN.</a></li> <li><a href="http://www.trcimplan.gob.mx/sala-prensa/2019-09-26-novena-sesion-consejo.html">Novena Sesi&oacute;n de Consejo Implan. Presentan Resultados del Conversatorio y del Concurso &ldquo;Manos a la Cebra&rdquo;.</a></li> </ul> <!-- Extra: Termina --> </aside> <div class="contenido-social"> <h5>Compartir en Redes Sociales</h5> <a href="https://twitter.com/share" class="twitter-share-button" data-via="trcimplan" data-lang="es">Twittear</a> <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.trcimplan.gob.mx%2Fsala-prensa%2F2018-11-30-onceava-y-doceava-sesion.html&amp;width=300&amp;layout=button_count&amp;action=like&amp;show_faces=true&amp;share=false&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px; height:21px;" allowTransparency="true"></iframe> </div> </div> <div class="mapa-inferior"> <div class="pull-right redes-sociales"> <a class="fa fa-twitter-square" href="http://www.twitter.com/trcimplan" target="_blank"></a> <a class="fa fa-facebook-square" href="https://facebook.com/trcimplan" target="_blank"></a> <a class="fa fa-facebook-square" href="http://www.instagram.com/implantorreon" target="_blank"></a> <a class="fa fa-rss-square" href="../rss.xml"></a> </div> </div> </div> </div> <!-- Javascript global inicia --> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script> <script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script> <script type="text/javascript" src="../vendor/metisMenu/metisMenu.min.js"></script> <script type="text/javascript" src="../vendor/datatables/js/jquery.dataTables.min.js"></script> <script type="text/javascript" src="../vendor/datatables-plugins/dataTables.bootstrap.min.js"></script> <script type="text/javascript" src="../vendor/datatables-responsive/dataTables.responsive.js"></script> <script type="text/javascript" src="../vendor/raphael/raphael.min.js"></script> <script type="text/javascript" src="../vendor/morrisjs/morris.min.js"></script> <script type="text/javascript" src="../dist/js/sb-admin-2.min.js"></script> <script type="text/javascript" src="http://libs.cartocdn.com/cartodb.js/v3/3.15/cartodb.js"></script> <script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script> <!-- Javascript global termina --> <!-- Javascript inicia --> <script> // Twitter !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs"); </script> <!-- Javascript termina --> <!-- Javascript Google Analytics --> <script> // Google Analytics (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-58290501-1', 'auto');ga('send', 'pageview'); </script> </body> </html>
TRCIMPLAN/trcimplan.github.io
sala-prensa/2018-11-30-onceava-y-doceava-sesion.html
HTML
gpl-3.0
44,506
# This file is part of JST. # # JST 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. # # JST 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 JST. If not, see <http://www.gnu.org/licenses/>. # This file was made to prevent circular dependencies, if we can do something better, let's do it import mips.registers as mr SPILL_MEM_LABEL = 'SPILL_MEMORY' SPILL_MEM_SIZE = 64 # bytes TEMPROARY_REGISTER_SET = mr.T_REGISTERS NOT_TESTING_FUNCTIONS = False
s-gogna/JST
mips/configurations.py
Python
gpl-3.0
904
/** main.c * * This file is part of Sub3dtool * * Sub3dtool 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. * * Sub3dtool 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 Sub3dtool. If not, see <http://www.gnu.org/licenses/>. * */ #include <stdlib.h> #include <stdio.h> #include <getopt.h> #include <limits.h> #include <assert.h> #include <string.h> #include "config.h" #include "utils.h" #include "subass.h" #include "subsrt.h" #include "subsrt_ass.h" #include "subass3d.h" #include "global.h" /* global program_name */ const char * program_name; const char * version = VERSION; int debug_mode = 0; FILE * error_file = NULL; #define FORMAT_UNKNOWN 0 #define FORMAT_ASS 1 #define FORMAT_SRT 2 #define CODE_INVALID_ARGS 1 #define CODE_INPUT_ERROR 10 #define CODE_INPFORMAT_ERROR 11 #define CODE_SRT_PARSE_ERROR 15 #define CODE_ASS_PARSE_ERROR 16 #define CODE_OUTPUT_ERROR 20 #define CODE_FUNCTION_ERROR 30 /* print help */ void print_help (FILE * f, int code) { fprintf (f, "%s - version %s\n", program_name, version); fprintf (f, "Usage: %s [OPTIONS]... [INPUT]...\n", program_name); fprintf (f, "Tool to convert subtitles to 3D format.\n"); fprintf (f, "\nMandatory options:\n"); fprintf (f, " [INPUT] Input file, support SRT and ASS format\n"); fprintf (f, " -h --help Print help\n"); fprintf (f, " -o --output FILE Output file, support SRT and ASS format\n"); fprintf (f, " Output format is determine by extension\n"); fprintf (f, " Default is to use ASS subtitle format\n"); fprintf (f, " --debug Self-test.\n"); fprintf (f, "\n3D options:\n"); fprintf (f, " --3dsbs Side-By-Side subtitle\n"); fprintf (f, " --3dtb Top-Bottom subtitle\n"); fprintf (f, " --no3d Reverse previously converted subtitle\n"); fprintf (f, "\nCustomization:\n"); fprintf (f, " --screen WxH Set Play Resolution (subASS). Default: 1920x1080\n"); fprintf (f, " --font FONT Set font name. Default: Freesans\n"); fprintf (f, " --fontsize SIZE Set font size. Default: 64\n"); fprintf (f, "\nThe following commands set colors of subtitles\n"); fprintf (f, " -c --color 0xRRGGBB Conventional for Primary & Secondary colors\n"); fprintf (f, " --color-primary 0xRRGGBB Default: 0xFFFFFA\n"); fprintf (f, " --color-2nd 0xRRGGBB Default: 0xFFFFC8\n"); fprintf (f, " --color-outline 0xRRGGBB Default: 0x000000\n"); fprintf (f, " --color-back 0xRRGGBB Default: 0x000000\n"); fprintf (f, " --color-force Ignore colors in input file\n"); fprintf (f, "\n"); fprintf (f, " --border-shadow Subtitles have outline and drop shadow (default)\n"); fprintf (f, " --border-box Subtitles have blackbox as background\n"); fprintf (f, " Doesn't work well with 3D\n\n"); fprintf (f, " --outline [0-4] Outline width\n"); fprintf (f, " --shadow [0-4] Shadow width\n"); fprintf (f, "\n"); fprintf (f, " --align-left Set alignments\n"); fprintf (f, " --align-center Default\n"); fprintf (f, " --align-right\n"); fprintf (f, " --align-bottom Default\n"); fprintf (f, " --align-middle\n"); fprintf (f, " --align-top\n"); fprintf (f, " --margin-left N Left margin\n"); fprintf (f, " --margin-right N Right margin\n"); fprintf (f, " --margin-vertical N Vertical margin\n"); fprintf (f, "\n"); exit (code); } int format_test (const char * path) { #define CHECKSIZE 64 ZnFile * file = znfile_open (path); if (file == NULL) return FORMAT_UNKNOWN; int scores [] = { 0, 0 }; int scores_eqv [] = { FORMAT_SRT, FORMAT_ASS }; const char * curline = NULL; int i = 0; while (i < CHECKSIZE && (curline = znfile_linenext (file)) != NULL) { if (strstr (curline, "-->") != NULL) scores[0] += 16; else if (zn_stristr (curline, "Style:") != NULL) scores[1] += 16; else if (zn_stristr (curline, "Dialogue:") != NULL) scores[1] += 16; else if (zn_stristr (curline, "[Script Info]") != NULL) { scores[1] += 64; i += 16; } i++; } znfile_close (file); if (scores[0] > scores[1]) return scores_eqv[0]; else return scores_eqv[1]; } void func_test () { FILE * f = error_file; /* Special character */ fprintf (f, "Special characters\n"); fprintf (f, "\\n: %d, \\r: %d, \\t: %d.\n", '\n', '\r', '\t'); fprintf (f, "\\v: %d, \\b: %d, \\f: %d.\n", '\v', '\b', '\f'); fprintf (f, "\\a: %d, NULL: %p\n", '\a', NULL); /* subsrt.h */ ZnsubSRT * sub1 = calloc (1, sizeof (ZnsubSRT)); fprintf (f, "ZnsubSRT: %ld, %ld, %p, %p.\n", sub1->start, sub1->end, sub1->text, (void*)sub1->next); free (sub1); sub1 = NULL; /*const char * tmp = "1\n01:02:03,456 --> 03:02:01,789\n\ First Line.\nSecond Line.\n\n2\n03:04:05,123 --> 05:04:03,321\n\ 2nd Event.\n\n3\n06:07:08,234 --> 08:09:10,007\n\ 3rd Event."; */ fprintf (f, "FUNCTEST ENDED\n\n\n"); } int main (int argc, char * argv[]) { /* global variables */ program_name = argv[0]; debug_mode = 0; error_file = stderr; /* parsing arguments */ const char * input = NULL; const char * output = NULL; int opt = 0; int sub3d = 0; long fontsize = -1; char * font = NULL; long long color_primary = -1; long long color_2nd = -1; long long color_outline = -1; long long color_back = -1; int border_style = -1; int outline = -1; int shadow = -1; int align = -1; long margin_l = LONG_MIN; long margin_r = LONG_MIN; long margin_v = LONG_MIN; long screen_x = -1; long screen_y = -1; char * ptr; long znsub_srt2ass_flag = 0; int align_adjust = -1; const char * opts_short = "ho:c:"; const struct option opts_long [] = { { "help", 0, NULL, 'h' }, { "output", 1, NULL, 'o' }, { "debug", 0, NULL, 1024 }, { "font", 1, NULL, 1030 }, { "fontsize", 1, NULL, 1031 }, { "screen", 1, NULL, 1032 }, { "color", 1, NULL, 'c' }, { "color-primary", 1, NULL, 1041 }, { "color-2nd", 1, NULL, 1042 }, { "color-outline", 1, NULL, 1043 }, { "color-back", 1, NULL, 1044 }, { "color-force", 0, NULL, 1045 }, { "border-shadow", 0, &border_style, 1}, { "border-box", 0, &border_style, 3}, { "outline", 1, NULL, 1051 }, { "shadow", 1, NULL, 1052 }, { "align-left", 0, &align, 1 }, { "align-center", 0, &align, 2 }, { "align-right", 0, &align, 3 }, { "align-bottom", 0, &align_adjust, 0}, { "align-middle", 0, &align_adjust, 3}, { "align-top", 0, &align_adjust, 6}, { "margin-left", 1, NULL, 1061 }, { "margin-right", 1, NULL, 1062 }, { "margin-vertical", 1, NULL, 1063 }, { "3dsbs", 0, &sub3d, ZNSUB_ASS3D_SBS }, { "3dtb", 0, &sub3d, ZNSUB_ASS3D_TB }, { "no3d", 0, &sub3d, ZNSUB_ASS3D_NO3D }, { NULL, 0, NULL, 0 } }; do { opt = getopt_long (argc, argv, opts_short, opts_long, NULL); switch (opt) { case 'h': print_help (stdout, 0); break; case 'o': output = optarg; break; case 1024: debug_mode = 1; func_test (); break; /* font options */ case 1030: zn_strset (&font, optarg); break; case 1031: fontsize = strtol (optarg, NULL, 10); break; case 1032: screen_x = strtol (optarg, &ptr, 10); if (ptr[0] != '\0') { ptr = &ptr[1]; screen_y = strtol (ptr, NULL, 10); } else screen_x = -1; break; /* color options */ case 'c': color_2nd = strtoll (optarg, NULL, 0); color_primary = color_2nd; break; case 1041: color_primary = strtoll (optarg, NULL, 0); break; case 1042: color_2nd = strtoll (optarg, NULL, 0); break; case 1043: color_outline = strtoll (optarg, NULL, 0); break; case 1044: color_back = strtoll (optarg, NULL, 0); break; case 1045: znsub_srt2ass_flag |= ZNSUB_SRT_ASS_NOCOLOR; break; /* border styles */ /* old codes case 1050: border_style = (int)strtol (optarg, NULL, 0); break; */ case 1051: outline = (int) strtol (optarg, NULL, 0); break; case 1052: shadow = (int) strtol (optarg, NULL, 0); break; /* alignment */ case 1061: margin_l = strtol (optarg, NULL, 0); break; case 1062: margin_r = strtol (optarg, NULL, 0); break; case 1063: margin_v = strtol (optarg, NULL, 0); break; /* default */ case '?': print_help (stdout, 0); break; case 0: default: break; } } while (opt != -1); /* validating arguments */ if (output == NULL) print_help (stdout, 0); if (argc - optind > 1) { fprintf (error_file, "Too much arguments.\n"); exit (CODE_INVALID_ARGS); } else if (argc - optind < 1) { fprintf (error_file, "No input file.\n"); exit (CODE_INVALID_ARGS); } /* input */ input = argv[optind]; if (input == NULL) { fprintf (error_file, "Invalid input file.\n"); exit (CODE_INVALID_ARGS); } /* open input stream */ ZnFile * data = znfile_open (input); if (data == NULL) { fprintf (error_file, "Cannot open input file.\n"); exit (CODE_INPUT_ERROR); } /* this part check the input format and use the * proper parser to parse it */ /* parse input */ ZnsubASS * inp_ass = NULL; ZnsubSRT * inp_srt = NULL; int inp_format = 0; inp_format = format_test (input); if (inp_format == FORMAT_ASS) { inp_ass = znsub_ass_parse (data); inp_format = FORMAT_ASS; if (sub3d == ZNSUB_ASS3D_NO3D) { znsub_ass3d_discard (inp_ass, 0); } if (inp_ass == NULL) { fprintf (error_file, "Parsing ASS subtitle failed.\n"); exit (CODE_ASS_PARSE_ERROR); } } else if (inp_format == FORMAT_SRT) { inp_srt = znsub_srt_parse (data); inp_format = FORMAT_SRT; if (inp_srt == NULL) { fprintf (error_file, "Parsing SRT subtitle failed.\n"); exit (CODE_SRT_PARSE_ERROR); } } else { znfile_close (data); fprintf (error_file, "Unable to determine file format.\n"); exit (CODE_INPFORMAT_ERROR); } znfile_close (data); /* output format decision */ const char * ext = strrchr (output, '.'); if (strncmp (ext, ".srt", 4) == 0) { /* SRT FORMAT */ ZnsubSRT * out; if (inp_format == FORMAT_ASS) out = znsub_ass2srt (inp_ass, znsub_srt2ass_flag); else if (inp_format == FORMAT_SRT) out = inp_srt; else { fprintf (stderr, "Error identifying input format.\n"); exit (CODE_INPFORMAT_ERROR); } FILE * file; file = fopen (output, "w"); if (file == NULL) { fprintf (stderr, "Error opening output file.\n"); if (inp_ass != NULL) znsub_ass_free (inp_ass); if (inp_srt != NULL) znsub_srt_free (inp_srt); exit (CODE_OUTPUT_ERROR); } znsub_srt_tofile (out, file); if (inp_ass != NULL) znsub_ass_free (inp_ass); if (inp_srt != NULL) znsub_srt_free (inp_srt); if (inp_format != FORMAT_SRT) znsub_srt_free (out); inp_ass = NULL; inp_srt = NULL; } else { /* ASS FORMAT */ /* convert to ASS */ ZnsubASS * out = NULL; if (inp_format == FORMAT_ASS) out = inp_ass; else if (inp_format == FORMAT_SRT) out = znsub_srt2ass (inp_srt, znsub_srt2ass_flag); else { fprintf (stderr, "Error identifying input format.\n"); exit (CODE_INPFORMAT_ERROR); } if (out == NULL) { fprintf (error_file, "Converting SRT to ASS failed.\n"); if (inp_ass != NULL) znsub_ass_free (inp_ass); if (inp_srt != NULL) znsub_srt_free (inp_srt); exit (CODE_FUNCTION_ERROR); } /* Customization */ if (screen_x >= 0 && screen_y >= 0) { /* set play resolution */ out->play_resx = screen_x; out->play_resy = screen_y; } /* fonts */ ZnsubASSStyle * style = out->first_style; if (fontsize > 0) style->font_size = fontsize; zn_strset (&style->font_name, font); /* colors */ if (color_primary >= 0) { znsub_ass_style_color_setll (style->primary_colour, color_primary); } if (color_2nd >= 0) { znsub_ass_style_color_setll (style->secondary_colour, color_2nd); } if (color_outline >= 0) { znsub_ass_style_color_setll (style->outline_colour, color_outline); } if (color_back >= 0) { znsub_ass_style_color_setll (style->back_colour, color_back); } /* border - * style: 1 for drop shadow + outline * style: 2 for black box * outline and shadow is limited to 0-4 according to * specification*/ style->border_style = (border_style == 1 || border_style == 3 ? border_style : style->border_style); style->outline = (outline >= 0 && outline <= 4 ? outline : style->outline); style->shadow = (shadow >= 0 && shadow <= 4 ? shadow : style->shadow); /* align * align 1 for left, 2 for center, 3 for right * align_adjust +0 for bottom, +3 for middle, +6 for top */ align = (align != -1 ? align : 2); /* default - center*/ align += (align_adjust != -1 ? align_adjust : 0); style->alignment = (align > 0 ? align : style->alignment); /* margin: is set? new value else default */ style->margin_l = (margin_l != LONG_MIN ? margin_l : style->margin_l); style->margin_r = (margin_r != LONG_MIN ? margin_r : style->margin_r); style->margin_v = (margin_v != LONG_MIN ? margin_v : style->margin_v); /* convert to 3d */ if (sub3d == ZNSUB_ASS3D_SBS || sub3d == ZNSUB_ASS3D_TB) znsub_ass3d_convert (out, sub3d, 0); /* output to file */ FILE * file; file = fopen (output, "w"); if (file == NULL) { fprintf (stderr, "Error opening output file.\n"); if (inp_ass != NULL) znsub_ass_free (inp_ass); if (inp_srt != NULL) znsub_srt_free (inp_srt); exit(CODE_OUTPUT_ERROR); } znsub_ass_tofile (out, file); /* free data */ fclose (file); if (inp_format != FORMAT_ASS) znsub_ass_free (out); if (inp_ass != NULL) znsub_ass_free (inp_ass); if (inp_srt != NULL) znsub_srt_free (inp_srt); inp_ass = NULL; inp_srt = NULL; } /* input free */ if (font != NULL) free (font); if (inp_ass != NULL) znsub_ass_free (inp_ass); if (inp_srt != NULL) znsub_srt_free (inp_srt); }
veracitynhd/sub3dtool
src/main.c
C
gpl-3.0
14,492
/* * Copyright (C) 2016 Stuart Howarth <showarth@marxoft.co.uk> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3 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. * * 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 MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> #include "page.h" class PluginManager; class QActionGroup; class MainWindow : public QMainWindow { Q_OBJECT public: explicit MainWindow(QWidget *parent = 0); private Q_SLOTS: void loadPlugins(); void setCurrentService(); void setCurrentService(const QString &service); void showAboutDialog(); void showSettingsDialog(); void showTransfers(); void showVideoPlayer(); void onPageStatusChanged(Page::Status status); void onPageWindowTitleChanged(const QString &text); void onStackCountChanged(int count); void onStackPageChanged(Page *page); private: virtual void closeEvent(QCloseEvent *event); PluginManager *m_pluginManager; QMenu *m_serviceMenu; QMenu *m_viewMenu; QMenu *m_editMenu; QMenu *m_helpMenu; QActionGroup *m_serviceGroup; QAction *m_pluginsAction; QAction *m_quitAction; QAction *m_backAction; QAction *m_reloadAction; QAction *m_transfersAction; QAction *m_playerAction; QAction *m_settingsAction; QAction *m_aboutAction; QToolBar *m_toolBar; }; #endif // MAINWINDOW_H
marxoft/cutetube2
app/src/desktop/mainwindow.h
C
gpl-3.0
1,864
/* RetroArch - A frontend for libretro. * Copyright (C) 2016-2017 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis * * RetroArch 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 Found- * ation, either version 3 of the License, or (at your option) any later version. * * RetroArch 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 RetroArch. * If not, see <http://www.gnu.org/licenses/>. */ #include <retro_miscellaneous.h> #ifdef HAVE_CONFIG_H #include "../../config.h" #endif #include "../menu_driver.h" #include "../../gfx/font_driver.h" #include "../../gfx/video_driver.h" #include "../../gfx/common/vulkan_common.h" /* Will do Y-flip later, but try to make it similar to GL. */ static const float vk_vertexes[] = { 0, 0, 1, 0, 0, 1, 1, 1 }; static const float vk_tex_coords[] = { 0, 1, 1, 1, 0, 0, 1, 0 }; static const float vk_colors[] = { 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, }; static void *menu_display_vk_get_default_mvp(void) { vk_t *vk = (vk_t*)video_driver_get_ptr(false); if (!vk) return NULL; return &vk->mvp_no_rot; } static const float *menu_display_vk_get_default_vertices(void) { return &vk_vertexes[0]; } static const float *menu_display_vk_get_default_color(void) { return &vk_colors[0]; } static const float *menu_display_vk_get_default_tex_coords(void) { return &vk_tex_coords[0]; } static unsigned to_display_pipeline( enum menu_display_prim_type type, bool blend) { return ((type == MENU_DISPLAY_PRIM_TRIANGLESTRIP) << 1) | (blend << 0); } #ifdef HAVE_SHADERPIPELINE static unsigned to_menu_pipeline( enum menu_display_prim_type type, unsigned pipeline) { switch (pipeline) { case VIDEO_SHADER_MENU: return 4 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP); case VIDEO_SHADER_MENU_2: return 6 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP); case VIDEO_SHADER_MENU_3: return 8 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP); case VIDEO_SHADER_MENU_4: return 10 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP); case VIDEO_SHADER_MENU_5: return 12 + (type == MENU_DISPLAY_PRIM_TRIANGLESTRIP); default: return 0; } } #endif static void menu_display_vk_viewport(void *data) { menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data; vk_t *vk = (vk_t*)video_driver_get_ptr(false); if (!vk || !draw) return; vk->vk_vp.x = draw->x; vk->vk_vp.y = vk->context->swapchain_height - draw->y - draw->height; vk->vk_vp.width = draw->width; vk->vk_vp.height = draw->height; vk->vk_vp.minDepth = 0.0f; vk->vk_vp.maxDepth = 1.0f; } static void menu_display_vk_draw_pipeline(void *data) { #ifdef HAVE_SHADERPIPELINE float output_size[2]; menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data; vk_t *vk = (vk_t*)video_driver_get_ptr(false); video_coord_array_t *ca = NULL; static uint8_t ubo_scratch_data[768]; static float t = 0.0f; static struct video_coords blank_coords; if (!vk || !draw) return; draw->x = 0; draw->y = 0; draw->matrix_data = NULL; output_size[0] = (float)vk->context->swapchain_width; output_size[1] = (float)vk->context->swapchain_height; switch (draw->pipeline.id) { /* Ribbon */ default: case VIDEO_SHADER_MENU: case VIDEO_SHADER_MENU_2: ca = menu_display_get_coords_array(); draw->coords = (struct video_coords*)&ca->coords; draw->pipeline.backend_data = ubo_scratch_data; draw->pipeline.backend_data_size = sizeof(float); /* Match UBO layout in shader. */ memcpy(ubo_scratch_data, &t, sizeof(t)); break; /* Snow simple */ case VIDEO_SHADER_MENU_3: case VIDEO_SHADER_MENU_4: case VIDEO_SHADER_MENU_5: draw->pipeline.backend_data = ubo_scratch_data; draw->pipeline.backend_data_size = sizeof(math_matrix_4x4) + 3 * sizeof(float); /* Match UBO layout in shader. */ memcpy(ubo_scratch_data, menu_display_vk_get_default_mvp(), sizeof(math_matrix_4x4)); memcpy(ubo_scratch_data + sizeof(math_matrix_4x4), output_size, sizeof(output_size)); memcpy(ubo_scratch_data + sizeof(math_matrix_4x4) + 2 * sizeof(float), &t, sizeof(t)); draw->coords = &blank_coords; blank_coords.vertices = 4; draw->prim_type = MENU_DISPLAY_PRIM_TRIANGLESTRIP; break; } t += 0.01; #endif } static void menu_display_vk_draw(void *data) { unsigned i; struct vk_buffer_range range; struct vk_texture *texture = NULL; const float *vertex = NULL; const float *tex_coord = NULL; const float *color = NULL; struct vk_vertex *pv = NULL; menu_display_ctx_draw_t *draw = (menu_display_ctx_draw_t*)data; vk_t *vk = (vk_t*)video_driver_get_ptr(false); if (!vk || !draw) return; texture = (struct vk_texture*)draw->texture; vertex = draw->coords->vertex; tex_coord = draw->coords->tex_coord; color = draw->coords->color; if (!vertex) vertex = menu_display_vk_get_default_vertices(); if (!tex_coord) tex_coord = menu_display_vk_get_default_tex_coords(); if (!draw->coords->lut_tex_coord) draw->coords->lut_tex_coord = menu_display_vk_get_default_tex_coords(); if (!texture) texture = &vk->display.blank_texture; if (!color) color = menu_display_vk_get_default_color(); menu_display_vk_viewport(draw); vk->tracker.dirty |= VULKAN_DIRTY_DYNAMIC_BIT; /* Bake interleaved VBO. Kinda ugly, we should probably try to move to * an interleaved model to begin with ... */ if (!vulkan_buffer_chain_alloc(vk->context, &vk->chain->vbo, draw->coords->vertices * sizeof(struct vk_vertex), &range)) return; pv = (struct vk_vertex*)range.data; for (i = 0; i < draw->coords->vertices; i++, pv++) { pv->x = *vertex++; /* Y-flip. Vulkan is top-left clip space */ pv->y = 1.0f - (*vertex++); pv->tex_x = *tex_coord++; pv->tex_y = *tex_coord++; pv->color.r = *color++; pv->color.g = *color++; pv->color.b = *color++; pv->color.a = *color++; } switch (draw->pipeline.id) { #ifdef HAVE_SHADERPIPELINE case VIDEO_SHADER_MENU: case VIDEO_SHADER_MENU_2: case VIDEO_SHADER_MENU_3: case VIDEO_SHADER_MENU_4: case VIDEO_SHADER_MENU_5: { struct vk_draw_triangles call; call.pipeline = vk->display.pipelines[ to_menu_pipeline(draw->prim_type, draw->pipeline.id)]; call.texture = NULL; call.sampler = VK_NULL_HANDLE; call.uniform = draw->pipeline.backend_data; call.uniform_size = draw->pipeline.backend_data_size; call.vbo = &range; call.vertices = draw->coords->vertices; vulkan_draw_triangles(vk, &call); break; } break; #endif default: { struct vk_draw_triangles call; call.pipeline = vk->display.pipelines[ to_display_pipeline(draw->prim_type, vk->display.blend)]; call.texture = texture; call.sampler = texture->mipmap ? vk->samplers.mipmap_linear : (texture->default_smooth ? vk->samplers.linear : vk->samplers.nearest); call.uniform = draw->matrix_data ? draw->matrix_data : menu_display_vk_get_default_mvp(); call.uniform_size = sizeof(math_matrix_4x4); call.vbo = &range; call.vertices = draw->coords->vertices; vulkan_draw_triangles(vk, &call); break; } } } static void menu_display_vk_restore_clear_color(void) { } static void menu_display_vk_clear_color( menu_display_ctx_clearcolor_t *clearcolor) { VkClearRect rect; VkClearAttachment attachment; vk_t *vk = (vk_t*)video_driver_get_ptr(false); if (!vk || !clearcolor) return; memset(&attachment, 0, sizeof(attachment)); memset(&rect, 0, sizeof(rect)); attachment.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; attachment.clearValue.color.float32[0] = clearcolor->r; attachment.clearValue.color.float32[1] = clearcolor->g; attachment.clearValue.color.float32[2] = clearcolor->b; attachment.clearValue.color.float32[3] = clearcolor->a; rect.rect.extent.width = vk->context->swapchain_width; rect.rect.extent.height = vk->context->swapchain_height; rect.layerCount = 1; vkCmdClearAttachments(vk->cmd, 1, &attachment, 1, &rect); } static void menu_display_vk_blend_begin(void) { vk_t *vk = (vk_t*)video_driver_get_ptr(false); vk->display.blend = true; } static void menu_display_vk_blend_end(void) { vk_t *vk = (vk_t*)video_driver_get_ptr(false); vk->display.blend = false; } static bool menu_display_vk_font_init_first( void **font_handle, void *video_data, const char *font_path, float font_size, bool is_threaded) { font_data_t **handle = (font_data_t**)font_handle; *handle = font_driver_init_first(video_data, font_path, font_size, true, is_threaded, FONT_DRIVER_RENDER_VULKAN_API); if (*handle) return true; return false; } menu_display_ctx_driver_t menu_display_ctx_vulkan = { menu_display_vk_draw, menu_display_vk_draw_pipeline, menu_display_vk_viewport, menu_display_vk_blend_begin, menu_display_vk_blend_end, menu_display_vk_restore_clear_color, menu_display_vk_clear_color, menu_display_vk_get_default_mvp, menu_display_vk_get_default_vertices, menu_display_vk_get_default_tex_coords, menu_display_vk_font_init_first, MENU_VIDEO_DRIVER_VULKAN, "menu_display_vulkan", };
Monroe88/RetroArch
menu/drivers_display/menu_display_vulkan.c
C
gpl-3.0
10,637
//http://www.spoj.com/problems/LCS/ #include<iostream> #include<cstdio> #include<map> using namespace std; #define MAXLEN 500000 struct state{ // map<char,int> next;//transition edges for the this state int next[26]; int length; //length of longest string in this equivilence class int suffix_link; //suffix link of this state }; int total=1; int last=0; state automata[2*MAXLEN]; void initializeAutomata(){ /* for(int i=0;i<total;i++) automata[i].next.clear(); */ automata[0].length=0; automata[0].suffix_link=-1; total=1; last=0; } void extendAutomata(char c){ int cur=total++; //update lenght of cur : len(cur) = len(last) + 1 automata[cur].length=automata[last].length+1; int p; //Follow suffix link until p==-1 or state with transition as char c is encounterd for(p=last;p!=-1 && !automata[p].next[c-'a'];p=automata[p].suffix_link) automata[p].next[c-'a']=cur; if(p==-1) automata[cur].suffix_link=0; else{ int q=automata[p].next[c-'a']; if(automata[q].length==automata[p].length+1) automata[cur].suffix_link=q; else{ int clone=total++; automata[clone].length=automata[p].length+1; //automata[clone].next=automata[q].next; copy(automata[q].next,automata[q].next+26,automata[clone].next); automata[clone].suffix_link=automata[q].suffix_link; for(;p!=-1 && automata[p].next[c-'a']==q;p=automata[p].suffix_link) automata[p].next[c-'a']=clone; automata[q].suffix_link=automata[cur].suffix_link=clone; } } last=cur; } int lcs(string str1,string str2){ initializeAutomata(); for(int i=0;i<str1.length();i++) extendAutomata(str1[i]); int l=0,v=0,best=0,bestpos=0; for(int i=0;str2[i]!='\0';i++){ for(;v && !automata[v].next[str2[i]-'a']; v=automata[v].suffix_link,l=automata[v].length); if(automata[v].next[str2[i]-'a']){ v=automata[v].next[str2[i]-'a']; l++; } if(l>best) best=l,bestpos=i; } return best; //cout<<str2.substr(bestpos-best+1,best)<<endl; } int main(){ /* char str1[250000]; char str2[250000]; scanf("%s",str1); scanf("%s",str2); */ string str1,str2; cin>>str1>>str2; cout<<lcs(str1,str2)<<endl; return 0; }
uditsharma7/Algorithms
Strings/Suffix-Automata/lcs.cpp
C++
gpl-3.0
2,173
package de.deepamehta.core.impl; import de.deepamehta.core.DeepaMehtaObject; import de.deepamehta.core.JSONEnabled; import de.deepamehta.core.TopicType; import de.deepamehta.core.model.TopicTypeModel; import de.deepamehta.core.service.Directive; import de.deepamehta.core.service.Directives; import java.util.List; import java.util.logging.Logger; /** * A topic type that is attached to the {@link DeepaMehtaService}. */ class AttachedTopicType extends AttachedType implements TopicType { // ---------------------------------------------------------------------------------------------- Instance Variables private Logger logger = Logger.getLogger(getClass().getName()); // ---------------------------------------------------------------------------------------------------- Constructors AttachedTopicType(TopicTypeModel model, EmbeddedService dms) { super(model, dms); } // -------------------------------------------------------------------------------------------------- Public Methods // ******************************** // *** TopicType Implementation *** // ******************************** @Override public TopicTypeModel getModel() { return (TopicTypeModel) super.getModel(); } @Override public void update(TopicTypeModel model) { logger.info("Updating topic type \"" + getUri() + "\" (new " + model + ")"); // Note: the UPDATE_TOPIC_TYPE directive must be added *before* a possible UPDATE_TOPIC directive (added // by super.update()). In case of a changed type URI the webclient's type cache must be updated *before* // the TopicTypeRenderer can render the type. Directives.get().add(Directive.UPDATE_TOPIC_TYPE, this); // super.update(model); } // ----------------------------------------------------------------------------------------- Package Private Methods // === AttachedTopic Overrides === @Override final String className() { return "topic type"; } // === Implementation of abstract AttachedType methods === @Override final void putInTypeCache() { dms.typeCache.putTopicType(this); } @Override final void removeFromTypeCache() { dms.typeCache.removeTopicType(getUri()); } // --- @Override final Directive getDeleteTypeDirective() { return Directive.DELETE_TOPIC_TYPE; } @Override final List<? extends DeepaMehtaObject> getAllInstances() { return dms.getTopics(getUri(), 0).getItems(); } }
ascherer/deepamehta
modules/dm4-core/src/main/java/de/deepamehta/core/impl/AttachedTopicType.java
Java
gpl-3.0
2,586
<?php /** * Skynet/Renderer/Html//SkynetRendererHtmlConsoleRenderer.php * * @package Skynet * @version 1.1.2 * @author Marcin Szczyglinski <szczyglis83@gmail.com> * @link http://github.com/szczyglinski/skynet * @copyright 2017 Marcin Szczyglinski * @license https://opensource.org/licenses/GPL-3.0 GNU Public License * @since 1.0.0 */ namespace Skynet\Renderer\Html; use Skynet\Console\SkynetConsole; use Skynet\SkynetVersion; /** * Skynet Renderer HTML Console Renderer */ class SkynetRendererHtmlConsoleRenderer { /** @var SkynetRendererHtmlElements HTML Tags generator */ private $elements; /** @var SkynetConsole Console */ private $console; /** @var string[] output from listeners */ private $listenersOutput = []; /** * Constructor */ public function __construct() { $this->elements = new SkynetRendererHtmlElements(); $this->console = new SkynetConsole(); } /** * Assigns Elements Generator * * @param SkynetRendererHtmlElements $elements */ public function assignElements($elements) { $this->elements = $elements; } /** * Assigns output from listeners * * @param string[] $output */ public function setListenersOutput($output) { $this->listenersOutput = $output; } /** * Parses params into select input * * @param mixed[] $params Array of params * * @return string Parsed params */ private function parseCommandParams($params) { $paramsParsed = []; if(is_array($params) && count($params) > 0) { foreach($params as $param) { $paramsParsed[] = $this->elements->getLt().$param.$this->elements->getGt(); } return implode(' or ', $paramsParsed); } } /** * Renders console helpers * * @return string HTML code */ private function renderConsoleHelpers() { $options = []; $options[] = '<option value="0"> -- commands -- </option>'; $commands = $this->console->getCommands(); if(count($commands) > 0) { foreach($commands as $code => $command) { $descStr = ''; if(!empty($command->getHelperDescription())) { $descStr = ' | '.$command->getHelperDescription(); } $params = $this->parseCommandParams($command->getParams()).$descStr; $options[] = '<option value="'.$code.'">'.$code.' '.$params.'</option>'; } } return "<select id='cmdsList' onchange='skynetControlPanel.insertCommand();' name='_cmd1'>".implode('', $options)."</select>"; } /** * Parses input and shows debug * * @param string $input Console raw Input string * * @return string HTML code */ private function parseConsoleInputDebug($input) { $this->console->parseConsoleInput($input); $errors = $this->console->getParserErrors(); $states = $this->console->getParserStates(); $outputs = []; $output = ''; $parsedErrors = ''; $parsedStates = ''; $i = 1; if(is_array($errors) && count($errors) > 0) { $parsedErrors.= $this->elements->addHeaderRow($this->elements->addSubtitle('Parser errors')); foreach($errors as $error) { $parsedErrors.= $this->elements->addValRow('InputParserError #'.$i, $this->elements->addSpan($error, 'error')); $i++; } } if(\SkynetUser\SkynetConfig::get('console_debug')) { $i = 1; if(is_array($states) && count($states) > 0) { $parsedErrors.= $this->elements->addHeaderRow($this->elements->addSubtitle('Parser states')); foreach($states as $state) { $parsedStates.= $this->elements->addValRow('InputParserState #'.$i, $this->elements->addSpan($state, 'yes')); $i++; } } } /* Add output from listeners */ foreach($this->listenersOutput as $listenerOutput) { if(is_string($listenerOutput) && !empty($listenerOutput)) { $outputs[] = $listenerOutput; } elseif(is_array($listenerOutput) && count($listenerOutput) > 0) { foreach($listenerOutput as $addressListenerOutput) { $outputs[] = $addressListenerOutput; } } } $input = str_replace("\r\n", "\n", $input); $input = htmlentities($input); $input = str_replace("\n", $this->elements->getNl(), $input); $input = $this->elements->addHeaderRow($this->elements->addSubtitle('Input query')).$this->elements->addRow($input); if(count($outputs) > 0) { $output = implode("\n", $outputs); $output = str_replace("\r\n", "\n", $output); $output = htmlentities($output); $output = $this->elements->addSectionClass('monits').str_replace("\n", $this->elements->getNl(), $output).$this->elements->addSectionEnd(); $output = $this->elements->addHeaderRow($this->elements->addSubtitle('Output')).$this->elements->addRow($output); } return $output.$parsedErrors.$parsedStates.$input; } /** * Renders and returns console form * * @return string HTML code */ public function renderConsole() { $ajaxSupport = true; $onsubmit = ''; $submit = '<input type="submit" title="Send request commands from console" value="Send request" class="sendBtn" />'; if($ajaxSupport) { $submit = '<input type="button" onclick="skynetControlPanel.load(1, true, \''.basename($_SERVER['PHP_SELF']).'\');" title="Send request commands from console" value="Send request" class="sendBtn" />'; } return '<form method="post" action="#console'.md5(time()).'" name="_skynetCmdConsole" class="_skynetCmdConsole"> '.$submit.$this->renderConsoleHelpers().' See '.$this->elements->addUrl(SkynetVersion::WEBSITE, 'documentation').' for information about console usage <textarea autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" autofocus name="_skynetCmdConsoleInput" placeholder="&gt;&gt; Console" id="_skynetCmdConsoleInput"></textarea> <input type="hidden" name="_skynetCmdCommandSend" value="1" /> </form>'; } /** * Renders sended input * * @return string HTML code */ public function renderConsoleInput() { if(isset($_REQUEST['_skynetCmdConsoleInput'])) { return $this->parseConsoleInputDebug($_REQUEST['_skynetCmdConsoleInput']); } else { return $this->elements->addHeaderRow($this->elements->addSubtitle('Console')).$this->elements->addRow('-- no input --'); } } }
szczyglinski/skynet
src/Skynet/Renderer/Html/SkynetRendererHtmlConsoleRenderer.php
PHP
gpl-3.0
6,629
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <math.h> // EXTERNAL extern int getCookie(char *cookie); extern void putLog (char *, char *); extern int curl (char *url); // EXTERNAL int main(int argc, char **argv) { // We're going to write something anyway printf("Content-Type: text/plain;charset=us-ascii\n\n"); char cookie[128]; float result=0; memset(cookie,0,128); if (getCookie(cookie)) { printf("0\n"); goto end; } // ... char url[256]; memset(url, 0, 256); sprintf(url, "http://rest:9000/getCookieValue?cookie=%s&parameter=lock", cookie); int res; res = curl(url); end: return 0; }
ioan-123/mws
autogen/cgi-bin/cart/cart_check_lock.c
C
gpl-3.0
648
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.12"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>libjade: Class List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">libjade </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.12 --> <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','Search'); }); </script> <div id="main-nav"></div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">Class List</div> </div> </div><!--header--> <div class="contents"> <div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory"> <table class="directory"> <tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_arc_item.html" target="_self">DrawingArcItem</a></td><td class="desc">Provides an arc item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_1_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_curve_item.html" target="_self">DrawingCurveItem</a></td><td class="desc">Provides a curve item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_2_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_ellipse_item.html" target="_self">DrawingEllipseItem</a></td><td class="desc">Provides an ellipse item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_3_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_item.html" target="_self">DrawingItem</a></td><td class="desc">Base class for all graphical items in a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_4_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_item_group.html" target="_self">DrawingItemGroup</a></td><td class="desc">Provides a group item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_5_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_item_point.html" target="_self">DrawingItemPoint</a></td><td class="desc">Represents an interaction point within a <a class="el" href="class_drawing_item.html" title="Base class for all graphical items in a DrawingScene. ">DrawingItem</a> through which the user can resize the item or connect the item to another item </td></tr> <tr id="row_6_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_item_style.html" target="_self">DrawingItemStyle</a></td><td class="desc">Class for managing common item style properties </td></tr> <tr id="row_7_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_line_item.html" target="_self">DrawingLineItem</a></td><td class="desc">Provides a line item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_8_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_path_item.html" target="_self">DrawingPathItem</a></td><td class="desc">Provides a path item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_9_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_polygon_item.html" target="_self">DrawingPolygonItem</a></td><td class="desc">Provides a polygon item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_10_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_polyline_item.html" target="_self">DrawingPolylineItem</a></td><td class="desc">Provides a polyline item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_11_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_rect_item.html" target="_self">DrawingRectItem</a></td><td class="desc">Provides a rectangle item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_12_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_scene.html" target="_self">DrawingScene</a></td><td class="desc">Surface for managing a large number of two-dimensional <a class="el" href="class_drawing_item.html" title="Base class for all graphical items in a DrawingScene. ">DrawingItem</a> objects </td></tr> <tr id="row_13_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_text_ellipse_item.html" target="_self">DrawingTextEllipseItem</a></td><td class="desc">Provides a text ellipse item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_14_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_text_item.html" target="_self">DrawingTextItem</a></td><td class="desc">Provides a text item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_15_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_text_polygon_item.html" target="_self">DrawingTextPolygonItem</a></td><td class="desc">Provides a text polygon item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_16_" class="even"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_text_rect_item.html" target="_self">DrawingTextRectItem</a></td><td class="desc">Provides a text rectangle item that can be added to a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> <tr id="row_17_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_drawing_view.html" target="_self">DrawingView</a></td><td class="desc">Widget for viewing the contents of a <a class="el" href="class_drawing_scene.html" title="Surface for managing a large number of two-dimensional DrawingItem objects. ">DrawingScene</a> </td></tr> </table> </div><!-- directory --> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.12 </small></address> </body> </html>
jaallen85/libjade
docs/annotated.html
HTML
gpl-3.0
10,262
/* * Copyright (C) 2008 Universidade Federal de Campina Grande * * This file is part of Commune. * * Commune 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 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 Lesser General Public License * for more details. * * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * */ package br.edu.ufcg.lsd.commune.functionaltests.data.parametersdeployment; import java.util.Map; import br.edu.ufcg.lsd.commune.api.Remote; @Remote public interface MyInterface43 { public void hereIsMap(Map<String, MyInterface1> mapSerializableToStub); }
OurGrid/commune
src/main/test/br/edu/ufcg/lsd/commune/functionaltests/data/parametersdeployment/MyInterface43.java
Java
gpl-3.0
1,043
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_111) on Mon Apr 17 12:43:34 EDT 2017 --> <title>Uses of Class edu.wright.cs.jfiles.commands.Mv</title> <meta name="date" content="2017-04-17"> <link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class edu.wright.cs.jfiles.commands.Mv"; } } catch(err) { } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../edu/wright/cs/jfiles/commands/Mv.html" title="class in edu.wright.cs.jfiles.commands">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?edu/wright/cs/jfiles/commands/class-use/Mv.html" target="_top">Frames</a></li> <li><a href="Mv.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class edu.wright.cs.jfiles.commands.Mv" class="title">Uses of Class<br>edu.wright.cs.jfiles.commands.Mv</h2> </div> <div class="classUseContainer">No usage of edu.wright.cs.jfiles.commands.Mv</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../../../../overview-summary.html">Overview</a></li> <li><a href="../package-summary.html">Package</a></li> <li><a href="../../../../../../edu/wright/cs/jfiles/commands/Mv.html" title="class in edu.wright.cs.jfiles.commands">Class</a></li> <li class="navBarCell1Rev">Use</li> <li><a href="../package-tree.html">Tree</a></li> <li><a href="../../../../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../../../../index-files/index-1.html">Index</a></li> <li><a href="../../../../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="../../../../../../index.html?edu/wright/cs/jfiles/commands/class-use/Mv.html" target="_top">Frames</a></li> <li><a href="Mv.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
rsanchez-wsu/jfiles
doc/edu/wright/cs/jfiles/commands/class-use/Mv.html
HTML
gpl-3.0
4,381
/******************************************************************************* QueryBuilder.cpp Copyright (C) Victor Olaya 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 "QueryBuilder.h" #include "QueryParser.h" #define METHOD_NEW_SEL 0 #define METHOD_ADD_TO_SEL 1 #define METHOD_SELECT_FROM_SEL 2 CQueryBuilder::CQueryBuilder(void){ Parameters.Set_Name(_TL("Query builder for shapes")); Parameters.Set_Description(_TW("(c) 2004 by Victor Olaya. Query builder for shapes")); Parameters.Add_Shapes(NULL, "SHAPES", _TL("Shapes"), _TL(""), PARAMETER_INPUT); Parameters.Add_String(NULL, "QUERY", _TL("Expression"), _TL(""), _TL("")); Parameters.Add_Choice(NULL, "METHOD", _TL("Method"), _TL(""), _TW( "New selection|" "Add to current selection|" "Select from current selection|"), 0); }//constructor CQueryBuilder::~CQueryBuilder(void){} bool CQueryBuilder::On_Execute(void){ CSG_Shapes *pShapes; CSG_Table *pTable; CSG_String sExpression; CQueryParser *pParser; bool *pRecordWasSelected; int *pSelectedRecords; int iNumSelectedRecords = 0; int iMethod; int iRecord; int i; pShapes = Parameters("SHAPES")->asShapes(); pTable = Parameters("SHAPES")->asTable(); sExpression = Parameters("QUERY")->asString(); iMethod = Parameters("METHOD")->asInt(); pRecordWasSelected = new bool[pTable->Get_Record_Count()]; if (iMethod == METHOD_SELECT_FROM_SEL){ for (i = 0; i < pTable->Get_Record_Count(); i++){ if (pTable->Get_Record(i)->is_Selected()){ pRecordWasSelected[i] = true; }//if else{ pRecordWasSelected[i] = false; }//else }//for }//if if (iMethod != METHOD_ADD_TO_SEL){ for (i = 0; i < pTable->Get_Record_Count(); i++){ if (pTable->Get_Record(i)->is_Selected()){ pTable->Select(i, true); }//if }//for }//if pParser = new CQueryParser(pShapes, sExpression); if( pParser->is_Initialized() ) { iNumSelectedRecords = pParser->GetSelectedRecordsCount(); if( iNumSelectedRecords <= 0 ) { SG_UI_Msg_Add(_TL("No records selected."), true); delete (pRecordWasSelected); return (true); } pSelectedRecords = &pParser->GetSelectedRecords(); for (i = 0; i < iNumSelectedRecords; i++){ iRecord = pSelectedRecords[i]; if (!pTable->Get_Record(iRecord)->is_Selected()){ if (iMethod == METHOD_SELECT_FROM_SEL){ if (pRecordWasSelected[iRecord]){ pTable->Select(iRecord, true); }//if }//if else{ pTable->Select(iRecord, true); }//else }//if }//for pTable = NULL; DataObject_Update(pShapes, true); delete (pRecordWasSelected); return (true); } else { delete (pRecordWasSelected); return (false); } }//method
gregorburger/SAGA-GIS
src/modules/shapes/shapes_tools/QueryBuilder.cpp
C++
gpl-3.0
3,531
# -*- coding: utf-8 -*- """Caliopen mail message privacy features extraction methods.""" from __future__ import absolute_import, print_function, unicode_literals import logging import pgpy from caliopen_main.pi.parameters import PIParameter from .helpers.spam import SpamScorer from .helpers.ingress_path import get_ingress_features from .helpers.importance_level import compute_importance from .types import init_features log = logging.getLogger(__name__) TLS_VERSION_PI = { 'tlsv1/sslv3': 2, 'tls1': 7, 'tlsv1': 7, 'tls12': 10, } PGP_MESSAGE_HEADER = '\n-----BEGIN PGP MESSAGE-----' class InboundMailFeature(object): """Process a parsed mail message and extract available privacy features.""" def __init__(self, message, config): """Get a ``MailMessage`` instance and extract privacy features.""" self.message = message self.config = config self._features = init_features('message') def is_blacklist_mx(self, mx): """MX is blacklisted.""" blacklisted = self.config.get('blacklistes.mx') if not blacklisted: return False if mx in blacklisted: return True return False def is_whitelist_mx(self, mx): """MX is whitelisted.""" whitelistes = self.config.get('whitelistes.mx') if not whitelistes: return False if mx in whitelistes: return True return False @property def internal_domains(self): """Get internal hosts from configuration.""" domains = self.config.get('internal_domains') return domains if domains else [] def emitter_reputation(self, mx): """Return features about emitter.""" if self.is_blacklist_mx(mx): return 'blacklisted' if self.is_whitelist_mx(mx): return 'whitelisted' return 'unknown' def emitter_certificate(self): """Get the certificate from emitter.""" return None @property def mail_agent(self): """Get the mailer used for this message.""" # XXX normalize better and more ? return self.message.mail.get('X-Mailer', '').lower() @property def transport_signature(self): """Get the transport signature if any.""" return self.message.mail.get('DKIM-Signature') @property def spam_informations(self): """Return a global spam_score and related features.""" spam = SpamScorer(self.message.mail) return {'spam_score': spam.score, 'spam_method': spam.method, 'is_spam': spam.is_spam} @property def is_internal(self): """Return true if it's an internal message.""" from_ = self.message.mail.get('From') for domain in self.internal_domains: if domain in from_: return True return False def get_signature_informations(self): """Get message signature features.""" signed_parts = [x for x in self.message.attachments if 'pgp-sign' in x.content_type] if not signed_parts: return {} sign = pgpy.PGPSignature() features = {'message_signed': True, 'message_signature_type': 'PGP'} try: sign.parse(signed_parts[0].data) features.update({'message_signer': sign.signer}) except Exception as exc: log.error('Unable to parse pgp signature {}'.format(exc)) return features def get_encryption_informations(self): """Get message encryption features.""" is_encrypted = False if 'encrypted' in self.message.extra_parameters: is_encrypted = True # Maybe pgp/inline ? if not is_encrypted: try: body = self.message.body_plain.decode('utf-8') if body.startswith(PGP_MESSAGE_HEADER): is_encrypted = True except UnicodeDecodeError: log.warn('Invalid body_plain encoding for message') pass return {'message_encrypted': is_encrypted, 'message_encryption_method': 'pgp' if is_encrypted else ''} def _get_features(self): """Extract privacy features.""" features = self._features.copy() received = self.message.headers.get('Received', []) features.update(get_ingress_features(received, self.internal_domains)) mx = features.get('ingress_server') reputation = None if not mx else self.emitter_reputation(mx) features['mail_emitter_mx_reputation'] = reputation features['mail_emitter_certificate'] = self.emitter_certificate() features['mail_agent'] = self.mail_agent features['is_internal'] = self.is_internal features.update(self.get_signature_informations()) features.update(self.get_encryption_informations()) features.update(self.spam_informations) if self.transport_signature: features.update({'transport_signed': True}) return features def _compute_pi(self, participants, features): """Compute Privacy Indexes for a message.""" log.info('PI features {}'.format(features)) pi_cx = {} # Contextual privacy index pi_co = {} # Comportemental privacy index pi_t = {} # Technical privacy index reput = features.get('mail_emitter_mx_reputation') if reput == 'whitelisted': pi_cx['reputation_whitelist'] = 20 elif reput == 'unknown': pi_cx['reputation_unknow'] = 10 known_contacts = [] known_public_key = 0 for part, contact in participants: if contact: known_contacts.append(contact) if contact.public_key: known_public_key += 1 if len(participants) == len(known_contacts): # - Si tous les contacts sont déjà connus le PIᶜˣ # augmente de la valeur du PIᶜᵒ le plus bas des PIᶜᵒ des contacts. contact_pi_cos = [x.pi['comportment'] for x in known_contacts if x.pi and 'comportment' in x.pi] if contact_pi_cos: pi_cx['known_contacts'] = min(contact_pi_cos) if known_public_key == len(known_contacts): pi_co['contact_pubkey'] = 20 ext_hops = features.get('nb_external_hops', 0) if ext_hops <= 1: tls = features.get('ingress_socket_version') if tls: if tls not in TLS_VERSION_PI: log.warn('Unknown TLS version {}'.format(tls)) else: pi_t += TLS_VERSION_PI[tls] if features.get('mail_emitter_certificate'): pi_t['emitter_certificate'] = 10 if features.get('transport_signed'): pi_t['transport_signed'] = 10 if features.get('message_encrypted'): pi_t['encrypted'] = 30 log.info('PI compute t:{} cx:{} co:{}'.format(pi_t, pi_cx, pi_co)) return PIParameter({'technic': sum(pi_t.values()), 'context': sum(pi_cx.values()), 'comportment': sum(pi_co.values()), 'version': 0}) def process(self, user, message, participants): """ Process the message for privacy features and PI compute. :param user: user the message belong to :ptype user: caliopen_main.user.core.User :param message: a message parameter that will be updated with PI :ptype message: NewMessage :param participants: an array of participant with related Contact :ptype participants: list(Participant, Contact) """ features = self._get_features() message.pi = self._compute_pi(participants, features) il = compute_importance(user, message, features, participants) message.privacy_features = features message.importance_level = il
CaliOpen/CaliOpen
src/backend/components/py.pi/caliopen_pi/features/mail.py
Python
gpl-3.0
8,082
# .emacs.d My emacs configuration
aalmiramolla/.emacs.d
README.md
Markdown
gpl-3.0
34
package com.games.elnino.counter; public class roundSaver { private int points; private boolean thisOneFinished; private boolean moreThanOneFinished; public roundSaver(int points, boolean thisOneFinished, boolean moreThanOneFinished) { this.points = points; this.thisOneFinished = thisOneFinished; this.moreThanOneFinished = moreThanOneFinished; } public int getPoints() { return points; } public boolean hasThisOneFinished() { return thisOneFinished; } public void setThisOneFinished(boolean thisOneFinished) { this.thisOneFinished = thisOneFinished; } public boolean hasMoreThanOneFinished() { return moreThanOneFinished; } public void setMoreThanOneFinished(boolean moreThanOneFinished) { this.moreThanOneFinished = moreThanOneFinished; } }
me-el-nino/card-game-helper
app/src/main/java/com/games/elnino/counter/roundSaver.java
Java
gpl-3.0
877
//****************************************************************************** // MSP430G2xx3 Demo - Timer_A, Toggle P1.0, CCR0 Up Mode ISR, DCO SMCLK // // Description: Toggle P1.0 using software and TA_0 ISR. Timer_A is // configured for up mode, thus the timer overflows when TAR counts to CCR0. // In this example CCR0 is loaded with 50000. // ACLK = n/a, MCLK = SMCLK = TACLK = default DCO // // // MSP430G2xx3 // --------------- // /|\| XIN|- // | | | // --|RST XOUT|- // | | // | P1.2|-->LED // // D. Dang // Texas Instruments Inc. // December 2010 // Built with CCS Version 4.2.0 and IAR Embedded Workbench Version: 5.10 //****************************************************************************** #include <msp430.h> char i=0; int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop WDT P1DIR |= 0x04; // P1.2 output CCTL0 = CCIE; // CCR0 interrupt enabled CCR0 = 50000; TACTL = TASSEL_2 + MC_1; // SMCLK, upmode __bis_SR_register(LPM0_bits + GIE); // Enter LPM0 w/ interrupt } #pragma vector=TIMER0_A0_VECTOR __interrupt void Timer_A (void) { i++; if (i>=10) { P1OUT ^= 0x04; // Toggle P1.2 i = 0; } }
e135193/MSP430G-Lauchpad
Ders 4/main.c
C
gpl-3.0
1,444
\hypertarget{namespacewebsocketpp_1_1extensions_1_1permessage__deflate}{}\section{websocketpp\+:\+:extensions\+:\+:permessage\+\_\+deflate Namespace Reference} \label{namespacewebsocketpp_1_1extensions_1_1permessage__deflate}\index{websocketpp\+::extensions\+::permessage\+\_\+deflate@{websocketpp\+::extensions\+::permessage\+\_\+deflate}} Implementation of the draft permessage-\/deflate Web\+Socket extension. \subsection*{Namespaces} \begin{DoxyCompactItemize} \item \hyperlink{namespacewebsocketpp_1_1extensions_1_1permessage__deflate_1_1error}{error} \begin{DoxyCompactList}\small\item\em Permessage deflate error values. \end{DoxyCompactList}\end{DoxyCompactItemize} \subsection*{Classes} \begin{DoxyCompactItemize} \item class \hyperlink{classwebsocketpp_1_1extensions_1_1permessage__deflate_1_1disabled}{disabled} \begin{DoxyCompactList}\small\item\em Stub class for use when disabling \hyperlink{namespacewebsocketpp_1_1extensions_1_1permessage__deflate}{permessage\+\_\+deflate} extension. \end{DoxyCompactList}\item class \hyperlink{classwebsocketpp_1_1extensions_1_1permessage__deflate_1_1enabled}{enabled} \end{DoxyCompactItemize} \subsection{Detailed Description} Implementation of the draft permessage-\/deflate Web\+Socket extension. \paragraph*{permessage-\/deflate interface} {\bfseries is\+\_\+implemented}~\newline {\ttfamily bool is\+\_\+implemented()}~\newline Returns whether or not the object implements the extension or not {\bfseries is\+\_\+enabled}~\newline {\ttfamily bool is\+\_\+enabled()}~\newline Returns whether or not the extension was negotiated for the current connection {\bfseries generate\+\_\+offer}~\newline {\ttfamily std\+::string generate\+\_\+offer() const}~\newline Create an extension offer string based on local policy {\bfseries validate\+\_\+response}~\newline {\ttfamily lib\+::error\+\_\+code validate\+\_\+response(http\+::attribute\+\_\+list const \& response)}~\newline Negotiate the parameters of extension use {\bfseries negotiate}~\newline {\ttfamily err\+\_\+str\+\_\+pair negotiate(http\+::attribute\+\_\+list const \& attributes)}~\newline Negotiate the parameters of extension use {\bfseries compress}~\newline {\ttfamily lib\+::error\+\_\+code compress(std\+::string const \& in, std\+::string \& out)}~\newline Compress the bytes in {\ttfamily in} and append them to {\ttfamily out} {\bfseries decompress}~\newline {\ttfamily lib\+::error\+\_\+code decompress(uint8\+\_\+t const $\ast$ buf, size\+\_\+t len, std\+::string \& out)}~\newline Decompress {\ttfamily len} bytes from {\ttfamily buf} and append them to string {\ttfamily out}
nsol-nmsu/ndnSIM
docs/icens/latex/namespacewebsocketpp_1_1extensions_1_1permessage__deflate.tex
TeX
gpl-3.0
2,623
@font-face { font-family: 'Lato'; font-style: normal; font-weight: 400; src: local('Lato Regular'), local('Lato-Regular'), url(//fonts.gstatic.com/s/lato/v11/v0SdcGFAl2aezM9Vq_aFTQ.ttf) format('truetype'); } @font-face { font-family: 'Lato'; font-style: normal; font-weight: 700; src: local('Lato Bold'), local('Lato-Bold'), url(//fonts.gstatic.com/s/lato/v11/DvlFBScY1r-FMtZSYIYoYw.ttf) format('truetype'); } @font-face { font-family: 'Lato'; font-style: italic; font-weight: 400; src: local('Lato Italic'), local('Lato-Italic'), url(//fonts.gstatic.com/s/lato/v11/LqowQDslGv4DmUBAfWa2Vw.ttf) format('truetype'); } @font-face { font-family: 'Lato'; font-style: italic; font-weight: 700; src: local('Lato Bold Italic'), local('Lato-BoldItalic'), url(//fonts.gstatic.com/s/lato/v11/HkF_qI1x_noxlxhrhMQYEKCWcynf_cDxXwCLxiixG1c.ttf) format('truetype'); }
librenms/librenms-summit
html/css/Lato.css
CSS
gpl-3.0
884
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2019-11-21 04:58 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('posgradmin', '0039_auto_20191120_2249'), ] operations = [ migrations.AlterModelOptions( name='profesor', options={'ordering': ['user__first_name', 'user__last_name'], 'verbose_name_plural': 'Profesores'}, ), ]
sostenibilidad-unam/posgrado
posgradmin/posgradmin/migrations/0040_auto_20191120_2258.py
Python
gpl-3.0
484
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="fr"> <head> <!-- Generated by javadoc (1.8.0_77) on Fri Apr 22 11:15:23 CEST 2016 --> <title>ensg.tsig.chimn.dao</title> <meta name="date" content="2016-04-22"> <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../../script.js"></script> </head> <body> <h1 class="bar"><a href="../../../../ensg/tsig/chimn/dao/package-summary.html" target="classFrame">ensg.tsig.chimn.dao</a></h1> <div class="indexContainer"> <h2 title="Interfaces">Interfaces</h2> <ul title="Interfaces"> <li><a href="CommandeDao.html" title="interface in ensg.tsig.chimn.dao" target="classFrame"><span class="interfaceName">CommandeDao</span></a></li> <li><a href="CriteriaDao.html" title="interface in ensg.tsig.chimn.dao" target="classFrame"><span class="interfaceName">CriteriaDao</span></a></li> <li><a href="MetaDataDao.html" title="interface in ensg.tsig.chimn.dao" target="classFrame"><span class="interfaceName">MetaDataDao</span></a></li> <li><a href="ParametersDao.html" title="interface in ensg.tsig.chimn.dao" target="classFrame"><span class="interfaceName">ParametersDao</span></a></li> <li><a href="PreferenceFormatDao.html" title="interface in ensg.tsig.chimn.dao" target="classFrame"><span class="interfaceName">PreferenceFormatDao</span></a></li> <li><a href="PreferenceServiceDao.html" title="interface in ensg.tsig.chimn.dao" target="classFrame"><span class="interfaceName">PreferenceServiceDao</span></a></li> <li><a href="PreferenceSRSDao.html" title="interface in ensg.tsig.chimn.dao" target="classFrame"><span class="interfaceName">PreferenceSRSDao</span></a></li> </ul> </div> </body> </html>
TSIG15/CHIMN
doc/javadoc/ensg/tsig/chimn/dao/package-frame.html
HTML
gpl-3.0
1,798
--- title: "ऑनलाइन लीक हुई उड़ता पंजाब!" layout: item category: ["entertainment"] date: 2016-06-15T14:49:43.022Z image: 1466002183021udta.jpg --- <p>नई दिल्ली: बॉलीवुड फिल्म उड़ता पंजाब के ऑनलाइन लीक होने की बात कही जा रही है। बॉलीवुडलाइफ की रिपोर्ट के मुताबिक, पिछले कई दिनों से सेंसर बोर्ड से विवाद के चलते सुर्खियों में रहने वाली अभिषेक चौबे की फिल्म उड़ता पंजाब रिलीज से दो दिन पहले ही ऑनलाइन लीक हो गई है। गौरतलब है कि फिल्म को 17 जून को रिलीज होना है। इस फिल्म में शाहिद कपूर, आलिया भट्ट, करीना कपूर और दिलजीत दोसांझ मुख्य भूमिका में हैं। फिल्म को लेकर निर्माताओं का केंद्रीय फिल्म प्रमाणन बोर्ड (सीबीएफसी) के साथ विवाद चल रहा था। बॉम्हे हाई कोर्ट ने ने फिल्म में पेशाब करने के एक दृश्य हटाने और संशोधित घोषणा दिखाने का आदेश के साथ रिलीज करने का आदेश दिया था। सीबीएफसी की समीक्षा समिति के छह जून के आदेश को खारिज और दरकिनार किया जाता है जिसमें फिल्म में कुल 13 बदलाव करने के निर्देश दिए गए थे।’ </p>
InstantKhabar/_source
_source/news/2016-06-15-udta.html
HTML
gpl-3.0
2,134
Initiapp::Application.configure do # Settings specified here will take precedence over those in config/application.rb. # In the development environment your application's code is reloaded on # every request. This slows down response time but is perfect for development # since you don't have to restart the web server when you make code changes. config.cache_classes = false # Do not eager load code on boot. config.eager_load = false # Show full error reports and disable caching. config.consider_all_requests_local = true config.action_controller.perform_caching = false # Don't care if the mailer can't send. config.action_mailer.raise_delivery_errors = false # Send mails to mailcatcher. config.action_mailer.smtp_settings = { port: 1025 } # Set host for URLs in mails. config.action_mailer.default_url_options = { host: 'localhost:3000' } # Use a global email sender. config.action_mailer.default_options = { from: "mail@example.org" } # Print deprecation notices to the Rails logger. config.active_support.deprecation = :log # Raise an error on page load if there are pending migrations config.active_record.migration_error = :page_load # Debug mode disables concatenation and preprocessing of assets. # This option may cause significant delays in view rendering with a large # number of complex assets. config.assets.debug = true end
robwa/initiapp
config/environments/development.rb
Ruby
gpl-3.0
1,409
<form class="standard_form" data-action="do_admin_save_word_filter"> <?php if($val('filter.id')): ?> <input type="hidden" name="id" value="<?php $esc($val('filter.id')); ?>" /> <?php endif; ?> <label for="word"><?php $lang('word_filter_word'); ?></label> <input type="text" name="word" id="word" value="<?php $esc($val('filter.word')); ?>" /> <p><?php $lang('word_filter_word_instr'); ?></p> <label for="replacement""><?php $lang('word_filter_replacement'); ?></label> <input type="text" name="replacement" id="replacement" value="<?php $esc($val('filter.replacement')); ?>" /> <p><?php $lang('word_filter_replacement_instr'); ?></p> <label for="whole_word_only"><?php $lang('word_filter_whole_word'); ?></label> <input type="checkbox" name="whole_word_only" id="whole_word_only" <?php if($val('room.whole_word_only')) echo "checked"; ?> /> <p><?php $lang('word_filter_whole_word_instr'); ?></p> <input type="submit" value="<?php $lang('word_filter_save_button'); ?>" /> </form>
tjchamne/x7chat
templates/default/components/admin/word_filter_form.php
PHP
gpl-3.0
1,017
#!/bin/sh printfix() { cat <<"FIX" The "openldap-servers" package should be removed if not in use. Is this machine the OpenLDAP server? If not, remove the package. # yum erase openldap-serversThe openldap-servers RPM is not installed by default on RHEL6 machines. It is needed only by the OpenLDAP server, not by the clients which use LDAP for authentication. If the system is not intended for use as an LDAP Server it should be removed. FIX } printdescription() { cat <<"DESCRIPTION" Unnecessary packages should not be installed to decrease the attack surface of the system. DESCRIPTION } printtitle() { cat <<"TITLE" The openldap-servers package must not be installed unless required. TITLE } printid() { cat <<"ID" V-38627 ID } printseverity() { cat <<"SEVERITY" low SEVERITY }
Taywee/dod-stig-scripts
linux/V-38627/vars.sh
Shell
gpl-3.0
806
/** * @module main application controller * @description Runs socket.io and static http server, listens for client connections and directs user/room instances. * * @author cemckinley <cemckinley@gmail.com> * @copyright Copyright (c) 2013 Author, contributors * @license GPL v3 */ var fs = require('fs'), https = require('https'), socketio = require('socket.io'), config = require('./config/env'), db = require('./controllers/db'), SessionHandler = require('./controllers/session-handler'), globalEvents = require('./controllers/global-events'), User = require('./controllers/user'); var nodeMud = (function(){ /** properties **/ var httpsOptions = { key: fs.readFileSync(config.ssl.keyPath), cert: fs.readFileSync(config.ssl.certPath), passphrase: config.ssl.passphrase }, httpsServer = https.createServer(httpsOptions, _httpsHandler).listen(config.socket.port), // server for socket.io socket io = socketio.listen(httpsServer); // websocket /** functions **/ function init(){ db.connect(); // event listeners io.sockets.on('connection', _onClientConnect); globalEvents.on('userAuth', _onClientAuth); } function _httpsHandler(req, res){ res.writeHead(200); res.end(); } function _onClientConnect(socket){ var client = new SessionHandler(socket); } function _onClientAuth(userData, clientSocket){ var user = new User(clientSocket, userData); clientSocket.emit('message', userData.name + 'successful user auth'); } /** PUBLIC API **/ return { init: init }; }()); nodeMud.init();
cemckinley/node-mud
server/app.js
JavaScript
gpl-3.0
1,571
/******************************************************************************* * Copyright (c) 2014, 2015 Scott Clarke (scott@dawg6.com). * * This file is part of Dawg6's Common GWT Libary. * * Dawg6's Common GWT Libary 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. * * Dawg6's Common GWT Libary 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 com.dawg6.gwt.client.widgets; import java.util.List; import java.util.Vector; import com.dawg6.gwt.common.util.AsyncTaskHandler; import com.dawg6.gwt.common.util.DefaultCallback; import com.dawg6.gwt.common.util.ObservableList; import com.dawg6.gwt.common.util.ObservableListInterface; import com.google.gwt.event.dom.client.ChangeEvent; import com.google.gwt.event.dom.client.ChangeHandler; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.rpc.AsyncCallback; import com.google.gwt.user.client.ui.ListBox; public abstract class GenericComboBox<T> extends ListBox implements ObservableListInterface<T> { protected final ObservableList<T> list = new ObservableList<T>(); private final List<SelectionChangedHandler<T>> selectionChangedHandlers = new Vector<SelectionChangedHandler<T>>(); public interface SelectionChangedHandler<T> { void selectionChanged(T value); } public GenericComboBox() { this.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { selectionChanged(); } }); this.addChangeHandler(new ChangeHandler() { @Override public void onChange(ChangeEvent event) { selectionChanged(); } }); } public void addSelectionChangedHandler(SelectionChangedHandler<T> handler) { if (!selectionChangedHandlers.contains(handler)) selectionChangedHandlers.add(handler); } protected void selectionChanged() { T value = getSelectedItem(); for (SelectionChangedHandler<T> h : selectionChangedHandlers) h.selectionChanged(value); } public void removeSelectionChangedHandler(SelectionChangedHandler<T> handler) { selectionChangedHandlers.remove(handler); } @Override public void onLoad() { refresh(); } protected abstract void loadObjects(AsyncCallback<List<T>> handler); @Override public void clear() { super.clear(); list.clear(); } public void refresh(AsyncTaskHandler handler) { final T item = getSelectedItem(); loadObjects(new DefaultCallback<List<T>>(handler) { @Override public void doOnSuccess(List<T> result) { loadObjects(result); setSelectedItem(item); } }); } public void refresh() { refresh(null); } protected void loadObjects(List<T> result) { clear(); if ((result == null) || result.isEmpty()) { super.addItem(this.getEmptyText(), (String)null); list.add(null); } else { list.addAll(result); for (T item : result) { String text = getDisplayText(item); super.addItem(text, getId(item).toString()); } } super.setSelectedIndex(0); } protected abstract String getDisplayText(T type); public T getSelectedItem() { int index = getSelectedIndex(); if (index < 0) return null; return list.get(index); } public void setSelectedItem(T item) { if (item == null) { this.setSelectedIndex(0); return; } setSelectedId(getId(item)); } @Override public void addObserver( ObservableListInterface.ListChangedHandler<T> handler) { list.addObserver(handler); } @Override public void removeObserver( ObservableListInterface.ListChangedHandler<T> handler) { list.removeObserver(handler); } public void setSelectedId(String id) { if (id == null) { this.setSelectedIndex(0); return; } int count = this.getItemCount(); for (int i = 0; i < count; i++) { String text = this.getValue(i); if (id.equals(text)) { this.setSelectedIndex(i); return; } } this.setSelectedIndex(0); } public T getItem(int i) { return list.get(i); } @Override public void removeItem(int i) { super.removeItem(i); list.remove(i); } public void insertItem(T item, int i) { if (item == null) { super.addItem(getEmptyText(), (String)null); } else { String text = getDisplayText(item); super.insertItem(text, getId(item), i); } list.add(i, item); } public void addItem(T item) { if (item == null) { super.addItem(getEmptyText(), (String)null); } else { String text = getDisplayText(item); super.addItem(text, getId(item)); } list.add(item); } public void addAll(List<T> items) { for (T item : items) { if (item == null) { super.addItem(getEmptyText(), (String)null); } else { String text = getDisplayText(item); super.addItem(text, getId(item)); } } list.addAll(items); } public abstract String getEmptyText(); public abstract String getId(T value); }
dawg6/dawg6-gwt-common
src/com/dawg6/gwt/client/widgets/GenericComboBox.java
Java
gpl-3.0
5,450
// Copyright 2013-2021, University of Colorado Boulder /** * View for the 'Macro' screen. * * @author Chris Malley (PixelZoom, Inc.) */ import Property from '../../../../axon/js/Property.js'; import ScreenView from '../../../../joist/js/ScreenView.js'; import merge from '../../../../phet-core/js/merge.js'; import ModelViewTransform2 from '../../../../phetcommon/js/view/ModelViewTransform2.js'; import ResetAllButton from '../../../../scenery-phet/js/buttons/ResetAllButton.js'; import EyeDropperNode from '../../../../scenery-phet/js/EyeDropperNode.js'; import { Node } from '../../../../scenery/js/imports.js'; import Tandem from '../../../../tandem/js/Tandem.js'; import Water from '../../common/model/Water.js'; import PHScaleConstants from '../../common/PHScaleConstants.js'; import BeakerNode from '../../common/view/BeakerNode.js'; import DrainFaucetNode from '../../common/view/DrainFaucetNode.js'; import DropperFluidNode from '../../common/view/DropperFluidNode.js'; import FaucetFluidNode from '../../common/view/FaucetFluidNode.js'; import PHDropperNode from '../../common/view/PHDropperNode.js'; import SoluteComboBox from '../../common/view/SoluteComboBox.js'; import SolutionNode from '../../common/view/SolutionNode.js'; import VolumeIndicatorNode from '../../common/view/VolumeIndicatorNode.js'; import WaterFaucetNode from '../../common/view/WaterFaucetNode.js'; import phScale from '../../phScale.js'; import MacroPHMeterNode from './MacroPHMeterNode.js'; import NeutralIndicatorNode from './NeutralIndicatorNode.js'; class MacroScreenView extends ScreenView { /** * @param {MacroModel} model * @param {ModelViewTransform2} modelViewTransform * @param {Tandem} tandem */ constructor( model, modelViewTransform, tandem ) { assert && assert( tandem instanceof Tandem, 'invalid tandem' ); assert && assert( modelViewTransform instanceof ModelViewTransform2, 'invalid modelViewTransform' ); super( merge( {}, PHScaleConstants.SCREEN_VIEW_OPTIONS, { tandem: tandem } ) ); // beaker const beakerNode = new BeakerNode( model.beaker, modelViewTransform, { tandem: tandem.createTandem( 'beakerNode' ) } ); // solution in the beaker const solutionNode = new SolutionNode( model.solution, model.beaker, modelViewTransform ); // volume indicator on the right edge of beaker const volumeIndicatorNode = new VolumeIndicatorNode( model.solution.totalVolumeProperty, model.beaker, modelViewTransform, { tandem: tandem.createTandem( 'volumeIndicatorNode' ) } ); // Neutral indicator that appears in the bottom of the beaker. const neutralIndicatorNode = new NeutralIndicatorNode( model.solution, { tandem: tandem.createTandem( 'neutralIndicatorNode' ) } ); // dropper const DROPPER_SCALE = 0.85; const dropperNode = new PHDropperNode( model.dropper, modelViewTransform, { visibleProperty: model.dropper.visibleProperty, tandem: tandem.createTandem( 'dropperNode' ) } ); dropperNode.setScaleMagnitude( DROPPER_SCALE ); const dropperFluidNode = new DropperFluidNode( model.dropper, model.beaker, DROPPER_SCALE * EyeDropperNode.TIP_WIDTH, modelViewTransform, { visibleProperty: model.dropper.visibleProperty } ); // faucets const waterFaucetNode = new WaterFaucetNode( model.waterFaucet, modelViewTransform, { tandem: tandem.createTandem( 'waterFaucetNode' ) } ); const drainFaucetNode = new DrainFaucetNode( model.drainFaucet, modelViewTransform, { tandem: tandem.createTandem( 'drainFaucetNode' ) } ); // fluids coming out of faucets const WATER_FLUID_HEIGHT = model.beaker.position.y - model.waterFaucet.position.y; const DRAIN_FLUID_HEIGHT = 1000; // tall enough that resizing the play area is unlikely to show bottom of fluid const waterFluidNode = new FaucetFluidNode( model.waterFaucet, new Property( Water.color ), WATER_FLUID_HEIGHT, modelViewTransform ); const drainFluidNode = new FaucetFluidNode( model.drainFaucet, model.solution.colorProperty, DRAIN_FLUID_HEIGHT, modelViewTransform ); // Hide fluids when their faucets are hidden. See https://github.com/phetsims/ph-scale/issues/107 waterFaucetNode.visibleProperty.lazyLink( () => { waterFaucetNode.visibile = waterFaucetNode.visible; } ); drainFluidNode.visibleProperty.lazyLink( () => { waterFaucetNode.visibile = drainFluidNode.visible; } ); // pH meter const pHMeterNode = new MacroPHMeterNode( model.pHMeter, model.solution, model.dropper, solutionNode, dropperFluidNode, waterFluidNode, drainFluidNode, modelViewTransform, { tandem: tandem.createTandem( 'pHMeterNode' ) } ); // solutes combo box const soluteListParent = new Node(); const soluteComboBox = new SoluteComboBox( model.solutes, model.dropper.soluteProperty, soluteListParent, { maxWidth: 400, tandem: tandem.createTandem( 'soluteComboBox' ) } ); const resetAllButton = new ResetAllButton( { scale: 1.32, listener: () => { this.interruptSubtreeInput(); model.reset(); }, tandem: tandem.createTandem( 'resetAllButton' ) } ); // Parent for all nodes added to this screen const rootNode = new Node( { children: [ // nodes are rendered in this order waterFluidNode, waterFaucetNode, drainFluidNode, drainFaucetNode, dropperFluidNode, dropperNode, solutionNode, beakerNode, neutralIndicatorNode, volumeIndicatorNode, soluteComboBox, resetAllButton, pHMeterNode, // next to last so that probe doesn't get lost behind anything soluteListParent // last, so that combo box list is on top ] } ); this.addChild( rootNode ); // Layout of nodes that don't have a position specified in the model soluteComboBox.left = modelViewTransform.modelToViewX( model.beaker.left ) - 20; // anchor on left so it grows to the right during i18n soluteComboBox.top = this.layoutBounds.top + 15; neutralIndicatorNode.centerX = beakerNode.centerX; neutralIndicatorNode.bottom = beakerNode.bottom - 30; resetAllButton.right = this.layoutBounds.right - 40; resetAllButton.bottom = this.layoutBounds.bottom - 20; model.isAutofillingProperty.link( () => dropperNode.interruptSubtreeInput() ); } } phScale.register( 'MacroScreenView', MacroScreenView ); export default MacroScreenView;
phetsims/ph-scale
js/macro/view/MacroScreenView.js
JavaScript
gpl-3.0
6,534
// $Id: TreeModelComposite.java 13829 2007-11-23 23:54:26Z tfmorris $ // Copyright (c) 1996-2006 The Regents of the University of California. All // Rights Reserved. Permission to use, copy, modify, and distribute this // software and its documentation without fee, and without a written // agreement is hereby granted, provided that the above copyright notice // and this paragraph appear in all copies. This software program and // documentation are copyrighted by The Regents of the University of // California. The software program and documentation are supplied "AS // IS", without any accompanying services from The Regents. The Regents // does not warrant that the operation of the program will be // uninterrupted or error-free. The end-user understands that the program // was developed for research purposes and is advised not to rely // exclusively on the program for any reason. IN NO EVENT SHALL THE // UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, // SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, // ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF // THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF // SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE // PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF // CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, // UPDATES, ENHANCEMENTS, OR MODIFICATIONS. package org.argouml.ui; import javax.swing.tree.TreeModel; import javax.swing.tree.TreePath; import org.apache.log4j.Logger; /** * This class is the TreeModel for the navigator and todo list panels.<p> * * It is called <strong>Composite</strong> because there are a set of rules * that determine how to link parents to children in the tree. Those * rules can now be found in PerspectiveSupport.<p> */ public class TreeModelComposite extends TreeModelSupport implements TreeModel { private static final Logger LOG = Logger.getLogger(TreeModelComposite.class); /** The root of the model. */ private Object root; /** * The constructor. * * @param name the name that will be localized */ public TreeModelComposite(String name) { super(name); } /* * @see javax.swing.tree.TreeModel#getRoot() */ public Object getRoot() { return root; } /* * @see javax.swing.tree.TreeModel#getChild(java.lang.Object, int) */ public Object getChild(Object parent, int index) { for (TreeModel tm : getGoRuleList()) { int childCount = tm.getChildCount(parent); if (index < childCount) { return tm.getChild(parent, index); } index -= childCount; } return null; } /* * @see javax.swing.tree.TreeModel#getChildCount(java.lang.Object) */ public int getChildCount(Object parent) { int childCount = 0; for (TreeModel tm : getGoRuleList()) { childCount += tm.getChildCount(parent); } return childCount; } /* * @see javax.swing.tree.TreeModel#getIndexOfChild(java.lang.Object, * java.lang.Object) */ public int getIndexOfChild(Object parent, Object child) { int childCount = 0; for (TreeModel tm : getGoRuleList()) { int childIndex = tm.getIndexOfChild(parent, child); if (childIndex != -1) { return childIndex + childCount; } childCount += tm.getChildCount(parent); } LOG.debug("child not found!"); //The child is sometimes not found when the tree is being updated return -1; } /* * @see javax.swing.tree.TreeModel#isLeaf(java.lang.Object) */ public boolean isLeaf(Object node) { for (TreeModel tm : getGoRuleList()) { if (!tm.isLeaf(node)) { return false; } } return true; } /* * @see javax.swing.tree.TreeModel#valueForPathChanged(javax.swing.tree.TreePath, java.lang.Object) */ public void valueForPathChanged(TreePath path, Object newValue) { // Empty implementation - not used. } /** * @param r the root of the model */ public void setRoot(Object r) { root = r; } }
ckaestne/LEADT
workspace/argouml_diagrams/argouml-app/src/org/argouml/ui/TreeModelComposite.java
Java
gpl-3.0
4,656
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License This file is part of OpenFOAM. OpenFOAM 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. OpenFOAM 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 OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Application decomposePar Description Automatically decomposes a mesh and fields of a case for parallel execution of OpenFOAM. Usage - decomposePar [OPTION] @param -cellDist \n Write the cell distribution as a labelList for use with 'manual' decomposition method and as a volScalarField for post-processing. @param -region regionName \n Decompose named region. Does not check for existence of processor*. @param -copyUniform \n Copy any @a uniform directories too. @param -fields \n Use existing geometry decomposition and convert fields only. @param -filterPatches \n Remove empty patches when decomposing the geometry. @param -force \n Remove any existing @a processor subdirectories before decomposing the geometry. @param -ifRequired \n Only decompose the geometry if the number of domains has changed from a previous decomposition. No @a processor subdirectories will be removed unless the @a -force option is also specified. This option can be used to avoid redundant geometry decomposition (eg, in scripts), but should be used with caution when the underlying (serial) geometry or the decomposition method etc. have been changed between decompositions. @param -case \<dir\> \n Case directory. @param -help \n Display help message. @param -doc \n Display Doxygen API documentation page for this application. @param -srcDoc \n Display Doxygen source documentation page for this application. \*---------------------------------------------------------------------------*/ #include <OpenFOAM/OSspecific.H> #include <finiteVolume/fvCFD.H> #include <OpenFOAM/IOobjectList.H> #include <finiteVolume/processorFvPatchFields.H> #include "domainDecomposition.H" #include <OpenFOAM/labelIOField.H> #include <OpenFOAM/scalarIOField.H> #include <OpenFOAM/vectorIOField.H> #include <OpenFOAM/sphericalTensorIOField.H> #include <OpenFOAM/symmTensorIOField.H> #include <OpenFOAM/tensorIOField.H> #include <OpenFOAM/pointFields.H> #include "readFields.H" #include "fvFieldDecomposer.H" #include "pointFieldDecomposer.H" #include "lagrangianFieldDecomposer.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) { // enable -constant timeSelector::addOptions(true, false); argList::noParallel(); # include <OpenFOAM/addRegionOption.H> argList::validOptions.insert("cellDist", ""); argList::validOptions.insert("copyUniform", ""); argList::validOptions.insert("fields", ""); argList::validOptions.insert("filterPatches", ""); argList::validOptions.insert("force", ""); argList::validOptions.insert("ifRequired", ""); # include <OpenFOAM/setRootCase.H> word regionName = fvMesh::defaultRegion; word regionDir = word::null; if (args.optionFound("region")) { regionName = args.option("region"); regionDir = regionName; Info<< "Decomposing mesh " << regionName << nl << endl; } bool writeCellDist = args.optionFound("cellDist"); bool copyUniform = args.optionFound("copyUniform"); bool decomposeFieldsOnly = args.optionFound("fields"); bool filterPatches = args.optionFound("filterPatches"); bool forceOverwrite = args.optionFound("force"); bool ifRequiredDecomposition = args.optionFound("ifRequired"); # include <OpenFOAM/createTime.H> // Allow -constant to override controlDict settings. if (args.optionFound("constant")) { instantList timeDirs = timeSelector::select0(runTime, args); if (runTime.timeName() != runTime.constant()) { FatalErrorIn(args.executable()) << "No '" << runTime.constant() << "' time present." << endl << "Valid times are " << runTime.times() << exit(FatalError); } } Info<< "Time = " << runTime.timeName() << endl; // determine the existing processor count directly label nProcs = 0; while ( isDir ( runTime.path() /(word("processor") + name(nProcs)) /runTime.constant() /regionDir /polyMesh::meshSubDir ) ) { ++nProcs; } // get requested numberOfSubdomains label nDomains = 0; { IOdictionary decompDict ( IOobject ( "decomposeParDict", runTime.time().system(), regionDir, // use region if non-standard runTime, IOobject::MUST_READ, IOobject::NO_WRITE, false ) ); decompDict.lookup("numberOfSubdomains") >> nDomains; } if (decomposeFieldsOnly) { // Sanity check on previously decomposed case if (nProcs != nDomains) { FatalErrorIn(args.executable()) << "Specified -fields, but the case was decomposed with " << nProcs << " domains" << nl << "instead of " << nDomains << " domains as specified in decomposeParDict" << nl << exit(FatalError); } } else if (nProcs) { bool procDirsProblem = true; if (ifRequiredDecomposition && nProcs == nDomains) { // we can reuse the decomposition decomposeFieldsOnly = true; procDirsProblem = false; forceOverwrite = false; Info<< "Using existing processor directories" << nl; } if (forceOverwrite) { Info<< "Removing " << nProcs << " existing processor directories" << endl; // remove existing processor dirs // reverse order to avoid gaps if someone interrupts the process for (label procI = nProcs-1; procI >= 0; --procI) { fileName procDir ( runTime.path()/(word("processor") + name(procI)) ); rmDir(procDir); } procDirsProblem = false; } if (procDirsProblem) { FatalErrorIn(args.executable()) << "Case is already decomposed with " << nProcs << " domains, use the -force option or manually" << nl << "remove processor directories before decomposing. e.g.," << nl << " rm -rf " << runTime.path().c_str() << "/processor*" << nl << exit(FatalError); } } Info<< "Create mesh" << endl; domainDecomposition mesh ( IOobject ( regionName, runTime.timeName(), runTime ) ); // Decompose the mesh if (!decomposeFieldsOnly) { mesh.decomposeMesh(filterPatches); mesh.writeDecomposition(); if (writeCellDist) { const labelList& procIds = mesh.cellToProc(); // Write the decomposition as labelList for use with 'manual' // decomposition method. labelIOList cellDecomposition ( IOobject ( "cellDecomposition", mesh.facesInstance(), mesh, IOobject::NO_READ, IOobject::NO_WRITE, false ), procIds ); cellDecomposition.write(); Info<< nl << "Wrote decomposition to " << cellDecomposition.objectPath() << " for use in manual decomposition." << endl; // Write as volScalarField for postprocessing. volScalarField cellDist ( IOobject ( "cellDist", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("cellDist", dimless, 0), zeroGradientFvPatchScalarField::typeName ); forAll(procIds, celli) { cellDist[celli] = procIds[celli]; } cellDist.write(); Info<< nl << "Wrote decomposition as volScalarField to " << cellDist.name() << " for use in postprocessing." << endl; } } // Search for list of objects for this time IOobjectList objects(mesh, runTime.timeName()); // Construct the vol fields // ~~~~~~~~~~~~~~~~~~~~~~~~ PtrList<volScalarField> volScalarFields; readFields(mesh, objects, volScalarFields); PtrList<volVectorField> volVectorFields; readFields(mesh, objects, volVectorFields); PtrList<volSphericalTensorField> volSphericalTensorFields; readFields(mesh, objects, volSphericalTensorFields); PtrList<volSymmTensorField> volSymmTensorFields; readFields(mesh, objects, volSymmTensorFields); PtrList<volTensorField> volTensorFields; readFields(mesh, objects, volTensorFields); // Construct the surface fields // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PtrList<surfaceScalarField> surfaceScalarFields; readFields(mesh, objects, surfaceScalarFields); PtrList<surfaceVectorField> surfaceVectorFields; readFields(mesh, objects, surfaceVectorFields); PtrList<surfaceSphericalTensorField> surfaceSphericalTensorFields; readFields(mesh, objects, surfaceSphericalTensorFields); PtrList<surfaceSymmTensorField> surfaceSymmTensorFields; readFields(mesh, objects, surfaceSymmTensorFields); PtrList<surfaceTensorField> surfaceTensorFields; readFields(mesh, objects, surfaceTensorFields); // Construct the point fields // ~~~~~~~~~~~~~~~~~~~~~~~~~~ pointMesh pMesh(mesh); PtrList<pointScalarField> pointScalarFields; readFields(pMesh, objects, pointScalarFields); PtrList<pointVectorField> pointVectorFields; readFields(pMesh, objects, pointVectorFields); PtrList<pointSphericalTensorField> pointSphericalTensorFields; readFields(pMesh, objects, pointSphericalTensorFields); PtrList<pointSymmTensorField> pointSymmTensorFields; readFields(pMesh, objects, pointSymmTensorFields); PtrList<pointTensorField> pointTensorFields; readFields(pMesh, objects, pointTensorFields); // Construct the Lagrangian fields // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fileNameList cloudDirs ( readDir(runTime.timePath()/cloud::prefix, fileName::DIRECTORY) ); // Particles PtrList<Cloud<indexedParticle> > lagrangianPositions(cloudDirs.size()); // Particles per cell PtrList< List<SLList<indexedParticle*>*> > cellParticles(cloudDirs.size()); PtrList<PtrList<labelIOField> > lagrangianLabelFields(cloudDirs.size()); PtrList<PtrList<scalarIOField> > lagrangianScalarFields(cloudDirs.size()); PtrList<PtrList<vectorIOField> > lagrangianVectorFields(cloudDirs.size()); PtrList<PtrList<sphericalTensorIOField> > lagrangianSphericalTensorFields ( cloudDirs.size() ); PtrList<PtrList<symmTensorIOField> > lagrangianSymmTensorFields ( cloudDirs.size() ); PtrList<PtrList<tensorIOField> > lagrangianTensorFields ( cloudDirs.size() ); label cloudI = 0; forAll(cloudDirs, i) { IOobjectList sprayObjs ( mesh, runTime.timeName(), cloud::prefix/cloudDirs[i] ); IOobject* positionsPtr = sprayObjs.lookup("positions"); if (positionsPtr) { // Read lagrangian particles // ~~~~~~~~~~~~~~~~~~~~~~~~~ Info<< "Identified lagrangian data set: " << cloudDirs[i] << endl; lagrangianPositions.set ( cloudI, new Cloud<indexedParticle> ( mesh, cloudDirs[i], false ) ); // Sort particles per cell // ~~~~~~~~~~~~~~~~~~~~~~~ cellParticles.set ( cloudI, new List<SLList<indexedParticle*>*> ( mesh.nCells(), static_cast<SLList<indexedParticle*>*>(NULL) ) ); label i = 0; forAllIter ( Cloud<indexedParticle>, lagrangianPositions[cloudI], iter ) { iter().index() = i++; label celli = iter().cell(); // Check if (celli < 0 || celli >= mesh.nCells()) { FatalErrorIn(args.executable()) << "Illegal cell number " << celli << " for particle with index " << iter().index() << " at position " << iter().position() << nl << "Cell number should be between 0 and " << mesh.nCells()-1 << nl << "On this mesh the particle should be in cell " << mesh.findCell(iter().position()) << exit(FatalError); } if (!cellParticles[cloudI][celli]) { cellParticles[cloudI][celli] = new SLList<indexedParticle*> (); } cellParticles[cloudI][celli]->append(&iter()); } // Read fields // ~~~~~~~~~~~ IOobjectList lagrangianObjects ( mesh, runTime.timeName(), cloud::prefix/cloudDirs[cloudI] ); lagrangianFieldDecomposer::readFields ( cloudI, lagrangianObjects, lagrangianLabelFields ); lagrangianFieldDecomposer::readFields ( cloudI, lagrangianObjects, lagrangianScalarFields ); lagrangianFieldDecomposer::readFields ( cloudI, lagrangianObjects, lagrangianVectorFields ); lagrangianFieldDecomposer::readFields ( cloudI, lagrangianObjects, lagrangianSphericalTensorFields ); lagrangianFieldDecomposer::readFields ( cloudI, lagrangianObjects, lagrangianSymmTensorFields ); lagrangianFieldDecomposer::readFields ( cloudI, lagrangianObjects, lagrangianTensorFields ); cloudI++; } } lagrangianPositions.setSize(cloudI); cellParticles.setSize(cloudI); lagrangianLabelFields.setSize(cloudI); lagrangianScalarFields.setSize(cloudI); lagrangianVectorFields.setSize(cloudI); lagrangianSphericalTensorFields.setSize(cloudI); lagrangianSymmTensorFields.setSize(cloudI); lagrangianTensorFields.setSize(cloudI); // Any uniform data to copy/link? fileName uniformDir("uniform"); if (isDir(runTime.timePath()/uniformDir)) { Info<< "Detected additional non-decomposed files in " << runTime.timePath()/uniformDir << endl; } else { uniformDir.clear(); } Info<< endl; // split the fields over processors for (label procI = 0; procI < mesh.nProcs(); procI++) { Info<< "Processor " << procI << ": field transfer" << endl; // open the database Time processorDb ( Time::controlDictName, args.rootPath(), args.caseName()/fileName(word("processor") + name(procI)) ); processorDb.setTime(runTime); // remove files remnants that can cause horrible problems // - mut and nut are used to mark the new turbulence models, // their existence prevents old models from being upgraded { fileName timeDir(processorDb.path()/processorDb.timeName()); rm(timeDir/"mut"); rm(timeDir/"nut"); } // read the mesh fvMesh procMesh ( IOobject ( regionName, processorDb.timeName(), processorDb ) ); labelIOList cellProcAddressing ( IOobject ( "cellProcAddressing", procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); labelIOList boundaryProcAddressing ( IOobject ( "boundaryProcAddressing", procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); // FV fields if ( volScalarFields.size() || volVectorFields.size() || volSphericalTensorFields.size() || volSymmTensorFields.size() || volTensorFields.size() || surfaceScalarFields.size() || surfaceVectorFields.size() || surfaceSphericalTensorFields.size() || surfaceSymmTensorFields.size() || surfaceTensorFields.size() ) { labelIOList faceProcAddressing ( IOobject ( "faceProcAddressing", procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); fvFieldDecomposer fieldDecomposer ( mesh, procMesh, faceProcAddressing, cellProcAddressing, boundaryProcAddressing ); fieldDecomposer.decomposeFields(volScalarFields); fieldDecomposer.decomposeFields(volVectorFields); fieldDecomposer.decomposeFields(volSphericalTensorFields); fieldDecomposer.decomposeFields(volSymmTensorFields); fieldDecomposer.decomposeFields(volTensorFields); fieldDecomposer.decomposeFields(surfaceScalarFields); fieldDecomposer.decomposeFields(surfaceVectorFields); fieldDecomposer.decomposeFields(surfaceSphericalTensorFields); fieldDecomposer.decomposeFields(surfaceSymmTensorFields); fieldDecomposer.decomposeFields(surfaceTensorFields); } // Point fields if ( pointScalarFields.size() || pointVectorFields.size() || pointSphericalTensorFields.size() || pointSymmTensorFields.size() || pointTensorFields.size() ) { labelIOList pointProcAddressing ( IOobject ( "pointProcAddressing", procMesh.facesInstance(), procMesh.meshSubDir, procMesh, IOobject::MUST_READ, IOobject::NO_WRITE ) ); pointMesh procPMesh(procMesh, true); pointFieldDecomposer fieldDecomposer ( pMesh, procPMesh, pointProcAddressing, boundaryProcAddressing ); fieldDecomposer.decomposeFields(pointScalarFields); fieldDecomposer.decomposeFields(pointVectorFields); fieldDecomposer.decomposeFields(pointSphericalTensorFields); fieldDecomposer.decomposeFields(pointSymmTensorFields); fieldDecomposer.decomposeFields(pointTensorFields); } // If there is lagrangian data write it out forAll(lagrangianPositions, cloudI) { if (lagrangianPositions[cloudI].size()) { lagrangianFieldDecomposer fieldDecomposer ( mesh, procMesh, cellProcAddressing, cloudDirs[cloudI], lagrangianPositions[cloudI], cellParticles[cloudI] ); // Lagrangian fields if ( lagrangianLabelFields[cloudI].size() || lagrangianScalarFields[cloudI].size() || lagrangianVectorFields[cloudI].size() || lagrangianSphericalTensorFields[cloudI].size() || lagrangianSymmTensorFields[cloudI].size() || lagrangianTensorFields[cloudI].size() ) { fieldDecomposer.decomposeFields ( cloudDirs[cloudI], lagrangianLabelFields[cloudI] ); fieldDecomposer.decomposeFields ( cloudDirs[cloudI], lagrangianScalarFields[cloudI] ); fieldDecomposer.decomposeFields ( cloudDirs[cloudI], lagrangianVectorFields[cloudI] ); fieldDecomposer.decomposeFields ( cloudDirs[cloudI], lagrangianSphericalTensorFields[cloudI] ); fieldDecomposer.decomposeFields ( cloudDirs[cloudI], lagrangianSymmTensorFields[cloudI] ); fieldDecomposer.decomposeFields ( cloudDirs[cloudI], lagrangianTensorFields[cloudI] ); } } } // Any non-decomposed data to copy? if (uniformDir.size()) { const fileName timePath = processorDb.timePath(); if (copyUniform || mesh.distributed()) { cp ( runTime.timePath()/uniformDir, timePath/uniformDir ); } else { // link with relative paths const string parentPath = string("..")/".."; fileName currentDir(cwd()); chDir(timePath); ln ( parentPath/runTime.timeName()/uniformDir, uniformDir ); chDir(currentDir); } } } Info<< "\nEnd.\n" << endl; return 0; } // ************************ vim: set sw=4 sts=4 et: ************************ //
themiwi/freefoam-debian
applications/utilities/parallelProcessing/decomposePar/decomposePar.C
C++
gpl-3.0
24,750
{% extends 'base.html' %} {% block content %} {% for guest in this.children.all() %} <p>{{ guest.name }}</p> {% endfor %} {% endblock content %}
rubonfest/rubonfest
templates/guest_role.html
HTML
gpl-3.0
155
#.rst: # FindPythonLibs # -------------- # # Find python libraries # # This module finds if Python is installed and determines where the # include files and libraries are. It also determines what the name of # the library is. This code sets the following variables: # # :: # # PYTHONLIBS_FOUND - have the Python libs been found # PYTHON_LIBRARIES - path to the python library # PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated) # PYTHON_INCLUDE_DIRS - path to where Python.h is found # PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated) # PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8) # # # # The Python_ADDITIONAL_VERSIONS variable can be used to specify a list # of version numbers that should be taken into account when searching # for Python. You need to set this variable before calling # find_package(PythonLibs). # # If you'd like to specify the installation of Python to use, you should # modify the following cache variables: # # :: # # PYTHON_LIBRARY - path to the python library # PYTHON_INCLUDE_DIR - path to where Python.h is found # # If also calling find_package(PythonInterp), call find_package(PythonInterp) # first to get the currently active Python version by default with a consistent # version of PYTHON_LIBRARIES. #============================================================================= # Copyright 2001-2009 Kitware, Inc. # # Distributed under the OSI-approved BSD License (the "License"); # see accompanying file Copyright.txt for details. # # This software is distributed WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the License for more information. #============================================================================= # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) set(CMAKE_MODULE_PATH_DEFAULT "${CMAKE_ROOT}/Modules/") include(${CMAKE_MODULE_PATH_DEFAULT}/CMakeFindFrameworks.cmake) # Search for the python framework on Apple. CMAKE_FIND_FRAMEWORKS(Python) set(_PYTHON1_VERSIONS 1.6 1.5) set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) set(_PYTHON3_VERSIONS 3.4 3.3 3.2 3.1 3.0) if(PythonLibs_FIND_VERSION) if(PythonLibs_FIND_VERSION_COUNT GREATER 1) set(_PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION_MAJOR}.${PythonLibs_FIND_VERSION_MINOR}") unset(_PYTHON_FIND_OTHER_VERSIONS) if(PythonLibs_FIND_VERSION_EXACT) if(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION) set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}") else() set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}") endif() else() foreach(_PYTHON_V ${_PYTHON${PythonLibs_FIND_VERSION_MAJOR}_VERSIONS}) if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN) list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V}) endif() endforeach() endif() unset(_PYTHON_FIND_MAJ_MIN) else() set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION_MAJOR}_VERSIONS}) endif() else() set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) endif() # Set up the versions we know about, in the order we will search. Always add # the user supplied additional versions to the front. # If FindPythonInterp has already found the major and minor version, # insert that version between the user supplied versions and the stock # version list. set(_Python_VERSIONS ${Python_ADDITIONAL_VERSIONS}) if(DEFINED PYTHON_VERSION_MAJOR AND DEFINED PYTHON_VERSION_MINOR) list(APPEND _Python_VERSIONS ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) endif() list(APPEND _Python_VERSIONS ${_PYTHON_FIND_OTHER_VERSIONS}) unset(_PYTHON_FIND_OTHER_VERSIONS) unset(_PYTHON1_VERSIONS) unset(_PYTHON2_VERSIONS) unset(_PYTHON3_VERSIONS) foreach(_CURRENT_VERSION ${_Python_VERSIONS}) string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) if(WIN32) find_library(PYTHON_DEBUG_LIBRARY NAMES python${_CURRENT_VERSION_NO_DOTS}_d python PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs ) endif() find_library(PYTHON_LIBRARY NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}mu python${_CURRENT_VERSION}m python${_CURRENT_VERSION}u python${_CURRENT_VERSION} PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs # Avoid finding the .dll in the PATH. We want the .lib. NO_SYSTEM_ENVIRONMENT_PATH ) # Look for the static library in the Python config directory find_library(PYTHON_LIBRARY NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} # Avoid finding the .dll in the PATH. We want the .lib. NO_SYSTEM_ENVIRONMENT_PATH # This is where the static library is usually located PATH_SUFFIXES python${_CURRENT_VERSION}/config ) # Look for the shared library in the PATH (if static found before, PYTHON_LIBRARY is not changed) find_library(PYTHON_LIBRARY NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} ) # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if # PYTHON_INCLUDE_DIR is not set. if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR) set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH "Path to where Python.h is found" FORCE) endif() set(PYTHON_FRAMEWORK_INCLUDES) if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR) foreach(dir ${Python_FRAMEWORKS}) set(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES} ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION}) endforeach() endif() find_path(PYTHON_INCLUDE_DIR NAMES Python.h PATHS ${PYTHON_FRAMEWORK_INCLUDES} [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include PATH_SUFFIXES python${_CURRENT_VERSION}mu python${_CURRENT_VERSION}m python${_CURRENT_VERSION}u python${_CURRENT_VERSION} ) # For backward compatibility, set PYTHON_INCLUDE_PATH. set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}") if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h") file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"") string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1" PYTHONLIBS_VERSION_STRING "${python_version_str}") unset(python_version_str) endif() if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) break() endif() endforeach() mark_as_advanced( PYTHON_DEBUG_LIBRARY PYTHON_LIBRARY PYTHON_INCLUDE_DIR ) # We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the # cache entries because they are meant to specify the location of a single # library. We now set the variables listed by the documentation for this # module. set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}") # These variables have been historically named in this module different from # what SELECT_LIBRARY_CONFIGURATIONS() expects. set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}") set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}") include(${CMAKE_MODULE_PATH_DEFAULT}/SelectLibraryConfigurations.cmake) SELECT_LIBRARY_CONFIGURATIONS(PYTHON) # SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library. # Unset this, this prefix doesn't match the module prefix, they are different # for historical reasons. unset(PYTHON_FOUND) include(${CMAKE_MODULE_PATH_DEFAULT}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS VERSION_VAR PYTHONLIBS_VERSION_STRING) # PYTHON_ADD_MODULE(<name> src1 src2 ... srcN) is used to build modules for python. # PYTHON_WRITE_MODULES_HEADER(<filename>) writes a header file you can include # in your sources to initialize the static python modules function(PYTHON_ADD_MODULE _NAME ) get_property(_TARGET_SUPPORTS_SHARED_LIBS GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE) option(PYTHON_MODULE_${_NAME}_BUILD_SHARED "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS}) # Mark these options as advanced mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME} PYTHON_MODULE_${_NAME}_BUILD_SHARED) if(PYTHON_ENABLE_MODULE_${_NAME}) if(PYTHON_MODULE_${_NAME}_BUILD_SHARED) set(PY_MODULE_TYPE MODULE) else() set(PY_MODULE_TYPE STATIC) set_property(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME}) endif() set_property(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME}) add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN}) # target_link_libraries(${_NAME} ${PYTHON_LIBRARIES}) if(PYTHON_MODULE_${_NAME}_BUILD_SHARED) set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}") if(WIN32 AND NOT CYGWIN) set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd") endif() endif() endif() endfunction() function(PYTHON_WRITE_MODULES_HEADER _filename) get_property(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST) get_filename_component(_name "${_filename}" NAME) string(REPLACE "." "_" _name "${_name}") string(TOUPPER ${_name} _nameUpper) set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename}) set(_filenameTmp "${_filename}.in") file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n") file(APPEND ${_filenameTmp} "#ifndef ${_nameUpper} #define ${_nameUpper} #include <Python.h> #ifdef __cplusplus extern \"C\" { #endif /* __cplusplus */ ") foreach(_currentModule ${PY_STATIC_MODULES_LIST}) file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n") endforeach() file(APPEND ${_filenameTmp} "#ifdef __cplusplus } #endif /* __cplusplus */ ") foreach(_currentModule ${PY_STATIC_MODULES_LIST}) file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n") endforeach() file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n") foreach(_currentModule ${PY_STATIC_MODULES_LIST}) file(APPEND ${_filenameTmp} " ${_name}_${_currentModule}();\n") endforeach() file(APPEND ${_filenameTmp} "}\n\n") file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n") # with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file() execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET) endfunction()
Reaktoro/Reaktoro
cmake/FindPythonLibs.cmake
CMake
gpl-3.0
11,903
% GNUPLOT: LaTeX picture with Postscript \begingroup \makeatletter \providecommand\color[2][]{% \GenericError{(gnuplot) \space\space\space\@spaces}{% Package color not loaded in conjunction with terminal option `colourtext'% }{See the gnuplot documentation for explanation.% }{Either use 'blacktext' in gnuplot or load the package color.sty in LaTeX.}% \renewcommand\color[2][]{}% }% \providecommand\includegraphics[2][]{% \GenericError{(gnuplot) \space\space\space\@spaces}{% Package graphicx or graphics not loaded% }{See the gnuplot documentation for explanation.% }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% \renewcommand\includegraphics[2][]{}% }% \providecommand\rotatebox[2]{#2}% \@ifundefined{ifGPcolor}{% \newif\ifGPcolor \GPcolortrue }{}% \@ifundefined{ifGPblacktext}{% \newif\ifGPblacktext \GPblacktextfalse }{}% % define a \g@addto@macro without @ in the name: \let\gplgaddtomacro\g@addto@macro % define empty templates for all commands taking text: \gdef\gplbacktext{}% \gdef\gplfronttext{}% \makeatother \ifGPblacktext % no textcolor at all \def\colorrgb#1{}% \def\colorgray#1{}% \else % gray or color? \ifGPcolor \def\colorrgb#1{\color[rgb]{#1}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% \else % gray \def\colorrgb#1{\color{black}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color{black}}% \expandafter\def\csname LT1\endcsname{\color{black}}% \expandafter\def\csname LT2\endcsname{\color{black}}% \expandafter\def\csname LT3\endcsname{\color{black}}% \expandafter\def\csname LT4\endcsname{\color{black}}% \expandafter\def\csname LT5\endcsname{\color{black}}% \expandafter\def\csname LT6\endcsname{\color{black}}% \expandafter\def\csname LT7\endcsname{\color{black}}% \expandafter\def\csname LT8\endcsname{\color{black}}% \fi \fi \setlength{\unitlength}{0.0500bp}% \begin{picture}(4534.00,2266.00)% \gplgaddtomacro\gplbacktext{% \colorrgb{0.50,0.50,0.50}% \put(85,0){\makebox(0,0)[r]{\strut{}\footnotesize $0$}}% \colorrgb{0.50,0.50,0.50}% \put(85,566){\makebox(0,0)[r]{\strut{}\footnotesize $500$}}% \colorrgb{0.50,0.50,0.50}% \put(85,1133){\makebox(0,0)[r]{\strut{}\footnotesize $1000$}}% \colorrgb{0.50,0.50,0.50}% \put(85,1699){\makebox(0,0)[r]{\strut{}\footnotesize $1500$}}% \colorrgb{0.50,0.50,0.50}% \put(85,2265){\makebox(0,0)[r]{\strut{}\footnotesize $2000$}}% \colorrgb{0.50,0.50,0.50}% \put(198,-157){\makebox(0,0){\strut{}\footnotesize $-40$}}% \colorrgb{0.50,0.50,0.50}% \put(1133,-157){\makebox(0,0){\strut{}\footnotesize $0$}}% \colorrgb{0.50,0.50,0.50}% \put(2068,-157){\makebox(0,0){\strut{}\footnotesize $40$}}% \csname LTb\endcsname% \put(-553,1132){\rotatebox{-270}{\makebox(0,0){\strut{}$f$ / Hz}}}% \put(1133,-377){\makebox(0,0){\strut{}$\kx$ / m}}% }% \gplgaddtomacro\gplfronttext{% \csname LTb\endcsname% \put(1133,2378){\makebox(0,0){\strut{}\footnotesize $\tilde D_\lsindex(\kx, \omega)$}}% }% \gplgaddtomacro\gplbacktext{% \colorrgb{0.50,0.50,0.50}% \put(2352,0){\makebox(0,0)[r]{\strut{}}}% \colorrgb{0.50,0.50,0.50}% \put(2352,566){\makebox(0,0)[r]{\strut{}}}% \colorrgb{0.50,0.50,0.50}% \put(2352,1133){\makebox(0,0)[r]{\strut{}}}% \colorrgb{0.50,0.50,0.50}% \put(2352,1699){\makebox(0,0)[r]{\strut{}}}% \colorrgb{0.50,0.50,0.50}% \put(2352,2265){\makebox(0,0)[r]{\strut{}}}% \colorrgb{0.50,0.50,0.50}% \put(2465,-157){\makebox(0,0){\strut{}\footnotesize $-40$}}% \colorrgb{0.50,0.50,0.50}% \put(3400,-157){\makebox(0,0){\strut{}\footnotesize $0$}}% \colorrgb{0.50,0.50,0.50}% \put(4335,-157){\makebox(0,0){\strut{}\footnotesize $40$}}% \csname LTb\endcsname% \put(3400,-377){\makebox(0,0){\strut{}$\kx$ / m}}% }% \gplgaddtomacro\gplfronttext{% \colorrgb{0.50,0.50,0.50}% \put(4701,0){\makebox(0,0)[l]{\strut{}\footnotesize $-200$}}% \colorrgb{0.50,0.50,0.50}% \put(4701,566){\makebox(0,0)[l]{\strut{}\footnotesize $-150$}}% \colorrgb{0.50,0.50,0.50}% \put(4701,1132){\makebox(0,0)[l]{\strut{}\footnotesize $-100$}}% \colorrgb{0.50,0.50,0.50}% \put(4701,1698){\makebox(0,0)[l]{\strut{}\footnotesize $-50$}}% \colorrgb{0.50,0.50,0.50}% \put(4701,2265){\makebox(0,0)[l]{\strut{}\footnotesize $0$}}% \csname LTb\endcsname% \put(3400,2378){\makebox(0,0){\strut{}\footnotesize $\tilde G_\lsindex(\kx, y, \omega)$}}% }% \gplbacktext \put(0,0){\includegraphics{fig}}% \gplfronttext \end{picture}% \endgroup
fietew/publications
publications/2015-05_AES138_Aliasing_Linear_Local_WFS/slides/slide06/fig.tex
TeX
gpl-3.0
5,831
/*! * Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */ /* FONT PATH * -------------------------- */ @font-face { font-family: 'FontAwesome'; src: url('../fonts/fontawesome-webfont.eot?v=4.2.0'); src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } .fa { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* makes the font 33% larger relative to the icon container */ .fa-lg { font-size: 1.33333333em; line-height: 0.75em; vertical-align: -15%; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-fw { width: 1.28571429em; text-align: center; } .fa-ul { padding-left: 0; margin-left: 2.14285714em; list-style-type: none; } .fa-ul > li { position: relative; } .fa-li { position: absolute; left: -2.14285714em; width: 2.14285714em; top: 0.14285714em; text-align: center; } .fa-li.fa-lg { left: -1.85714286em; } .fa-border { padding: .2em .25em .15em; border: solid 0.08em #eeeeee; border-radius: .1em; } .pull-right { float: right; } .pull-left { float: left; } .fa.pull-left { margin-right: .3em; } .fa.pull-right { margin-left: .3em; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear; } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .fa-rotate-90 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2); -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1); -webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1); -webkit-transform: scale(1, -1); -ms-transform: scale(1, -1); transform: scale(1, -1); } :root .fa-rotate-90, :root .fa-rotate-180, :root .fa-rotate-270, :root .fa-flip-horizontal, :root .fa-flip-vertical { filter: none; } .fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .fa-stack-1x, .fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center; } .fa-stack-1x { line-height: inherit; } .fa-stack-2x { font-size: 2em; } .fa-inverse { color: #ffffff; } /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ .fa-glass:before { content: "\f000"; } .fa-music:before { content: "\f001"; } .fa-search:before { content: "\f002"; } .fa-envelope-o:before { content: "\f003"; } .fa-heart:before { content: "\f004"; } .fa-star:before { content: "\f005"; } .fa-star-o:before { content: "\f006"; } .fa-user:before { content: "\f007"; } .fa-film:before { content: "\f008"; } .fa-th-large:before { content: "\f009"; } .fa-th:before { content: "\f00a"; } .fa-th-list:before { content: "\f00b"; } .fa-check:before { content: "\f00c"; } .fa-remove:before, .fa-close:before, .fa-times:before { content: "\f00d"; } .fa-search-plus:before { content: "\f00e"; } .fa-search-minus:before { content: "\f010"; } .fa-power-off:before { content: "\f011"; } .fa-signal:before { content: "\f012"; } .fa-gear:before, .fa-cog:before { content: "\f013"; } .fa-trash-o:before { content: "\f014"; } .fa-home:before { content: "\f015"; } .fa-file-o:before { content: "\f016"; } .fa-clock-o:before { content: "\f017"; } .fa-road:before { content: "\f018"; } .fa-download:before { content: "\f019"; } .fa-arrow-circle-o-down:before { content: "\f01a"; } .fa-arrow-circle-o-up:before { content: "\f01b"; } .fa-inbox:before { content: "\f01c"; } .fa-play-circle-o:before { content: "\f01d"; } .fa-rotate-right:before, .fa-repeat:before { content: "\f01e"; } .fa-refresh:before { content: "\f021"; } .fa-list-alt:before { content: "\f022"; } .fa-lock:before { content: "\f023"; } .fa-flag:before { content: "\f024"; } .fa-headphones:before { content: "\f025"; } .fa-volume-off:before { content: "\f026"; } .fa-volume-down:before { content: "\f027"; } .fa-volume-up:before { content: "\f028"; } .fa-qrcode:before { content: "\f029"; } .fa-barcode:before { content: "\f02a"; } .fa-tag:before { content: "\f02b"; } .fa-tags:before { content: "\f02c"; } .fa-book:before { content: "\f02d"; } .fa-bookmark:before { content: "\f02e"; } .fa-print:before { content: "\f02f"; } .fa-camera:before { content: "\f030"; } .fa-font:before { content: "\f031"; } .fa-bold:before { content: "\f032"; } .fa-italic:before { content: "\f033"; } .fa-text-height:before { content: "\f034"; } .fa-text-width:before { content: "\f035"; } .fa-align-left:before { content: "\f036"; } .fa-align-center:before { content: "\f037"; } .fa-align-right:before { content: "\f038"; } .fa-align-justify:before { content: "\f039"; } .fa-list:before { content: "\f03a"; } .fa-dedent:before, .fa-outdent:before { content: "\f03b"; } .fa-indent:before { content: "\f03c"; } .fa-video-camera:before { content: "\f03d"; } .fa-photo:before, .fa-image:before, .fa-picture-o:before { content: "\f03e"; } .fa-pencil:before { content: "\f040"; } .fa-map-marker:before { content: "\f041"; } .fa-adjust:before { content: "\f042"; } .fa-tint:before { content: "\f043"; } .fa-edit:before, .fa-pencil-square-o:before { content: "\f044"; } .fa-share-square-o:before { content: "\f045"; } .fa-check-square-o:before { content: "\f046"; } .fa-arrows:before { content: "\f047"; } .fa-step-backward:before { content: "\f048"; } .fa-fast-backward:before { content: "\f049"; } .fa-backward:before { content: "\f04a"; } .fa-play:before { content: "\f04b"; } .fa-pause:before { content: "\f04c"; } .fa-stop:before { content: "\f04d"; } .fa-forward:before { content: "\f04e"; } .fa-fast-forward:before { content: "\f050"; } .fa-step-forward:before { content: "\f051"; } .fa-eject:before { content: "\f052"; } .fa-chevron-left:before { content: "\f053"; } .fa-chevron-right:before { content: "\f054"; } .fa-plus-circle:before { content: "\f055"; } .fa-minus-circle:before { content: "\f056"; } .fa-times-circle:before { content: "\f057"; } .fa-check-circle:before { content: "\f058"; } .fa-problem-circle:before { content: "\f059"; } .fa-info-circle:before { content: "\f05a"; } .fa-crosshairs:before { content: "\f05b"; } .fa-times-circle-o:before { content: "\f05c"; } .fa-check-circle-o:before { content: "\f05d"; } .fa-ban:before { content: "\f05e"; } .fa-arrow-left:before { content: "\f060"; } .fa-arrow-right:before { content: "\f061"; } .fa-arrow-up:before { content: "\f062"; } .fa-arrow-down:before { content: "\f063"; } .fa-mail-forward:before, .fa-share:before { content: "\f064"; } .fa-expand:before { content: "\f065"; } .fa-compress:before { content: "\f066"; } .fa-plus:before { content: "\f067"; } .fa-minus:before { content: "\f068"; } .fa-asterisk:before { content: "\f069"; } .fa-exclamation-circle:before { content: "\f06a"; } .fa-gift:before { content: "\f06b"; } .fa-leaf:before { content: "\f06c"; } .fa-fire:before { content: "\f06d"; } .fa-eye:before { content: "\f06e"; } .fa-eye-slash:before { content: "\f070"; } .fa-warning:before, .fa-exclamation-triangle:before { content: "\f071"; } .fa-plane:before { content: "\f072"; } .fa-calendar:before { content: "\f073"; } .fa-random:before { content: "\f074"; } .fa-comment:before { content: "\f075"; } .fa-magnet:before { content: "\f076"; } .fa-chevron-up:before { content: "\f077"; } .fa-chevron-down:before { content: "\f078"; } .fa-retweet:before { content: "\f079"; } .fa-shopping-cart:before { content: "\f07a"; } .fa-folder:before { content: "\f07b"; } .fa-folder-open:before { content: "\f07c"; } .fa-arrows-v:before { content: "\f07d"; } .fa-arrows-h:before { content: "\f07e"; } .fa-bar-chart-o:before, .fa-bar-chart:before { content: "\f080"; } .fa-twitter-square:before { content: "\f081"; } .fa-facebook-square:before { content: "\f082"; } .fa-camera-retro:before { content: "\f083"; } .fa-key:before { content: "\f084"; } .fa-gears:before, .fa-cogs:before { content: "\f085"; } .fa-comments:before { content: "\f086"; } .fa-thumbs-o-up:before { content: "\f087"; } .fa-thumbs-o-down:before { content: "\f088"; } .fa-star-half:before { content: "\f089"; } .fa-heart-o:before { content: "\f08a"; } .fa-sign-out:before { content: "\f08b"; } .fa-linkedin-square:before { content: "\f08c"; } .fa-thumb-tack:before { content: "\f08d"; } .fa-external-link:before { content: "\f08e"; } .fa-sign-in:before { content: "\f090"; } .fa-trophy:before { content: "\f091"; } .fa-github-square:before { content: "\f092"; } .fa-upload:before { content: "\f093"; } .fa-lemon-o:before { content: "\f094"; } .fa-phone:before { content: "\f095"; } .fa-square-o:before { content: "\f096"; } .fa-bookmark-o:before { content: "\f097"; } .fa-phone-square:before { content: "\f098"; } .fa-twitter:before { content: "\f099"; } .fa-facebook:before { content: "\f09a"; } .fa-github:before { content: "\f09b"; } .fa-unlock:before { content: "\f09c"; } .fa-credit-card:before { content: "\f09d"; } .fa-rss:before { content: "\f09e"; } .fa-hdd-o:before { content: "\f0a0"; } .fa-bullhorn:before { content: "\f0a1"; } .fa-bell:before { content: "\f0f3"; } .fa-certificate:before { content: "\f0a3"; } .fa-hand-o-right:before { content: "\f0a4"; } .fa-hand-o-left:before { content: "\f0a5"; } .fa-hand-o-up:before { content: "\f0a6"; } .fa-hand-o-down:before { content: "\f0a7"; } .fa-arrow-circle-left:before { content: "\f0a8"; } .fa-arrow-circle-right:before { content: "\f0a9"; } .fa-arrow-circle-up:before { content: "\f0aa"; } .fa-arrow-circle-down:before { content: "\f0ab"; } .fa-globe:before { content: "\f0ac"; } .fa-wrench:before { content: "\f0ad"; } .fa-tasks:before { content: "\f0ae"; } .fa-filter:before { content: "\f0b0"; } .fa-briefcase:before { content: "\f0b1"; } .fa-arrows-alt:before { content: "\f0b2"; } .fa-group:before, .fa-users:before { content: "\f0c0"; } .fa-chain:before, .fa-link:before { content: "\f0c1"; } .fa-cloud:before { content: "\f0c2"; } .fa-flask:before { content: "\f0c3"; } .fa-cut:before, .fa-scissors:before { content: "\f0c4"; } .fa-copy:before, .fa-files-o:before { content: "\f0c5"; } .fa-paperclip:before { content: "\f0c6"; } .fa-save:before, .fa-floppy-o:before { content: "\f0c7"; } .fa-square:before { content: "\f0c8"; } .fa-navicon:before, .fa-reorder:before, .fa-bars:before { content: "\f0c9"; } .fa-list-ul:before { content: "\f0ca"; } .fa-list-ol:before { content: "\f0cb"; } .fa-strikethrough:before { content: "\f0cc"; } .fa-underline:before { content: "\f0cd"; } .fa-table:before { content: "\f0ce"; } .fa-magic:before { content: "\f0d0"; } .fa-truck:before { content: "\f0d1"; } .fa-pinterest:before { content: "\f0d2"; } .fa-pinterest-square:before { content: "\f0d3"; } .fa-google-plus-square:before { content: "\f0d4"; } .fa-google-plus:before { content: "\f0d5"; } .fa-money:before { content: "\f0d6"; } .fa-caret-down:before { content: "\f0d7"; } .fa-caret-up:before { content: "\f0d8"; } .fa-caret-left:before { content: "\f0d9"; } .fa-caret-right:before { content: "\f0da"; } .fa-columns:before { content: "\f0db"; } .fa-unsorted:before, .fa-sort:before { content: "\f0dc"; } .fa-sort-down:before, .fa-sort-desc:before { content: "\f0dd"; } .fa-sort-up:before, .fa-sort-asc:before { content: "\f0de"; } .fa-envelope:before { content: "\f0e0"; } .fa-linkedin:before { content: "\f0e1"; } .fa-rotate-left:before, .fa-undo:before { content: "\f0e2"; } .fa-legal:before, .fa-gavel:before { content: "\f0e3"; } .fa-dashboard:before, .fa-tachometer:before { content: "\f0e4"; } .fa-comment-o:before { content: "\f0e5"; } .fa-comments-o:before { content: "\f0e6"; } .fa-flash:before, .fa-bolt:before { content: "\f0e7"; } .fa-sitemap:before { content: "\f0e8"; } .fa-umbrella:before { content: "\f0e9"; } .fa-paste:before, .fa-clipboard:before { content: "\f0ea"; } .fa-lightbulb-o:before { content: "\f0eb"; } .fa-exchange:before { content: "\f0ec"; } .fa-cloud-download:before { content: "\f0ed"; } .fa-cloud-upload:before { content: "\f0ee"; } .fa-user-md:before { content: "\f0f0"; } .fa-stethoscope:before { content: "\f0f1"; } .fa-suitcase:before { content: "\f0f2"; } .fa-bell-o:before { content: "\f0a2"; } .fa-coffee:before { content: "\f0f4"; } .fa-cutlery:before { content: "\f0f5"; } .fa-file-text-o:before { content: "\f0f6"; } .fa-building-o:before { content: "\f0f7"; } .fa-hospital-o:before { content: "\f0f8"; } .fa-ambulance:before { content: "\f0f9"; } .fa-medkit:before { content: "\f0fa"; } .fa-fighter-jet:before { content: "\f0fb"; } .fa-beer:before { content: "\f0fc"; } .fa-h-square:before { content: "\f0fd"; } .fa-plus-square:before { content: "\f0fe"; } .fa-angle-double-left:before { content: "\f100"; } .fa-angle-double-right:before { content: "\f101"; } .fa-angle-double-up:before { content: "\f102"; } .fa-angle-double-down:before { content: "\f103"; } .fa-angle-left:before { content: "\f104"; } .fa-angle-right:before { content: "\f105"; } .fa-angle-up:before { content: "\f106"; } .fa-angle-down:before { content: "\f107"; } .fa-desktop:before { content: "\f108"; } .fa-laptop:before { content: "\f109"; } .fa-tablet:before { content: "\f10a"; } .fa-mobile-phone:before, .fa-mobile:before { content: "\f10b"; } .fa-circle-o:before { content: "\f10c"; } .fa-quote-left:before { content: "\f10d"; } .fa-quote-right:before { content: "\f10e"; } .fa-spinner:before { content: "\f110"; } .fa-circle:before { content: "\f111"; } .fa-mail-reply:before, .fa-reply:before { content: "\f112"; } .fa-github-alt:before { content: "\f113"; } .fa-folder-o:before { content: "\f114"; } .fa-folder-open-o:before { content: "\f115"; } .fa-smile-o:before { content: "\f118"; } .fa-frown-o:before { content: "\f119"; } .fa-meh-o:before { content: "\f11a"; } .fa-gamepad:before { content: "\f11b"; } .fa-keyboard-o:before { content: "\f11c"; } .fa-flag-o:before { content: "\f11d"; } .fa-flag-checkered:before { content: "\f11e"; } .fa-terminal:before { content: "\f120"; } .fa-code:before { content: "\f121"; } .fa-mail-reply-all:before, .fa-reply-all:before { content: "\f122"; } .fa-star-half-empty:before, .fa-star-half-full:before, .fa-star-half-o:before { content: "\f123"; } .fa-location-arrow:before { content: "\f124"; } .fa-crop:before { content: "\f125"; } .fa-code-fork:before { content: "\f126"; } .fa-unlink:before, .fa-chain-broken:before { content: "\f127"; } .fa-problem:before { content: "\f128"; } .fa-info:before { content: "\f129"; } .fa-exclamation:before { content: "\f12a"; } .fa-superscript:before { content: "\f12b"; } .fa-subscript:before { content: "\f12c"; } .fa-eraser:before { content: "\f12d"; } .fa-puzzle-piece:before { content: "\f12e"; } .fa-microphone:before { content: "\f130"; } .fa-microphone-slash:before { content: "\f131"; } .fa-shield:before { content: "\f132"; } .fa-calendar-o:before { content: "\f133"; } .fa-fire-extinguisher:before { content: "\f134"; } .fa-rocket:before { content: "\f135"; } .fa-maxcdn:before { content: "\f136"; } .fa-chevron-circle-left:before { content: "\f137"; } .fa-chevron-circle-right:before { content: "\f138"; } .fa-chevron-circle-up:before { content: "\f139"; } .fa-chevron-circle-down:before { content: "\f13a"; } .fa-html5:before { content: "\f13b"; } .fa-css3:before { content: "\f13c"; } .fa-anchor:before { content: "\f13d"; } .fa-unlock-alt:before { content: "\f13e"; } .fa-bullseye:before { content: "\f140"; } .fa-ellipsis-h:before { content: "\f141"; } .fa-ellipsis-v:before { content: "\f142"; } .fa-rss-square:before { content: "\f143"; } .fa-play-circle:before { content: "\f144"; } .fa-ticket:before { content: "\f145"; } .fa-minus-square:before { content: "\f146"; } .fa-minus-square-o:before { content: "\f147"; } .fa-level-up:before { content: "\f148"; } .fa-level-down:before { content: "\f149"; } .fa-check-square:before { content: "\f14a"; } .fa-pencil-square:before { content: "\f14b"; } .fa-external-link-square:before { content: "\f14c"; } .fa-share-square:before { content: "\f14d"; } .fa-compass:before { content: "\f14e"; } .fa-toggle-down:before, .fa-caret-square-o-down:before { content: "\f150"; } .fa-toggle-up:before, .fa-caret-square-o-up:before { content: "\f151"; } .fa-toggle-right:before, .fa-caret-square-o-right:before { content: "\f152"; } .fa-euro:before, .fa-eur:before { content: "\f153"; } .fa-gbp:before { content: "\f154"; } .fa-dollar:before, .fa-usd:before { content: "\f155"; } .fa-rupee:before, .fa-inr:before { content: "\f156"; } .fa-cny:before, .fa-rmb:before, .fa-yen:before, .fa-jpy:before { content: "\f157"; } .fa-ruble:before, .fa-rouble:before, .fa-rub:before { content: "\f158"; } .fa-won:before, .fa-krw:before { content: "\f159"; } .fa-bitcoin:before, .fa-btc:before { content: "\f15a"; } .fa-file:before { content: "\f15b"; } .fa-file-text:before { content: "\f15c"; } .fa-sort-alpha-asc:before { content: "\f15d"; } .fa-sort-alpha-desc:before { content: "\f15e"; } .fa-sort-amount-asc:before { content: "\f160"; } .fa-sort-amount-desc:before { content: "\f161"; } .fa-sort-numeric-asc:before { content: "\f162"; } .fa-sort-numeric-desc:before { content: "\f163"; } .fa-thumbs-up:before { content: "\f164"; } .fa-thumbs-down:before { content: "\f165"; } .fa-youtube-square:before { content: "\f166"; } .fa-youtube:before { content: "\f167"; } .fa-xing:before { content: "\f168"; } .fa-xing-square:before { content: "\f169"; } .fa-youtube-play:before { content: "\f16a"; } .fa-dropbox:before { content: "\f16b"; } .fa-stack-overflow:before { content: "\f16c"; } .fa-instagram:before { content: "\f16d"; } .fa-flickr:before { content: "\f16e"; } .fa-adn:before { content: "\f170"; } .fa-bitbucket:before { content: "\f171"; } .fa-bitbucket-square:before { content: "\f172"; } .fa-tumblr:before { content: "\f173"; } .fa-tumblr-square:before { content: "\f174"; } .fa-long-arrow-down:before { content: "\f175"; } .fa-long-arrow-up:before { content: "\f176"; } .fa-long-arrow-left:before { content: "\f177"; } .fa-long-arrow-right:before { content: "\f178"; } .fa-apple:before { content: "\f179"; } .fa-windows:before { content: "\f17a"; } .fa-android:before { content: "\f17b"; } .fa-linux:before { content: "\f17c"; } .fa-dribbble:before { content: "\f17d"; } .fa-skype:before { content: "\f17e"; } .fa-foursquare:before { content: "\f180"; } .fa-trello:before { content: "\f181"; } .fa-female:before { content: "\f182"; } .fa-male:before { content: "\f183"; } .fa-gittip:before { content: "\f184"; } .fa-sun-o:before { content: "\f185"; } .fa-moon-o:before { content: "\f186"; } .fa-archive:before { content: "\f187"; } .fa-bug:before { content: "\f188"; } .fa-vk:before { content: "\f189"; } .fa-weibo:before { content: "\f18a"; } .fa-renren:before { content: "\f18b"; } .fa-pagelines:before { content: "\f18c"; } .fa-stack-exchange:before { content: "\f18d"; } .fa-arrow-circle-o-right:before { content: "\f18e"; } .fa-arrow-circle-o-left:before { content: "\f190"; } .fa-toggle-left:before, .fa-caret-square-o-left:before { content: "\f191"; } .fa-dot-circle-o:before { content: "\f192"; } .fa-wheelchair:before { content: "\f193"; } .fa-vimeo-square:before { content: "\f194"; } .fa-turkish-lira:before, .fa-try:before { content: "\f195"; } .fa-plus-square-o:before { content: "\f196"; } .fa-space-shuttle:before { content: "\f197"; } .fa-slack:before { content: "\f198"; } .fa-envelope-square:before { content: "\f199"; } .fa-wordpress:before { content: "\f19a"; } .fa-openid:before { content: "\f19b"; } .fa-institution:before, .fa-bank:before, .fa-university:before { content: "\f19c"; } .fa-mortar-board:before, .fa-graduation-cap:before { content: "\f19d"; } .fa-yahoo:before { content: "\f19e"; } .fa-google:before { content: "\f1a0"; } .fa-reddit:before { content: "\f1a1"; } .fa-reddit-square:before { content: "\f1a2"; } .fa-stumbleupon-circle:before { content: "\f1a3"; } .fa-stumbleupon:before { content: "\f1a4"; } .fa-delicious:before { content: "\f1a5"; } .fa-digg:before { content: "\f1a6"; } .fa-pied-piper:before { content: "\f1a7"; } .fa-pied-piper-alt:before { content: "\f1a8"; } .fa-drupal:before { content: "\f1a9"; } .fa-joomla:before { content: "\f1aa"; } .fa-language:before { content: "\f1ab"; } .fa-fax:before { content: "\f1ac"; } .fa-building:before { content: "\f1ad"; } .fa-child:before { content: "\f1ae"; } .fa-paw:before { content: "\f1b0"; } .fa-spoon:before { content: "\f1b1"; } .fa-cube:before { content: "\f1b2"; } .fa-cubes:before { content: "\f1b3"; } .fa-behance:before { content: "\f1b4"; } .fa-behance-square:before { content: "\f1b5"; } .fa-steam:before { content: "\f1b6"; } .fa-steam-square:before { content: "\f1b7"; } .fa-recycle:before { content: "\f1b8"; } .fa-automobile:before, .fa-car:before { content: "\f1b9"; } .fa-cab:before, .fa-taxi:before { content: "\f1ba"; } .fa-tree:before { content: "\f1bb"; } .fa-spotify:before { content: "\f1bc"; } .fa-deviantart:before { content: "\f1bd"; } .fa-soundcloud:before { content: "\f1be"; } .fa-database:before { content: "\f1c0"; } .fa-file-pdf-o:before { content: "\f1c1"; } .fa-file-word-o:before { content: "\f1c2"; } .fa-file-excel-o:before { content: "\f1c3"; } .fa-file-powerpoint-o:before { content: "\f1c4"; } .fa-file-photo-o:before, .fa-file-picture-o:before, .fa-file-image-o:before { content: "\f1c5"; } .fa-file-zip-o:before, .fa-file-archive-o:before { content: "\f1c6"; } .fa-file-sound-o:before, .fa-file-audio-o:before { content: "\f1c7"; } .fa-file-movie-o:before, .fa-file-video-o:before { content: "\f1c8"; } .fa-file-code-o:before { content: "\f1c9"; } .fa-vine:before { content: "\f1ca"; } .fa-codepen:before { content: "\f1cb"; } .fa-jsfiddle:before { content: "\f1cc"; } .fa-life-bouy:before, .fa-life-buoy:before, .fa-life-saver:before, .fa-support:before, .fa-life-ring:before { content: "\f1cd"; } .fa-circle-o-notch:before { content: "\f1ce"; } .fa-ra:before, .fa-rebel:before { content: "\f1d0"; } .fa-ge:before, .fa-empire:before { content: "\f1d1"; } .fa-git-square:before { content: "\f1d2"; } .fa-git:before { content: "\f1d3"; } .fa-hacker-news:before { content: "\f1d4"; } .fa-tencent-weibo:before { content: "\f1d5"; } .fa-qq:before { content: "\f1d6"; } .fa-wechat:before, .fa-weixin:before { content: "\f1d7"; } .fa-send:before, .fa-paper-plane:before { content: "\f1d8"; } .fa-send-o:before, .fa-paper-plane-o:before { content: "\f1d9"; } .fa-history:before { content: "\f1da"; } .fa-circle-thin:before { content: "\f1db"; } .fa-header:before { content: "\f1dc"; } .fa-paragraph:before { content: "\f1dd"; } .fa-sliders:before { content: "\f1de"; } .fa-share-alt:before { content: "\f1e0"; } .fa-share-alt-square:before { content: "\f1e1"; } .fa-bomb:before { content: "\f1e2"; } .fa-soccer-ball-o:before, .fa-futbol-o:before { content: "\f1e3"; } .fa-tty:before { content: "\f1e4"; } .fa-binoculars:before { content: "\f1e5"; } .fa-plug:before { content: "\f1e6"; } .fa-slideshare:before { content: "\f1e7"; } .fa-twitch:before { content: "\f1e8"; } .fa-yelp:before { content: "\f1e9"; } .fa-newspaper-o:before { content: "\f1ea"; } .fa-wifi:before { content: "\f1eb"; } .fa-calculator:before { content: "\f1ec"; } .fa-paypal:before { content: "\f1ed"; } .fa-google-wallet:before { content: "\f1ee"; } .fa-cc-visa:before { content: "\f1f0"; } .fa-cc-mastercard:before { content: "\f1f1"; } .fa-cc-discover:before { content: "\f1f2"; } .fa-cc-amex:before { content: "\f1f3"; } .fa-cc-paypal:before { content: "\f1f4"; } .fa-cc-stripe:before { content: "\f1f5"; } .fa-bell-slash:before { content: "\f1f6"; } .fa-bell-slash-o:before { content: "\f1f7"; } .fa-trash:before { content: "\f1f8"; } .fa-copyright:before { content: "\f1f9"; } .fa-at:before { content: "\f1fa"; } .fa-eyedropper:before { content: "\f1fb"; } .fa-paint-brush:before { content: "\f1fc"; } .fa-birthday-cake:before { content: "\f1fd"; } .fa-area-chart:before { content: "\f1fe"; } .fa-pie-chart:before { content: "\f200"; } .fa-line-chart:before { content: "\f201"; } .fa-lastfm:before { content: "\f202"; } .fa-lastfm-square:before { content: "\f203"; } .fa-toggle-off:before { content: "\f204"; } .fa-toggle-on:before { content: "\f205"; } .fa-bicycle:before { content: "\f206"; } .fa-bus:before { content: "\f207"; } .fa-ioxhost:before { content: "\f208"; } .fa-angellist:before { content: "\f209"; } .fa-cc:before { content: "\f20a"; } .fa-shekel:before, .fa-sheqel:before, .fa-ils:before { content: "\f20b"; } .fa-meanpath:before { content: "\f20c"; }
compassion-technologies/Probs.info
qa-theme/Donut-theme/css/font-awesome.css
CSS
gpl-3.0
26,649
/* Copyright (C) 2018 Magnus Lång and Tuan Phong Ngo * This benchmark is part of SWSC */ #include <assert.h> #include <stdint.h> #include <stdatomic.h> #include <pthread.h> atomic_int vars[2]; atomic_int atom_0_r3_2; atomic_int atom_0_r5_3; atomic_int atom_1_r5_2; atomic_int atom_1_r1_1; void *t0(void *arg){ label_1:; atomic_store_explicit(&vars[0], 2, memory_order_seq_cst); int v2_r3 = atomic_load_explicit(&vars[0], memory_order_seq_cst); atomic_store_explicit(&vars[0], 3, memory_order_seq_cst); int v4_r5 = atomic_load_explicit(&vars[0], memory_order_seq_cst); atomic_store_explicit(&vars[1], 1, memory_order_seq_cst); int v18 = (v2_r3 == 2); atomic_store_explicit(&atom_0_r3_2, v18, memory_order_seq_cst); int v19 = (v4_r5 == 3); atomic_store_explicit(&atom_0_r5_3, v19, memory_order_seq_cst); return NULL; } void *t1(void *arg){ label_2:; int v6_r1 = atomic_load_explicit(&vars[1], memory_order_seq_cst); int v7_r3 = v6_r1 ^ v6_r1; int v8_r3 = v7_r3 + 1; atomic_store_explicit(&vars[0], v8_r3, memory_order_seq_cst); int v10_r5 = atomic_load_explicit(&vars[0], memory_order_seq_cst); int v20 = (v10_r5 == 2); atomic_store_explicit(&atom_1_r5_2, v20, memory_order_seq_cst); int v21 = (v6_r1 == 1); atomic_store_explicit(&atom_1_r1_1, v21, memory_order_seq_cst); return NULL; } int main(int argc, char *argv[]){ pthread_t thr0; pthread_t thr1; atomic_init(&vars[1], 0); atomic_init(&vars[0], 0); atomic_init(&atom_0_r3_2, 0); atomic_init(&atom_0_r5_3, 0); atomic_init(&atom_1_r5_2, 0); atomic_init(&atom_1_r1_1, 0); pthread_create(&thr0, NULL, t0, NULL); pthread_create(&thr1, NULL, t1, NULL); pthread_join(thr0, NULL); pthread_join(thr1, NULL); int v11 = atomic_load_explicit(&atom_0_r3_2, memory_order_seq_cst); int v12 = atomic_load_explicit(&atom_0_r5_3, memory_order_seq_cst); int v13 = atomic_load_explicit(&atom_1_r5_2, memory_order_seq_cst); int v14 = atomic_load_explicit(&atom_1_r1_1, memory_order_seq_cst); int v15_conj = v13 & v14; int v16_conj = v12 & v15_conj; int v17_conj = v11 & v16_conj; if (v17_conj == 1) assert(0); return 0; }
nidhugg/nidhugg
tests/litmus/C-tests/DETOUR0492.c
C
gpl-3.0
2,156
#ifndef MANTID_INDEXING_INDEXTYPE_H_ #define MANTID_INDEXING_INDEXTYPE_H_ #include <type_traits> namespace Mantid { namespace Indexing { namespace detail { /** A base class for strongly-typed integers, without implicit conversion. @author Simon Heybrock @date 2017 Copyright &copy; 2017 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge National Laboratory & European Spallation Source This file is part of Mantid. Mantid 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. Mantid 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/>. File change history is stored at: <https://github.com/mantidproject/mantid> Code Documentation is available at: <http://doxygen.mantidproject.org> */ template <class Derived, class Int, class = typename std::enable_if<std::is_integral<Int>::value>::type> class IndexType { public: using underlying_type = Int; IndexType() noexcept : m_data(0) {} IndexType(Int data) noexcept : m_data(data) {} explicit operator Int() const noexcept { return m_data; } template <class T> IndexType &operator=(const T &other) noexcept { m_data = IndexType(other).m_data; return *this; } template <class T> bool operator==(const T &other) const noexcept { return m_data == IndexType(other).m_data; } template <class T> bool operator!=(const T &other) const noexcept { return m_data != IndexType(other).m_data; } template <class T> bool operator>(const T &other) const noexcept { return m_data > IndexType(other).m_data; } template <class T> bool operator>=(const T &other) const noexcept { return m_data >= IndexType(other).m_data; } template <class T> bool operator<(const T &other) const noexcept { return m_data < IndexType(other).m_data; } template <class T> bool operator<=(const T &other) const noexcept { return m_data <= IndexType(other).m_data; } private: Int m_data; }; } // namespace detail } // namespace Indexing } // namespace Mantid #endif /* MANTID_INDEXING_INDEXTYPE_H_ */
ScreamingUdder/mantid
Framework/Indexing/inc/MantidIndexing/IndexType.h
C
gpl-3.0
2,512
/** * Piwik - free/libre analytics platform * * Series Picker control addition for DataTable visualizations. * * @link http://piwik.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later */ (function ($, require) { /** * This class creates and manages the Series Picker for certain DataTable visualizations. * * To add the series picker to your DataTable visualization, create a SeriesPicker instance * and after your visualization has been rendered, call the 'init' method. * * To customize SeriesPicker placement and behavior, you can bind callbacks to the following * events before calling 'init': * * 'placeSeriesPicker': Triggered after the DOM element for the series picker link is created. * You must use this event to add the link to the dataTable. YOu can also * use this event to position the link however you want. * * Callback Signature: function () {} * * 'seriesPicked': Triggered when the user selects one or more columns/rows. * * Callback Signature: function (eventInfo, columns, rows) {} * * Events are triggered via jQuery, so you bind callbacks to them like this: * * var picker = new SeriesPicker(dataTable); * $(picker).bind('placeSeriesPicker', function () { * $(this.domElem).doSomething(...); * }); * * @param {dataTable} dataTable The dataTable instance to add a series picker to. * @constructor * @deprecated use the piwik-series-picker directive instead */ var SeriesPicker = function (dataTable) { this.domElem = null; this.dataTableId = dataTable.workingDivId; // the columns that can be selected this.selectableColumns = dataTable.props.selectable_columns; // the rows that can be selected this.selectableRows = dataTable.props.selectable_rows; // render the picker? this.show = !! dataTable.props.show_series_picker && (this.selectableColumns || this.selectableRows); // can multiple rows we selected? this.multiSelect = !! dataTable.props.allow_multi_select_series_picker; }; SeriesPicker.prototype = { /** * Initializes the series picker by creating the element. Must be called when * the datatable the picker is being attached to is ready for it to be drawn. */ init: function () { if (!this.show) { return; } var self = this; var selectedColumns = this.selectableColumns .filter(isItemDisplayed) .map(function (columnConfig) { return columnConfig.column; }); var selectedRows = this.selectableRows .filter(isItemDisplayed) .map(function (rowConfig) { return rowConfig.matcher; }); // initialize dom element var seriesPicker = '<piwik-series-picker' + ' multiselect="' + (this.multiSelect ? 'true' : 'false') + '"' + ' selectable-columns="selectableColumns"' + ' selectable-rows="selectableRows"' + ' selected-columns="selectedColumns"' + ' selected-rows="selectedRows"' + ' on-select="selectionChanged(columns, rows)"/>'; this.domElem = $(seriesPicker); // TODO: don't know if this will work without a root scope $(this).trigger('placeSeriesPicker'); piwikHelper.compileAngularComponents(this.domElem, { scope: { selectableColumns: this.selectableColumns, selectableRows: this.selectableRows, selectedColumns: selectedColumns, selectedRows: selectedRows, selectionChanged: function selectionChanged(columns, rows) { if (columns.length === 0 && rows.length === 0) { return; } $(self).trigger('seriesPicked', [columns, rows]); // inform dashboard widget about changed parameters (to be restored on reload) var UI = require('piwik/UI'); var params = { columns: columns, columns_to_display: columns, rows: rows, rows_to_display: rows }; var tableNode = $('#' + this.dataTableId); UI.DataTable.prototype.notifyWidgetParametersChange(tableNode, params); } } }); function isItemDisplayed(columnOrRowConfig) { return columnOrRowConfig.displayed; } }, /** * Returns the translation of a metric that can be selected. * * @param {String} metric The name of the metric, ie, 'nb_visits' or 'nb_actions'. * @return {String} The metric translation. If one cannot be found, the metric itself * is returned. */ getMetricTranslation: function (metric) { for (var i = 0; i !== this.selectableColumns.length; ++i) { if (this.selectableColumns[i].column === metric) { return this.selectableColumns[i].translation; } } return metric; } }; var exports = require('piwik/DataTableVisualizations/Widgets'); exports.SeriesPicker = SeriesPicker; })(jQuery, require);
Morerice/piwik
plugins/CoreVisualizations/javascripts/seriesPicker.js
JavaScript
gpl-3.0
5,845
""" Interacts with sqlite3 db """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import six import sqlite3 import os import hashlib import random import time import DIRAC from DIRAC import gLogger, S_OK, S_ERROR from DIRAC.FrameworkSystem.private.monitoring.Activity import Activity from DIRAC.Core.Utilities import Time class MonitoringCatalog(object): """ This class is used to perform all kinds queries to the sqlite3 database. """ def __init__(self, dataPath): """ Initialize monitoring catalog """ self.dbConn = False self.dataPath = dataPath self.log = gLogger.getSubLogger("ActivityCatalog") self.createSchema() def __connect(self): """ Connects to database """ if not self.dbConn: dbPath = "%s/monitoring.db" % self.dataPath self.dbConn = sqlite3.connect(dbPath, timeout=20, isolation_level=None) # These two settings dramatically increase the performance # at the cost of a small corruption risk in case of OS crash # It is acceptable though, given the nature of the data # details here https://www.sqlite.org/pragma.html c = self.dbConn.cursor() c.execute("PRAGMA synchronous = OFF") c.execute("PRAGMA journal_mode = TRUNCATE") def __dbExecute(self, query, values=False): """ Executes a sql statement. :type query: string :param query: The query to be executed. :type values: bool :param values: To execute query with values or not. :return: the cursor. """ cursor = self.dbConn.cursor() # pylint: disable=no-member self.log.debug("Executing %s" % query) executed = False retry = 0 while not executed and retry < 10: retry += 1 try: if values: cursor.execute(query, values) else: cursor.execute(query) executed = True except Exception as e: self.log.exception("Exception executing statement", "query: %s, values: %s" % (query, values)) time.sleep(random.random()) if not executed: self.log.error("Could not execute query, big mess ahead", "query: %s, values: %s" % (query, values)) return cursor def __createTables(self): """ Creates tables if not already created """ self.log.info("Creating tables in db") try: filePath = "%s/monitoringSchema.sql" % os.path.dirname(__file__) fd = open(filePath) buff = fd.read() fd.close() except IOError as e: DIRAC.abort(1, "Can't read monitoring schema", filePath) while buff.find(";") > -1: limit = buff.find(";") + 1 sqlQuery = buff[:limit].replace("\n", "") buff = buff[limit:] try: self.__dbExecute(sqlQuery) except Exception as e: DIRAC.abort(1, "Can't create tables", str(e)) def createSchema(self): """ Creates all the sql schema if it does not exist """ self.__connect() try: sqlQuery = "SELECT name FROM sqlite_master WHERE type='table';" c = self.__dbExecute(sqlQuery) tablesList = c.fetchall() if len(tablesList) < 2: self.__createTables() except Exception as e: self.log.fatal("Failed to startup db engine", str(e)) return False return True def __delete(self, table, dataDict): """ Executes an sql delete. :type table: string :param table: name of the table. :type dataDict: dictionary :param dataDict: the data dictionary. """ query = "DELETE FROM %s" % table valuesList = [] keysList = [] for key in dataDict: if isinstance(dataDict[key], list): orList = [] for keyValue in dataDict[key]: valuesList.append(keyValue) orList.append("%s = ?" % key) keysList.append("( %s )" % " OR ".join(orList)) else: valuesList.append(dataDict[key]) keysList.append("%s = ?" % key) if keysList: query += " WHERE %s" % (" AND ".join(keysList)) self.__dbExecute("%s;" % query, values=valuesList) def __select(self, fields, table, dataDict, extraCond="", queryEnd=""): """ Executes a sql select. :type fields: string :param fields: The fields required in a string. :type table: string :param table: name of the table. :type dataDict: dictionary :param dataDict: the data dictionary. :return: a list of values. """ valuesList = [] keysList = [] for key in dataDict: if isinstance(dataDict[key], list): orList = [] for keyValue in dataDict[key]: valuesList.append(keyValue) orList.append("%s = ?" % key) keysList.append("( %s )" % " OR ".join(orList)) else: valuesList.append(dataDict[key]) keysList.append("%s = ?" % key) if isinstance(fields, six.string_types): fields = [fields] if len(keysList) > 0: whereCond = "WHERE %s" % (" AND ".join(keysList)) else: whereCond = "" if extraCond: if whereCond: whereCond += " AND %s" % extraCond else: whereCond = "WHERE %s" % extraCond query = "SELECT %s FROM %s %s %s;" % (",".join(fields), table, whereCond, queryEnd) c = self.__dbExecute(query, values=valuesList) return c.fetchall() def __insert(self, table, specialDict, dataDict): """ Executes an sql insert. :type table: string :param table: name of the table. :type specialDict: dictionary :param specialDict: the special dictionary. :type dataDict: dictionary :param dataDict: the data dictionary. :return: the number of rows inserted. """ valuesList = [] valuePoitersList = [] namesList = [] for key in specialDict: namesList.append(key) valuePoitersList.append(specialDict[key]) for key in dataDict: namesList.append(key) valuePoitersList.append("?") valuesList.append(dataDict[key]) query = "INSERT INTO %s (%s) VALUES (%s);" % (table, ", ".join(namesList), ",".join(valuePoitersList)) c = self.__dbExecute(query, values=valuesList) return c.rowcount def __update(self, newValues, table, dataDict, extraCond=""): """ Executes a sql update. :type table: string :param table: name of the table. :type newValues: dictionary :param newValues: a dictionary with new values. :type dataDict: dictionary :param dataDict: the data dictionary. :return: the number of rows updated. """ valuesList = [] keysList = [] updateFields = [] for key in newValues: updateFields.append("%s = ?" % key) valuesList.append(newValues[key]) for key in dataDict: if isinstance(dataDict[key], list): orList = [] for keyValue in dataDict[key]: valuesList.append(keyValue) orList.append("%s = ?" % key) keysList.append("( %s )" % " OR ".join(orList)) else: valuesList.append(dataDict[key]) keysList.append("%s = ?" % key) if len(keysList) > 0: whereCond = "WHERE %s" % (" AND ".join(keysList)) else: whereCond = "" if extraCond: if whereCond: whereCond += " AND %s" % extraCond else: whereCond = "WHERE %s" % extraCond query = "UPDATE %s SET %s %s;" % (table, ",".join(updateFields), whereCond) c = self.__dbExecute(query, values=valuesList) return c.rowcount def registerSource(self, sourceDict): """ Registers an activity source. :type sourceDict: dictionary :param sourceDict: the source dictionary. :return: a list of values. """ retList = self.__select("id", "sources", sourceDict) if len(retList) > 0: return retList[0][0] else: self.log.info("Registering source", str(sourceDict)) if self.__insert("sources", {"id": "NULL"}, sourceDict) == 0: return -1 return self.__select("id", "sources", sourceDict)[0][0] def registerActivity(self, sourceId, acName, acDict): """ Register an activity. :type sourceId: string :param sourceId: The source id. :type acName: string :param acName: name of the activity. :type acDict: dictionary :param acDict: The activity dictionary containing information about 'category', 'description', 'bucketLength', 'type', 'unit'. :return: a list of values. """ m = hashlib.md5() acDict["name"] = acName acDict["sourceId"] = sourceId m.update(str(acDict).encode()) retList = self.__select("filename", "activities", acDict) if len(retList) > 0: return retList[0][0] else: acDict["lastUpdate"] = int(Time.toEpoch() - 86000) filePath = m.hexdigest() filePath = "%s/%s.rrd" % (filePath[:2], filePath) self.log.info("Registering activity", str(acDict)) # This is basically called by the ServiceInterface inside registerActivities method and then all the activity # information is stored in the sqlite3 db using the __insert method. if ( self.__insert( "activities", { "id": "NULL", "filename": "'%s'" % filePath, }, acDict, ) == 0 ): return -1 return self.__select("filename", "activities", acDict)[0][0] def getFilename(self, sourceId, acName): """ Gets rrd filename for an activity. :type sourceId: string :param sourceId: The source id. :type acName: string :param acName: name of the activity. :return: The filename in a string. """ queryDict = {"sourceId": sourceId, "name": acName} retList = self.__select("filename", "activities", queryDict) if len(retList) == 0: return "" else: return retList[0][0] def findActivity(self, sourceId, acName): """ Finds activity. :type sourceId: string :param sourceId: The source id. :type acName: string :param acName: name of the activity. :return: A list containing all the activity information. """ queryDict = {"sourceId": sourceId, "name": acName} retList = self.__select( "id, name, category, unit, type, description, filename, bucketLength, lastUpdate", "activities", queryDict ) if len(retList) == 0: return False else: return retList[0] def activitiesQuery(self, selDict, sortList, start, limit): """ Gets all the sources and activities details in a joined format. :type selDict: dictionary :param selDict: The fields inside the select query. :type sortList: list :param sortList: A list in sorted order of the data. :type start: int :param start: The point or tuple from where to start. :type limit: int :param limit: The number of tuples to select from the starting point. :return: S_OK with a tuple of the result list and fields list. """ fields = [ "sources.id", "sources.site", "sources.componentType", "sources.componentLocation", "sources.componentName", "activities.id", "activities.name", "activities.category", "activities.unit", "activities.type", "activities.description", "activities.bucketLength", "activities.filename", "activities.lastUpdate", ] extraSQL = "" if sortList: for sorting in sortList: if sorting[0] not in fields: return S_ERROR("Sorting field %s is invalid" % sorting[0]) extraSQL = "ORDER BY %s" % ",".join(["%s %s" % sorting for sorting in sortList]) if limit: if start: extraSQL += " LIMIT %s OFFSET %s" % (limit, start) else: extraSQL += " LIMIT %s" % limit # This method basically takes in some condition and then based on those performs SQL Join on the # sources and activities table of the sqlite3 db and returns the corresponding result. retList = self.__select( ", ".join(fields), "sources, activities", selDict, "sources.id = activities.sourceId", extraSQL ) return S_OK((retList, fields)) def setLastUpdate(self, sourceId, acName, lastUpdateTime): """ Updates the lastUpdate timestamp for a particular activity using the source id. :type sourceId: string :param sourceId: The source id. :type acName: string :param acName: name of the activity. :type lastUpdateTime: string :param lastUpdateTime: The last update time in the proper format. :return: the number of rows updated. """ queryDict = {"sourceId": sourceId, "name": acName} return self.__update({"lastUpdate": lastUpdateTime}, "activities", queryDict) def getLastUpdate(self, sourceId, acName): """ Gets the lastUpdate timestamp for a particular activity using the source id. :type sourceId: string :param sourceId: The source id. :type acName: string :param acName: name of the activity. :return: The last update time in string. """ queryDict = {"sourceId": sourceId, "name": acName} retList = self.__update("lastUpdate", "activities", queryDict) if len(retList) == 0: return False else: return retList[0] def queryField(self, field, definedFields): """ Query the values of a field given a set of defined ones. :type field: string :param field: The field required in a string. :type field: list :param definedFields: A set of defined fields. :return: A list of values. """ retList = self.__select(field, "sources, activities", definedFields, "sources.id = activities.sourceId") return retList def getMatchingActivities(self, condDict): """ Gets all activities matching the defined conditions. :type condDict: dictionary. :param condDict: A dictionary containing the conditions. :return: a list of matching activities. """ retList = self.queryField(Activity.dbFields, condDict) acList = [] for acData in retList: acList.append(Activity(acData)) return acList def registerView(self, viewName, viewData, varFields): """ Registers a new view. :type viewName: string :param viewName: Name of the view. :type viewDescription: dictionary :param viewDescription: A dictionary containing the view description. :type varFields: list :param varFields: A list of variable fields. :return: S_OK / S_ERROR with the corresponding error message. """ retList = self.__select("id", "views", {"name": viewName}) if len(retList) > 0: return S_ERROR("Name for view name already exists") retList = self.__select("name", "views", {"definition": viewData}) if len(retList) > 0: return S_ERROR("View specification already defined with name '%s'" % retList[0][0]) self.__insert( "views", {"id": "NULL"}, {"name": viewName, "definition": viewData, "variableFields": ", ".join(varFields)} ) return S_OK() def getViews(self, onlyStatic): """ Gets views. :type onlyStatic: bool :param onlyStatic: Whether the views required are static or not. :return: A list of values. """ queryCond = {} if onlyStatic: queryCond["variableFields"] = "" return self.__select("id, name, variableFields", "views", queryCond) def getViewById(self, viewId): """ Gets a view for a given id. :type viewId: string :param viewId: The view id. :return: A list of values. """ if isinstance(viewId, six.string_types): return self.__select("definition, variableFields", "views", {"name": viewId}) else: return self.__select("definition, variableFields", "views", {"id": viewId}) def deleteView(self, viewId): """ Deletes a view for a given id. :type viewId: string :param viewId: The view id. """ self.__delete("views", {"id": viewId}) def getSources(self, dbCond, fields=[]): """ Gets souces for a given db condition. :type dbCond: dictionary :param dbCond: The required database conditions. :type fields: list :param fields: A list of required fields. :return: The list of results after the query is performed. """ if not fields: fields = "id, site, componentType, componentLocation, componentName" else: fields = ", ".join(fields) return self.__select(fields, "sources", dbCond) def getActivities(self, dbCond): """ Gets activities given a db condition. :type dbCond: dictionary :param dbCond: The required database conditions. :return: a list of activities. """ return self.__select("id, name, category, unit, type, description, bucketLength", "activities", dbCond) def deleteActivity(self, sourceId, activityId): """ Deletes an activity. :type sourceId: string :param sourceId: The source id. :type activityId: string :param activityId: The activity id. :return: S_OK with rrd filename / S_ERROR with a message. """ acCond = {"sourceId": sourceId, "id": activityId} acList = self.__select("filename", "activities", acCond) if len(acList) == 0: return S_ERROR("Activity does not exist") rrdFile = acList[0][0] self.__delete("activities", acCond) acList = self.__select("id", "activities", {"sourceId": sourceId}) if len(acList) == 0: self.__delete("sources", {"id": sourceId}) return S_OK(rrdFile)
ic-hep/DIRAC
src/DIRAC/FrameworkSystem/private/monitoring/MonitoringCatalog.py
Python
gpl-3.0
19,766
# DESCRIPTION # Resizes an image by nearest neighbor method via ffmpeg. # USAGE # Run this script with three parameters: # - $1 input file # - $2 output format # - $3 px wide to resize to by nearest neighbor method, maintaining aspect # For example: # ffmpeg2imgNN.sh input.jpg png 1920 # CODE # example ffmpeg command; resizes to x800 px maintaining aspect ratio: # ffmpeg -y -i in.png -vf scale=1280:-1:flags=neighbor out.png imgFileNoExt=${1%.*} # NOTE: for an arbitrary resolution hack the next line like: # ffmpeg -y -i $1 -vf scale=1280:720:flags=neighbor $imgFileNoExt.$2 ffmpeg -y -i $1 -vf scale=$3:-1:flags=neighbor $imgFileNoExt.$2
r-alex-hall/fontDevTools
scripts/imgAndVideo/ffmpeg2imgNN.sh
Shell
gpl-3.0
648
<?php /** * Mandatory public API of userverifier module * * @package mod_userverifier * @copyright 2015 Maxim Lobov * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ defined('MOODLE_INTERNAL') || die; /** * @uses FEATURE_COMPLETION_HAS_RULES * @param string $feature FEATURE_xx constant for requested feature * @return mixed True if module supports feature, null if doesn't know */ function userverifier_supports($feature) { switch($feature) { case FEATURE_COMPLETION_HAS_RULES: return true; default: return null; } } /** * Add userverifier instance. * @param object $data * @param object $mform * @return int new userverifier instance id */ function userverifier_add_instance($data, $mform) { global $CFG, $DB; $data->timemodified = $data->timemodified = time(); $data->id = $DB->insert_record('userverifier', $data); return $data->id; } /** * Update userverifier instance. * @param object $data * @param object $mform * @return bool true */ function userverifier_update_instance($data, $mform) { global $CFG, $DB; $data->timemodified = time(); $data->id = $data->instance; $DB->update_record('userverifier', $data); return true; } /** * Delete userverifier instance. * @param int $id * @return bool true */ function userverifier_delete_instance($id) { global $DB; if (!$userverifier = $DB->get_record('userverifier', array('id'=>$id))) { return false; } // note: all context files are deleted automatically $DB->delete_records('userverifier', array('id'=>$userverifier->id)); return true; } /** * Obtains the automatic completion state for this userverifier based on the condition * in userverifier settings. * * @param object $course Course * @param object $cm Course-module * @param int $userid User ID * @param bool $type Type of comparison (or/and; can be used as return value if no conditions) * @return bool True if completed, false if not, $type if conditions not set. */ function userverifier_get_completion_state($course, $cm, $userid, $type){ global $DB; $userverifier = $DB->get_record('userverifier', array('id'=>$cm->instance), '*', MUST_EXIST); if( $userverifier->completionphoto ){ $select = "userverifier={$cm->instance} AND userid={$userid} AND (status=0 OR status=1)"; return $DB->record_exists_select('userverifier_photo', $select); } return $type; }
Slaffka/moodel
mod/userverifier/lib.php
PHP
gpl-3.0
2,588
//Scroll View function scrollHandler(view, hscrollbar, vscrollbar){ this.view= view; this.view.addEventListener('DOMMouseScroll', this, false); this.view.addEventListener('mousewheel', this, false); this.hListeners= []; this.vListeners= []; if (hscrollbar != undefined){ this.hscrollbar= hscrollbar; this.hscrollbar.addEventListener('scroll', this, false); } if (vscrollbar != undefined){ this.vscrollbar= vscrollbar; this.vscrollbar.addEventListener('scroll', this, false); } }; scrollHandler.prototype.addListener= function(axis, listener){ if (axis == 1 || axis == 'x' || axis == 'h') this.hListeners.push(listener); if (axis == 2 || axis == 'y' || axis == 'v') this.vListeners.push(listener); }; scrollHandler.prototype.handleEvent= function(event){ switch(event.type) { case 'scroll': if (this.hscrollbar != undefined) { view.style.left= -this.hscrollbar.scrollLeft + "px"; for(var listener=0; listener < this.hListeners.length; listener++){ this.hListeners[listener].OnHScroll(event.target.id); } } if (this.vscrollbar != undefined) { view.style.top= -this.vscrollbar.scrollTop + "px"; for(var listener=0; listener < this.vListeners.length; listener++){ this.vListeners[listener].OnVScroll(event.target.id); } } break; case 'DOMMouseScroll': // Firefox: event.axis= 1-x,2-y; event.detail= ticks. this.scrollWheel(event.axis, event.detail*4); event.preventDefault(); break; case 'mousewheel': // event.wheelDelta= ticks*(-120); event.wheelDeltaX= ticksX*(-120); event.wheelDeltaY= ticksY*(-120); this.scrollWheel(event.wheelDeltaX != 0? 1 : 2, -event.wheelDelta/15); event.preventDefault(); break; } }; scrollHandler.prototype.scrollWheel= function(axis, delta){ switch (axis){ case 1: // X axis if (this.hscrollbar != undefined) { this.hscrollbar.scrollLeft= this.hscrollbar.scrollLeft + delta; //TODO: Test for limits. 0 < scrollLeft < scrollsizewidth } break; case 2: // Y axis if (this.vscrollbar != undefined) { this.vscrollbar.scrollTop= this.vscrollbar.scrollTop + delta; //TODO: Test for limits. 0 < scrollTop < scrollsizeheight } break; } }; // Resize function resizeHandler(handgrip, listener){ this.dragging= false; this.dragginId= ''; this.listener= listener; this.initialPoint= {x:0, y:0}; handgrip.addEventListener('mousedown', this, false); handgrip.addEventListener('dragstart', this, false); handgrip.addEventListener('selectstart', this, false); window.addEventListener('mouseup', this, false); }; resizeHandler.prototype.handleEvent= function(event){ switch(event.type) { case 'dragstart': case 'selectstart': event.preventDefault(); break; case 'mousedown': this.dragging= true; this.initialPoint.x= event.clientX; this.initialPoint.y= event.clientY; this.draggingId= event.target.id; document.getElementsByTagName('body')[0].style.cursor= 'ew-resize'; //document.childNodes[0].style.cursor= 'ew-resize'; //'se-resize'; event.preventDefault(); break; case 'mouseup': if (this.dragging) { document.getElementsByTagName('body')[0].style.cursor= 'auto'; //document.childNodes[0].style.cursor= 'auto'; this.dragging= false; //TODO: En lugar de lanzar un evento, puede redimensionar la división padre. this.listener.OnResize(this.draggingId , event.clientX - this.initialPoint.x , event.clientY - this.initialPoint.y); event.preventDefault(); } break; } }; function bas_copyAttributes(src, dst){ for (var attr in src) dst[attr]= src[attr]; };
dmelian/imywa
www/script/frmx/lib.js
JavaScript
gpl-3.0
3,589
#!/bin/sh cmake -G "CodeBlocks - Unix Makefiles" "$*" -DCMAKE_TOOLCHAIN_FILE=../toolchain-arm-none-eabi-rpi.cmake ../
hoglet67/PiTubeDirect
src/scripts/configure_rpi.sh
Shell
gpl-3.0
119
-- DROP TABLE IF EXISTS `zt_action`; CREATE TABLE IF NOT EXISTS `zt_action` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `objectType` varchar(30) NOT NULL default '', `objectID` mediumint(8) unsigned NOT NULL default '0', `product` varchar(255) NOT NULL, `project` mediumint(9) NOT NULL, `actor` varchar(30) NOT NULL default '', `action` varchar(30) NOT NULL default '', `date` datetime NOT NULL, `comment` text NOT NULL, `extra` varchar(255) NOT NULL, PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_bug`; CREATE TABLE IF NOT EXISTS `zt_bug` ( `id` mediumint(8) NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL default '0', `module` mediumint(8) unsigned NOT NULL default '0', `project` mediumint(8) unsigned NOT NULL default '0', `story` mediumint(8) unsigned NOT NULL default '0', `storyVersion` smallint(6) NOT NULL default '1', `task` mediumint(8) unsigned NOT NULL default '0', `toTask` mediumint(8) unsigned NOT NULL default '0', `toStory` mediumint(8) NOT NULL default '0', `title` varchar(255) NOT NULL, `keywords` varchar(255) NOT NULL, `severity` tinyint(4) NOT NULL default '0', `pri` tinyint(3) unsigned NOT NULL, `type` varchar(30) NOT NULL default '', `os` varchar(30) NOT NULL default '', `browser` varchar(30) NOT NULL default '', `hardware` varchar(30) NOT NULL, `found` varchar(30) NOT NULL default '', `steps` text NOT NULL, `status` enum('active','resolved','closed') NOT NULL default 'active', `confirmed` tinyint(1) NOT NULL default '0', `activatedCount` smallint(6) NOT NULL, `mailto` varchar(255) NOT NULL default '', `openedBy` varchar(30) NOT NULL default '', `openedDate` datetime NOT NULL, `openedBuild` varchar(255) NOT NULL, `assignedTo` varchar(30) NOT NULL default '', `assignedDate` datetime NOT NULL, `resolvedBy` varchar(30) NOT NULL default '', `resolution` varchar(30) NOT NULL default '', `resolvedBuild` varchar(30) NOT NULL default '', `resolvedDate` datetime NOT NULL, `closedBy` varchar(30) NOT NULL default '', `closedDate` datetime NOT NULL, `duplicateBug` mediumint(8) unsigned NOT NULL, `linkBug` varchar(255) NOT NULL, `case` mediumint(8) unsigned NOT NULL, `caseVersion` smallint(6) NOT NULL default '1', `result` mediumint(8) unsigned NOT NULL, `lastEditedBy` varchar(30) NOT NULL default '', `lastEditedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_build`; CREATE TABLE IF NOT EXISTS `zt_build` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL default '0', `project` mediumint(8) unsigned NOT NULL default '0', `name` char(150) NOT NULL, `scmPath` char(255) NOT NULL, `filePath` char(255) NOT NULL, `date` date NOT NULL, `stories` text NOT NULL, `bugs` text NOT NULL, `builder` char(30) NOT NULL default '', `desc` text NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_burn`; CREATE TABLE IF NOT EXISTS `zt_burn` ( `company` mediumint(8) unsigned NOT NULL, `project` mediumint(8) unsigned NOT NULL, `date` date NOT NULL, `left` float NOT NULL, `consumed` float NOT NULL, PRIMARY KEY (`project`,`date`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_case`; CREATE TABLE IF NOT EXISTS `zt_case` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL default '0', `module` mediumint(8) unsigned NOT NULL default '0', `path` mediumint(8) unsigned NOT NULL default '0', `story` mediumint(30) unsigned NOT NULL default '0', `storyVersion` smallint(6) NOT NULL default '1', `title` varchar(255) NOT NULL, `precondition` text NOT NULL, `keywords` varchar(255) NOT NULL, `pri` tinyint(3) unsigned NOT NULL default '0', `type` char(30) NOT NULL default '1', `stage` varchar(255) NOT NULL, `howRun` varchar(30) NOT NULL, `scriptedBy` varchar(30) NOT NULL, `scriptedDate` date NOT NULL, `scriptStatus` varchar(30) NOT NULL, `scriptLocation` varchar(255) NOT NULL, `status` char(30) NOT NULL default '1', `frequency` enum('1','2','3') NOT NULL default '1', `order` tinyint(30) unsigned NOT NULL default '0', `openedBy` char(30) NOT NULL default '', `openedDate` datetime NOT NULL, `lastEditedBy` char(30) NOT NULL default '', `lastEditedDate` datetime NOT NULL, `version` tinyint(3) unsigned NOT NULL default '0', `linkCase` varchar(255) NOT NULL, `fromBug` mediumint(8) unsigned NOT NULL, `deleted` enum('0','1') NOT NULL default '0', `lastRunner` varchar(30) NOT NULL, `lastRunDate` datetime NOT NULL, `lastRunResult` char(30) NOT NULL, PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_caseStep`; CREATE TABLE IF NOT EXISTS `zt_caseStep` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `case` mediumint(8) unsigned NOT NULL default '0', `version` smallint(3) unsigned NOT NULL default '0', `desc` text NOT NULL, `expect` text NOT NULL, PRIMARY KEY (`id`), KEY `case` (`case`,`version`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_company`; CREATE TABLE IF NOT EXISTS `zt_company` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `name` char(120) default NULL, `phone` char(20) default NULL, `fax` char(20) default NULL, `address` char(120) default NULL, `zipcode` char(10) default NULL, `website` char(120) default NULL, `backyard` char(120) default NULL, `pms` char(120) default NULL, `guest` enum('1','0') NOT NULL default '0', `admins` char(255) default NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `pms` (`pms`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_config`; CREATE TABLE IF NOT EXISTS `zt_config` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `owner` char(30) NOT NULL default '', `module` varchar(30) NOT NULL, `section` char(30) NOT NULL default '', `key` char(30) NOT NULL default '', `value` text NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `unique` (`company`,`owner`,`module`,`section`,`key`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_dept`; CREATE TABLE IF NOT EXISTS `zt_dept` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `name` char(60) NOT NULL, `parent` mediumint(8) unsigned NOT NULL default '0', `path` char(255) NOT NULL default '', `grade` tinyint(3) unsigned NOT NULL default '0', `order` tinyint(3) unsigned NOT NULL default '0', `position` char(30) NOT NULL default '', `function` char(255) NOT NULL default '', `manager` char(30) NOT NULL default '', PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_doc`; CREATE TABLE IF NOT EXISTS `zt_doc` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` smallint(5) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL, `project` mediumint(8) unsigned NOT NULL, `lib` varchar(30) NOT NULL, `module` varchar(30) NOT NULL, `title` varchar(255) NOT NULL, `digest` varchar(255) NOT NULL, `keywords` varchar(255) NOT NULL, `type` varchar(30) NOT NULL, `content` text NOT NULL, `url` varchar(255) NOT NULL, `views` smallint(5) unsigned NOT NULL, `addedBy` varchar(30) NOT NULL, `addedDate` datetime NOT NULL, `editedBy` varchar(30) NOT NULL, `editedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_docLib`; CREATE TABLE IF NOT EXISTS `zt_docLib` ( `id` smallint(5) unsigned NOT NULL auto_increment, `company` smallint(5) unsigned NOT NULL, `name` varchar(60) NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_effort`; CREATE TABLE IF NOT EXISTS `zt_effort` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `user` char(30) NOT NULL default '', `todo` enum('1','0') NOT NULL default '1', `date` date NOT NULL default '0000-00-00', `begin` datetime NOT NULL default '0000-00-00 00:00:00', `end` datetime NOT NULL default '0000-00-00 00:00:00', `type` enum('1','2','3') NOT NULL default '1', `idvalue` mediumint(8) unsigned NOT NULL default '0', `name` char(30) NOT NULL default '', `desc` char(255) NOT NULL default '', `status` enum('1','2','3') NOT NULL default '1', PRIMARY KEY (`id`), KEY `user` (`user`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_extension`; CREATE TABLE IF NOT EXISTS `zt_extension` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `name` varchar(150) NOT NULL, `code` varchar(30) NOT NULL, `version` varchar(50) NOT NULL, `author` varchar(100) NOT NULL, `desc` text NOT NULL, `license` text NOT NULL, `type` varchar(20) NOT NULL default 'extension', `site` varchar(150) NOT NULL, `zentaoVersion` varchar(100) NOT NULL, `installedTime` datetime NOT NULL, `dirs` text NOT NULL, `files` text NOT NULL, `status` varchar(20) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `code` (`code`), KEY `name` (`name`), KEY `addedTime` (`installedTime`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_file`; CREATE TABLE IF NOT EXISTS `zt_file` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `pathname` char(50) NOT NULL, `title` char(90) NOT NULL, `extension` char(30) NOT NULL, `size` mediumint(8) unsigned NOT NULL default '0', `objectType` char(30) NOT NULL, `objectID` mediumint(9) NOT NULL, `addedBy` char(30) NOT NULL default '', `addedDate` datetime NOT NULL, `downloads` mediumint(8) unsigned NOT NULL default '0', `extra` varchar(255) NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_group`; CREATE TABLE IF NOT EXISTS `zt_group` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `name` char(30) NOT NULL, `desc` char(255) NOT NULL default '', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_groupPriv`; CREATE TABLE IF NOT EXISTS `zt_groupPriv` ( `company` mediumint(9) NOT NULL, `group` mediumint(8) unsigned NOT NULL default '0', `module` char(30) NOT NULL default '', `method` char(30) NOT NULL default '', UNIQUE KEY `group` (`group`,`module`,`method`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_history`; CREATE TABLE IF NOT EXISTS `zt_history` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `action` mediumint(8) unsigned NOT NULL default '0', `field` varchar(30) NOT NULL default '', `old` text NOT NULL, `new` text NOT NULL, `diff` mediumtext NOT NULL, PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_module`; CREATE TABLE IF NOT EXISTS `zt_module` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `root` mediumint(8) unsigned NOT NULL default '0', `name` char(60) NOT NULL default '', `parent` mediumint(8) unsigned NOT NULL default '0', `path` char(255) NOT NULL default '', `grade` tinyint(3) unsigned NOT NULL default '0', `order` tinyint(3) unsigned NOT NULL default '0', `type` char(30) NOT NULL, `owner` varchar(30) NOT NULL, PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_product`; CREATE TABLE IF NOT EXISTS `zt_product` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `name` varchar(90) NOT NULL, `code` varchar(45) NOT NULL, `order` tinyint(3) unsigned NOT NULL default '0', `status` varchar(30) NOT NULL default '', `desc` text NOT NULL, `PO` varchar(30) NOT NULL, `QM` varchar(30) NOT NULL, `RM` varchar(30) NOT NULL, `acl` enum('open','private','custom') NOT NULL default 'open', `whitelist` varchar(255) NOT NULL, `createdBy` varchar(30) NOT NULL, `createdDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_productPlan`; CREATE TABLE IF NOT EXISTS `zt_productPlan` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL, `title` varchar(90) NOT NULL, `desc` text NOT NULL, `begin` date NOT NULL, `end` date NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_project`; CREATE TABLE IF NOT EXISTS `zt_project` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `isCat` enum('1','0') NOT NULL default '0', `catID` mediumint(8) unsigned NOT NULL, `type` enum('sprint','project') NOT NULL default 'sprint', `parent` mediumint(8) unsigned NOT NULL default '0', `name` varchar(90) NOT NULL, `code` varchar(45) NOT NULL, `begin` date NOT NULL, `end` date NOT NULL, `days` smallint(5) unsigned NOT NULL, `status` varchar(10) NOT NULL, `statge` enum('1','2','3','4','5') NOT NULL default '1', `pri` enum('1','2','3','4') NOT NULL default '1', `desc` text NOT NULL, `goal` text NOT NULL, `openedBy` varchar(30) NOT NULL default '', `openedDate` int(10) unsigned NOT NULL default '0', `closedBy` varchar(30) NOT NULL default '', `closedDate` int(10) unsigned NOT NULL default '0', `canceledBy` varchar(30) NOT NULL default '', `canceledDate` int(10) unsigned NOT NULL default '0', `PO` varchar(30) NOT NULL default '', `PM` varchar(30) NOT NULL default '', `QM` varchar(30) NOT NULL default '', `RM` varchar(30) NOT NULL default '', `team` varchar(30) NOT NULL, `acl` enum('open','private','custom') NOT NULL default 'open', `whitelist` varchar(255) NOT NULL, `order` smallint(5) unsigned NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `company` (`company`,`type`,`parent`,`begin`,`end`,`status`,`statge`,`pri`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectProduct`; CREATE TABLE IF NOT EXISTS `zt_projectProduct` ( `company` mediumint(8) unsigned NOT NULL, `project` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL, PRIMARY KEY (`project`,`product`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_projectStory`; CREATE TABLE IF NOT EXISTS `zt_projectStory` ( `company` mediumint(9) NOT NULL, `project` mediumint(8) unsigned NOT NULL default '0', `product` mediumint(8) unsigned NOT NULL, `story` mediumint(8) unsigned NOT NULL default '0', `version` smallint(6) NOT NULL default '1', UNIQUE KEY `project` (`project`,`story`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_release`; CREATE TABLE IF NOT EXISTS `zt_release` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL default '0', `build` mediumint(8) unsigned NOT NULL, `name` char(30) NOT NULL default '', `date` date NOT NULL, `stories` text NOT NULL, `bugs` text NOT NULL, `desc` text NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_story`; CREATE TABLE IF NOT EXISTS `zt_story` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `product` mediumint(8) unsigned NOT NULL default '0', `module` mediumint(8) unsigned NOT NULL default '0', `plan` mediumint(8) unsigned NOT NULL default '0', `source` varchar(20) NOT NULL, `fromBug` mediumint(8) unsigned NOT NULL default '0', `title` varchar(255) NOT NULL, `keywords` varchar(255) NOT NULL, `type` varchar(30) NOT NULL default '', `pri` tinyint(3) unsigned NOT NULL default '3', `estimate` float unsigned NOT NULL, `status` varchar(30) NOT NULL default '', `stage` varchar(30) NOT NULL, `mailto` varchar(255) NOT NULL default '', `openedBy` varchar(30) NOT NULL default '', `openedDate` datetime NOT NULL, `assignedTo` varchar(30) NOT NULL default '', `assignedDate` datetime NOT NULL, `lastEditedBy` varchar(30) NOT NULL default '', `lastEditedDate` datetime NOT NULL, `reviewedBy` varchar(30) NOT NULL, `reviewedDate` date NOT NULL, `closedBy` varchar(30) NOT NULL default '', `closedDate` datetime NOT NULL, `closedReason` varchar(30) NOT NULL, `toBug` mediumint(9) NOT NULL, `childStories` varchar(255) NOT NULL, `linkStories` varchar(255) NOT NULL, `duplicateStory` mediumint(8) unsigned NOT NULL, `version` smallint(6) NOT NULL default '1', `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `product` (`product`,`module`,`plan`,`type`,`pri`), KEY `status` (`status`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_storySpec`; CREATE TABLE IF NOT EXISTS `zt_storySpec` ( `company` mediumint(8) unsigned NOT NULL, `story` mediumint(9) NOT NULL, `version` smallint(6) NOT NULL, `title` varchar(90) NOT NULL, `spec` text NOT NULL, `verify` text NOT NULL, UNIQUE KEY `story` (`story`,`version`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_task`; CREATE TABLE IF NOT EXISTS `zt_task` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `project` mediumint(8) unsigned NOT NULL default '0', `module` mediumint(8) unsigned NOT NULL default '0', `story` mediumint(8) unsigned NOT NULL default '0', `storyVersion` smallint(6) NOT NULL default '1', `fromBug` mediumint(8) unsigned NOT NULL default '0', `name` varchar(255) NOT NULL, `type` varchar(20) NOT NULL, `pri` tinyint(3) unsigned NOT NULL default '0', `estimate` float unsigned NOT NULL, `consumed` float unsigned NOT NULL, `left` float unsigned NOT NULL, `deadline` date NOT NULL, `status` enum('wait','doing','done','cancel','closed') NOT NULL default 'wait', `statusCustom` tinyint(3) unsigned NOT NULL, `mailto` varchar(255) NOT NULL default '', `desc` text NOT NULL, `openedBy` varchar(30) NOT NULL, `openedDate` datetime NOT NULL, `assignedTo` varchar(30) NOT NULL, `assignedDate` datetime NOT NULL, `estStarted` date NOT NULL, `realStarted` date NOT NULL, `finishedBy` varchar(30) NOT NULL, `finishedDate` datetime NOT NULL, `canceledBy` varchar(30) NOT NULL, `canceledDate` datetime NOT NULL, `closedBy` varchar(30) NOT NULL, `closedDate` datetime NOT NULL, `closedReason` varchar(30) NOT NULL, `lastEditedBy` varchar(30) NOT NULL, `lastEditedDate` datetime NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `statusOrder` (`statusCustom`), KEY `type` (`type`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_taskEstimate`; CREATE TABLE IF NOT EXISTS `zt_taskEstimate` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `task` mediumint(8) unsigned NOT NULL default '0', `date` int(10) unsigned NOT NULL default '0', `estimate` tinyint(3) unsigned NOT NULL default '0', `estimater` char(30) NOT NULL default '', PRIMARY KEY (`id`), KEY `task` (`task`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_team`; CREATE TABLE IF NOT EXISTS `zt_team` ( `company` mediumint(8) unsigned NOT NULL, `project` mediumint(8) unsigned NOT NULL default '0', `account` char(30) NOT NULL default '', `role` char(30) NOT NULL default '', `join` date NOT NULL default '0000-00-00', `days` smallint(5) unsigned NOT NULL, `hours` tinyint(3) unsigned NOT NULL default '0', PRIMARY KEY (`project`,`account`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testResult`; CREATE TABLE IF NOT EXISTS `zt_testResult` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `run` mediumint(8) unsigned NOT NULL, `case` mediumint(8) unsigned NOT NULL, `version` smallint(5) unsigned NOT NULL, `caseResult` char(30) NOT NULL, `stepResults` text NOT NULL, `lastRunner` varchar(30) NOT NULL, `date` datetime NOT NULL, PRIMARY KEY (`id`), KEY `run` (`run`), KEY `case` (`case`,`version`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testRun`; CREATE TABLE IF NOT EXISTS `zt_testRun` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `task` mediumint(8) unsigned NOT NULL default '0', `case` mediumint(8) unsigned NOT NULL default '0', `version` tinyint(3) unsigned NOT NULL default '0', `assignedTo` char(30) NOT NULL default '', `lastRunner` varchar(30) NOT NULL, `lastRunDate` datetime NOT NULL, `lastRunResult` char(30) NOT NULL, `status` char(30) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `task` (`task`,`case`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_testTask`; CREATE TABLE IF NOT EXISTS `zt_testTask` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `name` char(90) NOT NULL, `product` mediumint(8) unsigned NOT NULL, `project` mediumint(8) unsigned NOT NULL default '0', `build` char(30) NOT NULL, `owner` varchar(30) NOT NULL, `begin` date NOT NULL, `end` date NOT NULL, `desc` text NOT NULL, `status` char(30) NOT NULL, `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_todo`; CREATE TABLE IF NOT EXISTS `zt_todo` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(9) NOT NULL, `account` char(30) NOT NULL, `date` date NOT NULL default '0000-00-00', `begin` smallint(4) unsigned zerofill NOT NULL, `end` smallint(4) unsigned zerofill NOT NULL, `type` char(10) NOT NULL, `idvalue` mediumint(8) unsigned NOT NULL default '0', `pri` tinyint(3) unsigned NOT NULL, `name` char(150) NOT NULL, `desc` text NOT NULL, `status` char(20) NOT NULL default '', `private` tinyint(1) NOT NULL, PRIMARY KEY (`id`), KEY `user` (`account`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_user`; CREATE TABLE IF NOT EXISTS `zt_user` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `dept` mediumint(8) unsigned NOT NULL default '0', `account` char(30) NOT NULL default '', `password` char(32) NOT NULL default '', `realname` char(30) NOT NULL default '', `nickname` char(60) NOT NULL default '', `commiter` varchar(100) NOT NULL, `avatar` char(30) NOT NULL default '', `birthday` date NOT NULL default '0000-00-00', `gender` enum('f','m') NOT NULL default 'f', `email` char(90) NOT NULL default '', `msn` char(90) NOT NULL default '', `qq` char(20) NOT NULL default '', `yahoo` char(90) NOT NULL default '', `gtalk` char(90) NOT NULL default '', `wangwang` char(90) NOT NULL default '', `mobile` char(11) NOT NULL default '', `phone` char(20) NOT NULL default '', `address` char(120) NOT NULL default '', `zipcode` char(10) NOT NULL default '', `join` date NOT NULL default '0000-00-00', `visits` mediumint(8) unsigned NOT NULL default '0', `ip` char(15) NOT NULL default '', `last` int(10) unsigned NOT NULL default '0', `deleted` enum('0','1') NOT NULL default '0', PRIMARY KEY (`id`), UNIQUE KEY `account` (`account`), KEY `company` (`company`,`dept`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_userGroup`; CREATE TABLE IF NOT EXISTS `zt_userGroup` ( `company` mediumint(8) unsigned NOT NULL, `account` char(30) NOT NULL default '', `group` mediumint(8) unsigned NOT NULL default '0', UNIQUE KEY `account` (`account`,`group`), KEY `company` (`company`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_userQuery`; CREATE TABLE IF NOT EXISTS `zt_userQuery` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL default '0', `account` char(30) NOT NULL, `module` varchar(30) NOT NULL, `title` varchar(90) NOT NULL, `form` text NOT NULL, `sql` text NOT NULL, PRIMARY KEY (`id`), KEY `company` (`company`), KEY `account` (`account`), KEY `module` (`module`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -- DROP TABLE IF EXISTS `zt_userTPL`; CREATE TABLE IF NOT EXISTS `zt_userTPL` ( `id` mediumint(8) unsigned NOT NULL auto_increment, `company` mediumint(8) unsigned NOT NULL, `account` char(30) NOT NULL, `type` char(30) NOT NULL, `title` varchar(150) NOT NULL, `content` text NOT NULL, PRIMARY KEY (`id`), KEY `company` (`company`), KEY `account` (`account`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; INSERT INTO `zt_group` (`id`, `company`, `name`, `desc`) VALUES (1, 1, 'ADMIN', 'for administrator.'), (2, 1, 'PO', 'for product owners.'), (3, 1, 'DEV', 'for developers.'), (4, 1, 'QA', 'for testers.'), (5, 1, 'PM', 'for project managers.'), (6, 1, 'guest', 'For guest'); INSERT INTO `zt_groupPriv` (`company`, `group`, `module`, `method`) VALUES (1, 1, 'action', 'trash'), (1, 1, 'misc', 'ping'), (1, 1, 'file', 'ajaxUpload'), (1, 1, 'file', 'delete'), (1, 1, 'file', 'edit'), (1, 1, 'file', 'download'), (1, 1, 'api', 'getModel'), (1, 1, 'extension', 'upgrade'), (1, 1, 'extension', 'erase'), (1, 1, 'extension', 'upload'), (1, 1, 'extension', 'deactivate'), (1, 1, 'extension', 'activate'), (1, 1, 'extension', 'uninstall'), (1, 1, 'extension', 'install'), (1, 1, 'extension', 'structure'), (1, 1, 'extension', 'obtain'), (1, 1, 'extension', 'browse'), (1, 1, 'search', 'select'), (1, 1, 'search', 'deleteQuery'), (1, 1, 'search', 'saveQuery'), (1, 1, 'search', 'buildQuery'), (1, 1, 'search', 'buildForm'), (1, 1, 'tree', 'fix'), (1, 1, 'tree', 'ajaxGetSonModules'), (1, 1, 'tree', 'ajaxGetOptionMenu'), (1, 1, 'tree', 'delete'), (1, 1, 'tree', 'edit'), (1, 1, 'tree', 'manageChild'), (1, 1, 'tree', 'updateOrder'), (1, 1, 'tree', 'browse'), (1, 1, 'user', 'ajaxGetUser'), (1, 1, 'user', 'profile'), (1, 1, 'user', 'dynamic'), (1, 1, 'user', 'project'), (1, 1, 'user', 'bug'), (1, 1, 'user', 'task'), (1, 1, 'user', 'todo'), (1, 1, 'user', 'delete'), (1, 1, 'user', 'edit'), (1, 1, 'user', 'view'), (1, 1, 'user', 'create'), (1, 1, 'group', 'manageMember'), (1, 1, 'group', 'managePriv'), (1, 1, 'group', 'delete'), (1, 1, 'group', 'copy'), (1, 1, 'group', 'edit'), (1, 1, 'group', 'create'), (1, 1, 'group', 'browse'), (1, 1, 'dept', 'delete'), (1, 1, 'dept', 'manageChild'), (1, 1, 'dept', 'updateOrder'), (1, 1, 'dept', 'browse'), (1, 1, 'company', 'dynamic'), (1, 1, 'company', 'edit'), (1, 1, 'company', 'browse'), (1, 1, 'company', 'index'), (1, 1, 'svn', 'apiSync'), (1, 1, 'svn', 'cat'), (1, 1, 'svn', 'diff'), (1, 1, 'doc', 'delete'), (1, 1, 'doc', 'edit'), (1, 1, 'doc', 'view'), (1, 1, 'doc', 'create'), (1, 1, 'doc', 'deleteLib'), (1, 1, 'doc', 'editLib'), (1, 1, 'doc', 'createLib'), (1, 1, 'doc', 'browse'), (1, 1, 'doc', 'index'), (1, 1, 'testtask', 'results'), (1, 1, 'testtask', 'runcase'), (1, 1, 'testtask', 'unlinkcase'), (1, 1, 'testtask', 'linkcase'), (1, 1, 'testtask', 'batchAssign'), (1, 1, 'testtask', 'delete'), (1, 1, 'testtask', 'edit'), (1, 1, 'testtask', 'cases'), (1, 1, 'testtask', 'view'), (1, 1, 'testtask', 'browse'), (1, 1, 'testtask', 'create'), (1, 1, 'testtask', 'index'), (1, 1, 'testcase', 'confirmStoryChange'), (1, 1, 'testcase', 'export'), (1, 1, 'testcase', 'delete'), (1, 1, 'testcase', 'edit'), (1, 1, 'testcase', 'view'), (1, 1, 'testcase', 'batchCreate'), (1, 1, 'testcase', 'create'), (1, 1, 'testcase', 'browse'), (1, 1, 'testcase', 'index'), (1, 1, 'bug', 'ajaxGetModuleOwner'), (1, 1, 'bug', 'ajaxGetUserBugs'), (1, 1, 'bug', 'customFields'), (1, 1, 'bug', 'deleteTemplate'), (1, 1, 'bug', 'saveTemplate'), (1, 1, 'bug', 'delete'), (1, 1, 'bug', 'confirmStoryChange'), (1, 1, 'bug', 'export'), (1, 1, 'bug', 'report'), (1, 1, 'bug', 'close'), (1, 1, 'bug', 'activate'), (1, 1, 'bug', 'resolve'), (1, 1, 'bug', 'assignTo'), (1, 1, 'bug', 'edit'), (1, 1, 'bug', 'view'), (1, 1, 'bug', 'confirmBug'), (1, 1, 'bug', 'create'), (1, 1, 'bug', 'browse'), (1, 1, 'bug', 'index'), (1, 1, 'qa', 'index'), (1, 1, 'build', 'ajaxGetProjectBuilds'), (1, 1, 'build', 'ajaxGetProductBuilds'), (1, 1, 'build', 'view'), (1, 1, 'build', 'delete'), (1, 1, 'build', 'edit'), (1, 1, 'build', 'create'), (1, 1, 'task', 'report'), (1, 1, 'task', 'ajaxGetProjectTasks'), (1, 1, 'task', 'ajaxGetUserTasks'), (1, 1, 'task', 'confirmStoryChange'), (1, 1, 'task', 'export'), (1, 1, 'task', 'view'), (1, 1, 'task', 'delete'), (1, 1, 'task', 'activate'), (1, 1, 'task', 'batchClose'), (1, 1, 'task', 'close'), (1, 1, 'task', 'cancel'), (1, 1, 'task', 'finish'), (1, 1, 'task', 'start'), (1, 1, 'task', 'assignTo'), (1, 1, 'task', 'edit'), (1, 1, 'task', 'batchCreate'), (1, 1, 'task', 'create'), (1, 1, 'project', 'ajaxGetProducts'), (1, 1, 'project', 'linkStory'), (1, 1, 'project', 'unlinkMember'), (1, 1, 'project', 'manageMembers'), (1, 1, 'project', 'manageProducts'), (1, 1, 'project', 'dynamic'), (1, 1, 'project', 'doc'), (1, 1, 'project', 'team'), (1, 1, 'project', 'burnData'), (1, 1, 'project', 'computeBurn'), (1, 1, 'project', 'burn'), (1, 1, 'project', 'bug'), (1, 1, 'project', 'testtask'), (1, 1, 'project', 'build'), (1, 1, 'project', 'story'), (1, 1, 'project', 'importBug'), (1, 2, 'bug', 'export'), (1, 2, 'my', 'testCase'), (1, 2, 'my', 'story'), (1, 2, 'task', 'ajaxGetUserTasks'), (1, 2, 'tree', 'ajaxGetOptionMenu'), (1, 2, 'my', 'editProfile'), (1, 2, 'search', 'deleteQuery'), (1, 2, 'product', 'project'), (1, 2, 'doc', 'create'), (1, 2, 'project', 'dynamic'), (1, 2, 'todo', 'delete'), (1, 2, 'index', 'index'), (1, 2, 'company', 'index'), (1, 2, 'release', 'delete'), (1, 2, 'svn', 'diff'), (1, 2, 'doc', 'delete'), (1, 2, 'search', 'buildForm'), (1, 2, 'my', 'profile'), (1, 2, 'user', 'profile'), (1, 2, 'user', 'project'), (1, 2, 'user', 'todo'), (1, 2, 'doc', 'deleteLib'), (1, 2, 'my', 'dynamic'), (1, 2, 'project', 'bug'), (1, 2, 'story', 'create'), (1, 2, 'todo', 'create'), (1, 2, 'task', 'view'), (1, 2, 'bug', 'create'), (1, 2, 'task', 'export'), (1, 2, 'report', 'workload'), (1, 2, 'story', 'activate'), (1, 2, 'project', 'story'), (1, 2, 'productplan', 'browse'), (1, 2, 'bug', 'resolve'), (1, 2, 'build', 'ajaxGetProjectBuilds'), (1, 2, 'doc', 'editLib'), (1, 2, 'task', 'report'), (1, 2, 'story', 'batchClose'), (1, 2, 'file', 'ajaxUpload'), (1, 2, 'product', 'roadmap'), (1, 2, 'productplan', 'create'), (1, 2, 'todo', 'view'), (1, 2, 'search', 'select'), (1, 2, 'group', 'browse'), (1, 2, 'svn', 'cat'), (1, 2, 'misc', 'ping'), (1, 2, 'project', 'team'), (1, 2, 'file', 'delete'), (1, 2, 'report', 'index'), (1, 2, 'productplan', 'unlinkStory'), (1, 2, 'bug', 'ajaxGetUserBugs'), (1, 2, 'release', 'ajaxGetStoriesAndBugs'), (1, 2, 'testcase', 'browse'), (1, 2, 'project', 'testtask'), (1, 2, 'search', 'buildQuery'), (1, 2, 'bug', 'ajaxGetModuleOwner'), (1, 2, 'tree', 'manageChild'), (1, 2, 'my', 'task'), (1, 2, 'my', 'testTask'), (1, 2, 'bug', 'edit'), (1, 2, 'user', 'view'), (1, 2, 'productplan', 'linkStory'), (1, 2, 'story', 'edit'), (1, 2, 'product', 'ajaxGetProjects'), (1, 2, 'project', 'burn'), (1, 2, 'story', 'report'), (1, 2, 'product', 'ajaxGetPlans'), (1, 2, 'tree', 'fix'), (1, 2, 'tree', 'delete'), (1, 2, 'user', 'dynamic'), (1, 2, 'story', 'tasks'), (1, 2, 'tree', 'updateOrder'), (1, 2, 'user', 'task'), (1, 2, 'product', 'delete'), (1, 2, 'release', 'create'), (1, 2, 'bug', 'index'), (1, 2, 'doc', 'createLib'), (1, 2, 'doc', 'edit'), (1, 3, 'testtask', 'index'), (1, 3, 'testcase', 'browse'), (1, 3, 'doc', 'deleteLib'), (1, 3, 'doc', 'delete'), (1, 3, 'bug', 'saveTemplate'), (1, 3, 'bug', 'create'), (1, 3, 'testtask', 'view'), (1, 3, 'task', 'confirmStoryChange'), (1, 3, 'project', 'browse'), (1, 3, 'product', 'browse'), (1, 3, 'my', 'profile'), (1, 3, 'product', 'dynamic'), (1, 3, 'testcase', 'export'), (1, 3, 'search', 'deleteQuery'), (1, 3, 'file', 'delete'), (1, 3, 'my', 'task'), (1, 3, 'todo', 'delete'), (1, 3, 'testtask', 'cases'), (1, 3, 'story', 'report'), (1, 3, 'my', 'changePassword'), (1, 3, 'misc', 'ping'), (1, 3, 'search', 'buildQuery'), (1, 3, 'project', 'build'), (1, 3, 'bug', 'export'), (1, 3, 'story', 'view'), (1, 3, 'qa', 'index'), (1, 3, 'file', 'ajaxUpload'), (1, 3, 'search', 'saveQuery'), (1, 3, 'task', 'cancel'), (1, 3, 'build', 'view'), (1, 3, 'doc', 'create'), (1, 3, 'task', 'ajaxGetProjectTasks'), (1, 3, 'product', 'ajaxGetPlans'), (1, 3, 'doc', 'createLib'), (1, 3, 'bug', 'ajaxGetUserBugs'), (1, 3, 'bug', 'ajaxGetModuleOwner'), (1, 3, 'search', 'buildForm'), (1, 3, 'bug', 'edit'), (1, 3, 'doc', 'index'), (1, 3, 'story', 'ajaxGetProjectStories'), (1, 3, 'testtask', 'results'), (1, 3, 'task', 'delete'), (1, 3, 'product', 'project'), (1, 3, 'product', 'ajaxGetProjects'), (1, 3, 'product', 'index'), (1, 3, 'my', 'story'), (1, 3, 'file', 'edit'), (1, 3, 'task', 'export'), (1, 3, 'product', 'doc'), (1, 3, 'my', 'bug'), (1, 3, 'build', 'ajaxGetProjectBuilds'), (1, 3, 'testtask', 'browse'), (1, 3, 'task', 'activate'), (1, 3, 'file', 'download'), (1, 4, 'search', 'buildForm'), (1, 3, 'my', 'dynamic'), (1, 3, 'product', 'roadmap'), (1, 3, 'doc', 'browse'), (1, 4, 'testtask', 'results'), (1, 4, 'doc', 'createLib'), (1, 4, 'product', 'ajaxGetPlans'), (1, 4, 'tree', 'manageChild'), (1, 4, 'build', 'ajaxGetProjectBuilds'), (1, 4, 'my', 'todo'), (1, 4, 'build', 'view'), (1, 4, 'my', 'testTask'), (1, 4, 'testtask', 'unlinkcase'), (1, 4, 'bug', 'delete'), (1, 4, 'project', 'burn'), (1, 4, 'productplan', 'browse'), (1, 4, 'project', 'grouptask'), (1, 4, 'doc', 'create'), (1, 4, 'misc', 'ping'), (1, 4, 'testtask', 'batchAssign'), (1, 4, 'bug', 'view'), (1, 4, 'bug', 'confirmBug'), (1, 4, 'story', 'tasks'), (1, 4, 'product', 'project'), (1, 4, 'release', 'browse'), (1, 4, 'bug', 'customFields'), (1, 4, 'tree', 'delete'), (1, 4, 'testcase', 'edit'), (1, 4, 'svn', 'cat'), (1, 4, 'qa', 'index'), (1, 4, 'productplan', 'view'), (1, 4, 'testtask', 'delete'), (1, 4, 'doc', 'deleteLib'), (1, 4, 'bug', 'saveTemplate'), (1, 4, 'search', 'saveQuery'), (1, 4, 'testcase', 'index'), (1, 4, 'project', 'build'), (1, 4, 'doc', 'browse'), (1, 4, 'bug', 'index'), (1, 4, 'bug', 'ajaxGetUserBugs'), (1, 4, 'testcase', 'delete'), (1, 4, 'bug', 'report'), (1, 4, 'file', 'delete'), (1, 4, 'testtask', 'cases'), (1, 4, 'file', 'ajaxUpload'), (1, 4, 'build', 'ajaxGetProductBuilds'), (1, 4, 'tree', 'updateOrder'), (1, 4, 'product', 'ajaxGetProjects'), (1, 4, 'project', 'browse'), (1, 4, 'project', 'story'), (1, 4, 'story', 'report'), (1, 4, 'bug', 'browse'), (1, 4, 'search', 'select'), (1, 4, 'svn', 'diff'), (1, 4, 'project', 'bug'), (1, 4, 'todo', 'delete'), (1, 4, 'testtask', 'create'), (1, 4, 'my', 'task'), (1, 4, 'user', 'ajaxGetUser'), (1, 4, 'user', 'task'), (1, 4, 'project', 'doc'), (1, 4, 'tree', 'edit'), (1, 4, 'release', 'ajaxGetStoriesAndBugs'), (1, 4, 'project', 'view'), (1, 4, 'release', 'export'), (1, 4, 'company', 'index'), (1, 4, 'user', 'profile'), (1, 4, 'bug', 'edit'), (1, 4, 'svn', 'apiSync'), (1, 4, 'index', 'index'), (1, 4, 'doc', 'edit'), (1, 4, 'bug', 'export'), (1, 4, 'todo', 'edit'), (1, 4, 'file', 'edit'), (1, 4, 'bug', 'resolve'), (1, 4, 'release', 'view'), (1, 4, 'project', 'index'), (1, 5, 'misc', 'ping'), (1, 5, 'file', 'ajaxUpload'), (1, 5, 'file', 'delete'), (1, 5, 'file', 'edit'), (1, 5, 'file', 'download'), (1, 5, 'tree', 'fix'), (1, 5, 'tree', 'ajaxGetSonModules'), (1, 5, 'tree', 'ajaxGetOptionMenu'), (1, 5, 'tree', 'delete'), (1, 5, 'tree', 'edit'), (1, 5, 'tree', 'manageChild'), (1, 5, 'tree', 'updateOrder'), (1, 5, 'tree', 'browse'), (1, 5, 'search', 'select'), (1, 5, 'search', 'deleteQuery'), (1, 5, 'search', 'saveQuery'), (1, 5, 'search', 'buildQuery'), (1, 5, 'search', 'buildForm'), (1, 5, 'svn', 'apiSync'), (1, 5, 'svn', 'cat'), (1, 5, 'svn', 'diff'), (1, 5, 'action', 'undelete'), (1, 5, 'action', 'trash'), (1, 5, 'user', 'ajaxGetUser'), (1, 5, 'user', 'profile'), (1, 5, 'user', 'dynamic'), (1, 5, 'user', 'project'), (1, 5, 'user', 'bug'), (1, 5, 'user', 'task'), (1, 5, 'user', 'todo'), (1, 5, 'user', 'view'), (1, 5, 'group', 'browse'), (1, 5, 'company', 'dynamic'), (1, 5, 'company', 'browse'), (1, 5, 'company', 'index'), (1, 5, 'report', 'workload'), (1, 5, 'report', 'bugSummary'), (1, 5, 'report', 'productInfo'), (1, 5, 'report', 'projectDeviation'), (1, 5, 'report', 'index'), (1, 5, 'doc', 'edit'), (1, 5, 'doc', 'view'), (1, 5, 'doc', 'create'), (1, 5, 'doc', 'editLib'), (1, 5, 'doc', 'createLib'), (1, 5, 'doc', 'browse'), (1, 5, 'doc', 'index'), (1, 5, 'testtask', 'results'), (1, 5, 'testtask', 'edit'), (1, 5, 'testtask', 'cases'), (1, 5, 'testtask', 'view'), (1, 5, 'testtask', 'browse'), (1, 5, 'testtask', 'create'), (1, 5, 'testtask', 'index'), (1, 5, 'testcase', 'confirmStoryChange'), (1, 5, 'testcase', 'export'), (1, 5, 'testcase', 'delete'), (1, 5, 'testcase', 'edit'), (1, 5, 'testcase', 'view'), (1, 5, 'testcase', 'batchCreate'), (1, 5, 'testcase', 'create'), (1, 1, 'project', 'importtask'), (1, 1, 'project', 'grouptask'), (1, 1, 'project', 'task'), (1, 2, 'release', 'view'), (1, 2, 'my', 'project'), (1, 3, 'task', 'report'), (1, 3, 'task', 'close'), (1, 3, 'bug', 'view'), (1, 4, 'testcase', 'browse'), (1, 4, 'report', 'index'), (1, 4, 'testtask', 'linkcase'), (1, 5, 'testcase', 'browse'), (1, 5, 'testcase', 'index'), (1, 1, 'project', 'delete'), (1, 1, 'project', 'order'), (1, 1, 'project', 'edit'), (1, 2, 'my', 'bug'), (1, 4, 'search', 'buildQuery'), (1, 3, 'index', 'index'), (1, 4, 'testtask', 'runcase'), (1, 5, 'bug', 'ajaxGetModuleOwner'), (1, 5, 'bug', 'ajaxGetUserBugs'), (1, 5, 'bug', 'customFields'), (1, 1, 'project', 'create'), (1, 1, 'project', 'browse'), (1, 1, 'project', 'view'), (1, 1, 'project', 'index'), (1, 1, 'release', 'export'), (1, 1, 'release', 'ajaxGetStoriesAndBugs'), (1, 1, 'release', 'view'), (1, 1, 'release', 'delete'), (1, 1, 'release', 'edit'), (1, 1, 'release', 'create'), (1, 1, 'release', 'browse'), (1, 1, 'productplan', 'unlinkStory'), (1, 1, 'productplan', 'linkStory'), (1, 1, 'productplan', 'view'), (1, 1, 'productplan', 'delete'), (1, 1, 'productplan', 'edit'), (1, 1, 'productplan', 'create'), (1, 2, 'file', 'edit'), (1, 2, 'search', 'saveQuery'), (1, 2, 'doc', 'view'), (1, 2, 'tree', 'edit'), (1, 2, 'bug', 'report'), (1, 2, 'story', 'review'), (1, 2, 'svn', 'apiSync'), (1, 2, 'bug', 'view'), (1, 2, 'user', 'ajaxGetUser'), (1, 3, 'my', 'editProfile'), (1, 4, 'search', 'deleteQuery'), (1, 3, 'story', 'tasks'), (1, 3, 'report', 'workload'), (1, 3, 'task', 'batchCreate'), (1, 3, 'task', 'start'), (1, 3, 'task', 'batchClose'), (1, 3, 'story', 'ajaxGetProductStories'), (1, 3, 'my', 'todo'), (1, 3, 'user', 'ajaxGetUser'), (1, 3, 'story', 'export'), (1, 4, 'user', 'todo'), (1, 4, 'todo', 'import2Today'), (1, 4, 'story', 'view'), (1, 4, 'bug', 'deleteTemplate'), (1, 4, 'report', 'workload'), (1, 4, 'testtask', 'browse'), (1, 4, 'product', 'dynamic'), (1, 4, 'todo', 'mark'), (1, 4, 'my', 'profile'), (1, 4, 'story', 'ajaxGetProductStories'), (1, 4, 'my', 'dynamic'), (1, 4, 'task', 'report'), (1, 5, 'bug', 'deleteTemplate'), (1, 5, 'bug', 'saveTemplate'), (1, 5, 'bug', 'export'), (1, 5, 'bug', 'report'), (1, 5, 'bug', 'close'), (1, 5, 'bug', 'activate'), (1, 5, 'bug', 'resolve'), (1, 5, 'bug', 'edit'), (1, 5, 'bug', 'view'), (1, 5, 'bug', 'confirmBug'), (1, 5, 'bug', 'create'), (1, 5, 'bug', 'browse'), (1, 5, 'bug', 'index'), (1, 5, 'qa', 'index'), (1, 1, 'productplan', 'browse'), (1, 1, 'story', 'ajaxGetProductStories'), (1, 2, 'todo', 'export'), (1, 3, 'search', 'select'), (1, 3, 'todo', 'view'), (1, 3, 'todo', 'create'), (1, 3, 'user', 'dynamic'), (1, 4, 'testtask', 'edit'), (1, 5, 'build', 'ajaxGetProjectBuilds'), (1, 5, 'build', 'ajaxGetProductBuilds'), (1, 5, 'build', 'view'), (1, 5, 'build', 'delete'), (1, 5, 'build', 'edit'), (1, 6, 'testtask', 'view'), (1, 6, 'bug', 'view'), (1, 6, 'project', 'view'), (1, 6, 'doc', 'browse'), (1, 6, 'bug', 'report'), (1, 6, 'project', 'grouptask'), (1, 6, 'project', 'task'), (1, 6, 'testtask', 'browse'), (1, 6, 'build', 'view'), (1, 6, 'user', 'ajaxGetUser'), (1, 6, 'bug', 'browse'), (1, 6, 'project', 'index'), (1, 6, 'project', 'story'), (1, 6, 'product', 'doc'), (1, 6, 'user', 'project'), (1, 6, 'project', 'burn'), (1, 6, 'task', 'view'), (1, 6, 'user', 'task'), (1, 6, 'project', 'build'), (1, 6, 'project', 'bug'), (1, 6, 'product', 'index'), (1, 6, 'project', 'testtask'), (1, 6, 'project', 'doc'), (1, 6, 'product', 'roadmap'), (1, 6, 'product', 'browse'), (1, 6, 'search', 'buildForm'), (1, 6, 'product', 'dynamic'), (1, 6, 'product', 'view'), (1, 6, 'build', 'ajaxGetProductBuilds'), (1, 6, 'qa', 'index'), (1, 6, 'release', 'view'), (1, 6, 'testtask', 'index'), (1, 6, 'bug', 'ajaxGetUserBugs'), (1, 6, 'testcase', 'browse'), (1, 6, 'task', 'ajaxGetProjectTasks'), (1, 6, 'build', 'ajaxGetProjectBuilds'), (1, 6, 'project', 'ajaxGetProducts'), (1, 6, 'testcase', 'view'), (1, 6, 'bug', 'ajaxGetModuleOwner'), (1, 6, 'company', 'browse'), (1, 6, 'company', 'dynamic'), (1, 6, 'user', 'profile'), (1, 6, 'user', 'dynamic'), (1, 6, 'task', 'ajaxGetUserTasks'), (1, 6, 'project', 'team'), (1, 6, 'project', 'dynamic'), (1, 6, 'story', 'view'), (1, 6, 'bug', 'index'), (1, 6, 'story', 'ajaxGetProjectStories'), (1, 6, 'doc', 'index'), (1, 6, 'product', 'ajaxGetPlans'), (1, 6, 'index', 'index'), (1, 6, 'testtask', 'results'), (1, 6, 'testcase', 'index'), (1, 6, 'group', 'browse'), (1, 6, 'story', 'tasks'), (1, 6, 'productplan', 'browse'), (1, 6, 'story', 'ajaxGetProductStories'), (1, 6, 'productplan', 'view'), (1, 6, 'search', 'buildQuery'), (1, 6, 'file', 'download'), (1, 6, 'user', 'bug'), (1, 6, 'release', 'browse'), (1, 6, 'company', 'index'), (1, 6, 'user', 'todo'), (1, 6, 'user', 'view'), (1, 6, 'project', 'browse'), (1, 1, 'story', 'ajaxGetProjectStories'), (1, 1, 'story', 'report'), (1, 1, 'story', 'tasks'), (1, 1, 'story', 'activate'), (1, 1, 'story', 'batchClose'), (1, 1, 'story', 'close'), (1, 1, 'story', 'review'), (1, 1, 'story', 'change'), (1, 1, 'story', 'view'), (1, 1, 'story', 'delete'), (1, 1, 'story', 'export'), (1, 1, 'story', 'edit'), (1, 1, 'story', 'batchCreate'), (1, 1, 'story', 'create'), (1, 1, 'product', 'ajaxGetPlans'), (1, 1, 'product', 'ajaxGetProjects'), (1, 1, 'product', 'project'), (1, 1, 'product', 'dynamic'), (1, 1, 'product', 'doc'), (1, 1, 'product', 'roadmap'), (1, 1, 'product', 'delete'), (1, 1, 'product', 'order'), (1, 2, 'report', 'bugSummary'), (1, 2, 'bug', 'customFields'), (1, 2, 'file', 'download'), (1, 2, 'doc', 'index'), (1, 2, 'user', 'bug'), (1, 3, 'build', 'ajaxGetProductBuilds'), (1, 3, 'product', 'view'), (1, 3, 'api', 'getModel'), (1, 2, 'product', 'dynamic'), (1, 4, 'todo', 'create'), (1, 4, 'bug', 'close'), (1, 4, 'user', 'dynamic'), (1, 5, 'build', 'create'), (1, 5, 'task', 'report'), (1, 5, 'task', 'ajaxGetProjectTasks'), (1, 5, 'task', 'ajaxGetUserTasks'), (1, 5, 'task', 'confirmStoryChange'), (1, 5, 'task', 'export'), (1, 6, 'product', 'ajaxGetProjects'), (1, 1, 'product', 'edit'), (1, 2, 'project', 'grouptask'), (1, 3, 'svn', 'apiSync'), (1, 4, 'testtask', 'index'), (1, 5, 'task', 'view'), (1, 1, 'product', 'view'), (1, 1, 'product', 'create'), (1, 1, 'product', 'browse'), (1, 1, 'product', 'index'), (1, 1, 'todo', 'import2Today'), (1, 1, 'todo', 'mark'), (1, 1, 'todo', 'export'), (1, 1, 'todo', 'delete'), (1, 1, 'todo', 'view'), (1, 1, 'todo', 'edit'), (1, 2, 'testtask', 'index'), (1, 2, 'story', 'ajaxGetProductStories'), (1, 2, 'product', 'doc'), (1, 2, 'project', 'view'), (1, 2, 'bug', 'saveTemplate'), (1, 3, 'bug', 'deleteTemplate'), (1, 3, 'doc', 'editLib'), (1, 4, 'bug', 'assignTo'), (1, 4, 'project', 'testtask'), (1, 4, 'bug', 'activate'), (1, 4, 'project', 'task'), (1, 4, 'story', 'ajaxGetProjectStories'), (1, 4, 'tree', 'browse'), (1, 4, 'story', 'export'), (1, 5, 'task', 'delete'), (1, 5, 'task', 'activate'), (1, 5, 'task', 'batchClose'), (1, 5, 'task', 'close'), (1, 5, 'task', 'cancel'), (1, 5, 'task', 'finish'), (1, 5, 'task', 'start'), (1, 5, 'task', 'assignTo'), (1, 5, 'task', 'edit'), (1, 6, 'doc', 'view'), (1, 6, 'testtask', 'cases'), (1, 1, 'todo', 'create'), (1, 1, 'my', 'changePassword'), (1, 1, 'my', 'editProfile'), (1, 1, 'my', 'dynamic'), (1, 1, 'my', 'profile'), (1, 2, 'testtask', 'browse'), (1, 2, 'testtask', 'view'), (1, 2, 'testcase', 'export'), (1, 2, 'project', 'task'), (1, 3, 'todo', 'export'), (1, 3, 'task', 'create'), (1, 3, 'task', 'edit'), (1, 4, 'file', 'download'), (1, 4, 'tree', 'fix'), (1, 4, 'bug', 'confirmStoryChange'), (1, 4, 'tree', 'ajaxGetOptionMenu'), (1, 5, 'task', 'batchCreate'), (1, 5, 'task', 'create'), (1, 6, 'file', 'ajaxUpload'), (1, 6, 'misc', 'ping'), (1, 2, 'qa', 'index'), (1, 3, 'testcase', 'index'), (1, 4, 'my', 'changePassword'), (1, 6, 'release', 'ajaxGetStoriesAndBugs'), (1, 1, 'my', 'project'), (1, 1, 'my', 'story'), (1, 1, 'my', 'testCase'), (1, 1, 'my', 'testTask'), (1, 1, 'my', 'bug'), (1, 3, 'todo', 'import2Today'), (1, 1, 'my', 'task'), (1, 2, 'tree', 'browse'), (1, 3, 'task', 'assignTo'), (1, 4, 'bug', 'create'), (1, 1, 'my', 'todo'), (1, 2, 'task', 'ajaxGetProjectTasks'), (1, 1, 'my', 'index'), (1, 2, 'report', 'productInfo'), (1, 4, 'doc', 'index'), (1, 1, 'index', 'index'), (1, 2, 'release', 'browse'), (1, 1, 'action', 'undelete'), (1, 1, 'mail', 'index'), (1, 1, 'mail', 'detect'), (1, 1, 'mail', 'edit'), (1, 1, 'mail', 'save'), (1, 1, 'mail', 'test'), (1, 1, 'report', 'index'), (1, 1, 'report', 'projectDeviation'), (1, 1, 'report', 'productInfo'), (1, 1, 'report', 'bugSummary'), (1, 1, 'report', 'workload'), (1, 1, 'admin', 'index'), (1, 1, 'admin', 'checkDB'), (1, 1, 'admin', 'clearData'), (1, 2, 'project', 'ajaxGetProducts'), (1, 2, 'tree', 'ajaxGetSonModules'), (1, 4, 'doc', 'editLib'), (1, 2, 'product', 'edit'), (1, 3, 'todo', 'edit'), (1, 4, 'report', 'projectDeviation'), (1, 3, 'project', 'team'), (1, 4, 'user', 'project'), (1, 3, 'task', 'finish'), (1, 5, 'project', 'maintainrelation'), (1, 2, 'company', 'browse'), (1, 4, 'project', 'burnData'), (1, 3, 'todo', 'mark'), (1, 4, 'product', 'roadmap'), (1, 2, 'release', 'edit'), (1, 2, 'testtask', 'results'), (1, 2, 'productplan', 'view'), (1, 2, 'project', 'index'), (1, 2, 'build', 'ajaxGetProductBuilds'), (1, 2, 'testtask', 'cases'), (1, 2, 'project', 'manageProducts'), (1, 2, 'project', 'doc'), (1, 2, 'bug', 'browse'), (1, 2, 'doc', 'browse'), (1, 2, 'bug', 'deleteTemplate'), (1, 2, 'build', 'view'), (1, 2, 'story', 'batchCreate'), (1, 2, 'todo', 'import2Today'), (1, 2, 'story', 'ajaxGetProjectStories'), (1, 2, 'my', 'index'), (1, 2, 'company', 'dynamic'), (1, 2, 'report', 'projectDeviation'), (1, 2, 'product', 'index'), (1, 2, 'product', 'browse'), (1, 2, 'product', 'create'), (1, 2, 'todo', 'mark'), (1, 2, 'project', 'browse'), (1, 2, 'story', 'export'), (1, 2, 'release', 'export'), (1, 2, 'productplan', 'delete'), (1, 2, 'story', 'view'), (1, 2, 'story', 'delete'), (1, 2, 'productplan', 'edit'), (1, 2, 'product', 'order'), (1, 2, 'project', 'linkStory'), (1, 2, 'project', 'burnData'), (1, 2, 'my', 'todo'), (1, 2, 'story', 'change'), (1, 2, 'testcase', 'view'), (1, 2, 'story', 'close'), (1, 2, 'testcase', 'index'), (1, 2, 'todo', 'edit'), (1, 2, 'my', 'changePassword'), (1, 2, 'project', 'build'), (1, 2, 'product', 'view'), (1, 3, 'project', 'task'), (1, 3, 'release', 'export'), (1, 3, 'release', 'browse'), (1, 3, 'productplan', 'browse'), (1, 3, 'task', 'view'), (1, 3, 'task', 'ajaxGetUserTasks'), (1, 3, 'my', 'index'), (1, 3, 'user', 'profile'), (1, 3, 'company', 'index'), (1, 3, 'user', 'bug'), (1, 3, 'user', 'project'), (1, 3, 'user', 'todo'), (1, 3, 'company', 'browse'), (1, 3, 'user', 'view'), (1, 3, 'user', 'task'), (1, 3, 'company', 'dynamic'), (1, 3, 'group', 'browse'), (1, 3, 'bug', 'resolve'), (1, 3, 'bug', 'customFields'), (1, 3, 'testcase', 'view'), (1, 3, 'project', 'bug'), (1, 3, 'release', 'ajaxGetStoriesAndBugs'), (1, 3, 'project', 'story'), (1, 3, 'project', 'grouptask'), (1, 3, 'project', 'index'), (1, 3, 'project', 'ajaxGetProducts'), (1, 3, 'my', 'project'), (1, 3, 'release', 'view'), (1, 3, 'project', 'burnData'), (1, 3, 'project', 'burn'), (1, 3, 'project', 'view'), (1, 3, 'productplan', 'view'), (1, 3, 'project', 'doc'), (1, 3, 'project', 'dynamic'), (1, 3, 'report', 'index'), (1, 3, 'doc', 'view'), (1, 3, 'doc', 'edit'), (1, 3, 'report', 'bugSummary'), (1, 3, 'report', 'productInfo'), (1, 3, 'report', 'projectDeviation'), (1, 3, 'bug', 'browse'), (1, 3, 'bug', 'index'), (1, 3, 'bug', 'report'), (1, 3, 'svn', 'cat'), (1, 3, 'svn', 'diff'), (1, 4, 'company', 'dynamic'), (1, 4, 'company', 'browse'), (1, 4, 'group', 'browse'), (1, 4, 'testcase', 'view'), (1, 4, 'testcase', 'create'), (1, 4, 'testcase', 'export'), (1, 4, 'project', 'ajaxGetProducts'), (1, 4, 'project', 'team'), (1, 4, 'project', 'dynamic'), (1, 4, 'testcase', 'confirmStoryChange'), (1, 4, 'todo', 'export'), (1, 4, 'user', 'bug'), (1, 4, 'user', 'view'), (1, 4, 'product', 'doc'), (1, 4, 'product', 'index'), (1, 4, 'product', 'browse'), (1, 4, 'product', 'view'), (1, 4, 'my', 'story'), (1, 4, 'my', 'testCase'), (1, 4, 'my', 'index'), (1, 4, 'my', 'bug'), (1, 4, 'my', 'editProfile'), (1, 4, 'my', 'project'), (1, 4, 'doc', 'delete'), (1, 4, 'report', 'bugSummary'), (1, 4, 'doc', 'view'), (1, 4, 'report', 'productInfo'), (1, 4, 'testcase', 'batchCreate'), (1, 4, 'bug', 'ajaxGetModuleOwner'), (1, 4, 'testtask', 'view'), (1, 4, 'todo', 'view'), (1, 4, 'task', 'export'), (1, 4, 'task', 'ajaxGetUserTasks'), (1, 4, 'task', 'view'), (1, 4, 'task', 'ajaxGetProjectTasks'), (1, 5, 'project', 'ajaxGetProducts'), (1, 5, 'project', 'linkStory'), (1, 5, 'project', 'unlinkMember'), (1, 5, 'project', 'manageMembers'), (1, 5, 'project', 'manageProducts'), (1, 5, 'project', 'dynamic'), (1, 5, 'project', 'doc'), (1, 5, 'project', 'team'), (1, 5, 'project', 'burnData'), (1, 5, 'project', 'computeBurn'), (1, 5, 'project', 'burn'), (1, 5, 'project', 'bug'), (1, 5, 'project', 'testtask'), (1, 5, 'project', 'build'), (1, 5, 'project', 'story'), (1, 5, 'project', 'importBug'), (1, 5, 'project', 'importtask'), (1, 5, 'project', 'grouptask'), (1, 5, 'project', 'task'), (1, 5, 'project', 'delete'), (1, 5, 'project', 'order'), (1, 5, 'project', 'edit'), (1, 5, 'project', 'create'), (1, 5, 'project', 'browse'), (1, 5, 'project', 'view'), (1, 5, 'project', 'index'), (1, 5, 'release', 'export'), (1, 5, 'release', 'ajaxGetStoriesAndBugs'), (1, 5, 'release', 'view'), (1, 5, 'release', 'browse'), (1, 5, 'productplan', 'view'), (1, 5, 'productplan', 'browse'), (1, 5, 'story', 'ajaxGetProductStories'), (1, 5, 'story', 'ajaxGetProjectStories'), (1, 5, 'story', 'report'), (1, 5, 'story', 'tasks'), (1, 5, 'story', 'view'), (1, 5, 'story', 'export'), (1, 5, 'product', 'ajaxGetPlans'), (1, 5, 'product', 'ajaxGetProjects'), (1, 5, 'product', 'project'), (1, 5, 'product', 'dynamic'), (1, 5, 'product', 'doc'), (1, 5, 'product', 'roadmap'), (1, 5, 'product', 'view'), (1, 5, 'product', 'browse'), (1, 5, 'product', 'index'), (1, 5, 'todo', 'import2Today'), (1, 5, 'todo', 'mark'), (1, 5, 'todo', 'export'), (1, 5, 'todo', 'delete'), (1, 5, 'todo', 'view'), (1, 5, 'todo', 'edit'), (1, 5, 'todo', 'create'), (1, 5, 'my', 'changePassword'), (1, 5, 'my', 'editProfile'), (1, 5, 'my', 'dynamic'), (1, 5, 'my', 'profile'), (1, 5, 'my', 'project'), (1, 5, 'my', 'story'), (1, 5, 'my', 'testCase'), (1, 5, 'my', 'testTask'), (1, 5, 'my', 'bug'), (1, 5, 'my', 'task'), (1, 5, 'my', 'todo'), (1, 5, 'my', 'index'), (1, 1, 'todo', 'batchCreate'), (1, 2, 'todo', 'batchCreate'), (1, 3, 'todo', 'batchCreate'), (1, 4, 'todo', 'batchCreate'), (1, 5, 'todo', 'batchCreate'), (1, 5, 'index', 'index');
isleon/zentao
db/zentao.sql
SQL
gpl-3.0
53,452
#include "algorithms/collect_components.hh" #include "algorithms/evaluate.hh" using namespace cadabra; // #define DEBUG 1 collect_components::collect_components(const Kernel& k, Ex& tr) : Algorithm(k, tr) { } bool collect_components::can_apply(iterator st) { assert(tr.is_valid(st)); if(*st->name=="\\sum") return true; return false; } Algorithm::result_t collect_components::apply(iterator& st) { result_t res=result_t::l_no_action; evaluate eval(kernel, tr, tr); sibling_iterator s1=tr.begin(st); #ifdef DEBUG std::cerr << "collect_components::apply: acting on " << st << std::endl; #endif while(s1!=tr.end(st)) { // Walk over all terms in the sum, find the first components node. if(*s1->name=="\\components") { // First term found, now collect all others. sibling_iterator s2=s1;//tr.begin(st); ++s2; while(s2!=tr.end(st)) { if(*s2->name=="\\components") { #ifdef DEBUG std::cerr << "collect_components::apply: merging" << std::endl; #endif eval.merge_components(s1,s2); s2=tr.erase(s2); res=result_t::l_applied; } else ++s2; } break; // Exit outer loop; we have found the first components node. } ++s1; } if(s1!=tr.end(st)) { // Exited the main loop before the end, which means that we have // found at least one components node, stored at s1. #ifdef DEBUG std::cerr << "collect_components::apply: merged components node now " << s1 << std::endl; #endif auto comma=tr.end(s1); --comma; if(tr.number_of_children(comma)==0) node_zero(s1); } return res; }
kpeeters/cadabra2
core/algorithms/collect_components.cc
C++
gpl-3.0
1,561
namespace System.Runtime.Serialization { using System; using System.Runtime.InteropServices; [ComVisible(true)] public interface IDeserializationCallback { void OnDeserialization(object sender); } }
randomize/VimConfig
tags/dotnet/mscorlib/System/Runtime/Serialization/IDeserializationCallback.cs
C#
gpl-3.0
236
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.13"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>CodificadorPGM: Lista de los miembros</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtreedata.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="logo.png"/></td> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">CodificadorPGM &#160;<span id="projectnumber">1.0</span> </div> <div id="projectbrief">Compresor/Descompresor PGM</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generado por Doxygen 1.8.13 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Buscar'); </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> $(function() { initMenu('',true,false,'search.php','Buscar'); $(document).ready(function() { init_search(); }); }); </script> <div id="main-nav"></div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('classstd_1_1_coder.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="headertitle"> <div class="title">std::Coder Lista de los miembros</div> </div> </div><!--header--> <div class="contents"> <p>Lista completa de los miembros de <a class="el" href="classstd_1_1_coder.html">std::Coder</a>, incluyendo todos los heredados:</p> <table class="directory"> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a2686cb0f42f355d220a8632d95f884e6">bitsToFile</a></td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a1bbffb80e6d8e6f2e2fc8d5511a09d52">bitsToFilePointer</a></td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#aba2c54209bae8d6f4023f62e1ae335d7">CANTIDAD_MAXIMA_CONTEXTOS</a></td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"><span class="mlabel">static</span></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#ac0d71e9576336444560c0e474695611f">code</a>()</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a8f95d1ed2ad57cf54c0cdb6f63a09d53">Coder</a>()</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a7203afc83267c19539d72c1cedaf3449">Coder</a>(Image, int)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a3d41eb22190e746640052a9a2c4f06bf">contexts</a></td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#adb993b519f176fd4f87f6cb4dbef3834">encode</a>(int, int, ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a022f6050f66ed5c61d1c9d94bc08586c">flushEncoder</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#ab710ab1e130a68426feea870810e7521">getContext</a>(grad)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a055b2b7ec5ee402b353de62b4da5b2e1">getK</a>(int)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a26127e694bf8dda57fbaf5801ee965a2">getP</a>(pixels)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a7ee4258150a5f4583d523a2c87cfff5e">getPixels</a>(int)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#ad10d5031e77a3079cabb341d34f69ff9">getPredictedValue</a>(pixels)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#ade17378a5e6e2c937158f78b3342f55f">grad</a> typedef</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a9ac9c27a189c2502db8c1c8c4356324f">i</a></td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a99377d6562470191371ac6ba404389fc">image</a></td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a1eaaa2375684f2b6327c0e7b8f8eacd6">Nmax</a></td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#ac66d0b828a13888c76af0fe138294d11">pixels</a> typedef</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#aecbca77e8f30241eb1177ede6b3cf29e">rice</a>(int)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a4ea722ccb7278acdf05d7049bc7f4333">setContextsArray</a>()</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#aca63bc47ba1ac36420470ee37575cbd8">setGradients</a>(int, pixels)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a0e928dc13f85c6bd043962f39ff7113c">updateContexto</a>(int, int)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a45b9e77fee73324ebf536e1d95c90835">writeCode</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#aa76a059965a3e4022903c5199000c666">writeHeader</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a51275dd005b42c85b99c963855ee09cf">writeHeigth</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a704de53ea77bf302fd2b5121b8df4055">writeMagic</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a4083a1d2a3dc489713c06fe175440e02">writeNmax</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a00b236779e69be74fa622716c4ec2d9b">writeWhite</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classstd_1_1_coder.html#a0ca08f621580470cfba6659917f66f30">writeWidth</a>(ofstream &amp;)</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classstd_1_1_coder.html#a724e460d0f12fcede374f3335a8d148c">~Coder</a>()</td><td class="entry"><a class="el" href="classstd_1_1_coder.html">std::Coder</a></td><td class="entry"><span class="mlabel">virtual</span></td></tr> </table></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">Generado por <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li> </ul> </div> </body> </html>
jgodoy2017/D3D
ATIPI-Compresor/Doc/classstd_1_1_coder-members.html
HTML
gpl-3.0
11,500
# -*- coding: utf-8 -*- # <Lettuce - Behaviour Driven Development for python> # Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.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 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/>. import os import subprocess from os.path import dirname, abspath, join, curdir from nose.tools import assert_equals, with_setup from tests.asserts import prepare_stdout def test_imports_terrain_under_path_that_is_run(): old_path = abspath(curdir) os.chdir(join(abspath(dirname(__file__)), 'simple_features', '1st_feature_dir')) status, output = subprocess.getstatusoutput('python -c "from lettuce import world;assert hasattr(world, \'works_fine\'); print \'it passed!\'"') assert_equals(status, 0) assert_equals(output, "it passed!") os.chdir(old_path) @with_setup(prepare_stdout) def test_after_each_all_is_executed_before_each_all(): "terrain.before.each_all and terrain.after.each_all decorators" from lettuce import step from lettuce import Runner from lettuce.terrain import before, after, world world.all_steps = [] @before.all def set_state_to_before(): world.all_steps.append('before') @step('append 1 in world all steps') def append_1_in_world_all_steps(step): world.all_steps.append("1") @step('append 2 more') def append_2_more(step): world.all_steps.append("2") @step('append 3 in world all steps') def append_during_to_all_steps(step): world.all_steps.append("3") @after.all def set_state_to_after(total): world.all_steps.append('after') runner = Runner(join(abspath(dirname(__file__)), 'simple_features', '2nd_feature_dir')) runner.run() assert_equals( world.all_steps, ['before', '1', '2', '3', 'after'] )
adw0rd/lettuce-py3
tests/functional/test_terrain.py
Python
gpl-3.0
2,378
/* This file is part of jball. jball 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/>. */ package de.karlsebal.jball; import java.awt.Font; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextArea; /** * just echo a string into a frame. close will exit application. * @author k * */ public class TinyConsole extends JFrame { JPanel panel; JTextArea text; String signature; public TinyConsole() { setTitle("~~~ TinyConsole ~~~"); signature = ""; panel = new JPanel(); text = new JTextArea(); text.setFont(new Font("monospaced", Font.PLAIN, 12)); text.setEditable(false); setDefaultCloseOperation(EXIT_ON_CLOSE); panel.add(text); add(panel); setSize(250, 250); setVisible(true); } public void echo(String string) { string = string.concat(signature); text.setText(string); pack(); } public void setSignature(String string) { signature = string; } }
karlsebal/lab
jball/src/de/karlsebal/jball/TinyConsole.java
Java
gpl-3.0
1,512
import { createGlobalStyle } from 'styled-components'; const GlobalStyle = createGlobalStyle` .ant-breadcrumb { display: flex; align-items: center; font-size: 10px; color: #818181; border-bottom: 1px solid #ccc; } `; export default GlobalStyle;
StamusNetworks/scirius
ui/app/global-styles.js
JavaScript
gpl-3.0
271
<?php /** * TrcIMPLAN Índice Básico de Colonias * * Copyright (C) 2016 Guillermo Valdes Lozano * * 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/>. * * @package TrcIMPLAN */ namespace IBCTorreon; /** * Clase ResidencialLasIsabeles */ class ResidencialLasIsabeles extends \IBCBase\PublicacionWeb { /** * Constructor */ public function __construct() { // Título, autor y fecha $this->nombre = 'Residencial Las Isabeles'; $this->autor = 'IMPLAN Torreón Staff'; $this->fecha = '2016-09-02 12:55:35'; // El nombre del archivo a crear (obligatorio) y rutas relativas a las imágenes $this->archivo = 'residencial-las-isabeles'; $this->imagen = '../imagenes/imagen.jpg'; $this->imagen_previa = '../imagenes/imagen-previa.jpg'; // La descripción y claves dan información a los buscadores y redes sociales $this->descripcion = 'Colonia Residencial Las Isabeles de IBC Torreón.'; $this->claves = 'IMPLAN, Torreon, Desagregación'; // El directorio en la raíz donde se guardará el archivo HTML $this->directorio = 'ibc-torreon'; // Opción del menú Navegación a poner como activa cuando vea esta publicación $this->nombre_menu = 'IBC > IBC Torreón'; // Para el Organizador $this->categorias = array(); $this->fuentes = array(); $this->regiones = array(); } // constructor /** * Datos * * @return array Arreglo asociativo */ public function datos() { return array( 'Demografía' => array( 'Población total' => '735', 'Porcentaje de población masculina' => '48.44', 'Porcentaje de población femenina' => '51.56', 'Porcentaje de población de 0 a 14 años' => '30.07', 'Porcentaje de población de 15 a 64 años' => '60.95', 'Porcentaje de población de 65 y más años' => '1.63', 'Porcentaje de población no especificada' => '7.35', 'Fecundidad promedio' => '1.54', 'Porcentaje de población nacida en otro estado' => '19.20', 'Porcentaje de población con discapacidad' => '0.84' ), 'Educación' => array( 'Grado Promedio de Escolaridad' => '14.92', 'Grado Promedio de Escolaridad masculina' => '15.29', 'Grado Promedio de Escolaridad femenina' => '14.57' ), 'Características Económicas' => array( 'Población Económicamente Activa' => '52.94', 'Población Económicamente Activa masculina' => '65.56', 'Población Económicamente Activa femenina' => '34.44', 'Población Ocupada' => '98.50', 'Población Ocupada masculina' => '65.04', 'Población Ocupada femenina' => '34.96', 'Población Desocupada' => '1.50', 'Derechohabiencia' => '83.30' ), 'Viviendas' => array( 'Hogares' => '165', 'Hogares Jefatura masculina' => '88.48', 'Hogares Jefatura femenina' => '11.52', 'Ocupación por Vivienda' => '4.45', 'Viviendas con Electricidad' => '98.79', 'Viviendas con Agua' => '96.97', 'Viviendas con Drenaje' => '97.58', 'Viviendas con Televisión' => '98.79', 'Viviendas con Automóvil' => '98.18', 'Viviendas con Computadora' => '95.15', 'Viviendas con Celular' => '96.36', 'Viviendas con Internet' => '92.73' ), 'Unidades Económicas' => array( 'Total Actividades Económicas' => '5', 'Primer actividad nombre' => 'Comercio Menudeo', 'Primer actividad porcentaje' => '80.00', 'Segunda actividad nombre' => 'Educativos', 'Segunda actividad porcentaje' => '20.00', 'Tercera actividad nombre' => 'Salud', 'Tercera actividad porcentaje' => '0.00', 'Cuarta actividad nombre' => 'Información Medios Masivos', 'Cuarta actividad porcentaje' => '0.00', 'Quinta actividad nombre' => 'Manejo de Residuos', 'Quinta actividad porcentaje' => '0.00' ) ); } // datos } // Clase ResidencialLasIsabeles ?>
TRCIMPLAN/beta
lib/IBCTorreon/ResidencialLasIsabeles.php
PHP
gpl-3.0
5,242
<?php return [ /* |-------------------------------------------------------------------------- | Default Queue Driver |-------------------------------------------------------------------------- | | The Laravel queue API supports a variety of back-ends via an unified | API, giving you convenient access to each back-end using the same | syntax for each one. Here you may set the default queue driver. | | Supported: "null", "sync", "database", "beanstalkd", "sqs", "redis" | */ 'default' => menv('QUEUE_DRIVER', 'sync'), /* |-------------------------------------------------------------------------- | Queue Connections |-------------------------------------------------------------------------- | | Here you may configure the connection information for each server that | is used by your application. A default configuration has been added | for each back-end shipped with Laravel. You are free to add more. | */ 'connections' => [ 'sync' => [ 'driver' => 'sync', ], 'database' => [ 'driver' => 'database', 'table' => 'jobs', 'queue' => 'default', 'expire' => 60, ], 'beanstalkd' => [ 'driver' => 'beanstalkd', 'host' => 'localhost', 'queue' => 'default', 'ttr' => 60, ], 'sqs' => [ 'driver' => 'sqs', 'key' => 'your-public-key', 'secret' => 'your-secret-key', 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 'queue' => 'your-queue-name', 'region' => 'us-east-1', ], 'redis' => [ 'driver' => 'redis', 'connection' => 'default', 'queue' => 'default', 'expire' => 60, ], ], /* |-------------------------------------------------------------------------- | Failed Queue Jobs |-------------------------------------------------------------------------- | | These options configure the behavior of failed queue job logging so you | can control which database and table are used to store the jobs that | have failed. You may change them to any database / table you wish. | */ 'failed' => [ 'database' => menv('DB_CONNECTION', 'mysql'), 'table' => 'failed_jobs', ], ];
printempw/blessing-skin-server
config/queue.php
PHP
gpl-3.0
2,465
<?php /** * TrcIMPLAN - SMI Indicadores Matamoros Economía Jornadas Laborales Muy Largas (Creado por Central:SmiLanzadera) * * Copyright (C) 2015 Guillermo Valdés Lozano * * 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/>. * */ // Namespace namespace SMIIndicadoresMatamoros; /** * Clase EconomiaJornadasLaboralesMuyLargas */ class EconomiaJornadasLaboralesMuyLargas extends \Base\Publicacion { /** * Constructor */ public function __construct() { // Título, autor y fecha $this->nombre = 'Jornadas Laborales Muy Largas en Matamoros'; $this->autor = 'Dirección de Investigación Estratégica'; $this->fecha = '2015-07-14T14:33'; // El nombre del archivo a crear (obligatorio) y rutas relativas a las imágenes $this->archivo = 'economia-jornadas-laborales-muy-largas'; $this->imagen = '../smi/introduccion/imagen.jpg'; $this->imagen_previa = '../smi/introduccion/imagen-previa.jpg'; // La descripción y claves dan información a los buscadores y redes sociales $this->descripcion = 'Mide los trabajadores que laboran más de 48 horas por semana, como un proxy de la baja productividad del trabajo. Existe evidencia que sustenta que entre más horas se trabajen, por encima de un umbral, la productividad decrece o al menos no aumenta. Sin embargo, los efectos psicológicos y sociales de jornadas muy largas son negativos.'; $this->claves = 'IMPLAN, Matamoros, Índice de Competitividad Urbana, Empleo'; // El directorio en la raíz donde se guardará el archivo HTML $this->directorio = 'indicadores-matamoros'; // Opción del menú Navegación a poner como activa cuando vea esta publicación $this->nombre_menu = 'Indicadores'; // El estado puede ser 'publicar' (crear HTML y agregarlo a índices/galerías), 'revisar' (sólo crear HTML y accesar por URL) o 'ignorar' $this->estado = 'publicar'; // Si para compartir es verdadero, aparecerán al final los botones de compartir en Twitter y Facebook $this->para_compartir = true; // Instancia de SchemaPostalAddress que tiene la localidad, municipio y país $region = new \Base\SchemaPostalAddress(); $region->addressCountry = 'MX'; $region->addressRegion = 'Coahuila de Zaragoza'; $region->addressLocality = 'Matamoros'; // Instancia de SchemaPlace agrupa la región y el mapa $lugar = new \Base\SchemaPlace(); $lugar->address = $region; // El contenido es estructurado en un esquema $schema = new \Base\SchemaArticle(); $schema->name = $this->nombre; $schema->description = $this->descripcion; $schema->datePublished = $this->fecha; $schema->image = $this->imagen; $schema->image_show = false; $schema->author = $this->autor; $schema->contentLocation = $lugar; // El contenido es una instancia de SchemaArticle $this->contenido = $schema; // Para el Organizador $this->categorias = array('Índice de Competitividad Urbana', 'Empleo'); $this->fuentes = array('IMCO'); $this->regiones = 'Matamoros'; } // constructor /** * HTML * * @return string Código HTML */ public function html() { // Cargar en el Schema el HTML de las lengüetas $this->contenido->articleBody = <<<FINAL <ul class="nav nav-tabs lenguetas" id="smi-indicador"> <li><a href="#smi-indicador-datos" data-toggle="tab">Datos</a></li> <li><a href="#smi-indicador-grafica" data-toggle="tab">Gráfica</a></li> <li><a href="#smi-indicador-otras_regiones" data-toggle="tab">Otras regiones</a></li> </ul> <div class="tab-content lengueta-contenido"> <div class="tab-pane" id="smi-indicador-datos"> <h3>Información recopilada</h3> <table class="table table-hover table-bordered matriz"> <thead> <tr> <th>Fecha</th> <th>Dato</th> <th>Fuente</th> <th>Notas</th> </tr> </thead> <tbody> <tr> <td>31/12/2008</td> <td>31.45 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2009</td> <td>17.78 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2010</td> <td>19.43 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2011</td> <td>26.06 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2012</td> <td>29.63 %</td> <td>IMCO</td> <td></td> </tr> </tbody> </table> <p><b>Unidad:</b> Porcentaje.</p> </div> <div class="tab-pane" id="smi-indicador-grafica"> <h3>Gráfica de Jornadas Laborales Muy Largas en Matamoros</h3> <div id="graficaDatos" class="grafica"></div> </div> <div class="tab-pane" id="smi-indicador-otras_regiones"> <h3>Gráfica con los últimos datos de Jornadas Laborales Muy Largas</h3> <div id="graficaOtrasRegiones" class="grafica"></div> <h3>Últimos datos de Jornadas Laborales Muy Largas</h3> <table class="table table-hover table-bordered matriz"> <thead> <tr> <th>Región</th> <th>Fecha</th> <th>Dato</th> <th>Fuente</th> <th>Notas</th> </tr> </thead> <tbody> <tr> <td>Torreón</td> <td>2012-12-31</td> <td>23.33 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>Gómez Palacio</td> <td>2012-12-31</td> <td>27.45 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>Lerdo</td> <td>2012-12-31</td> <td>29.84 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>Matamoros</td> <td>2012-12-31</td> <td>29.63 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>La Laguna</td> <td>2012-12-31</td> <td>25.54 %</td> <td>IMCO</td> <td></td> </tr> </tbody> </table> </div> </div> FINAL; // Ejecutar este método en el padre return parent::html(); } // html /** * Javascript * * @return string No hay código Javascript, entrega un texto vacío */ public function javascript() { // JavaScript $this->javascript[] = <<<FINAL // LENGUETA smi-indicador-grafica $('#smi-indicador a[href="#smi-indicador-grafica"]').on('shown.bs.tab', function(e){ // Gráfica if (typeof vargraficaDatos === 'undefined') { vargraficaDatos = Morris.Line({ element: 'graficaDatos', data: [{ fecha: '2008-12-31', dato: 31.4500 },{ fecha: '2009-12-31', dato: 17.7800 },{ fecha: '2010-12-31', dato: 19.4300 },{ fecha: '2011-12-31', dato: 26.0600 },{ fecha: '2012-12-31', dato: 29.6300 }], xkey: 'fecha', ykeys: ['dato'], labels: ['Dato'], lineColors: ['#FF5B02'], xLabelFormat: function(d) { return d.getDate()+'/'+(d.getMonth()+1)+'/'+d.getFullYear(); }, dateFormat: function(ts) { var d = new Date(ts); return d.getDate() + '/' + (d.getMonth() + 1) + '/' + d.getFullYear(); } }); } }); // LENGUETA smi-indicador-otras_regiones $('#smi-indicador a[href="#smi-indicador-otras_regiones"]').on('shown.bs.tab', function(e){ // Gráfica if (typeof vargraficaOtrasRegiones === 'undefined') { vargraficaOtrasRegiones = Morris.Bar({ element: 'graficaOtrasRegiones', data: [{ region: 'Torreón', dato: 23.3300 },{ region: 'Gómez Palacio', dato: 27.4500 },{ region: 'Lerdo', dato: 29.8400 },{ region: 'Matamoros', dato: 29.6300 },{ region: 'La Laguna', dato: 25.5400 }], xkey: 'region', ykeys: ['dato'], labels: ['Dato'], barColors: ['#FF5B02'] }); } }); // TWITTER BOOTSTRAP TABS, ESTABLECER QUE LA LENGÜETA ACTIVA ES smi-indicador-datos $(document).ready(function(){ $('#smi-indicador a[href="#smi-indicador-datos"]').tab('show') }); FINAL; // Ejecutar este método en el padre return parent::javascript(); } // javascript /** * Redifusion HTML * * @return string Código HTML */ public function redifusion_html() { // Para redifusión, se pone el contenido sin lengüetas $this->redifusion = <<<FINAL <h3>Descripción</h3> <p>Mide los trabajadores que laboran más de 48 horas por semana, como un proxy de la baja productividad del trabajo. Existe evidencia que sustenta que entre más horas se trabajen, por encima de un umbral, la productividad decrece o al menos no aumenta. Sin embargo, los efectos psicológicos y sociales de jornadas muy largas son negativos.</p> <h3>Información recopilada</h3> <table class="table table-hover table-bordered matriz"> <thead> <tr> <th>Fecha</th> <th>Dato</th> <th>Fuente</th> <th>Notas</th> </tr> </thead> <tbody> <tr> <td>31/12/2008</td> <td>31.45 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2009</td> <td>17.78 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2010</td> <td>19.43 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2011</td> <td>26.06 %</td> <td>IMCO</td> <td></td> </tr> <tr> <td>31/12/2012</td> <td>29.63 %</td> <td>IMCO</td> <td></td> </tr> </tbody> </table> <p><b>Unidad:</b> Porcentaje.</p> FINAL; // Ejecutar este método en el padre return parent::redifusion_html(); } // redifusion_html } // Clase EconomiaJornadasLaboralesMuyLargas ?>
TRCIMPLAN/beta
lib/SMIIndicadoresMatamoros/EconomiaJornadasLaboralesMuyLargas.php
PHP
gpl-3.0
11,239
FROM python:3.8.7-buster LABEL GeoNode development team RUN mkdir -p /usr/src/geonode # Enable postgresql-client-11.2 RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - # This section is borrowed from the official Django image but adds GDAL and others RUN apt-get update && apt-get install -y \ libpq-dev python-dev libxml2-dev \ libxml2 libxslt1-dev zlib1g-dev libjpeg-dev \ libmemcached-dev libldap2-dev libsasl2-dev libffi-dev RUN apt-get update && apt-get install -y \ gcc zip gettext geoip-bin cron \ postgresql-client-11 \ sqlite3 spatialite-bin libsqlite3-mod-spatialite \ python3-gdal python3-psycopg2 python3-ldap \ python3-pip python3-pil python3-lxml python3-pylibmc \ python3-dev libgdal-dev \ uwsgi uwsgi-plugin-python3 \ --no-install-recommends && rm -rf /var/lib/apt/lists/* # add bower and grunt command COPY . /usr/src/geonode/ WORKDIR /usr/src/geonode COPY monitoring-cron /etc/cron.d/monitoring-cron RUN chmod 0644 /etc/cron.d/monitoring-cron RUN crontab /etc/cron.d/monitoring-cron RUN touch /var/log/cron.log RUN service cron start COPY wait-for-databases.sh /usr/bin/wait-for-databases RUN chmod +x /usr/bin/wait-for-databases RUN chmod +x /usr/src/geonode/tasks.py \ && chmod +x /usr/src/geonode/entrypoint.sh COPY celery.sh /usr/bin/celery-commands RUN chmod +x /usr/bin/celery-commands # Prepraing dependencies RUN apt-get update && apt-get install -y devscripts build-essential debhelper pkg-kde-tools sharutils # RUN git clone https://salsa.debian.org/debian-gis-team/proj.git /tmp/proj # RUN cd /tmp/proj && debuild -i -us -uc -b && dpkg -i ../*.deb # Install pip packages RUN pip install pip --upgrade RUN pip install --upgrade --no-cache-dir --src /usr/src -r requirements.txt \ && pip install pygdal==$(gdal-config --version).* \ && pip install flower==0.9.4 RUN pip install --upgrade -e . # Activate "memcached" RUN apt install memcached RUN pip install pylibmc \ && pip install sherlock # Install "geonode-contribs" apps RUN cd /usr/src; git clone https://github.com/GeoNode/geonode-contribs.git -b master # Install logstash and centralized dashboard dependencies RUN cd /usr/src/geonode-contribs/geonode-logstash; pip install --upgrade -e . \ cd /usr/src/geonode-contribs/ldap; pip install --upgrade -e . # Export ports EXPOSE 8000 # We provide no command or entrypoint as this image can be used to serve the django project or run celery tasks # ENTRYPOINT service cron restart && service memcached restart && /usr/src/geonode/entrypoint.sh
francbartoli/geonode
Dockerfile
Dockerfile
gpl-3.0
2,709
package io.gumga.core.gquery; import java.io.Serializable; import java.util.Arrays; import java.util.LinkedList; import java.util.List; /** * Junção utilizada no {@link GQuery} */ public class Join implements Serializable { /** * Tipo de Junção */ private JoinType type; /** * Tabela */ private String table; /** * Critérios de Junção */ private List<CriteriaJoin> subQuerys = new LinkedList<>(); protected Join(){} public Join(String table, JoinType type) { this.table = table; this.type = type; } public Join on(Criteria criteria) { this.subQuerys.add(new CriteriaJoin(criteria, CriteriaJoinType.ON)); return this; } public Join and(Criteria criteria) { this.subQuerys.add(new CriteriaJoin(criteria, CriteriaJoinType.AND)); return this; } public Join or(Criteria criteria) { this.subQuerys.add(new CriteriaJoin(criteria, CriteriaJoinType.OR)); return this; } @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(type.getName() + table); this.subQuerys.forEach(criteriaJoin -> { stringBuilder.append(criteriaJoin.toString()); }); return stringBuilder.toString(); } // public static void main(String[] args) { // GQuery join = new GQuery(new Criteria("nome", ComparisonOperator.EQUAL, "felipe")) // .join( // new Join("endereco", JoinType.INNER) // .on(new Criteria("id", ComparisonOperator.EQUAL, 2)) // ).join(new Join("endereco", JoinType.INNER) // .on(new Criteria("id", ComparisonOperator.EQUAL, 3))); // // System.out.println(join+join.getJoins()); // // } }
GUMGA/frameworkbackend
gumga-core/src/main/java/io/gumga/core/gquery/Join.java
Java
gpl-3.0
1,886
Exercise 3 (Load Modelling) ========== (Test Mission3 given to you by using the CCD IS E(M)ARI heuristic) Context --------------- The juice shop We want to go online as soon as possible! Do we have performance issues that could hinder us from doing so? Criterias --------------- Can you provide us with the following information: - Can we handle a total of 100k user/h, where we have a conversion rate (submitted orders) of 10%? - Can we achieve an overall response time per page of 1.5s - 4s? - Can you give us any recommendations regarding capacity? And why? Design --------------- Model a load profile that supports testing our business requirements. Install (Setup) --------------- Already done in exercise 1 Script --------------- - Reuse your scenarios from exercise 2 (or use the ones provided) - Inject load Execute and Monitor --------------- - Run the scenarios and monitor the application with VisualVM Analyze --------------- Analyze the test results in the team and gather your toughts what's happening here. Report --------------- Prepare for a short debriefing by using the PROOF heuristic: - Past: What have you recorded and why? - Results: Have a look at the generated Gatling reports. What can you get from them? - Obstacles: Anything that got in your way while testing? - Outlook: Is there anything left that you think needs to be done before doing an next iteration? - Feelings: How do you feel regarding your performance test-session? Are you satisfied or would you change something before doing an other iteration?
gmuecke/boutique-de-jus
perftest-gatling/exercise-3/README.md
Markdown
gpl-3.0
1,553
/* * Copyright 2014 MovingBlocks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.terasology.audio.openAL; import com.bulletphysics.linearmath.QuaternionUtil; import com.google.common.collect.Maps; import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; import org.lwjgl.openal.AL; import org.lwjgl.openal.AL10; import org.lwjgl.openal.ALC10; import org.lwjgl.openal.ALC11; import org.lwjgl.openal.ALCcontext; import org.lwjgl.openal.ALCdevice; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.terasology.asset.AssetFactory; import org.terasology.asset.AssetUri; import org.terasology.audio.AudioEndListener; import org.terasology.audio.AudioManager; import org.terasology.audio.Sound; import org.terasology.audio.StaticSound; import org.terasology.audio.StaticSoundData; import org.terasology.audio.StreamingSound; import org.terasology.audio.StreamingSoundData; import org.terasology.audio.openAL.staticSound.OpenALSound; import org.terasology.audio.openAL.staticSound.OpenALSoundPool; import org.terasology.audio.openAL.streamingSound.OpenALStreamingSound; import org.terasology.audio.openAL.streamingSound.OpenALStreamingSoundPool; import org.terasology.config.AudioConfig; import org.terasology.math.Direction; import javax.vecmath.Quat4f; import javax.vecmath.Vector3f; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import java.nio.FloatBuffer; import java.nio.IntBuffer; import java.util.Iterator; import java.util.Map; public class OpenALManager implements AudioManager { private static final Logger logger = LoggerFactory.getLogger(OpenALManager.class); /** * For faster distance check * */ private static final float MAX_DISTANCE_SQUARED = MAX_DISTANCE * MAX_DISTANCE; protected Map<String, SoundPool<? extends Sound<?>, ?>> pools = Maps.newHashMap(); private Vector3f listenerPosition = new Vector3f(); private Map<SoundSource<?>, AudioEndListener> endListeners = Maps.newHashMap(); private PropertyChangeListener configListener = new PropertyChangeListener() { @Override public void propertyChange(PropertyChangeEvent evt) { if (evt.getPropertyName().equals(AudioConfig.MUSIC_VOLUME)) { setMusicVolume((Float) evt.getNewValue()); } else if (evt.getPropertyName().equals(AudioConfig.SOUND_VOLUME)) { setSoundVolume((Float) evt.getNewValue()); } } }; public OpenALManager(AudioConfig config) throws OpenALException, LWJGLException { logger.info("Initializing OpenAL audio manager"); config.subscribe(configListener); AL.create(); AL10.alGetError(); logger.info("OpenAL {} initialized!", AL10.alGetString(AL10.AL_VERSION)); ALCcontext context = ALC10.alcGetCurrentContext(); ALCdevice device = ALC10.alcGetContextsDevice(context); logger.info("Using OpenAL: {} by {}", AL10.alGetString(AL10.AL_RENDERER), AL10.alGetString(AL10.AL_VENDOR)); logger.info("Using device: {}", ALC10.alcGetString(device, ALC10.ALC_DEVICE_SPECIFIER)); logger.info("Available AL extensions: {}", AL10.alGetString(AL10.AL_EXTENSIONS)); logger.info("Available ALC extensions: {}", ALC10.alcGetString(device, ALC10.ALC_EXTENSIONS)); IntBuffer buffer = BufferUtils.createIntBuffer(1); ALC10.alcGetInteger(device, ALC11.ALC_MONO_SOURCES, buffer); logger.info("Max mono sources: {}", buffer.get(0)); buffer.rewind(); ALC10.alcGetInteger(device, ALC11.ALC_STEREO_SOURCES, buffer); logger.info("Max stereo sources: {}", buffer.get(0)); buffer.rewind(); ALC10.alcGetInteger(device, ALC10.ALC_FREQUENCY, buffer); logger.info("Mixer frequency: {}", buffer.get(0)); buffer.rewind(); AL10.alDistanceModel(AL10.AL_INVERSE_DISTANCE_CLAMPED); // Initialize sound pools pools.put("sfx", new OpenALSoundPool(30)); // effects pool pools.put("music", new OpenALStreamingSoundPool(2)); // music pool pools.get("sfx").setVolume(config.getSoundVolume()); pools.get("music").setVolume(config.getMusicVolume()); } @Override public void dispose() { AL.destroy(); } @Override public void stopAllSounds() { for (SoundPool<?, ?> pool : pools.values()) { pool.stopAll(); } } @Override public boolean isMute() { return AL10.alGetListenerf(AL10.AL_GAIN) < 0.01f; } @Override public void setMute(boolean mute) { if (mute) { AL10.alListenerf(AL10.AL_GAIN, 0); } else { AL10.alListenerf(AL10.AL_GAIN, 1.0f); } } private void setSoundVolume(float volume) { pools.get("sfx").setVolume(volume); } private void setMusicVolume(float volume) { pools.get("music").setVolume(volume); } @Override public void playSound(StaticSound sound) { playSound(sound, null, 1.0f, PRIORITY_NORMAL); } @Override public void playSound(StaticSound sound, float volume) { playSound(sound, null, volume, PRIORITY_NORMAL); } @Override public void playSound(StaticSound sound, float volume, int priority) { playSound(sound, null, volume, priority); } @Override public void playSound(StaticSound sound, Vector3f position) { playSound(sound, position, 1.0f, PRIORITY_NORMAL); } @Override public void playSound(StaticSound sound, Vector3f position, float volume) { playSound(sound, position, volume, PRIORITY_NORMAL); } @Override public void playSound(StaticSound sound, Vector3f position, float volume, int priority) { playSound(sound, position, volume, priority, null); } @Override public void playSound(StaticSound sound, Vector3f position, float volume, int priority, AudioEndListener endListener) { if (position != null && !checkDistance(position)) { return; } SoundPool<StaticSound, ?> pool = (SoundPool<StaticSound, ?>) pools.get("sfx"); SoundSource<?> source = pool.getSource(sound, priority); if (source != null) { source.setAbsolute(position != null); if (position != null) { source.setPosition(position); } source.setGain(volume); source.play(); if (endListener != null) { endListeners.put(source, endListener); } } } @Override public void playMusic(StreamingSound music) { playMusic(music, 1.0f, null); } @Override public void playMusic(StreamingSound music, AudioEndListener endListener) { playMusic(music, 1.0f, endListener); } @Override public void playMusic(StreamingSound music, float volume) { playMusic(music, volume, null); } @Override public void playMusic(StreamingSound music, float volume, AudioEndListener endListener) { SoundPool<StreamingSound, ?> pool = (SoundPool<StreamingSound, ?>) pools.get("music"); pool.stopAll(); if (music == null) { return; } SoundSource<?> source = pool.getSource(music); if (source != null) { source.setGain(volume).play(); if (endListener != null) { endListeners.put(source, endListener); } } } @Override public void updateListener(Vector3f position, Quat4f orientation, Vector3f velocity) { AL10.alListener3f(AL10.AL_VELOCITY, velocity.x, velocity.y, velocity.z); OpenALException.checkState("Setting listener velocity"); Vector3f dir = QuaternionUtil.quatRotate(orientation, Direction.FORWARD.getVector3f(), new Vector3f()); Vector3f up = QuaternionUtil.quatRotate(orientation, Direction.UP.getVector3f(), new Vector3f()); FloatBuffer listenerOri = BufferUtils.createFloatBuffer(6).put(new float[]{dir.x, dir.y, dir.z, up.x, up.y, up.z}); listenerOri.flip(); AL10.alListener(AL10.AL_ORIENTATION, listenerOri); OpenALException.checkState("Setting listener orientation"); this.listenerPosition.set(position); AL10.alListener3f(AL10.AL_POSITION, position.x, position.y, position.z); OpenALException.checkState("Setting listener position"); } @Override public void update(float delta) { for (SoundPool<?, ?> pool : pools.values()) { pool.update(delta); } Iterator<Map.Entry<SoundSource<?>, AudioEndListener>> iterator = endListeners.entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<SoundSource<?>, AudioEndListener> entry = iterator.next(); if (!entry.getKey().isPlaying()) { iterator.remove(); entry.getValue().onAudioEnd(); } } } protected boolean checkDistance(Vector3f soundPosition) { Vector3f distance = new Vector3f(soundPosition); distance.sub(listenerPosition); return distance.lengthSquared() < MAX_DISTANCE_SQUARED; } @Override public AssetFactory<StaticSoundData, StaticSound> getStaticSoundFactory() { return new AssetFactory<StaticSoundData, StaticSound>() { @Override public StaticSound buildAsset(AssetUri uri, StaticSoundData data) { return new OpenALSound(uri, data, OpenALManager.this); } }; } @Override public AssetFactory<StreamingSoundData, StreamingSound> getStreamingSoundFactory() { return new AssetFactory<StreamingSoundData, StreamingSound>() { @Override public StreamingSound buildAsset(AssetUri uri, StreamingSoundData data) { return new OpenALStreamingSound(uri, data, OpenALManager.this); } }; } public void purgeSound(Sound<?> sound) { for (SoundPool<?, ?> pool : pools.values()) { pool.purge(sound); } } }
xposure/zSprite_Old
Source/Framework/zSprite.Sandbox/Terasology/audio/openAL/OpenALManager.java
Java
gpl-3.0
10,684
Instructions ======================= This is a histogram plotter for each of the variables available in the Motor Trend Car Road Tests data. * Adjust the number of histogram bins using the slider. The default is set to 10. * Select the variable you wish to plot from the Variable drop down menu. Enjoy!
ch4413/DevelopingData
plotly/include.md
Markdown
gpl-3.0
305
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://www.facebook.com/2008/fbml"> <head> <meta charset="utf-8"> <title>BlinkDemo - Open Source Bitcoin Exchange demo website</title> <!-- Meta --> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="author" content="BlinkTrade"> <meta name="description" content="Open Source Bitcoin Exchange demo website"> <meta name="keywords" content="bitcoin, bitcoin exchange, open source bitcoin exchange, bitcoin trading plataform, open source bitcoin trading plataform"> <meta property="og:title" content="BlinkDemo - Open Source Bitcoin Exchange demo website"> <meta property="og:description" content="Open Source Bitcoin Exchange demo website"> <meta property="og:type" content="website"> <meta property="og:url" content="https://masterx1582.github.io//post/faq-why-don't-I-have-a-private-key-for-my-exchange-wallet/"> <meta property="og:image" content="https://masterx1582.github.io//assets/exchange_logos/demo_social_network_share.png"> <!-- Favicon --> <link rel="shortcut icon" href="https://masterx1582.github.io//assets/exchange_logos/demo_favicon.ico"> <link rel="icon" href="https://masterx1582.github.io//assets/exchange_logos/demo_favicon.ico" type="image/x-icon"> <!-- Feed --> <link rel="alternate" type="application/rss+xml" href="https://masterx1582.github.io//feed.xml"> <meta charset="utf-8"> <link rel="canonical" href="https://masterx1582.github.io//post/faq-why-don't-I-have-a-private-key-for-my-exchange-wallet/"/> <script type="text/javascript" src="//apis.google.com/js/plusone.js"></script> <!--Bootstrap--> <link href="https://masterx1582.github.io//assets/themes/default/css/bootstrap-combined.min.css" rel="stylesheet"> <link href="https://masterx1582.github.io//assets/themes/default/css/font-awesome.min.css" rel="stylesheet"> </head> <body class=""> <div id="id_toolbar" class="navbar navbar-inverse navbar-fixed-top"> <div class="navbar-inner"> <div class="container"> <a class="brand" href="https://masterx1582.github.io//"> <img src="https://masterx1582.github.io//assets/exchange_logos/demo_toolbar_logo.png" style=" height: 30px; margin-top: -10px; margin-bottom: -10px; "> </a> <ul class="nav navbar-nav pull-right"> <li class="dropdown"> <a id="drop1" href="#" role="button" class="dropdown-toggle" data-toggle="dropdown">EN_US <b class="caret"></b></a> <ul class="dropdown-menu" role="menu" aria-labelledby="drop1"> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://masterx1582.github.io//es">ES</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://masterx1582.github.io//pt_BR">PT_BR</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://masterx1582.github.io//ro">RO</a></li> <li role="presentation"><a role="menuitem" tabindex="-1" href="https://masterx1582.github.io//zn_CN">ZN_CN</a></li> </ul> </li> </ul> </div> </div> </div> <div class="clearfix" style="padding: 30px;"></div> <div id="id_notifications" class="notifications top-right" style="z-index: 9000;"></div> <div class="post"> <header class="post-header"> <h1>why don't I have a private key for my exchange wallet?</h1> <p class="meta">Nov 7, 2014</p> </header> <article class="post-content"> <p>Our principle is that the bitcoins deposited in the exchange are there to be exchanged for your local currency. In consequence, to guarantee safety and speed in the trade, the exchange operator keeps possession of deposits either in FIAT and in BTC.</p> </article> </div> <footer class="footer"> <div class="container"> <p> <a href="http://blinktrade.com/" target="_blank">© 2014 BlinkTrade Inc</a> | <a href="#themes">Themes</a> | <a href="https://github.com/blinktrade/" target="_blank">Proudly 100% open source <span class="bitex-model" data-model-key="JSVersion"></span></a> | <a href="http://nytm.org/made-in-nyc/" target="_blank">Made with <span style="color: #d11f0d;font-size: 19px;">♥</span> in NYC</a> </p> </div> </footer> <script data-cfasync="false" type="text/javascript"> (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', '_gat'); _gat('create', 'UA-53856711-1', 'auto'); _gat('send', 'pageview'); </script> <!--Start of Zopim Live Chat Script--> <script data-cfasync="false" type="text/javascript"> window.$zopim||(function(d,s){var z=$zopim=function(c){z._.push(c)},$=z.s= d.createElement(s),e=d.getElementsByTagName(s)[0];z.set=function(o){z.set. _.push(o)};z._=[];z.set._=[];$.async=!0;$.setAttribute('charset','utf-8'); $.src='https://v2.zopim.com/?2SSNIzvxy8fBypKoZJ0pI43tUoNCv8os';z.t=+new Date;$. type='text/javascript';e.parentNode.insertBefore($,e)})(document,'script'); </script> <!--End of Zopim Live Chat Script--> <script type='text/javascript'> (function() { var s = document.createElement('script'); s.type = 'text/javascript'; s.async = true; s.src = '//d3a5udlxrolr3e.cloudfront.net/resource/chat.js'; var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(s, x); })(); window.embeddedChatAsyncInit = function() { embeddedChat.init("4296"); } </script> </body> </html>
MasterX1582/MasterX1582.github.io
post/faq-why-don't-I-have-a-private-key-for-my-exchange-wallet/index.html
HTML
gpl-3.0
6,758
//---------------------------------------------------------------------------- // Copyright (C) 2004-2015 by EMGU Corporation. All rights reserved. //---------------------------------------------------------------------------- using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; #if (ANDROID || IOS || NETFX_CORE || UNITY_ANDROID || UNITY_IPHONE || UNITY_STANDALONE || UNITY_METRO ) #else using System.Drawing.Imaging; #endif using System.IO; using System.Runtime.InteropServices; using System.Text; using Emgu.CV.Features2D; using Emgu.CV.Structure; namespace Emgu.CV.Util { /// <summary> /// Utilities class /// </summary> public static class CvToolbox { #if ANDROID || IOS || NETFX_CORE || UNITY_ANDROID || UNITY_IPHONE || UNITY_STANDALONE || UNITY_METRO #else #region Color Pallette /// <summary> /// The ColorPalette of Grayscale for Bitmap Format8bppIndexed /// </summary> public static readonly ColorPalette GrayscalePalette = GenerateGrayscalePalette(); private static ColorPalette GenerateGrayscalePalette() { using (Bitmap image = new Bitmap(1, 1, PixelFormat.Format8bppIndexed)) { ColorPalette palette = image.Palette; for (int i = 0; i < 256; i++) { palette.Entries[i] = Color.FromArgb(i, i, i); } return palette; } } /// <summary> /// Convert the color palette to four lookup tables /// </summary> /// <param name="palette">The color palette to transform</param> /// <param name="bTable">Lookup table for the B channel</param> /// <param name="gTable">Lookup table for the G channel</param> /// <param name="rTable">Lookup table for the R channel</param> /// <param name="aTable">Lookup table for the A channel</param> public static void ColorPaletteToLookupTable(ColorPalette palette, out Matrix<Byte> bTable, out Matrix<Byte> gTable, out Matrix<Byte> rTable, out Matrix<Byte> aTable) { bTable = new Matrix<byte>(256, 1); gTable = new Matrix<byte>(256, 1); rTable = new Matrix<byte>(256, 1); aTable = new Matrix<byte>(256, 1); byte[,] bData = bTable.Data; byte[,] gData = gTable.Data; byte[,] rData = rTable.Data; byte[,] aData = aTable.Data; Color[] colors = palette.Entries; for (int i = 0; i < colors.Length; i++) { Color c = colors[i]; bData[i, 0] = c.B; gData[i, 0] = c.G; rData[i, 0] = c.R; aData[i, 0] = c.A; } } #endregion #endif /* /// <summary> /// Returns information about one of or all of the registered modules /// </summary> /// <param name="pluginName">The list of names and versions of the optimized plugins that CXCORE was able to find and load</param> /// <param name="versionName">Information about the module(s), including version</param> public static void GetModuleInfo(out String pluginName, out String versionName) { IntPtr version = IntPtr.Zero; IntPtr pluginInfo = IntPtr.Zero; CvInvoke.cvGetModuleInfo(IntPtr.Zero, ref version, ref pluginInfo); pluginName = Marshal.PtrToStringAnsi(pluginInfo); versionName = Marshal.PtrToStringAnsi(version); }*/ /// <summary> /// Enable or diable IPL optimization for opencv /// </summary> /// <param name="enable">true to enable optimization, false to disable</param> public static void OptimizeCV(bool enable) { CvInvoke.cvUseOptimized(enable); } /* /// <summary> /// Get the OpenCV matrix depth enumeration from depth type /// </summary> /// <param name="typeOfDepth">The depth of type</param> /// <returns>OpenCV Matrix depth</returns> public static CvEnum.DepthType GetMatrixDepth(Type typeOfDepth) { if (typeOfDepth == typeof(Single)) return CvEnum.DepthType.Cv32F; if (typeOfDepth == typeof(Int32)) return Emgu.CV.CvEnum.DepthType.Cv32S; if (typeOfDepth == typeof(SByte)) return Emgu.CV.CvEnum.DepthType.Cv8S; if (typeOfDepth == typeof(Byte)) return CvEnum.DepthType.Cv8U; if (typeOfDepth == typeof(Double)) return CvEnum.DepthType.Cv64F; if (typeOfDepth == typeof(UInt16)) return CvEnum.DepthType.Cv16U; if (typeOfDepth == typeof(Int16)) return CvEnum.DepthType.Cv16S; throw new NotImplementedException("Unsupported matrix depth"); }*/ /// <summary> /// Convert arrays of data to matrix /// </summary> /// <param name="data">Arrays of data</param> /// <returns>A two dimension matrix that represent the array</returns> public static Matrix<T> GetMatrixFromArrays<T>(T[][] data) where T: struct { int rows = data.Length; int cols = data[0].Length; Matrix<T> res = new Matrix<T>(rows, cols); MCvMat mat = res.MCvMat; long dataPos = mat.Data.ToInt64(); //int rowSizeInBytes = Marshal.SizeOf(typeof(T)) * cols; for (int i = 0; i < rows; i++, dataPos += mat.Step) { CopyVector(data[i], new IntPtr(dataPos)); } return res; } /// <summary> /// Convert arrays of points to matrix /// </summary> /// <param name="points">Arrays of points</param> /// <returns>A two dimension matrix that represent the points</returns> public static Matrix<double> GetMatrixFromPoints(MCvPoint2D64f[][] points) { int rows = points.Length; int cols = points[0].Length; Matrix<double> res = new Matrix<double>(rows, cols, 2); MCvMat cvMat = res.MCvMat; for (int i = 0; i < rows; i++) { IntPtr dst = new IntPtr(cvMat.Data.ToInt64() + cvMat.Step * i); CopyVector(points[i], dst); } return res; } /// <summary> /// Compute the minimum and maximum value from the points /// </summary> /// <param name="points">The points</param> /// <param name="min">The minimum x,y,z values</param> /// <param name="max">The maximum x,y,z values</param> public static void GetMinMax(IEnumerable<MCvPoint3D64f> points, out MCvPoint3D64f min, out MCvPoint3D64f max) { min = new MCvPoint3D64f(); min.X = min.Y = min.Z = double.MaxValue; max = new MCvPoint3D64f(); max.X = max.Y = max.Z = double.MinValue; foreach (MCvPoint3D64f p in points) { min.X = Math.Min(min.X, p.X); min.Y = Math.Min(min.Y, p.Y); min.Z = Math.Min(min.Z, p.Z); max.X = Math.Max(max.X, p.X); max.Y = Math.Max(max.Y, p.Y); max.Z = Math.Max(max.Z, p.Z); } } /* #region FFMPEG private static bool _hasFFMPEG; private static bool _ffmpegChecked = false; /// <summary> /// Indicates if opencv_ffmpeg is presented /// </summary> internal static bool HasFFMPEG { get { if (!_ffmpegChecked) { String tempFile = Path.GetTempFileName(); File.Delete(tempFile); String fileName = Path.Combine(Path.GetDirectoryName(tempFile), Path.GetFileNameWithoutExtension(tempFile)) + ".avi"; try { IntPtr capture = CvInvoke.cvCreateVideoWriter_FFMPEG(fileName, CvInvoke.CV_FOURCC('U', '2', '6', '3'), 10, new Size(480, 320), true); _hasFFMPEG = (capture != IntPtr.Zero); if (_hasFFMPEG) CvInvoke.cvReleaseVideoWriter_FFMPEG(ref capture); } catch (Exception e) { String msg = e.Message; _hasFFMPEG = false; } finally { if (File.Exists(fileName)) File.Delete(fileName); _ffmpegChecked = true; } } return _hasFFMPEG; } } #endregion */ /// <summary> /// Copy a generic vector to the unmanaged memory /// </summary> /// <typeparam name="TData">The data type of the vector</typeparam> /// <param name="src">The source vector</param> /// <param name="dest">Pointer to the destination unmanaged memory</param> /// <param name="bytesToCopy">Specify the number of bytes to copy. If this is -1, the number of bytes equals the number of bytes in the <paramref name="src"> array</paramref></param> /// <returns>The number of bytes copied</returns> public static int CopyVector<TData>(TData[] src, IntPtr dest, int bytesToCopy = -1) { int size; if (bytesToCopy < 0) #if NETFX_CORE size = Marshal.SizeOf<TData>() * src.Length; #else size = Marshal.SizeOf(typeof(TData)) * src.Length; #endif else size = bytesToCopy; GCHandle handle = GCHandle.Alloc(src, GCHandleType.Pinned); Memcpy(dest, handle.AddrOfPinnedObject(), size); handle.Free(); return size; } /// <summary> /// Copy a jagged two dimensional array to the unmanaged memory /// </summary> /// <typeparam name="TData">The data type of the jagged two dimensional</typeparam> /// <param name="source">The source array</param> /// <param name="dest">Pointer to the destination unmanaged memory</param> public static void CopyMatrix<TData>(TData[][] source, IntPtr dest) { Int64 current = dest.ToInt64(); for (int i = 0; i < source.Length; i++) { int step = CopyVector(source[i], new IntPtr(current)); current += step; } } /// <summary> /// Copy a jagged two dimensional array from the unmanaged memory /// </summary> /// <typeparam name="D">The data type of the jagged two dimensional</typeparam> /// <param name="src">The src array</param> /// <param name="dest">Pointer to the destination unmanaged memory</param> public static void CopyMatrix<D>(IntPtr src, D[][] dest) { #if NETFX_CORE int datasize = Marshal.SizeOf<D>(); #else int datasize = Marshal.SizeOf(typeof(D)); #endif int step = datasize * dest[0].Length; long current = src.ToInt64(); for (int i = 0; i < dest.Length; i++, current += step) { GCHandle handle = GCHandle.Alloc(dest[i], GCHandleType.Pinned); Memcpy(handle.AddrOfPinnedObject(), new IntPtr(current), step); handle.Free(); } } /// <summary> /// memcpy function /// </summary> /// <param name="dest">the destination of memory copy</param> /// <param name="src">the source of memory copy</param> /// <param name="len">the number of bytes to be copied</param> public static void Memcpy(IntPtr dest, IntPtr src, int len) { CvInvoke.cveMemcpy(dest, src, len); } #region color conversion private static Dictionary<Type, Dictionary<Type, CvEnum.ColorConversion>> _lookupTable = new Dictionary<Type, Dictionary<Type, CvEnum.ColorConversion>>(); private static CvEnum.ColorConversion GetCode(Type srcType, Type destType) { String key = String.Format("{0}2{1}", GetConversionCodenameFromType(srcType), GetConversionCodenameFromType(destType)); return (CvEnum.ColorConversion)Enum.Parse(typeof(CvEnum.ColorConversion), key, true); } private static String GetConversionCodenameFromType(Type colorType) { #if NETFX_CORE if (colorType == typeof(Bgr)) return "BGR"; else if (colorType == typeof(Bgra)) return "BGRA"; else if (colorType == typeof(Gray)) return "GRAY"; else if (colorType == typeof(Hls)) return "HLS"; else if (colorType == typeof(Hsv)) return "HSV"; else if (colorType == typeof(Lab)) return "Lab"; else if (colorType == typeof(Luv)) return "Luv"; else if (colorType == typeof(Rgb)) return "RGB"; else if (colorType == typeof(Rgba)) return "RGBA"; else if (colorType == typeof(Xyz)) return "XYZ"; else if (colorType == typeof(Ycc)) return "YCrCb"; else throw new Exception(String.Format("Unable to get Color Conversion Codename for type {0}", colorType.ToString())); #else ColorInfoAttribute info = (ColorInfoAttribute)colorType.GetCustomAttributes(typeof(ColorInfoAttribute), true)[0]; return info.ConversionCodename; #endif } /// <summary> /// Given the source and destination color type, compute the color conversion code for CvInvoke.cvCvtColor function /// </summary> /// <param name="srcColorType">The source color type. Must be a type inherited from IColor</param> /// <param name="destColorType">The dest color type. Must be a type inherited from IColor</param> /// <returns>The color conversion code for CvInvoke.cvCvtColor function</returns> public static CvEnum.ColorConversion GetColorCvtCode(Type srcColorType, Type destColorType) { CvEnum.ColorConversion conversion; lock (_lookupTable) { Dictionary<Type, CvEnum.ColorConversion> table = _lookupTable.ContainsKey(srcColorType) ? _lookupTable[srcColorType] : (_lookupTable[srcColorType] = new Dictionary<Type, Emgu.CV.CvEnum.ColorConversion>()); conversion = table.ContainsKey(destColorType) ? table[destColorType] : (table[destColorType] = GetCode(srcColorType, destColorType)); ; } return conversion; } #endregion } } namespace Emgu.CV { public static partial class CvInvoke { [DllImport(CvInvoke.ExternLibrary, CallingConvention = CvInvoke.CvCallingConvention)] internal static extern IntPtr cvGetImageSubRect(IntPtr imagePtr, ref Rectangle rect); [DllImport(CvInvoke.ExternLibrary, CallingConvention = CvInvoke.CvCallingConvention)] internal static extern void cveMemcpy(IntPtr dst, IntPtr src, int length); } }
Lutske/EMGU_CV
Emgu.CV/Util/CvToolbox.cs
C#
gpl-3.0
14,733
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // La información general sobre un ensamblado se controla mediante el siguiente // conjunto de atributos. Cambie estos atributos para modificar la información // asociada con un ensamblado. [assembly: AssemblyTitle("Fonts")] [assembly: AssemblyDescription("NFTR support")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Tinke")] [assembly: AssemblyCopyright("pleoNeX, CUE, Lyan53")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Si establece ComVisible como false, los tipos de este ensamblado no estarán visibles // para los componentes COM. Si necesita obtener acceso a un tipo de este ensamblado desde // COM, establezca el atributo ComVisible como true en este tipo. [assembly: ComVisible(false)] // El siguiente GUID sirve como identificador de typelib si este proyecto se expone a COM [assembly: Guid("4c105b9e-d2f7-480c-a259-273443e74561")] // La información de versión de un ensamblado consta de los cuatro valores siguientes: // // Versión principal // Versión secundaria // Número de compilación // Revisión // // Puede especificar todos los valores o establecer como predeterminados los números de versión de compilación y de revisión // mediante el asterisco ('*'), como se muestra a continuación: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.1.1.0")] [assembly: AssemblyFileVersion("2.1.1.0")]
pleonex/tinke
Plugins/Fonts/Fonts/Properties/AssemblyInfo.cs
C#
gpl-3.0
1,591
/* * GCM: Galois/Counter Mode. * * Copyright (c) 2007 Nokia Siemens Networks - Mikko Herranen <mh1@iki.fi> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published * by the Free Software Foundation. */ #include <crypto/gf128mul.h> #include <crypto/internal/aead.h> #include <crypto/internal/skcipher.h> #include <crypto/internal/hash.h> #include <crypto/null.h> #include <crypto/scatterwalk.h> #include <crypto/hash.h> #include "internal.h" #include <linux/completion.h> #include <linux/err.h> #include <linux/init.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/slab.h> struct gcm_instance_ctx { struct crypto_skcipher_spawn ctr; struct crypto_ahash_spawn ghash; }; struct crypto_gcm_ctx { struct crypto_skcipher *ctr; struct crypto_ahash *ghash; }; struct crypto_rfc4106_ctx { struct crypto_aead *child; u8 nonce[4]; }; struct crypto_rfc4106_req_ctx { struct scatterlist src[3]; struct scatterlist dst[3]; struct aead_request subreq; }; struct crypto_rfc4543_instance_ctx { struct crypto_aead_spawn aead; }; struct crypto_rfc4543_ctx { struct crypto_aead *child; struct crypto_skcipher *null; u8 nonce[4]; }; struct crypto_rfc4543_req_ctx { struct aead_request subreq; }; struct crypto_gcm_ghash_ctx { unsigned int cryptlen; struct scatterlist *src; int (*complete)(struct aead_request *req, u32 flags); }; struct crypto_gcm_req_priv_ctx { u8 iv[16]; u8 auth_tag[16]; u8 iauth_tag[16]; struct scatterlist src[3]; struct scatterlist dst[3]; struct scatterlist sg; struct crypto_gcm_ghash_ctx ghash_ctx; union { struct ahash_request ahreq; struct skcipher_request skreq; } u; }; struct crypto_gcm_setkey_result { int err; struct completion completion; }; static struct { u8 buf[16]; struct scatterlist sg; } *gcm_zeroes; static int crypto_rfc4543_copy_src_to_dst(struct aead_request *req, bool enc); static inline struct crypto_gcm_req_priv_ctx *crypto_gcm_reqctx( struct aead_request *req) { unsigned long align = crypto_aead_alignmask(crypto_aead_reqtfm(req)); return (void *)PTR_ALIGN((u8 *)aead_request_ctx(req), align + 1); } static void crypto_gcm_setkey_done(struct crypto_async_request *req, int err) { struct crypto_gcm_setkey_result *result = req->data; if (err == -EINPROGRESS) { return; } result->err = err; complete(&result->completion); } static int crypto_gcm_setkey(struct crypto_aead *aead, const u8 *key, unsigned int keylen) { struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); struct crypto_ahash *ghash = ctx->ghash; struct crypto_skcipher *ctr = ctx->ctr; struct { be128 hash; u8 iv[16]; struct crypto_gcm_setkey_result result; struct scatterlist sg[1]; struct skcipher_request req; } *data; int err; crypto_skcipher_clear_flags(ctr, CRYPTO_TFM_REQ_MASK); crypto_skcipher_set_flags(ctr, crypto_aead_get_flags(aead) & CRYPTO_TFM_REQ_MASK); err = crypto_skcipher_setkey(ctr, key, keylen); crypto_aead_set_flags(aead, crypto_skcipher_get_flags(ctr) & CRYPTO_TFM_RES_MASK); if (err) { return err; } data = kzalloc(sizeof(*data) + crypto_skcipher_reqsize(ctr), GFP_KERNEL); if (!data) { return -ENOMEM; } init_completion(&data->result.completion); sg_init_one(data->sg, &data->hash, sizeof(data->hash)); skcipher_request_set_tfm(&data->req, ctr); skcipher_request_set_callback(&data->req, CRYPTO_TFM_REQ_MAY_SLEEP | CRYPTO_TFM_REQ_MAY_BACKLOG, crypto_gcm_setkey_done, &data->result); skcipher_request_set_crypt(&data->req, data->sg, data->sg, sizeof(data->hash), data->iv); err = crypto_skcipher_encrypt(&data->req); if (err == -EINPROGRESS || err == -EBUSY) { err = wait_for_completion_interruptible( &data->result.completion); if (!err) { err = data->result.err; } } if (err) { goto out; } crypto_ahash_clear_flags(ghash, CRYPTO_TFM_REQ_MASK); crypto_ahash_set_flags(ghash, crypto_aead_get_flags(aead) & CRYPTO_TFM_REQ_MASK); err = crypto_ahash_setkey(ghash, (u8 *)&data->hash, sizeof(be128)); crypto_aead_set_flags(aead, crypto_ahash_get_flags(ghash) & CRYPTO_TFM_RES_MASK); out: kzfree(data); return err; } static int crypto_gcm_setauthsize(struct crypto_aead *tfm, unsigned int authsize) { switch (authsize) { case 4: case 8: case 12: case 13: case 14: case 15: case 16: break; default: return -EINVAL; } return 0; } static void crypto_gcm_init_common(struct aead_request *req) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); __be32 counter = cpu_to_be32(1); struct scatterlist *sg; memset(pctx->auth_tag, 0, sizeof(pctx->auth_tag)); memcpy(pctx->iv, req->iv, 12); memcpy(pctx->iv + 12, &counter, 4); sg_init_table(pctx->src, 3); sg_set_buf(pctx->src, pctx->auth_tag, sizeof(pctx->auth_tag)); sg = scatterwalk_ffwd(pctx->src + 1, req->src, req->assoclen); if (sg != pctx->src + 1) { sg_chain(pctx->src, 2, sg); } if (req->src != req->dst) { sg_init_table(pctx->dst, 3); sg_set_buf(pctx->dst, pctx->auth_tag, sizeof(pctx->auth_tag)); sg = scatterwalk_ffwd(pctx->dst + 1, req->dst, req->assoclen); if (sg != pctx->dst + 1) { sg_chain(pctx->dst, 2, sg); } } } static void crypto_gcm_init_crypt(struct aead_request *req, unsigned int cryptlen) { struct crypto_aead *aead = crypto_aead_reqtfm(req); struct crypto_gcm_ctx *ctx = crypto_aead_ctx(aead); struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct skcipher_request *skreq = &pctx->u.skreq; struct scatterlist *dst; dst = req->src == req->dst ? pctx->src : pctx->dst; skcipher_request_set_tfm(skreq, ctx->ctr); skcipher_request_set_crypt(skreq, pctx->src, dst, cryptlen + sizeof(pctx->auth_tag), pctx->iv); } static inline unsigned int gcm_remain(unsigned int len) { len &= 0xfU; return len ? 16 - len : 0; } static void gcm_hash_len_done(struct crypto_async_request *areq, int err); static int gcm_hash_update(struct aead_request *req, crypto_completion_t compl, struct scatterlist *src, unsigned int len, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct ahash_request *ahreq = &pctx->u.ahreq; ahash_request_set_callback(ahreq, flags, compl, req); ahash_request_set_crypt(ahreq, src, NULL, len); return crypto_ahash_update(ahreq); } static int gcm_hash_remain(struct aead_request *req, unsigned int remain, crypto_completion_t compl, u32 flags) { return gcm_hash_update(req, compl, &gcm_zeroes->sg, remain, flags); } static int gcm_hash_len(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct ahash_request *ahreq = &pctx->u.ahreq; struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; u128 lengths; lengths.a = cpu_to_be64(req->assoclen * 8); lengths.b = cpu_to_be64(gctx->cryptlen * 8); memcpy(pctx->iauth_tag, &lengths, 16); sg_init_one(&pctx->sg, pctx->iauth_tag, 16); ahash_request_set_callback(ahreq, flags, gcm_hash_len_done, req); ahash_request_set_crypt(ahreq, &pctx->sg, pctx->iauth_tag, sizeof(lengths)); return crypto_ahash_finup(ahreq); } static int gcm_hash_len_continue(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; return gctx->complete(req, flags); } static void gcm_hash_len_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (err) { goto out; } err = gcm_hash_len_continue(req, 0); if (err == -EINPROGRESS) { return; } out: aead_request_complete(req, err); } static int gcm_hash_crypt_remain_continue(struct aead_request *req, u32 flags) { return gcm_hash_len(req, flags) ? : gcm_hash_len_continue(req, flags); } static void gcm_hash_crypt_remain_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (err) { goto out; } err = gcm_hash_crypt_remain_continue(req, 0); if (err == -EINPROGRESS) { return; } out: aead_request_complete(req, err); } static int gcm_hash_crypt_continue(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; unsigned int remain; remain = gcm_remain(gctx->cryptlen); if (remain) return gcm_hash_remain(req, remain, gcm_hash_crypt_remain_done, flags) ? : gcm_hash_crypt_remain_continue(req, flags); return gcm_hash_crypt_remain_continue(req, flags); } static void gcm_hash_crypt_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (err) { goto out; } err = gcm_hash_crypt_continue(req, 0); if (err == -EINPROGRESS) { return; } out: aead_request_complete(req, err); } static int gcm_hash_assoc_remain_continue(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; if (gctx->cryptlen) return gcm_hash_update(req, gcm_hash_crypt_done, gctx->src, gctx->cryptlen, flags) ? : gcm_hash_crypt_continue(req, flags); return gcm_hash_crypt_remain_continue(req, flags); } static void gcm_hash_assoc_remain_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (err) { goto out; } err = gcm_hash_assoc_remain_continue(req, 0); if (err == -EINPROGRESS) { return; } out: aead_request_complete(req, err); } static int gcm_hash_assoc_continue(struct aead_request *req, u32 flags) { unsigned int remain; remain = gcm_remain(req->assoclen); if (remain) return gcm_hash_remain(req, remain, gcm_hash_assoc_remain_done, flags) ? : gcm_hash_assoc_remain_continue(req, flags); return gcm_hash_assoc_remain_continue(req, flags); } static void gcm_hash_assoc_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (err) { goto out; } err = gcm_hash_assoc_continue(req, 0); if (err == -EINPROGRESS) { return; } out: aead_request_complete(req, err); } static int gcm_hash_init_continue(struct aead_request *req, u32 flags) { if (req->assoclen) return gcm_hash_update(req, gcm_hash_assoc_done, req->src, req->assoclen, flags) ? : gcm_hash_assoc_continue(req, flags); return gcm_hash_assoc_remain_continue(req, flags); } static void gcm_hash_init_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (err) { goto out; } err = gcm_hash_init_continue(req, 0); if (err == -EINPROGRESS) { return; } out: aead_request_complete(req, err); } static int gcm_hash(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct ahash_request *ahreq = &pctx->u.ahreq; struct crypto_gcm_ctx *ctx = crypto_aead_ctx(crypto_aead_reqtfm(req)); ahash_request_set_tfm(ahreq, ctx->ghash); ahash_request_set_callback(ahreq, flags, gcm_hash_init_done, req); return crypto_ahash_init(ahreq) ? : gcm_hash_init_continue(req, flags); } static int gcm_enc_copy_hash(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct crypto_aead *aead = crypto_aead_reqtfm(req); u8 *auth_tag = pctx->auth_tag; crypto_xor(auth_tag, pctx->iauth_tag, 16); scatterwalk_map_and_copy(auth_tag, req->dst, req->assoclen + req->cryptlen, crypto_aead_authsize(aead), 1); return 0; } static int gcm_encrypt_continue(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; gctx->src = sg_next(req->src == req->dst ? pctx->src : pctx->dst); gctx->cryptlen = req->cryptlen; gctx->complete = gcm_enc_copy_hash; return gcm_hash(req, flags); } static void gcm_encrypt_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (err) { goto out; } err = gcm_encrypt_continue(req, 0); if (err == -EINPROGRESS) { return; } out: aead_request_complete(req, err); } static int crypto_gcm_encrypt(struct aead_request *req) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct skcipher_request *skreq = &pctx->u.skreq; u32 flags = aead_request_flags(req); crypto_gcm_init_common(req); crypto_gcm_init_crypt(req, req->cryptlen); skcipher_request_set_callback(skreq, flags, gcm_encrypt_done, req); return crypto_skcipher_encrypt(skreq) ? : gcm_encrypt_continue(req, flags); } static int crypto_gcm_verify(struct aead_request *req) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct crypto_aead *aead = crypto_aead_reqtfm(req); u8 *auth_tag = pctx->auth_tag; u8 *iauth_tag = pctx->iauth_tag; unsigned int authsize = crypto_aead_authsize(aead); unsigned int cryptlen = req->cryptlen - authsize; crypto_xor(auth_tag, iauth_tag, 16); scatterwalk_map_and_copy(iauth_tag, req->src, req->assoclen + cryptlen, authsize, 0); return crypto_memneq(iauth_tag, auth_tag, authsize) ? -EBADMSG : 0; } static void gcm_decrypt_done(struct crypto_async_request *areq, int err) { struct aead_request *req = areq->data; if (!err) { err = crypto_gcm_verify(req); } aead_request_complete(req, err); } static int gcm_dec_hash_continue(struct aead_request *req, u32 flags) { struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct skcipher_request *skreq = &pctx->u.skreq; struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; crypto_gcm_init_crypt(req, gctx->cryptlen); skcipher_request_set_callback(skreq, flags, gcm_decrypt_done, req); return crypto_skcipher_decrypt(skreq) ? : crypto_gcm_verify(req); } static int crypto_gcm_decrypt(struct aead_request *req) { struct crypto_aead *aead = crypto_aead_reqtfm(req); struct crypto_gcm_req_priv_ctx *pctx = crypto_gcm_reqctx(req); struct crypto_gcm_ghash_ctx *gctx = &pctx->ghash_ctx; unsigned int authsize = crypto_aead_authsize(aead); unsigned int cryptlen = req->cryptlen; u32 flags = aead_request_flags(req); cryptlen -= authsize; crypto_gcm_init_common(req); gctx->src = sg_next(pctx->src); gctx->cryptlen = cryptlen; gctx->complete = gcm_dec_hash_continue; return gcm_hash(req, flags); } static int crypto_gcm_init_tfm(struct crypto_aead *tfm) { struct aead_instance *inst = aead_alg_instance(tfm); struct gcm_instance_ctx *ictx = aead_instance_ctx(inst); struct crypto_gcm_ctx *ctx = crypto_aead_ctx(tfm); struct crypto_skcipher *ctr; struct crypto_ahash *ghash; unsigned long align; int err; ghash = crypto_spawn_ahash(&ictx->ghash); if (IS_ERR(ghash)) { return PTR_ERR(ghash); } ctr = crypto_spawn_skcipher2(&ictx->ctr); err = PTR_ERR(ctr); if (IS_ERR(ctr)) { goto err_free_hash; } ctx->ctr = ctr; ctx->ghash = ghash; align = crypto_aead_alignmask(tfm); align &= ~(crypto_tfm_ctx_alignment() - 1); crypto_aead_set_reqsize(tfm, align + offsetof(struct crypto_gcm_req_priv_ctx, u) + max(sizeof(struct skcipher_request) + crypto_skcipher_reqsize(ctr), sizeof(struct ahash_request) + crypto_ahash_reqsize(ghash))); return 0; err_free_hash: crypto_free_ahash(ghash); return err; } static void crypto_gcm_exit_tfm(struct crypto_aead *tfm) { struct crypto_gcm_ctx *ctx = crypto_aead_ctx(tfm); crypto_free_ahash(ctx->ghash); crypto_free_skcipher(ctx->ctr); } static void crypto_gcm_free(struct aead_instance *inst) { struct gcm_instance_ctx *ctx = aead_instance_ctx(inst); crypto_drop_skcipher(&ctx->ctr); crypto_drop_ahash(&ctx->ghash); kfree(inst); } static int crypto_gcm_create_common(struct crypto_template *tmpl, struct rtattr **tb, const char *full_name, const char *ctr_name, const char *ghash_name) { struct crypto_attr_type *algt; struct aead_instance *inst; struct skcipher_alg *ctr; struct crypto_alg *ghash_alg; struct hash_alg_common *ghash; struct gcm_instance_ctx *ctx; int err; algt = crypto_get_attr_type(tb); if (IS_ERR(algt)) { return PTR_ERR(algt); } if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask) { return -EINVAL; } ghash_alg = crypto_find_alg(ghash_name, &crypto_ahash_type, CRYPTO_ALG_TYPE_HASH, CRYPTO_ALG_TYPE_AHASH_MASK | crypto_requires_sync(algt->type, algt->mask)); if (IS_ERR(ghash_alg)) { return PTR_ERR(ghash_alg); } ghash = __crypto_hash_alg_common(ghash_alg); err = -ENOMEM; inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); if (!inst) { goto out_put_ghash; } ctx = aead_instance_ctx(inst); err = crypto_init_ahash_spawn(&ctx->ghash, ghash, aead_crypto_instance(inst)); if (err) { goto err_free_inst; } err = -EINVAL; if (ghash->digestsize != 16) { goto err_drop_ghash; } crypto_set_skcipher_spawn(&ctx->ctr, aead_crypto_instance(inst)); err = crypto_grab_skcipher2(&ctx->ctr, ctr_name, 0, crypto_requires_sync(algt->type, algt->mask)); if (err) { goto err_drop_ghash; } ctr = crypto_spawn_skcipher_alg(&ctx->ctr); /* We only support 16-byte blocks. */ if (crypto_skcipher_alg_ivsize(ctr) != 16) { goto out_put_ctr; } /* Not a stream cipher? */ err = -EINVAL; if (ctr->base.cra_blocksize != 1) { goto out_put_ctr; } err = -ENAMETOOLONG; if (snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "gcm_base(%s,%s)", ctr->base.cra_driver_name, ghash_alg->cra_driver_name) >= CRYPTO_MAX_ALG_NAME) { goto out_put_ctr; } memcpy(inst->alg.base.cra_name, full_name, CRYPTO_MAX_ALG_NAME); inst->alg.base.cra_flags = (ghash->base.cra_flags | ctr->base.cra_flags) & CRYPTO_ALG_ASYNC; inst->alg.base.cra_priority = (ghash->base.cra_priority + ctr->base.cra_priority) / 2; inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_alignmask = ghash->base.cra_alignmask | ctr->base.cra_alignmask; inst->alg.base.cra_ctxsize = sizeof(struct crypto_gcm_ctx); inst->alg.ivsize = 12; inst->alg.chunksize = crypto_skcipher_alg_chunksize(ctr); inst->alg.maxauthsize = 16; inst->alg.init = crypto_gcm_init_tfm; inst->alg.exit = crypto_gcm_exit_tfm; inst->alg.setkey = crypto_gcm_setkey; inst->alg.setauthsize = crypto_gcm_setauthsize; inst->alg.encrypt = crypto_gcm_encrypt; inst->alg.decrypt = crypto_gcm_decrypt; inst->free = crypto_gcm_free; err = aead_register_instance(tmpl, inst); if (err) { goto out_put_ctr; } out_put_ghash: crypto_mod_put(ghash_alg); return err; out_put_ctr: crypto_drop_skcipher(&ctx->ctr); err_drop_ghash: crypto_drop_ahash(&ctx->ghash); err_free_inst: kfree(inst); goto out_put_ghash; } static int crypto_gcm_create(struct crypto_template *tmpl, struct rtattr **tb) { const char *cipher_name; char ctr_name[CRYPTO_MAX_ALG_NAME]; char full_name[CRYPTO_MAX_ALG_NAME]; cipher_name = crypto_attr_alg_name(tb[1]); if (IS_ERR(cipher_name)) { return PTR_ERR(cipher_name); } if (snprintf(ctr_name, CRYPTO_MAX_ALG_NAME, "ctr(%s)", cipher_name) >= CRYPTO_MAX_ALG_NAME) { return -ENAMETOOLONG; } if (snprintf(full_name, CRYPTO_MAX_ALG_NAME, "gcm(%s)", cipher_name) >= CRYPTO_MAX_ALG_NAME) { return -ENAMETOOLONG; } return crypto_gcm_create_common(tmpl, tb, full_name, ctr_name, "ghash"); } static struct crypto_template crypto_gcm_tmpl = { .name = "gcm", .create = crypto_gcm_create, .module = THIS_MODULE, }; static int crypto_gcm_base_create(struct crypto_template *tmpl, struct rtattr **tb) { const char *ctr_name; const char *ghash_name; char full_name[CRYPTO_MAX_ALG_NAME]; ctr_name = crypto_attr_alg_name(tb[1]); if (IS_ERR(ctr_name)) { return PTR_ERR(ctr_name); } ghash_name = crypto_attr_alg_name(tb[2]); if (IS_ERR(ghash_name)) { return PTR_ERR(ghash_name); } if (snprintf(full_name, CRYPTO_MAX_ALG_NAME, "gcm_base(%s,%s)", ctr_name, ghash_name) >= CRYPTO_MAX_ALG_NAME) { return -ENAMETOOLONG; } return crypto_gcm_create_common(tmpl, tb, full_name, ctr_name, ghash_name); } static struct crypto_template crypto_gcm_base_tmpl = { .name = "gcm_base", .create = crypto_gcm_base_create, .module = THIS_MODULE, }; static int crypto_rfc4106_setkey(struct crypto_aead *parent, const u8 *key, unsigned int keylen) { struct crypto_rfc4106_ctx *ctx = crypto_aead_ctx(parent); struct crypto_aead *child = ctx->child; int err; if (keylen < 4) { return -EINVAL; } keylen -= 4; memcpy(ctx->nonce, key + keylen, 4); crypto_aead_clear_flags(child, CRYPTO_TFM_REQ_MASK); crypto_aead_set_flags(child, crypto_aead_get_flags(parent) & CRYPTO_TFM_REQ_MASK); err = crypto_aead_setkey(child, key, keylen); crypto_aead_set_flags(parent, crypto_aead_get_flags(child) & CRYPTO_TFM_RES_MASK); return err; } static int crypto_rfc4106_setauthsize(struct crypto_aead *parent, unsigned int authsize) { struct crypto_rfc4106_ctx *ctx = crypto_aead_ctx(parent); switch (authsize) { case 8: case 12: case 16: break; default: return -EINVAL; } return crypto_aead_setauthsize(ctx->child, authsize); } static struct aead_request *crypto_rfc4106_crypt(struct aead_request *req) { struct crypto_rfc4106_req_ctx *rctx = aead_request_ctx(req); struct crypto_aead *aead = crypto_aead_reqtfm(req); struct crypto_rfc4106_ctx *ctx = crypto_aead_ctx(aead); struct aead_request *subreq = &rctx->subreq; struct crypto_aead *child = ctx->child; struct scatterlist *sg; u8 *iv = PTR_ALIGN((u8 *)(subreq + 1) + crypto_aead_reqsize(child), crypto_aead_alignmask(child) + 1); scatterwalk_map_and_copy(iv + 12, req->src, 0, req->assoclen - 8, 0); memcpy(iv, ctx->nonce, 4); memcpy(iv + 4, req->iv, 8); sg_init_table(rctx->src, 3); sg_set_buf(rctx->src, iv + 12, req->assoclen - 8); sg = scatterwalk_ffwd(rctx->src + 1, req->src, req->assoclen); if (sg != rctx->src + 1) { sg_chain(rctx->src, 2, sg); } if (req->src != req->dst) { sg_init_table(rctx->dst, 3); sg_set_buf(rctx->dst, iv + 12, req->assoclen - 8); sg = scatterwalk_ffwd(rctx->dst + 1, req->dst, req->assoclen); if (sg != rctx->dst + 1) { sg_chain(rctx->dst, 2, sg); } } aead_request_set_tfm(subreq, child); aead_request_set_callback(subreq, req->base.flags, req->base.complete, req->base.data); aead_request_set_crypt(subreq, rctx->src, req->src == req->dst ? rctx->src : rctx->dst, req->cryptlen, iv); aead_request_set_ad(subreq, req->assoclen - 8); return subreq; } static int crypto_rfc4106_encrypt(struct aead_request *req) { if (req->assoclen != 16 && req->assoclen != 20) { return -EINVAL; } req = crypto_rfc4106_crypt(req); return crypto_aead_encrypt(req); } static int crypto_rfc4106_decrypt(struct aead_request *req) { if (req->assoclen != 16 && req->assoclen != 20) { return -EINVAL; } req = crypto_rfc4106_crypt(req); return crypto_aead_decrypt(req); } static int crypto_rfc4106_init_tfm(struct crypto_aead *tfm) { struct aead_instance *inst = aead_alg_instance(tfm); struct crypto_aead_spawn *spawn = aead_instance_ctx(inst); struct crypto_rfc4106_ctx *ctx = crypto_aead_ctx(tfm); struct crypto_aead *aead; unsigned long align; aead = crypto_spawn_aead(spawn); if (IS_ERR(aead)) { return PTR_ERR(aead); } ctx->child = aead; align = crypto_aead_alignmask(aead); align &= ~(crypto_tfm_ctx_alignment() - 1); crypto_aead_set_reqsize( tfm, sizeof(struct crypto_rfc4106_req_ctx) + ALIGN(crypto_aead_reqsize(aead), crypto_tfm_ctx_alignment()) + align + 24); return 0; } static void crypto_rfc4106_exit_tfm(struct crypto_aead *tfm) { struct crypto_rfc4106_ctx *ctx = crypto_aead_ctx(tfm); crypto_free_aead(ctx->child); } static void crypto_rfc4106_free(struct aead_instance *inst) { crypto_drop_aead(aead_instance_ctx(inst)); kfree(inst); } static int crypto_rfc4106_create(struct crypto_template *tmpl, struct rtattr **tb) { struct crypto_attr_type *algt; struct aead_instance *inst; struct crypto_aead_spawn *spawn; struct aead_alg *alg; const char *ccm_name; int err; algt = crypto_get_attr_type(tb); if (IS_ERR(algt)) { return PTR_ERR(algt); } if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask) { return -EINVAL; } ccm_name = crypto_attr_alg_name(tb[1]); if (IS_ERR(ccm_name)) { return PTR_ERR(ccm_name); } inst = kzalloc(sizeof(*inst) + sizeof(*spawn), GFP_KERNEL); if (!inst) { return -ENOMEM; } spawn = aead_instance_ctx(inst); crypto_set_aead_spawn(spawn, aead_crypto_instance(inst)); err = crypto_grab_aead(spawn, ccm_name, 0, crypto_requires_sync(algt->type, algt->mask)); if (err) { goto out_free_inst; } alg = crypto_spawn_aead_alg(spawn); err = -EINVAL; /* Underlying IV size must be 12. */ if (crypto_aead_alg_ivsize(alg) != 12) { goto out_drop_alg; } /* Not a stream cipher? */ if (alg->base.cra_blocksize != 1) { goto out_drop_alg; } err = -ENAMETOOLONG; if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, "rfc4106(%s)", alg->base.cra_name) >= CRYPTO_MAX_ALG_NAME || snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "rfc4106(%s)", alg->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME) { goto out_drop_alg; } inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_priority = alg->base.cra_priority; inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_alignmask = alg->base.cra_alignmask; inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc4106_ctx); inst->alg.ivsize = 8; inst->alg.chunksize = crypto_aead_alg_chunksize(alg); inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg); inst->alg.init = crypto_rfc4106_init_tfm; inst->alg.exit = crypto_rfc4106_exit_tfm; inst->alg.setkey = crypto_rfc4106_setkey; inst->alg.setauthsize = crypto_rfc4106_setauthsize; inst->alg.encrypt = crypto_rfc4106_encrypt; inst->alg.decrypt = crypto_rfc4106_decrypt; inst->free = crypto_rfc4106_free; err = aead_register_instance(tmpl, inst); if (err) { goto out_drop_alg; } out: return err; out_drop_alg: crypto_drop_aead(spawn); out_free_inst: kfree(inst); goto out; } static struct crypto_template crypto_rfc4106_tmpl = { .name = "rfc4106", .create = crypto_rfc4106_create, .module = THIS_MODULE, }; static int crypto_rfc4543_setkey(struct crypto_aead *parent, const u8 *key, unsigned int keylen) { struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(parent); struct crypto_aead *child = ctx->child; int err; if (keylen < 4) { return -EINVAL; } keylen -= 4; memcpy(ctx->nonce, key + keylen, 4); crypto_aead_clear_flags(child, CRYPTO_TFM_REQ_MASK); crypto_aead_set_flags(child, crypto_aead_get_flags(parent) & CRYPTO_TFM_REQ_MASK); err = crypto_aead_setkey(child, key, keylen); crypto_aead_set_flags(parent, crypto_aead_get_flags(child) & CRYPTO_TFM_RES_MASK); return err; } static int crypto_rfc4543_setauthsize(struct crypto_aead *parent, unsigned int authsize) { struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(parent); if (authsize != 16) { return -EINVAL; } return crypto_aead_setauthsize(ctx->child, authsize); } static int crypto_rfc4543_crypt(struct aead_request *req, bool enc) { struct crypto_aead *aead = crypto_aead_reqtfm(req); struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(aead); struct crypto_rfc4543_req_ctx *rctx = aead_request_ctx(req); struct aead_request *subreq = &rctx->subreq; unsigned int authsize = crypto_aead_authsize(aead); u8 *iv = PTR_ALIGN((u8 *)(rctx + 1) + crypto_aead_reqsize(ctx->child), crypto_aead_alignmask(ctx->child) + 1); int err; if (req->src != req->dst) { err = crypto_rfc4543_copy_src_to_dst(req, enc); if (err) { return err; } } memcpy(iv, ctx->nonce, 4); memcpy(iv + 4, req->iv, 8); aead_request_set_tfm(subreq, ctx->child); aead_request_set_callback(subreq, req->base.flags, req->base.complete, req->base.data); aead_request_set_crypt(subreq, req->src, req->dst, enc ? 0 : authsize, iv); aead_request_set_ad(subreq, req->assoclen + req->cryptlen - subreq->cryptlen); return enc ? crypto_aead_encrypt(subreq) : crypto_aead_decrypt(subreq); } static int crypto_rfc4543_copy_src_to_dst(struct aead_request *req, bool enc) { struct crypto_aead *aead = crypto_aead_reqtfm(req); struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(aead); unsigned int authsize = crypto_aead_authsize(aead); unsigned int nbytes = req->assoclen + req->cryptlen - (enc ? 0 : authsize); SKCIPHER_REQUEST_ON_STACK(nreq, ctx->null); skcipher_request_set_tfm(nreq, ctx->null); skcipher_request_set_callback(nreq, req->base.flags, NULL, NULL); skcipher_request_set_crypt(nreq, req->src, req->dst, nbytes, NULL); return crypto_skcipher_encrypt(nreq); } static int crypto_rfc4543_encrypt(struct aead_request *req) { return crypto_rfc4543_crypt(req, true); } static int crypto_rfc4543_decrypt(struct aead_request *req) { return crypto_rfc4543_crypt(req, false); } static int crypto_rfc4543_init_tfm(struct crypto_aead *tfm) { struct aead_instance *inst = aead_alg_instance(tfm); struct crypto_rfc4543_instance_ctx *ictx = aead_instance_ctx(inst); struct crypto_aead_spawn *spawn = &ictx->aead; struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(tfm); struct crypto_aead *aead; struct crypto_skcipher *null; unsigned long align; int err = 0; aead = crypto_spawn_aead(spawn); if (IS_ERR(aead)) { return PTR_ERR(aead); } null = crypto_get_default_null_skcipher2(); err = PTR_ERR(null); if (IS_ERR(null)) { goto err_free_aead; } ctx->child = aead; ctx->null = null; align = crypto_aead_alignmask(aead); align &= ~(crypto_tfm_ctx_alignment() - 1); crypto_aead_set_reqsize( tfm, sizeof(struct crypto_rfc4543_req_ctx) + ALIGN(crypto_aead_reqsize(aead), crypto_tfm_ctx_alignment()) + align + 12); return 0; err_free_aead: crypto_free_aead(aead); return err; } static void crypto_rfc4543_exit_tfm(struct crypto_aead *tfm) { struct crypto_rfc4543_ctx *ctx = crypto_aead_ctx(tfm); crypto_free_aead(ctx->child); crypto_put_default_null_skcipher2(); } static void crypto_rfc4543_free(struct aead_instance *inst) { struct crypto_rfc4543_instance_ctx *ctx = aead_instance_ctx(inst); crypto_drop_aead(&ctx->aead); kfree(inst); } static int crypto_rfc4543_create(struct crypto_template *tmpl, struct rtattr **tb) { struct crypto_attr_type *algt; struct aead_instance *inst; struct crypto_aead_spawn *spawn; struct aead_alg *alg; struct crypto_rfc4543_instance_ctx *ctx; const char *ccm_name; int err; algt = crypto_get_attr_type(tb); if (IS_ERR(algt)) { return PTR_ERR(algt); } if ((algt->type ^ CRYPTO_ALG_TYPE_AEAD) & algt->mask) { return -EINVAL; } ccm_name = crypto_attr_alg_name(tb[1]); if (IS_ERR(ccm_name)) { return PTR_ERR(ccm_name); } inst = kzalloc(sizeof(*inst) + sizeof(*ctx), GFP_KERNEL); if (!inst) { return -ENOMEM; } ctx = aead_instance_ctx(inst); spawn = &ctx->aead; crypto_set_aead_spawn(spawn, aead_crypto_instance(inst)); err = crypto_grab_aead(spawn, ccm_name, 0, crypto_requires_sync(algt->type, algt->mask)); if (err) { goto out_free_inst; } alg = crypto_spawn_aead_alg(spawn); err = -EINVAL; /* Underlying IV size must be 12. */ if (crypto_aead_alg_ivsize(alg) != 12) { goto out_drop_alg; } /* Not a stream cipher? */ if (alg->base.cra_blocksize != 1) { goto out_drop_alg; } err = -ENAMETOOLONG; if (snprintf(inst->alg.base.cra_name, CRYPTO_MAX_ALG_NAME, "rfc4543(%s)", alg->base.cra_name) >= CRYPTO_MAX_ALG_NAME || snprintf(inst->alg.base.cra_driver_name, CRYPTO_MAX_ALG_NAME, "rfc4543(%s)", alg->base.cra_driver_name) >= CRYPTO_MAX_ALG_NAME) { goto out_drop_alg; } inst->alg.base.cra_flags = alg->base.cra_flags & CRYPTO_ALG_ASYNC; inst->alg.base.cra_priority = alg->base.cra_priority; inst->alg.base.cra_blocksize = 1; inst->alg.base.cra_alignmask = alg->base.cra_alignmask; inst->alg.base.cra_ctxsize = sizeof(struct crypto_rfc4543_ctx); inst->alg.ivsize = 8; inst->alg.chunksize = crypto_aead_alg_chunksize(alg); inst->alg.maxauthsize = crypto_aead_alg_maxauthsize(alg); inst->alg.init = crypto_rfc4543_init_tfm; inst->alg.exit = crypto_rfc4543_exit_tfm; inst->alg.setkey = crypto_rfc4543_setkey; inst->alg.setauthsize = crypto_rfc4543_setauthsize; inst->alg.encrypt = crypto_rfc4543_encrypt; inst->alg.decrypt = crypto_rfc4543_decrypt; inst->free = crypto_rfc4543_free, err = aead_register_instance(tmpl, inst); if (err) { goto out_drop_alg; } out: return err; out_drop_alg: crypto_drop_aead(spawn); out_free_inst: kfree(inst); goto out; } static struct crypto_template crypto_rfc4543_tmpl = { .name = "rfc4543", .create = crypto_rfc4543_create, .module = THIS_MODULE, }; static int __init crypto_gcm_module_init(void) { int err; gcm_zeroes = kzalloc(sizeof(*gcm_zeroes), GFP_KERNEL); if (!gcm_zeroes) { return -ENOMEM; } sg_init_one(&gcm_zeroes->sg, gcm_zeroes->buf, sizeof(gcm_zeroes->buf)); err = crypto_register_template(&crypto_gcm_base_tmpl); if (err) { goto out; } err = crypto_register_template(&crypto_gcm_tmpl); if (err) { goto out_undo_base; } err = crypto_register_template(&crypto_rfc4106_tmpl); if (err) { goto out_undo_gcm; } err = crypto_register_template(&crypto_rfc4543_tmpl); if (err) { goto out_undo_rfc4106; } return 0; out_undo_rfc4106: crypto_unregister_template(&crypto_rfc4106_tmpl); out_undo_gcm: crypto_unregister_template(&crypto_gcm_tmpl); out_undo_base: crypto_unregister_template(&crypto_gcm_base_tmpl); out: kfree(gcm_zeroes); return err; } static void __exit crypto_gcm_module_exit(void) { kfree(gcm_zeroes); crypto_unregister_template(&crypto_rfc4543_tmpl); crypto_unregister_template(&crypto_rfc4106_tmpl); crypto_unregister_template(&crypto_gcm_tmpl); crypto_unregister_template(&crypto_gcm_base_tmpl); } module_init(crypto_gcm_module_init); module_exit(crypto_gcm_module_exit); MODULE_LICENSE("GPL"); MODULE_DESCRIPTION("Galois/Counter Mode"); MODULE_AUTHOR("Mikko Herranen <mh1@iki.fi>"); MODULE_ALIAS_CRYPTO("gcm_base"); MODULE_ALIAS_CRYPTO("rfc4106"); MODULE_ALIAS_CRYPTO("rfc4543"); MODULE_ALIAS_CRYPTO("gcm");
williamfdevine/PrettyLinux
crypto/gcm.c
C
gpl-3.0
34,596
/* Copyright 2015 Anton Seliverstov (seliverstov.ad@ya.ru) This file is part of Apps. Apps 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. Apps 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 Apps. If not, see <http://www.gnu.org/licenses/>. */ #include <signal.h> #include <iostream> #include <string> #include <thread> #include "KeyboardReader.h" #include "MenuManager.h" #include "AppsException.h" using namespace Apps; MenuManager *menu = NULL; KeyboardReader *keyBoardReader = NULL; thread *keyBoardReaderThread = NULL; void quitproc(int parameter); int main() { signal(SIGINT, quitproc); signal(SIGHUP, quitproc); signal(SIGQUIT, quitproc); try { menu = new MenuManager(); keyBoardReader = new KeyboardReader(std::bind(&MenuManager::processKey, menu, std::placeholders::_1)); keyBoardReaderThread = new thread(&KeyboardReader::run, keyBoardReader); if (keyBoardReaderThread->joinable()) keyBoardReaderThread->join(); } catch( const AppsException& e ) { quitproc(0); if(e.severity() == EXCEPTION_INFO && e.message() == EXCEPTION_MSG_FINISHED) return 0; else return 1; } catch( const std::invalid_argument& e ) { std::cout << e.what() << endl; quitproc(0); } catch( ... ) { quitproc(0); } quitproc(0); return 0; } void quitproc(int parameter) { try{ if (keyBoardReaderThread) { if (keyBoardReaderThread->joinable()) keyBoardReaderThread->join(); delete keyBoardReaderThread; } }catch(...){} if (keyBoardReader) delete keyBoardReader; if (menu) delete menu; exit(0); }
anton-seliverstov/Apps
src/Main.cpp
C++
gpl-3.0
2,219
#include "swod/annotation.hpp" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include <map> #include <sstream> #include <iostream> using std::string; using std::stringstream; using std::map; using std::cout; using std::endl; using namespace cv; namespace { string getFileName(const string & filePath) { size_t slashPos = filePath.rfind("/"); string fileName = filePath; if (slashPos != string::npos) { fileName = filePath.substr(slashPos + 1); } return fileName; } void generateColors(map<int, Scalar> & colors) { colors[0] = CV_RGB(0, 0, 255); colors[1] = CV_RGB(0, 255, 0); colors[2] = CV_RGB(255, 0, 0); colors[3] = CV_RGB(0, 255, 255); colors[4] = CV_RGB(255, 0, 255); } void addRandomColor(map<int, Scalar> & colors, int n) { RNG & rng = theRNG(); colors[n] = CV_RGB(uchar(rng), uchar(rng), uchar(rng)); } } int main(int argc, char ** argv) { if (argc != 3) { cout << "usage\n\t./draw annotation outputDir" << endl; return 1; } string annPath = argv[1]; string outputDirPath = argv[2]; vector<ImageAnnotation> ann; loadDatasetAnnotation(annPath, "annotation", ann); map<int, Scalar> colors; generateColors(colors); for (size_t i = 0; i < ann.size(); ++i) { string imagePath = ann[i].sources[DataTypeTime("image", 0)]; Mat image = imread(imagePath); for (size_t j = 0; j < ann[i].bboxes.size(); ++j) { int label = ann[i].labels[j]; if (colors.count(label) == 0) { addRandomColor(colors, label); } rectangle(image, ann[i].bboxes[j], colors.at(label), 2); } stringstream s; s << outputDirPath << getFileName(imagePath); imwrite(s.str(), image); } return 0; }
druzhkov-paul/swod
apps/draw.cpp
C++
gpl-3.0
1,956
package com.nativedevelopment.smartgrid; import java.io.Serializable; import java.util.HashMap; import java.util.Map; import java.util.UUID; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Settings implements ISettings { protected static final String REGX_STRING = "\"((\\.|[^\"])*)\"\\s*"; protected static final String REGX_INTEGER = "(-?\\d+)\\s*"; protected static final String REGX_REAL = "(-?\\d*(.\\d|\\d.|\\d)\\d*)\\s*"; protected static final String REGX_BOOLEAN = "(true|false)\\s*"; protected static final String REGX_NULL = "(null)\\s*"; private static final int MATCH_GROUP = 1; protected static final Pattern a_oStringPattern = Pattern.compile(REGX_STRING); protected static final Pattern a_oIntegerPattern = Pattern.compile(REGX_INTEGER); protected static final Pattern a_oRealPattern = Pattern.compile(REGX_REAL); protected static final Pattern a_oBooleanPattern = Pattern.compile(REGX_BOOLEAN); protected static final Pattern a_oNullPattern = Pattern.compile(REGX_NULL); private Map<String, Serializable> a_lSettings = null; private UUID a_oIdentifier = null; private String a_sKeyPrefix = null; public Settings(UUID oIdentifier) { if(oIdentifier == null) { oIdentifier = UUID.randomUUID(); } a_oIdentifier = oIdentifier; a_lSettings = new HashMap<>(); a_sKeyPrefix = ""; } public UUID GetIdentifier() { return a_oIdentifier; } public String GetString(String sSetting) { return String.valueOf(Get(sSetting)); } public Serializable Get(String sSetting) { String sKey = a_sKeyPrefix + sSetting.toLowerCase(); if(!a_lSettings.containsKey(sKey)) { return null; } return a_lSettings.get(sKey); } public void Set(String sSetting, Serializable oValue) { a_lSettings.put(a_sKeyPrefix + sSetting.toLowerCase(), oValue); } public void SetSpecial(String sSetting, String sValue) { //TODO dirty and lazy way, improve to be proper use a automata mannager Matcher oStringMatcher = a_oStringPattern.matcher(sValue); Matcher oIntegerMatcher = a_oIntegerPattern.matcher(sValue); Matcher oRealMatcher = a_oRealPattern.matcher(sValue); Matcher oBooleanMatcher = a_oBooleanPattern.matcher(sValue); Matcher oNullMatcher = a_oNullPattern.matcher(sValue); System.out.printf("_WARNING: [Settings.SetSpecial] simple and lazy implementation.\n"); Serializable oSetting = sValue; if (oStringMatcher.matches()) { oSetting = oStringMatcher.group(MATCH_GROUP); } else if (oIntegerMatcher.matches()) { oSetting = Integer.valueOf(oIntegerMatcher.group(MATCH_GROUP)); } else if (oRealMatcher.matches()) { oSetting = Double.valueOf(oRealMatcher.group(MATCH_GROUP)); } else if (oBooleanMatcher.matches()) { oSetting = Boolean.valueOf(oBooleanMatcher.group(MATCH_GROUP)); } else if (oNullMatcher.matches()) { oSetting = null; } Set(sSetting, oSetting); } @Override public void SetKeyPrefix(String sKeyPrefix) { // TODO be careful when accessing using threads, make thread save. if (sKeyPrefix == null) { sKeyPrefix = ""; } a_sKeyPrefix = sKeyPrefix.toLowerCase(); } public Iterable<Map.Entry<String,Serializable>> GetAll() { return a_lSettings.entrySet(); } }
RealRandyWind/communitysmartgrid
src/com/nativedevelopment/smartgrid/Settings.java
Java
gpl-3.0
3,515
package com.grandhunterman.definitelynotvanillaminecraft.proxy; public interface IProxy { public void registerRenders(); }
GrandHunterMan/DefinitelyNotVanillaMinecraft
src/main/java/com/grandhunterman/definitelynotvanillaminecraft/proxy/IProxy.java
Java
gpl-3.0
130
package com.matejdro.wearvibrationcenter.logging; import com.crashlytics.android.Crashlytics; import timber.log.Timber; public class TimberCrashlytics extends Timber.Tree { @Override protected void log(int priority, String tag, String message, Throwable t) { if (t != null) { Crashlytics.log(priority, tag, message); Crashlytics.logException(t); } } }
matejdro/WearVibrationCenter
mobile/src/main/java/com/matejdro/wearvibrationcenter/logging/TimberCrashlytics.java
Java
gpl-3.0
407
#!/bin/bash -x # exit on error set -e # start admin app cd ../admin && npm start > server.admin.log 2>&1 & # start pupil-auth service cd ../pupil-auth && npm start > server.auth.log 2>&1 & # start pupil app npm start & PID=$! MSG='pupil-spa app is running under process ' MSG+=${PID} echo ${MSG} sleep 30 cd test rake parallel NODES=6 GROUP_SIZE=16 OPTS='-t @check,@event_auditing,@feedback,@header_footer,@instructions' CUCUMBER_EXIT_CODE=$? kill -9 ${PID} exit ${CUCUMBER_EXIT_CODE}
DFEAGILEDEVOPS/MTC
pupil-spa/test.sh
Shell
gpl-3.0
493
#################################################### ### User definable stuff #Behavior options USE_MPI = yes #Use MPI parallelization? Set to "yes" or "no" DEFINEOPTIONS = -D_VERBOSE #Comment out for more explicit output DEFINEOPTIONS += -D_HAVE_OMP #Comment this out if you don't have the OpenMP headers #DEFINEOPTIONS += -D_DEBUG #Only used for debugging #DEFINEOPTIONS += -D_TRUE_ACOS #Comment this out if you don't want to use an approximate arccosine DEFINEOPTIONS += -D_WITH_WEIGHTS #Comment this out if you want weighed galaxies #GSL options GSL_INC = /home/alonso/include GSL_LIB = /home/alonso/lib #CUDA options #Monopole - maximum radius in Mpc/h R_MAX = 150. #Angular CF - maximum radius in deg THETA_MAX = 10. #3D CF (binning in sigma-pi) - maximum radial and transverse distances in Mpc/h RL_MAX = 150. RT_MAX = 150. #3D CF (binning in r-mu) - maximum radius in Mpc/h R3D_MAX = 150. #Logarithmic binning - comment out if you want linear binning DEFINEOPTIONS += -D_LOGBIN #Number of bins per decade N_LOGINT = 10 #Number of bins per dimension for 2D histograms NB_H2D = 64 OPT_PRECISION = -ftz=true -prec-div=false -prec-sqrt=false CUDADIR = /usr/local/cuda ### End of user-definable stuff #################################################### LGSL = -L$(GSL_LIB) -lgsl -lgslcblas # DEFINES for the OpenMP version DEFINEFLAGSCPU = $(DEFINEOPTIONS) #DEFINES for the CUDA version I_R_MAX = $(shell echo "scale=5;1./$(R_MAX)" | bc) I_THETA_MAX = $(shell echo "scale=5;57.29578/$(THETA_MAX)" | bc) I_RL_MAX = $(shell echo "scale=5;1./$(RL_MAX)" | bc) I_RT_MAX = $(shell echo "scale=5;1./$(RT_MAX)" | bc) I_R3D_MAX = $(shell echo "scale=5;1./$(R3D_MAX)" | bc) LOG_R_MAX = $(shell echo "scale=9;l($(R_MAX))/l(10)" | bc -l) LOG_TH_MAX = $(shell echo "scale=9;l($(THETA_MAX))/l(10)-1.75812263" | bc -l) LOG_R3D_MAX = $(shell echo "scale=9;l($(R3D_MAX))/l(10)" | bc -l) DEFINEFLAGSGPU = $(DEFINEOPTIONS) DEFINEFLAGSGPU += -DI_R_MAX=$(I_R_MAX) -DLOG_R_MAX=$(LOG_R_MAX) DEFINEFLAGSGPU += -DI_THETA_MAX=$(I_THETA_MAX) -DLOG_TH_MAX=$(LOG_TH_MAX) DEFINEFLAGSGPU += -DI_RL_MAX=$(I_RL_MAX) -DI_RT_MAX=$(I_RT_MAX) DEFINEFLAGSGPU += -DI_R3D_MAX=$(I_R3D_MAX) -DLOG_R3D_MAX=$(LOG_R3D_MAX) DEFINEFLAGSGPU += -D_HISTO_2D_$(NB_H2D) -DN_LOGINT=$(N_LOGINT) # COMPILER AND OPTIONS ifeq ($(strip $(USE_MPI)),yes) DEFINEFLAGSCPU += -D_HAVE_MPI COMPCPU = mpicc else COMPCPU = gcc endif COMPGPU = nvcc OPTCPU = -Wall -O3 -fopenmp $(DEFINEFLAGSCPU) OPTCPU_GPU = -Wall -O3 $(DEFINEFLAGSGPU) $(DEFINEFLAGSCPU) OPTGPU = -O3 $(DEFINEFLAGSGPU) -arch compute_20 $(OPT_PRECISION) -Xcompiler -Wall #INCLUDES AND LIBRARIES INCLUDECOM = -I./src -I$(GSL_INC) INCLUDECUDA = -I$(CUDADIR)/include LIBCPU = $(LGSL) -lm LIBGPU = $(LGSL) -L$(CUDADIR)/lib64 -lcudart -lpthread -lm #.o FILES #CUTE DEF = src/define.o COM = src/common.o COSMO = src/cosmo.o CORR = src/correlator.o BOX2D = src/boxes2D.o BOX3D = src/boxes3D.o IO = src/io.o MAIN = src/main.c OFILES = $(DEF) $(COM) $(COSMO) $(CORR) $(BOX2D) $(BOX3D) $(IO) $(MAIN) #CU_CUTE BOXCUDA = src/boxesCUDA.o CORRCUDA = src/correlator_cuda.o MAINCUDA = src/main_cuda.o OFILESCUDA = $(DEF) $(COM) $(COSMO) $(CORRCUDA) $(BOXCUDA) $(IO) $(MAINCUDA) #FINAL GOAL EXE = CUTE EXECUDA = CU_CUTE #RULES default : $(EXE) $(EXECUDA) #RULE TO MAKE .o's FROM .c's $(DEF) : src/define.c $(COMPCPU) $(OPTCPU) -c $< -o $@ $(INCLUDECOM) $(COM) : src/common.c $(COMPCPU) $(OPTCPU) -c $< -o $@ $(INCLUDECOM) $(COSMO) : src/cosmo.c $(COMPCPU) $(OPTCPU) -c $< -o $@ $(INCLUDECOM) $(CORR) : src/correlator.c $(COMPCPU) $(OPTCPU) -c $< -o $@ $(INCLUDECOM) $(IO) : src/io.c $(COMPCPU) $(OPTCPU_GPU) -c $< -o $@ $(INCLUDECOM) $(BOX2D) : src/boxes2D.c $(COMPCPU) $(OPTCPU) -c $< -o $@ $(INCLUDECOM) $(BOX3D) : src/boxes3D.c $(COMPCPU) $(OPTCPU) -c $< -o $@ $(INCLUDECOM) $(BOXCUDA) : src/boxesCUDA.c $(COMPCPU) $(OPTCPU) -c $< -o $@ $(INCLUDECOM) $(CORRCUDA) : src/correlator_cuda.cu $(COMPGPU) $(OPTGPU) -c $< -o $@ $(INCLUDECOM) $(INCLUDECUDA) $(MAINCUDA) : src/main_cuda.c $(COMPCPU) $(OPTCPU_GPU) -c $< -o $@ $(INCLUDECOM) #RULES TO MAKE THE FINAL EXECUTABLES $(EXE) : $(OFILES) $(COMPCPU) $(OPTCPU) $(OFILES) -o $(EXE) $(INCLUDECOM) $(LIBCPU) $(EXECUDA) : $(OFILESCUDA) $(COMPCPU) $(OPTCPU_GPU) $(OFILESCUDA) -o $(EXECUDA) $(INCLUDECUDA) $(INCLUDECOM) $(LIBGPU) #CLEANING RULES clean : rm -f ./src/*.o cleaner : rm -f ./src/*.o ./src/*~ *~ $(EXE) $(EXECUDA)
damonge/CUTE
CUTE/Makefile
Makefile
gpl-3.0
4,390
# TDDFT Code Currently, the code is built with the following include directories. The code will find .o files it needs in these directories: ``` $QEHOME/PW/src/ $QEHOME/Modules $QEHOME/iotk/src $QEHOME/include ``` where `QEHOME` is the root directory of the quantum espresso package. and uses these libraries ``` $QEHOME/PW/src/libpw.a $QEHOME/Modules/libqemod.a $QEHOME/flib/ptools.a $QEHOME/flib/flib.a $QEHOME/clib/clib.a $QEHOME/iotk/src/libiotk.a -lopenblas -lfftw3 -lopenblas ``` This means that most of the functions, subroutines, and modules that the tddft source uses are found in the first four directories above. ### Recommended way to parse these markdown files 1. Start reading `tddft_main.md`. This markdown file describes `ttdft_main.f90`, the file containing the Fortran `program` construct, which is like a C/C++ `main` function. Code execution begins from here. 2. Whenever an <span style="color:orange;">orange</span> block appears, it is an indication to start reading another file inside this directory. These instructions are written assuming you have read all orange blocks up to that point in the text.
rehnd/tddft-notes
README.md
Markdown
gpl-3.0
1,135
#pragma once #include <Re\Game\Effect\Movement\EffectMovementAim.h> #include <Re\Common\Control\Control.h> namespace Effect { /// efect that allows to move player in x and y axes without any rotation /// @Warring: Rigidbody must be created before a first update of the component! class StaticMovement : public MovementAim { public: StaticMovement(float32 movementSpeed); virtual void onInit() override; virtual void onUpdate(sf::Time st) override; ////// setters StaticMovement* setAxis(const string& x, const string& y); ////// Data - cashed axis Control::Axis *xAxis{ nullptr }; Control::Axis *yAxis{ nullptr }; /*protected: virtual void serialiseF(std::ostream& file, Res::DataScriptSaver& saver) const override; virtual void deserialiseF(std::istream& file, Res::DataScriptLoader& loader) override;*/ }; }
Risist/ReEngine
ReEngine/ReEngine/Re/Game/Effect/Movement/Player/EffectStaticMovement.h
C
gpl-3.0
842
""" Test notifiers """ import unittest from sickchill.oldbeard import db from sickchill.oldbeard.notifiers.emailnotify import Notifier as EmailNotifier from sickchill.oldbeard.notifiers.prowl import Notifier as ProwlNotifier from sickchill.tv import TVEpisode, TVShow from sickchill.views.home import Home from tests import test_lib as test # noinspection PyProtectedMember class NotifierTests(test.SickChillTestDBCase): """ Test notifiers """ @classmethod def setUpClass(cls): num_legacy_shows = 3 num_shows = 3 num_episodes_per_show = 5 cls.mydb = db.DBConnection() cls.legacy_shows = [] cls.shows = [] # Per-show-notifications were originally added for email notifications only. To add # this feature to other notifiers, it was necessary to alter the way text is stored in # one of the DB columns. Therefore, to test properly, we must create some shows that # store emails in the old method (legacy method) and then other shows that will use # the new method. for show_counter in range(100, 100 + num_legacy_shows): show = TVShow(1, show_counter) show.name = "Show " + str(show_counter) show.episodes = [] for episode_counter in range(0, num_episodes_per_show): episode = TVEpisode(show, test.SEASON, episode_counter) episode.name = "Episode " + str(episode_counter + 1) episode.quality = "SDTV" show.episodes.append(episode) show.saveToDB() cls.legacy_shows.append(show) for show_counter in range(200, 200 + num_shows): show = TVShow(1, show_counter) show.name = "Show " + str(show_counter) show.episodes = [] for episode_counter in range(0, num_episodes_per_show): episode = TVEpisode(show, test.SEASON, episode_counter) episode.name = "Episode " + str(episode_counter + 1) episode.quality = "SDTV" show.episodes.append(episode) show.saveToDB() cls.shows.append(show) def setUp(self): """ Set up tests """ self._debug_spew("\n\r") @unittest.skip('Not yet implemented') def test_boxcar(self): """ Test boxcar notifications """ pass @unittest.skip('Cannot call directly without a request') def test_email(self): """ Test email notifications """ email_notifier = EmailNotifier() # Per-show-email notifications were added early on and utilized a different format than the other notifiers. # Therefore, to test properly (and ensure backwards compatibility), this routine will test shows that use # both the old and the new storage methodology legacy_test_emails = "email-1@address.com,email2@address.org,email_3@address.tv" test_emails = "email-4@address.com,email5@address.org,email_6@address.tv" for show in self.legacy_shows: showid = self._get_showid_by_showname(show.show_name) self.mydb.action("UPDATE tv_shows SET notify_list = ? WHERE show_id = ?", [legacy_test_emails, showid]) for show in self.shows: showid = self._get_showid_by_showname(show.show_name) Home.saveShowNotifyList(show=showid, emails=test_emails) # Now, iterate through all shows using the email list generation routines that are used in the notifier proper shows = self.legacy_shows + self.shows for show in shows: for episode in show.episodes: ep_name = episode._format_pattern('%SN - %Sx%0E - %EN - ') + episode.quality show_name = email_notifier._parseEp(ep_name) recipients = email_notifier._generate_recipients(show_name) self._debug_spew("- Email Notifications for " + show.name + " (episode: " + episode.name + ") will be sent to:") for email in recipients: self._debug_spew("-- " + email.strip()) self._debug_spew("\n\r") return True @unittest.skip('Not yet implemented') def test_emby(self): """ Test emby notifications """ pass @unittest.skip('Not yet implemented') def test_freemobile(self): """ Test freemobile notifications """ pass @unittest.skip('Not yet implemented') def test_growl(self): """ Test growl notifications """ pass @unittest.skip('Not yet implemented') def test_kodi(self): """ Test kodi notifications """ pass @unittest.skip('Not yet implemented') def test_libnotify(self): """ Test libnotify notifications """ pass @unittest.skip('Not yet implemented') def test_nma(self): """ Test nma notifications """ pass @unittest.skip('Not yet implemented') def test_nmj(self): """ Test nmj notifications """ pass @unittest.skip('Not yet implemented') def test_nmjv2(self): """ Test nmjv2 notifications """ pass @unittest.skip('Not yet implemented') def test_plex(self): """ Test plex notifications """ pass @unittest.skip('Cannot call directly without a request') def test_prowl(self): """ Test prowl notifications """ prowl_notifier = ProwlNotifier() # Prowl per-show-notifications only utilize the new methodology for storage; therefore, the list of legacy_shows # will not be altered (to preserve backwards compatibility testing) test_prowl_apis = "11111111111111111111,22222222222222222222" for show in self.shows: showid = self._get_showid_by_showname(show.show_name) Home.saveShowNotifyList(show=showid, prowlAPIs=test_prowl_apis) # Now, iterate through all shows using the Prowl API generation routines that are used in the notifier proper for show in self.shows: for episode in show.episodes: ep_name = episode._format_pattern('%SN - %Sx%0E - %EN - ') + episode.quality show_name = prowl_notifier._parse_episode(ep_name) recipients = prowl_notifier._generate_recipients(show_name) self._debug_spew("- Prowl Notifications for " + show.name + " (episode: " + episode.name + ") will be sent to:") for api in recipients: self._debug_spew("-- " + api.strip()) self._debug_spew("\n\r") return True @unittest.skip('Not yet implemented') def test_pushalot(self): """ Test pushalot notifications """ pass @unittest.skip('Not yet implemented') def test_pushbullet(self): """ Test pushbullet notifications """ pass @unittest.skip('Not yet implemented') def test_pushover(self): """ Test pushover notifications """ pass @unittest.skip('Not yet implemented') def test_pytivo(self): """ Test pytivo notifications """ pass @unittest.skip('Not yet implemented') def test_synoindex(self): """ Test synoindex notifications """ pass @unittest.skip('Not yet implemented') def test_synologynotifier(self): """ Test synologynotifier notifications """ pass @unittest.skip('Not yet implemented') def test_trakt(self): """ Test trakt notifications """ pass @unittest.skip('Not yet implemented') def test_tweet(self): """ Test tweet notifications """ pass @unittest.skip('Not yet implemented') def test_twilio(self): """ Test twilio notifications """ pass @staticmethod def _debug_spew(text): """ Spew text notifications :param text: to spew :return: """ if __name__ == '__main__' and text is not None: print(text) def _get_showid_by_showname(self, showname): """ Get show ID by show name :param showname: :return: """ if showname is not None: rows = self.mydb.select("SELECT show_id FROM tv_shows WHERE show_name = ?", [showname]) if len(rows) == 1: return rows[0]['show_id'] return -1 if __name__ == '__main__': print("==================") print("STARTING - NOTIFIER TESTS") print("==================") print("######################################################################") SUITE = unittest.TestLoader().loadTestsFromTestCase(NotifierTests) unittest.TextTestRunner(verbosity=2).run(SUITE)
Vagab0nd/SiCKRAGE
tests/notifier_tests.py
Python
gpl-3.0
9,061
Open Recruitment Form ======================= Built upon Slim PHP Framework and Firebase Realtime Database. This form also using SSO Universitas Indonesia for user authentication. Requirements ------------ - PHP >= 7.0 - [Composer](http://getcomposer.org/download/) Install Guide ------------- - Clone repository - Run `composer update` - [Add Firebase to your app](https://firebase.google.com/docs/admin/setup#add_firebase_to_your_app) and rename to `application_default_credentials.json` in root project directory - Run `php -S localhost:8080` or with your favorite webserver References ---------- - [Firebase PHP Setup](http://firebase-php.readthedocs.io/en/latest/setup.html) - [Slim Deployment](https://www.slimframework.com/docs/start/web-servers.html) License ------- [GNU GPL v3](https://github.com/mic3308/open-recruitment-form/blob/master/LICENSE.md)
mic3308/open-recruitment-form
README.md
Markdown
gpl-3.0
877
import React from 'react'; const Contact = () => ({ contactNext(){ var data = $("#questionInput").val(); if(data){ Session.set('contact', data); FlowRouter.go("/register/6"); }else{ alert("Please enter your email."); } }, contactEnter(event){ if(event.key == 'Enter') { var data = $("#questionInput").val(); if(data){ Session.set('contact', data); FlowRouter.go("/register/6"); }else{ alert("Please enter your email."); } } }, render() { return ( <div id="jiyuu"> <h2 className="question">What's your email?</h2> <div id="question-card" className="form-group"> <div id="questionInputContain"> <input id="questionInput" type="text" onKeyPress={this.contactEnter.bind(this)} className="form-control"/> </div> <div className="qnext" onClick={this.contactNext.bind(this)}> <i className="fa fa-caret-right" aria-hidden="true"/> </div> </div> </div> ); } }); export default Contact;
jiyuu-llc/jiyuu
imports/old/signup/contact.js
JavaScript
gpl-3.0
1,094
Joomla 3.2.1 = 801fdee0d37e2d7cdb5e11186d58be14 Joomla 3.2.3 = 8ff05a797b0cd83d5cd4c303bec2e98b
gohdan/DFC
known_files/hashes/templates/beez3/html/message.php
PHP
gpl-3.0
96
Bitrix 16.5 Business Demo = c20a4108eeaf208c6ae2b8aeac7862c7
gohdan/DFC
known_files/hashes/bitrix/modules/mobileapp/install/components/bitrix/mobileapp.designer.file.input/templates/drag_n_drop/lang/en/template.php
PHP
gpl-3.0
61
<?php /** * Copyright (c) 2010 Endeavor Systems, Inc. * * This file is part of OpenFISMA. * * OpenFISMA 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. * * OpenFISMA 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 OpenFISMA. If not, see * {@link http://www.gnu.org/licenses/}. */ /** * Add relation from Incident model to Organization model * * @uses Doctrine_Migration_Base * @package Migration * @copyright (c) Endeavor Systems, Inc. 2010 {@link http://www.endeavorsystems.com} * @author Andrew Reeves <andrew.reeves@endeavorsystems.com> * @license http://www.openfisma.org/content/license GPLv3 */ class Version69 extends Doctrine_Migration_Base { public function up() { $options = array( 'notblank' => '1', 'comment' => 'Technical support contact phone number', 'default' => '', 'Fisma_Doctrine_Validator_Phone' => '1', ); $this->changeColumn('configuration', 'contact_phone', '15', 'string', $options); $options = array( 'Fisma_Doctrine_Validator_Phone' => '1', 'extra' => array( 'auditLog' => '1', 'logicalName' => 'Reporter\'s Phone Number', ), 'comment' => '10 digit US number with no symbols (dashes, dots, parentheses, etc.)', ); $this->changeColumn('incident', 'reporterphone', '15', 'string', $options); $options = array( 'Fisma_Doctrine_Validator_Phone' => '1', 'extra' => array( 'auditLog' => '1', 'logicalName' => 'Reporter\'s Fax Number', ), 'comment' => '10 digit US number with no symbols (dashes, dots, parentheses, etc.)', ); $this->changeColumn('incident', 'reporterfax', '15', 'string', $options); $options = array( 'fixed' => '1', 'extra' => array( 'logicalName' => 'Office Phone', 'searchIndex' => 'keyword', 'notify' => '1', ), 'Fisma_Doctrine_Validator_Phone' => '1', 'comment' => 'U.S. 10 digit phone number; stored without punctuation', ); $this->changeColumn('user', 'phoneoffice', '15', 'string', $options); $options = array( 'fixed' => '1', 'extra' => array( 'logicalName' => 'Mobile Phone', 'searchIndex' => 'keyword', 'notify' => '1', ), 'Fisma_Doctrine_Validator_Phone' => '1', 'comment' => 'U.S. 10 digit phone number, stored as 10 digits without punctuation', ); $this->changeColumn('user', 'phonemobile', '15', 'string', $options); } public function down() { } }
areeves/openfisma
application/doctrine/migrations/1279729439_version69.php
PHP
gpl-3.0
3,248
/* * myMake.h * * Created on: 2017年5月18日 * Author: JYS1105 */ #ifndef MYMAKE_H_ #define MYMAKE_H_ #ifdef __cplusplus extern "C" { #endif int myFileComments(void * myfile); int getArgv(void * myfile, int arg, char * argv[]); int myFile(void * myfile, int arg, char * argv[]); int myMakefile(int arg, char * argv[]); #ifdef __cplusplus } #endif #endif /* MYMAKE_H_ */
DoubleBirdsU/myLinux
myke/myMake.h
C
gpl-3.0
394
#!/usr/bin/ruby #****************************************************************************** # ALX - Skies of Arcadia Legends Examiner # Copyright (C) 2022 Marcel Renner # # This file is part of ALX. # # ALX 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. # # ALX 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 ALX. If not, see <http://www.gnu.org/licenses/>. #****************************************************************************** #============================================================================== # REQUIREMENTS #============================================================================== require('pathname') require_relative('../lib/alx/entrytransform.rb') # -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- module ALX #============================================================================== # CLASS #============================================================================== # Class to create backups in +SYS.build_dir+. class BackupCreator < EntryTransform #============================================================================== # PUBLIC #============================================================================== public # Constructs a BackupCreator. def initialize super(nil) end def update super if Worker.child? Dir.chdir(Root.dirname) do Dir.glob(sys(:exec_file)).each do |_p| create_backup(_p) end create_backup(sys(:evp_file)) create_backup(sys(:level_file)) Dir.glob(sys(:enp_file)).each do |_p| create_backup(_p) end Dir.glob(sys(:eb_file)).each do |_p| create_backup(_p) end Dir.glob(sys(:ec_file)).each do |_p| create_backup(_p) end Dir.glob(sys(:sct_file)).each do |_p| create_backup(_p) end Dir.glob(sys(:tec_file)).each do |_p| create_backup(_p) end Dir.glob(sys(:sot_file_de)).each do |_p| create_backup(_p) end Dir.glob(sys(:sot_file_es)).each do |_p| create_backup(_p) end Dir.glob(sys(:sot_file_fr)).each do |_p| create_backup(_p) end Dir.glob(sys(:sot_file_gb)).each do |_p| create_backup(_p) end end end end # Creates a backup. # @param _filename [String] File name def create_backup(_filename) _src_file = File.expand_path(_filename, Root.dirname) _base_dir = Pathname.new(File.expand_path(SYS.root_dir, Root.dirname)) _root_dir = Pathname.new(_src_file) _dst_file = File.expand_path( _root_dir.relative_path_from(_base_dir), File.join(Root.dirname, SYS.backup_dir) ) LOG.info(sprintf(VOC.create, VOC.open_backup, _dst_file)) begin FileUtils.mkdir_p(File.dirname(_dst_file)) FileUtils.cp(_src_file, _dst_file) rescue StandardError # Nothing to do. end end end # class BackupCreator # -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- end # module ALX # -- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -- if __FILE__ == $0 ALX::Main.call do _br = ALX::BackupCreator.new _br.exec end end
Taikocuya/ALX
bin/createbackup.rb
Ruby
gpl-3.0
3,979
<?php namespace CDI\EnfermeriaBundle\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; use CDI\EnfermeriaBundle\Entity\Group; use CDI\EnfermeriaBundle\Form\GroupType; /** * Group controller. * * @Route("/roles") */ class GroupController extends Controller { /** * Lists all Group entities. * * @Route("/", name="roles") * @Method("GET") * @Template() */ public function indexAction() { $em = $this->getDoctrine()->getManager(); $entities = $em->getRepository('EnfermeriaBundle:Group')->findAll(); return array( 'entities' => $entities, ); } /** * Creates a new Group entity. * * @Route("/", name="roles_create") * @Method("POST") * @Template("EnfermeriaBundle:Group:new.html.twig") */ public function createAction(Request $request) { $entity = new Group(); $form = $this->createCreateForm($entity); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $em->persist($entity); $em->flush(); return $this->redirect($this->generateUrl('roles_show', array('id' => $entity->getId()))); } return array( 'entity' => $entity, 'form' => $form->createView(), ); } /** * Creates a form to create a Group entity. * * @param Group $entity The entity * * @return \Symfony\Component\Form\Form The form */ private function createCreateForm(Group $entity) { $form = $this->createForm(new GroupType(), $entity, array( 'action' => $this->generateUrl('roles_create'), 'method' => 'POST', 'attr' => array('class' => 'form-horizontal'), )); return $form; } /** * Displays a form to create a new Group entity. * * @Route("/new", name="roles_new") * @Method("GET") * @Template() */ public function newAction() { $entity = new Group(); $form = $this->createCreateForm($entity); return array( 'entity' => $entity, 'form' => $form->createView(), ); } /** * Finds and displays a Group entity. * * @Route("/{id}", name="roles_show") * @Method("GET") * @Template() */ public function showAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('EnfermeriaBundle:Group')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Group entity.'); } $deleteForm = $this->createDeleteForm($id); return array( 'entity' => $entity, 'delete_form' => $deleteForm->createView(), ); } /** * Displays a form to edit an existing Group entity. * * @Route("/{id}/edit", name="roles_edit") * @Method("GET") * @Template() */ public function editAction($id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('EnfermeriaBundle:Group')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Group entity.'); } $editForm = $this->createEditForm($entity); $deleteForm = $this->createDeleteForm($id); return array( 'entity' => $entity, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), ); } /** * Creates a form to edit a Group entity. * * @param Group $entity The entity * * @return \Symfony\Component\Form\Form The form */ private function createEditForm(Group $entity) { $form = $this->createForm(new GroupType(), $entity, array( 'action' => $this->generateUrl('roles_update', array('id' => $entity->getId())), 'method' => 'PUT', 'attr' => array('class' => 'form-horizontal'), )); return $form; } /** * Edits an existing Group entity. * * @Route("/{id}", name="roles_update") * @Method("PUT") * @Template("EnfermeriaBundle:Group:edit.html.twig") */ public function updateAction(Request $request, $id) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('EnfermeriaBundle:Group')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Group entity.'); } $deleteForm = $this->createDeleteForm($id); $editForm = $this->createEditForm($entity); $editForm->handleRequest($request); if ($editForm->isValid()) { $em->flush(); return $this->redirect($this->generateUrl('roles_edit', array('id' => $id))); } return array( 'entity' => $entity, 'edit_form' => $editForm->createView(), 'delete_form' => $deleteForm->createView(), ); } /** * Deletes a Group entity. * * @Route("/{id}", name="roles_delete") * @Method("DELETE") */ public function deleteAction(Request $request, $id) { $form = $this->createDeleteForm($id); $form->handleRequest($request); if ($form->isValid()) { $em = $this->getDoctrine()->getManager(); $entity = $em->getRepository('EnfermeriaBundle:Group')->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Group entity.'); } $em->remove($entity); $em->flush(); } return $this->redirect($this->generateUrl('roles')); } /** * Creates a form to delete a Group entity by id. * * @param mixed $id The entity id * * @return \Symfony\Component\Form\Form The form */ private function createDeleteForm($id) { return $this->createFormBuilder() ->setAction($this->generateUrl('roles_delete', array('id' => $id))) ->setMethod('DELETE') ->add('submit', 'submit', array('label' => 'Eliminar')) ->getForm() ; } }
ovelasquez/cdi
src/CDI/EnfermeriaBundle/Controller/GroupController.php
PHP
gpl-3.0
6,574