answer stringlengths 15 1.25M |
|---|
#include<stdio.h>
#include<stdlib.h>
#include<fcntl.h>
#include<string.h>
#include<unistd.h>
#define BUFF_SIZE 8192
int main(int argc,char *argv[])
{
int fd,len,ret;
int fd2,num_bytes;
char *buf;
int i;
if (argc < 2) {
fprintf(stderr,"Insufficient number of arguments\n");
exit(EXIT_FAILURE);
}
buf = (char*) malloc(BUFF_SIZE * sizeof(char));
if (buf == NULL) {
fprintf(stderr,"Write failed\n");
exit(EXIT_FAILURE);
}
fd = open(argv[1],O_WRONLY);
printf("Application open fd=%d\n",fd);
if (fd < 0) {
perror(":error in opening file\n");
exit(EXIT_FAILURE);
}
fd2 = open("sample_text",O_RDONLY);
if (fd2 < 0) {
perror(":error in opening sample_text\n");
exit(EXIT_FAILURE);
}
num_bytes = read(fd2,buf,BUFF_SIZE);
if (num_bytes < 0) {
perror(":error in reading file\n");
exit(EXIT_FAILURE);
}
printf("bytes read = %d\n",num_bytes);
i = 0;
while (i < 3) {
ret = write(fd,buf,BUFF_SIZE);
if (ret < 0) {
fprintf(stderr,"Write failed\n");
exit(EXIT_FAILURE);
}
printf("number of byte wrtitten %d\n",ret);
sleep(1);
i++;
}
close(fd);
close(fd2);
free(buf);
printf("writer close fd\n");
return 0;
} |
#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "One parameter (snapshot name) needed"
exit 2
fi
./tools/shutdown_all_vms
./tools/list_domains | while read <API key>; do
echo "
echo $<API key>
virsh snapshot-create-as $<API key> --name $1 || exit 3
virsh snapshot-list $<API key>
done
./tools/start_all_vms
echo "
echo "All VMs snapshotted as "$1
echo "If logged in in Horizon, please re-login after snapshot."
echo " |
# Require any additional compass plugins here.
require 'ninesixty'
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "css"
sass_dir = "css/sass"
images_dir = "images"
javascripts_dir = "js"
# You can select your preferred output style here (can be overridden via the command line):
# output_style = :expanded or :nested or :compact or :compressed
# To enable relative paths to assets via compass helper functions. Uncomment:
# relative_assets = true
# To disable debugging comments that display the original location of your selectors. Uncomment:
# line_comments = false
# If you prefer the indented syntax, you might want to regenerate this
# project again passing --syntax sass, or you can uncomment this:
# preferred_syntax = :sass
# and then run:
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass |
#ifndef STATUSBAR_H
#define STATUSBAR_H
#include "BreadcrumbViewer.h"
#include <KStatusBar>
class QToolButton;
class QTimer;
class QProgressBar;
class QLabel;
class QSlider;
namespace MainWindow {
class ImageCounter;
class DirtyIndicator;
class StatusBar :public KStatusBar
{
Q_OBJECT
public:
StatusBar();
DirtyIndicator* mp_dirtyIndicator;
ImageCounter* mp_partial;
ImageCounter* mp_selected;
BreadcrumbViewer* mp_pathIndicator;
void setLocked( bool locked );
void startProgress( const QString& text, int total );
void setProgress( int progress );
void <API key>( bool );
void showThumbnailSlider();
void hideThumbnailSlider();
signals:
void cancelRequest();
private slots:
void hideStatusBar();
void showStatusBar();
void checkSliderValue(int);
private:
void setupGUI();
void setPendingShow();
QLabel* m_lockedIndicator;
QProgressBar* m_progressBar;
QToolButton* m_cancel;
QTimer* m_pendingShowTimer;
QSlider* <API key>;
QToolButton* m_thumbnailsSmaller;
QToolButton* m_thumbnailsBigger;
};
}
#endif /* STATUSBAR_H */
// vi:expandtab:tabstop=4 shiftwidth=4: |
#include "LSP/<API key>.h"
static int counter = 0;
LSP::<API key>::<API key>(const wxString& filename, const wxString& fileContent)
{
SetMethod("textDocument/didChange");
m_params.reset(new <API key>());
<API key> id;
id.SetVersion(++counter);
id.SetFilename(filename);
m_params->As<<API key>>()->SetTextDocument(id);
<API key> changeEvent;
changeEvent.SetText(fileContent);
m_params->As<<API key>>()->SetContentChanges({ changeEvent });
}
LSP::<API key>::~<API key>() {} |
#ifndef <API key>
#define <API key>
#include <string>
#include <map>
#include <ace/Singleton.h>
class WordFilterMgr
{
private:
friend class ACE_Singleton<WordFilterMgr, ACE_Null_Mutex>;
WordFilterMgr();
~WordFilterMgr();
public:
Note for 0.6v : Will used std::map instead of UNORDERED_MAP, because of problems with cross-platform compilation.
// [letter][analogs]
typedef std::map<char, std::string> LetterAnalogMap;
// [converted][original]
typedef std::map<std::string, std::string> BadWordMap;
void LoadLetterAnalogs();
void LoadBadWords();
inline void <API key>(std::string& text);
std::string FindBadWord(const std::string& text);
// manipulations with container
bool AddBadWord(const std::string& badWord, bool toDB = false);
bool RemoveBadWord(const std::string& badWord, bool fromDB = false);
// element (const) accessor
BadWordMap GetBadWords() const { return m_badWords; }
private:
LetterAnalogMap m_letterAnalogs;
BadWordMap m_badWords;
};
#define sWordFilterMgr ACE_Singleton<WordFilterMgr, ACE_Null_Mutex>::instance()
#endif |
# LedgerSMB Small Medium Business Accounting
# This file contains source code included with or based on SQL-Ledger which
# version. For a full list including contact information of contributors,
# Contributors: Steve Doerr <sdoerr907@everestkc.net>
# This program is free software; you can redistribute it and/or modify
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
# POS
use LedgerSMB::Tax;
# If you need to set a currency to be hard-wired, you can do so in this way:
#$form->{currency} = 'USD';
1;
# end
sub custom_send_to_pd{
socket(SOCK, 2, 1, getprotobynumber($pos_config{'pd_proto'}));
connect(SOCK, $pos_config{'pd_dest'});
my $rn = $numrows - 1;
my $ds_string = sprintf (
'%s%s @ $%-7.2f%s%s%s',
$pd_control{'new_line'},
$form->{"qty_$rn"},
$form->{"sellprice_$rn"},
$pd_control{'new_line'},
"Subtotal: \$".sprintf('%-7.2f', $form->{'invtotal'})
);
print SOCK $ds_string;
close SOCK;
}
sub on_update{
&custom_send_to_pd;
&custom_check_alert;
}
sub open_drawer{
require "pos.conf.pl";
open (PRINTER, "|-", ${'LedgerSMB::Sysconfig::printer'}{Printer});
print PRINTER $pos_config{'rp_cash_open'};
close PRINTER;
sleep 1;
}
sub check_alert {
my $rc = $form->{'rowcount'};
if ( !$form->{"partnumber_$rc"} ) {
--$rc; # Ensures that alert shows up when item is selected from a list;
}
for ( 1 .. $rc ) {
$form->{'check_id'} = ( $form->{'check_id'} || $form->{"check_id_$_"} );
}
}
sub send_to_pd {
socket( SOCK, 2, 1, getprotobynumber( $pos_config{'pd_proto'} ) );
connect( SOCK, $pos_config{'pd_dest'} );
my $rn = $numrows - 1;
my $ds_string = sprintf(
'%s%s @ $%-7.2f%s%s%s',
$pd_control{'new_line'},
$form->{"qty_$rn"},
$form->{"sellprice_$rn"},
$pd_control{'new_line'},
"Subtotal: \$" . sprintf( '%-7.2f', $form->{'invtotal'} )
);
print SOCK $ds_string;
close SOCK;
}
sub on_update {
&send_to_pd;
&check_alert;
}
sub open_till {
&open_drawer;
&update;
}
sub add {
$form->{nextsub} = 'add';
$form->{title} = $locale->text('Add POS Invoice');
$form->{callback} =
"$form->{script}?action=$form->{nextsub}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}";
&invoice_links;
$form->{type} = "pos_invoice";
$form->{format} = "txt";
$form->{media} = ( $myconfig{printer} ) ? $myconfig{printer} : "screen";
$form->{rowcount} = 0;
$form->{readonly} = ( $myconfig{acs} =~ /POS--Sale/ ) ? 1 : 0;
$ENV{REMOTE_ADDR} =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/;
$form->{till} = $4;
$form->{partsgroup} = "";
for ( @{ $form->{all_partsgroup} } ) {
$form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n";
}
$form->{dontdisplayend} = 1;
&display_form;
$form->{dontdisplayrows} = 1;
$form->{dontdisplayend} = 0;
&openinvoices;
}
sub openinvoices {
undef %column_data;
undef %column_heading;
$form->{customer} = "";
$form->{customer_id} = 0;
delete $form->{l_subtotal};
delete $form->{subtotal};
$ENV{REMOTE_ADDR} =~ /(\d+)\.(\d+)\.(\d+)\.(\d+)/;
$form->{till} = $4;
$form->{sort} = 'transdate';
for (qw(open l_invnumber l_transdate l_name l_amount l_curr l_till)) {
$form->{$_} = 'Y';
}
if ( $myconfig{role} ne 'user' ) {
$form->{l_employee} = 'Y';
}
$form->{title} = $locale->text('Open');
&transactions;
}
sub edit {
$form->{title} = $locale->text('Edit POS Invoice');
if (!$form->{nextsub}){
$form->{nextsub} = 'add';
}
$form->{callback} =
"$form->{script}?action=$form->{nextsub}&path=$form->{path}&login=$form->{login}&sessionid=$form->{sessionid}";
&invoice_links;
&prepare_invoice;
$form->{type} = "pos_invoice";
$form->{format} = "txt";
$form->{media} = ( $myconfig{printer} ) ? $myconfig{printer} : "screen";
$form->{readonly} = ( $myconfig{acs} =~ /POS--Sale/ ) ? 1 : 0;
$form->{partsgroup} = "";
for ( @{ $form->{all_partsgroup} } ) {
$form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n";
}
&display_form;
}
sub form_header {
if ( !$form->{'check_id'} ) {
&check_alert;
}
# set option selected
for (qw(AR currency)) {
$form->{"select$_"} =~ s/ selected
$form->{"select$_"} =~
s/option>\Q$form->{$_}\E/option selected>$form->{$_}/;
}
for (qw(customer department employee)) {
$form->{"select$_"} = $form->unescape( $form->{"select$_"} );
$form->{"select$_"} =~ s/ selected
$form->{"select$_"} =~ s/(<option value="\Q$form->{$_}\E")/$1 selected/;
}
$form->{exchangerate} =
$form->format_amount( \%myconfig, $form->{exchangerate} );
$exchangerate = qq|<tr>|;
$exchangerate .= qq|
<th align="right" nowrap>| . $locale->text('Currency') . qq|</th>
<td><select name="currency">$form->{selectcurrency}</select></td> |
if $form->{defaultcurrency};
$exchangerate .= qq|
<input type="hidden" name="selectcurrency" value="$form->{selectcurrency}">
<input type="hidden" name="defaultcurrency" value="$form->{defaultcurrency}">
|;
if ( $form->{defaultcurrency}
&& $form->{currency} ne $form->{defaultcurrency} )
{
if ( $form->{forex} ) {
$exchangerate .=
qq|<th align="right">|
. $locale->text('Exchange Rate')
. qq|</th><td>$form->{exchangerate}<input type="hidden" name="exchangerate" value="$form->{exchangerate}"></td>|;
}
else {
$exchangerate .=
qq|<th align="right">|
. $locale->text('Exchange Rate')
. qq|</th><td><input name="exchangerate" size="10" value="$form->{exchangerate}"></td>|;
}
}
$exchangerate .= qq|
<input type="hidden" name="forex" value="$form->{forex}">
</tr>
|;
if ( $form->{selectcustomer} ) {
$customer = qq|<select name="customer">$form->{selectcustomer}</select>
<input type="hidden" name="selectcustomer" value="|
. $form->escape( $form->{selectcustomer}, 1 ) . qq|">|;
}
else {
$customer = qq|<input name="customer" value="$form->{customer}" size="35">|;
}
$department = qq|
<tr>
<th align="right" nowrap>| . $locale->text('Department') . qq|</th>
<td colspan="3"><select name="department">$form->{selectdepartment}</select>
<input type="hidden" name="selectdepartment" value="|
. $form->escape( $form->{selectdepartment}, 1 ) . qq|">
</td>
</tr>
| if $form->{selectdepartment};
if ( $form->{change} != $form->{oldchange} ) {
$form->{creditremaining} -= $form->{oldchange};
}
$n = ( $form->{creditremaining} < 0 ) ? "0" : "1";
if ( $form->{business} ) {
$business = qq|
<tr>
<th align="right" nowrap>| . $locale->text('Business') . qq|</th>
<td>$form->{business}</td>
<td width="10"></td>
<th align="right" nowrap>| . $locale->text('Trade Discount') . qq|</th>
<td>|
. $form->format_amount( \%myconfig, $form->{tradediscount} * 100 )
. qq| %</td>
</tr>
|;
}
if ( $form->{selectlanguage} ) {
if ( $form->{language_code} ne $form->{oldlanguage_code} ) {
# rebuild partsgroup
$form->get_partsgroup(\%myconfig, { all => 1});
$form->{partsgroup} = "";
for ( @{ $form->{all_partsgroup} } ) {
$form->{partsgroup} .= "$_->{partsgroup}--$_->{translation}\n";
}
$form->{oldlanguage_code} = $form->{language_code};
}
$form->{"selectlanguage"} =
$form->unescape( $form->{"selectlanguage"} );
$form->{"selectlanguage"} =~ s/ selected
$form->{"selectlanguage"} =~
s/(<option value="\Q$form->{language_code}\E")/$1 selected/;
$lang = qq|
<tr>
<th align="right">| . $locale->text('Language') . qq|</th>
<td colspan="3"><select name="language_code">$form->{selectlanguage}</select></td>
</tr>
<input type="hidden" name="oldlanguage_code" value="$form->{oldlanguage_code}">
<input type="hidden" name="selectlanguage" value="|
. $form->escape( $form->{selectlanguage}, 1 ) . qq|">|;
}
$i = $form->{rowcount} + 1;
$focus = "partnumber_$i";
$form->header();
print qq|
<body onLoad="document.forms[0].${focus}.focus()">
<form method="post" action="$form->{script}">
|;
$form->hide_form(
qw(id till type format printed title discount creditlimit creditremaining tradediscount business closedto locked oldtransdate customer_id oldcustomer check_id)
);
print qq|
<input type="hidden" name="vc" value="customer">
<table width="100%">
<tr class="listtop">
<th class="listtop">$form->{title}</font></th>
</tr>|;
if ( $form->{'check_id'} ) {
print qq|
<tr class="listtop">
<th class="listtop" style="background-color: red">|
. $locale->text('Check ID') . qq|
</th>
</tr>|;
}
print qq|
<tr height="5"></tr>
<tr>
<td>
<table width="100%">
<tr valign="top">
<td>
<table>
<tr>
<th align="right" nowrap>| . $locale->text('Customer') . qq|</th>
<td colspan="3">$customer</td>
</tr>
<tr>
<td></td>
<td colspan="3">
<table>
<!
<th align="right" nowrap>| . $locale->text('Credit Limit') . qq|</th>
<td>$form->{creditlimit}</td>
<td width="10"></td>
<th align="right" nowrap>| . $locale->text('Remaining') . qq|</th>
<td class="plus$n">|
. $form->format_amount( \%myconfig, $form->{creditremaining}, 0, "0" )
. qq|</font></td>
</tr
$business
</table>
</td>
</tr>
<tr>
<th align=right nowrap>| . $locale->text('Record in') . qq|</th>
<td colspan="3"><select name="AR">$form->{selectAR}</select></td>
<input type="hidden" name="selectAR" value="$form->{selectAR}">
</tr>
$department
</table>
</td>
<td>
<table>
$employee
$exchangerate
$lang
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
</td>
</tr>
|;
$form->hide_form(
qw(taxaccounts duedate invnumber transdate selectcurrency defaultcurrency)
);
for ( split / /, $form->{taxaccounts} ) {
$form->hide_form( "${_}_rate", "${_}_description", "${_}_taxnumber" );
}
}
sub form_footer {
_calc_taxes();
$form->{invtotal} = $form->{invsubtotal};
$form->{taxincluded} = ( $form->{taxincluded} ) ? "checked" : "";
$taxincluded = "";
if ( $form->{taxaccounts} ) {
$taxincluded = qq|
<tr height="5"></tr>
<tr>
<td align="right">
<input name="taxincluded" class="checkbox" type="checkbox" value="1" $form->{taxincluded}></td><th align="left">|
. $locale->text('Tax Included')
. qq|</th>
</tr>
|;
}
if ( !$form->{taxincluded} ) {
foreach $item (keys %{$form->{taxes}}) {
my $taccno = $item;
$form->{invtotal} += $form->round_amount($form->{taxes}{$item}, 2);
$form->{"${taccno}_total"} =
$form->format_amount( \%myconfig,
$form->round_amount( $form->{taxes}{$item}, 2 ), 2 );
$tax .= qq|
<tr>
<th align="right">$form->{"${item}_description"}</th>
<td align="right">$form->{"${item}_total"}</td>
</tr>|;
}
$form->{invsubtotal} =
$form->format_amount( \%myconfig, $form->{invsubtotal}, 2, 0 );
$subtotal = qq|
<tr>
<th align="right">| . $locale->text('Subtotal') . qq|</th>
<td align="right">$form->{invsubtotal}</td>
</tr>
|;
}
on_update() if ($form->{action} eq 'update');
@column_index = qw(paid memo source cctrack AR_paid);
$column_data{paid} = "<th>" . $locale->text('Amount') . "</th>";
$column_data{source} = "<th>" . $locale->text('Source') . "</th>";
$column_data{memo} = "<th>" . $locale->text('Memo') . "</th>";
$column_data{cctrack} =
"<th>" . $locale->text('Credit Card Track') . "</th>";
$column_data{AR_paid} = "<th> </th>";
print qq|
<tr>
<td>
<table width="100%">
<tr valign="top">
<td>
<table>
<tr>
|;
for (@column_index) { print "$column_data{$_}\n"; }
print qq|
</tr>
|;
$totalpaid = 0;
$form->{paidaccounts}++ if ( $form->{"paid_$form->{paidaccounts}"} );
my $memoselect = qq|<SELECT name="MEMONAME">|;
for ( sort keys %pos_sources ) {
$memoselect .= qq|<option value="$_">$pos_sources{$_}</option>|;
}
$memoselect .= qq|</SELECT>|;
for $i ( 1 .. $form->{paidaccounts} ) {
$form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
$form->{"selectAR_paid_$i"} =~
s/option>\Q$form->{"AR_paid_$i"}\E/option selected>$form->{"AR_paid_$i"}/;
# format amounts
$totalpaid += $form->{"paid_$i"};
$form->{"paid_$i"} =
$form->format_amount( \%myconfig, $form->{"paid_$i"}, 2 );
$form->{"exchangerate_$i"} =
$form->format_amount( \%myconfig, $form->{"exchangerate_$i"} );
if ( $form->{"paid_$i"} ) {
$column_data{paid} =
qq|<td><input name="paid_$i" size="11" value="$form->{"paid_$i"}"></td>|;
}
else {
$column_data{paid} =
qq|<td><input accesskey='n' name="paid_$i" size="11" value="$form->{"paid_$i"}"></td>|;
}
$column_data{source} =
qq|<td><input name="source_$i" size="10" value="$form->{"source_$i"}"></td>|;
$column_data{memo} = qq|<td>$memoselect</td>|;
$column_data{memo} =~ s/MEMONAME/memo_$i/;
if ( !$form->{"memo_$i"} ) {
$form->{"memo_$i"} = $pos_source_default;
}
my $memval = $form->{"memo_$i"};
$column_data{memo} =~ s/(option value="$memval")/$1 SELECTED/;
$column_data{cctrack} = qq|<td><input type="text" name="cctrack_$i"
value="| . $form->{"cctrack_$i"} . qq|" size="3"></td>|;
if ( $pos_config{till_accno} ) {
if ( !$form->{"AR_paid_$i"} ) {
$form->{"AR_paid_$i"} = $pos_config{till_accno};
}
$column_data{AR_paid} = qq|<input type="hidden" name="AR_paid_$i"
value='$form->{"AR_paid_$i"}'>|;
}
else {
$column_data{AR_paid} =
qq|<td><select name="AR_paid_$i">$form->{"selectAR_paid_$i"}</select></td>|;
}
print qq|
<tr>
|;
for (@column_index) { print "$column_data{$_}\n"; }
print qq|
</tr>
|;
$form->hide_form( "cleared_$i", "exchangerate_$i", "forex_$i" );
}
$form->{change} = 0;
if ( $totalpaid > $form->{invtotal} ) {
$form->{change} = $totalpaid - $form->{invtotal};
}
$form->{oldchange} = $form->{change};
$form->{change} = $form->format_amount( \%myconfig, $form->{change}, 2, 0 );
$form->{totalpaid} = $form->format_amount( \%myconfig, $totalpaid, 2 );
$form->{oldinvtotal} = $form->{invtotal};
$form->{invtotal} =
$form->format_amount( \%myconfig, $form->{invtotal}, 2, 0 );
print qq|
<tr>
<th align="right">| . $locale->text('Change') . qq|</th>
<th>$form->{change}</th>
</tr>
</table>
</td>
<td align="right">
<table>
$subtotal
$tax
<tr>
<th align="right">| . $locale->text('Total') . qq|</th>
<td align="right">$form->{invtotal}</td>
</tr>
$taxincluded
</table>
</td>
</tr>
</table>
</td>
</tr>
<input type="hidden" name="oldtotalpaid" value="$totalpaid">
<input type="hidden" name="datepaid" value="$form->{transdate}">
<tr>
<td>
|;
$form->hide_form(
qw(paidaccounts selectAR_paid oldinvtotal change oldchange invtotal));
&print_options;
print qq|
</td>
</tr>
<tr>
<td><hr size="3" noshade></td>
</tr>
</table>
|;
$transdate = $form->datetonum( \%myconfig, $form->{transdate} );
$closedto = $form->datetonum( \%myconfig, $form->{closedto} );
# type=submit $locale->text('Update')
# type=submit $locale->text('Print')
# type=submit $locale->text('Post')
# type=submit $locale->text('Print and Post')
# type=submit $locale->text('Delete')
if ( !$form->{readonly} ) {
%button = (
'update' =>
{ ndx => 1, key => 'U', value => $locale->text('Update') },
'open_till' => { ndx => 3, key => 'O', value => $locale->text('Open Till') },
'print_and_post' => {
ndx => 4,
key => 'P',
value => $locale->text('Print and Post')
},
'delete' =>
{ ndx => 5, key => 'D', value => $locale->text('Delete') },
);
if ( $transdate > $closedto ) {
if ( !$form->{id} ) {
delete $button{'delete'};
}
delete $button{'print_and_post'}
unless ${LedgerSMB::Sysconfig::latex};
}
else {
for ( 'print', 'post', 'print_and_post', 'delete' ) {
delete $button{$_};
}
}
for ( sort { $button{$a}->{ndx} <=> $button{$b}->{ndx} } keys %button )
{
$form->print_button( \%button, $_ );
}
if ( $form->{partsgroup} ) {
$form->{partsgroup} =~ s/\r
$form->{partsgroup} = $form->quote( $form->{partsgroup} );
$spc = ( $form->{path} =~ /lynx/ ) ? "." : " ";
print qq|
<input type="hidden" name="nextsub" value="lookup_partsgroup">
<input type="hidden" name="partsgroup" value="$form->{partsgroup}">|;
foreach $item ( split /\n/, $form->{partsgroup} ) {
( $partsgroup, $translation ) = split /--/, $item;
$item = ($translation) ? $translation : $partsgroup;
print
qq| <button class="submit" type="submit" name="action" value="$spc$item">$spc$item</button>\n|
if $item;
}
}
}
if ( $form->{lynx} ) {
require "bin/menu.pl";
&menubar;
}
$form->hide_form(qw(rowcount callback path login sessionid));
print qq|</form>|;
if ( !$form->{dontdisplayend} ) {
print qq|
</body>
</html>
|;
}
}
sub post {
$form->isblank( "customer", $locale->text('Customer missing!') );
# if oldcustomer ne customer redo form
$customer = $form->{customer};
$customer =~ s/--.*
$customer .= "--$form->{customer_id}";
if ( $customer ne $form->{oldcustomer} ) {
&update;
exit;
}
&validate_items;
$form->isblank( "exchangerate", $locale->text('Exchange rate missing!') )
if ( $form->{currency} ne $form->{defaultcurrency} );
$paid = 0;
for ( 1 .. $form->{paidaccounts} ) {
$paid += $form->parse_amount( \%myconfig, $form->{"paid_$_"} );
}
delete $form->{datepaid} unless $paid;
$total = $form->parse_amount( \%myconfig, $form->{invtotal} );
# deduct change from first payment
#$form->{"paid_1"} = $form->{invtotal} if $paid > $total;
$form->{paid} = $paid;
if ( $paid > $total ) {
++$form->{paidaccounts};
my $pa = $form->{paidaccounts};
$form->{"paid_$pa"} = $total - $paid;
$form->{"memo_$pa"} = 'cash';
$form->{"exchangerate_$pa"} = 0;
$form->{"AR_paid_$pa"} = $form->{AR_paid_1};
}
( $form->{AR} ) = split /--/, $form->{AR};
if ( IS->post_invoice( \%myconfig, \%$form ) ) {
$form->redirect( $locale->text('Posted!') );
}
else {
$form->error( $locale->text('Cannot post transaction!') );
}
}
sub display_row {
my $numrows = shift;
@column_index =
qw(partnumber description partsgroup qty unit sellprice discount linetotal);
$form->{invsubtotal} = 0;
for ( split / /, $form->{taxaccounts} ) { $form->{"${_}_base"} = 0; }
$column_data{partnumber} =
qq|<th class="listheading" nowrap>| . $locale->text('Number') . qq|</th>|;
$column_data{description} =
qq|<th class="listheading" nowrap>|
. $locale->text('Description')
. qq|</th>|;
$column_data{qty} =
qq|<th class="listheading" nowrap>| . $locale->text('Qty') . qq|</th>|;
$column_data{unit} =
qq|<th class="listheading" nowrap>| . $locale->text('Unit') . qq|</th>|;
$column_data{sellprice} =
qq|<th class="listheading" nowrap>| . $locale->text('Price') . qq|</th>|;
$column_data{linetotal} =
qq|<th class="listheading" nowrap>| . $locale->text('Extended') . qq|</th>|;
$column_data{discount} = qq|<th class="listheading" nowrap>%</th>|;
print qq|
<tr>
<td>
<table width="100%">
<tr class="listheading">|;
for (@column_index) { print "\n$column_data{$_}"; }
print qq|
</tr>
|;
$exchangerate = $form->parse_amount( \%myconfig, $form->{exchangerate} );
$exchangerate = ($exchangerate) ? $exchangerate : 1;
for $i ( 1 .. $numrows ) {
# undo formatting
for (qw(qty discount sellprice)) {
$form->{"${_}_$i"} =
$form->parse_amount( \%myconfig, $form->{"${_}_$i"} );
}
($dec) = ( $form->{"sellprice_$i"} =~ /\.(\d+)/ );
$dec = length $dec;
$decimalplaces = ( $dec > 2 ) ? $dec : 2;
if ( ( $form->{"qty_$i"} != $form->{"oldqty_$i"} )
|| ( $form->{currency} ne $form->{oldcurrency} ) )
{
# check for a pricematrix
@a = split / /, $form->{"pricematrix_$i"};
if ( scalar @a ) {
foreach $item (@a) {
( $q, $p ) = split /:/, $item;
if ( ( $p * 1 ) && ( $form->{"qty_$i"} >= ( $q * 1 ) ) ) {
($dec) = ( $p =~ /\.(\d+)/ );
$dec = length $dec;
$decimalplaces = ( $dec > 2 ) ? $dec : 2;
$form->{"sellprice_$i"} =
$form->round_amount( $p / $exchangerate,
$decimalplaces );
}
}
}
}
$column_data{discount} =
qq|<td align="right"><input name="discount_$i" size="3" value="|
. $form->format_amount( \%myconfig, $form->{"discount_$i"} )
. qq|"></td>|;
$discount =
$form->round_amount(
$form->{"sellprice_$i"} * $form->{"discount_$i"} / 100,
$decimalplaces );
$linetotal = $form->round_amount( $form->{"sellprice_$i"} - $discount,
$decimalplaces );
$linetotal = $form->round_amount( $linetotal * $form->{"qty_$i"}, 2 );
for (qw(partnumber sku description partsgroup unit)) {
$form->{"${_}_$i"} = $form->quote( $form->{"${_}_$i"} );
}
$column_data{partnumber} =
qq|<td><input name="partnumber_$i" size=20 value="$form->{"partnumber_$i"}" accesskey="$i" title="[Alt-$i]"></td>|;
if (
( $rows = $form->numtextrows( $form->{"description_$i"}, 40, 6 ) ) >
1 )
{
$column_data{description} =
qq|<td><textarea name="description_$i" rows=$rows cols=46 wrap=soft>$form->{"description_$i"}</textarea></td>|;
}
else {
$column_data{description} =
qq|<td><input name="description_$i" size=48 value="$form->{"description_$i"}"></td>|;
}
$column_data{qty} =
qq|<td align="right"><input name="qty_$i" size="5" value="|
. $form->format_amount( \%myconfig, $form->{"qty_$i"} )
. qq|"></td>|;
$column_data{unit} = qq|<td>$form->{"unit_$i"}</td>|;
$column_data{sellprice} =
qq|<td align="right"><input name="sellprice_$i" size="9" value="|
. $form->format_amount( \%myconfig, $form->{"sellprice_$i"},
$decimalplaces )
. qq|"></td>|;
$column_data{linetotal} =
qq|<td align="right">|
. $form->format_amount( \%myconfig, $linetotal, 2 )
. qq|</td>|;
print qq|
<tr valign="top">|;
for (@column_index) { print "\n$column_data{$_}"; }
print qq|
</tr>
|;
$form->{"oldqty_$i"} = $form->{"qty_$i"};
for (
qw(id listprice lastcost taxaccounts pricematrix oldqty sku partsgroup unit inventory_accno_id income_accno_id expense_accno_id)
)
{
$form->hide_form("${_}_$i");
}
for ( split / /, $form->{"taxaccounts_$i"} ) {
$form->{"${_}_base"} += $linetotal;
}
$form->{invsubtotal} += $linetotal;
}
print qq|
</table>
</td>
</tr>
<input type="hidden" name="oldcurrency" value="$form->{currency}">
|;
}
sub print {
if ( !$form->{invnumber} ) {
$form->{invnumber} = $form->update_defaults( \%myconfig, 'sinumber' );
}
$rc = $form->{'rowcount'};
$pc = $form->{'paidaccounts'};
if ( $form->{"partnumber_$rc"}
|| $form->{"description_$rc"}
|| $form->{"paid_$pc"} )
{
&update;
exit;
}
open_drawer();
sleep 1;
for $i ( 1 .. $rc - 1 ) {
if ( $form->{"qty_$i"} != $form->{"oldqty_$i"} ) {
&update;
exit;
}
}
if ( !$form->{invnumber} ) {
$form->{invnumber} = $form->update_defaults( \%myconfig, "sinumber" );
if ( $form->{media} eq 'screen' ) {
&update;
exit;
}
}
$old_form = new Form;
for ( keys %$form ) { $old_form->{$_} = $form->{$_}; }
for (qw(employee department)) { $form->{$_} =~ s/--.*
$form->{invdate} = $form->{transdate};
my @lt = localtime();
$form->{dateprinted} = $lt[2] . ":" . $lt[1] . ":" . $lt[0];
&print_form($old_form);
}
sub print_form {
my $old_form = shift;
my $discount = $old_form->{discount};
# if oldcustomer ne customer redo form
$customer = $form->{customer};
$customer =~ s/--.*
$customer .= "--$form->{customer_id}";
if ( $customer ne $form->{oldcustomer} ) {
&update;
exit;
}
&validate_items;
&{"$form->{vc}_details"};
@a = ();
for ( 1 .. $form->{rowcount} ) {
push @a, ( "partnumber_$_", "description_$_" );
}
for ( split / /, $form->{taxaccounts} ) { push @a, "${_}_description"; }
$form->format_string(@a);
# format payment dates
for ( 1 .. $form->{paidaccounts} ) {
$form->{"datepaid_$_"} =
$locale->date( \%myconfig, $form->{"datepaid_$_"} );
}
IS->invoice_details( \%myconfig, \%$form );
$form->{discount} = $discount;
if ( $form->parse_amount( \%myconfig, $form->{total} ) <= 0 ) {
$form->{total} = 0;
}
else {
$form->{change} = 0;
}
for (qw(company address tel fax businessnumber)) {
$form->{$_} = $myconfig{$_};
}
$form->{username} = $myconfig{name};
$form->{address} =~ s/\\n/\n/g;
push @a, qw(company address tel fax businessnumber username);
$form->format_string(@a);
$form->{templates} = "$myconfig{templates}";
$form->{IN} = "$form->{type}.$form->{format}";
if ( $form->{format} =~ /(postscript|pdf)/ ) {
$form->{IN} =~ s/$&$/tex/;
}
if ( $form->{media} ne 'screen' ) {
$form->{OUT} = ${LedgerSMB::Sysconfig::printer}{ $form->{media} };
$form->{printmode} = '|-';
}
$form->{discount} =
$form->format_amount( \%myconfig, $form->{discount} * 100 );
$form->{rowcount}
$form->{pre} = "<body bgcolor=#ffffff>\n<pre>";
delete $form->{stylesheet};
$form->{cd_open} = $pos_config{rp_cash_drawer_open};
$form->parse_template( \%myconfig, ${LedgerSMB::Sysconfig::userspath} );
if ( $form->{printed} !~ /$form->{formname}/ ) {
$form->{printed} .= " $form->{formname}";
$form->{printed} =~ s/^
$form->update_status( \%myconfig );
}
$old_form->{printed} = $form->{printed};
# if we got back here restore the previous form
if ( $form->{media} ne 'screen' ) {
# restore and display form
for ( keys %$old_form ) { $form->{$_} = $old_form->{$_}; }
$form->{exchangerate} =
$form->parse_amount( \%myconfig, $form->{exchangerate} );
for $i ( 1 .. $form->{paidaccounts} ) {
for (qw(paid exchangerate)) {
$form->{"${_}_$i"} =
$form->parse_amount( \%myconfig, $form->{"${_}_$i"} );
}
}
delete $form->{pre};
if ( !$form->{printandpost} ) {
$form->{rowcount}
#&display_form;
}
}
}
sub print_and_post {
$form->{media} = 'Printer';
$form->error( $locale->text('Select a Printer!') )
if ( $form->{media} eq 'screen' );
$form->{printandpost} = 1;
&print;
&post;
}
sub lookup_partsgroup {
$form->{my_partsgroup} =~ s/\r
$form->{action} = $form->{my_partsgroup};
if ( $form->{language_code} ) {
# get english
foreach $item ( split /\n/, $form->{partsgroup} ) {
if ( $item =~ /$form->{action}/ ) {
( $partsgroup, $translation ) = split /--/, $item;
$form->{action} = $partsgroup;
last;
}
}
}
$form->{"partsgroup_$form->{rowcount}"} = $form->{action};
&update;
}
sub print_options {
$form->{PD}{ $form->{type} } = "checked";
print qq|
<input type="hidden" name="format" value="$form->{format}">
<input type="hidden" name="formname" value="$form->{type}">
<table width="100%">
<tr>
|;
$media = qq|
<td><input class="radio" type="radio" name="media" value="screen"></td>
<td>| . $locale->text('Screen') . qq|</td>|;
if ( %{LedgerSMB::Sysconfig::printer} ) {
for ( keys %{LedgerSMB::Sysconfig::printer} ) {
$media .= qq|
<td><input class="radio" type="radio" name="media" value="$_"></td>
<td nowrap>$_</td>
|;
}
}
$media =~ s/(value="\Q$form->{media}\E")/$1 checked/;
print qq|
$media
<td width="99%"> </td>|;
if ( $form->{printed} =~ /$form->{type}/ ) {
print qq|
<th>\|| . $locale->text('Printed') . qq|\|</th>|;
}
print qq|
</tr>
</table>
|;
}
sub receipts {
$form->{title} = $locale->text('Receipts');
$form->{db} = 'ar';
RP->paymentaccounts( \%myconfig, \%$form );
$paymentaccounts = "";
for ( @{ $form->{PR} } ) { $paymentaccounts .= "$_->{accno} "; }
if ( @{ $form->{all_years} } ) {
# accounting years
$form->{<API key>} = "<option>\n";
for ( @{ $form->{all_years} } ) {
$form->{<API key>} .= qq|<option>$_\n|;
}
$form->{<API key>} = "<option>\n";
for ( sort keys %{ $form->{all_month} } ) {
$form->{<API key>} .=
qq|<option value=$_>|
. $locale->text( $form->{all_month}{$_} ) . qq|\n|;
}
$selectfrom = qq|
<tr>
<th align="right">| . $locale->text('Period') . qq|</th>
<td colspan="3">
<select name="month">$form->{<API key>}</select>
<select name="year">$form->{<API key>}</select>
<input name="interval" class="radio" type="radio" value="0" checked> |
. $locale->text('Current') . qq|
<input name="interval" class="radio" type="radio" value="1"> |
. $locale->text('Month') . qq|
<input name="interval" class="radio" type="radio" value="3"> |
. $locale->text('Quarter') . qq|
<input name="interval" class="radio" type="radio" value="12"> |
. $locale->text('Year') . qq|
</td>
</tr>
|;
}
$form->header;
print qq|
<body>
<form method="post" action="$form->{script}">
<input type="hidden" name="title value="$form->{title}">
<input type="hidden" name="paymentaccounts" value="$paymentaccounts">
<input type="hidden" name="till" value="1">
<input type="hidden" name="subtotal" value="1">
<table width="100%">
<tr>
<th class="listtop">$form->{title}</th>
</tr>
<tr height="5"></tr>
<tr>
<td>
<table>
<input type="hidden" name="nextsub" value="list_payments">
<tr>
<th align="right">| . $locale->text('From') . qq|</th>
<td><input name="fromdate" size="11" title="$myconfig{dateformat}" value="$form->{fromdate}"></td>
<th align="right">| . $locale->text('To') . qq|</th>
<td><input name="todate" size="11" title="$myconfig{dateformat}"></td>
</tr>
$selectfrom
<input type="hidden" name="sort" value="transdate">
<input type="hidden" name="db" value="$form->{db}">
</table>
</td>
</tr>
<tr>
<td><hr size="3" noshade></td>
</tr>
</table>
<br>
<input type="hidden" name="path" value="$form->{path}">
<input type="hidden" name="login" value="$form->{login}">
<input type="hidden" name="sessionid" value="$form->{sessionid}">
<button type="submit" class="submit" name="action" value="continue">|
. $locale->text('Continue')
. qq|</button>
|;
if ( $form->{lynx} ) {
require "bin/menu.pl";
&menubar;
}
print qq|
</form>
</body>
</html>
|;
} |
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/mm.h>
#include <linux/fb.h>
#include <linux/msm_mdp.h>
#include <linux/init.h>
#include <linux/kthread.h>
#include <linux/ioport.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <mach/board.h>
#include <linux/uaccess.h>
#include <mach/iommu_domains.h>
#include <linux/workqueue.h>
#include <linux/string.h>
#include <linux/version.h>
#include <linux/proc_fs.h>
#include <linux/vmalloc.h>
#include <linux/debugfs.h>
#include <linux/console.h>
#include <linux/android_pmem.h>
#include <linux/leds.h>
#include <linux/pm_runtime.h>
#include <linux/sync.h>
#include <linux/sw_sync.h>
#include <linux/file.h>
#define MSM_FB_C
#include "msm_fb.h"
#include "mddihosti.h"
#include "tvenc.h"
#include "mdp.h"
#include "mdp4.h"
#ifdef <API key>
#define MSM_FB_NUM 3
#endif
static unsigned char *fbram;
static unsigned char *fbram_phys;
static int fbram_size;
static boolean bf_supported;
/* Set backlight on resume after 50 ms after first
* pan display on the panel. This is to avoid panel specific
* transients during resume.
*/
unsigned long backlight_duration = (HZ/20);
static struct platform_device *pdev_list[MSM_FB_MAX_DEV_LIST];
static int pdev_list_cnt;
int vsync_mode = 1;
#define MAX_BLIT_REQ 256
#define MAX_FBI_LIST 32
static struct fb_info *fbi_list[MAX_FBI_LIST];
static int fbi_list_index;
static struct msm_fb_data_type *mfd_list[MAX_FBI_LIST];
static int mfd_list_index;
static u32 <API key>[16] = {
0x00000000, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff
};
static struct ion_client *iclient;
u32 <API key>;
/* Setting msm_fb_msg_level to 8 prints out ALL messages */
u32 msm_fb_msg_level = 7;
/* Setting mddi_msg_level to 8 prints out ALL messages */
u32 mddi_msg_level = 5;
extern int32 mdp_block_power_cnt[MDP_MAX_BLOCK];
extern unsigned long mdp_timer_duration;
static int msm_fb_register(struct msm_fb_data_type *mfd);
static int msm_fb_open(struct fb_info *info, int user);
static int msm_fb_release(struct fb_info *info, int user);
static int msm_fb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info);
static int <API key>(struct msm_fb_data_type *mfd);
int <API key>(struct msm_fb_data_type *mfd);
static int msm_fb_check_var(struct fb_var_screeninfo *var,
struct fb_info *info);
static int msm_fb_set_par(struct fb_info *info);
static int msm_fb_blank_sub(int blank_mode, struct fb_info *info,
boolean op_enable);
static int msm_fb_suspend_sub(struct msm_fb_data_type *mfd);
static int msm_fb_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg);
static int msm_fb_mmap(struct fb_info *info, struct vm_area_struct * vma);
static int mdp_bl_scale_config(struct msm_fb_data_type *mfd,
struct mdp_bl_scale_data *data);
static void msm_fb_scale_bl(__u32 *bl_lvl);
static int <API key>(void *data);
static int msm_fb_pan_idle(struct msm_fb_data_type *mfd);
#ifdef MSM_FB_ENABLE_DBGFS
#define MSM_FB_MAX_DBGFS 1024
#define <API key> 255
#define <API key> (3 * MSEC_PER_SEC)
#define <API key> (10 * MSEC_PER_SEC)
/* Display op timeout should be greater than total timeout */
#define <API key> (<API key> +\
<API key>) * MDP_MAX_FENCE_FD
#define <API key> 16
int <API key>;
struct dentry *msm_fb_debugfs_root;
struct dentry *msm_fb_debugfs_file[MSM_FB_MAX_DBGFS];
static int bl_scale, bl_min_lvl;
DEFINE_MUTEX(<API key>);
void <API key>(unsigned long data)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)data;
if (!mfd)
pr_err("%s mfd NULL\n", __func__);
complete(&mfd-><API key>);
}
struct dentry *<API key>(void)
{
if (msm_fb_debugfs_root == NULL)
msm_fb_debugfs_root = debugfs_create_dir("msm_fb", NULL);
return msm_fb_debugfs_root;
}
void <API key>(struct dentry *root, const char *name,
u32 *var)
{
if (<API key> >= MSM_FB_MAX_DBGFS)
return;
msm_fb_debugfs_file[<API key>++] =
debugfs_create_u32(name, S_IRUGO | S_IWUSR, root, var);
}
#endif
int msm_fb_cursor(struct fb_info *info, struct fb_cursor *cursor)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
if (!mfd->cursor_update)
return -ENODEV;
return mfd->cursor_update(info, cursor);
}
static int <API key>;
#ifndef CONFIG_FB_BACKLIGHT
static int <API key>;
static void <API key>(struct led_classdev *led_cdev,
enum led_brightness value)
{
struct msm_fb_data_type *mfd = dev_get_drvdata(led_cdev->dev->parent);
int bl_lvl;
/* This maps android backlight level 1 to 255 into
driver backlight level bl_min to bl_max with rounding
and maps backlight level 0 to 0. */
if (value <= 0)
bl_lvl = 0;
else if (value >= <API key>)
bl_lvl = mfd->panel_info.bl_max;
else
bl_lvl = mfd->panel_info.bl_min + ((value - 1) * 2 *
(mfd->panel_info.bl_max - mfd->panel_info.bl_min) +
<API key> - 1) /
(<API key> - 1) / 2;
down(&mfd->sem);
<API key>(mfd, bl_lvl);
up(&mfd->sem);
}
static struct led_classdev backlight_led = {
.name = "lcd-backlight",
.brightness = <API key>,
.brightness_set = <API key>,
};
#endif
static struct <API key> *msm_fb_pdata;
unsigned char hdmi_prim_display;
unsigned char <API key>;
int <API key>(const char *name)
{
int ret = 0;
u32 len;
#ifdef <API key>
u32 id;
#endif
if (!msm_fb_pdata)
return -EPERM;
len = strnlen(name, PANEL_NAME_MAX_LEN);
if (strnlen(msm_fb_pdata->prim_panel_name, PANEL_NAME_MAX_LEN)) {
pr_err("\n name = %s, prim_display = %s",
name, msm_fb_pdata->prim_panel_name);
if (!strncmp((char *)msm_fb_pdata->prim_panel_name,
name, len)) {
if (!strncmp((char *)msm_fb_pdata->prim_panel_name,
"hdmi_msm", len))
hdmi_prim_display = 1;
<API key> =
msm_fb_pdata->ext_resolution;
return 0;
} else {
ret = -EPERM;
}
}
if (strnlen(msm_fb_pdata->ext_panel_name, PANEL_NAME_MAX_LEN)) {
pr_err("\n name = %s, ext_display = %s",
name, msm_fb_pdata->ext_panel_name);
if (!strncmp((char *)msm_fb_pdata->ext_panel_name, name, len))
return 0;
else
ret = -EPERM;
}
if (ret)
return ret;
ret = -EPERM;
if (msm_fb_pdata && msm_fb_pdata->detect_client) {
ret = msm_fb_pdata->detect_client(name);
/* if it's non mddi panel, we need to pre-scan
mddi client to see if we can disable mddi host */
#ifdef <API key>
if (!ret && msm_fb_pdata->mddi_prescan)
id = mddi_get_client_id();
#endif
}
return ret;
}
static ssize_t <API key>(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
struct fb_info *fbi = dev_get_drvdata(dev);
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)fbi->par;
struct msm_fb_panel_data *pdata =
(struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
unsigned long val;
int ret;
if (mfd->panel.type != MIPI_VIDEO_PANEL)
return -EINVAL;
ret = kstrtoul(buf, 10, &val);
if (ret)
return ret;
if ((val <= 0) || (val > 100))
return -EINVAL;
if (pdata->fps_level_change)
pdata->fps_level_change(mfd->pdev, (u32)val);
return count;
}
static ssize_t msm_fb_msm_fb_type(struct device *dev,
struct device_attribute *attr, char *buf)
{
ssize_t ret = 0;
struct fb_info *fbi = dev_get_drvdata(dev);
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)fbi->par;
struct msm_fb_panel_data *pdata =
(struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
switch (pdata->panel_info.type) {
case NO_PANEL:
ret = snprintf(buf, PAGE_SIZE, "no panel\n");
break;
case MDDI_PANEL:
ret = snprintf(buf, PAGE_SIZE, "mddi panel\n");
break;
case EBI2_PANEL:
ret = snprintf(buf, PAGE_SIZE, "ebi2 panel\n");
break;
case LCDC_PANEL:
ret = snprintf(buf, PAGE_SIZE, "lcdc panel\n");
break;
case EXT_MDDI_PANEL:
ret = snprintf(buf, PAGE_SIZE, "ext mddi panel\n");
break;
case TV_PANEL:
ret = snprintf(buf, PAGE_SIZE, "tv panel\n");
break;
case HDMI_PANEL:
ret = snprintf(buf, PAGE_SIZE, "hdmi panel\n");
break;
case LVDS_PANEL:
ret = snprintf(buf, PAGE_SIZE, "lvds panel\n");
break;
case DTV_PANEL:
ret = snprintf(buf, PAGE_SIZE, "dtv panel\n");
break;
case MIPI_VIDEO_PANEL:
ret = snprintf(buf, PAGE_SIZE, "mipi dsi video panel\n");
break;
case MIPI_CMD_PANEL:
ret = snprintf(buf, PAGE_SIZE, "mipi dsi cmd panel\n");
break;
case WRITEBACK_PANEL:
ret = snprintf(buf, PAGE_SIZE, "writeback panel\n");
break;
default:
ret = snprintf(buf, PAGE_SIZE, "unknown panel\n");
break;
}
return ret;
}
static DEVICE_ATTR(msm_fb_type, S_IRUGO, msm_fb_msm_fb_type, NULL);
static DEVICE_ATTR(msm_fb_fps_level, S_IRUGO | S_IWUSR | S_IWGRP, NULL, \
<API key>);
static struct attribute *msm_fb_attrs[] = {
&<API key>.attr,
&<API key>.attr,
NULL,
};
static struct attribute_group msm_fb_attr_group = {
.attrs = msm_fb_attrs,
};
static int msm_fb_create_sysfs(struct platform_device *pdev)
{
int rc;
struct msm_fb_data_type *mfd = <API key>(pdev);
rc = sysfs_create_group(&mfd->fbi->dev->kobj, &msm_fb_attr_group);
if (rc)
MSM_FB_ERR("%s: sysfs group creation failed, rc=%d\n", __func__,
rc);
return rc;
}
static void msm_fb_remove_sysfs(struct platform_device *pdev)
{
struct msm_fb_data_type *mfd = <API key>(pdev);
sysfs_remove_group(&mfd->fbi->dev->kobj, &msm_fb_attr_group);
}
static void <API key>(struct work_struct *work);
static int msm_fb_probe(struct platform_device *pdev)
{
struct msm_fb_data_type *mfd;
int rc;
int err = 0;
MSM_FB_DEBUG("msm_fb_probe\n");
if ((pdev->id == 0) && (pdev->num_resources > 0)) {
msm_fb_pdata = pdev->dev.platform_data;
if (pdev->resource[0].start) {
fbram_size =
pdev->resource[0].end -
pdev->resource[0].start + 1;
fbram_phys = (char *)pdev->resource[0].start;
fbram = __va(fbram_phys);
if (!fbram) {
printk(KERN_ERR "fbram ioremap failed!\n");
return -ENOMEM;
}
} else {
fbram_size = 0;
fbram_phys = NULL;
fbram = NULL;
}
MSM_FB_DEBUG("msm_fb_probe: phy_Addr = 0x%x virt = 0x%x\n",
(int)fbram_phys, (int)fbram);
iclient = <API key>(-1, pdev->name);
if (IS_ERR_OR_NULL(iclient)) {
pr_err("<API key>() return"
" error, val %p\n", iclient);
iclient = NULL;
}
<API key> = 1;
return 0;
}
if (!<API key>)
return -EPERM;
mfd = (struct msm_fb_data_type *)<API key>(pdev);
INIT_DELAYED_WORK(&mfd->backlight_worker, <API key>);
if (!mfd)
return -ENODEV;
if (mfd->key != MFD_KEY)
return -EINVAL;
if (pdev_list_cnt >= MSM_FB_MAX_DEV_LIST)
return -ENOMEM;
vsync_cntrl.dev = mfd->fbi->dev;
mfd->panel_info.frame_count = 0;
mfd->bl_level = 0;
bl_scale = 1024;
bl_min_lvl = 255;
#ifdef <API key>
mfd->overlay_play_enable = 1;
#endif
#ifdef <API key>
mfd->nvrw_prohibit_draw = false;
#endif
bf_supported = <API key>();
rc = msm_fb_register(mfd);
if (rc)
return rc;
err = <API key>(mfd->fbi->dev);
if (err < 0)
printk(KERN_ERR "pm_runtime: fail to set active.\n");
pm_runtime_enable(mfd->fbi->dev);
#ifdef CONFIG_FB_BACKLIGHT
<API key>(mfd);
#else
/* android supports only one lcd-backlight/lcd for now */
if (!<API key>) {
if (<API key>(&pdev->dev, &backlight_led))
printk(KERN_ERR "<API key> failed\n");
else
<API key> = 1;
}
#endif
pdev_list[pdev_list_cnt++] = pdev;
msm_fb_create_sysfs(pdev);
if (mfd->timeline == NULL) {
char timeline_name[<API key>];
snprintf(timeline_name, sizeof(timeline_name),
"mdp_fb_%d", mfd->index);
mfd->timeline = <API key>(timeline_name);
if (mfd->timeline == NULL) {
pr_err("%s: cannot create time line", __func__);
return -ENOMEM;
} else {
mfd->timeline_value = 0;
}
}
return 0;
}
static int msm_fb_remove(struct platform_device *pdev)
{
struct msm_fb_data_type *mfd;
MSM_FB_DEBUG("msm_fb_remove\n");
mfd = (struct msm_fb_data_type *)<API key>(pdev);
msm_fb_pan_idle(mfd);
msm_fb_remove_sysfs(pdev);
pm_runtime_disable(mfd->fbi->dev);
if (!mfd)
return -ENODEV;
if (mfd->key != MFD_KEY)
return -EINVAL;
if (msm_fb_suspend_sub(mfd))
printk(KERN_ERR "msm_fb_remove: can't stop the device %d\n", mfd->index);
if (mfd->channel_irq != 0)
free_irq(mfd->channel_irq, (void *)mfd);
if (mfd-><API key>)
vfree(mfd-><API key>);
if (mfd->vsync_resync_timer.function)
del_timer(&mfd->vsync_resync_timer);
if (mfd->refresh_timer.function)
del_timer(&mfd->refresh_timer);
if (mfd->dma_hrtimer.function)
hrtimer_cancel(&mfd->dma_hrtimer);
if (mfd-><API key>.function)
del_timer(&mfd-><API key>);
complete(&mfd-><API key>);
complete(&mfd->msmfb_update_notify);
kthread_stop(mfd->commit_thread);
/* remove /dev/fb* */
<API key>(mfd->fbi);
#ifdef CONFIG_FB_BACKLIGHT
/* remove /sys/class/backlight */
<API key>(mfd->fbi->bl_dev);
#else
if (<API key>) {
<API key> = 0;
<API key>(&backlight_led);
}
#endif
#ifdef MSM_FB_ENABLE_DBGFS
if (mfd->sub_dir)
debugfs_remove(mfd->sub_dir);
#endif
return 0;
}
#if defined(CONFIG_PM) && !defined(<API key>)
static int msm_fb_suspend(struct platform_device *pdev, pm_message_t state)
{
struct msm_fb_data_type *mfd;
int ret = 0;
MSM_FB_DEBUG("msm_fb_suspend\n");
mfd = (struct msm_fb_data_type *)<API key>(pdev);
if ((!mfd) || (mfd->key != MFD_KEY))
return 0;
msm_fb_pan_idle(mfd);
console_lock();
fb_set_suspend(mfd->fbi, <API key>);
ret = msm_fb_suspend_sub(mfd);
if (ret != 0) {
printk(KERN_ERR "msm_fb: failed to suspend! %d\n", ret);
fb_set_suspend(mfd->fbi, <API key>);
} else {
pdev->dev.power.power_state = state;
}
console_unlock();
return ret;
}
#else
#define msm_fb_suspend NULL
#endif
static void msm_fb_shutdown(struct platform_device *pdev)
{
struct msm_fb_data_type *mfd;
int ret = 0;
MSM_FB_DEBUG("msm_fb_shutdown\n");
mfd = (struct msm_fb_data_type *)<API key>(pdev);
if (mfd) {
if (mfd->op_enable) {
ret = msm_fb_blank_sub(FB_BLANK_POWERDOWN, mfd->fbi,
mfd->op_enable);
}
if (ret)
MSM_FB_INFO
("msm_fb_shutdown: can't turn off display!\n");
mfd->op_enable = FALSE;
mdp_pipe_ctrl(MDP_MASTER_BLOCK, MDP_BLOCK_POWER_OFF, FALSE);
}
}
static int msm_fb_suspend_sub(struct msm_fb_data_type *mfd)
{
int ret = 0;
if ((!mfd) || (mfd->key != MFD_KEY))
return 0;
/*
* suspend this channel
*/
mfd->suspend.<API key> = mfd-><API key>;
mfd->suspend.op_enable = mfd->op_enable;
/*
* For HDMI/DTV, panel needs not to be turned ON during resume
* as power_ctrl will turn ON the HPD at resume which will turn
* ON the panel in case the HDMI cable is still connected.
*/
if (mfd->panel_info.type == HDMI_PANEL ||
mfd->panel_info.type == DTV_PANEL)
mfd->suspend.panel_power_on = false;
else
mfd->suspend.panel_power_on = mfd->panel_power_on;
mfd->suspend.op_suspend = true;
if (mfd->op_enable) {
ret =
msm_fb_blank_sub(FB_BLANK_POWERDOWN, mfd->fbi,
mfd->suspend.op_enable);
if (ret) {
MSM_FB_INFO
("msm_fb_suspend: can't turn off display!\n");
return ret;
}
mfd->op_enable = FALSE;
}
/*
* try to power down
*/
mdp_pipe_ctrl(MDP_MASTER_BLOCK, MDP_BLOCK_POWER_OFF, FALSE);
/*
* detach display channel irq if there's any
* or wait until vsync-resync completes
*/
if ((mfd->dest == DISPLAY_LCD)) {
if (mfd->panel_info.lcd.vsync_enable) {
if (mfd->panel_info.lcd.hw_vsync_mode) {
if (mfd->channel_irq != 0)
disable_irq(mfd->channel_irq);
} else {
volatile boolean vh_pending;
do {
vh_pending = mfd-><API key>;
} while (vh_pending);
}
}
}
return 0;
}
#ifdef CONFIG_PM
static int msm_fb_resume_sub(struct msm_fb_data_type *mfd)
{
int ret = 0;
struct msm_fb_panel_data *pdata = NULL;
if ((!mfd) || (mfd->key != MFD_KEY))
return 0;
pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
/* attach display channel irq if there's any */
if (mfd->channel_irq != 0)
enable_irq(mfd->channel_irq);
/* resume state var recover */
mfd-><API key> = mfd->suspend.<API key>;
mfd->op_enable = mfd->suspend.op_enable;
if (mfd->suspend.panel_power_on) {
if (mfd->panel_driver_on == FALSE)
msm_fb_blank_sub(FB_BLANK_POWERDOWN, mfd->fbi,
mfd->op_enable);
ret =
msm_fb_blank_sub(FB_BLANK_UNBLANK, mfd->fbi,
mfd->op_enable);
if (ret)
MSM_FB_INFO("msm_fb_resume: can't turn on display!\n");
}
mfd->suspend.op_suspend = false;
return ret;
}
#endif
#if defined(CONFIG_PM) && !defined(<API key>)
static int msm_fb_resume(struct platform_device *pdev)
{
/* This resume function is called when interrupt is enabled.
*/
int ret = 0;
struct msm_fb_data_type *mfd;
MSM_FB_DEBUG("msm_fb_resume\n");
mfd = (struct msm_fb_data_type *)<API key>(pdev);
if ((!mfd) || (mfd->key != MFD_KEY))
return 0;
msm_fb_pan_idle(mfd);
console_lock();
ret = msm_fb_resume_sub(mfd);
pdev->dev.power.power_state = PMSG_ON;
fb_set_suspend(mfd->fbi, <API key>);
console_unlock();
return ret;
}
#else
#define msm_fb_resume NULL
#endif
static int <API key>(struct device *dev)
{
dev_dbg(dev, "pm_runtime: suspending...\n");
return 0;
}
static int <API key>(struct device *dev)
{
dev_dbg(dev, "pm_runtime: resuming...\n");
return 0;
}
static int msm_fb_runtime_idle(struct device *dev)
{
dev_dbg(dev, "pm_runtime: idling...\n");
return 0;
}
#if (defined(CONFIG_SUSPEND) && defined(<API key>))
static int msm_fb_ext_suspend(struct device *dev)
{
struct msm_fb_data_type *mfd = dev_get_drvdata(dev);
struct msm_fb_panel_data *pdata = NULL;
int ret = 0;
if (hdmi_prim_display) {
MSM_FB_INFO("%s: hdmi primary handles early suspend only\n",
__func__);
return 0;
}
if ((!mfd) || (mfd->key != MFD_KEY))
return 0;
msm_fb_pan_idle(mfd);
pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
if (mfd->panel_info.type == HDMI_PANEL ||
mfd->panel_info.type == DTV_PANEL) {
ret = msm_fb_suspend_sub(mfd);
/* Turn off the HPD circuitry */
if (pdata->power_ctrl) {
MSM_FB_INFO("%s: Turning off HPD circuitry\n",
__func__);
pdata->power_ctrl(FALSE);
}
}
return ret;
}
static int msm_fb_ext_resume(struct device *dev)
{
struct msm_fb_data_type *mfd = dev_get_drvdata(dev);
struct msm_fb_panel_data *pdata = NULL;
int ret = 0;
if (hdmi_prim_display) {
MSM_FB_INFO("%s: hdmi primary handles early resume only\n",
__func__);
return 0;
}
if ((!mfd) || (mfd->key != MFD_KEY))
return 0;
msm_fb_pan_idle(mfd);
pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
if (mfd->panel_info.type == HDMI_PANEL ||
mfd->panel_info.type == DTV_PANEL) {
/* Turn on the HPD circuitry */
if (pdata->power_ctrl) {
pdata->power_ctrl(TRUE);
MSM_FB_INFO("%s: Turning on HPD circuitry\n",
__func__);
}
ret = msm_fb_resume_sub(mfd);
}
return ret;
}
#endif
static struct dev_pm_ops msm_fb_dev_pm_ops = {
.runtime_suspend = <API key>,
.runtime_resume = <API key>,
.runtime_idle = msm_fb_runtime_idle,
#if (defined(CONFIG_SUSPEND) && defined(<API key>) && \
!defined(<API key>))
.suspend = msm_fb_ext_suspend,
.resume = msm_fb_ext_resume,
#endif
};
static struct platform_driver msm_fb_driver = {
.probe = msm_fb_probe,
.remove = msm_fb_remove,
#ifndef <API key>
.suspend = msm_fb_suspend,
.resume = msm_fb_resume,
#endif
.shutdown = msm_fb_shutdown,
.driver = {
/* Driver name must match the device name added in platform.c. */
.name = "msm_fb",
.pm = &msm_fb_dev_pm_ops,
},
};
#if defined(<API key>) && defined(<API key>)
static void memset32_io(u32 __iomem *_ptr, u32 val, size_t count)
{
count >>= 2;
while (count
writel(val, _ptr++);
}
#endif
#ifdef <API key>
static void msmfb_early_suspend(struct early_suspend *h)
{
struct msm_fb_data_type *mfd = container_of(h, struct msm_fb_data_type,
early_suspend);
struct msm_fb_panel_data *pdata = NULL;
msm_fb_pan_idle(mfd);
#if defined(<API key>)
/*
* For MDP with overlay, set framebuffer with black pixels
* to show black screen on HDMI.
*/
struct fb_info *fbi = mfd->fbi;
switch (mfd->fbi->var.bits_per_pixel) {
case 32:
if (fbi->screen_base)
memset32_io((void *)fbi->screen_base, 0xFF000000,
fbi->fix.smem_len);
break;
default:
if (fbi->screen_base)
memset32_io((void *)fbi->screen_base, 0x00,
fbi->fix.smem_len);
break;
}
#endif
msm_fb_suspend_sub(mfd);
pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
if (hdmi_prim_display &&
(mfd->panel_info.type == HDMI_PANEL ||
mfd->panel_info.type == DTV_PANEL)) {
/* Turn off the HPD circuitry */
if (pdata->power_ctrl) {
MSM_FB_INFO("%s: Turning off HPD circuitry\n",
__func__);
pdata->power_ctrl(FALSE);
}
}
}
static void msmfb_early_resume(struct early_suspend *h)
{
struct msm_fb_data_type *mfd = container_of(h, struct msm_fb_data_type,
early_suspend);
struct msm_fb_panel_data *pdata = NULL;
msm_fb_pan_idle(mfd);
pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
if (hdmi_prim_display &&
(mfd->panel_info.type == HDMI_PANEL ||
mfd->panel_info.type == DTV_PANEL)) {
/* Turn on the HPD circuitry */
if (pdata->power_ctrl) {
MSM_FB_INFO("%s: Turning on HPD circuitry\n", __func__);
pdata->power_ctrl(TRUE);
}
}
msm_fb_resume_sub(mfd);
}
#endif
static int unset_bl_level, bl_updated;
static int bl_level_old;
static int mdp_bl_scale_config(struct msm_fb_data_type *mfd,
struct mdp_bl_scale_data *data)
{
int ret = 0;
int curr_bl;
down(&mfd->sem);
curr_bl = mfd->bl_level;
bl_scale = data->scale;
bl_min_lvl = data->min_lvl;
pr_debug("%s: update scale = %d, min_lvl = %d\n", __func__, bl_scale,
bl_min_lvl);
/* update current backlight to use new scaling*/
<API key>(mfd, curr_bl);
up(&mfd->sem);
return ret;
}
static void msm_fb_scale_bl(__u32 *bl_lvl)
{
__u32 temp = *bl_lvl;
pr_debug("%s: input = %d, scale = %d", __func__, temp, bl_scale);
if (temp >= bl_min_lvl) {
/* bl_scale is the numerator of scaling fraction (x/1024)*/
temp = ((*bl_lvl) * bl_scale) / 1024;
/*if less than minimum level, use min level*/
if (temp < bl_min_lvl)
temp = bl_min_lvl;
}
pr_debug("%s: output = %d", __func__, temp);
(*bl_lvl) = temp;
}
/*must call this function from within mfd->sem*/
void <API key>(struct msm_fb_data_type *mfd, __u32 bkl_lvl)
{
struct msm_fb_panel_data *pdata;
__u32 temp = bkl_lvl;
if (!mfd->panel_power_on || !bl_updated) {
unset_bl_level = bkl_lvl;
return;
} else {
unset_bl_level = 0;
}
pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
if ((pdata) && (pdata->set_backlight)) {
msm_fb_scale_bl(&temp);
if (bl_level_old == temp) {
return;
}
mfd->bl_level = temp;
pdata->set_backlight(mfd);
mfd->bl_level = bkl_lvl;
bl_level_old = temp;
}
}
static int msm_fb_blank_sub(int blank_mode, struct fb_info *info,
boolean op_enable)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
struct msm_fb_panel_data *pdata = NULL;
int ret = 0;
pdata = (struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
if ((!pdata) || (!pdata->on) || (!pdata->off)) {
printk(KERN_ERR "msm_fb_blank_sub: no panel operation detected!\n");
return -ENODEV;
}
switch (blank_mode) {
case FB_BLANK_UNBLANK:
if (!mfd->panel_power_on) {
if (pdata-><API key>)
pdata-><API key> = 1;
mutex_lock(&mfd->power_lock);
ret = pdata->on(mfd->pdev);
if (ret == 0) {
mfd->panel_power_on = TRUE;
mfd->panel_driver_on = mfd->op_enable;
}
mutex_unlock(&mfd->power_lock);
/* ToDo: possible conflict with android which doesn't expect sw refresher */
/*
if (!mfd->hw_refresh)
{
if ((ret = <API key>(mfd)) != 0)
{
MSM_FB_INFO("msm_fb_blank_sub: <API key> failed = %d!\n",ret);
}
}
*/
}
break;
case <API key>:
case <API key>:
case FB_BLANK_NORMAL:
case FB_BLANK_POWERDOWN:
default:
if (mfd->panel_power_on) {
int curr_pwr_state;
mutex_lock(&mfd->power_lock);
mfd->op_enable = FALSE;
curr_pwr_state = mfd->panel_power_on;
down(&mfd->sem);
mfd->panel_power_on = FALSE;
if (mfd->fbi->node == 0)
bl_updated = 0;
up(&mfd->sem);
<API key>(&mfd->backlight_worker);
bl_updated = 0;
if (mfd-><API key>.function)
del_timer(&mfd-><API key>);
complete(&mfd-><API key>);
/* clean fb to prevent displaying old fb */
if (info->screen_base)
memset((void *)info->screen_base, 0,
info->fix.smem_len);
ret = pdata->off(mfd->pdev);
if (ret)
mfd->panel_power_on = curr_pwr_state;
mutex_unlock(&mfd->power_lock);
<API key>(mfd);
mfd->op_enable = TRUE;
}
break;
}
return ret;
}
int calc_fb_offset(struct msm_fb_data_type *mfd, struct fb_info *fbi, int bpp)
{
struct msm_panel_info *panel_info = &mfd->panel_info;
int remainder, yres, offset;
if (panel_info->mode2_yres != 0) {
yres = panel_info->mode2_yres;
remainder = (fbi->fix.line_length*yres) & (PAGE_SIZE - 1);
} else {
yres = panel_info->yres;
remainder = (fbi->fix.line_length*yres) & (PAGE_SIZE - 1);
}
if (!remainder)
remainder = PAGE_SIZE;
if (fbi->var.yoffset < yres) {
offset = (fbi->var.xoffset * bpp);
/* iBuf->buf += fbi->var.xoffset * bpp + 0 *
yres * fbi->fix.line_length; */
} else if (fbi->var.yoffset >= yres && fbi->var.yoffset < 2 * yres) {
offset = (fbi->var.xoffset * bpp + yres *
fbi->fix.line_length + PAGE_SIZE - remainder);
} else {
offset = (fbi->var.xoffset * bpp + 2 * yres *
fbi->fix.line_length + 2 * (PAGE_SIZE - remainder));
}
return offset;
}
static void msm_fb_fillrect(struct fb_info *info,
const struct fb_fillrect *rect)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
msm_fb_pan_idle(mfd);
cfb_fillrect(info, rect);
if (!mfd->hw_refresh && (info->var.yoffset == 0) &&
!mfd-><API key>) {
struct fb_var_screeninfo var;
var = info->var;
var.reserved[0] = 0x54445055;
var.reserved[1] = (rect->dy << 16) | (rect->dx);
var.reserved[2] = ((rect->dy + rect->height) << 16) |
(rect->dx + rect->width);
msm_fb_pan_display(&var, info);
}
}
static void msm_fb_copyarea(struct fb_info *info,
const struct fb_copyarea *area)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
msm_fb_pan_idle(mfd);
cfb_copyarea(info, area);
if (!mfd->hw_refresh && (info->var.yoffset == 0) &&
!mfd-><API key>) {
struct fb_var_screeninfo var;
var = info->var;
var.reserved[0] = 0x54445055;
var.reserved[1] = (area->dy << 16) | (area->dx);
var.reserved[2] = ((area->dy + area->height) << 16) |
(area->dx + area->width);
msm_fb_pan_display(&var, info);
}
}
static void msm_fb_imageblit(struct fb_info *info, const struct fb_image *image)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
msm_fb_pan_idle(mfd);
cfb_imageblit(info, image);
if (!mfd->hw_refresh && (info->var.yoffset == 0) &&
!mfd-><API key>) {
struct fb_var_screeninfo var;
var = info->var;
var.reserved[0] = 0x54445055;
var.reserved[1] = (image->dy << 16) | (image->dx);
var.reserved[2] = ((image->dy + image->height) << 16) |
(image->dx + image->width);
msm_fb_pan_display(&var, info);
}
}
static int msm_fb_blank(int blank_mode, struct fb_info *info)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
if (blank_mode == FB_BLANK_POWERDOWN) {
struct fb_event event;
event.info = info;
event.data = &blank_mode;
<API key>(FB_EVENT_BLANK, &event);
}
msm_fb_pan_idle(mfd);
if (mfd->op_enable == 0) {
if (blank_mode == FB_BLANK_UNBLANK) {
mfd->suspend.panel_power_on = TRUE;
/* if unblank is called when system is in suspend,
wait for the system to resume */
while (mfd->suspend.op_suspend) {
pr_debug("waiting for system to resume\n");
msleep(20);
}
}
else
mfd->suspend.panel_power_on = FALSE;
}
return msm_fb_blank_sub(blank_mode, info, mfd->op_enable);
}
static int msm_fb_set_lut(struct fb_cmap *cmap, struct fb_info *info)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
if (!mfd->lut_update)
return -ENODEV;
mfd->lut_update(info, cmap);
return 0;
}
/*
* Custom Framebuffer mmap() function for MSM driver.
* Differs from standard mmap() function by allowing for customized
* page-protection.
*/
static int msm_fb_mmap(struct fb_info *info, struct vm_area_struct * vma)
{
/* Get frame buffer memory range. */
unsigned long start = info->fix.smem_start;
u32 len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len);
unsigned long off = vma->vm_pgoff << PAGE_SHIFT;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
if (!start)
return -EINVAL;
if ((vma->vm_end <= vma->vm_start) ||
(off >= len) ||
((vma->vm_end - vma->vm_start) > (len - off)))
return -EINVAL;
msm_fb_pan_idle(mfd);
/* Set VM flags. */
start &= PAGE_MASK;
off += start;
if (off < start)
return -EINVAL;
vma->vm_pgoff = off >> PAGE_SHIFT;
/* This is an IO map - tell maydump to skip this VMA */
vma->vm_flags |= VM_IO | VM_RESERVED;
/* Set VM page protection */
if (mfd-><API key> == <API key>)
vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
else if (mfd-><API key> ==
<API key>)
vma->vm_page_prot = <API key>(vma->vm_page_prot);
else if (mfd-><API key> ==
<API key>)
vma->vm_page_prot = <API key>(vma->vm_page_prot);
else if (mfd-><API key> ==
<API key>)
vma->vm_page_prot = <API key>(vma->vm_page_prot);
else
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
/* Remap the frame buffer I/O range */
if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT,
vma->vm_end - vma->vm_start,
vma->vm_page_prot))
return -EAGAIN;
return 0;
}
static struct fb_ops msm_fb_ops = {
.owner = THIS_MODULE,
.fb_open = msm_fb_open,
.fb_release = msm_fb_release,
.fb_read = NULL,
.fb_write = NULL,
.fb_cursor = NULL,
.fb_check_var = msm_fb_check_var, /* vinfo check */
.fb_set_par = msm_fb_set_par, /* set the video mode according to info->var */
.fb_setcolreg = NULL, /* set color register */
.fb_blank = msm_fb_blank, /* blank display */
.fb_pan_display = msm_fb_pan_display, /* pan display */
.fb_fillrect = msm_fb_fillrect, /* Draws a rectangle */
.fb_copyarea = msm_fb_copyarea, /* Copy data from area to another */
.fb_imageblit = msm_fb_imageblit, /* Draws a image to the display */
.fb_rotate = NULL,
.fb_sync = NULL, /* wait for blit idle, optional */
.fb_ioctl = msm_fb_ioctl, /* perform fb specific ioctl (optional) */
.fb_mmap = msm_fb_mmap,
};
static __u32 msm_fb_line_length(__u32 fb_index, __u32 xres, int bpp)
{
/* The adreno GPU hardware requires that the pitch be aligned to
32 pixels for color buffers, so for the cases where the GPU
is writing directly to fb0, the framebuffer pitch
also needs to be 32 pixel aligned */
if (fb_index == 0)
return ALIGN(xres, 32) * bpp;
else
return xres * bpp;
}
static int msm_fb_register(struct msm_fb_data_type *mfd)
{
int ret = -ENODEV;
int bpp;
struct msm_panel_info *panel_info = &mfd->panel_info;
struct fb_info *fbi = mfd->fbi;
struct fb_fix_screeninfo *fix;
struct fb_var_screeninfo *var;
int *id;
int fbram_offset;
int remainder, remainder_mode2;
/*
* fb info initialization
*/
fix = &fbi->fix;
var = &fbi->var;
fix->type_aux = 0; /* if type == <API key> */
fix->visual = FB_VISUAL_TRUECOLOR; /* True Color */
fix->ywrapstep = 0; /* No support */
fix->mmio_start = 0; /* No MMIO Address */
fix->mmio_len = 0; /* No MMIO Address */
fix->accel = FB_ACCEL_NONE;/* FB_ACCEL_MSM needes to be added in fb.h */
var->xoffset = 0; /* Offset from virtual to visible */
var->yoffset = 0; /* resolution */
var->grayscale = 0; /* No graylevels */
var->nonstd = 0; /* standard pixel format */
var->activate = FB_ACTIVATE_VBL; /* activate it at vsync */
/* height of picture in mm */
if (panel_info && panel_info->height)
var->height = panel_info->height;
else
var->height = -1;
/* width of picture in mm */
if (panel_info && panel_info->width)
var->width = panel_info->width;
else
var->width = -1;
var->accel_flags = 0; /* acceleration flags */
var->sync = 0; /* see FB_SYNC_* */
var->rotate = 0; /* angle we rotate counter clockwise */
mfd->op_enable = FALSE;
switch (mfd->fb_imgType) {
case MDP_RGB_565:
fix->type = <API key>;
fix->xpanstep = 1;
fix->ypanstep = 1;
var->vmode = <API key>;
var->blue.offset = 0;
var->green.offset = 5;
var->red.offset = 11;
var->blue.length = 5;
var->green.length = 6;
var->red.length = 5;
var->blue.msb_right = 0;
var->green.msb_right = 0;
var->red.msb_right = 0;
var->transp.offset = 0;
var->transp.length = 0;
bpp = 2;
break;
case MDP_RGB_888:
fix->type = <API key>;
fix->xpanstep = 1;
fix->ypanstep = 1;
var->vmode = <API key>;
var->blue.offset = 0;
var->green.offset = 8;
var->red.offset = 16;
var->blue.length = 8;
var->green.length = 8;
var->red.length = 8;
var->blue.msb_right = 0;
var->green.msb_right = 0;
var->red.msb_right = 0;
var->transp.offset = 0;
var->transp.length = 0;
bpp = 3;
break;
case MDP_ARGB_8888:
fix->type = <API key>;
fix->xpanstep = 1;
fix->ypanstep = 1;
var->vmode = <API key>;
var->blue.offset = 0;
var->green.offset = 8;
var->red.offset = 16;
var->blue.length = 8;
var->green.length = 8;
var->red.length = 8;
var->blue.msb_right = 0;
var->green.msb_right = 0;
var->red.msb_right = 0;
var->transp.offset = 24;
var->transp.length = 8;
bpp = 4;
break;
case MDP_RGBA_8888:
fix->type = <API key>;
fix->xpanstep = 1;
fix->ypanstep = 1;
var->vmode = <API key>;
var->blue.offset = 8;
var->green.offset = 16;
var->red.offset = 24;
var->blue.length = 8;
var->green.length = 8;
var->red.length = 8;
var->blue.msb_right = 0;
var->green.msb_right = 0;
var->red.msb_right = 0;
var->transp.offset = 0;
var->transp.length = 8;
bpp = 4;
break;
case MDP_YCRYCB_H2V1:
/* ToDo: need to check TV-Out YUV422i framebuffer format */
/* we might need to create new type define */
fix->type = <API key>;
fix->xpanstep = 2;
fix->ypanstep = 1;
var->vmode = <API key>;
/* how about R/G/B offset? */
var->blue.offset = 0;
var->green.offset = 5;
var->red.offset = 11;
var->blue.length = 5;
var->green.length = 6;
var->red.length = 5;
var->blue.msb_right = 0;
var->green.msb_right = 0;
var->red.msb_right = 0;
var->transp.offset = 0;
var->transp.length = 0;
bpp = 2;
break;
default:
MSM_FB_ERR("msm_fb_init: fb %d unkown image type!\n",
mfd->index);
return ret;
}
fix->type = panel_info->is_3d_panel;
fix->line_length = msm_fb_line_length(mfd->index, panel_info->xres,
bpp);
/* Make sure all buffers can be addressed on a page boundary by an x
* and y offset */
remainder = (fix->line_length * panel_info->yres) & (PAGE_SIZE - 1);
/* PAGE_SIZE is a power of 2 */
if (!remainder)
remainder = PAGE_SIZE;
remainder_mode2 = (fix->line_length *
panel_info->mode2_yres) & (PAGE_SIZE - 1);
if (!remainder_mode2)
remainder_mode2 = PAGE_SIZE;
/*
* calculate smem_len based on max size of two supplied modes.
* Only fb0 has mem. fb1 and fb2 don't have mem.
*/
if (!bf_supported || mfd->index == 0)
fix->smem_len = MAX((msm_fb_line_length(mfd->index,
panel_info->xres,
bpp) *
panel_info->yres + PAGE_SIZE -
remainder) * mfd->fb_page,
(msm_fb_line_length(mfd->index,
panel_info->mode2_xres,
bpp) *
panel_info->mode2_yres + PAGE_SIZE -
remainder_mode2) * mfd->fb_page);
else if (mfd->index == 1 || mfd->index == 2) {
pr_debug("%s:%d no memory is allocated for fb%d!\n",
__func__, __LINE__, mfd->index);
fix->smem_len = 0;
}
mfd->var_xres = panel_info->xres;
mfd->var_yres = panel_info->yres;
mfd->var_frame_rate = panel_info->frame_rate;
var->pixclock = mfd->panel_info.clk_rate;
mfd->var_pixclock = var->pixclock;
var->xres = panel_info->xres;
var->yres = panel_info->yres;
var->xres_virtual = panel_info->xres;
var->yres_virtual = panel_info->yres * mfd->fb_page +
((PAGE_SIZE - remainder)/fix->line_length) * mfd->fb_page;
var->bits_per_pixel = bpp * 8; /* FrameBuffer color depth */
var->reserved[3] = <API key>(mfd);
/*
* id field for fb app
*/
id = (int *)&mfd->panel;
switch (mdp_rev) {
case MDP_REV_20:
snprintf(fix->id, sizeof(fix->id), "msmfb20_%x", (__u32) *id);
break;
case MDP_REV_22:
snprintf(fix->id, sizeof(fix->id), "msmfb22_%x", (__u32) *id);
break;
case MDP_REV_30:
snprintf(fix->id, sizeof(fix->id), "msmfb30_%x", (__u32) *id);
break;
case MDP_REV_303:
snprintf(fix->id, sizeof(fix->id), "msmfb303_%x", (__u32) *id);
break;
case MDP_REV_31:
snprintf(fix->id, sizeof(fix->id), "msmfb31_%x", (__u32) *id);
break;
case MDP_REV_40:
snprintf(fix->id, sizeof(fix->id), "msmfb40_%x", (__u32) *id);
break;
case MDP_REV_41:
snprintf(fix->id, sizeof(fix->id), "msmfb41_%x", (__u32) *id);
break;
case MDP_REV_42:
snprintf(fix->id, sizeof(fix->id), "msmfb42_%x", (__u32) *id);
break;
case MDP_REV_43:
snprintf(fix->id, sizeof(fix->id), "msmfb43_%x", (__u32) *id);
break;
case MDP_REV_44:
snprintf(fix->id, sizeof(fix->id), "msmfb44_%x", (__u32) *id);
break;
default:
snprintf(fix->id, sizeof(fix->id), "msmfb0_%x", (__u32) *id);
break;
}
fbi->fbops = &msm_fb_ops;
fbi->flags = FBINFO_FLAG_DEFAULT;
fbi->pseudo_palette = <API key>;
mfd->ref_cnt = 0;
mfd-><API key> = FALSE;
mfd-><API key> = TRUE;
mfd->panel_power_on = FALSE;
mfd->pan_waiting = FALSE;
init_completion(&mfd->pan_comp);
init_completion(&mfd->refresher_comp);
sema_init(&mfd->sem, 1);
init_timer(&mfd-><API key>);
mfd-><API key>.function =
<API key>;
mfd-><API key>.data = (unsigned long)mfd;
init_completion(&mfd->msmfb_update_notify);
init_completion(&mfd-><API key>);
init_completion(&mfd->commit_comp);
mutex_init(&mfd->sync_mutex);
mutex_init(&mfd->queue_mutex);
init_waitqueue_head(&mfd->commit_queue);
mfd->commit_thread = kthread_run(<API key>, mfd,
"msmfb_commit_thread");
mfd->msm_fb_backup = kzalloc(sizeof(struct msm_fb_backup_type),
GFP_KERNEL);
if (mfd->msm_fb_backup == 0) {
pr_err("error: not enough memory!\n");
return -ENOMEM;
}
if (fbram) {
fbram_offset = PAGE_ALIGN((int)fbram)-(int)fbram;
fbram += fbram_offset;
fbram_phys += fbram_offset;
fbram_size -= fbram_offset;
} else
fbram_offset = 0;
if ((!bf_supported || mfd->index == 0) && fbram)
if (fbram_size < fix->smem_len) {
pr_err("error: no more framebuffer memory!\n");
return -ENOMEM;
}
fbi->screen_base = fbram;
fbi->fix.smem_start = (unsigned long)fbram_phys;
if (fbi->fix.smem_start) {
<API key>(fbi->fix.smem_start,
<API key>,
GEN_POOL,
fbi->fix.smem_len,
SZ_4K,
0,
&(mfd->display_iova));
<API key>(fbi->fix.smem_start,
DISPLAY_READ_DOMAIN,
GEN_POOL,
fbi->fix.smem_len,
SZ_4K,
0,
&(mfd->display_iova));
<API key>(fbi->fix.smem_start,
ROTATOR_SRC_DOMAIN,
GEN_POOL,
fbi->fix.smem_len,
SZ_4K,
0,
&(mfd->rotator_iova));
}
if ((!bf_supported || mfd->index == 0) && fbi->screen_base)
memset(fbi->screen_base, 0x0, fix->smem_len);
mfd->op_enable = TRUE;
mfd->panel_power_on = FALSE;
/* cursor memory allocation */
if (mfd->cursor_update) {
unsigned long cursor_buf_iommu = 0;
mfd->cursor_buf = dma_alloc_coherent(NULL,
MDP_CURSOR_SIZE,
(dma_addr_t *) &mfd->cursor_buf_phys,
GFP_KERNEL);
<API key>((unsigned long)mfd->cursor_buf_phys,
DISPLAY_READ_DOMAIN,
GEN_POOL,
MDP_CURSOR_SIZE,
SZ_4K,
0,
&cursor_buf_iommu);
if (cursor_buf_iommu)
mfd->cursor_buf_phys = (void *)cursor_buf_iommu;
if (!mfd->cursor_buf)
mfd->cursor_update = 0;
}
if (mfd->lut_update) {
ret = fb_alloc_cmap(&fbi->cmap, 256, 0);
if (ret)
printk(KERN_ERR "%s: fb_alloc_cmap() failed!\n",
__func__);
}
if (<API key>(fbi) < 0) {
if (mfd->lut_update)
fb_dealloc_cmap(&fbi->cmap);
if (mfd->cursor_buf)
dma_free_coherent(NULL,
MDP_CURSOR_SIZE,
mfd->cursor_buf,
(dma_addr_t) mfd->cursor_buf_phys);
mfd->op_enable = FALSE;
return -EPERM;
}
if (fbram) {
fbram += fix->smem_len;
fbram_phys += fix->smem_len;
fbram_size -= fix->smem_len;
}
MSM_FB_INFO
("FrameBuffer[%d] %dx%dx%d size=%d bytes is registered successfully!\n",
mfd->index, fbi->var.xres, fbi->var.yres, fbi->var.bits_per_pixel,
fbi->fix.smem_len);
ret = 0;
#ifdef <API key>
if (hdmi_prim_display ||
(mfd->panel_info.type != DTV_PANEL)) {
mfd->early_suspend.suspend = msmfb_early_suspend;
mfd->early_suspend.resume = msmfb_early_resume;
mfd->early_suspend.level = <API key> - 2;
<API key>(&mfd->early_suspend);
}
#endif
#ifdef MSM_FB_ENABLE_DBGFS
{
struct dentry *root;
struct dentry *sub_dir;
char sub_name[2];
root = <API key>();
if (root != NULL) {
sub_name[0] = (char)(mfd->index + 0x30);
sub_name[1] = '\0';
sub_dir = debugfs_create_dir(sub_name, root);
} else {
sub_dir = NULL;
}
mfd->sub_dir = sub_dir;
if (sub_dir) {
<API key>(sub_dir, "op_enable",
(u32 *) &mfd->op_enable);
<API key>(sub_dir, "panel_power_on",
(u32 *) &mfd->
panel_power_on);
<API key>(sub_dir, "ref_cnt",
(u32 *) &mfd->ref_cnt);
<API key>(sub_dir, "fb_imgType",
(u32 *) &mfd->fb_imgType);
<API key>(sub_dir,
"<API key>",
(u32 *) &mfd->
<API key>);
<API key>(sub_dir,
"<API key>",
(u32 *) &mfd->
<API key>);
<API key>(sub_dir, "xres",
(u32 *) &mfd->panel_info.
xres);
<API key>(sub_dir, "yres",
(u32 *) &mfd->panel_info.
yres);
<API key>(sub_dir, "bpp",
(u32 *) &mfd->panel_info.
bpp);
<API key>(sub_dir, "type",
(u32 *) &mfd->panel_info.
type);
<API key>(sub_dir, "wait_cycle",
(u32 *) &mfd->panel_info.
wait_cycle);
<API key>(sub_dir, "pdest",
(u32 *) &mfd->panel_info.
pdest);
<API key>(sub_dir, "backbuff",
(u32 *) &mfd->panel_info.
fb_num);
<API key>(sub_dir, "clk_rate",
(u32 *) &mfd->panel_info.
clk_rate);
<API key>(sub_dir, "frame_count",
(u32 *) &mfd->panel_info.
frame_count);
switch (mfd->dest) {
case DISPLAY_LCD:
<API key>(sub_dir,
"vsync_enable",
(u32 *)&mfd->panel_info.lcd.vsync_enable);
<API key>(sub_dir,
"refx100",
(u32 *) &mfd->panel_info.lcd. refx100);
<API key>(sub_dir,
"v_back_porch",
(u32 *) &mfd->panel_info.lcd.v_back_porch);
<API key>(sub_dir,
"v_front_porch",
(u32 *) &mfd->panel_info.lcd.v_front_porch);
<API key>(sub_dir,
"v_pulse_width",
(u32 *) &mfd->panel_info.lcd.v_pulse_width);
<API key>(sub_dir,
"hw_vsync_mode",
(u32 *) &mfd->panel_info.lcd.hw_vsync_mode);
<API key>(sub_dir,
"<API key>", (u32 *)
&mfd->panel_info.lcd.<API key>);
break;
case DISPLAY_LCDC:
<API key>(sub_dir,
"h_back_porch",
(u32 *) &mfd->panel_info.lcdc.h_back_porch);
<API key>(sub_dir,
"h_front_porch",
(u32 *) &mfd->panel_info.lcdc.h_front_porch);
<API key>(sub_dir,
"h_pulse_width",
(u32 *) &mfd->panel_info.lcdc.h_pulse_width);
<API key>(sub_dir,
"v_back_porch",
(u32 *) &mfd->panel_info.lcdc.v_back_porch);
<API key>(sub_dir,
"v_front_porch",
(u32 *) &mfd->panel_info.lcdc.v_front_porch);
<API key>(sub_dir,
"v_pulse_width",
(u32 *) &mfd->panel_info.lcdc.v_pulse_width);
<API key>(sub_dir,
"border_clr",
(u32 *) &mfd->panel_info.lcdc.border_clr);
<API key>(sub_dir,
"underflow_clr",
(u32 *) &mfd->panel_info.lcdc.underflow_clr);
<API key>(sub_dir,
"hsync_skew",
(u32 *) &mfd->panel_info.lcdc.hsync_skew);
break;
default:
break;
}
}
}
#endif /* MSM_FB_ENABLE_DBGFS */
return ret;
}
static int msm_fb_open(struct fb_info *info, int user)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
bool unblank = true;
int result;
result = pm_runtime_get_sync(info->dev);
if (result < 0) {
printk(KERN_ERR "pm_runtime: fail to wake up\n");
}
if (info->node == 0 && !(mfd->cont_splash_done)) { /* primary */
mfd->ref_cnt++;
return 0;
}
if (mfd->op_enable == 0) {
if (!mfd->ref_cnt && info->node == 2)
return -EPERM;
/* if system is in suspend mode, do not unblank */
mfd->ref_cnt++;
return 0;
}
if (!mfd->ref_cnt) {
if (!bf_supported ||
(info->node != 1 && info->node != 2))
<API key>(info, NULL, TRUE);
else
pr_debug("%s:%d no <API key> %d\n",
__func__, __LINE__, info->node);
if (mfd->is_panel_ready && !mfd->is_panel_ready())
unblank = false;
if (unblank && (mfd->panel_info.type != DTV_PANEL)) {
if (msm_fb_blank_sub(FB_BLANK_UNBLANK, info, TRUE)) {
pr_err("msm_fb_open: can't turn on display\n");
return -EINVAL;
}
}
}
mfd->ref_cnt++;
return 0;
}
static void <API key>(struct msm_fb_data_type *mfd)
{
return <API key>(mfd);
}
static int msm_fb_release(struct fb_info *info, int user)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
int ret = 0;
if (!mfd->ref_cnt) {
MSM_FB_INFO("msm_fb_release: try to close unopened fb %d!\n",
mfd->index);
return -EINVAL;
}
msm_fb_pan_idle(mfd);
mfd->ref_cnt
if (!mfd->ref_cnt) {
if (mfd->op_enable) {
ret = msm_fb_blank_sub(FB_BLANK_POWERDOWN, info,
mfd->op_enable);
if (ret != 0) {
printk(KERN_ERR "msm_fb_release: can't turn off display!\n");
return ret;
}
} else {
<API key>(mfd);
}
}
pm_runtime_put(info->dev);
return ret;
}
void <API key>(struct msm_fb_data_type *mfd)
{
int i, ret = 0;
/* buf sync */
for (i = 0; i < mfd->acq_fen_cnt; i++) {
ret = sync_fence_wait(mfd->acq_fen[i],
<API key>);
if (ret == -ETIME) {
pr_warn("%s: sync_fence_wait timed out!"
"Waiting %ld more seconds\n",
__func__,<API key>/MSEC_PER_SEC);
ret = sync_fence_wait(mfd->acq_fen[i],
<API key>);
}
if (ret < 0) {
pr_err("%s: sync_fence_wait failed! ret = %x\n",
__func__, ret);
break;
}
sync_fence_put(mfd->acq_fen[i]);
}
if (ret < 0) {
while (i < mfd->acq_fen_cnt) {
sync_fence_put(mfd->acq_fen[i]);
i++;
}
}
mfd->acq_fen_cnt = 0;
}
int <API key>(struct msm_fb_data_type *mfd)
{
mutex_lock(&mfd->sync_mutex);
if (mfd->timeline && !list_empty((const struct list_head *)
(&(mfd->timeline->obj.active_list_head)))) {
<API key>(mfd->timeline, 1);
mfd->timeline_value++;
}
if (atomic_read(&mfd->commit_cnt) > 0)
atomic_dec(&mfd->commit_cnt);
mutex_unlock(&mfd->sync_mutex);
return 0;
}
void <API key>(struct msm_fb_data_type *mfd)
{
u32 commit_cnt;
mutex_lock(&mfd->sync_mutex);
commit_cnt = atomic_read(&mfd->commit_cnt) + 3;
if (commit_cnt < 0)
commit_cnt = 0;
if (mfd->timeline) {
<API key>(mfd->timeline, 2 + commit_cnt);
mfd->timeline_value += 2 + commit_cnt;
}
atomic_set(&mfd->commit_cnt, 0);
mutex_unlock(&mfd->sync_mutex);
}
DEFINE_SEMAPHORE(msm_fb_pan_sem);
static int msm_fb_pan_idle(struct msm_fb_data_type *mfd)
{
int ret = 0;
mutex_lock(&mfd->sync_mutex);
if (mfd->is_committing) {
mutex_unlock(&mfd->sync_mutex);
ret = <API key>(
&mfd->commit_comp,
msecs_to_jiffies(<API key>));
if (ret < 0)
ret = -ERESTARTSYS;
else if (!ret)
pr_err("%s wait for commit_comp timeout %d %d",
__func__, ret, mfd->is_committing);
if (ret <= 0) {
mutex_lock(&mfd->sync_mutex);
mfd->is_committing = 0;
complete_all(&mfd->commit_comp);
mutex_unlock(&mfd->sync_mutex);
}
} else {
mutex_unlock(&mfd->sync_mutex);
}
return ret;
}
static int <API key>(struct fb_info *info,
struct mdp_display_commit *disp_commit)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
struct msm_fb_backup_type *fb_backup;
struct fb_var_screeninfo *var = &disp_commit->var;
u32 wait_for_finish = disp_commit->wait_for_finish;
int ret = 0;
if (disp_commit->flags &
<API key>) {
if (!mfd->panel_power_on) /* suspended */
return -EPERM;
} else {
/*
* If framebuffer is 2, io pan display is not allowed.
*/
if (bf_supported && info->node == 2) {
pr_err("%s: no pan display for fb%d!",
__func__, info->node);
return -EPERM;
}
if (info->node != 0 || mfd->cont_splash_done) /* primary */
if ((!mfd->op_enable) || (!mfd->panel_power_on))
return -EPERM;
if (var->xoffset > (info->var.xres_virtual - info->var.xres))
return -EINVAL;
if (var->yoffset > (info->var.yres_virtual - info->var.yres))
return -EINVAL;
}
msm_fb_pan_idle(mfd);
mutex_lock(&mfd->sync_mutex);
if (!(disp_commit->flags &
<API key>)) {
if (info->fix.xpanstep)
info->var.xoffset =
(var->xoffset / info->fix.xpanstep) *
info->fix.xpanstep;
if (info->fix.ypanstep)
info->var.yoffset =
(var->yoffset / info->fix.ypanstep) *
info->fix.ypanstep;
} else {
<API key>(mfd, 1);
}
fb_backup = (struct msm_fb_backup_type *)mfd->msm_fb_backup;
memcpy(&fb_backup->info, info, sizeof(struct fb_info));
memcpy(&fb_backup->disp_commit, disp_commit,
sizeof(struct mdp_display_commit));
mfd->is_committing = 1;
INIT_COMPLETION(mfd->commit_comp);
atomic_inc(&mfd->commit_cnt);
mfd->wake_commit_thread = 1;
<API key>(&mfd->commit_queue);
mutex_unlock(&mfd->sync_mutex);
if (wait_for_finish)
msm_fb_pan_idle(mfd);
return ret;
}
static void <API key>(struct work_struct *work)
{
struct msm_fb_data_type *mfd = container_of(to_delayed_work(work),
struct msm_fb_data_type, backlight_worker);
struct msm_fb_panel_data *pdata = mfd->pdev->dev.platform_data;
down(&mfd->sem);
if ((pdata) && (pdata->set_backlight) && (!bl_updated)
&& (mfd->panel_power_on)) {
mfd->bl_level = unset_bl_level;
pdata->set_backlight(mfd);
bl_level_old = unset_bl_level;
bl_updated = 1;
}
up(&mfd->sem);
}
static int msm_fb_pan_display(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct mdp_display_commit disp_commit;
memset(&disp_commit, 0, sizeof(disp_commit));
disp_commit.var = *var;
disp_commit.wait_for_finish = TRUE;
return <API key>(info, &disp_commit);
}
static int <API key>(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct mdp_dirty_region dirty;
struct mdp_dirty_region *dirtyPtr = NULL;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
struct msm_fb_panel_data *pdata =
(struct msm_fb_panel_data *)mfd->pdev->dev.platform_data;
#ifdef <API key>
if (mfd->nvrw_prohibit_draw)
return 0;
#endif
/*
* If framebuffer is 2, io pen display is not allowed.
*/
if (bf_supported && info->node == 2) {
pr_err("%s: no pan display for fb%d!",
__func__, info->node);
return -EPERM;
}
if (info->node != 0 || mfd->cont_splash_done) /* primary */
if ((!mfd->op_enable) || (!mfd->panel_power_on))
return -EPERM;
if (var->xoffset > (info->var.xres_virtual - info->var.xres))
return -EINVAL;
if (var->yoffset > (info->var.yres_virtual - info->var.yres))
return -EINVAL;
if (info->fix.xpanstep)
info->var.xoffset =
(var->xoffset / info->fix.xpanstep) * info->fix.xpanstep;
if (info->fix.ypanstep)
info->var.yoffset =
(var->yoffset / info->fix.ypanstep) * info->fix.ypanstep;
/* "UPDT" */
if (var->reserved[0] == 0x54445055) {
dirty.xoffset = var->reserved[1] & 0xffff;
dirty.yoffset = (var->reserved[1] >> 16) & 0xffff;
if ((var->reserved[2] & 0xffff) <= dirty.xoffset)
return -EINVAL;
if (((var->reserved[2] >> 16) & 0xffff) <= dirty.yoffset)
return -EINVAL;
dirty.width = (var->reserved[2] & 0xffff) - dirty.xoffset;
dirty.height =
((var->reserved[2] >> 16) & 0xffff) - dirty.yoffset;
info->var.yoffset = var->yoffset;
if (dirty.xoffset < 0)
return -EINVAL;
if (dirty.yoffset < 0)
return -EINVAL;
if ((dirty.xoffset + dirty.width) > info->var.xres)
return -EINVAL;
if ((dirty.yoffset + dirty.height) > info->var.yres)
return -EINVAL;
if ((dirty.width <= 0) || (dirty.height <= 0))
return -EINVAL;
dirtyPtr = &dirty;
}
complete(&mfd->msmfb_update_notify);
mutex_lock(&<API key>);
if (mfd-><API key>.function)
del_timer(&mfd-><API key>);
mfd-><API key>.expires = jiffies + (2 * HZ);
add_timer(&mfd-><API key>);
mutex_unlock(&<API key>);
down(&msm_fb_pan_sem);
<API key>(mfd);
if (info->node == 0 && !(mfd->cont_splash_done)) { /* primary */
<API key>(info, NULL, TRUE);
if (msm_fb_blank_sub(FB_BLANK_UNBLANK, info, mfd->op_enable)) {
pr_err("%s: can't turn on display!\n", __func__);
up(&msm_fb_pan_sem);
<API key>(mfd);
return -EINVAL;
}
}
if (pdata-><API key>) {
/* No vsync allowed at first pan since it will hang
during dma transfer */
<API key>(info, dirtyPtr, FALSE);
} else {
<API key>(info, dirtyPtr,
(var->activate & FB_ACTIVATE_VBL));
}
mdp_dma_pan_update(info);
<API key>(mfd);
if (<API key>(mfd))
pr_err("%s: unmap secure res failed\n", __func__);
up(&msm_fb_pan_sem);
if (unset_bl_level && !bl_updated) {
pdata = (struct msm_fb_panel_data *)mfd->pdev->
dev.platform_data;
if ((pdata) && (pdata->set_backlight)) {
down(&mfd->sem);
mfd->bl_level = unset_bl_level;
pdata->set_backlight(mfd);
bl_level_old = unset_bl_level;
up(&mfd->sem);
bl_updated = 1;
}
}
if (info->node == 0 && (mfd->cont_splash_done)) /* primary */
<API key>(mfd);
++mfd->panel_info.frame_count;
return 0;
}
void msm_fb_release_busy(struct msm_fb_data_type *mfd)
{
mutex_lock(&mfd->sync_mutex);
mfd->is_committing = 0;
complete_all(&mfd->commit_comp);
mutex_unlock(&mfd->sync_mutex);
}
static int <API key>(void *data)
{
int ret = 0;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *) data;
struct fb_var_screeninfo *var;
struct fb_info *info;
struct msm_fb_backup_type *fb_backup;
u32 overlay_commit = false;
struct msm_fb_panel_data *pdata;
pdata = mfd->pdev->dev.platform_data;
while (!kthread_should_stop()) {
ret = <API key>(mfd->commit_queue,
mfd->wake_commit_thread);
if (ret >= 0) {
mfd->wake_commit_thread = 0;
mutex_lock(&mfd->queue_mutex);
while (atomic_read(&mfd->commit_cnt) > 0) {
fb_backup = (struct msm_fb_backup_type *)
mfd->msm_fb_backup;
info = &fb_backup->info;
if (fb_backup->disp_commit.flags &
<API key>) {
overlay_commit = true;
mdp4_overlay_commit(info);
} else {
var = &fb_backup->disp_commit.var;
<API key>(var, info);
msm_fb_release_busy(mfd);
}
}
if (overlay_commit)
<API key>(info);
mutex_unlock(&mfd->queue_mutex);
if (pdata-><API key> && pdata->on) {
(void)pdata-><API key>(mfd->pdev);
pdata-><API key> = 0;
}
}
}
return 0;
}
static int msm_fb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
msm_fb_pan_idle(mfd);
if (var->rotate != FB_ROTATE_UR)
return -EINVAL;
if (var->grayscale != info->var.grayscale)
return -EINVAL;
switch (var->bits_per_pixel) {
case 16:
if ((var->green.offset != 5) ||
!((var->blue.offset == 11)
|| (var->blue.offset == 0)) ||
!((var->red.offset == 11)
|| (var->red.offset == 0)) ||
(var->blue.length != 5) ||
(var->green.length != 6) ||
(var->red.length != 5) ||
(var->blue.msb_right != 0) ||
(var->green.msb_right != 0) ||
(var->red.msb_right != 0) ||
(var->transp.offset != 0) ||
(var->transp.length != 0))
return -EINVAL;
break;
case 24:
if ((var->blue.offset != 0) ||
(var->green.offset != 8) ||
(var->red.offset != 16) ||
(var->blue.length != 8) ||
(var->green.length != 8) ||
(var->red.length != 8) ||
(var->blue.msb_right != 0) ||
(var->green.msb_right != 0) ||
(var->red.msb_right != 0) ||
!(((var->transp.offset == 0) &&
(var->transp.length == 0)) ||
((var->transp.offset == 24) &&
(var->transp.length == 8))))
return -EINVAL;
break;
case 32:
/* Figure out if the user meant RGBA or ARGB
and verify the position of the RGB components */
if (var->transp.offset == 24) {
if ((var->blue.offset != 0) ||
(var->green.offset != 8) ||
(var->red.offset != 16))
return -EINVAL;
} else if (var->transp.offset == 0) {
if ((var->blue.offset != 8) ||
(var->green.offset != 16) ||
(var->red.offset != 24))
return -EINVAL;
} else
return -EINVAL;
/* Check the common values for both RGBA and ARGB */
if ((var->blue.length != 8) ||
(var->green.length != 8) ||
(var->red.length != 8) ||
(var->transp.length != 8) ||
(var->blue.msb_right != 0) ||
(var->green.msb_right != 0) ||
(var->red.msb_right != 0))
return -EINVAL;
break;
default:
return -EINVAL;
}
if ((var->xres_virtual <= 0) || (var->yres_virtual <= 0))
return -EINVAL;
if (!bf_supported ||
(info->node != 1 && info->node != 2))
if (info->fix.smem_len <
(var->xres_virtual*
var->yres_virtual*
(var->bits_per_pixel/8)))
return -EINVAL;
if ((var->xres == 0) || (var->yres == 0))
return -EINVAL;
if (var->xoffset > (var->xres_virtual - var->xres))
return -EINVAL;
if (var->yoffset > (var->yres_virtual - var->yres))
return -EINVAL;
return 0;
}
int <API key>(struct fb_var_screeninfo *var)
{
int panel_height, panel_width;
panel_height = var->yres + var->upper_margin +
var->vsync_len + var->lower_margin;
panel_width = var->xres + var->right_margin +
var->hsync_len + var->left_margin;
return (var->pixclock)/(panel_height * panel_width);
}
int <API key>(struct msm_fb_data_type *mfd, struct fb_info *info)
{
int fps_mod = 0;
struct fb_var_screeninfo *var = &info->var;
if ((mfd->panel_info.type == DTV_PANEL) ||
(mfd->panel_info.type == HDMI_PANEL)) {
if (mfd->var_frame_rate != <API key>(var))
fps_mod = 1;
}
return fps_mod;
}
static int msm_fb_set_par(struct fb_info *info)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
struct fb_var_screeninfo *var = &info->var;
int old_imgType;
int blank = 0;
msm_fb_pan_idle(mfd);
old_imgType = mfd->fb_imgType;
switch (var->bits_per_pixel) {
case 16:
if (var->red.offset == 0)
mfd->fb_imgType = MDP_BGR_565;
else
mfd->fb_imgType = MDP_RGB_565;
break;
case 24:
if ((var->transp.offset == 0) && (var->transp.length == 0))
mfd->fb_imgType = MDP_RGB_888;
else if ((var->transp.offset == 24) &&
(var->transp.length == 8)) {
mfd->fb_imgType = MDP_ARGB_8888;
info->var.bits_per_pixel = 32;
}
break;
case 32:
if (var->transp.offset == 24)
mfd->fb_imgType = MDP_ARGB_8888;
else
mfd->fb_imgType = MDP_RGBA_8888;
break;
default:
return -EINVAL;
}
if ((mfd->var_pixclock != var->pixclock) ||
(mfd->hw_refresh &&
((mfd->fb_imgType != old_imgType) ||
(mfd->var_xres != var->xres) ||
(mfd->var_yres != var->yres) ||
(<API key>(mfd, info))))) {
mfd->var_xres = var->xres;
mfd->var_yres = var->yres;
mfd->var_pixclock = var->pixclock;
mfd->var_frame_rate = <API key>(var);
if (mfd->update_panel_info)
mfd->update_panel_info(mfd);
blank = 1;
}
mfd->fbi->fix.line_length = msm_fb_line_length(mfd->index, var->xres,
var->bits_per_pixel/8);
if ((mfd->panel_info.type == DTV_PANEL) && !mfd->panel_power_on) {
msm_fb_blank_sub(FB_BLANK_UNBLANK, info, mfd->op_enable);
} else if (blank) {
msm_fb_blank_sub(FB_BLANK_POWERDOWN, info, mfd->op_enable);
msm_fb_blank_sub(FB_BLANK_UNBLANK, info, mfd->op_enable);
}
return 0;
}
static int <API key>(struct msm_fb_data_type *mfd)
{
if (mfd->hw_refresh)
return -EPERM;
if (mfd-><API key>) {
down(&mfd->sem);
mfd-><API key> = FALSE;
up(&mfd->sem);
/* wait until the refresher finishes the last job */
<API key>(&mfd->refresher_comp);
}
return 0;
}
int <API key>(struct msm_fb_data_type *mfd)
{
boolean do_refresh;
if (mfd->hw_refresh)
return -EPERM;
down(&mfd->sem);
if ((!mfd-><API key>) && (mfd-><API key>)) {
do_refresh = TRUE;
mfd-><API key> = TRUE;
} else {
do_refresh = FALSE;
}
up(&mfd->sem);
if (do_refresh)
mdp_refresh_screen((unsigned long)mfd);
return 0;
}
#if defined CONFIG_FB_MSM_MDP31
static int <API key>(struct fb_info *info,
struct mdp_blit_req *req)
{
int ret;
struct mdp_blit_req splitreq;
int s_x_0, s_x_1, s_w_0, s_w_1, s_y_0, s_y_1, s_h_0, s_h_1;
int d_x_0, d_x_1, d_w_0, d_w_1, d_y_0, d_y_1, d_h_0, d_h_1;
splitreq = *req;
/* break dest roi at height*/
d_x_0 = d_x_1 = req->dst_rect.x;
d_w_0 = d_w_1 = req->dst_rect.w;
d_y_0 = req->dst_rect.y;
if (req->dst_rect.h % 32 == 3)
d_h_1 = (req->dst_rect.h - 3) / 2 - 1;
else if (req->dst_rect.h % 32 == 2)
d_h_1 = (req->dst_rect.h - 2) / 2 - 6;
else
d_h_1 = (req->dst_rect.h - 1) / 2 - 1;
d_h_0 = req->dst_rect.h - d_h_1;
d_y_1 = d_y_0 + d_h_0;
if (req->dst_rect.h == 3) {
d_h_1 = 2;
d_h_0 = 2;
d_y_1 = d_y_0 + 1;
}
/* blit first region */
if (((splitreq.flags & 0x07) == 0x04) ||
((splitreq.flags & 0x07) == 0x0)) {
if (splitreq.flags & MDP_ROT_90) {
s_y_0 = s_y_1 = req->src_rect.y;
s_h_0 = s_h_1 = req->src_rect.h;
s_x_0 = req->src_rect.x;
s_w_1 = (req->src_rect.w * d_h_1) / req->dst_rect.h;
s_w_0 = req->src_rect.w - s_w_1;
s_x_1 = s_x_0 + s_w_0;
if (d_h_1 >= 8 * s_w_1) {
s_w_1++;
s_x_1
}
} else {
s_x_0 = s_x_1 = req->src_rect.x;
s_w_0 = s_w_1 = req->src_rect.w;
s_y_0 = req->src_rect.y;
s_h_1 = (req->src_rect.h * d_h_1) / req->dst_rect.h;
s_h_0 = req->src_rect.h - s_h_1;
s_y_1 = s_y_0 + s_h_0;
if (d_h_1 >= 8 * s_h_1) {
s_h_1++;
s_y_1
}
}
splitreq.src_rect.h = s_h_0;
splitreq.src_rect.y = s_y_0;
splitreq.dst_rect.h = d_h_0;
splitreq.dst_rect.y = d_y_0;
splitreq.src_rect.x = s_x_0;
splitreq.src_rect.w = s_w_0;
splitreq.dst_rect.x = d_x_0;
splitreq.dst_rect.w = d_w_0;
} else {
if (splitreq.flags & MDP_ROT_90) {
s_y_0 = s_y_1 = req->src_rect.y;
s_h_0 = s_h_1 = req->src_rect.h;
s_x_0 = req->src_rect.x;
s_w_1 = (req->src_rect.w * d_h_0) / req->dst_rect.h;
s_w_0 = req->src_rect.w - s_w_1;
s_x_1 = s_x_0 + s_w_0;
if (d_h_0 >= 8 * s_w_1) {
s_w_1++;
s_x_1
}
} else {
s_x_0 = s_x_1 = req->src_rect.x;
s_w_0 = s_w_1 = req->src_rect.w;
s_y_0 = req->src_rect.y;
s_h_1 = (req->src_rect.h * d_h_0) / req->dst_rect.h;
s_h_0 = req->src_rect.h - s_h_1;
s_y_1 = s_y_0 + s_h_0;
if (d_h_0 >= 8 * s_h_1) {
s_h_1++;
s_y_1
}
}
splitreq.src_rect.h = s_h_0;
splitreq.src_rect.y = s_y_0;
splitreq.dst_rect.h = d_h_1;
splitreq.dst_rect.y = d_y_1;
splitreq.src_rect.x = s_x_0;
splitreq.src_rect.w = s_w_0;
splitreq.dst_rect.x = d_x_1;
splitreq.dst_rect.w = d_w_1;
}
ret = mdp_ppp_blit(info, &splitreq);
if (ret)
return ret;
/* blit second region */
if (((splitreq.flags & 0x07) == 0x04) ||
((splitreq.flags & 0x07) == 0x0)) {
splitreq.src_rect.h = s_h_1;
splitreq.src_rect.y = s_y_1;
splitreq.dst_rect.h = d_h_1;
splitreq.dst_rect.y = d_y_1;
splitreq.src_rect.x = s_x_1;
splitreq.src_rect.w = s_w_1;
splitreq.dst_rect.x = d_x_1;
splitreq.dst_rect.w = d_w_1;
} else {
splitreq.src_rect.h = s_h_1;
splitreq.src_rect.y = s_y_1;
splitreq.dst_rect.h = d_h_0;
splitreq.dst_rect.y = d_y_0;
splitreq.src_rect.x = s_x_1;
splitreq.src_rect.w = s_w_1;
splitreq.dst_rect.x = d_x_0;
splitreq.dst_rect.w = d_w_0;
}
ret = mdp_ppp_blit(info, &splitreq);
return ret;
}
#endif
int mdp_blit(struct fb_info *info, struct mdp_blit_req *req)
{
int ret;
#if defined CONFIG_FB_MSM_MDP31 || defined CONFIG_FB_MSM_MDP30
unsigned int remainder = 0, is_bpp_4 = 0;
struct mdp_blit_req splitreq;
int s_x_0, s_x_1, s_w_0, s_w_1, s_y_0, s_y_1, s_h_0, s_h_1;
int d_x_0, d_x_1, d_w_0, d_w_1, d_y_0, d_y_1, d_h_0, d_h_1;
if (req->flags & MDP_ROT_90) {
if (((req->dst_rect.h == 1) && ((req->src_rect.w != 1) ||
(req->dst_rect.w != req->src_rect.h))) ||
((req->dst_rect.w == 1) && ((req->src_rect.h != 1) ||
(req->dst_rect.h != req->src_rect.w)))) {
printk(KERN_ERR "mpd_ppp: error scaling when size is 1!\n");
return -EINVAL;
}
} else {
if (((req->dst_rect.w == 1) && ((req->src_rect.w != 1) ||
(req->dst_rect.h != req->src_rect.h))) ||
((req->dst_rect.h == 1) && ((req->src_rect.h != 1) ||
(req->dst_rect.w != req->src_rect.w)))) {
printk(KERN_ERR "mpd_ppp: error scaling when size is 1!\n");
return -EINVAL;
}
}
#endif
if (unlikely(req->src_rect.h == 0 || req->src_rect.w == 0)) {
printk(KERN_ERR "mpd_ppp: src img of zero size!\n");
return -EINVAL;
}
if (unlikely(req->dst_rect.h == 0 || req->dst_rect.w == 0))
return 0;
#if defined CONFIG_FB_MSM_MDP31
/* MDP width split workaround */
remainder = (req->dst_rect.w)%32;
ret = <API key>(req->dst.format,
(struct msm_fb_data_type *)info->par);
if (ret <= 0) {
printk(KERN_ERR "mdp_ppp: incorrect bpp!\n");
return -EINVAL;
}
is_bpp_4 = (ret == 4) ? 1 : 0;
if ((is_bpp_4 && (remainder == 6 || remainder == 14 ||
remainder == 22 || remainder == 30)) || remainder == 3 ||
(remainder == 1 && req->dst_rect.w != 1) ||
(remainder == 2 && req->dst_rect.w != 2)) {
/* make new request as provide by user */
splitreq = *req;
/* break dest roi at width*/
d_y_0 = d_y_1 = req->dst_rect.y;
d_h_0 = d_h_1 = req->dst_rect.h;
d_x_0 = req->dst_rect.x;
if (remainder == 14)
d_w_1 = (req->dst_rect.w - 14) / 2 + 4;
else if (remainder == 22)
d_w_1 = (req->dst_rect.w - 22) / 2 + 10;
else if (remainder == 30)
d_w_1 = (req->dst_rect.w - 30) / 2 + 10;
else if (remainder == 6)
d_w_1 = req->dst_rect.w / 2 - 1;
else if (remainder == 3)
d_w_1 = (req->dst_rect.w - 3) / 2 - 1;
else if (remainder == 2)
d_w_1 = (req->dst_rect.w - 2) / 2 - 6;
else
d_w_1 = (req->dst_rect.w - 1) / 2 - 1;
d_w_0 = req->dst_rect.w - d_w_1;
d_x_1 = d_x_0 + d_w_0;
if (req->dst_rect.w == 3) {
d_w_1 = 2;
d_w_0 = 2;
d_x_1 = d_x_0 + 1;
}
/* blit first region */
if (((splitreq.flags & 0x07) == 0x07) ||
((splitreq.flags & 0x07) == 0x0)) {
if (splitreq.flags & MDP_ROT_90) {
s_x_0 = s_x_1 = req->src_rect.x;
s_w_0 = s_w_1 = req->src_rect.w;
s_y_0 = req->src_rect.y;
s_h_1 = (req->src_rect.h * d_w_1) /
req->dst_rect.w;
s_h_0 = req->src_rect.h - s_h_1;
s_y_1 = s_y_0 + s_h_0;
if (d_w_1 >= 8 * s_h_1) {
s_h_1++;
s_y_1
}
} else {
s_y_0 = s_y_1 = req->src_rect.y;
s_h_0 = s_h_1 = req->src_rect.h;
s_x_0 = req->src_rect.x;
s_w_1 = (req->src_rect.w * d_w_1) /
req->dst_rect.w;
s_w_0 = req->src_rect.w - s_w_1;
s_x_1 = s_x_0 + s_w_0;
if (d_w_1 >= 8 * s_w_1) {
s_w_1++;
s_x_1
}
}
splitreq.src_rect.h = s_h_0;
splitreq.src_rect.y = s_y_0;
splitreq.dst_rect.h = d_h_0;
splitreq.dst_rect.y = d_y_0;
splitreq.src_rect.x = s_x_0;
splitreq.src_rect.w = s_w_0;
splitreq.dst_rect.x = d_x_0;
splitreq.dst_rect.w = d_w_0;
} else {
if (splitreq.flags & MDP_ROT_90) {
s_x_0 = s_x_1 = req->src_rect.x;
s_w_0 = s_w_1 = req->src_rect.w;
s_y_0 = req->src_rect.y;
s_h_1 = (req->src_rect.h * d_w_0) /
req->dst_rect.w;
s_h_0 = req->src_rect.h - s_h_1;
s_y_1 = s_y_0 + s_h_0;
if (d_w_0 >= 8 * s_h_1) {
s_h_1++;
s_y_1
}
} else {
s_y_0 = s_y_1 = req->src_rect.y;
s_h_0 = s_h_1 = req->src_rect.h;
s_x_0 = req->src_rect.x;
s_w_1 = (req->src_rect.w * d_w_0) /
req->dst_rect.w;
s_w_0 = req->src_rect.w - s_w_1;
s_x_1 = s_x_0 + s_w_0;
if (d_w_0 >= 8 * s_w_1) {
s_w_1++;
s_x_1
}
}
splitreq.src_rect.h = s_h_0;
splitreq.src_rect.y = s_y_0;
splitreq.dst_rect.h = d_h_1;
splitreq.dst_rect.y = d_y_1;
splitreq.src_rect.x = s_x_0;
splitreq.src_rect.w = s_w_0;
splitreq.dst_rect.x = d_x_1;
splitreq.dst_rect.w = d_w_1;
}
if ((splitreq.dst_rect.h % 32 == 3) ||
((req->dst_rect.h % 32) == 1 && req->dst_rect.h != 1) ||
((req->dst_rect.h % 32) == 2 && req->dst_rect.h != 2))
ret = <API key>(info, &splitreq);
else
ret = mdp_ppp_blit(info, &splitreq);
if (ret)
return ret;
/* blit second region */
if (((splitreq.flags & 0x07) == 0x07) ||
((splitreq.flags & 0x07) == 0x0)) {
splitreq.src_rect.h = s_h_1;
splitreq.src_rect.y = s_y_1;
splitreq.dst_rect.h = d_h_1;
splitreq.dst_rect.y = d_y_1;
splitreq.src_rect.x = s_x_1;
splitreq.src_rect.w = s_w_1;
splitreq.dst_rect.x = d_x_1;
splitreq.dst_rect.w = d_w_1;
} else {
splitreq.src_rect.h = s_h_1;
splitreq.src_rect.y = s_y_1;
splitreq.dst_rect.h = d_h_0;
splitreq.dst_rect.y = d_y_0;
splitreq.src_rect.x = s_x_1;
splitreq.src_rect.w = s_w_1;
splitreq.dst_rect.x = d_x_0;
splitreq.dst_rect.w = d_w_0;
}
if (((splitreq.dst_rect.h % 32) == 3) ||
((req->dst_rect.h % 32) == 1 && req->dst_rect.h != 1) ||
((req->dst_rect.h % 32) == 2 && req->dst_rect.h != 2))
ret = <API key>(info, &splitreq);
else
ret = mdp_ppp_blit(info, &splitreq);
if (ret)
return ret;
} else if ((req->dst_rect.h % 32) == 3 ||
((req->dst_rect.h % 32) == 1 && req->dst_rect.h != 1) ||
((req->dst_rect.h % 32) == 2 && req->dst_rect.h != 2))
ret = <API key>(info, req);
else
ret = mdp_ppp_blit(info, req);
return ret;
#elif defined CONFIG_FB_MSM_MDP30
/* MDP width split workaround */
remainder = (req->dst_rect.w)%16;
ret = <API key>(req->dst.format,
(struct msm_fb_data_type *)info->par);
if (ret <= 0) {
printk(KERN_ERR "mdp_ppp: incorrect bpp!\n");
return -EINVAL;
}
is_bpp_4 = (ret == 4) ? 1 : 0;
if ((is_bpp_4 && (remainder == 6 || remainder == 14))) {
/* make new request as provide by user */
splitreq = *req;
/* break dest roi at width*/
d_y_0 = d_y_1 = req->dst_rect.y;
d_h_0 = d_h_1 = req->dst_rect.h;
d_x_0 = req->dst_rect.x;
if (remainder == 14 || remainder == 6)
d_w_1 = req->dst_rect.w / 2;
else
d_w_1 = (req->dst_rect.w - 1) / 2 - 1;
d_w_0 = req->dst_rect.w - d_w_1;
d_x_1 = d_x_0 + d_w_0;
/* blit first region */
if (((splitreq.flags & 0x07) == 0x07) ||
((splitreq.flags & 0x07) == 0x05) ||
((splitreq.flags & 0x07) == 0x02) ||
((splitreq.flags & 0x07) == 0x0)) {
if (splitreq.flags & MDP_ROT_90) {
s_x_0 = s_x_1 = req->src_rect.x;
s_w_0 = s_w_1 = req->src_rect.w;
s_y_0 = req->src_rect.y;
s_h_1 = (req->src_rect.h * d_w_1) /
req->dst_rect.w;
s_h_0 = req->src_rect.h - s_h_1;
s_y_1 = s_y_0 + s_h_0;
if (d_w_1 >= 8 * s_h_1) {
s_h_1++;
s_y_1
}
} else {
s_y_0 = s_y_1 = req->src_rect.y;
s_h_0 = s_h_1 = req->src_rect.h;
s_x_0 = req->src_rect.x;
s_w_1 = (req->src_rect.w * d_w_1) /
req->dst_rect.w;
s_w_0 = req->src_rect.w - s_w_1;
s_x_1 = s_x_0 + s_w_0;
if (d_w_1 >= 8 * s_w_1) {
s_w_1++;
s_x_1
}
}
splitreq.src_rect.h = s_h_0;
splitreq.src_rect.y = s_y_0;
splitreq.dst_rect.h = d_h_0;
splitreq.dst_rect.y = d_y_0;
splitreq.src_rect.x = s_x_0;
splitreq.src_rect.w = s_w_0;
splitreq.dst_rect.x = d_x_0;
splitreq.dst_rect.w = d_w_0;
} else {
if (splitreq.flags & MDP_ROT_90) {
s_x_0 = s_x_1 = req->src_rect.x;
s_w_0 = s_w_1 = req->src_rect.w;
s_y_0 = req->src_rect.y;
s_h_1 = (req->src_rect.h * d_w_0) /
req->dst_rect.w;
s_h_0 = req->src_rect.h - s_h_1;
s_y_1 = s_y_0 + s_h_0;
if (d_w_0 >= 8 * s_h_1) {
s_h_1++;
s_y_1
}
} else {
s_y_0 = s_y_1 = req->src_rect.y;
s_h_0 = s_h_1 = req->src_rect.h;
s_x_0 = req->src_rect.x;
s_w_1 = (req->src_rect.w * d_w_0) /
req->dst_rect.w;
s_w_0 = req->src_rect.w - s_w_1;
s_x_1 = s_x_0 + s_w_0;
if (d_w_0 >= 8 * s_w_1) {
s_w_1++;
s_x_1
}
}
splitreq.src_rect.h = s_h_0;
splitreq.src_rect.y = s_y_0;
splitreq.dst_rect.h = d_h_1;
splitreq.dst_rect.y = d_y_1;
splitreq.src_rect.x = s_x_0;
splitreq.src_rect.w = s_w_0;
splitreq.dst_rect.x = d_x_1;
splitreq.dst_rect.w = d_w_1;
}
/* No need to split in height */
ret = mdp_ppp_blit(info, &splitreq);
if (ret)
return ret;
/* blit second region */
if (((splitreq.flags & 0x07) == 0x07) ||
((splitreq.flags & 0x07) == 0x05) ||
((splitreq.flags & 0x07) == 0x02) ||
((splitreq.flags & 0x07) == 0x0)) {
splitreq.src_rect.h = s_h_1;
splitreq.src_rect.y = s_y_1;
splitreq.dst_rect.h = d_h_1;
splitreq.dst_rect.y = d_y_1;
splitreq.src_rect.x = s_x_1;
splitreq.src_rect.w = s_w_1;
splitreq.dst_rect.x = d_x_1;
splitreq.dst_rect.w = d_w_1;
} else {
splitreq.src_rect.h = s_h_1;
splitreq.src_rect.y = s_y_1;
splitreq.dst_rect.h = d_h_0;
splitreq.dst_rect.y = d_y_0;
splitreq.src_rect.x = s_x_1;
splitreq.src_rect.w = s_w_1;
splitreq.dst_rect.x = d_x_0;
splitreq.dst_rect.w = d_w_0;
}
/* No need to split in height ... just width */
ret = mdp_ppp_blit(info, &splitreq);
if (ret)
return ret;
} else
ret = mdp_ppp_blit(info, req);
return ret;
#else
ret = mdp_ppp_blit(info, req);
return ret;
#endif
}
typedef void (*<API key>) (void *, size_t);
static inline void <API key>(struct fb_info *info,
struct mdp_img *img, struct mdp_rect *rect,
<API key> dma_barrier_fp
)
{
/*
* Compute the start and end addresses of the rectangles.
* NOTE: As currently implemented, the data between
* the end of one row and the start of the next is
* included in the address range rather than
* doing multiple calls for each row.
*/
unsigned long start;
size_t size;
char * const pmem_start = info->screen_base;
int bytes_per_pixel = <API key>(img->format,
(struct msm_fb_data_type *)info->par);
if (bytes_per_pixel <= 0) {
printk(KERN_ERR "%s incorrect bpp!\n", __func__);
return;
}
start = (unsigned long)pmem_start + img->offset +
(img->width * rect->y + rect->x) * bytes_per_pixel;
size = (rect->h * img->width + rect->w) * bytes_per_pixel;
(*dma_barrier_fp) ((void *) start, size);
}
static inline void msm_dma_nc_pre(void)
{
dmb();
}
static inline void msm_dma_wt_pre(void)
{
dmb();
}
static inline void <API key>(void *start, size_t size)
{
dma_cache_pre_ops(start, size, DMA_TO_DEVICE);
}
static inline void <API key>(void *start, size_t size)
{
dma_cache_pre_ops(start, size, DMA_FROM_DEVICE);
}
static inline void msm_dma_nc_post(void)
{
dmb();
}
static inline void <API key>(void *start, size_t size)
{
dma_cache_post_ops(start, size, DMA_FROM_DEVICE);
}
static inline void <API key>(void *start, size_t size)
{
dma_cache_post_ops(start, size, DMA_TO_DEVICE);
}
static inline void <API key>(void *start, size_t size)
{
dma_cache_post_ops(start, size, DMA_FROM_DEVICE);
}
/*
* Do the write barriers required to guarantee data is committed to RAM
* (from CPU cache or internal buffers) before a DMA operation starts.
* NOTE: As currently implemented, the data between
* the end of one row and the start of the next is
* included in the address range rather than
* doing multiple calls for each row.
*/
static void <API key>(struct fb_info *info,
struct mdp_blit_req *req_list,
int req_list_count)
{
#ifdef CONFIG_ARCH_QSD8X50
int i;
/*
* Normally, do the requested barriers for each address
* range that corresponds to a rectangle.
*
* But if at least one write barrier is requested for data
* going to or from the device but no address range is
* needed for that barrier, then do the barrier, but do it
* only once, no matter how many requests there are.
*/
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
switch (mfd-><API key>) {
default:
case <API key>:
case <API key>:
/*
* The following barrier is only done at most once,
* since further calls would be redundant.
*/
for (i = 0; i < req_list_count; i++) {
if (!(req_list[i].flags
& <API key>)) {
msm_dma_nc_pre();
break;
}
}
break;
case <API key>:
/*
* The following barrier is only done at most once,
* since further calls would be redundant.
*/
for (i = 0; i < req_list_count; i++) {
if (!(req_list[i].flags
& <API key>)) {
msm_dma_wt_pre();
break;
}
}
break;
case <API key>:
case <API key>:
for (i = 0; i < req_list_count; i++) {
if (!(req_list[i].flags &
<API key>)) {
<API key>(info,
&(req_list[i].src),
&(req_list[i].src_rect),
<API key>
);
<API key>(info,
&(req_list[i].dst),
&(req_list[i].dst_rect),
<API key>
);
}
}
break;
}
#else
dmb();
#endif
}
/*
* Do the write barriers required to guarantee data will be re-read from RAM by
* the CPU after a DMA operation ends.
* NOTE: As currently implemented, the data between
* the end of one row and the start of the next is
* included in the address range rather than
* doing multiple calls for each row.
*/
static void <API key>(struct fb_info *info,
struct mdp_blit_req *req_list,
int req_list_count)
{
#ifdef CONFIG_ARCH_QSD8X50
int i;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
switch (mfd-><API key>) {
default:
case <API key>:
case <API key>:
/*
* The following barrier is only done at most once,
* since further calls would be redundant.
*/
for (i = 0; i < req_list_count; i++) {
if (!(req_list[i].flags
& <API key>)) {
msm_dma_nc_post();
break;
}
}
break;
case <API key>:
for (i = 0; i < req_list_count; i++) {
if (!(req_list[i].flags &
<API key>)) {
<API key>(info,
&(req_list[i].dst),
&(req_list[i].dst_rect),
<API key>
);
}
}
break;
case <API key>:
case <API key>:
for (i = 0; i < req_list_count; i++) {
if (!(req_list[i].flags &
<API key>)) {
<API key>(info,
&(req_list[i].dst),
&(req_list[i].dst_rect),
<API key>
);
}
}
break;
}
#else
dmb();
#endif
}
/*
* NOTE: The userspace issues blit operations in a sequence, the sequence
* start with a operation marked START and ends in an operation marked
* END. It is guranteed by the userspace that all the blit operations
* between START and END are only within the regions of areas designated
* by the START and END operations and that the userspace doesnt modify
* those areas. Hence it would be enough to perform barrier/cache operations
* only on the START and END operations.
*/
static int msmfb_blit(struct fb_info *info, void __user *p)
{
/*
* CAUTION: The names of the struct types intentionally *DON'T* match
* the names of the variables declared -- they appear to be swapped.
* Read the code carefully and you should see that the variable names
* make sense.
*/
const int MAX_LIST_WINDOW = 16;
struct mdp_blit_req req_list[MAX_LIST_WINDOW];
struct mdp_blit_req_list req_list_header;
int count, i, req_list_count;
if (bf_supported &&
(info->node == 1 || info->node == 2)) {
pr_err("%s: no pan display for fb%d.",
__func__, info->node);
return -EPERM;
}
/* Get the count size for the total BLIT request. */
if (copy_from_user(&req_list_header, p, sizeof(req_list_header)))
return -EFAULT;
p += sizeof(req_list_header);
count = req_list_header.count;
if (count < 0 || count >= MAX_BLIT_REQ)
return -EINVAL;
while (count > 0) {
/*
* Access the requests through a narrow window to decrease copy
* overhead and make larger requests accessible to the
* coherency management code.
* NOTE: The window size is intended to be larger than the
* typical request size, but not require more than 2
* kbytes of stack storage.
*/
req_list_count = count;
if (req_list_count > MAX_LIST_WINDOW)
req_list_count = MAX_LIST_WINDOW;
if (copy_from_user(&req_list, p,
sizeof(struct mdp_blit_req)*req_list_count))
return -EFAULT;
/*
* Ensure that any data CPU may have previously written to
* internal state (but not yet committed to memory) is
* guaranteed to be committed to memory now.
*/
<API key>(info,
req_list, req_list_count);
/*
* Do the blit DMA, if required -- returning early only if
* there is a failure.
*/
for (i = 0; i < req_list_count; i++) {
if (!(req_list[i].flags & MDP_NO_BLIT)) {
/* Do the actual blit. */
int ret = mdp_blit(info, &(req_list[i]));
/*
* Note that early returns don't guarantee
* memory coherency.
*/
if (ret)
return ret;
}
}
<API key>(info,
req_list,
req_list_count);
/* Go to next window of requests. */
count -= req_list_count;
p += sizeof(struct mdp_blit_req)*req_list_count;
}
return 0;
}
static int msmfb_vsync_ctrl(struct fb_info *info, void __user *argp)
{
int enable, ret;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
ret = copy_from_user(&enable, argp, sizeof(enable));
if (ret) {
pr_err("%s:msmfb_overlay_vsync ioctl failed", __func__);
return ret;
}
if (mfd->vsync_ctrl)
mfd->vsync_ctrl(enable);
else {
pr_err("%s: Vsync IOCTL not supported", __func__);
return -EINVAL;
}
return 0;
}
#ifdef <API key>
static int msmfb_overlay_get(struct fb_info *info, void __user *p)
{
struct mdp_overlay req;
int ret;
if (copy_from_user(&req, p, sizeof(req)))
return -EFAULT;
ret = mdp4_overlay_get(info, &req);
if (ret) {
printk(KERN_ERR "%s: ioctl failed \n",
__func__);
return ret;
}
if (copy_to_user(p, &req, sizeof(req))) {
printk(KERN_ERR "%s: copy2user failed \n",
__func__);
return -EFAULT;
}
return 0;
}
static int msmfb_overlay_set(struct fb_info *info, void __user *p)
{
struct mdp_overlay req;
int ret;
if (copy_from_user(&req, p, sizeof(req)))
return -EFAULT;
ret = mdp4_overlay_set(info, &req);
if (ret) {
printk(KERN_ERR "%s: ioctl failed, rc=%d\n",
__func__, ret);
return ret;
}
if (copy_to_user(p, &req, sizeof(req))) {
printk(KERN_ERR "%s: copy2user failed \n",
__func__);
return -EFAULT;
}
return 0;
}
static int msmfb_overlay_unset(struct fb_info *info, unsigned long *argp)
{
int ret, ndx;
ret = copy_from_user(&ndx, argp, sizeof(ndx));
if (ret) {
printk(KERN_ERR "%s:msmfb_overlay_unset ioctl failed \n",
__func__);
return ret;
}
return mdp4_overlay_unset(info, ndx);
}
static int <API key>(struct fb_info *info, void __user *argp)
{
int ret;
int enable;
ret = copy_from_user(&enable, argp, sizeof(enable));
if (ret) {
pr_err("%s:msmfb_overlay_vsync ioctl failed", __func__);
return ret;
}
ret = <API key>(info, enable);
return ret;
}
static int <API key>(struct fb_info *info, unsigned long *argp)
{
int ret;
struct msmfb_overlay_data req;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
if (mfd->overlay_play_enable == 0) /* nothing to do */
return 0;
ret = copy_from_user(&req, argp, sizeof(req));
if (ret) {
pr_err("%s:msmfb_overlay_wait ioctl failed", __func__);
return ret;
}
ret = <API key>(info, &req);
return ret;
}
static int msmfb_overlay_play(struct fb_info *info, unsigned long *argp)
{
int ret;
struct msmfb_overlay_data req;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
struct msm_fb_panel_data *pdata;
if (mfd->overlay_play_enable == 0) /* nothing to do */
return 0;
#ifdef <API key>
if (mfd->nvrw_prohibit_draw)
return 0;
#endif
ret = copy_from_user(&req, argp, sizeof(req));
if (ret) {
printk(KERN_ERR "%s:msmfb_overlay_play ioctl failed \n",
__func__);
return ret;
}
if (info->node == 0 && !(mfd->cont_splash_done)) { /* primary */
<API key>(info, NULL, TRUE);
if (msm_fb_blank_sub(FB_BLANK_UNBLANK, info, mfd->op_enable)) {
pr_err("%s: can't turn on display!\n", __func__);
return -EINVAL;
}
}
if (!mfd->panel_power_on) /* suspended */
return -EPERM;
complete(&mfd->msmfb_update_notify);
mutex_lock(&<API key>);
if (mfd-><API key>.function)
del_timer(&mfd-><API key>);
mfd-><API key>.expires = jiffies + (2 * HZ);
add_timer(&mfd-><API key>);
mutex_unlock(&<API key>);
ret = mdp4_overlay_play(info, &req);
if (unset_bl_level && !bl_updated) {
pdata = (struct msm_fb_panel_data *)mfd->pdev->
dev.platform_data;
if ((pdata) && (pdata->set_backlight)) {
down(&mfd->sem);
mfd->bl_level = unset_bl_level;
pdata->set_backlight(mfd);
bl_level_old = unset_bl_level;
up(&mfd->sem);
bl_updated = 1;
}
}
if (info->node == 0 && (mfd->cont_splash_done)) /* primary */
<API key>(mfd);
return ret;
}
static int <API key>(struct fb_info *info, unsigned long *argp)
{
int ret, enable;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
ret = copy_from_user(&enable, argp, sizeof(enable));
if (ret) {
printk(KERN_ERR "%s:<API key> ioctl failed \n",
__func__);
return ret;
}
mfd->overlay_play_enable = enable;
return 0;
}
#ifdef <API key>
static int msmfb_overlay_blt(struct fb_info *info, unsigned long *argp)
{
int ret;
struct msmfb_overlay_blt req;
ret = copy_from_user(&req, argp, sizeof(req));
if (ret) {
pr_err("%s: failed\n", __func__);
return ret;
}
ret = mdp4_overlay_blt(info, &req);
return ret;
}
#else
static int msmfb_overlay_blt(struct fb_info *info, unsigned long *argp)
{
return 0;
}
static int <API key>(struct fb_info *info, unsigned long *argp)
{
return 0;
}
#endif
#ifdef <API key>
static int <API key>(struct fb_info *info)
{
return mdp4_writeback_init(info);
}
static int <API key>(
struct fb_info *info)
{
int ret = 0;
ret = <API key>(info);
if (ret)
goto error;
error:
if (ret)
pr_err("%s:<API key> "
" ioctl failed\n", __func__);
return ret;
}
static int <API key>(
struct fb_info *info)
{
int ret = 0;
ret = mdp4_writeback_stop(info);
if (ret)
goto error;
error:
if (ret)
pr_err("%s:<API key> ioctl failed\n",
__func__);
return ret;
}
static int <API key>(
struct fb_info *info, unsigned long *argp)
{
int ret = 0;
struct msmfb_data data;
ret = copy_from_user(&data, argp, sizeof(data));
if (ret)
goto error;
ret = <API key>(info, &data);
if (ret)
goto error;
error:
if (ret)
pr_err("%s:<API key> ioctl failed\n",
__func__);
return ret;
}
static int <API key>(
struct fb_info *info, unsigned long *argp)
{
int ret = 0;
struct msmfb_data data;
ret = copy_from_user(&data, argp, sizeof(data));
if (ret)
goto error;
ret = <API key>(info, &data);
if (ret)
goto error;
ret = copy_to_user(argp, &data, sizeof(data));
if (ret)
goto error;
error:
if (ret)
pr_err("%s:<API key> ioctl failed\n",
__func__);
return ret;
}
static int <API key>(struct fb_info *info)
{
return <API key>(info);
}
static int <API key>(struct fb_info *
info, void *argp)
{
int ret = 0, hint;
if (!info) {
ret = -EINVAL;
goto error;
}
ret = copy_from_user(&hint, argp, sizeof(hint));
if (ret)
goto error;
ret = <API key>(info, hint);
if (ret)
goto error;
error:
if (ret)
pr_err("%s: ioctl failed\n", __func__);
return ret;
}
#else
static int <API key>(struct fb_info *info)
{
return -ENOTSUPP;
}
static int <API key>(
struct fb_info *info)
{
return -ENOTSUPP;
}
static int <API key>(
struct fb_info *info)
{
return -ENOTSUPP;
}
static int <API key>(
struct fb_info *info, unsigned long *argp)
{
return -ENOTSUPP;
}
static int <API key>(
struct fb_info *info, unsigned long *argp)
{
return -ENOTSUPP;
}
static int <API key>(struct fb_info *info)
{
return -ENOTSUPP;
}
static int <API key>(struct fb_info *
info, void *argp)
{
return -ENOTSUPP;
}
#endif
static int <API key>(struct fb_info *info, unsigned long *argp)
{
int ret;
struct msmfb_overlay_3d req;
ret = copy_from_user(&req, argp, sizeof(req));
if (ret) {
pr_err("%s:<API key> ioctl failed\n",
__func__);
return ret;
}
ret = <API key>(info, &req);
return ret;
}
static int msmfb_mixer_info(struct fb_info *info, unsigned long *argp)
{
int ret, cnt;
struct <API key> req;
ret = copy_from_user(&req, argp, sizeof(req));
if (ret) {
pr_err("%s: failed\n", __func__);
return ret;
}
cnt = mdp4_mixer_info(req.mixer_num, req.info);
req.cnt = cnt;
ret = copy_to_user(argp, &req, sizeof(req));
if (ret)
pr_err("%s:<API key> ioctl failed\n",
__func__);
return cnt;
}
#endif
DEFINE_SEMAPHORE(<API key>);
DEFINE_MUTEX(<API key>);
/* Set color conversion matrix from user space */
#ifndef CONFIG_FB_MSM_MDP40
static void <API key>(struct mdp_ccs *p)
{
int i;
if (p->direction == MDP_CCS_RGB2YUV) {
/* MDP cmd block enable */
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
/* RGB->YUV primary forward matrix */
for (i = 0; i < MDP_CCS_SIZE; i++)
writel(p->ccs[i], MDP_CSC_PFMVn(i));
#ifdef CONFIG_FB_MSM_MDP31
for (i = 0; i < MDP_BV_SIZE; i++)
writel(p->bv[i], MDP_CSC_POST_BV2n(i));
#endif
/* MDP cmd block disable */
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE);
} else {
/* MDP cmd block enable */
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
/* YUV->RGB primary reverse matrix */
for (i = 0; i < MDP_CCS_SIZE; i++)
writel(p->ccs[i], MDP_CSC_PRMVn(i));
for (i = 0; i < MDP_BV_SIZE; i++)
writel(p->bv[i], MDP_CSC_PRE_BV1n(i));
/* MDP cmd block disable */
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF, FALSE);
}
}
#else
static void <API key>(struct mdp_csc *p)
{
mdp4_vg_csc_update(p);
}
#endif
static int msmfb_notify_update(struct fb_info *info, unsigned long *argp)
{
int ret, notify;
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
ret = copy_from_user(¬ify, argp, sizeof(int));
if (ret) {
pr_err("%s:ioctl failed\n", __func__);
return ret;
}
if (notify > NOTIFY_UPDATE_STOP)
return -EINVAL;
if (notify == NOTIFY_UPDATE_START) {
INIT_COMPLETION(mfd->msmfb_update_notify);
ret = <API key>(
&mfd->msmfb_update_notify, 4*HZ);
} else {
INIT_COMPLETION(mfd-><API key>);
ret = <API key>(
&mfd-><API key>, 4*HZ);
}
if (ret == 0)
ret = -ETIMEDOUT;
return (ret > 0) ? 0 : ret;
}
static int <API key>(struct msm_fb_data_type *mfd,
struct msmfb_mdp_pp *pp_ptr)
{
int ret = -1;
#ifdef CONFIG_FB_MSM_MDP40
int i = 0;
#endif
if (!pp_ptr)
return ret;
switch (pp_ptr->op) {
#ifdef CONFIG_FB_MSM_MDP40
case mdp_op_csc_cfg:
ret = mdp4_csc_config(&(pp_ptr->data.csc_cfg_data));
for (i = 0; i < CSC_MAX_BLOCKS; i++) {
if (pp_ptr->data.csc_cfg_data.block ==
csc_cfg_matrix[i].block) {
memcpy(&csc_cfg_matrix[i].csc_data,
&(pp_ptr->data.csc_cfg_data.csc_data),
sizeof(struct mdp_csc_cfg));
break;
}
}
break;
case mdp_op_pcc_cfg:
ret = mdp4_pcc_cfg(&(pp_ptr->data.pcc_cfg_data));
break;
case mdp_op_lut_cfg:
switch (pp_ptr->data.lut_cfg_data.lut_type) {
case mdp_lut_igc:
ret = mdp4_igc_lut_config(
(struct mdp_igc_lut_data *)
&pp_ptr->data.lut_cfg_data.data);
break;
case mdp_lut_pgc:
ret = mdp4_argc_cfg(
&pp_ptr->data.lut_cfg_data.data.pgc_lut_data);
break;
case mdp_lut_hist:
ret = mdp_hist_lut_config(
(struct mdp_hist_lut_data *)
&pp_ptr->data.lut_cfg_data.data);
break;
default:
break;
}
break;
case mdp_op_qseed_cfg:
ret = mdp4_qseed_cfg((struct mdp_qseed_cfg_data *)
&pp_ptr->data.qseed_cfg_data);
break;
case mdp_op_calib_cfg:
ret = mdp4_calib_config((struct <API key> *)
&pp_ptr->data.calib_cfg);
break;
#endif
case mdp_bl_scale_cfg:
ret = mdp_bl_scale_config(mfd, (struct mdp_bl_scale_data *)
&pp_ptr->data.bl_scale_data);
break;
default:
pr_warn("Unsupported request to MDP_PP IOCTL.\n");
ret = -EINVAL;
break;
}
return ret;
}
static int <API key>(struct msm_fb_data_type *mfd,
struct mdp_buf_sync *buf_sync)
{
int i, ret = 0;
u32 threshold;
int acq_fen_fd[MDP_MAX_FENCE_FD];
struct sync_fence *fence;
struct sync_pt *release_sync_pt;
struct sync_pt *retire_sync_pt;
struct sync_fence *release_fence;
struct sync_fence *retire_fence;
int release_fen_fd;
int retire_fen_fd;
if ((buf_sync->acq_fen_fd_cnt > MDP_MAX_FENCE_FD) ||
(mfd->timeline == NULL))
return -EINVAL;
if ((!mfd->op_enable) || (!mfd->panel_power_on))
return -EPERM;
if (buf_sync->acq_fen_fd_cnt)
ret = copy_from_user(acq_fen_fd, buf_sync->acq_fen_fd,
buf_sync->acq_fen_fd_cnt * sizeof(int));
if (ret) {
pr_err("%s:copy_from_user failed", __func__);
return ret;
}
mutex_lock(&mfd->sync_mutex);
for (i = 0; i < buf_sync->acq_fen_fd_cnt; i++) {
fence = sync_fence_fdget(acq_fen_fd[i]);
if (fence == NULL) {
pr_info("%s: null fence! i=%d fd=%d\n", __func__, i,
acq_fen_fd[i]);
ret = -EINVAL;
break;
}
mfd->acq_fen[i] = fence;
}
mfd->acq_fen_cnt = i;
if (ret)
goto buf_sync_err_1;
if (buf_sync->flags & <API key>) {
<API key>(mfd);
}
if ((mfd->panel.type == WRITEBACK_PANEL) ||
(mfd->panel.type == MIPI_CMD_PANEL))
threshold = 1;
else
threshold = 2;
release_fen_fd = get_unused_fd_flags(0);
if (release_fen_fd < 0) {
pr_err("%s: get_unused_fd_flags failed", __func__);
ret = -EIO;
goto buf_sync_err_1;
}
retire_fen_fd = get_unused_fd_flags(0);
if (retire_fen_fd < 0) {
pr_err("%s: get_unused_fd_flags failed", __func__);
ret = -EIO;
goto buf_sync_err_2;
}
release_sync_pt = sw_sync_pt_create(mfd->timeline,
mfd->timeline_value + threshold +
atomic_read(&mfd->commit_cnt));
release_fence = sync_fence_create("mdp-fence",
release_sync_pt);
sync_fence_install(release_fence, release_fen_fd);
retire_sync_pt = sw_sync_pt_create(mfd->timeline,
mfd->timeline_value + threshold +
atomic_read(&mfd->commit_cnt) + 1);
retire_fence = sync_fence_create("mdp-retire-fence",
retire_sync_pt);
sync_fence_install(retire_fence, retire_fen_fd);
ret = copy_to_user(buf_sync->rel_fen_fd,
&release_fen_fd, sizeof(int));
if (ret) {
pr_err("%s:copy_to_user failed", __func__);
goto buf_sync_err_3;
}
ret = copy_to_user(buf_sync->retire_fen_fd,
&retire_fen_fd, sizeof(int));
if (ret) {
pr_err("%s:copy_to_user failed", __func__);
goto buf_sync_err_3;
}
mutex_unlock(&mfd->sync_mutex);
return ret;
buf_sync_err_3:
sync_fence_put(release_fence);
sync_fence_put(retire_fence);
put_unused_fd(retire_fen_fd);
buf_sync_err_2:
put_unused_fd(release_fen_fd);
buf_sync_err_1:
for (i = 0; i < mfd->acq_fen_cnt; i++)
sync_fence_put(mfd->acq_fen[i]);
mfd->acq_fen_cnt = 0;
mutex_unlock(&mfd->sync_mutex);
return ret;
}
static int <API key>(struct fb_info *info,
unsigned long *argp)
{
int ret;
struct mdp_display_commit disp_commit;
ret = copy_from_user(&disp_commit, argp,
sizeof(disp_commit));
if (ret) {
pr_err("%s:copy_from_user failed", __func__);
return ret;
}
ret = <API key>(info, &disp_commit);
return ret;
}
static int msmfb_get_metadata(struct msm_fb_data_type *mfd,
struct msmfb_metadata *metadata_ptr)
{
int ret = 0;
switch (metadata_ptr->op) {
case <API key>:
metadata_ptr->data.panel_frame_rate =
<API key>(mfd);
break;
default:
pr_warn("Unsupported request to MDP META IOCTL.\n");
ret = -EINVAL;
break;
}
return ret;
}
static int msm_fb_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{
struct msm_fb_data_type *mfd = (struct msm_fb_data_type *)info->par;
void __user *argp = (void __user *)arg;
struct fb_cursor cursor;
struct fb_cmap cmap;
struct mdp_histogram_data hist;
struct <API key> hist_req;
uint32_t block;
#ifndef CONFIG_FB_MSM_MDP40
struct mdp_ccs ccs_matrix;
#else
struct mdp_csc csc_matrix;
#endif
struct mdp_page_protection fb_page_protection;
struct msmfb_mdp_pp mdp_pp;
struct mdp_buf_sync buf_sync;
struct msmfb_metadata mdp_metadata;
int ret = 0;
msm_fb_pan_idle(mfd);
switch (cmd) {
#ifdef <API key>
case MSMFB_OVERLAY_GET:
ret = msmfb_overlay_get(info, argp);
break;
case MSMFB_OVERLAY_SET:
ret = msmfb_overlay_set(info, argp);
break;
case MSMFB_OVERLAY_UNSET:
ret = msmfb_overlay_unset(info, argp);
break;
case MSMFB_OVERLAY_PLAY:
ret = msmfb_overlay_play(info, argp);
break;
case <API key>:
ret = <API key>(info, argp);
break;
case <API key>:
ret = <API key>(info, argp);
break;
case MSMFB_OVERLAY_BLT:
ret = msmfb_overlay_blt(info, argp);
break;
case MSMFB_OVERLAY_3D:
ret = <API key>(info, argp);
break;
case MSMFB_MIXER_INFO:
ret = msmfb_mixer_info(info, argp);
break;
case <API key>:
ret = <API key>(info);
break;
case <API key>:
ret = <API key>(
info);
break;
case <API key>:
ret = <API key>(
info);
break;
case <API key>:
ret = <API key>(
info, argp);
break;
case <API key>:
ret = <API key>(
info, argp);
break;
case <API key>:
ret = <API key>(info);
break;
case <API key>:
ret = <API key>(
info, argp);
break;
#endif
case MSMFB_VSYNC_CTRL:
case <API key>:
down(&<API key>);
if (mdp_rev >= MDP_REV_40)
ret = <API key>(info, argp);
else
ret = msmfb_vsync_ctrl(info, argp);
up(&<API key>);
break;
case MSMFB_BLIT:
down(&<API key>);
ret = msmfb_blit(info, argp);
up(&<API key>);
break;
/* Ioctl for setting ccs matrix from user space */
case <API key>:
#ifndef CONFIG_FB_MSM_MDP40
ret = copy_from_user(&ccs_matrix, argp, sizeof(ccs_matrix));
if (ret) {
printk(KERN_ERR
"%s:<API key> ioctl failed \n",
__func__);
return ret;
}
down(&<API key>);
if (ccs_matrix.direction == MDP_CCS_RGB2YUV)
mdp_ccs_rgb2yuv = ccs_matrix;
else
mdp_ccs_yuv2rgb = ccs_matrix;
<API key>(&ccs_matrix) ;
up(&<API key>);
#else
ret = copy_from_user(&csc_matrix, argp, sizeof(csc_matrix));
if (ret) {
pr_err("%s:<API key> ioctl failed\n",
__func__);
return ret;
}
down(&<API key>);
<API key>(&csc_matrix);
up(&<API key>);
#endif
break;
/* Ioctl for getting ccs matrix to user space */
case <API key>:
#ifndef CONFIG_FB_MSM_MDP40
ret = copy_from_user(&ccs_matrix, argp, sizeof(ccs_matrix)) ;
if (ret) {
printk(KERN_ERR
"%s:<API key> ioctl failed \n",
__func__);
return ret;
}
down(&<API key>);
if (ccs_matrix.direction == MDP_CCS_RGB2YUV)
ccs_matrix = mdp_ccs_rgb2yuv;
else
ccs_matrix = mdp_ccs_yuv2rgb;
ret = copy_to_user(argp, &ccs_matrix, sizeof(ccs_matrix));
if (ret) {
printk(KERN_ERR
"%s:<API key> ioctl failed \n",
__func__);
return ret ;
}
up(&<API key>);
#else
ret = -EINVAL;
#endif
break;
case MSMFB_GRP_DISP:
#ifdef CONFIG_FB_MSM_MDP22
{
unsigned long grp_id;
ret = copy_from_user(&grp_id, argp, sizeof(grp_id));
if (ret)
return ret;
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_ON, FALSE);
writel(grp_id, <API key>);
mdp_pipe_ctrl(MDP_CMD_BLOCK, MDP_BLOCK_POWER_OFF,
FALSE);
break;
}
#else
return -EFAULT;
#endif
case <API key>:
if (!mfd->panel_power_on)
return -EPERM;
mfd-><API key> = FALSE;
ret = <API key>(mfd);
break;
case <API key>:
if (!mfd->panel_power_on)
return -EPERM;
mfd-><API key> = TRUE;
ret = <API key>(mfd);
break;
case MSMFB_CURSOR:
ret = copy_from_user(&cursor, argp, sizeof(cursor));
if (ret)
return ret;
ret = msm_fb_cursor(info, &cursor);
break;
case MSMFB_SET_LUT:
ret = copy_from_user(&cmap, argp, sizeof(cmap));
if (ret)
return ret;
mutex_lock(&<API key>);
ret = msm_fb_set_lut(&cmap, info);
mutex_unlock(&<API key>);
break;
case MSMFB_HISTOGRAM:
if (!mfd->panel_power_on)
return -EPERM;
if (!mfd->do_histogram)
return -ENODEV;
ret = copy_from_user(&hist, argp, sizeof(hist));
if (ret)
return ret;
ret = mfd->do_histogram(info, &hist);
break;
case <API key>:
if (!mfd->panel_power_on)
return -EPERM;
if (!mfd->start_histogram)
return -ENODEV;
ret = copy_from_user(&hist_req, argp, sizeof(hist_req));
if (ret)
return ret;
ret = mfd->start_histogram(&hist_req);
break;
case <API key>:
if (!mfd->stop_histogram)
return -ENODEV;
ret = copy_from_user(&block, argp, sizeof(int));
if (ret)
return ret;
ret = mfd->stop_histogram(info, block);
break;
case <API key>:
fb_page_protection.page_protection
= mfd-><API key>;
ret = copy_to_user(argp, &fb_page_protection,
sizeof(fb_page_protection));
if (ret)
return ret;
break;
case MSMFB_NOTIFY_UPDATE:
ret = msmfb_notify_update(info, argp);
break;
case <API key>:
#if defined CONFIG_ARCH_QSD8X50 || defined CONFIG_ARCH_MSM8X60
ret = copy_from_user(&fb_page_protection, argp,
sizeof(fb_page_protection));
if (ret)
return ret;
/* Validate the proposed page protection settings. */
switch (fb_page_protection.page_protection) {
case <API key>:
case <API key>:
case <API key>:
/* Write-back cache (read allocate) */
case <API key>:
/* Write-back cache (write allocate) */
case <API key>:
mfd-><API key> =
fb_page_protection.page_protection;
break;
default:
ret = -EINVAL;
break;
}
#else
/*
* Don't allow caching until 7k DMA cache operations are
* available.
*/
ret = -EINVAL;
#endif
break;
case MSMFB_MDP_PP:
ret = copy_from_user(&mdp_pp, argp, sizeof(mdp_pp));
if (ret)
return ret;
ret = <API key>(mfd, &mdp_pp);
if (ret == 1)
ret = copy_to_user(argp, &mdp_pp, sizeof(mdp_pp));
break;
case MSMFB_BUFFER_SYNC:
ret = copy_from_user(&buf_sync, argp, sizeof(buf_sync));
if (ret)
return ret;
ret = <API key>(mfd, &buf_sync);
if (!ret)
ret = copy_to_user(argp, &buf_sync, sizeof(buf_sync));
break;
case <API key>:
ret = <API key>(info, argp);
break;
case MSMFB_METADATA_GET:
ret = copy_from_user(&mdp_metadata, argp, sizeof(mdp_metadata));
if (ret)
return ret;
ret = msmfb_get_metadata(mfd, &mdp_metadata);
if (!ret)
ret = copy_to_user(argp, &mdp_metadata,
sizeof(mdp_metadata));
break;
default:
MSM_FB_INFO("MDP: unknown ioctl (cmd=%x) received!\n", cmd);
ret = -EINVAL;
break;
}
return ret;
}
static int <API key>(void)
{
return <API key>(&msm_fb_driver);
}
#ifdef <API key>
struct fb_info *<API key>(void)
{
int c = 0;
for (c = 0; c < fbi_list_index; ++c) {
struct msm_fb_data_type *mfd;
mfd = (struct msm_fb_data_type *)fbi_list[c]->par;
if (mfd->panel.type == WRITEBACK_PANEL)
return fbi_list[c];
}
return NULL;
}
EXPORT_SYMBOL(<API key>);
int <API key>(struct fb_info *info)
{
return <API key>(info);
}
EXPORT_SYMBOL(<API key>);
int <API key>(struct fb_info *info,
struct msmfb_data *data)
{
return <API key>(info, data);
}
EXPORT_SYMBOL(<API key>);
int <API key>(struct fb_info *info,
struct msmfb_data *data)
{
return <API key>(info, data);
}
EXPORT_SYMBOL(<API key>);
int <API key>(struct fb_info *info)
{
return mdp4_writeback_stop(info);
}
EXPORT_SYMBOL(<API key>);
int <API key>(struct fb_info *info)
{
return mdp4_writeback_init(info);
}
EXPORT_SYMBOL(<API key>);
int <API key>(struct fb_info *info)
{
return <API key>(info);
}
EXPORT_SYMBOL(<API key>);
#endif
struct platform_device *msm_fb_add_device(struct platform_device *pdev)
{
struct msm_fb_panel_data *pdata;
struct platform_device *this_dev = NULL;
struct fb_info *fbi;
struct msm_fb_data_type *mfd = NULL;
u32 type, id, fb_num;
if (!pdev)
return NULL;
id = pdev->id;
pdata = pdev->dev.platform_data;
if (!pdata)
return NULL;
type = pdata->panel_info.type;
#if defined MSM_FB_NUM
/*
* over written fb_num which defined
* at panel_info
*
*/
if (type == HDMI_PANEL || type == DTV_PANEL ||
type == TV_PANEL || type == WRITEBACK_PANEL) {
if (hdmi_prim_display)
pdata->panel_info.fb_num = 2;
else
pdata->panel_info.fb_num = 1;
}
else
pdata->panel_info.fb_num = MSM_FB_NUM;
MSM_FB_INFO("setting pdata->panel_info.fb_num to %d. type: %d\n",
pdata->panel_info.fb_num, type);
#endif
fb_num = pdata->panel_info.fb_num;
if (fb_num <= 0)
return NULL;
if (fbi_list_index >= MAX_FBI_LIST) {
printk(KERN_ERR "msm_fb: no more framebuffer info list!\n");
return NULL;
}
/*
* alloc panel device data
*/
this_dev = msm_fb_device_alloc(pdata, type, id);
if (!this_dev) {
printk(KERN_ERR
"%s: msm_fb_device_alloc failed!\n", __func__);
return NULL;
}
/*
* alloc framebuffer info + par data
*/
fbi = framebuffer_alloc(sizeof(struct msm_fb_data_type), NULL);
if (fbi == NULL) {
platform_device_put(this_dev);
printk(KERN_ERR "msm_fb: can't alloca framebuffer info data!\n");
return NULL;
}
mfd = (struct msm_fb_data_type *)fbi->par;
mfd->key = MFD_KEY;
mfd->fbi = fbi;
mfd->panel.type = type;
mfd->panel.id = id;
mfd->fb_page = fb_num;
mfd->index = fbi_list_index;
mfd-><API key> = <API key>;
mfd->iclient = iclient;
/* link to the latest pdev */
mfd->pdev = this_dev;
/* link to the panel pdev */
mfd->panel_pdev = pdev;
mutex_init(&mfd->power_lock);
mfd_list[mfd_list_index++] = mfd;
fbi_list[fbi_list_index++] = fbi;
/*
* set driver data
*/
<API key>(this_dev, mfd);
if (platform_device_add(this_dev)) {
printk(KERN_ERR "msm_fb: platform_device_add failed!\n");
platform_device_put(this_dev);
framebuffer_release(fbi);
fbi_list_index
return NULL;
}
return this_dev;
}
EXPORT_SYMBOL(msm_fb_add_device);
int get_fb_phys_info(unsigned long *start, unsigned long *len, int fb_num,
int subsys_id)
{
struct fb_info *info;
struct msm_fb_data_type *mfd;
if (fb_num > MAX_FBI_LIST ||
(subsys_id != <API key> &&
subsys_id != <API key>)) {
pr_err("%s(): Invalid parameters\n", __func__);
return -1;
}
info = fbi_list[fb_num];
if (!info) {
pr_err("%s(): info is NULL\n", __func__);
return -1;
}
mfd = (struct msm_fb_data_type *)info->par;
if (subsys_id == <API key>) {
if (mfd->display_iova)
*start = mfd->display_iova;
else
*start = info->fix.smem_start;
} else {
if (mfd->rotator_iova)
*start = mfd->rotator_iova;
else
*start = info->fix.smem_start;
}
*len = info->fix.smem_len;
return 0;
}
EXPORT_SYMBOL(get_fb_phys_info);
int __init msm_fb_init(void)
{
int rc = -ENODEV;
if (<API key>())
return rc;
#ifdef MSM_FB_ENABLE_DBGFS
{
struct dentry *root;
if ((root = <API key>()) != NULL) {
<API key>(root,
"<API key>",
(u32 *) &msm_fb_msg_level);
<API key>(root,
"<API key>",
(u32 *) &mddi_msg_level);
<API key>(root, "<API key>",
(u32 *) &<API key>);
}
}
#endif
return 0;
}
/* Called by v4l2 driver to enable/disable overlay pipe */
int msm_fb_v4l2_enable(struct mdp_overlay *req, bool enable, void **par)
{
int err = 0;
#ifdef CONFIG_FB_MSM_MDP40
struct mdp4_overlay_pipe *pipe;
if (enable) {
err = <API key>(fbi_list[0], req, &pipe);
*(struct mdp4_overlay_pipe **)par = pipe;
} else {
pipe = *(struct mdp4_overlay_pipe **)par;
<API key>(pipe);
}
#else
#ifdef CONFIG_FB_MSM_MDP30
if (enable)
err = <API key>(fbi_list[0], req);
else
err = <API key>();
#else
err = -EINVAL;
#endif
#endif
return err;
}
EXPORT_SYMBOL(msm_fb_v4l2_enable);
/* Called by v4l2 driver to provide a frame for display */
int msm_fb_v4l2_update(void *par,
unsigned long srcp0_addr, unsigned long srcp0_size,
unsigned long srcp1_addr, unsigned long srcp1_size,
unsigned long srcp2_addr, unsigned long srcp2_size)
{
#ifdef CONFIG_FB_MSM_MDP40
struct mdp4_overlay_pipe *pipe = (struct mdp4_overlay_pipe *)par;
return <API key>(fbi_list[0], pipe,
srcp0_addr, srcp1_addr,
srcp2_addr);
#else
#ifdef CONFIG_FB_MSM_MDP30
return <API key>(fbi_list[0],
srcp0_addr, srcp0_size,
srcp1_addr, srcp1_size);
#else
return -EINVAL;
#endif
#endif
}
EXPORT_SYMBOL(msm_fb_v4l2_update);
module_init(msm_fb_init); |
#include "camendpulse.h"
#include "../utils/cconverter.h"
#include <string.h>
#include <cmath> // std::abs
CAmendPulse::CAmendPulse()
{
memset(m_pulse_counter,0,4);
memset(m_frame_counter,0,4);
}
CAmendPulse::~CAmendPulse()
{
}
void CAmendPulse::SetAmendAttr(const DLPMotorPulse &type,const DLPMotorAttr &mattr,const DLPEncoderAttr &eattr)
{
if(type>DLP_PULSE_NO&&type<DLP_PULSE_MAX)
{
m_amend_attr[type].coder_gear_rate=eattr.dlp_gear[1]/(eattr.dlp_gear[0]*1.0);;
m_amend_attr[type].coder_unit_angle=360/(pow(2,eattr.dlp_bits)-1);
m_amend_attr[type].coder_unit_pulse=16;
m_amend_attr[type].motor_gear_rate=mattr.dlp_algorithm.g.gear[1]/mattr.dlp_algorithm.g.gear[0];
m_amend_attr[type].motor_speed=mattr.dlp_algorithm.g.max_speed;
m_amend_attr[type].step_angle=division2angle(ratio2division(mattr.dlp_algorithm.g.division));
#ifdef DLP_DEBUG
std::cout<<"AmendPulse::SetAmendAttr"<<std::endl;
std::cout<<"m_amend_attr.coder_gear_rate"<<m_amend_attr[type].coder_gear_rate<<std::endl;
std::cout<<"m_amend_attr.coder_unit_angle"<<m_amend_attr[type].coder_unit_angle<<std::endl;
std::cout<<"m_amend_attr.coder_unit_pulse"<<m_amend_attr[type].coder_unit_pulse<<std::endl;
std::cout<<"m_amend_attr.motor_gear_rate"<<m_amend_attr[type].motor_gear_rate<<std::endl;
std::cout<<"m_amend_attr.motor_speed"<<m_amend_attr[type].motor_gear_rate<<std::endl;
std::cout<<"m_amend_attr.step_angle "<<m_amend_attr[type].step_angle<<std::endl;
#endif // DLP_DEBUG
}
}
void CAmendPulse::SetDevCurvePulse(const DLPMotorPulse &type,const uint8_t &len,const uint32_t *src)
{
m_dev_pulses[type][len]=len;
for(int i=0;i<len;i++) //1 starting
{
m_dev_pulses[type][i]=src[i];
}
//reset or clear
// memset(m_pulse_counter,0,4);
// memset(m_frame_counter,0,4);
}
void CAmendPulse::SetDevCoderAngle(const DLPMotorPulse &type,const float &coder_angle)
{
m_init_angle[type]=static_cast<float>(coder_angle);
}
/**
* @brief
* @return 0 NO amend
1 need to amend
**/
int CAmendPulse::IsAmend(const DLPMotorPulse &type,const float &coder_angle)
{
if(DLP_PULSE_NO<type&&type<DLP_PULSE_MAX
&&(m_frame_counter[type]>0)
&&(m_frame_counter[type]%<API key>==0))
{
uint16_t real_value=Angle2Pulses(type,coder_angle);
uint32_t theory_value=Frames2Pulses(type);
int16_t difference_value=GetAmendError(theory_value,real_value);;
#ifdef DLP_DEBUG
printf("real %d,theory %d,diff %d\n",real_value,theory_value,difference_value);
#endif // DLP_DEBUG
if(abs(difference_value)>DLP_MAX_AMEND_ERROR)
{
ComputeAmendTime(type,difference_value);
ComputeAmendAngle(type,difference_value);
m_pulse_counter[type]=0;
m_frame_counter[type]=0;
return 1;
}
}
//if not amend ,and continuing
// std::cout<<"m_pulse_counter"<<m_pulse_counter[type]<<","<<m_dev_pulses[type][m_frame_counter[type]]<<std::endl;
m_pulse_counter[type]+=m_dev_pulses[type][m_frame_counter[type]];
m_frame_counter[type]++;
#ifdef DLP_DEBUG
std::cout<<" m_pulse_counter "<<m_pulse_counter[type]<<",m_frame_counter "<<m_frame_counter[type]<<std::endl;
std::cout<<"dev "<<m_dev_pulses[type][0]
<< "," <<m_dev_pulses[type][1]
<<"," <<m_dev_pulses[type][2]
<<"," <<m_dev_pulses[type][3]
<<std::endl;
#endif // DLP_DEBUG
return 0;
}
/**
* @brief Angle into the driver pulses
* @param type :The specific type of the location motor
coder_angle :the corresponding encoder angle
* @return the converted pulses
*/
uint32_t CAmendPulse::Angle2Pulses(const DLPMotorPulse &type,const float &coder_angle)
{
uint32_t pulses=0;
float diff_angle=0.0;
if(type>DLP_PULSE_NO&&type<DLP_PULSE_MAX)
{
diff_angle=abs(<API key>[type]);
std::cout<<"diff"<<diff_angle<<std::endl;
//Method 1
pulses=static_cast<uint32_t>(diff_angle/m_amend_attr[type].coder_unit_angle*m_amend_attr[type].coder_unit_pulse);
std::cout<<"method 1 pulses"<<pulses<<std::endl;
//Method 2
pulses=static_cast<uint32_t>(diff_angle/m_amend_attr[type].coder_gear_rate*m_amend_attr[type].motor_gear_rate)/m_amend_attr[type].step_angle;
std::cout<<"method 2 pulses"<<pulses<<std::endl;
}
return pulses;
}
/**
* @brief Frames (or Field) into the driver pulses
* @param The specific type of the location motor
* @return the converted pulses
0 param not fit
*/
uint32_t CAmendPulse::Frames2Pulses(const DLPMotorPulse &type)
{
uint32_t pulses=0;
if(type>DLP_PULSE_NO&&type<DLP_PULSE_MAX)
{
pulses= m_pulse_counter[type];//+m_dev_pulses[type][m_frame_counter[type]];
}
return pulses;
}
/**
* @brief
* @param
* @return
* greater than 0:lose the step ,and need to supplement
*/
int32_t CAmendPulse::GetAmendError(const uint32_t &theory_pulses,const uint32_t &real_pulses)
{
return <API key>;
}
void CAmendPulse::ComputeAmendTime(const DLPMotorPulse &type,const int32_t &amend_error)
{
uint32_t sum_time,amend_time;
if(type>DLP_PULSE_NO&&type<DLP_PULSE_MAX)
{
amend_time=static_cast<uint32_t>(sum_time*1000)-m_frame_counter[type]*20; //unit==ms
m_amend_time[type][0]=amend_time%1000;
m_amend_time[type][1]=amend_time/1000;
}
}
void CAmendPulse::ComputeAmendAngle(const DLPMotorPulse &type,const int32_t &amend_error)
{
uint32_t sum_angle;
uint32_t sum_pulses=0;
float amend_angle;
if(type>DLP_PULSE_NO&&type<DLP_PULSE_MAX)
{
for(int i=1;i<m_dev_pulses[type][0]+1;i++)
{
sum_pulses=+m_dev_pulses[type][i];
}
sum_pulses=<API key>[type]+amend_error;
amend_angle=sum_pulses/m_amend_attr[type].coder_unit_pulse*m_amend_attr[type].coder_gear_rate/m_amend_attr[type].motor_gear_rate;
m_amend_angle[type][1]=static_cast<uint16_t>(amend_angle);
m_amend_angle[type][0]=(<API key>[type][1])*1000;//0.001 degree
}
}
void CAmendPulse::GetAmendParameter(const DLPMotorPulse &type,uint16_t *pcoder_data)
{
if(type>DLP_PULSE_NO&&type<DLP_PULSE_MAX)
{
pcoder_data[0]= //direction
pcoder_data[1]=m_amend_angle[type][0]; //decimal part
pcoder_data[2]=m_amend_angle[type][1]; //integer part
pcoder_data[3]=m_amend_time[type][0]; //milliseconds component
pcoder_data[4]=m_amend_time[type][1]; //seconds component
}
} |
<?xml version="1.0" ?><!DOCTYPE TS><TS language="uk" version="2.1">
<context>
<name>@default</name>
<message>
<source>Notifications</source>
<translation type="unfinished"/>
</message>
<message>
<source>Sound</source>
<translation type="unfinished"/>
</message>
<message>
<source>Sound player</source>
<translation type="unfinished"/>
</message>
<message>
<source>Player</source>
<translation type="unfinished"/>
</message>
</context>
</TS> |
#ifndef AT91_PIT_H
#define AT91_PIT_H
#define AT91_PIT_MR 0x00 /* Mode Register */
#define AT91_PIT_PITIEN (1 << 25) /* Timer Interrupt Enable */
#define AT91_PIT_PITEN (1 << 24) /* Timer Enabled */
#define AT91_PIT_PIV (0xfffff) /* Periodic Interval Value */
#define AT91_PIT_SR 0x04 /* Status Register */
#define AT91_PIT_PITS (1 << 0) /* Timer Status */
#define AT91_PIT_PIVR 0x08 /* Periodic Interval Value Register */
#define AT91_PIT_PIIR 0x0c /* Periodic Interval Image Register */
#define AT91_PIT_PICNT (0xfff << 20) /* Interval Counter */
#define AT91_PIT_CPIV (0xfffff) /* Inverval Value */
#endif |
#include <config.h>
#include "globals.h"
#include <stdio.h>
#include "vzt.h"
#include "lx2.h"
#include "fsdb_wrapper_api.h"
#ifndef _MSC_VER
#include <unistd.h>
#endif
#include <fcntl.h>
#include <string.h>
#include <stdlib.h>
#include "symbol.h"
#include "vcd.h"
#include "lxt2_read.h"
#include "vzt_read.h"
#include "lxt.h"
#include "extload.h"
#include "debug.h"
#include "busy.h"
#include "hierpack.h"
#ifndef EXTLOAD_SUFFIX
const char *<API key> = "Sorry, EXTLOAD support was not compiled into this executable, exiting.\n\n";
TimeType extload_main(char *fname, char *skip_start, char *skip_end)
{
(void)fname;
(void)skip_start;
(void)skip_end;
fprintf(stderr, "%s", <API key>);
exit(255);
return(0); /* for vc++ */
}
void <API key>(nptr np)
{
(void)np;
fprintf(stderr, "%s", <API key>);
exit(255);
}
void fsdb_import_masked(void)
{
fprintf(stderr, "%s", <API key>);
exit(255);
}
void <API key>(nptr np)
{
(void)np;
fprintf(stderr, "%s", <API key>);
exit(255);
}
#else
#ifndef <API key>
static int <API key>(void)
{
#ifdef HAVE_SYS_STAT_H
struct stat buf;
int rc;
errno = 0;
rc = stat(GLOBALS->loaded_file_name, &buf);
if(GLOBALS->extload_lastmod)
{
if(GLOBALS-><API key>)
{
return(0);
}
else
if(rc != 0)
{
fprintf(stderr, EXTLOAD"stat error on '%s'\n", GLOBALS->loaded_file_name);
perror("Why");
errno = 0;
GLOBALS-><API key> = 1;
return(0);
}
else
if(GLOBALS->extload_lastmod != buf.st_mtime)
{
fprintf(stderr, EXTLOAD"file '%s' was modified!\n", GLOBALS->loaded_file_name);
GLOBALS-><API key> = 1;
return(0);
}
else
{
return(1);
}
}
else
{
GLOBALS->extload_lastmod = buf.st_mtime;
return(1);
}
#else
return(1);
#endif
}
#endif
#ifdef <API key>
static char *get_varname(char *sbuff, unsigned char *vtp, unsigned char *vdp, int i)
{
#else
static char *get_varname(unsigned char *vtp, unsigned char *vdp, int i)
{
static char sbuff[65537];
#endif
char * rc;
int vt, vt_len;
#ifndef <API key>
for(;;)
#endif
{
#ifndef <API key>
rc = fgets(sbuff, 65536, GLOBALS->extload);
if(rc)
{
if(isspace(rc[0]))
{
char *snp;
char sbuff2[65537];
sbuff2[0] = 0;
if((snp=strstr(rc+1, "Struct Name:")))
{
sscanf(rc+14,"%s", sbuff2);
if(sbuff2[0])
{
sprintf(rc, "Scope: vcd_struct %s NULL\n", sbuff2);
}
}
else
if((snp=strstr(rc+1, "Struct End")))
{
sprintf(rc, "Upscope:\n");
}
}
}
else
{
return(NULL);
}
#else
rc = sbuff;
#endif
if((rc[0] == 'V') && (i >= 0))
{
#ifndef <API key>
if(!strncmp("Var: ", rc, 5))
#endif
{
char *pnt = rc + 5;
char *last_l = NULL;
char typ[64];
char *esc = NULL;
char *lb = NULL;
char *colon = NULL;
char *rb = NULL;
int state = 0;
char *vtyp_nam;
char *cpyto;
char *pntd;
sscanf(rc + 5, "%s", typ);
while(*pnt)
{
if((pnt[0] == 'l') && (pnt[1] == ':'))
{
last_l = pnt;
}
else if(pnt[0] == '\\')
{
esc = pnt;
}
else if(!last_l)
{
if(pnt[0] == '[')
{
lb = pnt;
colon = NULL;
rb = NULL;
state = 1;
}
else if(pnt[0] == ']')
{
rb = pnt;
state = 0;
if(!isspace(pnt[1]))
{
lb = colon = rb = NULL;
}
}
else if(pnt[0] == ':')
{
if(state)
{
colon = pnt;
}
}
}
pnt++;
}
if(last_l)
{
unsigned int l, r;
char s1[32];
unsigned int d2;
sscanf(last_l+2, "%u r:%u %s %u", &l, &r, s1, &d2);
GLOBALS->extload_idcodes[i] = d2;
if(GLOBALS->extload_inv_idcodes[d2] == 0) GLOBALS->extload_inv_idcodes[d2] = i+1; /* root alias */
if(!strcmp("vcd_real", typ))
{
GLOBALS->mvlfacs_vzt_c_3[i].flags = VZT_RD_SYM_F_DOUBLE;
GLOBALS->extload_node_block[i].msi=0;
GLOBALS->extload_node_block[i].lsi=0;
GLOBALS->mvlfacs_vzt_c_3[i].len=64;
}
else
if(!strcmp("vcd_integer", typ))
{
GLOBALS->mvlfacs_vzt_c_3[i].flags = <API key>;
GLOBALS->extload_node_block[i].msi=0;
GLOBALS->extload_node_block[i].lsi=0;
GLOBALS->mvlfacs_vzt_c_3[i].len=32;
}
else
{
int len_parse = 1;
GLOBALS->mvlfacs_vzt_c_3[i].len=(l>r) ? (l-r+1) : (r-l+1);
if(esc && lb && rb)
{
GLOBALS->extload_node_block[i].msi = atoi(lb+1);
if(colon)
{
GLOBALS->extload_node_block[i].lsi = atoi(colon+1);
}
else
{
GLOBALS->extload_node_block[i].lsi = GLOBALS->extload_node_block[i].msi;
}
len_parse = (GLOBALS->extload_node_block[i].msi > GLOBALS->extload_node_block[i].lsi)
? (GLOBALS->extload_node_block[i].msi - GLOBALS->extload_node_block[i].lsi + 1)
: (GLOBALS->extload_node_block[i].lsi - GLOBALS->extload_node_block[i].msi + 1);
if(len_parse != GLOBALS->mvlfacs_vzt_c_3[i].len)
{
GLOBALS->extload_node_block[i].msi=l;
GLOBALS->extload_node_block[i].lsi=r;
}
}
else
{
if(lb && !l && !r) /* fix for stranded signals */
{
GLOBALS->extload_node_block[i].msi=atoi(lb+1);
GLOBALS->extload_node_block[i].lsi=atoi(lb+1);
}
else
{
GLOBALS->extload_node_block[i].msi=l;
GLOBALS->extload_node_block[i].lsi=r;
}
}
GLOBALS->mvlfacs_vzt_c_3[i].flags = VZT_RD_SYM_F_BITS;
}
}
/* now extract directional/type information */
pnt = rc + 5;
vtyp_nam = pnt;
cpyto = sbuff;
pntd = strrchr(last_l ? last_l : pnt, ':');
if(pntd)
{
unsigned char vd = ND_DIR_IMPLICIT;
pntd = strchr(pntd, ' ');
if(pntd)
{
pntd++;
if(*pntd == 'o')
{
vd = ND_DIR_OUT;
GLOBALS-><API key> = 1;
}
else
if(!strncmp(pntd, "in", 2))
{
vd = (pntd[2] == 'p') ? ND_DIR_IN : ND_DIR_INOUT;
GLOBALS-><API key> = 1;
}
}
if(vdp) { *vdp = vd; }
}
while(*pnt)
{
if(!isspace(*pnt))
{
pnt++;
}
else
{
break;
}
}
/* is space */
/* vvv extract vartype vvv */
if(vtp)
{
*pnt = 0;
vt_len = pnt-vtyp_nam;
if(vt_len > 4)
{
if(!strncmp(vtyp_nam, "vcd_", 4))
{
vt = vcd_keyword_code(vtyp_nam + 4, vt_len - 4);
if(vt == V_STRINGTYPE) vt = V_WIRE;
}
else
{
if(!strcmp(vtyp_nam, "stream"))
{
GLOBALS->extload_idcodes[i] = 0; /* kill being able to read stream variables [transactions] for now */
}
vt = V_WIRE;
}
}
else
{
vt = V_WIRE;
}
*vtp = vt;
*pnt = ' ';
}
/* ^^^ extract vartype ^^^ */
while(*pnt)
{
if(isspace(*pnt))
{
pnt++;
}
else
{
break;
}
}
if(*pnt)
{
while(*pnt)
{
/* if((*pnt == '[')||(isspace(*pnt))) break; */
if(isspace(*pnt)) break;
if((*pnt == '[') && (pnt == strrchr(pnt, '['))) /* fix for arrays */
{
/* now to fix possible generate... */
char *pnt2 = pnt;
char lastch = *pnt2;
int colon_seen = 0;
pnt2++;
while(*pnt2 && !isspace(*pnt2) && (*pnt2 != '['))
{
lastch = *pnt2; pnt2++;
if(lastch == ':') { colon_seen = 1; }
};
if(lastch == ']') /* fix for NC verilog arrays */
{
int rng;
if(colon_seen) break;
rng = GLOBALS->extload_node_block[i].msi - GLOBALS->extload_node_block[i].lsi;
if(!rng)
{
break;
}
}
}
if(*pnt == '\\') /* this is not strictly correct, but fixes generic ranges from icarus */
{
pnt++;
continue;
}
*(cpyto++) = *(pnt++);
}
*cpyto = 0;
return(sbuff);
}
}
}
else
if(rc[0] == 'S')
{
#ifndef <API key>
if(!strncmp(rc, "Scope:", 6))
#endif
{
char vht[2048];
char cname[2048];
char ctype[2048];
unsigned char ttype;
vht[0] = vht[4] = vht[5] = cname[0] = ctype[0] = 0;
sscanf(rc+6, "%s %s %s", vht, cname, ctype);
GLOBALS->fst_scope_name = fstReaderPushScope(GLOBALS->extload_xc, cname, GLOBALS->mod_tree_parent);
if(!strcmp(ctype, "NULL")) { ctype[0] = 0; }
if(!strncmp(vht, "vcd_", 4))
{
switch(vht[4])
{
case 'm': ttype = TREE_VCD_ST_MODULE; break;
case 't': ttype = TREE_VCD_ST_TASK; break;
case 'f': ttype = (vht[5] == 'u') ? <API key> : TREE_VCD_ST_FORK; break;
case 'b': ttype = TREE_VCD_ST_BEGIN; break;
case 'g': ttype = <API key>; break;
case 's': ttype = TREE_VCD_ST_STRUCT; break;
default: ttype = TREE_UNKNOWN; break;
}
}
else
if(!strncmp(vht, "sv_", 3))
{
switch(vht[3])
{
case 'i': ttype = <API key>; break;
default: ttype = TREE_UNKNOWN; break;
}
}
else
if(!strncmp(vht, "vhdl_", 5))
{
switch(vht[5])
{
case 'a': ttype = <API key>; break;
case 'r': ttype = TREE_VHDL_ST_RECORD; break;
case 'b': ttype = TREE_VHDL_ST_BLOCK; break;
case 'g': ttype = <API key>; break;
case 'i': ttype = TREE_VHDL_ST_GENIF; break;
case 'f': ttype = (vht[6] == 'u') ? <API key> : TREE_VHDL_ST_GENFOR; break;
case 'p': ttype = (!strncmp(vht+6, "roces", 5)) ? <API key>: <API key>; break;
default: ttype = TREE_UNKNOWN; break;
}
}
else
{
ttype = TREE_UNKNOWN;
}
<API key>(ttype, cname, ctype, strlen(cname), strlen(ctype), 0, 0);
}
}
else
if(rc[0] == 'U')
{
GLOBALS->mod_tree_parent = <API key>(GLOBALS->extload_xc);
GLOBALS->fst_scope_name = fstReaderPopScope(GLOBALS->extload_xc);
}
}
return(NULL);
}
#ifdef <API key>
static void <API key>(char *s_gv)
#else
static void <API key>(void)
#endif
{
int i;
unsigned char vt, nvt;
unsigned char vd;
struct Node *n;
struct symbol *s;
char buf[65537];
char *str;
struct fac *f;
char *fnam;
int flen;
i = GLOBALS->extload_i;
if(i<0)
{
#ifdef <API key>
fnam = get_varname(s_gv, &GLOBALS->extload_vt_prev, &GLOBALS->extload_vd_prev, 0);
flen = strlen(fnam);
if(GLOBALS->extload_hlen)
{
GLOBALS->extload_namecache[0]=malloc_2(GLOBALS->extload_hlen+1+flen+1);
strcpy(GLOBALS->extload_namecache[0], GLOBALS->fst_scope_name);
*(GLOBALS->extload_namecache[0]+GLOBALS->extload_hlen) = '.';
strcpy(GLOBALS->extload_namecache[0]+GLOBALS->extload_hlen+1, fnam);
}
else
{
GLOBALS->extload_namecache[0]=malloc_2(flen+1);
strcpy(GLOBALS->extload_namecache[0], fnam);
}
#else
fnam = get_varname(&GLOBALS->extload_vt_prev, &GLOBALS->extload_vd_prev, 0);
flen = strlen(fnam);
GLOBALS->extload_namecache[0]=malloc_2(flen+1);
strcpy(GLOBALS->extload_namecache[0], fnam);
#endif
}
else
{
vt = GLOBALS->extload_vt_prev;
vd = GLOBALS->extload_vd_prev;
if(i!=(GLOBALS->numfacs-1))
{
#ifdef <API key>
fnam = get_varname(s_gv, &GLOBALS->extload_vt_prev, &GLOBALS->extload_vd_prev, i+1);
flen = strlen(fnam);
if(GLOBALS->extload_hlen)
{
GLOBALS->extload_namecache[i+1]=malloc_2(GLOBALS->extload_hlen+1+flen+1);
strcpy(GLOBALS->extload_namecache[i+1], GLOBALS->fst_scope_name);
*(GLOBALS->extload_namecache[i+1]+GLOBALS->extload_hlen) = '.';
strcpy(GLOBALS->extload_namecache[i+1]+GLOBALS->extload_hlen+1, fnam);
}
else
{
GLOBALS->extload_namecache[i+1]=malloc_2(flen+1);
strcpy(GLOBALS->extload_namecache[i+1], fnam);
}
#else
fnam = get_varname(&GLOBALS->extload_vt_prev, &GLOBALS->extload_vd_prev, i+1);
flen = strlen(fnam);
GLOBALS->extload_namecache[i+1]=malloc_2(flen+1);
strcpy(GLOBALS->extload_namecache[i+1], fnam);
#endif
}
if(i>1)
{
free_2(GLOBALS->extload_namecache[i-2]);
GLOBALS->extload_namecache[i-2] = NULL;
}
f=GLOBALS->mvlfacs_vzt_c_3+i;
if((f->len>1)&& (!(f->flags&(<API key>|VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING))) )
{
int len=sprintf(buf, "%s[%d:%d]", GLOBALS->extload_namecache[i],GLOBALS->extload_node_block[i].msi, GLOBALS->extload_node_block[i].lsi);
str=malloc_2(len+1);
if(!GLOBALS->alt_hier_delimeter)
{
strcpy(str, buf);
}
else
{
strcpy_vcdalt(str, buf, GLOBALS->alt_hier_delimeter);
}
s=&GLOBALS->extload_sym_block[i];
<API key>(s,str,0);
GLOBALS->extload_prevsymroot = GLOBALS->extload_prevsym = NULL;
}
else if (
((f->len==1)&&(!(f->flags&(<API key>|VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))&&
((i!=GLOBALS->numfacs-1)&&(!strcmp(GLOBALS->extload_namecache[i], GLOBALS->extload_namecache[i+1]))))
||
(((i!=0)&&(!strcmp(GLOBALS->extload_namecache[i], GLOBALS->extload_namecache[i-1]))) &&
(GLOBALS->extload_node_block[i].msi!=-1)&&(GLOBALS->extload_node_block[i].lsi!=-1))
)
{
int len = sprintf(buf, "%s[%d]", GLOBALS->extload_namecache[i],GLOBALS->extload_node_block[i].msi);
str=malloc_2(len+1);
if(!GLOBALS->alt_hier_delimeter)
{
strcpy(str, buf);
}
else
{
strcpy_vcdalt(str, buf, GLOBALS->alt_hier_delimeter);
}
s=&GLOBALS->extload_sym_block[i];
<API key>(s,str,0);
if((GLOBALS->extload_prevsym)&&(i>0)&&(!strcmp(GLOBALS->extload_namecache[i], GLOBALS->extload_namecache[i-1]))) /* allow chaining for search functions.. */
{
GLOBALS->extload_prevsym->vec_root = GLOBALS->extload_prevsymroot;
GLOBALS->extload_prevsym->vec_chain = s;
s->vec_root = GLOBALS->extload_prevsymroot;
GLOBALS->extload_prevsym = s;
}
else
{
GLOBALS->extload_prevsymroot = GLOBALS->extload_prevsym = s;
}
}
else
{
str=malloc_2(strlen(GLOBALS->extload_namecache[i])+1);
if(!GLOBALS->alt_hier_delimeter)
{
strcpy(str, GLOBALS->extload_namecache[i]);
}
else
{
strcpy_vcdalt(str, GLOBALS->extload_namecache[i], GLOBALS->alt_hier_delimeter);
}
s=&GLOBALS->extload_sym_block[i];
<API key>(s,str,0);
GLOBALS->extload_prevsymroot = GLOBALS->extload_prevsym = NULL;
if(f->flags&<API key>)
{
GLOBALS->extload_node_block[i].msi=31;
GLOBALS->extload_node_block[i].lsi=0;
GLOBALS->mvlfacs_vzt_c_3[i].len=32;
}
}
n=&GLOBALS->extload_node_block[i];
n->nname=s->name;
n->mv.mvlfac = GLOBALS->mvlfacs_vzt_c_3+i;
GLOBALS->mvlfacs_vzt_c_3[i].working_node = n;
if((f->len>1)||(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
{
n->extvals = 1;
}
n->head.time=-1; /* mark 1st node as negative time */
n->head.v.h_val=AN_X;
s->n=n;
switch(vt)
{
case V_EVENT: nvt = ND_VCD_EVENT; break;
case V_PARAMETER: nvt = ND_VCD_PARAMETER; break;
case V_INTEGER: nvt = ND_VCD_INTEGER; break;
case V_REAL: nvt = ND_VCD_REAL; break;
case V_REG: nvt = ND_VCD_REG; break;
case V_SUPPLY0: nvt = ND_VCD_SUPPLY0; break;
case V_SUPPLY1: nvt = ND_VCD_SUPPLY1; break;
case V_TIME: nvt = ND_VCD_TIME; break;
case V_TRI: nvt = ND_VCD_TRI; break;
case V_TRIAND: nvt = ND_VCD_TRIAND; break;
case V_TRIOR: nvt = ND_VCD_TRIOR; break;
case V_TRIREG: nvt = ND_VCD_TRIREG; break;
case V_TRI0: nvt = ND_VCD_TRI0; break;
case V_TRI1: nvt = ND_VCD_TRI1; break;
case V_WAND: nvt = ND_VCD_WAND; break;
case V_WIRE: nvt = ND_VCD_WIRE; break;
case V_WOR: nvt = ND_VCD_WOR; break;
case V_PORT: nvt = ND_VCD_PORT; break;
case V_STRINGTYPE: nvt = ND_GEN_STRING; break;
default: nvt = <API key>; break;
}
n->vartype = nvt;
n->vardir = vd;
}
GLOBALS->extload_i++;
}
#ifdef <API key>
static void <API key>(void *pnt)
{
char *s = (char *)pnt;
switch(s[0])
{
case 'S':
case 'U': get_varname(s, NULL, NULL, -1);
GLOBALS->extload_hlen = GLOBALS->fst_scope_name ? strlen(GLOBALS->fst_scope_name) : 0;
break;
case 'V': <API key>(s);
default: break;
}
}
#endif
/*
* mainline
*/
static TimeType extload_main_2(char *fname, char *skip_start, char *skip_end)
{
int max_idcode;
#ifndef <API key>
char sbuff[65537];
unsigned int msk = 0;
#endif
int i;
if(!(GLOBALS->extload=fopen(fname, "rb")))
{
GLOBALS-><API key> = 1;
return(LLDescriptor(0)); /* look at GLOBALS->vzt_vzt_c_1 in caller for success status... */
}
fclose(GLOBALS->extload);
/* SPLASH */ splash_create();
#ifdef <API key>
GLOBALS->extload_ffr_ctx = fsdbReaderOpenFile(GLOBALS->loaded_file_name);
GLOBALS->is_lx2 = LXT2_IS_FSDB;
if(GLOBALS->extload_ffr_ctx)
{
int rv;
int mult;
char scale;
uint64_t tim;
struct <API key> *gs;
int success_count = 0;
int attempt_count = 0;
attempt_count++;
rv = <API key>(GLOBALS->extload_ffr_ctx, &mult, &scale);
if(rv)
{
GLOBALS->time_scale = mult;
GLOBALS->time_dimension = tolower(scale);
success_count++;
}
attempt_count++;
rv = <API key>(GLOBALS->extload_ffr_ctx, &tim);
if(rv)
{
GLOBALS->min_time = tim;
success_count++;
}
attempt_count++;
rv = <API key>(GLOBALS->extload_ffr_ctx, &tim);
if(rv)
{
GLOBALS->max_time = tim;
if(GLOBALS->max_time == LLDescriptor(0))
{
GLOBALS->max_time = LLDescriptor(1);
}
success_count++;
}
attempt_count++;
gs = <API key>(GLOBALS->extload_ffr_ctx);
if(gs)
{
GLOBALS->numfacs = gs->varCount;
free(gs);
success_count++;
}
attempt_count++;
max_idcode = <API key>(GLOBALS->extload_ffr_ctx);
if(max_idcode)
{
success_count++;
}
else
{
max_idcode = GLOBALS->numfacs; /* for 1.x format files */
success_count++;
}
if(attempt_count != success_count)
{
fprintf(stderr, EXTLOAD"Could not initialize '%s' properly.\n", fname);
GLOBALS-><API key> = 1;
return(LLDescriptor(0));
}
}
else
{
fprintf(stderr, EXTLOAD"Could not initialize '%s' properly.\n", fname);
GLOBALS-><API key> = 1;
return(LLDescriptor(0));
}
#else
<API key>();
sprintf(sbuff, "%s -info %s 2>&1", EXTLOAD_PATH, fname);
GLOBALS->extload = popen(sbuff, "r");
for(;;)
{
char * rc = fgets(sbuff, 65536, GLOBALS->extload);
if(!rc) break;
switch(rc[0])
{
case 's':
if(!strncmp("scale unit", rc, 10))
{
char *pnt = strchr(rc+10, ':');
if(pnt)
{
pnt++;
GLOBALS->time_scale = atoi(pnt);
GLOBALS->time_dimension = 'n';
while(*pnt)
{
if(isalpha(*pnt))
{
GLOBALS->time_dimension = tolower(*pnt);
break;
}
pnt++;
}
msk |= 1;
}
}
break;
case 'm':
if(!strncmp("minimum xtag", rc, 12))
{
char *pnt = strchr(rc+12, '(');
if(pnt)
{
unsigned int lo = 0, hi = 0;
pnt++;
sscanf(pnt, "%u %u", &hi, &lo);
GLOBALS->min_time = (TimeType)((((UTimeType)hi)<<32) + ((UTimeType)lo));
msk |= 2;
}
}
else
if(!strncmp("maximum xtag", rc, 12))
{
char *pnt = strchr(rc+12, '(');
if(pnt)
{
unsigned int lo = 0, hi = 0;
pnt++;
sscanf(pnt, "%u %u", &hi, &lo);
GLOBALS->max_time = (TimeType)((((UTimeType)hi)<<32) + ((UTimeType)lo));
if(GLOBALS->max_time == LLDescriptor(0))
{
GLOBALS->max_time = LLDescriptor(1);
}
msk |= 4;
}
}
else
if(!strncmp("max var idcode", rc, 14))
{
char *pnt = strchr(rc+14, ':');
if(pnt)
{
pnt++;
sscanf(pnt, "%d", &max_idcode);
msk |= 8;
}
}
break;
case 'v':
if(!strncmp("var creation cnt", rc, 16))
{
char *pnt = strchr(rc+16, ':');
if(pnt)
{
pnt++;
sscanf(pnt, "%d", &GLOBALS->numfacs);
msk |= 16;
}
}
case 'f':
if(!strncmp("file status", rc, 11))
{
char *pnt = strchr(rc+11, ':');
if(pnt)
{
pnt++;
if(strstr(pnt, "finished"))
{
msk |= 32;
}
}
}
break;
default:
break;
}
}
pclose(GLOBALS->extload);
if(msk != (1+2+4+8+16+32))
{
fprintf(stderr, EXTLOAD"Could not initialize '%s' properly.\n", fname);
if((msk & (1+2+4+8+16+32)) == (1+2+4+8+16))
{
fprintf(stderr, EXTLOAD"File is not finished dumping.\n");
}
GLOBALS-><API key> = 1;
return(LLDescriptor(0));
}
#endif
GLOBALS->min_time *= GLOBALS->time_scale;
GLOBALS->max_time *= GLOBALS->time_scale;
GLOBALS->mvlfacs_vzt_c_3=(struct fac *)calloc_2(GLOBALS->numfacs,sizeof(struct fac));
GLOBALS->vzt_table_vzt_c_1=(struct lx2_entry *)calloc_2(GLOBALS->numfacs, sizeof(struct lx2_entry));
GLOBALS->extload_namecache=(char **)calloc_2(GLOBALS->numfacs, sizeof(char *));
GLOBALS->extload_sym_block = (struct symbol *)calloc_2(GLOBALS->numfacs, sizeof(struct symbol));
GLOBALS->extload_node_block=(struct Node *)calloc_2(GLOBALS->numfacs,sizeof(struct Node));
GLOBALS->extload_idcodes=(unsigned int *)calloc_2(GLOBALS->numfacs, sizeof(unsigned int));
GLOBALS->extload_inv_idcodes=(int *)calloc_2(max_idcode+1, sizeof(int));
/* SPLASH */ splash_sync(1, 5);
#ifdef <API key>
if(!GLOBALS-><API key>) /* set default hierarchy split char */
{
GLOBALS->hier_delimeter='.';
}
GLOBALS->extload_xc = <API key>();
GLOBALS->extload_i=-1;
<API key>(GLOBALS->extload_ffr_ctx, <API key>);
<API key>(NULL); /* flush out final cached variable */
<API key>(); /* ...also now in gtk2_treesearch.c */
<API key>();
for(i=0;((i<2)&&(i<GLOBALS->numfacs));i++)
{
if(GLOBALS->extload_namecache[i])
{
free_2(GLOBALS->extload_namecache[i]);
GLOBALS->extload_namecache[i] = NULL;
}
}
free_2(GLOBALS->extload_namecache); GLOBALS->extload_namecache = NULL;
fstReaderClose(GLOBALS->extload_xc); /* corresponds to <API key>() */
#else
if(!<API key>()) { GLOBALS-><API key> = 1; return(LLDescriptor(0)); }
sprintf(sbuff, "%s -hier_tree %s 2>&1", EXTLOAD_PATH, fname);
GLOBALS->extload = popen(sbuff, "r");
/* do your stuff here..all useful info has been initialized by now */
if(!GLOBALS-><API key>) /* set default hierarchy split char */
{
GLOBALS->hier_delimeter='.';
}
GLOBALS->extload_xc = <API key>();
for(GLOBALS->extload_i=-1;(GLOBALS->numfacs) && (GLOBALS->extload_i<GLOBALS->numfacs);)
{
<API key>();
}
while(get_varname(&GLOBALS->extload_vt_prev, NULL, -1)); /* read through end to process all upscopes */
<API key>(); /* ...also now in gtk2_treesearch.c */
<API key>();
for(i=0;((i<2)&&(i<GLOBALS->numfacs));i++)
{
if(GLOBALS->extload_namecache[i])
{
free_2(GLOBALS->extload_namecache[i]);
GLOBALS->extload_namecache[i] = NULL;
}
}
free_2(GLOBALS->extload_namecache); GLOBALS->extload_namecache = NULL;
pclose(GLOBALS->extload);
fstReaderClose(GLOBALS->extload_xc); /* corresponds to <API key>() */
#endif
/* SPLASH */ splash_sync(2, 5);
GLOBALS->facs=(struct symbol **)malloc_2(GLOBALS->numfacs*sizeof(struct symbol *));
if(GLOBALS->fast_tree_sort)
{
for(i=0;i<GLOBALS->numfacs;i++)
{
int len;
GLOBALS->facs[i]=&GLOBALS->extload_sym_block[i];
if((len=strlen(GLOBALS->facs[i]->name))>GLOBALS->longestname) GLOBALS->longestname=len;
}
/* SPLASH */ splash_sync(3, 5);
fprintf(stderr, EXTLOAD"Building facility hierarchy tree.\n");
init_tree();
for(i=0;i<GLOBALS->numfacs;i++)
{
<API key>(GLOBALS->facs[i]->name, i);
}
/* SPLASH */ splash_sync(4, 5);
treegraft(&GLOBALS->treeroot);
fprintf(stderr, EXTLOAD"Sorting facility hierarchy tree.\n");
treesort(GLOBALS->treeroot, NULL);
/* SPLASH */ splash_sync(5, 5);
<API key>(GLOBALS->treeroot, &GLOBALS->facs);
GLOBALS->facs_are_sorted=1;
}
else
{
for(i=0;i<GLOBALS->numfacs;i++)
{
char *subst;
#ifdef WAVE_HIERFIX
char ch;
#endif
int len;
GLOBALS->facs[i]=&GLOBALS->extload_sym_block[i];
subst=GLOBALS->facs[i]->name;
if((len=strlen(subst))>GLOBALS->longestname) GLOBALS->longestname=len;
#ifdef WAVE_HIERFIX
while((ch=(*subst)))
{
if(ch==GLOBALS->hier_delimeter) { *subst=VCDNAM_HIERSORT; } /* forces sort at hier boundaries */
subst++;
}
#endif
}
/* SPLASH */ splash_sync(3, 5);
fprintf(stderr, EXTLOAD"Sorting facilities at hierarchy boundaries.\n");
wave_heapsort(GLOBALS->facs,GLOBALS->numfacs);
#ifdef WAVE_HIERFIX
for(i=0;i<GLOBALS->numfacs;i++)
{
char *subst, ch;
subst=GLOBALS->facs[i]->name;
while((ch=(*subst)))
{
if(ch==VCDNAM_HIERSORT) { *subst=GLOBALS->hier_delimeter; } /* restore back to normal */
subst++;
}
}
#endif
GLOBALS->facs_are_sorted=1;
/* SPLASH */ splash_sync(4, 5);
fprintf(stderr, EXTLOAD"Building facility hierarchy tree.\n");
init_tree();
for(i=0;i<GLOBALS->numfacs;i++)
{
char *nf = GLOBALS->facs[i]->name;
<API key>(nf, i);
}
/* SPLASH */ splash_sync(5, 5);
treegraft(&GLOBALS->treeroot);
treesort(GLOBALS->treeroot, NULL);
}
if(skip_start || skip_end)
{
TimeType b_start, b_end;
if(!skip_start) b_start = GLOBALS->min_time; else b_start = unformat_time(skip_start, GLOBALS->time_dimension);
if(!skip_end) b_end = GLOBALS->max_time; else b_end = unformat_time(skip_end, GLOBALS->time_dimension);
if(b_start<GLOBALS->min_time) b_start = GLOBALS->min_time;
else if(b_start>GLOBALS->max_time) b_start = GLOBALS->max_time;
if(b_end<GLOBALS->min_time) b_end = GLOBALS->min_time;
else if(b_end>GLOBALS->max_time) b_end = GLOBALS->max_time;
if(b_start > b_end)
{
TimeType tmp_time = b_start;
b_start = b_end;
b_end = tmp_time;
}
GLOBALS->min_time = b_start;
GLOBALS->max_time = b_end;
}
/* SPLASH */ splash_finalize();
return(GLOBALS->max_time);
}
TimeType extload_main(char *fname, char *skip_start, char *skip_end)
{
TimeType tt = extload_main_2(fname, skip_start, skip_end);
if(!tt)
{
if(GLOBALS->extload_ffr_ctx)
{
#ifdef <API key>
fsdbReaderClose(GLOBALS->extload_ffr_ctx);
#endif
GLOBALS->extload_ffr_ctx = NULL;
}
}
return(tt);
}
/*
* extload callback (only does bits for now)
*/
static void extload_callback(TimeType *tim, int *facidx, char **value)
{
struct HistEnt *htemp = histent_calloc();
struct lx2_entry *l2e = GLOBALS->vzt_table_vzt_c_1+(*facidx);
struct fac *f = GLOBALS->mvlfacs_vzt_c_3+(*facidx);
GLOBALS->busycnt_vzt_c_2++;
if(GLOBALS->busycnt_vzt_c_2==WAVE_BUSY_ITER)
{
busy_window_refresh();
GLOBALS->busycnt_vzt_c_2 = 0;
}
/* fprintf(stderr, "%lld %d %s\n", *tim, *facidx, *value); */
if(!(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
{
if(f->len>1)
{
htemp->v.h_vector = (char *)malloc_2(f->len);
memcpy(htemp->v.h_vector, *value, f->len);
}
else
{
switch(**value)
{
case '0': htemp->v.h_val = AN_0; break;
case '1': htemp->v.h_val = AN_1; break;
case 'z': htemp->v.h_val = AN_Z; break;
default: htemp->v.h_val = AN_X; break;
}
}
}
else if(f->flags&VZT_RD_SYM_F_DOUBLE)
{
#ifdef WAVE_HAS_H_DOUBLE
sscanf(*value, "%lg", &htemp->v.h_double);
#else
double *d = malloc_2(sizeof(double));
sscanf(*value, "%lg", d);
htemp->v.h_vector = (char *)d;
#endif
htemp->flags = HIST_REAL;
}
else /* string */
{
char *s = malloc_2(strlen(*value)+1);
strcpy(s, *value);
htemp->v.h_vector = s;
htemp->flags = HIST_REAL|HIST_STRING;
}
htemp->time = (*tim) * (GLOBALS->time_scale);
if(l2e->histent_head)
{
l2e->histent_curr->next = htemp;
l2e->histent_curr = htemp;
}
else
{
l2e->histent_head = l2e->histent_curr = htemp;
}
l2e->numtrans++;
}
/*
* this is the black magic that handles aliased signals...
*/
static void ext_resolver(nptr np, nptr resolve)
{
np->extvals = resolve->extvals;
np->msi = resolve->msi;
np->lsi = resolve->lsi;
memcpy(&np->head, &resolve->head, sizeof(struct HistEnt));
np->curr = resolve->curr;
np->harray = resolve->harray;
np->numhist = resolve->numhist;
np->mv.mvlfac=NULL;
}
/*
* actually import a extload trace but don't do it if it's already been imported
*/
void <API key>(nptr np)
{
struct HistEnt *htemp, *histent_tail;
int len, i;
struct fac *f;
int txidx, txidx_in_trace;
nptr nold = np;
if(!(f=np->mv.mvlfac)) return; /* already imported */
txidx = f - GLOBALS->mvlfacs_vzt_c_3;
txidx_in_trace = GLOBALS->extload_idcodes[txidx];
if(GLOBALS->extload_inv_idcodes[txidx_in_trace] < 0)
{
txidx = (-GLOBALS->extload_inv_idcodes[txidx_in_trace]) - 1;
np = GLOBALS->mvlfacs_vzt_c_3[txidx].working_node;
if(!(f=np->mv.mvlfac))
{
ext_resolver(nold, np);
return; /* already imported */
}
}
GLOBALS->extload_inv_idcodes[txidx_in_trace] = - (txidx + 1);
#ifndef <API key>
fprintf(stderr, EXTLOAD"Import: %s\n", np->nname);
#endif
/* new stuff */
len = np->mv.mvlfac->len;
#ifdef <API key>
if(0)
{
/* process transactions here */
}
else /* "normal" VC data */
{
void *hdl;
/* <API key>(GLOBALS->extload_ffr_ctx, txidx_in_trace); */
/* <API key>(GLOBALS->extload_ffr_ctx); */
hdl = <API key>(GLOBALS->extload_ffr_ctx, txidx_in_trace);
if(<API key>(GLOBALS->extload_ffr_ctx, hdl))
{
TimeType mxt_max = -2;
TimeType mxt = (TimeType)<API key>(GLOBALS->extload_ffr_ctx, hdl);
int rc_xtag = fsdbReaderGotoXTag(GLOBALS->extload_ffr_ctx, hdl, mxt);
while(rc_xtag && (mxt >= mxt_max)) /* malformed traces sometimes backtrack time */
{
void *val_ptr;
char *b;
if(!fsdbReaderGetVC(GLOBALS->extload_ffr_ctx, hdl, &val_ptr))
{
break;
}
b = <API key>(hdl, val_ptr);
extload_callback(&mxt, &txidx, &b);
if(!<API key>(GLOBALS->extload_ffr_ctx, hdl))
{
break;
}
mxt_max = mxt;
mxt = (TimeType)fsdbReaderGetXTag(GLOBALS->extload_ffr_ctx, hdl, &rc_xtag);
}
}
fsdbReaderFree(GLOBALS->extload_ffr_ctx, hdl);
/* <API key>(GLOBALS->extload_ffr_ctx); */
}
#else
if(<API key>()) /* place array height check here in an "&&" branch, sorry, arrays not supported */
{
char sbuff[65537];
TimeType tim;
sprintf(sbuff, "%s -vc -vidcode %d %s 2>&1", EXTLOAD_PATH, txidx_in_trace, GLOBALS->loaded_file_name);
GLOBALS->extload = popen(sbuff, "r");
for(;;)
{
char *rc = fgets(sbuff, 65536, GLOBALS->extload);
if(!rc)
{
break;
}
if(isdigit(rc[0]))
{
rc = strchr(rc, '(');
if(rc)
{
unsigned int lo = 0, hi = 0;
sscanf(rc+1, "%u %u", &hi, &lo);
tim = (TimeType)((((UTimeType)hi)<<32) + ((UTimeType)lo));
rc = strchr(rc+1, ')');
if(rc)
{
rc = strchr(rc+1, ':');
if(rc)
{
char *rtn, *pnt;
rc += 2;
rtn = rc;
while(*rtn)
{
if(isspace(*rtn)) { *rtn = 0; break; }
rtn++;
}
pnt = rc;
while(*pnt)
{
switch(*pnt)
{
case 'Z':
case '3': *pnt = 'z'; break;
case 'X':
case '2': *pnt = 'x'; break;
default: break;
}
pnt++;
}
extload_callback(&tim, &txidx, &rc);
}
}
}
}
}
pclose(GLOBALS->extload);
}
#endif
histent_tail = htemp = histent_calloc();
if(len>1)
{
htemp->v.h_vector = (char *)malloc_2(len);
for(i=0;i<len;i++) htemp->v.h_vector[i] = AN_Z;
}
else
{
htemp->v.h_val = AN_Z;
}
htemp->time = MAX_HISTENT_TIME;
htemp = histent_calloc();
if(len>1)
{
htemp->v.h_vector = (char *)malloc_2(len);
for(i=0;i<len;i++) htemp->v.h_vector[i] = AN_X;
}
else
{
htemp->v.h_val = AN_X;
}
htemp->time = MAX_HISTENT_TIME-1;
htemp->next = histent_tail;
if(GLOBALS->vzt_table_vzt_c_1[txidx].histent_curr)
{
GLOBALS->vzt_table_vzt_c_1[txidx].histent_curr->next = htemp;
htemp = GLOBALS->vzt_table_vzt_c_1[txidx].histent_head;
}
if(!(f->flags&(VZT_RD_SYM_F_DOUBLE|VZT_RD_SYM_F_STRING)))
{
if(len>1)
{
np->head.v.h_vector = (char *)malloc_2(len);
for(i=0;i<len;i++) np->head.v.h_vector[i] = AN_X;
}
else
{
np->head.v.h_val = AN_X;
}
}
else
{
np->head.flags = HIST_REAL;
if(f->flags&VZT_RD_SYM_F_STRING) np->head.flags |= HIST_STRING;
}
{
struct HistEnt *htemp2 = histent_calloc();
htemp2->time = -1;
if(len>1)
{
htemp2->v.h_vector = htemp->v.h_vector;
}
else
{
htemp2->v.h_val = htemp->v.h_val;
}
htemp2->next = htemp;
htemp = htemp2;
GLOBALS->vzt_table_vzt_c_1[txidx].numtrans++;
}
np->head.time = -2;
np->head.next = htemp;
np->numhist=GLOBALS->vzt_table_vzt_c_1[txidx].numtrans +2 /*endcap*/ +1 /*frontcap*/;
memset(GLOBALS->vzt_table_vzt_c_1+txidx, 0, sizeof(struct lx2_entry)); /* zero it out */
np->curr = histent_tail;
np->mv.mvlfac = NULL; /* it's imported and cached so we can forget it's an mvlfac now */
if(nold!=np)
{
ext_resolver(nold, np);
}
}
void fsdb_import_masked(void)
{
#ifdef <API key>
<API key>(GLOBALS->extload_ffr_ctx);
GLOBALS-><API key> = 0;
#endif
}
void <API key>(nptr np)
{
#ifdef <API key>
struct fac *f;
int txidx, txidx_in_trace;
if(!(f=np->mv.mvlfac)) return; /* already imported */
txidx = f - GLOBALS->mvlfacs_vzt_c_3;
txidx_in_trace = GLOBALS->extload_idcodes[txidx];
if(GLOBALS->extload_inv_idcodes[txidx_in_trace] > 0)
{
if(!GLOBALS-><API key>)
{
<API key>(GLOBALS->extload_ffr_ctx);
}
GLOBALS-><API key>++;
<API key>(GLOBALS->extload_ffr_ctx, txidx_in_trace);
}
#else
(void)np;
#endif
}
#endif |
# AntiRSI
Shows a popover to remind you when it's time to take a break.
Written by [onnlucky](https:


Named after [repetitive strain injury](https://en.wikipedia.org/wiki/<API key>).
## Download
See [Releases](https://github.com/yep/AntiRSI/releases) page.
GPL, see `COPYING` and `AUTHORS` files. |
#include "u.h"
#include "../port/lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "../port/error.h"
/*
* Compute nanosecond epoch time from the fastest ticking clock
* on the system. Converting the time to nanoseconds requires
* the following formula
*
* t = (((1000000000<<31)/f)*ticks)>>31
*
* where
*
* 'f' is the clock frequency
* 'ticks' are clock ticks
*
* to avoid too much calculation in todget(), we calculate
*
* mult = (1000000000<<32)/f
*
* each time f is set. f is normally set by a user level
* program writing to /dev/fastclock. mul64fract will then
* take that fractional multiplier and a 64 bit integer and
* return the resulting integer product.
*
* We assume that the cpu's of a multiprocessor are synchronized.
* This assumption needs to be questioned with each new architecture.
*/
/* frequency of the tod clock */
#define TODFREQ 1000000000ULL
#define MicroFREQ 1000000ULL
struct {
int init; /* true if initialized */
ulong cnt;
Lock;
uvlong multiplier; /* ns = off + (multiplier*ticks)>>31 */
uvlong divider; /* ticks = (divider*(ns-off))>>31 */
uvlong umultiplier;
uvlong udivider;
vlong hz; /* frequency of fast clock */
vlong last; /* last reading of fast clock */
vlong off; /* offset from epoch to last */
vlong lasttime; /* last return value from todget */
vlong delta; /* add 'delta' each slow clock tick from sstart to send */
ulong sstart;
ulong send;
} tod;
static void todfix(void);
void
todinit(void)
{
if(tod.init)
return;
ilock(&tod);
tod.init = 1; /* prevent reentry via fastticks */
tod.last = fastticks((uvlong *)&tod.hz);
iunlock(&tod);
todsetfreq(tod.hz);
addclock0link(todfix, 100);
}
/*
* calculate multiplier
*/
void
todsetfreq(vlong f)
{
if (f <= 0)
panic("todsetfreq: freq %lld <= 0", f);
ilock(&tod);
tod.hz = f;
/* calculate multiplier for time conversion */
tod.multiplier = mk64fract(TODFREQ, f);
tod.divider = mk64fract(f, TODFREQ) + 1;
tod.umultiplier = mk64fract(MicroFREQ, f);
tod.udivider = mk64fract(f, MicroFREQ) + 1;
iunlock(&tod);
}
/*
* Set the time of day struct
*/
void
todset(vlong t, vlong delta, int n)
{
if(!tod.init)
todinit();
ilock(&tod);
if(t >= 0){
tod.off = t;
tod.last = fastticks(nil);
tod.lasttime = 0;
tod.delta = 0;
tod.sstart = tod.send;
} else {
if(n <= 0)
n = 1;
n *= HZ;
if(delta < 0 && n > -delta)
n = -delta;
if(delta > 0 && n > delta)
n = delta;
if (n == 0) {
iprint("todset: n == 0, delta == %lld\n", delta);
delta = 0;
} else
delta /= n;
tod.sstart = MACHP(0)->ticks;
tod.send = tod.sstart + n;
tod.delta = delta;
}
iunlock(&tod);
}
/*
* get time of day
*/
vlong
todget(vlong *ticksp)
{
uvlong x;
vlong ticks, diff;
ulong t;
if(!tod.init)
todinit();
/*
* we don't want time to pass twixt the measuring of fastticks
* and grabbing tod.last. Also none of the vlongs are atomic so
* we have to look at them inside the lock.
*/
ilock(&tod);
tod.cnt++;
ticks = fastticks(nil);
/* add in correction */
if(tod.sstart != tod.send){
t = MACHP(0)->ticks;
if(t >= tod.send)
t = tod.send;
tod.off = tod.off + tod.delta*(t - tod.sstart);
tod.sstart = t;
}
/* convert to epoch */
diff = ticks - tod.last;
if(diff < 0)
diff = 0;
mul64fract(&x, diff, tod.multiplier);
x += tod.off;
/* time can't go backwards */
if(x < tod.lasttime)
x = tod.lasttime;
else
tod.lasttime = x;
iunlock(&tod);
if(ticksp != nil)
*ticksp = ticks;
return x;
}
/*
* convert time of day to ticks
*/
uvlong
tod2fastticks(vlong ns)
{
uvlong x;
ilock(&tod);
mul64fract(&x, ns-tod.off, tod.divider);
x += tod.last;
iunlock(&tod);
return x;
}
/*
* called regularly to avoid calculation overflows
*/
static void
todfix(void)
{
vlong ticks, diff;
uvlong x;
ticks = fastticks(nil);
diff = ticks - tod.last;
if(diff > tod.hz){
ilock(&tod);
/* convert to epoch */
mul64fract(&x, diff, tod.multiplier);
if(x > 30000000000ULL) iprint("todfix %llud\n", x);
x += tod.off;
/* protect against overflows */
tod.last = ticks;
tod.off = x;
iunlock(&tod);
}
}
long
seconds(void)
{
return (vlong)todget(nil) / TODFREQ;
}
uvlong
fastticks2us(uvlong ticks)
{
uvlong res;
if(!tod.init)
todinit();
mul64fract(&res, ticks, tod.umultiplier);
return res;
}
uvlong
us2fastticks(uvlong us)
{
uvlong res;
if(!tod.init)
todinit();
mul64fract(&res, us, tod.udivider);
return res;
}
/*
* convert milliseconds to fast ticks
*/
uvlong
ms2fastticks(ulong ms)
{
if(!tod.init)
todinit();
return (tod.hz*ms)/1000ULL;
}
/*
* convert nanoseconds to fast ticks
*/
uvlong
ns2fastticks(uvlong ns)
{
uvlong res;
if(!tod.init)
todinit();
mul64fract(&res, ns, tod.divider);
return res;
}
/*
* convert fast ticks to ns
*/
uvlong
fastticks2ns(uvlong ticks)
{
uvlong res;
if(!tod.init)
todinit();
mul64fract(&res, ticks, tod.multiplier);
return res;
}
/*
* Make a 64 bit fixed point number that has a decimal point
* to the left of the low order 32 bits. This is used with
* mul64fract for converting twixt nanoseconds and fastticks.
*
* multiplier = (to<<32)/from
*/
uvlong
mk64fract(uvlong to, uvlong from)
{
/*
int shift;
if(to == 0ULL)
return 0ULL;
shift = 0;
while(shift < 32 && to < (1ULL<<(32+24))){
to <<= 8;
shift += 8;
}
while(shift < 32 && to < (1ULL<<(32+31))){
to <<= 1;
shift += 1;
}
return (to/from)<<(32-shift);
*/
return (to<<32) / from;
} |
<?php
/**
* W3TC Mobile detection
*/
w3_require_once(W3TC_LIB_W3_DIR . '/CacheCase.php');
/**
* Class W3_Mobile
*/
class W3_Mobile extends W3_CacheCase
{
/**
* PHP5-style constructor
*/
function __construct()
{
parent::__construct('mobile.rgroups', 'agents');
}
function group_verifier($group_compare_value)
{
return isset($_SERVER['HTTP_USER_AGENT']) && preg_match('~' . $group_compare_value . '~i', $_SERVER['HTTP_USER_AGENT']);
}
} |
# in config/initializers/locale.rb
# tell the I18n library where to find your translations
I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')]
# set default locale to something other than :en
I18n.default_locale = :'pt-BR' |
INTEGER FUNCTION YEAR4 ( YY )
C********************************************************************
C Version "$Id: year4.f 219 2015-08-17 18:05:54Z coats $"
C EDSS/Models-3 I/O API.
C Copyright (C) 1992-2002 MCNC and Carlie J. Coats, Jr.,
C (c) 2004-2007 Baron Advanced Meteorological Systems,
C (c) 2007-2013 Carlie J. Coats, Jr., and (C) 2014 UNC Institute
C for the Environment.
C Distributed under the GNU LESSER GENERAL PUBLIC LICENSE version 2.1
C See file "LGPL.txt" for conditions of use.
C.........................................................................
C function body starts at line 59
C
C FUNCTION:
C
C Returns the 4-digit year from the 2-digit year
C
C
C REVISION HISTORY:
C
C Create by M Houyoux: 5/97
C
C Modified 03/2010 by CJC: F9x changes for I/O API v3.1
C
C Modified 02/2014 by CJC: Fix MH violation of coding-standards:
C check status IOS from ENVINT()!!
C****************************************************************************
IMPLICIT NONE
C....... INCLUDES:
INCLUDE 'PARMS3.EXT'
INCLUDE 'IODECL3.EXT'
C....... ARGUMENTS:
INTEGER, INTENT(IN ) :: YY ! 2 digit year
C....... EXTERNAL FUNCTIONS
INTEGER, EXTERNAL :: ENVINT
C....... LOCAL VARIABLES:
CHARACTER*256 MESG
INTEGER ISTAT
INTEGER, SAVE :: BASEYR, PIVOTYR
LOGICAL, SAVE :: FIRSTIME = .TRUE.
CHARACTER*16, PARAMETER :: PNAME = 'YEAR4'
C......................................................................
C begin YEAR4
IF ( FIRSTIME ) THEN
FIRSTIME = .FALSE.
BASEYR = ENVINT( 'YEAR4_BASE',
& 'Base century year for YEAR4 algorithm',
& 1900, ISTAT )
IF ( ISTAT .GT. 0 ) THEN
CALL M3EXIT( PNAME,0,0,'Bad env vble "YEAR4_BASE"', 2)
END IF
IF ( BASEYR .GT. 100 ) THEN
BASEYR = BASEYR / 100
END IF
BASEYR = BASEYR * 100
PIVOTYR = ENVINT( 'YEAR4_PIVOT',
& 'Pivot year for YEAR4 algorithm',
& BASEYR + 70, ISTAT )
IF ( ISTAT .GT. 0 ) THEN
CALL M3EXIT( PNAME,0,0,'Bad env vble "YEAR4_PIVOT"', 2)
END IF
PIVOTYR = MOD( PIVOTYR , 100 )
END IF
IF( YY .GT. BASEYR ) THEN
YEAR4 = YY
ELSE IF( YY .GT. 99 .OR. YY .LT. 0 ) THEN
WRITE( MESG,94010 ) 'Year "', YY,
& '" is not a 2-digit positive number'
CALL M3EXIT( 'YEAR4', 0, 0, MESG, 2 )
ELSE IF( YY .GE. PIVOTYR ) THEN
YEAR4 = BASEYR + YY
ELSE
YEAR4 = BASEYR + 100 + YY
ENDIF
C................ end body of YEAR4 .......................................
C........... Internal buffering formats............ 94xxx
94010 FORMAT( 10( A, :, I7, :, 1X ) )
END FUNCTION YEAR4 |
<?php
/**
* Lupus in Tabula
* ...un progetto di Edoardo Morassutto
* Contributors:
* - 2016 Edoardo Morassutto <edoardo.morassutto@gmail.com>
*/
/**
* Una notifica che un utente riceve
*/
class Notification {
/**
* Identificativo della notifica
* @var integer
*/
public $id_notification;
/**
* Identificativo dell'utente che possiede la notifica
* @var integer
*/
public $id_user;
/**
* Data e ora della notifica
* @var DateTime
*/
public $date;
/**
* Testo del messaggio
* @var string
*/
public $message;
/**
* Eventuale link della notifica
* @var string|null
*/
public $link;
public $hidden;
/**
* Costruisce una notifica basandosi su una riga del database
* @param array $row Ennupla dalla tabella notifcation
*/
private function __construct($row) {
$this->id_notification = $row['id_notification'];
$this->id_user = $row['id_user'];
$this->date = new DateTime($row['date']);
$this->message = $row['message'];
$this->link = $row['link'];
$this->hidden = (boolean)$row['hidden'];
}
/**
* Ritorna la notifica con l'id specificato
* @param int $id_notification Id della notifica da cercare
* @return Notification|false La notifica oppure false se si verifica un errore
*/
public static function fromId($id_notification) {
$sql = "SELECT * FROM notification WHERE id_notification = ?";
$res = Database::query($sql, [$id_notification]);
if (!$res) return false;
return new Notification($res[0]);
}
public static function addNotification($user, $message, $link) {
$sql = "INSERT INTO notification (id_user, message, link) VALUES (?, ?, ?)";
$res = Database::query($sql, [$user->id_user, $message, $link]);
if (!$res) return false;
$id_notification = Database::lastInsertId();
return Notification::fromId($id_notification);
}
/**
* Ottiene le ultime notifiche dell'utente che non sono state cancellate
* @param User $user Utente che possiede le notifiche
* @param DateTime $since Ottenere le notifiche posteriori a questa data
* @param bool $includeHidden Indica se includere anche le notifiche nascoste
* @param int $limit Numero di notifiche da restituire
* @return array|false Ultime notifiche oppure false in caso di errore
*/
public static function <API key>($user, $since = null, $includeHidden = false, $limit = 5) {
if (!$since)
$since = new DateTime('1970-01-01');
$sql = "SELECT *
FROM notification
WHERE id_user=? AND hidden<=? AND date>?
ORDER BY hidden ASC, `date` DESC
LIMIT ?";
$res = Database::query($sql, [$user->id_user, $includeHidden?1:0, $since->format("Y-m-d H:i:s"), $limit]);
if ($res === false) return false;
$notifications = [];
foreach ($res as $n)
$notifications[] = new Notification($n);
return $notifications;
}
/**
* Nasconde una notifica marcandola come 'hidden'
* @return bool True se l'operazione ha avuto successo, false altrimenti
*/
public function hide() {
$sql = "UPDATE notification SET hidden=1 WHERE id_notification=?";
$res = Database::query($sql, [$this->id_notification]);
if (!$res) return false;
$this->hidden = true;
return true;
}
} |
#ifndef HW_GPIO_H
#define HW_GPIO_H
#define GPIO_REVISION (0x0)
#define GPIO_SYSCONFIG (0x10)
#define GPIO_IRQSTATUS_RAW(n) (0x24 + (n * 4))
#define GPIO_IRQSTATUS(n) (0x2C + (n * 4))
#define GPIO_IRQSTATUS_SET(n) (0x34 + (n * 4))
#define GPIO_IRQSTATUS_CLR(n) (0x3C + (n * 4))
#define GPIO_IRQWAKEN(n) (0x44 + (n * 4))
#define GPIO_SYSSTATUS (0x114)
#define GPIO_CTRL (0x130)
#define GPIO_OE (0x134)
#define GPIO_DATAIN (0x138)
#define GPIO_DATAOUT (0x13C)
#define GPIO_LEVELDETECT(n) (0x140 + (n * 4))
#define GPIO_RISINGDETECT (0x148)
#define GPIO_FALLINGDETECT (0x14C)
#define GPIO_DEBOUNCENABLE (0x150)
#define GPIO_DEBOUNCINGTIME (0x154)
#define GPIO_CLEARDATAOUT (0x190)
#define GPIO_SETDATAOUT (0x194)
/* REVISION */
#define <API key> (0x000000C0u)
#define <API key> (0x00000006u)
#define GPIO_REVISION_FUNC (0x0FFF0000u)
#define <API key> (0x00000010u)
#define GPIO_REVISION_MAJOR (0x00000700u)
#define <API key> (0x00000008u)
#define GPIO_REVISION_MINOR (0x0000003Fu)
#define <API key> (0x00000000u)
#define GPIO_REVISION_RTL (0x0000F800u)
#define <API key> (0x0000000Bu)
#define <API key> (0xC0000000u)
#define <API key> (0x0000001Eu)
/* SYSCONFIG */
#define <API key> (0x00000001u)
#define <API key> (0x00000000u)
#define <API key> (0x1u)
#define <API key> (0x0u)
#define <API key> (0x00000004u)
#define <API key> (0x00000002u)
#define <API key> (0x0u)
#define <API key> (0x1u)
#define <API key> (0x00000018u)
#define <API key> (0x00000003u)
#define <API key> (0x0u)
#define <API key> (0x1u)
#define <API key> (0x2u)
#define <API key> (0x3u)
#define <API key> (0x00000002u)
#define <API key> (0x00000001u)
#define <API key> (0x0u)
#define <API key> (0x1u)
/* IRQSTATUS_RAW_0 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* IRQSTATUS_RAW_1 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* IRQSTATUS_0 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* IRQSTATUS_1 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* IRQSTATUS_SET_0 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* IRQSTATUS_SET_1 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* IRQSTATUS_CLR_0 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* IRQSTATUS_CLR_1 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* SYSSTATUS */
#define <API key> (0x00000001u)
#define <API key> (0x00000000u)
#define <API key> (0x1u)
#define <API key> (0x0u)
/* CTRL */
#define <API key> (0x00000001u)
#define <API key> (0x00000000u)
#define <API key> (0x1u)
#define <API key> (0x0u)
#define <API key> (0x00000006u)
#define <API key> (0x00000001u)
#define <API key> (0x0u)
#define <API key> (0x1u)
#define <API key> (0x2u)
#define <API key> (0x3u)
#define GPIO_OE_OUTPUTEN (0xFFFFFFFFu)
#define <API key> (0x00000000u)
#define <API key> (0x1u)
#define <API key> (0x0u)
/* DATAIN */
#define GPIO_DATAIN_DATAIN (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* DATAOUT */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* LEVELDETECT0 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
#define <API key> (0x0u)
#define <API key> (0x1u)
/* LEVELDETECT1 */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
#define <API key> (0x0u)
#define <API key> (0x1u)
/* RISINGDETECT */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
#define <API key> (0x0u)
#define <API key> (0x1u)
/* FALLINGDETECT */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
#define <API key> (0x0u)
#define <API key> (0x1u)
/* DEBOUNCENABLE */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
#define <API key> (0x1u)
#define <API key> (0x0u)
/* DEBOUNCINGTIME */
#define <API key> (0x000000FFu)
#define <API key> (0x00000000u)
/* CLEARDATAOUT */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
/* SETDATAOUT */
#define <API key> (0xFFFFFFFFu)
#define <API key> (0x00000000u)
#endif |
#ifndef _INC_PROTOCOL_H
#define _INC_PROTOCOL_H
#include <json.h>
#include <curl/curl.h>
#ifdef USE_SSL
#include <openssl/engine.h>
#endif
#include <libmondai.h>
typedef struct {
CURL *Curl;
char *AuthURI;
char *RPCURI;
char *RESTURI;
char *PusherURI;
int RPCID;
char *TenantID;
char *GroupID;
char *SessionID;
char *StartupMessage;
char *ProtocolVersion;
char *AppVersion;
gboolean fGinbee;
size_t ReqSize;
size_t ResSize;
unsigned long RPCExecTime;
unsigned long TotalExecTime;
unsigned long AppExecTime;
#ifdef USE_SSL
gboolean fSSL;
gboolean fPKCS11;
ENGINE *Engine;
#endif
} GLProtocol;
void RPC_GetServerInfo(GLProtocol *);
void RPC_StartSession(GLProtocol *);
json_object* RPC_GetScreenDefine(GLProtocol *,const char*);
void RPC_EndSession(GLProtocol *);
json_object* RPC_GetWindow(GLProtocol *);
json_object* RPC_SendEvent(GLProtocol *,json_object *params);
void RPC_GetMessage(GLProtocol * ,char**d,char**p,char**a);
json_object* RPC_ListDownloads(GLProtocol *);
char* REST_PostBLOB(GLProtocol *,LargeByteString *);
LargeByteString* REST_GetBLOB(GLProtocol *,const char *);
LargeByteString* <API key>();
gboolean GLP_GetfGinbee(GLProtocol*);
void GLP_SetRPCURI(GLProtocol *,const char *);
char* GLP_GetRPCURI(GLProtocol *);
void GLP_SetRESTURI(GLProtocol *,const char *);
char* GLP_GetRESTURI(GLProtocol *);
void GLP_SetPusherURI(GLProtocol *,const char *);
char* GLP_GetPusherURI(GLProtocol *);
char* <API key>(GLProtocol *);
char* GLP_GetTenantID(GLProtocol *);
char* GLP_GetGroupID(GLProtocol *);
void GLP_SetSessionID(GLProtocol *,const char *);
char* GLP_GetSessionID(GLProtocol *);
void GLP_SetRPCID(GLProtocol *,int);
int GLP_GetRPCID(GLProtocol *);
GLProtocol* InitProtocol(const char *auth_uri,const char *user,const char *pass);
#ifdef USE_SSL
void GLP_SetSSL(GLProtocol*,const char*cert,const char*key,const char*pass,const char*cafile);
void GLP_SetSSLPKCS11(GLProtocol *,const char *p11lib,const char *pin);
#endif
void FinalProtocol(GLProtocol *);
#endif |
/* $Id: TrainingPenDrive.h,v 1.5 2003/07/16 15:55:24 nan Exp $ */
// This program is free software; you can redistribute it and/or modify
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#ifndef _TrainingPenDrive_
#define _TrainingPenDrive_
#include "PenDrive.h"
class TrainingPenDrive : public PenDrive {
public:
TrainingPenDrive();
TrainingPenDrive(long side);
TrainingPenDrive( long playerType, long side, double x, double y, double z,
double vx, double vy, double vz,long status, long swing,
long swingType, bool swingSide, long afterSwing,
long swingError,
double targetX, double targetY, double eyeX, double eyeY,
double eyeZ, long pow, double spin, double stamina,
long statusMax );
virtual ~TrainingPenDrive();
virtual bool AddStatus( long diff );
virtual bool Move( SDL_keysym *KeyHistory, long *MouseXHistory,
long *MouseYHistory, unsigned long *MouseBHistory,
int Histptr );
virtual bool HitBall();
};
#endif // _PenDrive__ |
@charset "utf-8";
/* CSS Document */
.job-single {
line-height: normal;
}
.job-single .continer-main {
display: inline-block;
width: 60%;
vertical-align: top;
}
.job-single .title {
font-size: 25px;
margin: 0 0 15px;
}
.job-single .content{}
.job-single .meta-container {
margin: 20px 0;
}
.job-single .job-meta {
display: inline-block;
font-size: 13px;
margin: 5px 4px;
padding: 3px 10px;
}
.job-single .job-meta a {
text-decoration: none;
}
.job-single .fa {
padding-right: 5px;
}
.job-single .job_type a, .job-single .job_type i {
color: rgb(255, 255, 255);
}
.job-single .job_type {
display: inline-block;
font-size: 13px;
padding: 3px 10px;
}
.job-single .job_type.freelance {
background: none repeat scroll 0 0 rgb(70, 166, 255);
}
.job-single .job_type.full-time {
background: none repeat scroll 0 0 rgb(46, 194, 116);
}
.job-single .job_type.internship {
background: none repeat scroll 0 0 rgb(160, 102, 255);
}
.job-single .job_type.part-time {
background: none repeat scroll 0 0 rgb(255, 194, 77);
}
.job-single .job_type.temporary {
background: none repeat scroll 0 0 rgb(255, 87, 65);
}
.job-single .job_status {
color: rgb(255, 255, 255);
}
.job-single .job_status a{
color: rgb(255, 255, 255);
}
.job-single .job_status.open {
background: none repeat scroll 0 0 rgb(58, 193, 112);
}
.job-single .job_status.closed {
background: none repeat scroll 0 0 rgb(250, 50, 24);
}
.job-single .job_status.filled {
background: none repeat scroll 0 0 rgb(73, 162, 237);
}
.job-single .job_status.re-open {
background: none repeat scroll 0 0 rgb(47, 194, 249);
}
.job-single .continer-side {
display: inline-block;
width: 40%;
}
.job-single .continer-side .section {
margin-bottom: 30px;
padding: 0 15px 0 50px;
}
.job-single .continer-side .company_name {
font-size: 17px;
margin-bottom: 10px;
}
.job-single .continer-side .company_name img {
box-shadow: none;
height: 50px;
margin-right: 10px;
overflow: hidden;
vertical-align: top;
width: 50px;
}
.job-single .continer-side .location {
}
.job-single .continer-side .address {
}
.job-single .continer-side .website {
}
.job-single .continer-side .website a{
text-decoration:none;
}
.job-single .continer-side .side-meta {
font-size: 13px;
padding: 8px 0;
}
.job-single .apply-job {
background: none repeat scroll 0 0 rgb(87, 178, 255);
color: rgb(255, 255, 255);
margin: 0 10px;
padding: 4px 10px;
text-decoration: none;
} |
package com.code.aon.finance;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.code.aon.common.ITransferObject;
import com.code.aon.finance.enumeration.FinanceTrackingType;
/**
* Transfer Object that represents a FinanceTracking.
*/
@Entity
@Table(name="finance_tracking")
public class FinanceTracking implements ITransferObject {
/** The id. */
private Integer id;
/** The finance. */
private Finance finance;
/** The tracking date. */
private Date trackingDate;
/** The amount. */
private double amount;
/** The description. */
private String description;
/** The type. */
private FinanceTrackingType type;
/**
* Gets the id.
*
* @return the id
*/
@Id
@GeneratedValue
@Column(nullable=false)
public Integer getId() {
return id;
}
/**
* Sets the id.
*
* @param id the id
*/
public void setId(Integer id) {
this.id = id;
}
/**
* Gets the finance.
*
* @return the finance
*/
@ManyToOne(fetch = FetchType.EAGER)
@JoinColumn(name="finance", nullable=false)
public Finance getFinance() {
return finance;
}
/**
* Sets the finance.
*
* @param finance the finance
*/
public void setFinance(Finance finance) {
this.finance = finance;
}
/**
* Gets the amount.
*
* @return the amount
*/
public double getAmount() {
return amount;
}
/**
* Sets the amount.
*
* @param amount the amount
*/
public void setAmount(double amount) {
this.amount = amount;
}
/**
* Gets the tracking date.
*
* @return the tracking date
*/
@Column(name="tracking_date", nullable=false)
public Date getTrackingDate() {
return trackingDate;
}
/**
* Sets the tracking date.
*
* @param trackingDate the tracking date
*/
public void setTrackingDate(Date trackingDate) {
this.trackingDate = trackingDate;
}
/**
* Gets the description.
*
* @return the description
*/
@Column(length=128)
public String getDescription() {
return description;
}
/**
* Sets the description.
*
* @param description the description
*/
public void setDescription(String description) {
this.description = description;
}
/**
* Gets the type.
*
* @return the type
*/
@Column(nullable=false)
public FinanceTrackingType getType() {
return type;
}
/**
* Sets the type.
*
* @param type the type
*/
public void setType(FinanceTrackingType type) {
this.type = type;
}
} |
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group
from ..gro_api.test import APITestCase, run_with_any_layout
from ..resources.models import ResourceType, ResourceProperty, ResourceEffect
from .models import ActuatorType, ControlProfile, Actuator
from .serializers import <API key>, ActuatorSerializer
class ActuatorAuthMixin:
@classmethod
def setUpTestData(cls):
cls.user = get_user_model().objects.create_user(
'actuators', 'actuators@test.com', 'actuators'
)
electricians_group = Group.objects.get(name='Electricians')
cls.user.groups.add(electricians_group)
<API key> = Group.objects.get(name='LayoutEditors')
cls.user.groups.add(<API key>)
def setUp(self):
self.client.force_authenticate(user=self.user)
def tearDown(self):
self.client.force_authenticate()
class <API key>(ActuatorAuthMixin, APITestCase):
@run_with_any_layout
def test_visible_fields(self):
fields = <API key>().get_fields()
fields.pop('url')
fields.pop('name')
fields.pop('resource_effect')
fields.pop('properties')
fields.pop('order')
fields.pop('is_binary')
fields.pop('actuator_count')
fields.pop('read_only')
fields.pop('actuators')
fields.pop('<API key>')
self.assertFalse(fields)
@run_with_any_layout
def <API key>(self):
heater_id = ResourceEffect.objects.get_by_natural_key('A', 'HE').pk
air_temp_id = ResourceProperty.objects.get_by_natural_key('A', 'TM').pk
data = {
'name': 'test',
'resource_effect': self.url_for_object('resourceEffect', heater_id),
'properties': [
self.url_for_object('resourceProperty', air_temp_id)
],
'order': 0,
'is_binary': True,
}
relay_air_heater_id = ActuatorType.objects.get_by_natural_key(
'Relay-Controlled Air Heater'
).pk
res = self.client.put(
self.url_for_object('actuatorType', relay_air_heater_id), data=data
)
self.assertEqual(res.status_code, 403)
@run_with_any_layout
def <API key>(self):
humidifier_id = ResourceEffect.objects.get_by_natural_key('A', 'HU').pk
air_temp_id = ResourceProperty.objects.get_by_natural_key('A', 'TM').pk
data = {
'name': 'Magic Humidifier',
'resource_effect' : self.url_for_object('resourceEffect', humidifier_id),
'properties': [
self.url_for_object('resourceProperty', air_temp_id)
],
'order': 0,
'is_binary': True,
}
res = self.client.post(self.url_for_object('actuatorType'), data=data)
self.assertEqual(res.status_code, 201)
self.assertEqual(data['name'], 'Magic Humidifier')
data['name'] = 'New Name'
res = self.client.put(res.data['url'], data=data)
self.assertEqual(res.status_code, 200)
self.assertEqual(res.data['name'], 'New Name')
@run_with_any_layout
def <API key>(self):
heater_id = ResourceEffect.objects.get_by_natural_key('A', 'HE').pk
water_ec_id = ResourceProperty.objects.get_by_natural_key('W', 'EC').pk
data = {
'name': 'test',
'resource_effect': self.url_for_object('resourceEffect', heater_id),
'properties': [
self.url_for_object('resourceProperty', water_ec_id)
],
'order': 0,
'is_binary': True,
}
res = self.client.post(self.url_for_object('actuatorType'), data=data)
self.assertEqual(res.status_code, 400)
class ActuatorTestCase(ActuatorAuthMixin, APITestCase):
@run_with_any_layout
def test_visible_fields(self):
fields = ActuatorSerializer().get_fields()
fields.pop('url')
fields.pop('index')
fields.pop('name')
fields.pop('actuator_type')
fields.pop('control_profile')
fields.pop('resource')
fields.pop('current_override')
fields.pop('override_value')
self.assertFalse(fields)
@run_with_any_layout
def <API key>(self):
# Create a resource to install the actuator in
air_id = ResourceType.objects.get_by_natural_key('A').pk
resource_info = {
'resource_type': self.url_for_object('resourceType', air_id),
'location': self.url_for_object('enclosure', 1)
}
res = self.client.post(
self.url_for_object('resource'), data=resource_info
)
self.assertEqual(res.status_code, 201)
resource = res.data
# Create the actuator
heater_id = ActuatorType.objects.get_by_natural_key(
'Relay-Controlled Air Heater'
).pk
control_profile_id = ControlProfile.objects.get_by_natural_key(
'Relay-Controlled Air Heater', 'Default Profile'
).pk
actuator_info = {
'actuator_type': self.url_for_object('actuatorType', heater_id),
'control_profile': self.url_for_object(
'controlProfile', control_profile_id
),
'resource': resource['url'],
}
res = self.client.post(
self.url_for_object('actuator'), data=actuator_info
)
self.assertEqual(res.status_code, 201)
actuator = res.data
# Validate the index and name
res = self.client.get(actuator['actuator_type'])
self.assertEqual(res.status_code, 200)
actuator_type = res.data
num_actuators = actuator_type['actuator_count']
self.assertEqual(actuator['index'], num_actuators)
expected_name = "{} Instance {}".format(
actuator_type['name'], num_actuators
)
self.assertEqual(actuator['name'], expected_name)
# Change the name
actuator_info['name'] = 'test'
res = self.client.put(actuator['url'], data=actuator_info)
self.assertEqual(res.status_code, 200)
actuator = res.data
self.assertEqual(actuator['name'], 'test')
# Try changing the type
<API key> = actuator['actuator_type']
circulation_id = ActuatorType.objects.get_by_natural_key(
'Relay-Controlled Humidifier'
).pk
actuator_info['actuator_type'] = self.url_for_object(
'actuatorType', circulation_id
)
res = self.client.put(actuator['url'], data=actuator_info)
self.assertEqual(res.status_code, 400)
actuator_info['actuator_type'] = <API key>
# Create a new resource of a different type
water_id = ResourceType.objects.get_by_natural_key('W').pk
new_resource_info = {
'resource_type': self.url_for_object('resourceType', water_id),
'location': self.url_for_object('enclosure', 1)
}
res = self.client.post(
self.url_for_object('resource'), data=new_resource_info
)
self.assertEqual(res.status_code, 201)
new_resource = res.data
# Try to move the actuator to the new resource
actuator_info['resource'] = new_resource['url']
res = self.client.put(actuator['url'], data=actuator_info)
self.assertEqual(res.status_code, 400)
class <API key>(APITestCase):
# TODO: Test state routes
pass |
<?php
##*HEADER*##
if( ! isset($this->error))
{
$this->error = JFactory::getApplication()->enqueueMessage(JText::_('<API key>'), 'error');
$this->debug = false;
}
?>
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
xml:lang="<?php echo $this->language; ?>"
lang="<?php echo $this->language; ?>"
dir="<?php echo $this->direction; ?>">
<head>
<title><?php echo $this->error->getCode().' - '.$this->title; ?></title>
<link rel="stylesheet" href="<?php echo $this->baseurl; ?>/templates/system/css/error.css" type="text/css" />
</head>
<body>
<div class="error">
<div id="outline">
<div id="errorboxoutline">
<div id="errorboxheader"><?php echo $this->error->getCode().' - '.$this->error->getMessage(); ?></div>
<div id="errorboxbody">
<p><strong><?php echo JText::_('<API key>'); ?></strong></p>
<ol>
<li><?php echo JText::_('<API key>'); ?></li>
<li><?php echo JText::_('<API key>'); ?></li>
<li><?php echo JText::_('<API key>'); ?></li>
<li><?php echo JText::_('<API key>'); ?></li>
<li><?php echo JText::_('<API key>'); ?></li>
<li><?php echo JText::_('<API key>'); ?></li>
</ol>
<p><strong><?php echo JText::_('<API key>'); ?></strong></p>
<ul>
<li><a href="<?php echo $this->baseurl; ?>/index.php"
title="<?php echo JText::_('<API key>'); ?>">
<?php echo JText::_('<API key>'); ?></a></li>
<li><a href="<?php echo $this->baseurl; ?>/index.php?option=com_search"
title="<?php echo JText::_('<API key>'); ?>">
<?php echo JText::_('<API key>'); ?></a></li>
</ul>
<p><?php echo JText::_('<API key>'); ?>.</p>
<div id="techinfo">
<p><?php echo $this->error->getMessage(); ?></p>
<p>
<?php if ($this->debug) :
echo $this->renderBacktrace();
endif; ?>
</p>
</div>
</div>
</div>
</div>
</div>
</body>
</html> |
<?php
/**
* @file
* Contains \Drupal\custom_block\Tests\PageEditTest.
*/
namespace Drupal\custom_block\Tests;
/**
* Tests the block edit functionality.
*/
class PageEditTest extends CustomBlockTestBase {
/**
* Declares test information.
*/
public static function getInfo() {
return array(
'name' => 'Custom Block edit',
'description' => 'Create a block and test block edit functionality.',
'group' => 'Custom Block',
);
}
/**
* Checks block edit functionality.
*/
public function testPageEdit() {
$this->drupalLogin($this->adminUser);
$langcode = <API key>;
$title_key = 'info';
$body_key = "block_body[$langcode][0][value]";
// Create block to edit.
$edit = array();
$edit['info'] = drupal_strtolower($this->randomName(8));
$edit[$body_key] = $this->randomName(16);
$this->drupalPost('block/add/basic', $edit, t('Save'));
// Check that the block exists in the database.
$blocks = \Drupal::entityQuery('custom_block')->condition('info', $edit['info'])->execute();
$block = entity_load('custom_block', reset($blocks));
$this->assertTrue($block, 'Custom block found in database.');
// Load the edit page.
$this->drupalGet('block/' . $block->id() . '/edit');
$this->assertFieldByName($title_key, $edit[$title_key], 'Title field displayed.');
$this->assertFieldByName($body_key, $edit[$body_key], 'Body field displayed.');
// Edit the content of the block.
$edit = array();
$edit[$title_key] = $this->randomName(8);
$edit[$body_key] = $this->randomName(16);
// Stay on the current page, without reloading.
$this->drupalPost(NULL, $edit, t('Save'));
// Edit the same block, creating a new revision.
$this->drupalGet("block/" . $block->id() . "/edit");
$edit = array();
$edit['info'] = $this->randomName(8);
$edit[$body_key] = $this->randomName(16);
$edit['revision'] = TRUE;
$this->drupalPost(NULL, $edit, t('Save'));
// Ensure that the block revision has been created.
$revised_block = entity_load('custom_block', $block->id->value, TRUE);
$this->assertNotIdentical($block->revision_id->value, $revised_block->revision_id->value, 'A new revision has been created.');
// Test deleting the block.
$this->drupalGet("block/" . $revised_block->id() . "/edit");
$this->drupalPost(NULL, array(), t('Delete'));
$this->assertText(format_string('Are you sure you want to delete !label?', array('!label' => $revised_block->label())));
}
} |
<div layout-align="center center" ng-controller="DasboardCtrl" >
<div layout="row" >
<!-- MERGEN IZQUIERDO -->
<div flex-gt-sm="10"></div>
<!-- CONTENIDO -->
<div layout-padding layout-align="center center" layout="row" layout-xs="column" flex="auto" >
<!-- CARDS DESCRIPTIVAS -->
<div layout="column" class="md-whiteframe-4dp" >
<md-content layout-padding>
<div layout="row" class="md-toolbar-tools" layout-margin md-colors="{background: 'primary-500'}" layout-align="center center" >
<h3 class="panel-widget-tittle">Resumen del Cliente</h3>
</div>
<div layout="row" layout-xs="column" layout-margin layout-align="center center" >
<!-- CARDS 1 -->
<div layout-xs="row" flex="auto" >
<md-card flex="auto" layout-align="center center" layout-padding class="md-whiteframe-4dp" md-theme="alt" >
<md-card-header md-colors="{color: 'blue-grey'}" >
<md-card-header-text>
<span class="md-title text-center">Avatar</span>
</md-card-header-text>
</md-card-header>
<md-card-title layout-padding >
<md-card-title-media flex="auto" >
<img class="md-media-lg md-user-avatar rounded" src="{{User.picture}}"/>
</md-card-title-media>
</md-card-title>
</md-card>
</div>
<!-- CARDS 2 -->
<div layout-xs="row" flex="auto" >
<md-card flex="auto" layout-align="center center" layout-padding class="md-whiteframe-4dp" md-theme="alt" >
<md-card-header md-colors="{color: 'blue-grey'}" >
<md-card-header-text>
<span class="md-title text-center">Periodo actual</span>
</md-card-header-text>
</md-card-header>
<md-card-content layout-padding >
<div style="width:150px;height:150px">
<pie-chart data="gauge_data" options="gauge_options"></pie-chart>
</div>
</md-card-content>
</md-card>
</div>
<!-- CARDS 3 -->
<div layout-xs="row" flex="auto" >
<md-card flex="auto" layout-align="center stretch" layout-padding class="md-whiteframe-4dp" md-theme="alt" >
<md-card-header md-colors="{color: 'blue-grey'}" >
<md-card-header-text>
<span class="md-title text-center">Tus Reclamos</span>
</md-card-header-text>
</md-card-header>
<md-card-content class="<API key>" >
<md-list-item ng-repeat="y in totales" class="<API key>" >
<md-button class="md-primary md-raised" flex >
{{y.status}} : {{y.cant}}
</md-button>
</md-list-item>
</md-card-content>
</md-card>
</div>
</div>
<!-- FIN CARDS DESCRIPTIVAS -->
</md-content>
</div>
</div>
<!-- FIN CONTENIDO -->
<!-- MERGEN DERECHO -->
<div flex-gt-sm="10"></div>
</div>
<div layout="row" >
<!-- MERGEN IZQUIERDO -->
<div flex-gt-sm="20"></div>
<!-- CONTENIDO -->
<div layout-padding layout-align="center center" layout="row" layout-xs="column" flex="auto">
<!-- CARDS DESCRIPTIVAS -->
<div layout="column" flex="auto" class="md-whiteframe-4dp" >
<md-content layout-padding>
<div layout="row" class="md-toolbar-tools" layout-margin md-colors="{background: 'primary-500'}" layout-align="center center" >
<h3 class="panel-widget-tittle">Grafico de Actividad</h3>
</div>
<div layout="row" layout-xs="column" layout-align="center center" flex="auto">
<div layout-xs="row" flex="100" >
<md-card flex="auto" layout-padding class="md-whiteframe-4dp" >
<md-card-header md-colors="{color: 'blue-grey'}" >
<md-card-header-text>
<span class="md-title text-center">Actividad Anual del Cliente en Rec!lamos On-Line </span>
</md-card-header-text>
</md-card-header>
<md-card-content layout-padding >
<div google-chart chart="myChartObject" style="height:70%; width:90%;" flex ></div>
</md-card-content>
</md-card>
</div>
</div>
<!-- FIN CARDS DESCRIPTIVAS -->
</md-content>
</div>
</div>
<!-- FIN CONTENIDO -->
<!-- MERGEN DERECHO -->
<div flex-gt-sm="20"></div>
</div>
</div> |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Posts extends CI_Controller {
/**
*initialize connect to database
*/
function __construct(){
parent::__construct();
$this->load->model('post'); //@see models/post.php
}
/*
*function for default when page is loaded
*
*@param int $start get all posts from BD
*/
function index($start=0){
$data['post']=$this->post->get_posts($start,4);
$this->load->library('pagination');
$config['base_url']=base_url()."posts/index/";
$config['total_rows']=$this->post->get_posts_count();
$config['per_page'] =4;
$this->pagination->initialize($config);
$data['pages']=$this->pagination->create_links();
$this->load->view('header');
$this->load->view('post',$data);
$this->load->view('footer');
}
/**
*try if user is loged in or NOT
*
*/
function correct_permissions ($required){
$user_type = $this->session->userdata('user_type');
if ($required == 'user'){
if($user_type){
return true;
}
}elseif ($required == 'author'){
if($user_type=='admin' || $user_type=='author'){
return true;
}
}elseif($required == 'admin'){
if($user_type=='admin'){
return true;
}
}
}
/**
*query for one post, for diplay on single page
*
*display a comments witch ar belong for this post, and show a comment form for add new comment
*
*@param int $postID ID of post
*
*/
function single($postID){
$this->load->model('comment');
$data['comment']=$this->comment->get_comments($postID);
$data['post']=$this->post->single($postID);
$this->load->helper('captcha');
$vals = array(
'img_path'=>'./captcha/',
'img_url'=>base_url().'captcha/',
'img_width'=>150,
'img_height'=>50
);
$cap = create_captcha($vals);
$this->session->set_userdata('captcha',$cap['word']);
$data['captcha'] = $cap['image'];
$this->load->helper('form');
$this->load->view('header');
$this->load->view('single',$data);
$this->load->view('footer');
}
/**
*insert new post in DB
*
*
*/
function new_post(){
if (!$this->correct_permissions('author')){
redirect(base_url().'users/login');
}
if($_POST){
$data = array(
'title' =>$_POST['title'],
'post' => $_POST['post'],
'active' => 1
);
//@see modules/Post::insert_post()
$this->post->insert_post($data);
redirect(base_url().'posts/');
}else{
$this->load->view('header'); //@see views/header.php
$this->load->view('new_post');//@see views/new_post.php
$this->load->view('footer'); //@see views/footer.php
}
}
/**
*update certain post in DB by him ID
*
*@param int $postID
*@return bool
*/
function editpost($postID){
if (!$this->correct_permissions('author')){
redirect(base_url().'users/login');
}
$data['success'] = 0;
if($_POST){
$data = array(
'title' =>$_POST['title'],
'post' =>$_POST['post'],
'active' => 1
);
$this->post->update_post($postID,$data);
$data['success'] = 1;
}
$data['post']=$this->post->single($postID);
$this->load->view('header');
$this->load->view('editpost',$data);
$this->load->view('footer');
}
/**
*delete post from DB
*
*@param int $postID
*/
function deletepost ($postID){
if (!$this->correct_permissions('author')){
redirect(base_url().'users/login');
}
$this->post->delete_post($postID);
redirect(base_url().'posts');
}
} |
package it.giacomos.android.wwwsapp;
public class ProgressBarParams {
/* 1. get situation
* 2. get today bmp
* 3. get today forecast (text only)
* 4. get tomorrow forecast (text + bmp)
* 5. get two days forecast (text + bmp)
*/
public static final double TOTAL_TASKS_INIT = 7.0;
/* android.app Activity progress bar goes from 0 to 10000.
* At 10000 the progress bar will be completely filled and will fade out.
*/
public static final double MAX_PB_VALUE = 10000.0;
/* single task from 0 to 100% */
public static final double SINGLE_TASK_RANGE = 100.0;
public static double currentValue;
} |
#include "constants.incl"
#define PLUS_EQUALS(A, B) A = A + B
#define MINUS_EQUALS(A, B) A = A - B
#define MULTIPLY_EQUALS(A, B) A = A * B
#define DIVIDE_EQUALS(A, B) A = A / B
!#define CONDITION_NUMBER
PROGRAM fibers
USE omp_lib
IMPLICIT NONE
CHARACTER(LEN=256)::program_name, data_name
#if defined(BENCHMARK)
INTEGER total_count_rate,total_count_max,total_count1,total_count2
REAL*8 total_CPU_p
INTEGER count_rate,count_max,count1,count2
REAL*8 CPU_p
#endif
!
! Initalize Memory
!
REAL*4,ALLOCATABLE,TARGET,DIMENSION(:)::<API key>, t_current_positions, t_next_positions
REAL*4,ALLOCATABLE,TARGET,DIMENSION(:)::<API key>, <API key>, t_next_orientations
REAL*4,ALLOCATABLE,TARGET,DIMENSION(:)::<API key>, <API key>
REAL*4,ALLOCATABLE,TARGET,DIMENSION(:)::<API key>, <API key>
REAL*4,POINTER::tmp_pointer(:)
REAL*4,POINTER::previous_positions(:),current_positions(:),next_positions(:)
REAL*4,POINTER::<API key>(:),<API key>(:),next_orientations(:)
REAL*4,POINTER::<API key>(:),<API key>(:)
REAL*4,POINTER::<API key>(:),<API key>(:)
REAL*4,ALLOCATABLE,DIMENSION(:,:)::a_matrix
REAL*4,ALLOCATABLE,DIMENSION(:)::b_vector
REAL*4,SAVE,DIMENSION(<API key>)::quadrature_points
REAL*4,SAVE,DIMENSION(<API key>)::quadrature_weights
REAL*4,SAVE,DIMENSION(<API key>,<API key>)::<API key>
REAL*4,SAVE,DIMENSION(<API key>)::lambda
REAL*4,SAVE,DIMENSION(<API key>)::eigen
REAL*4,SAVE,DIMENSION(DIMENSIONS)::external_force
INTEGER::i,j,force_index,force_index_i, force_index_j,quadrature_index_i,quadrature_index_j
REAL*4,DIMENSION(DIMENSIONS)::position_i, orientation_i
REAL*4,DIMENSION(DIMENSIONS)::position_j, orientation_j
REAL*4::quadrature_weight, legendre_polynomial
REAL*4,DIMENSION(6)::T
REAL*4,DIMENSION(3)::Q
REAL*4,DIMENSION(3)::TF, TFA0, TFA1, TFA1_TMP
REAL*4::QF
REAL*4,DIMENSION(<API key>, 6)::G
REAL*4,DIMENSION(<API key>, 3)::GF
REAL*4,DIMENSION(DIMENSIONS)::position_on_fiber_i,position_on_fiber_j,difference,difference2, oriented_force
REAL*4::invDistance,invDistance3,invDistance5
REAL*4,DIMENSION(6)::K
REAL*4,DIMENSION(DIMENSIONS)::force_on_fiber_j
#if defined(ANALYTICAL)
INTEGER::f, n
REAL*4,DIMENSION(<API key> + 3)::I1,I3,I5
REAL*4,DIMENSION(DIMENSIONS)::R0
REAL*4::b,l,invL,llimit,m,s_upper,s_lower,u_upper,u_lower,pow_s_upper,pow_s_lower
REAL*4::i1n2,i1n1,i1n0,i3n2,i3n1,i3n0,i5n2,i5n1,i5n0
REAL*4::L01,L03,L05,L13,L15,L23,L25
REAL*4::G11,G22,G33,G12,G13,G23
#endif
#if defined(GMRES)
INTEGER,DIMENSION(8)::icntl
REAL*4,DIMENSION(5)::cntl
REAL*4,DIMENSION(GMRES_LWORK)::work
INTEGER,DIMENSION(5)::irc
INTEGER::gmres_done
INTEGER,DIMENSION(3)::gmres_info
REAL*4,DIMENSION(2)::gmres_rinfo
#endif
#if defined(CONDITION_NUMBER)
REAL*4,DIMENSION(4*<API key>)::cond_work
INTEGER,DIMENSION(4*<API key>)::cond_iwork
REAL*4,EXTERNAL::slange
REAL*4::a_norm, rcond
INTEGER::cond_info
REAL*4,DIMENSION(<API key>)::cond_ipvt
#endif
INTEGER::x_row_index,y_row_index,z_row_index
INTEGER::x_col_index,y_col_index,z_col_index
REAL*4::c,d,e,cc,D1,gamma
INTEGER,SAVE,DIMENSION(<API key>)::IPIV
INTEGER::INFO
INTEGER::IDUMMY,ind
INTEGER::current_timestep
CHARACTER(len=8)::str_timestep
ALLOCATE( <API key>(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( t_current_positions(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( t_next_positions(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( <API key>(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( <API key>(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( t_next_orientations(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( <API key>(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( <API key>(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( <API key>(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( <API key>(DIMENSIONS*NUMBER_OF_FIBERS))
ALLOCATE( a_matrix(<API key>,<API key>))
ALLOCATE( b_vector(<API key>))
previous_positions => <API key>
current_positions => t_current_positions
next_positions => t_next_positions
<API key> => <API key>
<API key> => <API key>
next_orientations => t_next_orientations
<API key> => <API key>
<API key> => <API key>
<API key> => <API key>
<API key> => <API key>
c = LOG(SLENDERNESS * SLENDERNESS * EXP(1.0))
d = -c
e = 2.0
cc = 1.0
D1 = 0.75 / (d - 2.0 * cc)
a_matrix = 0.0
b_vector = 0.0
external_force = (/ 0.0, 0.0, -0.5 /)
!
! Load positions and orientations
!
!me: Intializes the positons and @todo tVecs with data from the specified
! input file.
CALL GETARG(0, program_name)
CALL GETARG(1, data_name)
PRINT *, TRIM(data_name)
PRINT *, NUMBER_OF_FIBERS
OPEN(10,file=TRIM(data_name));
READ(10,*) IDUMMY
DO i=1,NUMBER_OF_FIBERS
ind=(i-1)*3
READ(10,*) current_positions(ind+1),current_positions(ind+2),current_positions(ind+3),<API key>(ind+1),<API key>(ind+2),<API key>(ind+3)
END DO
CLOSE(10)
PRINT *,"Read initial data from file. "
! PRINT '(*(F16.8))', current_positions
!
! Precompute constants
!
CALL <API key>(quadrature_points, quadrature_weights, <API key>)
CALL precomputeLambda(lambda, eigen)
!
! Simulation Step
!
DO current_timestep = 0, <API key>
#if defined(VALIDATE)
WRITE(str_timestep, '(I1.1)') current_timestep
#endif
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(total_count1, total_count_rate, total_count_max)
#endif
!
! 1. Assemble System
!
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count1, count_rate, count_max)
#endif
#include "assemble_matrix.incl"
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count2, count_rate, count_max)
CPU_p = real(count2-count1)/count_rate
PRINT *,"BENCHMARK:assemble_system:", CPU_p
#endif
#if defined(VALIDATE)
OPEN(10,file=""//TRIM(str_timestep)//"_AMat.out");
DO i=1,<API key>
WRITE(10,'(*(F16.8))') (a_matrix(i,j),j=1,<API key>)
END DO
CLOSE(10)
OPEN(10,file=""//TRIM(str_timestep)//"_BVec.out");
DO i=1,<API key>
WRITE(10,'(*(F16.8))') (b_vector(i))
END DO
CLOSE(10)
#endif
!
! 2. Solve System
!
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count1, count_rate, count_max)
#endif
#include "solve_system.incl"
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count2, count_rate, count_max)
CPU_p = real(count2-count1)/count_rate
PRINT *,"BENCHMARK:solve_system:", CPU_p
#endif
#if defined(VALIDATE)
OPEN(10,file=""//TRIM(str_timestep)//"_XVec.out");
DO i=1,<API key>
WRITE(10,'(*(F16.8))') (b_vector(i))
END DO
CLOSE(10)
#endif
!
! 3. Update System
!
!
! 3.1. Update Velocity
!
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count1, count_rate, count_max)
#endif
#include "update_velocities.incl"
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count2, count_rate, count_max)
CPU_p = real(count2-count1)/count_rate
PRINT *,"BENCHMARK:update_velocities:", CPU_p
#endif
#if defined(VALIDATE)
OPEN(10,file=""//TRIM(str_timestep)//"_TRANSVel.out");
DO i=1,NUMBER_OF_FIBERS * DIMENSIONS
WRITE(10,'(*(F16.8))') (<API key>(i))
END DO
CLOSE(10)
OPEN(10,file=""//TRIM(str_timestep)//"_ROTVel.out");
DO i=1,NUMBER_OF_FIBERS * DIMENSIONS
WRITE(10,'(*(F16.8))') (<API key>(i))
END DO
CLOSE(10)
#endif
!
! 3.2. Update Fibers
!
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count1, count_rate, count_max)
#endif
IF (current_timestep == 0) THEN
#include "<API key>.incl"
ELSE
#include "update_fibers.incl"
END IF
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(count2, count_rate, count_max)
CPU_p = real(count2-count1)/count_rate
PRINT *,"BENCHMARK:update_fibers:", CPU_p
#endif
#if defined(VALIDATE)
OPEN(10,file=""//TRIM(str_timestep)//"_POS.out");
DO i=1,NUMBER_OF_FIBERS * DIMENSIONS
WRITE(10,'(*(F16.8))') (next_positions(i))
END DO
CLOSE(10)
OPEN(10,file=""//TRIM(str_timestep)//"_ORIENT.out");
DO i=1,NUMBER_OF_FIBERS * DIMENSIONS
WRITE(10,'(*(F16.8))') (next_orientations(i))
END DO
CLOSE(10)
#endif
#if !defined(BENCHMARK) && !defined(VALIDATE)
IF (STATE_SAVE_INTERVAL > 0 .AND. mod(current_timestep,STATE_SAVE_INTERVAL) == 0) THEN
WRITE(str_timestep, '(I0.5)') current_timestep
OPEN(10,file=""//TRIM(str_timestep)//".state");
WRITE(10,*) NUMBER_OF_FIBERS
DO i=1,NUMBER_OF_FIBERS
WRITE(10,'(*(F16.8))') current_positions((i-1)*DIMENSIONS+1),current_positions((i-1)*DIMENSIONS+2),current_positions((i-1)*DIMENSIONS+3)
WRITE(10,'(*(F16.8))') <API key>((i-1)*DIMENSIONS+1),<API key>((i-1)*DIMENSIONS+2),<API key>((i-1)*DIMENSIONS+3)
END DO
CLOSE(10)
END IF
IF (<API key> > 0 .AND. mod(current_timestep,<API key>) == 0) THEN
OPEN(20,file=""//TRIM(str_timestep)//".velocity")
DO i=1,NUMBER_OF_FIBERS
WRITE(20,'(*(F16.8))') <API key>((i-1)*DIMENSIONS+1),<API key>((i-1)*DIMENSIONS+2),<API key>((i-1)*DIMENSIONS+3)
END DO
CLOSE(20)
END IF
#endif
tmp_pointer => <API key>
<API key> => <API key>
<API key> => tmp_pointer
tmp_pointer => <API key>
<API key> => <API key>
<API key> => tmp_pointer
tmp_pointer => previous_positions
previous_positions => current_positions
current_positions => next_positions
next_positions => tmp_pointer
tmp_pointer => <API key>
<API key> => <API key>
<API key> => next_orientations
next_orientations => tmp_pointer
#if defined(BENCHMARK)
CALL SYSTEM_CLOCK(total_count2, total_count_rate, total_count_max)
total_CPU_p = real(<API key>)/total_count_rate
PRINT *,"BENCHMARK:total:", total_CPU_p
#endif
END DO
END PROGRAM fibers
SUBROUTINE <API key>(quadrature_points, quadrature_weights, <API key>)
REAL*8::p0,p1,p2
REAL*8::w0,w1,w2
REAL*8::lower_bound
REAL*8::interval_size
REAL*4,INTENT(OUT),DIMENSION(<API key>)::quadrature_points
REAL*4,INTENT(OUT),DIMENSION(<API key>)::quadrature_weights
REAL*4,INTENT(OUT),DIMENSION(<API key>,<API key>)::<API key>
REAL*8,DIMENSION(<API key>)::<API key>
REAL*8,DIMENSION(<API key>)::<API key>
REAL*8,DIMENSION(<API key>,<API key>)::<API key>
INTEGER::interval_index, force_index, point_index
p0 = -SQRT(15.0d0) / 5.0d0
p1 = 0.0d0
p2 = SQRT(15.0d0) / 5.0d0
w0 = 5.0d0 / 9.0d0
w1 = 8.0d0 / 9.0d0
w2 = 5.0d0 / 9.0d0
lower_bound = -1.0d0
interval_size = 2.0d0 / <API key>
DO interval_index = 0, <API key>
<API key>(interval_index * <API key> + 1) = &
(2.0d0 * lower_bound + interval_size + p0 * interval_size) / 2.0d0
<API key>(interval_index * <API key> + 2) = &
(2.0d0 * lower_bound + interval_size + p1 * interval_size) / 2.0d0
<API key>(interval_index * <API key> + 3) = &
(2.0d0 * lower_bound + interval_size + p2 * interval_size) / 2.0d0
<API key>(interval_index * <API key> + 1) = &
w0 / <API key>
<API key>(interval_index * <API key> + 2) = &
w1 / <API key>
<API key>(interval_index * <API key> + 3) = &
w2 / <API key>
lower_bound = lower_bound + interval_size
END DO
quadrature_points = <API key>
quadrature_weights = <API key>
DO force_index = 0, <API key>
DO point_index = 0, <API key>
<API key>(point_index + 1,force_index + 1) = &
<API key>(<API key>(point_index+1), force_index+1)
END DO
END DO
<API key> = <API key>
END SUBROUTINE <API key>
SUBROUTINE precomputeLambda(lambda, eigen)
REAL*4,INTENT(OUT),DIMENSION(<API key>)::lambda
REAL*4,INTENT(OUT),DIMENSION(<API key>)::eigen
REAL*8,DIMENSION(<API key>)::internal_lambda
REAL*8,DIMENSION(<API key>)::internal_eigen
INTEGER::force_index
REAL*8::c, d, e, cc
c = LOG(SLENDERNESS * SLENDERNESS * EXP(1.0d0))
d = -c
e = 2.0d0
cc = 1.0d0
internal_lambda(1) = 2.0d0
internal_eigen(1) = ((d - e - cc * internal_lambda(1)) / 2.0d0) / (d - cc * internal_lambda(1))
DO force_index = 2, <API key>
internal_lambda(force_index) = internal_lambda(force_index - 1) + 2.0d0 / force_index;
internal_eigen(force_index) = ((d - e - cc * internal_lambda(force_index)) / 2.0d0) / (d - cc * internal_lambda(force_index))
END DO
lambda = internal_lambda
eigen = internal_eigen
END SUBROUTINE precomputeLambda
FUNCTION <API key>(x, n)
REAL*8,INTENT(IN)::x
INTEGER,INTENT(IN)::n
IF (n == 0) THEN
<API key> = 1.0d0
ELSEIF (n == 1) THEN
<API key> = x
ELSEIF (n == 2) THEN
<API key> = (1.0d0 / 2.0d0) * &
(3.0d0 * x**2 - 1.0d0)
ELSEIF (n == 3) THEN
<API key> = (1.0d0 / 2.0d0) * &
(5.0d0 * x**3 - 3.0d0 * x)
ELSEIF (n == 4) THEN
<API key> = (1.0d0 / 8.0d0) * &
(35.0d0 * x**4 - 30.0d0 * x**2 + 3.0d0)
ELSEIF (n == 5) THEN
<API key> = (1.0d0 / 8.0d0) * &
(63.0d0 * x**5 - 70.0d0 * x**3 + 15.0d0 * x)
ELSEIF (n == 6) THEN
<API key> = (1.0d0 / 16.0d0) * &
(231.0d0 * x**6 - 315.0d0 * x**4 + 105.0d0 * x**2 - 5.0d0)
ELSEIF (n == 7) THEN
<API key> = (1.0d0 / 16.0d0) * &
(429.0d0 * x**7 - 693.0d0 * x**5 + 315.0d0 * x**3 - 35.0d0 * x)
ELSEIF (n == 8) THEN
<API key> = (1.0d0 / 128.0d0) * &
(6435.0d0 * x**8 - 12012.0d0 * x**6 + 6930.0d0 * x**4 - 1260.0d0 * x**2 + 35.0d0)
ELSE
PRINT *,"Could not precompute legendre polynomials - n not in range [1..8]: "
ENDIF
END FUNCTION <API key> |
#ifndef BIOS_H
#define BIOS_H
#define INDIRECT_CALL(addr, return_type, ...) (**(return_type(**)(__VA_ARGS__)) addr)
#define bios_run_cd_player INDIRECT_CALL(0x0600026C, void, void )
#define <API key> INDIRECT_CALL(0x06000274, int, int filtno )
#define bios_get_mpeg_rom INDIRECT_CALL(0x06000298, int, u32 index, u32 size, u32 addr )
#define bios_check_cd_auth INDIRECT_CALL(0x06000270, int, int mode ) //!< mode 0 -> check, 1 -> do auth
#define <API key> INDIRECT_CALL(0x06000300, void, u32 vector, void *func )
#define <API key> INDIRECT_CALL(0x06000304, void *, u32 vector )
#define <API key> INDIRECT_CALL(0x06000310, void, u32 vector, void *func )
#define <API key> INDIRECT_CALL(0x06000314, void *, u32 vector )
#define <API key> INDIRECT_CALL(0x06000320, void, u32 mode )
#define <API key>() (*(volatile u32*)0x06000324)
#define <API key> INDIRECT_CALL(0x06000340, void, u32 bits )
#define <API key> INDIRECT_CALL(0x06000344, void, u32 mask, u32 bits )
#define <API key>() (*(volatile u32*)0x06000348)
//! Prepare for Load CD operation.
/*!
* A Saturn CD may be read and booted using the bios_loadcd_ calls in order init, read, boot.
* Negative return values indicate failures.
*
* bios_loadcd_init():
* - resets selectors and the usual things
* - resets some BIOS state variables
* - starts a disc authentication
*/
#define bios_loadcd_init INDIRECT_CALL(0x0600029c, int, void )
//! Start reading for Load CD.
/*!
* bios_loadcd_read():
* - checks the CD auth result
* - starts a Play command for the first 16 disc sectors, into selector 0
* - sets some BIOS flags
*/
#define bios_loadcd_read INDIRECT_CALL(0x060002cc, int, void )
//! Attempt to boot loaded disc
/*!
* Must not be called until the disc read is complete.
* bios_loadcd_boot():
* - reads the sector data from the CDB to 0x06002000
* - checks the SEGA SEGASATURN header
* - checks the IP size, security code
* - checks the region
* - boots the disc if checks pass
*
* Return values include:
* -1 - bad header
* -4 - bad security code
* -8 - bad region
* +1 - not a Saturn disc
*/
#define bios_loadcd_boot INDIRECT_CALL(0x06000288, int, void )
typedef struct
{
u16 dev_id; // ID of device
u16 part; // Number of Partitions
} bup_cfg_struct;
typedef struct
{
u32 total_bytes; // Size of Backup Ram (in bytes)
u32 total_blocks; // Size of Backup Ram (in blocks)
u32 block_size; // Size of Block(in bytes)
u32 free_bytes; // Free Space(in bytes)
u32 free_blocks; // Free Space(in blocks)
u32 write_block_size; // Writable block size
} bup_stat_struct;
typedef struct
{
u8 filename[12]; // File name
u8 comment[11]; // Comment
u8 language; // Language of Comment
u32 date; // Date Stamp of File
u32 byte_size; // Size of Data(in bytes)
u16 block_size; // Size of Data(in blocks)
} bup_dir_struct;
typedef struct
{
u8 year; // Year minus 1980
u8 month; // Month
u8 day; // Day
u8 hour; // Hour
u8 min; // Minute
u8 week; // Week
} bup_date_struct;
#define bios_bup_vect_addr *(volatile u32 *)(0x6000354))
//! Initialize Bios Backup Library code
/*!
* bios_bup_init():
* - Copies bios backup library code to address specified in lib_addr
* - Detects whether cartridge and floppy disk drive are connected
* - Fills cfg with detected device information
* - cfg must an array bup_cfg_struct[3]
*/
#define bios_bup_init INDIRECT_CALL(0x6000358, void, volatile u32 *lib_addr, u32 *work_addr, bup_cfg_struct *cfg)
//! Backup Ram Select Partition. Only used for the floppy disk drive.
/*!
* bios_bup_sel_part():
* - Selects partition for the specified device
* Return values include:
* 0 - No error
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*/
#define bios_bup_sel_part INDIRECT_CALL(bios_bup_vect_addr+4, s32, u32 dev, u16 num)
//! Backup Ram Format.
/*!
* bios_bup_format():
* - Erases and formats specified device
* Return values include:
* 0 - No error
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*/
#define bios_bup_format INDIRECT_CALL(bios_bup_vect_addr+8, s32, u32 dev)
//! Backup Ram Status.
/*!
* bios_bup_stat():
* - Fetches the used and free space of the current device
* Return values include:
* 0 - No error
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*/
#define bios_bup_stat INDIRECT_CALL(bios_bup_vect_addr+12, s32, u32 dev, u32 stat_size, bup_stat_struct *stat)
//! Backup Ram Write.
/*!
* bios_bup_write():
* - Checks to see if filename already exists. If overwrite is set to 1 it continues with next step
* - Writes data specified in data variable to specified device
* Return values include:
* 0 - No error
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*/
#define bios_bup_write INDIRECT_CALL(bios_bup_vect_addr+16, s32, u32 dev, bup_dir_struct *dir, volatile u8 *data, u8 overwrite)
//! Backup Ram Read.
/*!
* bios_bup_read():
* - Checks to see if filename exists
* - Reads data from specified device and filename to memory pointed to by data
* Return values include:
* 0 - No error
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*
*/
#define bios_bup_read INDIRECT_CALL(bios_bup_vect_addr+20, s32, u32 dev, u8 *filename, volatile u8 *data)
//! Backup Ram Delete.
/*!
* bios_bup_del():
* - Checks to see if filename exists
* - Deletes data associated with filename and frees blocks
* Return values include:
* 0 - No error
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*/
#define bios_bup_del INDIRECT_CALL(bios_bup_vect_addr+24, s32, u32 dev, u8 *filename)
//! Backup Ram Get Directory List.
/*!
* bios_bup_dir():
* - Looks for saves based on specified device and filename
* - Stores results in memory pointed to by dir pointer
* Return values include:
* 0 - No Error
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*/
#define bios_bup_dir INDIRECT_CALL(bios_bup_vect_addr+28, s32, u32 dev, u8 *filename, u16 dir_size, bup_dir_struct *dir)
//! Backup Ram Verify.
/*!
* bios_bup_verify:
* - Compares data specified in data variable to data already stored on specified device and filename
* Return values include:
* 0 - Match
* 1 - Device Error or doesn't exist
* 2 - Not formatted
* 3 - Write protected
* 4 - Not enough memory
* 5 - Not Found
* 7 - No Match
* 8 - Broken
*/
#define bios_bup_verify INDIRECT_CALL(bios_bup_vect_addr+32, s32, u32 dev, u8 *filename, volatile u8 *data)
//! Backup Ram Convert Date Stamp variable to structure.
#define bios_bup_get_date INDIRECT_CALL(bios_bup_vect_addr+36, void, u32 date, bup_date_struct *date_data)
//! Backup Ram Convert structure to Date Stamp variable.
#define bios_bup_set_date INDIRECT_CALL(bios_bup_vect_addr+40, u32, bup_date_struct *date_data)
#endif |
package gspd.ispd.gui.iconico.dag;
import gspd.ispd.gui.iconico.Vertice;
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.util.ArrayList;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
public class DataFile extends Vertice implements Identificavel {
private static JPanel painel;
private static JTextField jId;
private static JTextField jsizeMin;
private static JTextField jsizeMax;
private Double sizeMin;
private Double sizeMax;
private String id;
private ArrayList<Message> entradas;
private ArrayList<Message> saidas;
public static void edit(Component parent, DataFile icon) {
if (painel == null) {
jId = new JTextField();
jId.setBorder(javax.swing.BorderFactory.createTitledBorder("Id"));
jsizeMin = new JTextField();
jsizeMin.setBorder(javax.swing.BorderFactory.createTitledBorder("Mim Size"));
jsizeMax = new JTextField();
jsizeMax.setBorder(javax.swing.BorderFactory.createTitledBorder("Max Size"));
painel = new JPanel();
painel.setLayout(new GridLayout(3, 1));
painel.add(jId);
painel.add(jsizeMin);
painel.add(jsizeMax);
}
jId.setText(icon.id);
jsizeMin.setText(icon.sizeMin.toString());
jsizeMax.setText(icon.sizeMax.toString());
int opcao = JOptionPane.showConfirmDialog(
parent,
painel,
"Set the size",
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE);
if (opcao == JOptionPane.OK_OPTION) {
String id = icon.id;
Double tamanhoMin = icon.sizeMin;
Double tamanhoMax = icon.sizeMax;
try {
id = jId.getText();
tamanhoMin = Double.valueOf(jsizeMin.getText().toString());
tamanhoMax = Double.valueOf(jsizeMax.getText().toString());
} catch (Exception e) {
}
icon.id = id;
icon.sizeMin = tamanhoMin;
icon.sizeMax = tamanhoMax;
}
}
public DataFile(Integer x, Integer y, Integer id) {
super(x, y);
this.id = "File" + id;
sizeMin = 50.0;
sizeMax = 50.0;
entradas = new ArrayList<Message>();
saidas = new ArrayList<Message>();
}
public DataFile(Integer x, Integer y, String id) {
super(x, y);
this.id = id;
sizeMin = 50.0;
sizeMax = 50.0;
entradas = new ArrayList<Message>();
saidas = new ArrayList<Message>();
}
@Override
public void draw(Graphics g) {
//circulo inferior
g.setColor(Color.ORANGE);
g.fillOval(getX() - 19, getY() + 7, 37, 10);
g.setColor(Color.BLACK);
g.drawOval(getX() - 19, getY() + 7, 37, 10);
//Lateral
g.setColor(Color.ORANGE);
g.fillRect(getX() - 19, getY() - 12, 37, 24);
//circulo superior
g.fillOval(getX() - 19, getY() - 17, 37, 10);
g.setColor(Color.BLACK);
g.drawOval(getX() - 19, getY() - 17, 37, 10);
//Linhas laterais
g.drawLine(getX() - 19, getY() - 12, getX() - 19, getY() + 12);
g.drawLine(getX() + 18, getY() - 12, getX() + 18, getY() + 12);
}
@Override
public boolean contains(int x, int y) {
if (x < getX() + 17 && x > getX() - 17) {
if (y < getY() + 17 && y > getY() - 17) {
return true;
}
}
return false;
}
@Override
public boolean <API key>(Vertice destino) {
if(destino.equals(this)) {
return true;
}
for (Message link : saidas) {
if (link.getDestino() instanceof Task) {
Task tar = (Task) link.getDestino();
boolean temp = tar.<API key>(destino);
if(temp) {
return true;
}
} else if(link.getDestino() instanceof DataFile) {
DataFile dat = (DataFile) link.getDestino();
System.out.println(dat+" -> "+destino);
boolean temp = dat.<API key>(destino);
if(temp) {
return true;
}
}
}
return false;
}
@Override
public ArrayList<Message> getEntradas() {
return entradas;
}
@Override
public ArrayList<Message> getSaidas() {
return saidas;
}
@Override
public boolean isConectado(Vertice destino) {
for (Message message : saidas) {
if(message.getDestino().equals(destino)) {
return true;
}
}
return false;
}
public Double getSizeMin() {
return sizeMin;
}
public void setSizeMin(Double sizeMin) {
this.sizeMin = sizeMin;
}
public Double getSizeMax() {
return sizeMax;
}
public void setSizeMax(Double sizeMax) {
this.sizeMax = sizeMax;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
@Override
public String getIdentificador() {
return id;
}
} |
package test;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import test.ConnectionClass;
@WebServlet("/Rezerwuj")
public class Rezerwuj extends HttpServlet {
private static final long serialVersionUID = 1L;
Connection conn;
public Rezerwuj() {
super();
// TODO Auto-generated constructor stub
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
conn = ConnectionClass.Polacz();
int idTermin = Integer.parseInt(request.getParameter("idTermin"));
int liczbaUczestnikow = Integer.parseInt(request.getParameter("liczbaUczestnikow"));
String sql1 = "INSERT INTO rezerwacje (liczbaUczestnikow,idTermin) values (?,?)";
String sql2 = "UPDATE termin SET termin.czyZajety=true WHERE termin.idTermin = ?";
try {
PreparedStatement preparedStatement1 = conn.prepareStatement(sql1);
preparedStatement1.setInt(1, liczbaUczestnikow );
preparedStatement1.setInt(2, idTermin);
PreparedStatement preparedStatement2 = conn.prepareStatement(sql2);
preparedStatement2.setInt(1, idTermin);
preparedStatement1.executeUpdate();
preparedStatement2.executeUpdate();
String z = "<font color='green' size='r8'>Zarezerwowano!</font>";
request.setAttribute("z", z); // This will be available as ${message}
request.<API key>("zarezerwowano.jsp").forward(request, response);
}
catch(SQLException e)
{
System.out.print(e);
}
}
} |
#ifndef PROGRAMMER_H
#define PROGRAMMER_H
#include "devConfig.h"
int programmer_reset(int port);
int <API key>(int port);
int programmer_echo(int port, char ch);
int <API key>(int port);
int <API key>(int port);
int programmer_init(int port, deviceConfig_t devConfig);
int <API key>(int port);
int <API key>(int port);
int <API key>(int port);
int <API key>(int port);
int <API key>(int port, int oscal, int fuse1);
int programmer_read_rom(int port, unsigned char * romImage, deviceConfig_t devConfig);
int <API key>(int port, unsigned char * eepromImage, deviceConfig_t devConfig);
int <API key>(int port, char * fuseImage, deviceConfig_t devConfig);
int <API key>(int port);
int <API key>(int port, deviceConfig_t devConfig );
int <API key>(int port);
int <API key>(int port, char *romImage, deviceConfig_t devConfig);
int <API key>(int port, char *eepromImage, deviceConfig_t devConfig);
int <API key>(int port, char * fuseImage, deviceConfig_t devConfig);
int <API key>(int port, char * fuseImage, deviceConfig_t devConfig);
#endif |
<?php
defined('_JEXEC') or die;
KSSystem::import('views.viewksadmin');
class <API key> extends JViewKSAdmin
{
function display($tpl = null)
{
$this->path->addItem(JText::_('ks_panel'), 'index.php?option=com_ksen&extension=com_ksenmart');
$this->path->addItem(JText::_('ksm_countries'));
switch ($this->getLayout())
{
case 'region':
$this->document->addScript(JURI::base() . 'components/com_ksenmart/js/region.js');
$model = $this->getModel();
$region = $model->getRegion();
$model->form='region';
$form = $model->getForm();
if ($form) $form->bind($region);
$this->title = JText::_('<API key>');
$this->form=$form;
break;
case 'country':
$this->document->addScript(JURI::base() . 'components/com_ksenmart/js/country.js');
$model = $this->getModel();
$country = $model->getCountry();
$model->form='country';
$form = $model->getForm();
if ($form) $form->bind($country);
$this->title = JText::_('<API key>');
$this->form=$form;
break;
default:
$this->items=$this->get('ListItems');
$this->total=$this->get('Total');
}
parent::display($tpl);
}
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace OYWebSite
{
public partial class Announcement : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
} |
<!DOCTYPE html>
<html>
<head>
<title><?php echo $title; ?></title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/css/jquery-ui.css" rel="stylesheet" type="text/css"/>
<link href="/css/jquery-ui.structure.css" rel="stylesheet" type="text/css"/>
<link href="/css/jquery-ui.theme.css" rel="stylesheet" type="text/css"/>
<link href="/css/font-awesome.css" rel="stylesheet" type="text/css"/>
<link href="/css/bootstrap.css" rel="stylesheet" type="text/css"/>
<link href="/css/bootstrap-theme.css" rel="stylesheet" type="text/css"/>
<link href="//netdna.bootstrapcdn.com/<TwitterConsumerkey>/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="//netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/r/dt/jq-2.1.4,dt-1.10.9/datatables.min.css"/>
<link href="/css/style.css" rel="stylesheet" type="text/css"/>
<script src="/js/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="/js/jquery-ui.js" type="text/javascript"></script>
<script type="text/javascript" src="https://cdn.datatables.net/r/dt/jq-2.1.4,dt-1.10.9/datatables.min.js"></script>
</head>
<body>
<div class="container-fluid nopadding">
<div>
<nav class="navbar navbar-default">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#<API key>" aria-expanded="false">
<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="/">Tournament Seating</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div>
<ul class="nav navbar-nav navbar-right">
<li class="admin">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Admin <span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="/users/view"><i class="fa fa-file text-danger"></i> Users</a></li>
<li><a href="/users/details/0/Add New"><i class="fa fa-plus text-danger"></i> Add User</a></li>
<li role="separator" class="divider"></li>
</ul>
</li>
<li><a class="navbar nav" href="/security/logout">Logout</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</nav>
</div>
<div class="col-sm-12 content"> |
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_24) on Sat May 28 14:07:22 BST 2011 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Uses of Class org.apache.mahout.clustering.lda.LDAWordTopicMapper (Mahout Core 0.5 API)
</TITLE>
<META NAME="date" CONTENT="2011-05-28">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.mahout.clustering.lda.LDAWordTopicMapper (Mahout Core 0.5 API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/mahout/clustering/lda/LDAWordTopicMapper.html" title="class in org.apache.mahout.clustering.lda"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/mahout/clustering/lda//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="LDAWordTopicMapper.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.apache.mahout.clustering.lda.LDAWordTopicMapper</B></H2>
</CENTER>
No usage of org.apache.mahout.clustering.lda.LDAWordTopicMapper
<P>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/mahout/clustering/lda/LDAWordTopicMapper.html" title="class in org.apache.mahout.clustering.lda"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/mahout/clustering/lda//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="LDAWordTopicMapper.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
Copyright &
</BODY>
</HTML> |
#include "util/errors.h"
#include <ostream>
#include <iostream>
#include <gsl_errno.h>
#ifdef __GNU_LIBRARY__
#include <execinfo.h>
#include <stdlib.h>
#include <cstring>
#include <cxxabi.h>
#endif
/** Standard exception classes for OpenMalaria. */
namespace OM { namespace util {
base_exception::base_exception(const string& msg, int code) :
runtime_error(msg),
errCode(code)
{}
traced_exception::traced_exception(const string& msg, const char *f, int l, int code, int s) :
base_exception(msg,code),
file(f), line(l), start(s)
{
#ifdef OM_GNU_STACK_TRACE
// probably 100 is big enough
#define MAX_STACK_SIZE 100
void *array[MAX_STACK_SIZE];
length = backtrace (array, MAX_STACK_SIZE);
trace = backtrace_symbols (array, length);
#endif
}
traced_exception::~traced_exception() throw(){
#ifdef OM_GNU_STACK_TRACE
free (trace);
#endif
}
ostream& operator<<(ostream& stream, const traced_exception& e){
stream<<"Call stack";
if( e.file != 0 )
stream << ", starting from "<<e.file<<':'<<e.line;
stream<<":\n";
#ifdef OM_NO_STACK_TRACE
stream << "backtrace capture disabled\n";
#elif defined OM_GNU_STACK_TRACE
//string binary;
// Usually e.start=1: we skip the first frame (traced_exception constructor)
for( size_t i=e.start; i<e.length; ++i ){
char *line = e.trace[i];
char *lb = strchr(line, '(');
char *plus = 0;
char *rb = 0;
char *demangled = 0;
if( lb != 0 ){
/* Print out the path to the binary? Seems pointless.
if( binary != string( line, lb-line ) ){
binary = string( line, lb-line );
stream << "in " << binary << ":\n";
}
*/
*lb = '\0';
plus = strchr(lb+1,'+');
if( plus != 0 ){
*plus = '\0';
int status;
demangled = abi::__cxa_demangle(lb+1, 0, 0, &status);
/*if( status != 0 ){
cerr << "status: "<<status<<"\tstring:"<<lb+1<<endl;
}*/
rb = strchr(plus+1, ')');
}else{
rb = strchr(lb+1, ')');
}
if( rb != 0 ){
*rb = '\0';
}
}
if( lb == 0 ){
stream << line;
}else{
if( plus != 0 ){
stream << "+" << (plus+1);
}
if( demangled != 0 ){
stream << '\t' << demangled;
free(demangled);
}else if( lb != 0 && rb > lb ){
stream << '\t' << (lb+1) << "()";
}
}
stream << '\n';
}
#else
stream << "sorry, no trace from this platform!\n";
#endif
return stream;
}
xml_scenario_error::xml_scenario_error(const string& msg) :
base_exception(msg, Error::XmlScenario)
{}
checkpoint_error::checkpoint_error(const string& msg) :
traced_exception(msg, 0, 0, Error::Checkpoint)
{}
cmd_exception::cmd_exception(const string& msg, int code) :
base_exception(msg, code)
{}
void gsl_handler( const char *reason,
const char *file,
int line,
int gsl_errno){
throw traced_exception(reason, file, line, Error::GSL, 2);
}
void set_gsl_handler() {
<API key>( &gsl_handler );
}
} } |
<?php $TRANSLATIONS = array(
"Greetings {user}," => "Herzlich Willkommen {user},",
"Sorry, but a malware was detected in a file you tried to upload and it had to be deleted." => "Entschuldigung, es wurde Malware in einer Datei gefunden die Sie hochladen wollten und sie musste gelöscht werden.",
"This email is a notification from {host}. Please, do not reply." => "Diese E-Mail ist eine Benachrichtigung von {host}. Bitte antworten Sie nicht.",
"File uploaded: {file}" => "Datei {file} hochgeladen",
"Antivirus Configuration" => "Antivirus Konfiguration",
"Mode" => "Modus",
"Executable" => "Ausführbar",
"Daemon" => "Dienst",
"Host" => "Host",
"Address of Antivirus Host." => "Die Adresse des Antivirus Hosts.",
"Not required in Executable Mode." => "Nicht erforderlich im ausführbaren Modus.",
"Port" => "Port",
"Port number of Antivirus Host." => "Die Portnummer des Antivirus Hosts.",
"Stream Length" => "Übertragungslänge",
"ClamAV StreamMaxLength value in bytes." => "ClamAV <API key> in Bytes.",
"Path to clamscan" => "Pfad zu clamscan",
"Path to clamscan executable." => "Pfad zum clamscan-Programm",
"Not required in Daemon Mode." => "Nicht erforderlich im Dienstmodus",
"Action for infected files found while scanning" => "Aktion für infizierte Dateien die beim Scannen gefunden wurden",
"Only log" => "Nur loggen",
"Delete file" => "Datei löschen",
"Save" => "Speichern"
); |
/* tunnel.c: an IP tunnel driver
The purpose of this driver is to provide an IP tunnel through
which you can tunnel network traffic transparently across subnets.
This was written by looking at Nick Holloway's dummy driver
Thanks for the great code!
-Sam Lantinga (slouken@cs.ucdavis.edu) 02/01/95
Minor tweaks:
Cleaned up the code a little and added some pre-1.3.0 tweaks.
dev->hard_header/hard_header_len changed to use no headers.
Comments/bracketing tweaked.
Made the tunnels use dev->name not tunnel: when error reporting.
Added tx_dropped stat
-Alan Cox (Alan.Cox@linux.org) 21 March 95
Reworked:
Changed to tunnel to destination gateway in addition to the
tunnel's pointopoint address
Almost completely rewritten
Note: There is currently no firewall or ICMP handling done.
-Sam Lantinga (slouken@cs.ucdavis.edu) 02/13/96
*/
/* Things I wish I had known when writing the tunnel driver:
When the tunnel_xmit() function is called, the skb contains the
packet to be sent (plus a great deal of extra info), and dev
contains the tunnel device that _we_ are.
When we are passed a packet, we are expected to fill in the
source address with our source IP address.
What is the proper way to allocate, copy and free a buffer?
After you allocate it, it is a "0 length" chunk of memory
starting at zero. If you want to add headers to the buffer
later, you'll have to call "skb_reserve(skb, amount)" with
the amount of memory you want reserved. Then, you call
"skb_put(skb, amount)" with the amount of space you want in
the buffer. skb_put() returns a pointer to the top (#0) of
that buffer. skb->len is set to the amount of space you have
"allocated" with skb_put(). You can then write up to skb->len
bytes to that buffer. If you need more, you can call skb_put()
again with the additional amount of space you need. You can
find out how much more space you can allocate by calling
"skb_tailroom(skb)".
Now, to add header space, call "skb_push(skb, header_len)".
This creates space at the beginning of the buffer and returns
a pointer to this new space. If later you need to strip a
header from a buffer, call "skb_pull(skb, header_len)".
skb_headroom() will return how much space is left at the top
of the buffer (before the main data). Remember, this headroom
space must be reserved before the skb_put() function is called.
*/
/*
This version of net/ipv4/ipip.c is cloned of net/ipv4/ip_gre.c
For comments look at net/ipv4/ip_gre.c --ANK
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/types.h>
#include <linux/sched.h>
#include <linux/kernel.h>
#include <asm/uaccess.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/in.h>
#include <linux/tcp.h>
#include <linux/udp.h>
#include <linux/if_arp.h>
#include <linux/mroute.h>
#include <linux/init.h>
#include <linux/netfilter_ipv4.h>
#include <net/sock.h>
#include <net/ip.h>
#include <net/icmp.h>
#include <net/protocol.h>
#include <net/ipip.h>
#include <net/inet_ecn.h>
#include <net/xfrm.h>
#define HASH_SIZE 16
#define HASH(addr) ((addr^(addr>>4))&0xF)
static int ipip_fb_tunnel_init(struct net_device *dev);
static int ipip_tunnel_init(struct net_device *dev);
static void ipip_tunnel_setup(struct net_device *dev);
static struct net_device *ipip_fb_tunnel_dev;
static struct ip_tunnel *tunnels_r_l[HASH_SIZE];
static struct ip_tunnel *tunnels_r[HASH_SIZE];
static struct ip_tunnel *tunnels_l[HASH_SIZE];
static struct ip_tunnel *tunnels_wc[1];
static struct ip_tunnel **tunnels[4] = { tunnels_wc, tunnels_l, tunnels_r, tunnels_r_l };
static DEFINE_RWLOCK(ipip_lock);
static struct ip_tunnel * ipip_tunnel_lookup(u32 remote, u32 local)
{
unsigned h0 = HASH(remote);
unsigned h1 = HASH(local);
struct ip_tunnel *t;
for (t = tunnels_r_l[h0^h1]; t; t = t->next) {
if (local == t->parms.iph.saddr &&
remote == t->parms.iph.daddr && (t->dev->flags&IFF_UP))
return t;
}
for (t = tunnels_r[h0]; t; t = t->next) {
if (remote == t->parms.iph.daddr && (t->dev->flags&IFF_UP))
return t;
}
for (t = tunnels_l[h1]; t; t = t->next) {
if (local == t->parms.iph.saddr && (t->dev->flags&IFF_UP))
return t;
}
if ((t = tunnels_wc[0]) != NULL && (t->dev->flags&IFF_UP))
return t;
return NULL;
}
static struct ip_tunnel **ipip_bucket(struct ip_tunnel *t)
{
u32 remote = t->parms.iph.daddr;
u32 local = t->parms.iph.saddr;
unsigned h = 0;
int prio = 0;
if (remote) {
prio |= 2;
h ^= HASH(remote);
}
if (local) {
prio |= 1;
h ^= HASH(local);
}
return &tunnels[prio][h];
}
static void ipip_tunnel_unlink(struct ip_tunnel *t)
{
struct ip_tunnel **tp;
for (tp = ipip_bucket(t); *tp; tp = &(*tp)->next) {
if (t == *tp) {
write_lock_bh(&ipip_lock);
*tp = t->next;
write_unlock_bh(&ipip_lock);
break;
}
}
}
static void ipip_tunnel_link(struct ip_tunnel *t)
{
struct ip_tunnel **tp = ipip_bucket(t);
t->next = *tp;
write_lock_bh(&ipip_lock);
*tp = t;
write_unlock_bh(&ipip_lock);
}
static struct ip_tunnel * ipip_tunnel_locate(struct ip_tunnel_parm *parms, int create)
{
u32 remote = parms->iph.daddr;
u32 local = parms->iph.saddr;
struct ip_tunnel *t, **tp, *nt;
struct net_device *dev;
unsigned h = 0;
int prio = 0;
char name[IFNAMSIZ];
if (remote) {
prio |= 2;
h ^= HASH(remote);
}
if (local) {
prio |= 1;
h ^= HASH(local);
}
for (tp = &tunnels[prio][h]; (t = *tp) != NULL; tp = &t->next) {
if (local == t->parms.iph.saddr && remote == t->parms.iph.daddr)
return t;
}
if (!create)
return NULL;
if (parms->name[0])
strlcpy(name, parms->name, IFNAMSIZ);
else {
int i;
for (i=1; i<100; i++) {
sprintf(name, "tunl%d", i);
if (__dev_get_by_name(name) == NULL)
break;
}
if (i==100)
goto failed;
}
dev = alloc_netdev(sizeof(*t), name, ipip_tunnel_setup);
if (dev == NULL)
return NULL;
nt = dev->priv;
SET_MODULE_OWNER(dev);
dev->init = ipip_tunnel_init;
nt->parms = *parms;
if (register_netdevice(dev) < 0) {
free_netdev(dev);
goto failed;
}
dev_hold(dev);
ipip_tunnel_link(nt);
return nt;
failed:
return NULL;
}
static void ipip_tunnel_uninit(struct net_device *dev)
{
if (dev == ipip_fb_tunnel_dev) {
write_lock_bh(&ipip_lock);
tunnels_wc[0] = NULL;
write_unlock_bh(&ipip_lock);
} else
ipip_tunnel_unlink((struct ip_tunnel*)dev->priv);
dev_put(dev);
}
static void ipip_err(struct sk_buff *skb, u32 info)
{
#ifndef <API key>
/* It is not :-( All the routers (except for Linux) return only
8 bytes of packet payload. It means, that precise relaying of
ICMP in the real Internet is absolutely infeasible.
*/
struct iphdr *iph = (struct iphdr*)skb->data;
int type = skb->h.icmph->type;
int code = skb->h.icmph->code;
struct ip_tunnel *t;
switch (type) {
default:
case ICMP_PARAMETERPROB:
return;
case ICMP_DEST_UNREACH:
switch (code) {
case ICMP_SR_FAILED:
case ICMP_PORT_UNREACH:
/* Impossible event. */
return;
case ICMP_FRAG_NEEDED:
/* Soft state for pmtu is maintained by IP core. */
return;
default:
/* All others are translated to HOST_UNREACH.
rfc2003 contains "deep thoughts" about NET_UNREACH,
I believe they are just ether pollution. --ANK
*/
break;
}
break;
case ICMP_TIME_EXCEEDED:
if (code != ICMP_EXC_TTL)
return;
break;
}
read_lock(&ipip_lock);
t = ipip_tunnel_lookup(iph->daddr, iph->saddr);
if (t == NULL || t->parms.iph.daddr == 0)
goto out;
if (t->parms.iph.ttl == 0 && type == ICMP_TIME_EXCEEDED)
goto out;
if (jiffies - t->err_time < IPTUNNEL_ERR_TIMEO)
t->err_count++;
else
t->err_count = 1;
t->err_time = jiffies;
out:
read_unlock(&ipip_lock);
return;
#else
struct iphdr *iph = (struct iphdr*)dp;
int hlen = iph->ihl<<2;
struct iphdr *eiph;
int type = skb->h.icmph->type;
int code = skb->h.icmph->code;
int rel_type = 0;
int rel_code = 0;
int rel_info = 0;
struct sk_buff *skb2;
struct flowi fl;
struct rtable *rt;
if (len < hlen + sizeof(struct iphdr))
return;
eiph = (struct iphdr*)(dp + hlen);
switch (type) {
default:
return;
case ICMP_PARAMETERPROB:
if (skb->h.icmph->un.gateway < hlen)
return;
/* So... This guy found something strange INSIDE encapsulated
packet. Well, he is fool, but what can we do ?
*/
rel_type = ICMP_PARAMETERPROB;
rel_info = skb->h.icmph->un.gateway - hlen;
break;
case ICMP_DEST_UNREACH:
switch (code) {
case ICMP_SR_FAILED:
case ICMP_PORT_UNREACH:
/* Impossible event. */
return;
case ICMP_FRAG_NEEDED:
/* And it is the only really necessary thing :-) */
rel_info = ntohs(skb->h.icmph->un.frag.mtu);
if (rel_info < hlen+68)
return;
rel_info -= hlen;
/* BSD 4.2 MORE DOES NOT EXIST IN NATURE. */
if (rel_info > ntohs(eiph->tot_len))
return;
break;
default:
/* All others are translated to HOST_UNREACH.
rfc2003 contains "deep thoughts" about NET_UNREACH,
I believe, it is just ether pollution. --ANK
*/
rel_type = ICMP_DEST_UNREACH;
rel_code = ICMP_HOST_UNREACH;
break;
}
break;
case ICMP_TIME_EXCEEDED:
if (code != ICMP_EXC_TTL)
return;
break;
}
/* Prepare fake skb to feed it to icmp_send */
skb2 = skb_clone(skb, GFP_ATOMIC);
if (skb2 == NULL)
return;
dst_release(skb2->dst);
skb2->dst = NULL;
skb_pull(skb2, skb->data - (u8*)eiph);
skb2->nh.raw = skb2->data;
/* Try to guess incoming interface */
memset(&fl, 0, sizeof(fl));
fl.fl4_daddr = eiph->saddr;
fl.fl4_tos = RT_TOS(eiph->tos);
fl.proto = IPPROTO_IPIP;
if (ip_route_output_key(&rt, &key)) {
kfree_skb(skb2);
return;
}
skb2->dev = rt->u.dst.dev;
/* route "incoming" packet */
if (rt->rt_flags&RTCF_LOCAL) {
ip_rt_put(rt);
rt = NULL;
fl.fl4_daddr = eiph->daddr;
fl.fl4_src = eiph->saddr;
fl.fl4_tos = eiph->tos;
if (ip_route_output_key(&rt, &fl) ||
rt->u.dst.dev->type != ARPHRD_TUNNEL) {
ip_rt_put(rt);
kfree_skb(skb2);
return;
}
} else {
ip_rt_put(rt);
if (ip_route_input(skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) ||
skb2->dst->dev->type != ARPHRD_TUNNEL) {
kfree_skb(skb2);
return;
}
}
/* change mtu on this route */
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED) {
if (rel_info > dst_mtu(skb2->dst)) {
kfree_skb(skb2);
return;
}
skb2->dst->ops->update_pmtu(skb2->dst, rel_info);
rel_info = htonl(rel_info);
} else if (type == ICMP_TIME_EXCEEDED) {
struct ip_tunnel *t = (struct ip_tunnel*)skb2->dev->priv;
if (t->parms.iph.ttl) {
rel_type = ICMP_DEST_UNREACH;
rel_code = ICMP_HOST_UNREACH;
}
}
icmp_send(skb2, rel_type, rel_code, rel_info);
kfree_skb(skb2);
return;
#endif
}
static inline void <API key>(struct iphdr *outer_iph, struct sk_buff *skb)
{
struct iphdr *inner_iph = skb->nh.iph;
if (INET_ECN_is_ce(outer_iph->tos))
IP_ECN_set_ce(inner_iph);
}
static int ipip_rcv(struct sk_buff *skb)
{
struct iphdr *iph;
struct ip_tunnel *tunnel;
if (!pskb_may_pull(skb, sizeof(struct iphdr)))
goto out;
iph = skb->nh.iph;
read_lock(&ipip_lock);
if ((tunnel = ipip_tunnel_lookup(iph->saddr, iph->daddr)) != NULL) {
if (!xfrm4_policy_check(NULL, XFRM_POLICY_IN, skb)) {
read_unlock(&ipip_lock);
kfree_skb(skb);
return 0;
}
secpath_reset(skb);
skb->mac.raw = skb->nh.raw;
skb->nh.raw = skb->data;
memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options));
skb->protocol = htons(ETH_P_IP);
skb->pkt_type = PACKET_HOST;
tunnel->stat.rx_packets++;
tunnel->stat.rx_bytes += skb->len;
skb->dev = tunnel->dev;
dst_release(skb->dst);
skb->dst = NULL;
nf_reset(skb);
<API key>(iph, skb);
netif_rx(skb);
read_unlock(&ipip_lock);
return 0;
}
read_unlock(&ipip_lock);
out:
return -1;
}
/*
* This function assumes it is being called from dev_queue_xmit()
* and that skb is filled properly by that function.
*/
static int ipip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct ip_tunnel *tunnel = (struct ip_tunnel*)dev->priv;
struct net_device_stats *stats = &tunnel->stat;
struct iphdr *tiph = &tunnel->parms.iph;
u8 tos = tunnel->parms.iph.tos;
u16 df = tiph->frag_off;
struct rtable *rt; /* Route to the other host */
struct net_device *tdev; /* Device to other host */
struct iphdr *old_iph = skb->nh.iph;
struct iphdr *iph; /* Our new IP header */
int max_headroom; /* The extra header space needed */
u32 dst = tiph->daddr;
int mtu;
if (tunnel->recursion++) {
tunnel->stat.collisions++;
goto tx_error;
}
if (skb->protocol != htons(ETH_P_IP))
goto tx_error;
if (tos&1)
tos = old_iph->tos;
if (!dst) {
/* NBMA tunnel */
if ((rt = (struct rtable*)skb->dst) == NULL) {
tunnel->stat.tx_fifo_errors++;
goto tx_error;
}
if ((dst = rt->rt_gateway) == 0)
goto tx_error_icmp;
}
{
struct flowi fl = { .oif = tunnel->parms.link,
.nl_u = { .ip4_u =
{ .daddr = dst,
.saddr = tiph->saddr,
.tos = RT_TOS(tos) } },
.proto = IPPROTO_IPIP };
if (ip_route_output_key(&rt, &fl)) {
tunnel->stat.tx_carrier_errors++;
goto tx_error_icmp;
}
}
tdev = rt->u.dst.dev;
if (tdev == dev) {
ip_rt_put(rt);
tunnel->stat.collisions++;
goto tx_error;
}
if (tiph->frag_off)
mtu = dst_mtu(&rt->u.dst) - sizeof(struct iphdr);
else
mtu = skb->dst ? dst_mtu(skb->dst) : dev->mtu;
if (mtu < 68) {
tunnel->stat.collisions++;
ip_rt_put(rt);
goto tx_error;
}
if (skb->dst)
skb->dst->ops->update_pmtu(skb->dst, mtu);
df |= (old_iph->frag_off&htons(IP_DF));
if ((old_iph->frag_off&htons(IP_DF)) && mtu < ntohs(old_iph->tot_len)) {
icmp_send(skb, ICMP_DEST_UNREACH, ICMP_FRAG_NEEDED, htonl(mtu));
ip_rt_put(rt);
goto tx_error;
}
if (tunnel->err_count > 0) {
if (jiffies - tunnel->err_time < IPTUNNEL_ERR_TIMEO) {
tunnel->err_count
dst_link_failure(skb);
} else
tunnel->err_count = 0;
}
/*
* Okay, now see if we can stuff it in the buffer as-is.
*/
max_headroom = (LL_RESERVED_SPACE(tdev)+sizeof(struct iphdr));
if (skb_headroom(skb) < max_headroom || skb_cloned(skb) || skb_shared(skb)) {
struct sk_buff *new_skb = <API key>(skb, max_headroom);
if (!new_skb) {
ip_rt_put(rt);
stats->tx_dropped++;
dev_kfree_skb(skb);
tunnel->recursion
return 0;
}
if (skb->sk)
skb_set_owner_w(new_skb, skb->sk);
dev_kfree_skb(skb);
skb = new_skb;
old_iph = skb->nh.iph;
}
skb->h.raw = skb->nh.raw;
skb->nh.raw = skb_push(skb, sizeof(struct iphdr));
memset(&(IPCB(skb)->opt), 0, sizeof(IPCB(skb)->opt));
dst_release(skb->dst);
skb->dst = &rt->u.dst;
/*
* Push down and install the IPIP header.
*/
iph = skb->nh.iph;
iph->version = 4;
iph->ihl = sizeof(struct iphdr)>>2;
iph->frag_off = df;
iph->protocol = IPPROTO_IPIP;
iph->tos = <API key>(tos, old_iph->tos);
iph->daddr = rt->rt_dst;
iph->saddr = rt->rt_src;
if ((iph->ttl = tiph->ttl) == 0)
iph->ttl = old_iph->ttl;
nf_reset(skb);
IPTUNNEL_XMIT();
tunnel->recursion
return 0;
tx_error_icmp:
dst_link_failure(skb);
tx_error:
stats->tx_errors++;
dev_kfree_skb(skb);
tunnel->recursion
return 0;
}
static int
ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd)
{
int err = 0;
struct ip_tunnel_parm p;
struct ip_tunnel *t;
switch (cmd) {
case SIOCGETTUNNEL:
t = NULL;
if (dev == ipip_fb_tunnel_dev) {
if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p))) {
err = -EFAULT;
break;
}
t = ipip_tunnel_locate(&p, 0);
}
if (t == NULL)
t = (struct ip_tunnel*)dev->priv;
memcpy(&p, &t->parms, sizeof(p));
if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
err = -EFAULT;
break;
case SIOCADDTUNNEL:
case SIOCCHGTUNNEL:
err = -EPERM;
if (!capable(CAP_NET_ADMIN))
goto done;
err = -EFAULT;
if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
goto done;
err = -EINVAL;
if (p.iph.version != 4 || p.iph.protocol != IPPROTO_IPIP ||
p.iph.ihl != 5 || (p.iph.frag_off&htons(~IP_DF)))
goto done;
if (p.iph.ttl)
p.iph.frag_off |= htons(IP_DF);
t = ipip_tunnel_locate(&p, cmd == SIOCADDTUNNEL);
if (dev != ipip_fb_tunnel_dev && cmd == SIOCCHGTUNNEL) {
if (t != NULL) {
if (t->dev != dev) {
err = -EEXIST;
break;
}
} else {
if (((dev->flags&IFF_POINTOPOINT) && !p.iph.daddr) ||
(!(dev->flags&IFF_POINTOPOINT) && p.iph.daddr)) {
err = -EINVAL;
break;
}
t = (struct ip_tunnel*)dev->priv;
ipip_tunnel_unlink(t);
t->parms.iph.saddr = p.iph.saddr;
t->parms.iph.daddr = p.iph.daddr;
memcpy(dev->dev_addr, &p.iph.saddr, 4);
memcpy(dev->broadcast, &p.iph.daddr, 4);
ipip_tunnel_link(t);
netdev_state_change(dev);
}
}
if (t) {
err = 0;
if (cmd == SIOCCHGTUNNEL) {
t->parms.iph.ttl = p.iph.ttl;
t->parms.iph.tos = p.iph.tos;
t->parms.iph.frag_off = p.iph.frag_off;
}
if (copy_to_user(ifr->ifr_ifru.ifru_data, &t->parms, sizeof(p)))
err = -EFAULT;
} else
err = (cmd == SIOCADDTUNNEL ? -ENOBUFS : -ENOENT);
break;
case SIOCDELTUNNEL:
err = -EPERM;
if (!capable(CAP_NET_ADMIN))
goto done;
if (dev == ipip_fb_tunnel_dev) {
err = -EFAULT;
if (copy_from_user(&p, ifr->ifr_ifru.ifru_data, sizeof(p)))
goto done;
err = -ENOENT;
if ((t = ipip_tunnel_locate(&p, 0)) == NULL)
goto done;
err = -EPERM;
if (t->dev == ipip_fb_tunnel_dev)
goto done;
dev = t->dev;
}
err = <API key>(dev);
break;
default:
err = -EINVAL;
}
done:
return err;
}
static struct net_device_stats *<API key>(struct net_device *dev)
{
return &(((struct ip_tunnel*)dev->priv)->stat);
}
static int <API key>(struct net_device *dev, int new_mtu)
{
if (new_mtu < 68 || new_mtu > 0xFFF8 - sizeof(struct iphdr))
return -EINVAL;
dev->mtu = new_mtu;
return 0;
}
static void ipip_tunnel_setup(struct net_device *dev)
{
SET_MODULE_OWNER(dev);
dev->uninit = ipip_tunnel_uninit;
dev->hard_start_xmit = ipip_tunnel_xmit;
dev->get_stats = <API key>;
dev->do_ioctl = ipip_tunnel_ioctl;
dev->change_mtu = <API key>;
dev->destructor = free_netdev;
dev->type = ARPHRD_TUNNEL;
dev->hard_header_len = LL_MAX_HEADER + sizeof(struct iphdr);
dev->mtu = 1500 - sizeof(struct iphdr);
dev->flags = IFF_NOARP;
dev->iflink = 0;
dev->addr_len = 4;
}
static int ipip_tunnel_init(struct net_device *dev)
{
struct net_device *tdev = NULL;
struct ip_tunnel *tunnel;
struct iphdr *iph;
tunnel = (struct ip_tunnel*)dev->priv;
iph = &tunnel->parms.iph;
tunnel->dev = dev;
strcpy(tunnel->parms.name, dev->name);
memcpy(dev->dev_addr, &tunnel->parms.iph.saddr, 4);
memcpy(dev->broadcast, &tunnel->parms.iph.daddr, 4);
if (iph->daddr) {
struct flowi fl = { .oif = tunnel->parms.link,
.nl_u = { .ip4_u =
{ .daddr = iph->daddr,
.saddr = iph->saddr,
.tos = RT_TOS(iph->tos) } },
.proto = IPPROTO_IPIP };
struct rtable *rt;
if (!ip_route_output_key(&rt, &fl)) {
tdev = rt->u.dst.dev;
ip_rt_put(rt);
}
dev->flags |= IFF_POINTOPOINT;
}
if (!tdev && tunnel->parms.link)
tdev = __dev_get_by_index(tunnel->parms.link);
if (tdev) {
dev->hard_header_len = tdev->hard_header_len + sizeof(struct iphdr);
dev->mtu = tdev->mtu - sizeof(struct iphdr);
}
dev->iflink = tunnel->parms.link;
return 0;
}
static int __init ipip_fb_tunnel_init(struct net_device *dev)
{
struct ip_tunnel *tunnel = dev->priv;
struct iphdr *iph = &tunnel->parms.iph;
tunnel->dev = dev;
strcpy(tunnel->parms.name, dev->name);
iph->version = 4;
iph->protocol = IPPROTO_IPIP;
iph->ihl = 5;
dev_hold(dev);
tunnels_wc[0] = tunnel;
return 0;
}
#ifdef CONFIG_INET_TUNNEL
static struct xfrm_tunnel ipip_handler = {
.handler = ipip_rcv,
.err_handler = ipip_err,
};
static inline int ipip_register(void)
{
return <API key>(&ipip_handler);
}
static inline int ipip_unregister(void)
{
return <API key>(&ipip_handler);
}
#else
static struct net_protocol ipip_protocol = {
.handler = ipip_rcv,
.err_handler = ipip_err,
.no_policy = 1,
};
static inline int ipip_register(void)
{
return inet_add_protocol(&ipip_protocol, IPPROTO_IPIP);
}
static inline int ipip_unregister(void)
{
return inet_del_protocol(&ipip_protocol, IPPROTO_IPIP);
}
#endif
static char banner[] __initdata =
KERN_INFO "IPv4 over IPv4 tunneling driver\n";
static int __init ipip_init(void)
{
int err;
printk(banner);
if (ipip_register() < 0) {
printk(KERN_INFO "ipip init: can't register tunnel\n");
return -EAGAIN;
}
ipip_fb_tunnel_dev = alloc_netdev(sizeof(struct ip_tunnel),
"tunl0",
ipip_tunnel_setup);
if (!ipip_fb_tunnel_dev) {
err = -ENOMEM;
goto err1;
}
ipip_fb_tunnel_dev->init = ipip_fb_tunnel_init;
if ((err = register_netdev(ipip_fb_tunnel_dev)))
goto err2;
out:
return err;
err2:
free_netdev(ipip_fb_tunnel_dev);
err1:
ipip_unregister();
goto out;
}
static void __exit <API key>(void)
{
int prio;
for (prio = 1; prio < 4; prio++) {
int h;
for (h = 0; h < HASH_SIZE; h++) {
struct ip_tunnel *t;
while ((t = tunnels[prio][h]) != NULL)
<API key>(t->dev);
}
}
}
static void __exit ipip_fini(void)
{
if (ipip_unregister() < 0)
printk(KERN_INFO "ipip close: can't deregister tunnel\n");
rtnl_lock();
<API key>();
<API key>(ipip_fb_tunnel_dev);
rtnl_unlock();
}
module_init(ipip_init);
module_exit(ipip_fini);
MODULE_LICENSE("GPL"); |
#include <diablosupport_class.h>
#ifndef CLASS
#define CLASS edge
#define <API key> EDGE
#define <API key> Edge
#endif
/*! \brief An edge in a graph.
*
* This is the general abstraction for edges in Diablo. Also see t_node and
* t_graph */
DIABLO_CLASS_BEGIN
/*! The node from which this edge originates */
MEMBER(t_node *, head, HEAD)
/*! The node to which this edge points */
MEMBER(t_node *, tail, TAIL)
/*! The next edge in the list that holds all edges */
MEMBER(t_CLASS *, next, NEXT)
/*! The previous edge in the list that holds all edges */
MEMBER(t_CLASS *, prev, PREV)
/*! Pointer to the next outgoing edge of head */
MEMBER(t_CLASS *, succ_next, SUCC_NEXT)
/*! Pointer to the previous outgoing edge of head */
MEMBER(t_CLASS *, succ_prev, SUCC_PREV)
/*! Pointer to the next incoming edge of tail */
MEMBER(t_CLASS *, pred_next, PRED_NEXT)
/*! Pointer to the previous incoming edge of tail */
MEMBER(t_CLASS *, pred_prev, PRED_PREV)
/*! Field that can be used to express a correspondence relation between two
* edges. This field stores the corresponding edge. */
MEMBER(t_CLASS *, corr, CORR)
/*! The category of the edge (a numeric value, identifying the type of the edge
* */
MEMBER(t_uint32, cat, CAT)
/*! Edges are marked by assigning a number to them (this avoids unmarking
* them). This field is used to store that number if the edge is marked, else
* it can hold any other number
*/
MEMBER(t_uint32, marked_number, MARKED_NUMBER)
DIABLO_CLASS_END
/* vim: set shiftwidth=2 expandtab cinoptions=p5,t0,(0, foldmethod=marker tw=80 cindent: */ |
/* <API key> */
/* <API key> */
#ifndef __BPF_EXPR_H__
#define __BPF_EXPR_H__
#include <stdint.h>
#include <sys/queue.h>
#include <netinet/ether.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#define stringify(x)
enum bpf_arith_ops
{
UNKNOWN_ARITH_OP = 0,
EQUAL,
NOT_EQUAL,
GREATER,
LESS,
GREATER_EQUAL,
LESS_EQUAL
};
enum bpf_bit_ops
{
UNKNOWN_BIT_OP = 0,
NOT,
AND,
OR,
XOR
};
enum bpf_direction
{
DIRECTION_UNKNOWN = 0,
ANY_DIRECTION,
SRC,
DST,
};
enum bpf_compiler_obj
{
UNKNOWN_OBJ = 0,
IP,
IP6,
MAC,
LEN,
PORT,
BIT_OP,
MAC_ID,
POS_NUMBER,
IPv4_ID
};
struct bpf_step
{
union value
{
uint64_t nr;
struct in_addr in;
struct in6_addr in6;
struct ether_addr eth;
enum bpf_bit_ops bit_op;
} value;
enum bpf_direction direction;
enum bpf_arith_ops arith_op;
enum bpf_compiler_obj obj;
size_t nr;
TAILQ_ENTRY(bpf_step) entry;
};
struct bpf_expr
{
size_t len;
TAILQ_HEAD(bpf_expr_head, bpf_step) head;
};
struct bpf_step * bpf_step_alloc(void);
void bpf_expr_free(struct bpf_expr * expr);
void bpf_expr_init(struct bpf_expr * expr);
int bpf_expr_parse(struct bpf_expr * expr);
int bpf_strtoull(const char * const str, uint64_t * val);
int <API key>(const struct bpf_step * const step);
int bpf_step_set_obj(struct bpf_step * step, const enum bpf_compiler_obj obj);
int <API key>(struct bpf_step * step, const enum bpf_direction dir);
int <API key>(struct bpf_step * step, const enum bpf_arith_ops op);
int bpf_step_set_bit_op(struct bpf_step * step, const enum bpf_bit_ops op);
int bpf_expr_set_step(struct bpf_expr * expr, struct bpf_step * step);
int bpf_step_set_number(struct bpf_step * step, const uint64_t nr);
int bpf_step_set_eth(struct bpf_step * step, const struct ether_addr eth);
int bpf_step_set_in(struct bpf_step * step, const struct in_addr in);
int bpf_step_set_in6(struct bpf_step * step, const struct in6_addr in6);
int bpf_print_step(const struct bpf_step * const step);
int bpf_print_expr(const struct bpf_expr * const expr);
#endif /* __BPF_EXPR_H__ */ |
using HubCrawl.Core;
using HubCrawl.Core.Providers;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using Yuhan.Common.Models;
namespace HubCrawl.Models.Modules
{
[Serializable]
public class HubCrawlModule : HubCrawl.Core.Modules.HubCrawlModule
{
public HubCrawlModule() : base() { }
public HubCrawlModule(Core.Modules.HubCrawlModule module)
: base(module) { }
}
} |
#include <linux/ieee80211.h>
#include <net/mac80211.h>
#include "ieee80211_i.h"
#include "rate.h"
void <API key>(struct <API key> *sband,
struct ieee80211_ht_cap *ht_cap_ie,
struct <API key> *ht_cap)
{
u8 ampdu_info, tx_mcs_set_cap;
int i, max_tx_streams;
BUG_ON(!ht_cap);
memset(ht_cap, 0, sizeof(*ht_cap));
if (!ht_cap_ie)
return;
ht_cap->ht_supported = true;
/*
* The bits listed in this expression should be
* the same for the peer and us, if the station
* advertises more then we can't use those thus
* we mask them out.
*/
ht_cap->cap = le16_to_cpu(ht_cap_ie->cap_info) &
(sband->ht_cap.cap |
~(<API key> |
<API key> |
<API key> |
<API key> |
<API key> |
<API key>));
/*
* The STBC bits are asymmetric -- if we don't have
* TX then mask out the peer's RX and vice versa.
*/
if (!(sband->ht_cap.cap & <API key>))
ht_cap->cap &= ~<API key>;
if (!(sband->ht_cap.cap & <API key>))
ht_cap->cap &= ~<API key>;
ampdu_info = ht_cap_ie->ampdu_params_info;
ht_cap->ampdu_factor =
ampdu_info & <API key>;
ht_cap->ampdu_density =
(ampdu_info & <API key>) >> 2;
/* own MCS TX capabilities */
tx_mcs_set_cap = sband->ht_cap.mcs.tx_params;
/* can we TX with MCS rates? */
if (!(tx_mcs_set_cap & <API key>))
return;
/* Counting from 0, therefore +1 */
if (tx_mcs_set_cap & <API key>)
max_tx_streams =
((tx_mcs_set_cap & <API key>)
>> <API key>) + 1;
else
max_tx_streams = <API key>;
/*
* 802.11n D5.0 20.3.5 / 20.6 says:
* - indices 0 to 7 and 32 are single spatial stream
* - 8 to 31 are multiple spatial streams using equal modulation
* [8..15 for two streams, 16..23 for three and 24..31 for four]
* - remainder are multiple spatial streams using unequal modulation
*/
for (i = 0; i < max_tx_streams; i++)
ht_cap->mcs.rx_mask[i] =
sband->ht_cap.mcs.rx_mask[i] & ht_cap_ie->mcs.rx_mask[i];
if (tx_mcs_set_cap & <API key>)
for (i = <API key>;
i < <API key>; i++)
ht_cap->mcs.rx_mask[i] =
sband->ht_cap.mcs.rx_mask[i] &
ht_cap_ie->mcs.rx_mask[i];
/* handle MCS rate 32 too */
if (sband->ht_cap.mcs.rx_mask[32/8] & ht_cap_ie->mcs.rx_mask[32/8] & 1)
ht_cap->mcs.rx_mask[32/8] |= 1;
}
void <API key>(struct sta_info *sta)
{
int i;
for (i = 0; i < STA_TID_NUM; i++) {
<API key>(sta, i, WLAN_BACK_INITIATOR);
<API key>(sta, i, WLAN_BACK_RECIPIENT,
<API key>);
}
}
void <API key>(struct <API key> *sdata,
const u8 *da, u16 tid,
u16 initiator, u16 reason_code)
{
struct ieee80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *mgmt;
u16 params;
skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom);
if (!skb) {
printk(KERN_ERR "%s: failed to allocate buffer "
"for delba frame\n", sdata->name);
return;
}
skb_reserve(skb, local->hw.extra_tx_headroom);
mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24);
memset(mgmt, 0, 24);
memcpy(mgmt->da, da, ETH_ALEN);
memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
if (sdata->vif.type == NL80211_IFTYPE_AP ||
sdata->vif.type == <API key>)
memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN);
else if (sdata->vif.type == <API key>)
memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN);
mgmt->frame_control = cpu_to_le16(<API key> |
<API key>);
skb_put(skb, 1 + sizeof(mgmt->u.action.u.delba));
mgmt->u.action.category = WLAN_CATEGORY_BACK;
mgmt->u.action.u.delba.action_code = WLAN_ACTION_DELBA;
params = (u16)(initiator << 11); /* bit 11 initiator */
params |= (u16)(tid << 12); /* bit 15:12 TID number */
mgmt->u.action.u.delba.params = cpu_to_le16(params);
mgmt->u.action.u.delba.reason_code = cpu_to_le16(reason_code);
ieee80211_tx_skb(sdata, skb);
}
void <API key>(struct <API key> *sdata,
struct sta_info *sta,
struct ieee80211_mgmt *mgmt, size_t len)
{
u16 tid, params;
u16 initiator;
params = le16_to_cpu(mgmt->u.action.u.delba.params);
tid = (params & <API key>) >> 12;
initiator = (params & <API key>) >> 11;
#ifdef <API key>
if (net_ratelimit())
printk(KERN_DEBUG "delba from %pM (%s) tid %d reason code %d\n",
mgmt->sa, initiator ? "initiator" : "recipient", tid,
le16_to_cpu(mgmt->u.action.u.delba.reason_code));
#endif /* <API key> */
if (initiator == WLAN_BACK_INITIATOR)
<API key>(sta, tid, WLAN_BACK_INITIATOR, 0);
else { /* WLAN_BACK_RECIPIENT */
spin_lock_bh(&sta->lock);
if (sta->ampdu_mlme.tid_state_tx[tid] & <API key>)
<API key>(sta, tid,
WLAN_BACK_RECIPIENT);
spin_unlock_bh(&sta->lock);
}
}
int <API key>(struct <API key> *sdata,
enum ieee80211_smps_mode smps, const u8 *da,
const u8 *bssid)
{
struct ieee80211_local *local = sdata->local;
struct sk_buff *skb;
struct ieee80211_mgmt *action_frame;
/* 27 = header + category + action + smps mode */
skb = dev_alloc_skb(27 + local->hw.extra_tx_headroom);
if (!skb)
return -ENOMEM;
skb_reserve(skb, local->hw.extra_tx_headroom);
action_frame = (void *)skb_put(skb, 27);
memcpy(action_frame->da, da, ETH_ALEN);
memcpy(action_frame->sa, sdata->dev->dev_addr, ETH_ALEN);
memcpy(action_frame->bssid, bssid, ETH_ALEN);
action_frame->frame_control = cpu_to_le16(<API key> |
<API key>);
action_frame->u.action.category = WLAN_CATEGORY_HT;
action_frame->u.action.u.ht_smps.action = WLAN_HT_ACTION_SMPS;
switch (smps) {
case <API key>:
case <API key>:
WARN_ON(1);
case IEEE80211_SMPS_OFF:
action_frame->u.action.u.ht_smps.smps_control =
<API key>;
break;
case <API key>:
action_frame->u.action.u.ht_smps.smps_control =
<API key>;
break;
case <API key>:
action_frame->u.action.u.ht_smps.smps_control =
<API key>;
break;
}
/* we'll do more on status of this frame */
IEEE80211_SKB_CB(skb)->flags |= <API key>;
ieee80211_tx_skb(sdata, skb);
return 0;
} |
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
namespace TNL.Structures
{
using Entities;
using Interfaces;
using Utils;
public class FunctorDecl<T> : IFunctor where T : EventConnection
{
public Delegate MethodDelegate;
public object[] Parameters;
public object[] Arguments;
public Type[] ParamTypes;
public FunctorDecl(string methodName, Type[] paramTypes)
{
var tType = typeof(T);
var method = tType.GetMethod(methodName, BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance);
ParamTypes = paramTypes;
var list = paramTypes.ToList();
list.Insert(0, tType);
MethodDelegate = Delegate.CreateDelegate(Expression.GetActionType(list.ToArray()), method);
}
public void Set(object[] parameters)
{
Parameters = parameters;
}
public void Read(BitStream stream)
{
Arguments = new object[ParamTypes.Length + 1];
for (var i = 0; i < ParamTypes.Length; ++i)
Arguments[1 + i] = ReflectedSerializer.Read(stream, ParamTypes[i]);
}
public void Write(BitStream stream)
{
if (Parameters == null)
return;
foreach (var t in Parameters)
ReflectedSerializer.Write(stream, t, t.GetType());
}
public void Dispatch(object obj)
{
if (MethodDelegate == null || Arguments == null || obj == null || (obj as T) == null)
return;
try
{
Arguments[0] = obj;
MethodDelegate.DynamicInvoke(Arguments);
}
catch (Exception e)
{
Console.WriteLine("Invalid type?? Expected: {0} | Found: {1}", typeof(T).Name, obj.GetType().Name);
Console.WriteLine(e);
}
}
}
} |
/*
Always provide the noop performance interface, for plugins.
*/
#define USE_PSI_V1
#define HAVE_PSI_INTERFACE
#include "my_global.h"
#include "my_pthread.h"
#include "my_sys.h"
#include "mysql/psi/psi.h"
C_MODE_START
#define NNN __attribute__((unused))
static void register_mutex_noop(const char *category NNN,
PSI_mutex_info *info NNN,
int count NNN)
{
return;
}
static void <API key>(const char *category NNN,
PSI_rwlock_info *info NNN,
int count NNN)
{
return;
}
static void register_cond_noop(const char *category NNN,
PSI_cond_info *info NNN,
int count NNN)
{
return;
}
static void <API key>(const char *category NNN,
PSI_thread_info *info NNN,
int count NNN)
{
return;
}
static void register_file_noop(const char *category NNN,
PSI_file_info *info NNN,
int count NNN)
{
return;
}
static void register_stage_noop(const char *category NNN,
PSI_stage_info **info_array NNN,
int count NNN)
{
return;
}
static void <API key>(const char *category NNN,
PSI_statement_info *info NNN,
int count NNN)
{
return;
}
static void <API key>(const char *category NNN,
PSI_socket_info *info NNN,
int count NNN)
{
return;
}
static PSI_mutex*
init_mutex_noop(PSI_mutex_key key NNN, const void *identity NNN)
{
return NULL;
}
static void destroy_mutex_noop(PSI_mutex* mutex NNN)
{
return;
}
static PSI_rwlock*
init_rwlock_noop(PSI_rwlock_key key NNN, const void *identity NNN)
{
return NULL;
}
static void destroy_rwlock_noop(PSI_rwlock* rwlock NNN)
{
return;
}
static PSI_cond*
init_cond_noop(PSI_cond_key key NNN, const void *identity NNN)
{
return NULL;
}
static void destroy_cond_noop(PSI_cond* cond NNN)
{
return;
}
static PSI_socket*
init_socket_noop(PSI_socket_key key NNN, const my_socket *fd NNN)
{
return NULL;
}
static void destroy_socket_noop(PSI_socket* socket NNN)
{
return;
}
static PSI_table_share*
<API key>(my_bool temporary NNN, struct TABLE_SHARE *share NNN)
{
return NULL;
}
static void <API key>(PSI_table_share* share NNN)
{
return;
}
static void
<API key>(my_bool temporary NNN, const char *schema_name NNN,
int schema_name_length NNN, const char *table_name NNN,
int table_name_length NNN)
{
return;
}
static PSI_table*
open_table_noop(PSI_table_share *share NNN, const void *identity NNN)
{
return NULL;
}
static void unbind_table_noop(PSI_table *table NNN)
{
return;
}
static PSI_table*
rebind_table_noop(PSI_table_share *share NNN,
const void *identity NNN,
PSI_table *table NNN)
{
return NULL;
}
static void close_table_noop(PSI_table *table NNN)
{
return;
}
static void create_file_noop(PSI_file_key key NNN,
const char *name NNN, File file NNN)
{
return;
}
static int spawn_thread_noop(PSI_thread_key key NNN,
pthread_t *thread NNN,
const pthread_attr_t *attr NNN,
void *(*start_routine)(void*) NNN, void *arg NNN)
{
return pthread_create(thread, attr, start_routine, arg);
}
static PSI_thread*
new_thread_noop(PSI_thread_key key NNN,
const void *identity NNN, ulong thread_id NNN)
{
return NULL;
}
static void set_thread_id_noop(PSI_thread *thread NNN, unsigned long id NNN)
{
return;
}
static PSI_thread*
get_thread_noop(void NNN)
{
return NULL;
}
static void <API key>(const char *user NNN, int user_len NNN)
{
return;
}
static void <API key>(const char *user NNN, int user_len NNN,
const char *host NNN, int host_len NNN)
{
return;
}
static void set_thread_db_noop(const char* db NNN, int db_len NNN)
{
return;
}
static void <API key>(int command NNN)
{
return;
}
static void <API key>(time_t start_time NNN)
{
return;
}
static void <API key>(const char* state NNN)
{
return;
}
static void <API key>(const char* info NNN, int info_len NNN)
{
return;
}
static void set_thread_noop(PSI_thread* thread NNN)
{
return;
}
static void <API key>(void)
{
return;
}
static void delete_thread_noop(PSI_thread *thread NNN)
{
return;
}
static PSI_file_locker*
<API key>(<API key> *state NNN,
PSI_file_key key NNN,
enum PSI_file_operation op NNN,
const char *name NNN, const void *identity NNN)
{
return NULL;
}
static PSI_file_locker*
<API key>(<API key> *state NNN,
PSI_file *file NNN,
enum PSI_file_operation op NNN)
{
return NULL;
}
static PSI_file_locker*
<API key>(<API key> *state NNN,
File file NNN,
enum PSI_file_operation op NNN)
{
return NULL;
}
static void unlock_mutex_noop(PSI_mutex *mutex NNN)
{
return;
}
static void unlock_rwlock_noop(PSI_rwlock *rwlock NNN)
{
return;
}
static void signal_cond_noop(PSI_cond* cond NNN)
{
return;
}
static void broadcast_cond_noop(PSI_cond* cond NNN)
{
return;
}
static PSI_idle_locker*
<API key>(<API key>* state NNN,
const char *src_file NNN, uint src_line NNN)
{
return NULL;
}
static void end_idle_wait_noop(PSI_idle_locker* locker NNN)
{
return;
}
static PSI_mutex_locker*
<API key>(<API key> *state NNN,
PSI_mutex *mutex NNN,
PSI_mutex_operation op NNN,
const char *src_file NNN, uint src_line NNN)
{
return NULL;
}
static void end_mutex_wait_noop(PSI_mutex_locker* locker NNN, int rc NNN)
{
return;
}
static PSI_rwlock_locker*
<API key>(struct <API key> *state NNN,
struct PSI_rwlock *rwlock NNN,
enum <API key> op NNN,
const char *src_file NNN, uint src_line NNN)
{
return NULL;
}
static void <API key>(PSI_rwlock_locker* locker NNN, int rc NNN)
{
return;
}
static struct PSI_rwlock_locker*
<API key>(struct <API key> *state NNN,
struct PSI_rwlock *rwlock NNN,
enum <API key> op NNN,
const char *src_file NNN, uint src_line NNN)
{
return NULL;
}
static void <API key>(PSI_rwlock_locker* locker NNN, int rc NNN)
{
return;
}
static struct PSI_cond_locker*
<API key>(struct <API key> *state NNN,
struct PSI_cond *cond NNN,
struct PSI_mutex *mutex NNN,
enum PSI_cond_operation op NNN,
const char *src_file NNN, uint src_line NNN)
{
return NULL;
}
static void end_cond_wait_noop(PSI_cond_locker* locker NNN, int rc NNN)
{
return;
}
static struct PSI_table_locker*
<API key>(struct <API key> *state NNN,
struct PSI_table *table NNN,
enum <API key> op NNN,
uint index NNN,
const char *src_file NNN, uint src_line NNN)
{
return NULL;
}
static void <API key>(PSI_table_locker* locker NNN)
{
return;
}
static struct PSI_table_locker*
<API key>(struct <API key> *state NNN,
struct PSI_table *table NNN,
enum <API key> op NNN,
ulong flags NNN,
const char *src_file NNN, uint src_line NNN)
{
return NULL;
}
static void <API key>(PSI_table_locker* locker NNN)
{
return;
}
static PSI_file* <API key>(PSI_file_locker *locker NNN,
const char *src_file NNN,
uint src_line NNN)
{
return NULL;
}
static void <API key>(PSI_file_locker *locker NNN)
{
return;
}
static void <API key>
(PSI_file_locker *locker NNN, File file NNN)
{
return;
}
static void <API key>(PSI_file_locker *locker NNN,
size_t count NNN,
const char *src_file NNN,
uint src_line NNN)
{
return;
}
static void end_file_wait_noop(PSI_file_locker *locker NNN,
size_t count NNN)
{
return;
}
static void start_stage_noop(PSI_stage_key key NNN,
const char *src_file NNN, int src_line NNN)
{
return;
}
static void end_stage_noop(void)
{
return;
}
static <API key>*
<API key>(<API key> *state NNN,
PSI_statement_key key NNN,
const void *charset NNN)
{
return NULL;
}
static <API key>*
<API key>(<API key> *locker NNN,
PSI_statement_key key NNN)
{
return NULL;
}
static void <API key>(<API key> *locker NNN,
const char *db NNN, uint db_len NNN,
const char *src_file NNN, uint src_line NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
const char *text NNN, uint text_len NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulonglong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulonglong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulonglong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN,
ulong count NNN)
{
return;
}
static void <API key>(<API key> *locker NNN)
{
return;
}
static void <API key>(<API key> *locker NNN)
{
return;
}
static void end_statement_noop(<API key> *locker NNN,
void *stmt_da NNN)
{
return;
}
static PSI_socket_locker*
<API key>(<API key> *state NNN,
PSI_socket *socket NNN,
<API key> op NNN,
size_t count NNN,
const char *src_file NNN,
uint src_line NNN)
{
return NULL;
}
static void <API key>(PSI_socket_locker *locker NNN,
size_t count NNN)
{
return;
}
static void <API key>(PSI_socket *socket NNN,
enum PSI_socket_state state NNN)
{
return;
}
static void <API key>(PSI_socket *socket NNN,
const my_socket *fd NNN,
const struct sockaddr *addr NNN,
socklen_t addr_len NNN)
{
return;
}
static void <API key>(PSI_socket *socket NNN)
{
return;
}
static struct PSI_digest_locker*
digest_start_noop(<API key> *locker NNN)
{
return NULL;
}
static PSI_digest_locker*
<API key>(PSI_digest_locker *locker NNN,
uint token NNN,
struct OPAQUE_LEX_YYSTYPE *yylval NNN)
{
return NULL;
}
static PSI PSI_noop=
{
register_mutex_noop,
<API key>,
register_cond_noop,
<API key>,
register_file_noop,
register_stage_noop,
<API key>,
<API key>,
init_mutex_noop,
destroy_mutex_noop,
init_rwlock_noop,
destroy_rwlock_noop,
init_cond_noop,
destroy_cond_noop,
init_socket_noop,
destroy_socket_noop,
<API key>,
<API key>,
<API key>,
open_table_noop,
unbind_table_noop,
rebind_table_noop,
close_table_noop,
create_file_noop,
spawn_thread_noop,
new_thread_noop,
set_thread_id_noop,
get_thread_noop,
<API key>,
<API key>,
set_thread_db_noop,
<API key>,
<API key>,
<API key>,
<API key>,
set_thread_noop,
<API key>,
delete_thread_noop,
<API key>,
<API key>,
<API key>,
unlock_mutex_noop,
unlock_rwlock_noop,
signal_cond_noop,
broadcast_cond_noop,
<API key>,
end_idle_wait_noop,
<API key>,
end_mutex_wait_noop,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
end_cond_wait_noop,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
end_file_wait_noop,
start_stage_noop,
end_stage_noop,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
end_statement_noop,
<API key>,
<API key>,
<API key>,
<API key>,
<API key>,
digest_start_noop,
<API key>
};
/**
Hook for the instrumentation interface.
Code implementing the instrumentation interface should register here.
*/
struct PSI_bootstrap *PSI_hook= NULL;
/**
Instance of the instrumentation interface for the MySQL server.
@todo This is currently a global variable, which is handy when
compiling instrumented code that is bundled with the server.
When dynamic plugin are truly supported, this variable will need
to be replaced by a macro, so that each XYZ plugin can have it's own
xyz_psi_server variable, obtained from PSI_bootstrap::get_interface()
with the version used at compile time for plugin XYZ.
*/
PSI *PSI_server= & PSI_noop;
void set_psi_server(PSI *psi)
{
PSI_server= psi;
}
C_MODE_END |
#if 0
#include "Mp_Precomp.h"
#endif
#include "../odm_precomp.h"
#if (RTL8188E_SUPPORT == 1)
#if(DM_ODM_SUPPORT_TYPE & (ODM_AP))
u1Byte Array_8188E_FW_AP[] = {
};
u4Byte <API key> = 0;
void
<API key>(
IN PDM_ODM_T pDM_Odm,
OUT u1Byte *pFirmware,
OUT u4Byte *pFirmwareSize
)
{
ODM_MoveMemory(pDM_Odm, pFirmware, Array_8188E_FW_AP, <API key>);
*pFirmwareSize = <API key>;
}
#else
#if 0
u1Byte Array_8188E_FW_NIC[] = {
};
u4Byte <API key> = 0;
void
<API key>(
IN PDM_ODM_T pDM_Odm,
OUT u1Byte *pFirmware,
OUT u4Byte *pFirmwareSize
)
{
ODM_MoveMemory(pDM_Odm, pFirmware, Array_8188E_FW_NIC, <API key>);
*pFirmwareSize = <API key>;
}
#endif
const u8 <API key>[] = {
0xE1, 0x88, 0x30, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x05, 0x23, 0x15, 0x34, 0x1E, 0x3E, 0x00, 0x00,
0xD3, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x02, 0x46, 0xD5, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xE1, 0xF8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0xE1, 0x6F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x4F, 0xE9, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 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02, 0x71, 0x66,
0xE5, 0x43, 0x30, 0xE0, 0x02, 0x11, 0x90, 0xE5, 0x43, 0x30, 0xE1, 0x03, 0x12, 0x5B, 0x2A, 0xE5,
0x43, 0x30, 0xE2, 0x03, 0x12, 0x5A, 0x72, 0xE5, 0x43, 0x30, 0xE3, 0x02, 0xF1, 0x53, 0xE5, 0x43,
0x30, 0xE4, 0x02, 0xF1, 0x97, 0xE5, 0x43, 0x30, 0xE5, 0x02, 0x91, 0x36, 0xE5, 0x43, 0x30, 0xE6,
0x02, 0xF1, 0x38, 0xE5, 0x44, 0x30, 0xE1, 0x02, 0x71, 0x7A, 0x74, 0xF8, 0x04, 0x90, 0x01, 0xC4,
0xF0, 0x74, 0x47, 0xA3, 0xF0, 0xD0, 0x07, 0xD0, 0x06, 0xD0, 0x05, 0xD0, 0x04, 0xD0, 0x03, 0xD0,
0x02, 0xD0, 0x01, 0xD0, 0x00, 0xD0, 0xD0, 0xD0, 0x82, 0xD0, 0x83, 0xD0, 0xF0, 0xD0, 0xE0, 0x32,
0xE4, 0xFF, 0x90, 0x81, 0x3B, 0xE0, 0x60, 0x77, 0x90, 0x80, 0xF7, 0xE0, 0x64, 0x01, 0x70, 0x6F,
0x90, 0x81, 0x3A, 0xE0, 0xC4, 0x54, 0x0F, 0x60, 0x24, 0x24, 0xFE, 0x60, 0x03, 0x04, 0x70, 0x1F,
0x90, 0x81, 0x42, 0xE0, 0x14, 0xF0, 0xE0, 0xFE, 0x60, 0x06, 0x90, 0x81, 0x44, 0xE0, 0x60, 0x0F,
0xEE, 0x70, 0x06, 0x90, 0x81, 0x41, 0xE0, 0xA3, 0xF0, 0x7F, 0x01, 0x80, 0x02, 0x7F, 0x01, 0xEF,
0x60, 0x3D, 0x90, 0x81, 0x3F, 0xE0, 0x44, 0x10, 0xF0, 0x90, 0x81, 0x44, 0xE0, 0x60, 0x03, 0xB4,
0x01, 0x09, 0xE4, 0xF5, 0x1D, 0x90, 0x81, 0x44, 0xE0, 0x80, 0x0D, 0xE4, 0xF5, 0x1D, 0x90, 0x81,
0x44, 0xE0, 0x75, 0xF0, 0x03, 0xA4, 0x24, 0xFE, 0xFF, 0x90, 0x81, 0x43, 0xE0, 0x2F, 0xD1, 0xD4,
0x90, 0x01, 0x57, 0x74, 0x05, 0xF0, 0x90, 0x81, 0x3E, 0xE0, 0x20, 0xE2, 0x02, 0x31, 0x10, 0x22,
0x7D, 0x01, 0x7F, 0x04, 0xD3, 0x10, 0xAF, 0x01, 0xC3, 0xC0, 0xD0, 0x90, 0x83, 0x7B, 0xED, 0xF0,
0x90, 0x81, 0x38, 0xE0, 0xFE, 0xC4, 0x13, 0x13, 0x54, 0x03, 0x30, 0xE0, 0x02, 0x41, 0x5D, 0xEE,
0xC4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x30, 0xE0, 0x02, 0x41, 0x5D, 0x90, 0x81, 0x3E, 0xE0, 0xFE,
0x6F, 0x70, 0x02, 0x41, 0x5D, 0xEF, 0x70, 0x02, 0x21, 0xD4, 0x24, 0xFE, 0x70, 0x02, 0x41, 0x0E,
0x24, 0xFE, 0x60, 0x48, 0x24, 0xFC, 0x70, 0x02, 0x41, 0x48, 0x24, 0xFC, 0x60, 0x02, 0x41, 0x5D,
0xEE, 0xB4, 0x0E, 0x02, 0x51, 0xCE, 0x90, 0x81, 0x3E, 0xE0, 0x70, 0x04, 0x7F, 0x01, 0x51, 0xF6,
0x90, 0x81, 0x3E, 0xE0, 0xB4, 0x06, 0x02, 0x51, 0xA8, 0x90, 0x81, 0x3E, 0xE0, 0xB4, 0x04, 0x0E,
0x90, 0x83, 0x7B, 0xE0, 0xFF, 0x60, 0x05, 0x12, 0x72, 0x4B, 0x80, 0x02, 0xF1, 0xD6, 0x90, 0x81,
0x3E, 0xE0, 0x64, 0x08, 0x60, 0x02, 0x41, 0x5D, 0x71, 0x99, 0x41, 0x5D, 0x90, 0x81, 0x3E, 0xE0,
0x70, 0x04, 0x7F, 0x01, 0x51, 0xF6, 0x90, 0x81, 0x3E, 0xE0, 0xB4, 0x06, 0x02, 0x51, 0xA8, 0x90,
0x81, 0x3E, 0xE0, 0xB4, 0x0E, 0x07, 0x51, 0x62, 0xBF, 0x01, 0x02, 0x51, 0xCE, 0x90, 0x81, 0x3E,
0xE0, 0x64, 0x0C, 0x60, 0x02, 0x41, 0x5D, 0x51, 0x62, 0xEF, 0x64, 0x01, 0x60, 0x02, 0x41, 0x5D,
0x71, 0x0F, 0x41, 0x5D, 0x90, 0x81, 0x3E, 0xE0, 0xB4, 0x0E, 0x07, 0x51, 0x62, 0xBF, 0x01, 0x02,
0x51, 0xCE, 0x90, 0x81, 0x3E, 0xE0, 0xB4, 0x06, 0x02, 0x51, 0xA8, 0x90, 0x81, 0x3E, 0xE0, 0xB4,
0x0C, 0x07, 0x51, 0x62, 0xBF, 0x01, 0x02, 0x71, 0x0F, 0x90, 0x81, 0x3E, 0xE0, 0x64, 0x04, 0x70,
0x5C, 0x12, 0x71, 0x9B, 0xEF, 0x64, 0x01, 0x70, 0x54, 0x12, 0x50, 0xD7, 0x80, 0x4F, 0x90, 0x81,
0x3E, 0xE0, 0xB4, 0x0E, 0x07, 0x51, 0x62, 0xBF, 0x01, 0x02, 0x51, 0xCE, 0x90, 0x81, 0x3E, 0xE0,
0xB4, 0x06, 0x02, 0x51, 0xA8, 0x90, 0x81, 0x3E, 0xE0, 0xB4, 0x0C, 0x07, 0x51, 0x62, 0xBF, 0x01,
0x02, 0x71, 0x0F, 0x90, 0x81, 0x3E, 0xE0, 0x70, 0x04, 0x7F, 0x01, 0x51, 0xF6, 0x90, 0x81, 0x3E,
0xE0, 0xB4, 0x04, 0x19, 0xF1, 0xC9, 0x80, 0x15, 0x90, 0x81, 0x3E, 0xE0, 0xB4, 0x0C, 0x0E, 0x90,
0x81, 0x39, 0xE0, 0xFF, 0x13, 0x13, 0x54, 0x3F, 0x30, 0xE0, 0x02, 0x71, 0x83, 0xD0, 0xD0, 0x92,
0xAF, 0x22, 0x12, 0x71, 0x82, 0xEF, 0x64, 0x01, 0x60, 0x08, 0x90, 0x01, 0xB8, 0x74, 0x01, 0xF0,
0x80, 0x2D, 0x90, 0x81, 0x38, 0xE0, 0x13, 0x13, 0x13, 0x54, 0x1F, 0x30, 0xE0, 0x08, 0x90, 0x01,
0xB8, 0x74, 0x02, 0xF0, 0x80, 0x19, 0x90, 0x81, 0x3D, 0xE0, 0xD3, 0x94, 0x04, 0x40, 0x08, 0x90,
0x01, 0xB8, 0x74, 0x08, 0xF0, 0x80, 0x08, 0x90, 0x01, 0xB8, 0xE4, 0xF0, 0x7F, 0x01, 0x22, 0x90,
0x01, 0xB9, 0x74, 0x02, 0xF0, 0x7F, 0x00, 0x22, 0x90, 0x81, 0x39, 0xE0, 0x90, 0x06, 0x04, 0x20,
0xE0, 0x0C, 0xE0, 0x44, 0x40, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x04, 0xF0, 0x80, 0x0A, 0xE0, 0x54,
0x7F, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x0C, 0xF0, 0x90, 0x05, 0x22, 0xE4, 0xF0, 0x22, 0x90, 0x81,
0x39, 0xE0, 0xC3, 0x13, 0x20, 0xE0, 0x08, 0x90, 0x81, 0x3E, 0x74, 0x0C, 0xF0, 0x80, 0x11, 0x90,
0x06, 0x04, 0xE0, 0x44, 0x40, 0xF0, 0xE0, 0x44, 0x80, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x04, 0xF0,
0x90, 0x05, 0x22, 0xE4, 0xF0, 0x22, 0x90, 0x83, 0x7A, 0xEF, 0xF0, 0x71, 0xA7, 0x90, 0x83, 0x7A,
0xE0, 0x60, 0x05, 0x90, 0x05, 0x22, 0xE4, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x04, 0xF0, 0x22, 0x90,
0x80, 0xF7, 0xE0, 0x64, 0x01, 0x70, 0x2D, 0x90, 0x81, 0x39, 0xE0, 0x54, 0xFD, 0xF0, 0x90, 0x05,
0x22, 0x74, 0x6F, 0xF0, 0x7F, 0x01, 0x91, 0x52, 0xBF, 0x01, 0x0E, 0x90, 0x81, 0x38, 0xE0, 0x44,
0x80, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x0E, 0xF0, 0x22, 0x90, 0x01, 0xB9, 0x74, 0x01, 0xF0, 0x90,
0x01, 0xB8, 0x04, 0xF0, 0x22, 0x90, 0x81, 0x3B, 0xE0, 0x64, 0x01, 0x70, 0x18, 0x90, 0x81, 0x3A,
0xE0, 0x54, 0x0F, 0x60, 0x08, 0xE4, 0xFD, 0x7F, 0x0C, 0x31, 0x14, 0x81, 0x8E, 0x90, 0x81, 0x3E,
0xE0, 0x70, 0x02, 0x31, 0x10, 0x22, 0x12, 0x6A, 0x5F, 0x7F, 0x02, 0x8F, 0x1F, 0x7F, 0x02, 0x12,
0x46, 0x53, 0x90, 0x80, 0x01, 0xE0, 0x45, 0x1F, 0xF0, 0x22, 0x90, 0x81, 0x3B, 0xE0, 0x60, 0x02,
0x71, 0x45, 0x22, 0x12, 0x5C, 0xC1, 0x90, 0x81, 0x3E, 0x74, 0x08, 0xF0, 0x22, 0x90, 0x81, 0x53,
0xE0, 0x30, 0xE0, 0x04, 0x7F, 0x10, 0x71, 0x6B, 0x22, 0x71, 0xA7, 0x90, 0x05, 0x22, 0xE4, 0xF0,
0x90, 0x81, 0x3E, 0x74, 0x0C, 0xF0, 0x22, 0xD3, 0x10, 0xAF, 0x01, 0xC3, 0xC0, 0xD0, 0x90, 0x01,
0x01, 0xE0, 0x44, 0x02, 0xF0, 0x90, 0x01, 0x00, 0x74, 0xFF, 0xF0, 0x90, 0x06, 0xB7, 0x74, 0x09,
0xF0, 0x90, 0x06, 0xB4, 0x74, 0x86, 0xF0, 0x7F, 0x7C, 0x7E, 0x08, 0x12, 0x2D, 0x5C, 0xEC, 0x54,
0x7F, 0xFC, 0x90, 0x83, 0x61, 0x12, 0x20, 0xCE, 0x90, 0x83, 0x61, 0x12, 0x42, 0x26, 0x90, 0x85,
0xBB, 0x12, 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x13, 0x54, 0x03, 0x30, 0xE0,
0x27, 0xEF, 0x54, 0xBF, 0xF0, 0x90, 0x04, 0xE0, 0xE0, 0x90, 0x81, 0x39, 0x30, 0xE0, 0x06, 0xE0,
0x44, 0x01, 0xF0, 0x80, 0x10, 0xE0, 0x54, 0xFE, 0xF0, 0x90, 0x01, 0xB9, 0x74, 0x01, 0xF0, 0x90,
0x01, 0xB8, 0x74, 0x04, 0xF0, 0x12, 0x4E, 0x3A, 0xE4, 0xFF, 0x90, 0x82, 0x68, 0xE0, 0x30, 0xE0,
0x48, 0x90, 0x82, 0x6C, 0xE0, 0xFD, 0x60, 0x41, 0x74, 0x01, 0x7E, 0x00, 0xA8, 0x07, 0x08, 0x80,
0x05, 0xC3, 0x33, 0xCE, 0x33, 0xCE, 0xD8, 0xF9, 0xFF, 0x90, 0x04, 0xE0, 0xE0, 0xFB, 0xEF, 0x5B,
0x60, 0x06, 0xE4, 0x90, 0x82, 0x6C, 0xF0, 0x22, 0x90, 0x82, 0x6A, 0xE0, 0xD3, 0x9D, 0x50, 0x10,
0x90, 0x01, 0xC7, 0x74, 0x10, 0xF0, 0x31, 0x7A, 0x90, 0x82, 0x68, 0xE0, 0x54, 0xFE, 0xF0, 0x22,
0x12, 0x4F, 0xC5, 0x90, 0x82, 0x6C, 0xE0, 0x04, 0xF0, 0x22, 0x90, 0x80, 0x05, 0xE0, 0x64, 0x02,
0x70, 0x4B, 0x90, 0x81, 0x55, 0xE0, 0xFF, 0xC4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x30, 0xE0, 0x08,
0x90, 0x01, 0x4D, 0xE0, 0x64, 0x80, 0xF0, 0x22, 0x90, 0x81, 0x54, 0xE0, 0xFE, 0xC4, 0x13, 0x54,
0x07, 0x30, 0xE0, 0x13, 0xEF, 0x54, 0x7F, 0xFF, 0xE4, 0xFD, 0x31, 0xD5, 0x90, 0x81, 0x55, 0xE0,
0x54, 0x7F, 0xFF, 0x7D, 0x01, 0x80, 0x14, 0x90, 0x81, 0x55, 0xE0, 0x54, 0x7F, 0xFF, 0x7D, 0x01,
0x31, 0xD5, 0x90, 0x81, 0x55, 0xE0, 0x54, 0x7F, 0xFF, 0xE4, 0xFD, 0x80, 0x08, 0x90, 0x06, 0x90,
0xE0, 0x44, 0x01, 0xF0, 0x22, 0xD3, 0x10, 0xAF, 0x01, 0xC3, 0xC0, 0xD0, 0x90, 0x83, 0x72, 0xED,
0xF0, 0x90, 0x83, 0x71, 0xEF, 0xF0, 0xD3, 0x94, 0x07, 0x50, 0x70, 0xE0, 0xFF, 0x74, 0x01, 0xA8,
0x07, 0x08, 0x80, 0x02, 0xC3, 0x33, 0xD8, 0xFC, 0xF4, 0xFF, 0x90, 0x00, 0x47, 0xE0, 0x5F, 0xFD,
0x7F, 0x47, 0x12, 0x32, 0x1E, 0x90, 0x83, 0x71, 0xE0, 0xFF, 0x74, 0x01, 0xA8, 0x07, 0x08, 0x80,
0x02, 0xC3, 0x33, 0xD8, 0xFC, 0xFF, 0x90, 0x00, 0x46, 0xE0, 0x4F, 0xFD, 0x7F, 0x46, 0x12, 0x32,
0x1E, 0x90, 0x83, 0x72, 0xE0, 0x60, 0x18, 0x90, 0x83, 0x71, 0xE0, 0xFF, 0x74, 0x01, 0xA8, 0x07,
0x08, 0x80, 0x02, 0xC3, 0x33, 0xD8, 0xFC, 0xFF, 0x90, 0x00, 0x45, 0xE0, 0x4F, 0x80, 0x17, 0x90,
0x83, 0x71, 0xE0, 0xFF, 0x74, 0x01, 0xA8, 0x07, 0x08, 0x80, 0x02, 0xC3, 0x33, 0xD8, 0xFC, 0xF4,
0xFF, 0x90, 0x00, 0x45, 0xE0, 0x5F, 0xFD, 0x7F, 0x45, 0x80, 0x7E, 0x90, 0x83, 0x71, 0xE0, 0x24,
0xF8, 0xF0, 0xE0, 0x24, 0x04, 0xFF, 0x74, 0x01, 0xA8, 0x07, 0x08, 0x80, 0x02, 0xC3, 0x33, 0xD8,
0xFC, 0xF4, 0xFF, 0x90, 0x00, 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x78, 0xEE, 0x7C, 0x82, 0x7D, 0x01, 0x7B, 0x01, 0x7A, 0x81, 0x79, 0x6C,
0x7E, 0x00, 0x7F, 0x04, 0x12, 0x44, 0x08, 0xEF, 0x90, 0x06, 0x30, 0x70, 0x1E, 0xE0, 0x44, 0x01,
0x54, 0xDF, 0xF0, 0x7B, 0x01, 0x7A, 0x82, 0x79, 0xE4, 0x90, 0x82, 0xF6, 0x12, 0x42, 0x53, 0xE4,
0x90, 0x82, 0xF9, 0xF0, 0x7A, 0x82, 0x79, 0xEA, 0x02, 0x6E, 0xB8, 0xE0, 0x44, 0x21, 0x54, 0xEF,
0xF0, 0x22, 0x7F, 0x01, 0x22, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF, 0x90, 0x02, 0x84, 0xEF, 0xF0, 0xEE,
0xA3, 0xF0, 0xA3, 0xE0, 0x44, 0x01, 0xF0, 0x22, 0xEF, 0x90, 0x01, 0xC7, 0xB4, 0xA0, 0x05, 0x74,
0x04, 0xF0, 0x80, 0x03, 0x74, 0x08, 0xF0, 0x90, 0x81, 0x58, 0xE0, 0x44, 0x01, 0xF0, 0x22, 0x90,
0x00, 0xF7, 0xE0, 0x20, 0xE7, 0x09, 0xE0, 0x7F, 0x01, 0x20, 0xE6, 0x0C, 0x7F, 0x02, 0x22, 0x90,
0x00, 0xF7, 0xE0, 0x30, 0xE6, 0x02, 0x7F, 0x03, 0x22, 0x12, 0x57, 0xEF, 0x90, 0x80, 0x05, 0xEF,
0xF0, 0x11, 0x1C, 0x90, 0x01, 0x64, 0x74, 0x01, 0xF0, 0x02, 0x2D, 0xA7, 0x11, 0x87, 0x11, 0xB7,
0x11, 0x49, 0x11, 0x68, 0xE4, 0xF5, 0x35, 0xF5, 0x36, 0xF5, 0x37, 0xF5, 0x38, 0xAD, 0x35, 0x7F,
0x50, 0x12, 0x32, 0x1E, 0xAD, 0x36, 0x7F, 0x51, 0x12, 0x32, 0x1E, 0xAD, 0x37, 0x7F, 0x52, 0x12,
0x32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 0x54, 0xFD, 0xF0, 0x22, 0xEF, 0x60, 0x57, 0x90, 0x04, 0xEC, 0xE0, 0x54, 0xDD,
0xF0, 0x90, 0x82, 0x57, 0xE0, 0xFF, 0x60, 0x02, 0x51, 0x32, 0x90, 0x01, 0xC7, 0xE4, 0xF0, 0x90,
0x01, 0x17, 0xE0, 0xFE, 0x90, 0x01, 0x16, 0xE0, 0x7C, 0x00, 0x24, 0x00, 0xFF, 0xEC, 0x3E, 0x90,
0x80, 0xF5, 0xF0, 0xA3, 0xEF, 0xF0, 0x90, 0x06, 0x09, 0xE0, 0x54, 0xFE, 0xF0, 0x91, 0xC1, 0x90,
0x02, 0x86, 0xE0, 0x44, 0x04, 0xF0, 0x91, 0x86, 0xF1, 0x44, 0x12, 0x4B, 0xA7, 0x90, 0x05, 0x22,
0xE4, 0xF0, 0x12, 0x76, 0x6B, 0x90, 0x01, 0x34, 0x74, 0x08, 0xF0, 0xFD, 0xE4, 0xFF, 0x02, 0x50,
0xC2, 0x90, 0x04, 0xEC, 0xE0, 0x44, 0x22, 0xF0, 0x7D, 0x08, 0xE4, 0xFF, 0x51, 0x5A, 0x90, 0x06,
0x90, 0xE0, 0x54, 0xF0, 0xF0, 0x90, 0x02, 0x86, 0xE0, 0x54, 0xFB, 0xF0, 0x91, 0x34, 0xF1, 0x45,
0x21, 0x59, 0xD1, 0x19, 0x7E, 0x00, 0x74, 0x00, 0x2F, 0xF9, 0xE4, 0x34, 0xFC, 0x75, 0x13, 0x01,
0xF5, 0x14, 0x89, 0x15, 0x75, 0x16, 0x08, 0x7B, 0x01, 0x7A, 0x81, 0x79, 0x71, 0x02, 0x2B, 0xED,
0x7D, 0x02, 0x7F, 0x02, 0x51, 0x5A, 0x7D, 0x01, 0x7F, 0x02, 0x74, 0x3D, 0x2F, 0xF8, 0xE6, 0xFE,
0xED, 0xF4, 0x5E, 0xFE, 0xF6, 0x74, 0x30, 0x2F, 0xF5, 0x82, 0xE4, 0x34, 0x01, 0xF5, 0x83, 0xEE,
0xF0, 0x22, 0x90, 0x82, 0x6D, 0xE0, 0x04, 0xF0, 0x90, 0x81, 0x3E, 0xE0, 0x64, 0x02, 0x60, 0x28,
0x71, 0x7B, 0x90, 0x81, 0x39, 0xE0, 0x13, 0x13, 0x13, 0x54, 0x1F, 0x30, 0xE0, 0x14, 0x90, 0x81,
0x41, 0xE0, 0xFF, 0xA3, 0xE0, 0x6F, 0x70, 0x0A, 0x91, 0x10, 0x51, 0x50, 0x90, 0x81, 0x42, 0xE0,
0x14, 0xF0, 0x90, 0x01, 0xE6, 0xE0, 0x04, 0xF0, 0x22, 0xEF, 0x70, 0x33, 0x7D, 0x78, 0x7F, 0x02,
0x51, 0x5A, 0x7D, 0x02, 0x7F, 0x03, 0x51, 0x5A, 0x7D, 0xC8, 0x7F, 0x02, 0xF1, 0xB3, 0x90, 0x01,
0x57, 0xE4, 0xF0, 0x90, 0x01, 0x3C, 0x74, 0x02, 0xF0, 0x7D, 0x01, 0x7F, 0x0C, 0x12, 0x49, 0x14,
0x90, 0x81, 0x38, 0xE0, 0x54, 0xF7, 0xF0, 0x90, 0x06, 0x0A, 0xE0, 0x54, 0xF8, 0xF0, 0x22, 0x90,
0x01, 0x36, 0x74, 0x78, 0xF0, 0xA3, 0x74, 0x02, 0xF0, 0x7D, 0x78, 0xFF, 0x12, 0x50, 0xC2, 0x7D,
0x02, 0x7F, 0x03, 0x12, 0x50, 0xC2, 0x90, 0x06, 0x0A, 0xE0, 0x44, 0x07, 0xF0, 0x90, 0x81, 0x46,
0xA3, 0xE0, 0x90, 0x05, 0x58, 0xF0, 0x90, 0x80, 0xF7, 0xE0, 0xB4, 0x01, 0x15, 0x90, 0x81, 0x39,
0xE0, 0x54, 0xFB, 0xF0, 0x90, 0x81, 0x3E, 0xE0, 0x20, 0xE2, 0x0E, 0x7D, 0x01, 0x7F, 0x04, 0x02,
0x49, 0x14, 0x90, 0x81, 0x39, 0xE0, 0x44, 0x04, 0xF0, 0x22, 0x90, 0x81, 0x3B, 0xE0, 0x60, 0x45,
0x90, 0x81, 0x39, 0xE0, 0xFF, 0x13, 0x13, 0x13, 0x54, 0x1F, 0x30, 0xE0, 0x12, 0x90, 0x01, 0x3B,
0xE0, 0x30, 0xE4, 0x0B, 0x51, 0x50, 0x90, 0x81, 0x41, 0xE0, 0x14, 0x90, 0x05, 0x73, 0xF0, 0x90,
0x83, 0x6B, 0xE4, 0x75, 0xF0, 0x01, 0x12, 0x41, 0xF6, 0xC3, 0x90, 0x83, 0x6C, 0xE0, 0x94, 0x80,
0x90, 0x83, 0x6B, 0xE0, 0x64, 0x80, 0x94, 0x80, 0x40, 0x0B, 0x90, 0x01, 0x98, 0xE0, 0x54, 0xFE,
0xF0, 0xE0, 0x44, 0x01, 0xF0, 0x12, 0x76, 0xA3, 0x02, 0x50, 0x8C, 0x90, 0x80, 0xF7, 0xE0, 0x64,
0x01, 0x60, 0x02, 0x81, 0x0F, 0x90, 0x81, 0x3B, 0xE0, 0x70, 0x02, 0x81, 0x0F, 0x90, 0x81, 0x3A,
0xE0, 0xC4, 0x54, 0x0F, 0x64, 0x01, 0x70, 0x22, 0x90, 0x06, 0xAB, 0xE0, 0x90, 0x81, 0x42, 0xF0,
0x90, 0x06, 0xAA, 0xE0, 0x90, 0x81, 0x41, 0xF0, 0xA3, 0xE0, 0xFF, 0x70, 0x08, 0x90, 0x81, 0x41,
0xE0, 0xFE, 0xFF, 0x80, 0x00, 0x90, 0x81, 0x42, 0xEF, 0xF0, 0x90, 0x81, 0x39, 0xE0, 0x44, 0x04,
0xF0, 0xE4, 0x90, 0x81, 0x44, 0xF0, 0x90, 0x81, 0x46, 0xA3, 0xE0, 0x90, 0x05, 0x58, 0xF0, 0x90,
0x01, 0x57, 0xE4, 0xF0, 0x90, 0x01, 0x3C, 0x74, 0x02, 0xF0, 0x90, 0x81, 0x3F, 0xE0, 0x54, 0xFD,
0xF0, 0x54, 0xEF, 0xF0, 0x90, 0x81, 0x3A, 0xE0, 0xFF, 0xC4, 0x54, 0x0F, 0x24, 0xFD, 0x50, 0x02,
0x80, 0x03, 0x12, 0x4E, 0x43, 0x90, 0x81, 0x39, 0xE0, 0x13, 0x13, 0x13, 0x54, 0x1F, 0x30, 0xE0,
0x0E, 0x90, 0x81, 0x41, 0xE0, 0xFF, 0xA3, 0xE0, 0xB5, 0x07, 0x04, 0x91, 0x10, 0x51, 0x56, 0x22,
0xEF, 0x14, 0x90, 0x05, 0x73, 0xF0, 0x90, 0x01, 0x3F, 0x74, 0x10, 0xF0, 0xFD, 0x7F, 0x03, 0x74,
0x45, 0x2F, 0xF8, 0xE6, 0x4D, 0xFE, 0xF6, 0x74, 0x38, 0x2F, 0xF5, 0x82, 0xE4, 0x34, 0x01, 0xF5,
0x83, 0xEE, 0xF0, 0x22, 0x31, 0x7F, 0x90, 0x01, 0x3F, 0x74, 0x04, 0xF0, 0x90, 0x80, 0x05, 0xE0,
0xFF, 0xB4, 0x01, 0x07, 0x90, 0xFD, 0x00, 0xE0, 0x54, 0xEF, 0xF0, 0xEF, 0xB4, 0x01, 0x07, 0x90,
0xFE, 0x10, 0xE0, 0x54, 0xFB, 0xF0, 0x22, 0x90, 0x82, 0xCF, 0x12, 0x42, 0x53, 0xF1, 0x90, 0x90,
0x81, 0x3B, 0xE0, 0xFF, 0x51, 0xA9, 0x90, 0x81, 0x3B, 0xE0, 0x60, 0x19, 0x90, 0x82, 0xCF, 0x12,
0x42, 0x4A, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0x54, 0x0F, 0xFF, 0x90, 0x00, 0x02, 0x12, 0x1F,
0xBD, 0xFD, 0x12, 0x72, 0x1A, 0x22, 0x12, 0x57, 0xC2, 0xAD, 0x07, 0xEF, 0x64, 0x01, 0x60, 0x20,
0x90, 0x81, 0x58, 0xE0, 0x44, 0x01, 0xF0, 0xED, 0xB4, 0x02, 0x08, 0x90, 0x01, 0xC7, 0x74, 0x40,
0xF0, 0x80, 0x0A, 0xED, 0xB4, 0x04, 0x06, 0x90, 0x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E0, 0xFF, 0x90, 0x83, 0x57, 0x12, 0x42,
0x4A, 0x90, 0x83, 0x5B, 0xE0, 0x7C, 0x00, 0x29, 0xF9, 0xEC, 0x3A, 0xFA, 0xC3, 0xE9, 0x9F, 0xF9,
0xEA, 0x94, 0x00, 0xFA, 0x75, 0x13, 0x01, 0x75, 0x14, 0x81, 0x75, 0x15, 0x71, 0xA3, 0xE0, 0xF5,
0x16, 0x12, 0x2B, 0xED, 0x22, 0xD3, 0x10, 0xAF, 0x01, 0xC3, 0xC0, 0xD0, 0xEF, 0x20, 0xE0, 0x05,
0x90, 0x82, 0x55, 0x80, 0x03, 0x90, 0x82, 0x56, 0xE0, 0x90, 0x81, 0x70, 0xF0, 0x90, 0x81, 0x70,
0xE0, 0x14, 0x60, 0x13, 0x14, 0x60, 0x14, 0x24, 0xFE, 0x60, 0x10, 0x14, 0x60, 0x09, 0x14, 0x60,
0x06, 0x24, 0x06, 0xE4, 0xFE, 0x80, 0x06, 0x7E, 0x04, 0x80, 0x02, 0x7E, 0x08, 0xAF, 0x06, 0xD0,
0xD0, 0x92, 0xAF, 0x22, 0x22, 0x22, 0xE4, 0x90, 0x80, 0xF7, 0xF0, 0x22, 0x90, 0x82, 0xCF, 0xEF,
0xF0, 0x22, 0x90, 0x82, 0xCF, 0xEF, 0xF0, 0x22, 0x75, 0xE8, 0x03, 0x75, 0xA8, 0x84, 0x22, 0x90,
0x01, 0xE4, 0x74, 0x0D, 0xF0, 0xA3, 0xE4, 0xF0, 0x22, 0xE4, 0x90, 0x80, 0x01, 0xF0, 0xA3, 0xF0,
0xA3, 0xF0, 0xA3, 0xF0, 0x22, 0x90, 0x01, 0x94, 0xE0, 0x44, 0x01, 0xF0, 0x90, 0x01, 0xC7, 0xE4,
0xF0, 0x22, 0xE4, 0x90, 0x80, 0xF3, 0xF0, 0xA3, 0xF0, 0x90, 0x80, 0x5B, 0xF0, 0xA3, 0xF0, 0x22,
0x90, 0x81, 0x38, 0xE0, 0x54, 0xFB, 0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 0x01, 0x04, 0x74, 0xF4, 0x80, 0x0E, 0xEF, 0xB4, 0x02, 0x04, 0x74, 0xF8,
0x80, 0x06, 0xEF, 0xB4, 0x03, 0x0C, 0x74, 0xFC, 0x2D, 0xF5, 0x82, 0xE4, 0x34, 0x02, 0xF5, 0x83,
0xEB, 0xF0, 0x22, 0x90, 0x81, 0x38, 0xE0, 0x30, 0xE0, 0x02, 0x31, 0xED, 0x22, 0x90, 0x81, 0x3E,
0xE0, 0xFF, 0x60, 0x03, 0xB4, 0x08, 0x0D, 0x51, 0xF1, 0xBF, 0x01, 0x08, 0x51, 0x05, 0x90, 0x01,
0xE5, 0xE0, 0x04, 0xF0, 0x22, 0xD3, 0x10, 0xAF, 0x01, 0xC3, 0xC0, 0xD0, 0x51, 0x7D, 0x51, 0x15,
0xD0, 0xD0, 0x92, 0xAF, 0x22, 0x51, 0xC2, 0x90, 0x00, 0x08, 0xE0, 0x54, 0xEF, 0xFD, 0x7F, 0x08,
0x12, 0x32, 0x1E, 0xE4, 0xFF, 0x8F, 0x0F, 0xE4, 0x90, 0x82, 0xC8, 0xF0, 0xA3, 0xF0, 0x90, 0x01,
0x09, 0xE0, 0x7F, 0x00, 0x30, 0xE7, 0x02, 0x7F, 0x01, 0xEF, 0x65, 0x0F, 0x60, 0x3E, 0xC3, 0x90,
0x82, 0xC9, 0xE0, 0x94, 0x88, 0x90, 0x82, 0xC8, 0xE0, 0x94, 0x13, 0x40, 0x08, 0x90, 0x01, 0xC0,
0xE0, 0x44, 0x10, 0xF0, 0x22, 0x90, 0x82, 0xC8, 0xE4, 0x75, 0xF0, 0x01, 0x12, 0x41, 0xF6, 0x7F,
0x14, 0x7E, 0x00, 0x12, 0x32, 0xAA, 0xD3, 0x90, 0x82, 0xC9, 0xE0, 0x94, 0x32, 0x90, 0x82, 0xC8,
0xE0, 0x94, 0x00, 0x40, 0xB9, 0x90, 0x01, 0xC6, 0xE0, 0x30, 0xE0, 0xB2, 0x22, 0x90, 0x81, 0x45,
0xE0, 0xFD, 0x7F, 0x93, 0x12, 0x32, 0x1E, 0x90, 0x81, 0x3C, 0xE0, 0x60, 0x12, 0x90, 0x01, 0x2F,
0xE0, 0x30, 0xE7, 0x05, 0x74, 0x10, 0xF0, 0x80, 0x06, 0x90, 0x01, 0x2F, 0x74, 0x90, 0xF0, 0x90,
0x00, 0x08, 0xE0, 0x44, 0x10, 0xFD, 0x7F, 0x08, 0x12, 0x32, 0x1E, 0x7F, 0x01, 0x51, 0x25, 0x90,
0x00, 0x90, 0xE0, 0x44, 0x01, 0xFD, 0x7F, 0x90, 0x12, 0x32, 0x1E, 0x7F, 0x14, 0x7E, 0x00, 0x02,
0x32, 0xAA, 0x90, 0x00, 0x90, 0xE0, 0x20, 0xE0, 0xF9, 0x22, 0x7F, 0x02, 0x90, 0x82, 0x64, 0xE0,
0xFE, 0xEF, 0xC3, 0x9E, 0x50, 0x18, 0xEF, 0x25, 0xE0, 0x24, 0x81, 0xF8, 0xE6, 0x30, 0xE4, 0x0B,
0x90, 0x01, 0xB8, 0x74, 0x08, 0xF0, 0xA3, 0xF0, 0x7F, 0x00, 0x22, 0x0F, 0x80, 0xDE, 0x7F, 0x01,
0x22, 0x90, 0x02, 0x96, 0xE0, 0xFF, 0x90, 0x02, 0x87, 0xE0, 0x4F, 0x60, 0x08, 0x90, 0x01, 0xB8,
0x74, 0x01, 0xF0, 0x80, 0x3B, 0x90, 0x81, 0x53, 0xE0, 0x30, 0xE0, 0x0E, 0x90, 0x02, 0x82, 0xE0,
0x60, 0x08, 0x90, 0x01, 0xB8, 0x74, 0x02, 0xF0, 0x80, 0x26, 0x90, 0x81, 0x58, 0xE0, 0x30, 0xE0,
0x08, 0x90, 0x01, 0xB8, 0x74, 0x08, 0xF0, 0x80, 0x17, 0x90, 0x02, 0x86, 0xE0, 0x20, 0xE1, 0x08,
0x90, 0x01, 0xB8, 0x74, 0x04, 0xF0, 0x80, 0x08, 0x90, 0x01, 0xB8, 0xE4, 0xF0, 0x7F, 0x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D0, 0x92, 0xAF, 0x22, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x53, 0xEF, 0x12, 0x42, 0x5C,
0x64, 0xEE, 0x00, 0x64, 0xF6, 0x01, 0x64, 0xFE, 0x02, 0x65, 0x06, 0x03, 0x65, 0x0E, 0x04, 0x65,
0x16, 0x20, 0x65, 0x1F, 0x21, 0x65, 0x27, 0x23, 0x65, 0x2F, 0x25, 0x65, 0x40, 0x80, 0x65, 0x37,
0x81, 0x65, 0x49, 0x82, 0x65, 0x51, 0x83, 0x65, 0x59, 0x84, 0x00, 0x00, 0x65, 0x62, 0x90, 0x82,
0xCC, 0x12, 0x42, 0x4A, 0xE1, 0x48, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0x80, 0x6C, 0x90, 0x82,
0xCC, 0x12, 0x42, 0x4A, 0xC1, 0x8D, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0xC1, 0x40, 0x90, 0x82,
0xCC, 0x12, 0x42, 0x4A, 0xC1, 0x60, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0x02, 0x69, 0xD3, 0x90,
0x82, 0xCC, 0x12, 0x42, 0x4A, 0xE1, 0x02, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0xC1, 0x0E, 0x90,
0x82, 0xCC, 0x12, 0x42, 0x4A, 0xC1, 0x16, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0x02, 0x5D, 0x3E,
0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0x02, 0x74, 0x9C, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0xC1,
0x26, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0xE1, 0x90, 0x90, 0x82, 0xCC, 0x12, 0x42, 0x4A, 0x02,
0x76, 0x09, 0x90, 0x01, 0xC0, 0xE0, 0x44, 0x01, 0xF0, 0x22, 0x90, 0x82, 0xCF, 0x12, 0x42, 0x53,
0x90, 0x00, 0x01, 0x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12, 0x1F,
0xA4, 0x90, 0x82, 0x55, 0xF0, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0x90, 0x82, 0x56, 0xF0, 0x22,
0x12, 0x1F, 0xA4, 0xFF, 0x54, 0x01, 0xFE, 0x90, 0x82, 0x65, 0xE0, 0x54, 0xFE, 0x4E, 0xF0, 0xEF,
0xC3, 0x13, 0x30, 0xE0, 0x0A, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0x90, 0x82, 0x66, 0xF0, 0x22,
0x12, 0x59, 0x44, 0x12, 0x1F, 0xA4, 0xFF, 0x54, 0x01, 0xFE, 0x90, 0x82, 0x68, 0xE0, 0x54, 0xFE,
0x4E, 0xF0, 0xEF, 0xC3, 0x13, 0x30, 0xE0, 0x14, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0x90, 0x82,
0x69, 0xF0, 0x90, 0x00, 0x02, 0x12, 0x1F, 0xBD, 0x90, 0x82, 0x6A, 0xF0, 0x22, 0xD3, 0x10, 0xAF,
0x01, 0xC3, 0xC0, 0xD0, 0x12, 0x1F, 0xA4, 0xFF, 0x90, 0x81, 0x37, 0xF0, 0xBF, 0x01, 0x12, 0x90,
0x00, 0x01, 0x12, 0x1F, 0xBD, 0x64, 0x01, 0x60, 0x17, 0x90, 0x05, 0x22, 0x74, 0x6F, 0xF0, 0x80,
0x0F, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0x64, 0x01, 0x60, 0x05, 0x90, 0x05, 0x22, 0xE4, 0xF0,
0xD0, 0xD0, 0x92, 0xAF, 0x22, 0xE4, 0x90, 0x83, 0x73, 0xF0, 0xA3, 0xF0, 0x90, 0x02, 0x86, 0xE0,
0x20, 0xE1, 0x2C, 0xC3, 0x90, 0x83, 0x74, 0xE0, 0x94, 0xD0, 0x90, 0x83, 0x73, 0xE0, 0x94, 0x07,
0x40, 0x0A, 0x90, 0x01, 0xC1, 0xE0, 0x44, 0x04, 0xF0, 0x7F, 0x00, 0x22, 0x90, 0x83, 0x73, 0xE4,
0x75, 0xF0, 0x01, 0x12, 0x41, 0xF6, 0x7F, 0x0A, 0x7E, 0x00, 0x12, 0x32, 0xAA, 0x80, 0xCD, 0x7F,
0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x1F, 0xBD, 0xFF, 0x30, 0xE0, 0x26, 0x12, 0x1F, 0xA4, 0x90,
0x81, 0x4C, 0xF0, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0x90, 0x81, 0x4D, 0xF0, 0xEF, 0x54, 0xFE,
0xFF, 0xA3, 0xE0, 0x54, 0x01, 0x4F, 0xF0, 0x90, 0x00, 0x03, 0x12, 0x1F, 0xBD, 0x90, 0x81, 0x4F,
0xF0, 0x22, 0x90, 0x81, 0x4C, 0x74, 0x01, 0xF0, 0xA3, 0x74, 0x05, 0xF0, 0xA3, 0xE0, 0x54, 0x01,
0x44, 0x28, 0xF0, 0xA3, 0x74, 0x05, 0xF0, 0x22, 0x90, 0x02, 0x09, 0xE0, 0xFD, 0x12, 0x1F, 0xA4,
0xFE, 0xAF, 0x05, 0xED, 0x2E, 0x90, 0x80, 0x06, 0xF0, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0xFF,
0xED, 0x2F, 0x90, 0x80, 0x07, 0xF0, 0x90, 0x00, 0x02, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F, 0x90,
0x80, 0x08, 0xF0, 0x90, 0x00, 0x03, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F, 0x90, 0x80, 0x09, 0xF0,
0x90, 0x00, 0x04, 0x12, 0x1F, 0xBD, 0xFF, 0xAE, 0x05, 0xED, 0x2F, 0x90, 0x80, 0x0A, 0xF0, 0x22,
0x90, 0x02, 0x09, 0xE0, 0xFD, 0x12, 0x1F, 0xA4, 0xFE, 0xAF, 0x05, 0xED, 0x2E, 0x90, 0x82, 0x57,
0xF0, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F, 0x90, 0x82, 0x58, 0xF0, 0x90, 0x00,
0x02, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F, 0x90, 0x82, 0x59, 0xF0, 0x90, 0x00, 0x03, 0x12, 0x1F,
0xBD, 0xFF, 0xED, 0x2F, 0x90, 0x82, 0x5A, 0xF0, 0x90, 0x00, 0x04, 0x12, 0x1F, 0xBD, 0xFF, 0xED,
0x2F, 0x90, 0x82, 0x5B, 0xF0, 0x90, 0x00, 0x05, 0x12, 0x1F, 0xBD, 0xFF, 0xAE, 0x05, 0xED, 0x2F,
0x90, 0x82, 0x5C, 0xF0, 0x22, 0x90, 0x83, 0x22, 0xEF, 0xF0, 0xA3, 0xED, 0xF0, 0xA3, 0x12, 0x20,
0xDA, 0x00, 0x00, 0x00, 0x00, 0xE4, 0x90, 0x83, 0x30, 0xF0, 0x7F, 0x24, 0x7E, 0x08, 0x12, 0x2D,
0x5C, 0x90, 0x83, 0x28, 0x12, 0x20, 0xCE, 0x90, 0x83, 0x22, 0xE0, 0xFB, 0x70, 0x08, 0x90, 0x83,
0x28, 0x12, 0x42, 0x26, 0x80, 0x16, 0xEB, 0x75, 0xF0, 0x08, 0xA4, 0x24, 0x62, 0xF5, 0x82, 0xE4,
0x34, 0x87, 0xF5, 0x83, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF, 0x12, 0x2D, 0x5C, 0x90, 0x83, 0x2C, 0x12,
0x20, 0xCE, 0x90, 0x83, 0x23, 0xE0, 0xFF, 0xE4, 0xFC, 0xFD, 0xFE, 0x78, 0x17, 0x12, 0x20, 0xBB,
0xA8, 0x04, 0xA9, 0x05, 0xAA, 0x06, 0xAB, 0x07, 0x90, 0x83, 0x2C, 0x12, 0x42, 0x26, 0xED, 0x54,
0x7F, 0xFD, 0xEC, 0x54, 0x80, 0xFC, 0x12, 0x42, 0x19, 0xEC, 0x44, 0x80, 0xFC, 0x90, 0x83, 0x2C,
0x12, 0x20, 0xCE, 0x90, 0x83, 0x28, 0x12, 0x42, 0x26, 0xEC, 0x54, 0x7F, 0xFC, 0x90, 0x85, 0xBB,
0x12, 0x20, 0xCE, 0x7F, 0x24, 0x7E, 0x08, 0x12, 0x2E, 0xA2, 0x90, 0x83, 0x22, 0xE0, 0x75, 0xF0,
0x08, 0xA4, 0x24, 0x62, 0xF5, 0x82, 0xE4, 0x34, 0x87, 0xF5, 0x83, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF,
0xC0, 0x06, 0xC0, 0x07, 0x90, 0x83, 0x2C, 0x12, 0x42, 0x26, 0x90, 0x85, 0xBB, 0x12, 0x20, 0xCE,
0xD0, 0x07, 0xD0, 0x06, 0x12, 0x2E, 0xA2, 0x90, 0x83, 0x28, 0x12, 0x42, 0x26, 0xEC, 0x44, 0x80,
0xFC, 0x90, 0x85, 0xBB, 0x12, 0x20, 0xCE, 0x7F, 0x24, 0x7E, 0x08, 0x12, 0x2E, 0xA2, 0x90, 0x83,
0x22, 0xE0, 0x70, 0x04, 0x7F, 0x20, 0x80, 0x09, 0x90, 0x83, 0x22, 0xE0, 0xB4, 0x01, 0x16, 0x7F,
0x28, 0x7E, 0x08, 0x12, 0x2D, 0x5C, 0x78, 0x08, 0x12, 0x20, 0xA8, 0xEF, 0x54, 0x01, 0xFF, 0xE4,
0x90, 0x83, 0x30, 0xEF, 0xF0, 0x90, 0x83, 0x30, 0xE0, 0x90, 0x83, 0x22, 0x60, 0x0E, 0xE0, 0x75,
0xF0, 0x08, 0xA4, 0x24, 0x66, 0xF5, 0x82, 0xE4, 0x34, 0x87, 0x80, 0x0C, 0xE0, 0x75, 0xF0, 0x08,
0xA4, 0x24, 0x64, 0xF5, 0x82, 0xE4, 0x34, 0x87, 0xF5, 0x83, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF, 0x12,
0x2D, 0x5C, 0xED, 0x54, 0x0F, 0xFD, 0xE4, 0xFC, 0x90, 0x83, 0x24, 0x12, 0x20, 0xCE, 0x90, 0x83,
0x24, 0x02, 0x42, 0x26, 0x90, 0x83, 0x3F, 0xEF, 0xF0, 0xAB, 0x05, 0x90, 0x83, 0x45, 0x12, 0x20,
0xDA, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x03, 0xE4, 0xFC, 0xFD, 0xFE, 0x78, 0x14, 0x12, 0x20, 0xBB,
0xA8, 0x04, 0xA9, 0x05, 0xAA, 0x06, 0xAB, 0x07, 0x90, 0x83, 0x41, 0x12, 0x42, 0x26, 0xED, 0x54,
0x0F, 0xFD, 0xE4, 0xFC, 0x12, 0x42, 0x19, 0xEC, 0x54, 0x0F, 0xFC, 0x90, 0x83, 0x45, 0x12, 0x20,
0xCE, 0x90, 0x83, 0x3F, 0xE0, 0x75, 0xF0, 0x08, 0xA4, 0x24, 0x60, 0xF5, 0x82, 0xE4, 0x34, 0x87,
0xF5, 0x83, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF, 0xC0, 0x06, 0xC0, 0x07, 0x90, 0x83, 0x45, 0x12, 0x42,
0x26, 0x90, 0x85, 0xBB, 0x12, 0x20, 0xCE, 0xD0, 0x07, 0xD0, 0x06, 0x02, 0x2E, 0xA2, 0xD3, 0x10,
0xAF, 0x01, 0xC3, 0xC0, 0xD0, 0x12, 0x67, 0xE5, 0xD0, 0xD0, 0x92, 0xAF, 0x22, 0x90, 0x83, 0x77,
0xEF, 0xF0, 0x7F, 0x02, 0x12, 0x46, 0x53, 0x90, 0x80, 0x01, 0xE0, 0xFF, 0x90, 0x83, 0x77, 0xE0,
0xFE, 0xEF, 0x4E, 0x90, 0x80, 0x01, 0xF0, 0x22, 0x90, 0x83, 0x78, 0xEF, 0xF0, 0x7F, 0x02, 0x12,
0x46, 0x53, 0x90, 0x80, 0x02, 0xE0, 0xFF, 0x90, 0x83, 0x78, 0xE0, 0xFE, 0xEF, 0x4E, 0x90, 0x80,
0x02, 0xF0, 0x22, 0x12, 0x1F, 0xA4, 0xFF, 0x54, 0x7F, 0x90, 0x81, 0x3B, 0xF0, 0xEF, 0xC4, 0x13,
0x13, 0x13, 0x54, 0x01, 0xA3, 0xF0, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0xFF, 0x54, 0xF0, 0xC4,
0x54, 0x0F, 0xFE, 0x90, 0x81, 0x3A, 0xE0, 0x54, 0xF0, 0x4E, 0xF0, 0x90, 0x00, 0x03, 0x12, 0x1F,
0xBD, 0x54, 0x01, 0x25, 0xE0, 0xFE, 0x90, 0x81, 0x38, 0xE0, 0x54, 0xFD, 0x4E, 0xF0, 0x90, 0x81,
0x53, 0xE0, 0x30, 0xE0, 0x09, 0x90, 0x81, 0x3A, 0xE0, 0x54, 0x0F, 0xF0, 0x80, 0x0F, 0xEF, 0x54,
0x0F, 0xC4, 0x54, 0xF0, 0xFF, 0x90, 0x81, 0x3A, 0xE0, 0x54, 0x0F, 0x4F, 0xF0, 0x90, 0x00, 0x04,
0x12, 0x1F, 0xBD, 0x90, 0x81, 0x3D, 0xF0, 0x12, 0x5C, 0x57, 0x90, 0x01, 0xB9, 0x74, 0x01, 0xF0,
0x90, 0x01, 0xB8, 0xF0, 0x90, 0x81, 0x3B, 0xE0, 0x90, 0x01, 0xBA, 0xF0, 0x90, 0x81, 0x3D, 0xE0,
0x90, 0x01, 0xBB, 0xF0, 0x90, 0x81, 0x3A, 0xE0, 0x54, 0x0F, 0x90, 0x01, 0xBE, 0xF0, 0x22, 0x90,
0x01, 0xCC, 0xE0, 0x54, 0x0F, 0x90, 0x83, 0x79, 0xF0, 0x90, 0x83, 0x79, 0xE0, 0xFD, 0x70, 0x02,
0x61, 0xEC, 0x90, 0x80, 0x5B, 0xE0, 0xFF, 0x70, 0x06, 0xA3, 0xE0, 0x64, 0x09, 0x60, 0x0A, 0xEF,
0x14, 0xFF, 0x90, 0x80, 0x5C, 0xE0, 0xB5, 0x07, 0x04, 0x7F, 0x01, 0x80, 0x02, 0x7F, 0x00, 0xEF,
0x60, 0x08, 0x90, 0x01, 0xC1, 0xE0, 0x44, 0x01, 0xF0, 0x22, 0x90, 0x83, 0x69, 0xE0, 0xFF, 0x74,
0x01, 0x7E, 0x00, 0xA8, 0x07, 0x08, 0x80, 0x05, 0xC3, 0x33, 0xCE, 0x33, 0xCE, 0xD8, 0xF9, 0xFF,
0xEF, 0x5D, 0x70, 0x02, 0x61, 0xE5, 0x90, 0x83, 0x69, 0xE0, 0x75, 0xF0, 0x04, 0x90, 0x01, 0xD0,
0x12, 0x42, 0x3E, 0xE0, 0xFF, 0x90, 0x80, 0x5C, 0xE0, 0xFE, 0x75, 0xF0, 0x08, 0x90, 0x80, 0x0B,
0x12, 0x42, 0x3E, 0xEF, 0xF0, 0x90, 0x83, 0x69, 0xE0, 0x75, 0xF0, 0x04, 0x90, 0x01, 0xD1, 0x12,
0x42, 0x3E, 0xE0, 0xFF, 0x75, 0xF0, 0x08, 0xEE, 0x90, 0x80, 0x0C, 0x12, 0x42, 0x3E, 0xEF, 0xF0,
0x90, 0x83, 0x69, 0xE0, 0x75, 0xF0, 0x04, 0x90, 0x01, 0xD2, 0x12, 0x42, 0x3E, 0xE0, 0xFF, 0x75,
0xF0, 0x08, 0xEE, 0x90, 0x80, 0x0D, 0x12, 0x42, 0x3E, 0xEF, 0xF0, 0x90, 0x83, 0x69, 0xE0, 0x75,
0xF0, 0x04, 0x90, 0x01, 0xD3, 0x12, 0x42, 0x3E, 0xE0, 0xFF, 0x75, 0xF0, 0x08, 0xEE, 0x90, 0x80,
0x0E, 0x12, 0x42, 0x3E, 0xEF, 0xF0, 0x90, 0x83, 0x69, 0xE0, 0x75, 0xF0, 0x04, 0x90, 0x01, 0xF0,
0x12, 0x42, 0x3E, 0xE0, 0xFF, 0x75, 0xF0, 0x08, 0xEE, 0x90, 0x80, 0x0F, 0x12, 0x42, 0x3E, 0xEF,
0xF0, 0x90, 0x83, 0x69, 0xE0, 0x75, 0xF0, 0x04, 0x90, 0x01, 0xF1, 0x12, 0x42, 0x3E, 0xE0, 0xFF,
0x75, 0xF0, 0x08, 0xEE, 0x90, 0x80, 0x10, 0x12, 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x12, 0x42, 0x4A, 0x8B, 0x13, 0x8A, 0x14, 0x89, 0x15, 0x75, 0x16, 0x06, 0xD0, 0x01, 0xD0, 0x02,
0xD0, 0x03, 0x12, 0x2B, 0xED, 0x90, 0x82, 0xFA, 0xA3, 0xE0, 0xFF, 0xA3, 0xE0, 0x2F, 0x24, 0x3A,
0xF9, 0xE4, 0x34, 0xFC, 0xFA, 0x7B, 0x01, 0xC0, 0x03, 0xC0, 0x02, 0xC0, 0x01, 0x90, 0x82, 0xF6,
0x12, 0x42, 0x4A, 0x8B, 0x13, 0x8A, 0x14, 0x89, 0x15, 0x75, 0x16, 0x06, 0xD0, 0x01, 0xD0, 0x02,
0xD0, 0x03, 0x12, 0x2B, 0xED, 0x90, 0x82, 0xFA, 0xA3, 0xE0, 0xFF, 0xA3, 0xE0, 0x2F, 0x24, 0x40,
0xF9, 0xE4, 0x34, 0xFC, 0xFA, 0x7B, 0x01, 0xC0, 0x03, 0xC0, 0x02, 0xC0, 0x01, 0x90, 0x82, 0xF3,
0x12, 0x42, 0x4A, 0x8B, 0x13, 0x8A, 0x14, 0x89, 0x15, 0x75, 0x16, 0x04, 0xD0, 0x01, 0xD0, 0x02,
0xD0, 0x03, 0x12, 0x2B, 0xED, 0x90, 0x06, 0x30, 0xE0, 0x44, 0x10, 0xF0, 0xD1, 0x8A, 0xBF, 0x01,
0x0E, 0x90, 0x82, 0x58, 0xE0, 0x90, 0x04, 0x25, 0xF0, 0x90, 0x04, 0x1F, 0x74, 0x20, 0xF0, 0x22,
0xC3, 0xEE, 0x94, 0x01, 0x40, 0x0A, 0x0D, 0xED, 0x13, 0x90, 0xFD, 0x10, 0xF0, 0xE4, 0x2F, 0xFF,
0x22, 0xC3, 0xEE, 0x94, 0x01, 0x40, 0x1E, 0x90, 0xFD, 0x11, 0xE0, 0xB5, 0x05, 0x14, 0x90, 0x01,
0x17, 0xE0, 0xB5, 0x05, 0x07, 0x90, 0xFD, 0x11, 0xE4, 0xF0, 0x80, 0x06, 0xED, 0x04, 0x90, 0xFD,
0x11, 0xF0, 0xE4, 0x2F, 0xFF, 0x22, 0xE4, 0x90, 0x83, 0x6F, 0xF0, 0xA3, 0xF0, 0x90, 0x05, 0xF8,
0xE0, 0x70, 0x0F, 0xA3, 0xE0, 0x70, 0x0B, 0xA3, 0xE0, 0x70, 0x07, 0xA3, 0xE0, 0x70, 0x03, 0x7F,
0x01, 0x22, 0xD3, 0x90, 0x83, 0x70, 0xE0, 0x94, 0xE8, 0x90, 0x83, 0x6F, 0xE0, 0x94, 0x03, 0x40,
0x0A, 0x90, 0x01, 0xC0, 0xE0, 0x44, 0x20, 0xF0, 0x7F, 0x00, 0x22, 0x7F, 0x32, 0x7E, 0x00, 0x12,
0x32, 0xAA, 0x90, 0x83, 0x6F, 0xE4, 0x75, 0xF0, 0x01, 0x12, 0x41, 0xF6, 0x80, 0xBF, 0x90, 0x83,
0x10, 0xEE, 0xF0, 0xA3, 0xEF, 0xF0, 0x12, 0x2D, 0x5C, 0x90, 0x83, 0x1A, 0x12, 0x20, 0xCE, 0x90,
0x83, 0x12, 0x12, 0x42, 0x26, 0x12, 0x20, 0x9B, 0x90, 0x83, 0x1A, 0x12, 0x42, 0x32, 0x12, 0x42,
0x0C, 0x90, 0x83, 0x16, 0x12, 0x42, 0x32, 0x12, 0x42, 0x19, 0x90, 0x83, 0x1E, 0x12, 0x20, 0xCE,
0x90, 0x83, 0x1E, 0x12, 0x42, 0x26, 0x90, 0x85, 0xBB, 0x12, 0x20, 0xCE, 0x90, 0x83, 0x10, 0xE0,
0xFE, 0xA3, 0xE0, 0xFF, 0x02, 0x2E, 0xA2, 0x90, 0x82, 0xFE, 0xEC, 0xF0, 0xA3, 0xED, 0xF0, 0x90,
0x82, 0xFD, 0xEF, 0xF0, 0xA3, 0xA3, 0xE0, 0xFD, 0x12, 0x32, 0x59, 0x90, 0x83, 0x08, 0x12, 0x20,
0xCE, 0x90, 0x83, 0x00, 0x12, 0x42, 0x26, 0x12, 0x20, 0x9B, 0x90, 0x83, 0x08, 0x12, 0x42, 0x32,
0x12, 0x42, 0x0C, 0x90, 0x83, 0x04, 0x12, 0x42, 0x32, 0x12, 0x42, 0x19, 0x90, 0x83, 0x0C, 0x12,
0x20, 0xCE, 0x90, 0x82, 0xFE, 0xA3, 0xE0, 0xFD, 0xC0, 0x05, 0x90, 0x83, 0x0C, 0x12, 0x42, 0x26,
0x90, 0x85, 0x96, 0x12, 0x20, 0xCE, 0x90, 0x82, 0xFD, 0xE0, 0xFF, 0xD0, 0x05, 0x02, 0x31, 0x4D,
0xE4, 0x90, 0x81, 0x3B, 0xF0, 0xA3, 0xF0, 0x90, 0x81, 0x3A, 0xE0, 0x54, 0x0F, 0xF0, 0x54, 0xF0,
0xF0, 0x90, 0x81, 0x38, 0xE0, 0x54, 0xFD, 0xF0, 0x54, 0xF7, 0xF0, 0x90, 0x81, 0x41, 0x74, 0x01,
0xF0, 0xA3, 0xF0, 0x90, 0x81, 0x38, 0xE0, 0x54, 0xFB, 0xF0, 0xA3, 0xE0, 0x54, 0xFB, 0xF0, 0xE4,
0x90, 0x81, 0x44, 0xF0, 0x90, 0x81, 0x43, 0x74, 0x07, 0xF0, 0x90, 0x81, 0x46, 0xE4, 0xF0, 0xA3,
0x74, 0x02, 0xF0, 0xE4, 0x90, 0x81, 0x3F, 0xF0, 0x90, 0x81, 0x38, 0xE0, 0x54, 0xFE, 0xF0, 0x90,
0x81, 0x3D, 0x74, 0x0C, 0xF0, 0x90, 0x81, 0x38, 0xE0, 0x54, 0xDF, 0xF0, 0x90, 0x81, 0x3E, 0x74,
0x0C, 0xF0, 0x90, 0x81, 0x38, 0xE0, 0x54, 0xBF, 0xF0, 0x54, 0x7F, 0xF0, 0xA3, 0xE0, 0x54, 0xFE,
0xF0, 0x54, 0xFD, 0xF0, 0x54, 0xF7, 0xF0, 0x90, 0x81, 0x48, 0x12, 0x20, 0xDA, 0x00, 0x00, 0x00,
0x00, 0x90, 0x80, 0x05, 0xE0, 0xB4, 0x01, 0x08, 0x90, 0x81, 0x45, 0x74, 0x99, 0xF0, 0x80, 0x12,
0x90, 0x80, 0x05, 0xE0, 0x90, 0x81, 0x45, 0xB4, 0x03, 0x05, 0x74, 0x90, 0xF0, 0x80, 0x03, 0x74,
0x40, 0xF0, 0x90, 0x81, 0x4C, 0x74, 0x01, 0xF0, 0xA3, 0x74, 0x05, 0xF0, 0xA3, 0xE0, 0x54, 0x01,
0x44, 0x28, 0xF0, 0xA3, 0x74, 0x05, 0xF0, 0xE4, 0xA3, 0xF0, 0xA3, 0xE0, 0x54, 0xFD, 0xF0, 0x54,
0xFB, 0xF0, 0x54, 0xF7, 0xF0, 0x54, 0xEF, 0xF0, 0x54, 0xDF, 0xF0, 0x54, 0xBF, 0xF0, 0xE4, 0xA3,
0xF0, 0x22, 0x90, 0x04, 0x1A, 0xE0, 0xF4, 0x60, 0x03, 0x7F, 0x00, 0x22, 0x90, 0x04, 0x1B, 0xE0,
0x54, 0x07, 0x64, 0x07, 0x7F, 0x01, 0x60, 0x02, 0x7F, 0x00, 0x22, 0x31, 0x82, 0xEF, 0x64, 0x01,
0x60, 0x08, 0x90, 0x01, 0xB8, 0x74, 0x01, 0xF0, 0x80, 0x67, 0x90, 0x81, 0x3F, 0xE0, 0xFF, 0x54,
0x03, 0x60, 0x08, 0x90, 0x01, 0xB8, 0x74, 0x02, 0xF0, 0x80, 0x56, 0x90, 0x81, 0x3D, 0xE0, 0xFE,
0xE4, 0xC3, 0x9E, 0x50, 0x08, 0x90, 0x01, 0xB8, 0x74, 0x04, 0xF0, 0x80, 0x44, 0xEF, 0x30, 0xE2,
0x08, 0x90, 0x01, 0xB8, 0x74, 0x08, 0xF0, 0x80, 0x38, 0x90, 0x81, 0x3F, 0xE0, 0x30, 0xE4, 0x08,
0x90, 0x01, 0xB8, 0x74, 0x10, 0xF0, 0x80, 0x29, 0x90, 0x81, 0x39, 0xE0, 0x13, 0x13, 0x54, 0x3F,
0x20, 0xE0, 0x08, 0x90, 0x01, 0xB8, 0x74, 0x20, 0xF0, 0x80, 0x16, 0x90, 0x81, 0x52, 0xE0, 0x60,
0x08, 0x90, 0x01, 0xB8, 0x74, 0x80, 0xF0, 0x80, 0x08, 0x90, 0x01, 0xB8, 0xE4, 0xF0, 0x7F, 0x01,
0x22, 0x90, 0x01, 0xB9, 0x74, 0x04, 0xF0, 0x7F, 0x00, 0x22, 0xEF, 0x24, 0xFE, 0x60, 0x0C, 0x04,
0x70, 0x28, 0x90, 0x81, 0x41, 0x74, 0x01, 0xF0, 0xA3, 0xF0, 0x22, 0xED, 0x70, 0x0A, 0x90, 0x81,
0x4F, 0xE0, 0x90, 0x81, 0x41, 0xF0, 0x80, 0x05, 0x90, 0x81, 0x41, 0xED, 0xF0, 0x90, 0x81, 0x41,
0xE0, 0xA3, 0xF0, 0x90, 0x81, 0x39, 0xE0, 0x44, 0x08, 0xF0, 0x22, 0xEF, 0x60, 0x3E, 0x90, 0x80,
0xF7, 0xE0, 0x64, 0x01, 0x70, 0x36, 0x90, 0x81, 0x39, 0xE0, 0x54, 0xFE, 0xF0, 0x90, 0x05, 0x22,
0x74, 0x0F, 0xF0, 0x90, 0x06, 0x04, 0xE0, 0x54, 0xBF, 0xF0, 0xE4, 0xFF, 0x12, 0x4C, 0x52, 0xBF,
0x01, 0x0E, 0x90, 0x81, 0x38, 0xE0, 0x44, 0x40, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x06, 0xF0, 0x22,
0x90, 0x01, 0xB9, 0x74, 0x01, 0xF0, 0x90, 0x01, 0xB8, 0x74, 0x08, 0xF0, 0x22, 0x90, 0x05, 0x22,
0xE4, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x04, 0xF0, 0x22, 0x90, 0x81, 0x3B, 0xE0, 0x60, 0x2F, 0x90,
0x80, 0xF7, 0xE0, 0x64, 0x01, 0x70, 0x27, 0x90, 0x81, 0x42, 0xF0, 0x04, 0x60, 0x20, 0x90, 0x81,
0x3F, 0xE0, 0x44, 0x10, 0xF0, 0xE4, 0xF5, 0x1D, 0x90, 0x81, 0x43, 0x12, 0x4E, 0xD3, 0x90, 0x01,
0x57, 0x74, 0x05, 0xF0, 0x90, 0x81, 0x3E, 0xE0, 0x20, 0xE2, 0x03, 0x12, 0x49, 0x10, 0x22, 0x90,
0x81, 0x38, 0xE0, 0xFF, 0x13, 0x13, 0x54, 0x3F, 0x30, 0xE0, 0x11, 0xEF, 0x54, 0xFB, 0xF0, 0x90,
0x81, 0x3F, 0xE0, 0x54, 0xFD, 0xF0, 0x54, 0x07, 0x70, 0x42, 0x80, 0x3D, 0x90, 0x81, 0x44, 0xE0,
0x04, 0xF0, 0x90, 0x81, 0x3F, 0xE0, 0x54, 0xEF, 0xF0, 0x90, 0x81, 0x44, 0xE0, 0xFF, 0xB4, 0x01,
0x02, 0x80, 0x04, 0xEF, 0xB4, 0x02, 0x06, 0x90, 0x05, 0x58, 0xE0, 0x04, 0xF0, 0x90, 0x81, 0x4C,
0xE0, 0xFF, 0x90, 0x81, 0x44, 0xE0, 0xD3, 0x9F, 0x40, 0x0F, 0x90, 0x80, 0xF7, 0xE0, 0xB4, 0x01,
0x0B, 0x90, 0x81, 0x39, 0xE0, 0x54, 0xFB, 0xF0, 0x22, 0x12, 0x4E, 0x3A, 0x22, 0x90, 0x80, 0x08,
0xE0, 0xFE, 0x90, 0x04, 0x1C, 0xE0, 0x6E, 0x70, 0x40, 0x90, 0x81, 0x3E, 0xE0, 0xFE, 0x64, 0x0E,
0x70, 0x1C, 0xEF, 0x70, 0x34, 0x90, 0x81, 0x38, 0xE0, 0x54, 0x7F, 0xF0, 0x90, 0x06, 0x04, 0xE0,
0x54, 0xBF, 0xF0, 0xE0, 0x44, 0x80, 0xF0, 0x90, 0x81, 0x3E, 0x74, 0x04, 0xF0, 0x22, 0xEE, 0xB4,
0x06, 0x17, 0xEF, 0x60, 0x14, 0x90, 0x81, 0x38, 0xE0, 0x54, 0xBF, 0xF0, 0x90, 0x06, 0x04, 0xE0,
0x54, 0x7F, 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xFF, 0xF0, 0x12, 0x1F, 0xA4, 0xFE, 0x54, 0x10, 0xFD, 0xEF, 0x54, 0xEF, 0x4D, 0xFF, 0x90,
0x81, 0x54, 0xF0, 0xEE, 0x54, 0x20, 0xFE, 0xEF, 0x54, 0xDF, 0x4E, 0xFF, 0xF0, 0x12, 0x1F, 0xA4,
0xFE, 0x54, 0x40, 0xFD, 0xEF, 0x54, 0xBF, 0x4D, 0xFF, 0x90, 0x81, 0x54, 0xF0, 0xEE, 0x54, 0x80,
0xFE, 0xEF, 0x54, 0x7F, 0x4E, 0xF0, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD, 0xFD, 0x54, 0x80, 0xFF,
0x90, 0x81, 0x55, 0xE0, 0x54, 0x7F, 0x4F, 0xF0, 0xEC, 0x13, 0x13, 0x54, 0x3F, 0x30, 0xE0, 0x07,
0x90, 0x06, 0x90, 0xE0, 0x44, 0x04, 0xF0, 0x12, 0x1F, 0xA4, 0x13, 0x13, 0x13, 0x54, 0x1F, 0x30,
0xE0, 0x07, 0x90, 0x06, 0x90, 0xE0, 0x44, 0x08, 0xF0, 0x90, 0x80, 0x05, 0xE0, 0x64, 0x02, 0x70,
0x44, 0x90, 0x81, 0x55, 0xE0, 0xFF, 0xC4, 0x13, 0x13, 0x13, 0x54, 0x01, 0x20, 0xE0, 0x36, 0xED,
0x54, 0x7F, 0xFE, 0xEF, 0x54, 0x80, 0x4E, 0x90, 0x81, 0x55, 0xF0, 0x90, 0x00, 0x02, 0x12, 0x1F,
0xBD, 0x90, 0x81, 0x56, 0xF0, 0x90, 0x81, 0x54, 0xE0, 0xC4, 0x13, 0x54, 0x07, 0x30, 0xE0, 0x09,
0xA3, 0xE0, 0x54, 0x7F, 0xFF, 0xE4, 0xFD, 0x80, 0x09, 0x90, 0x81, 0x55, 0xE0, 0x54, 0x7F, 0xFF,
0x7D, 0x01, 0x12, 0x51, 0xD5, 0x90, 0x80, 0x05, 0xE0, 0xB4, 0x01, 0x07, 0x90, 0xFE, 0x10, 0xE0,
0x44, 0x04, 0xF0, 0xD0, 0xD0, 0x92, 0xAF, 0x22, 0x90, 0x81, 0x58, 0xE0, 0xFF, 0x20, 0xE0, 0x07,
0x90, 0x01, 0x3F, 0xE0, 0x30, 0xE2, 0x14, 0xEF, 0x44, 0x01, 0x90, 0x81, 0x58, 0xF0, 0x90, 0x81,
0x54, 0xE0, 0xC4, 0x54, 0x0F, 0x20, 0xE0, 0x03, 0x7F, 0x00, 0x22, 0x7F, 0x01, 0x22, 0xE4, 0xFE,
0xEF, 0x2E, 0x24, 0x04, 0xF5, 0x82, 0xE4, 0x34, 0xFB, 0xF5, 0x83, 0xE0, 0xFD, 0x74, 0xDB, 0x2E,
0xF5, 0x82, 0xE4, 0x34, 0x82, 0xF5, 0x83, 0xED, 0xF0, 0x0E, 0xEE, 0xB4, 0x06, 0xE2, 0x78, 0x59,
0x7C, 0x81, 0x7D, 0x01, 0x7B, 0x01, 0x7A, 0x82, 0x79, 0xDB, 0x7E, 0x00, 0x7F, 0x06, 0x12, 0x44,
0x08, 0xEF, 0x7F, 0x00, 0x70, 0x02, 0x7F, 0x01, 0x22, 0x90, 0x02, 0x09, 0xE0, 0xFD, 0x12, 0x1F,
0xA4, 0xFE, 0xAF, 0x05, 0xED, 0x2E, 0x90, 0x82, 0x5D, 0xF0, 0x90, 0x00, 0x01, 0x12, 0x1F, 0xBD,
0xFF, 0xED, 0x2F, 0x90, 0x82, 0x5E, 0xF0, 0x90, 0x00, 0x02, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F,
0x90, 0x82, 0x5F, 0xF0, 0x90, 0x00, 0x03, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F, 0x90, 0x82, 0x60,
0xF0, 0x90, 0x00, 0x04, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F, 0x90, 0x82, 0x61, 0xF0, 0x90, 0x00,
0x05, 0x12, 0x1F, 0xBD, 0xFF, 0xED, 0x2F, 0x90, 0x82, 0x62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0xE2, 0x90, 0x82, 0x6E, 0x12, 0x42, 0x4A, 0x8B, 0x13, 0x8A, 0x14,
0x89, 0x15, 0x90, 0x82, 0x71, 0xE0, 0xF5, 0x16, 0x7B, 0x01, 0x7A, 0x82, 0x79, 0x7A, 0x12, 0x2B,
0xED, 0xE4, 0x90, 0x82, 0x79, 0xF0, 0x90, 0x82, 0x79, 0xE0, 0xFF, 0xC3, 0x94, 0x40, 0x50, 0x16,
0x74, 0x7A, 0x2F, 0xF5, 0x82, 0xE4, 0x34, 0x82, 0xF5, 0x83, 0xE0, 0x64, 0x36, 0xF0, 0x90, 0x82,
0x79, 0xE0, 0x04, 0xF0, 0x80, 0xE0, 0x90, 0x82, 0x72, 0x12, 0x42, 0x4A, 0x90, 0x82, 0x75, 0xE0,
0xFF, 0xF5, 0x82, 0x75, 0x83, 0x00, 0x74, 0x80, 0x12, 0x1F, 0xFC, 0xEF, 0x75, 0xF0, 0x08, 0xA4,
0x24, 0x00, 0xFF, 0xE5, 0xF0, 0x34, 0x02, 0xFC, 0x90, 0x00, 0x7E, 0x12, 0x1F, 0xFC, 0xEF, 0x90,
0x00, 0x7F, 0x12, 0x1F, 0xFC, 0xE4, 0x90, 0x82, 0xBA, 0xF0, 0xA3, 0xF0, 0x90, 0x82, 0xBA, 0xE0,
0xFE, 0xA3, 0xE0, 0xFF, 0xC3, 0x94, 0xC0, 0xEE, 0x94, 0x00, 0x40, 0x03, 0x02, 0x79, 0x3E, 0xC3,
0xEF, 0x94, 0x40, 0xEE, 0x94, 0x00, 0x50, 0x53, 0xA3, 0x74, 0x40, 0xF0, 0x74, 0x7A, 0x2F, 0xF9,
0xE4, 0x34, 0x82, 0xFA, 0x7B, 0x01, 0x74, 0x40, 0x44, 0x88, 0xFD, 0x12, 0x28, 0x08, 0x90, 0x82,
0xBA, 0xA3, 0xE0, 0x24, 0x7E, 0xF9, 0xE4, 0x34, 0x82, 0xFA, 0x7B, 0x01, 0xA3, 0xE0, 0x44, 0x89,
0xFD, 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 0x44, 0x90, 0x90, 0x01, 0x8C, 0xF0,
0xE4, 0x90, 0x82, 0xBE, 0xF0, 0xA3, 0xF0, 0x90, 0x01, 0x8C, 0xE0, 0x30, 0xE4, 0x22, 0xC3, 0x90,
0x82, 0xBF, 0xE0, 0x94, 0xE8, 0x90, 0x82, 0xBE, 0xE0, 0x94, 0x03, 0x50, 0x13, 0x7F, 0x01, 0x7E,
0x00, 0x12, 0x32, 0xAA, 0x90, 0x82, 0xBE, 0xE4, 0x75, 0xF0, 0x01, 0x12, 0x41, 0xF6, 0x80, 0xD7,
0x90, 0x82, 0xBE, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF, 0xC3, 0x94, 0xE8, 0xEE, 0x94, 0x03, 0x40, 0x0C,
0x90, 0x06, 0x31, 0xE0, 0x44, 0x01, 0xF0, 0xEE, 0x90, 0x06, 0x36, 0xF0, 0x90, 0x82, 0xBB, 0xE0,
0x54, 0x3F, 0x64, 0x30, 0x70, 0x4B, 0x90, 0x82, 0xBE, 0xF0, 0xA3, 0xF0, 0x90, 0x01, 0x8C, 0xE0,
0x20, 0xE5, 0x22, 0xC3, 0x90, 0x82, 0xBF, 0xE0, 0x94, 0xE8, 0x90, 0x82, 0xBE, 0xE0, 0x94, 0x03,
0x50, 0x13, 0x7F, 0x01, 0x7E, 0x00, 0x12, 0x32, 0xAA, 0x90, 0x82, 0xBE, 0xE4, 0x75, 0xF0, 0x01,
0x12, 0x41, 0xF6, 0x80, 0xD7, 0x90, 0x82, 0xBE, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF, 0xC3, 0x94, 0xE8,
0xEE, 0x94, 0x03, 0x40, 0x0C, 0x90, 0x06, 0x31, 0xE0, 0x44, 0x02, 0xF0, 0xEE, 0x90, 0x06, 0x36,
0xF0, 0x90, 0x82, 0xBA, 0xE4, 0x75, 0xF0, 0x10, 0x12, 0x41, 0xF6, 0x02, 0x77, 0x8C, 0x90, 0x82,
0x76, 0x12, 0x42, 0x4A, 0xE9, 0x24,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79, 0xE0, 0xFF, 0xF5, 0x82, 0x75, 0x83, 0x00, 0x12, 0x1F, 0xBD, 0xFE, 0x90, 0x82, 0x72,
0x12, 0x42, 0x4A, 0x8F, 0x82, 0x75, 0x83, 0x00, 0xEE, 0x12, 0x1F, 0xFC, 0x90, 0x82, 0x79, 0xE0,
0x04, 0xF0, 0xE0, 0xB4, 0x14, 0xD3, 0x90, 0x82, 0x72, 0x12, 0x42, 0x4A, 0x90, 0x00, 0x14, 0x74,
0x80, 0x12, 0x1F, 0xFC, 0x90, 0x82, 0x79, 0x74, 0x15, 0xF0, 0x90, 0x82, 0x79, 0xE0, 0xFF, 0xC3,
0x94, 0x3E, 0x50, 0x17, 0x90, 0x82, 0x72, 0x12, 0x42, 0x4A, 0x8F, 0x82, 0x75, 0x83, 0x00, 0xE4,
0x12, 0x1F, 0xFC, 0x90, 0x82, 0x79, 0xE0, 0x04, 0xF0, 0x80, 0xDF, 0x90, 0x82, 0x72, 0x12, 0x42,
0x4A, 0x90, 0x00, 0x3E, 0x74, 0x02, 0x12, 0x1F, 0xFC, 0x90, 0x00, 0x3F, 0x74, 0xA0, 0x12, 0x1F,
0xFC, 0xE4, 0x90, 0x82, 0xBA, 0xF0, 0xA3, 0xF0, 0x90, 0x82, 0xBA, 0xE0, 0xFE, 0xA3, 0xE0, 0xFF,
0xC3, 0x94, 0x80, 0xEE, 0x94, 0x00, 0x40, 0x02, 0x81, 0x27, 0xC3, 0xEF, 0x94, 0x40, 0xEE, 0x94,
0x00, 0x50, 0x52, 0xA3, 0x74, 0x40, 0xF0, 0x74, 0x7A, 0x2F, 0xF9, 0xE4, 0x34, 0x82, 0xFA, 0x7B,
0x01, 0x74, 0x40, 0x44, 0x88, 0xFD, 0x12, 0x28, 0x08, 0x90, 0x82, 0xBA, 0xA3, 0xE0, 0x24, 0x7E,
0xF9, 0xE4, 0x34, 0x82, 0xFA, 0x7B, 0x01, 0xA3, 0xE0, 0x44, 0x89, 0xFD, 0x12, 0x28, 0x08, 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A, 0x7D, 0x80, 0x12, 0x2A, 0x8F, 0x90, 0x82, 0x76, 0x12, 0x42, 0x4A, 0xE9,
0x24, 0x0C, 0xF9, 0xE4, 0x3A, 0xFA, 0x7D, 0x81, 0x12, 0x2A, 0x8F, 0x90, 0x82, 0x76, 0x12, 0x42,
0x4A, 0xE9, 0x24, 0x08, 0xF9, 0xE4, 0x3A, 0xFA, 0x7D, 0x82, 0x12, 0x2A, 0x8F, 0x90, 0x82, 0x76,
0x12, 0x42, 0x4A, 0xE9, 0x24, 0x04, 0xF9, 0xE4, 0x3A, 0xFA, 0x7D, 0x83, 0x12, 0x2A, 0x8F, 0x90,
0x82, 0x76, 0x12, 0x42, 0x4A, 0x7D, 0x84, 0x12, 0x2A, 0x8F, 0xD0, 0xD0, 0x92, 0xAF, 0x22, 0x90,
0x83, 0x31, 0x12, 0x42, 0x53, 0x12, 0x1F, 0xA4, 0x90, 0x83, 0x36, 0xF0, 0x90, 0x00, 0x01, 0x12,
0x1F, 0xBD, 0x90, 0x83, 0x37, 0xF0, 0x90, 0x00, 0x04, 0x12, 0x1F, 0xBD, 0x90, 0x83, 0x38, 0xF0,
0x90, 0x00, 0x05, 0x12, 0x1F, 0xBD, 0x90, 0x83, 0x39, 0xF0, 0x90, 0x00, 0x06, 0x12, 0x1F, 0xBD,
0x90, 0x83, 0x3A, 0xF0, 0x90, 0x00, 0x07, 0x12, 0x1F, 0xBD, 0x90, 0x83, 0x3B, 0xF0, 0x90, 0x00,
0x03, 0x12, 0x1F, 0xBD, 0x90, 0x83, 0x3E, 0xF0, 0xED, 0x70, 0x31, 0xFF, 0x74, 0x36, 0x2F, 0xF5,
0x82, 0xE4, 0x34, 0x83, 0xF5, 0x83, 0xE0, 0xB4, 0xFF, 0x0E, 0x74, 0x36, 0x2F, 0xF5, 0x82, 0xE4,
0x34, 0x83, 0xF5, 0x83, 0xE4, 0xF0, 0x80, 0x0F, 0x74, 0x36, 0x2F, 0xF5, 0x82, 0xE4, 0x34, 0x83,
0xF5, 0x83, 0xE0, 0x04, 0xF0, 0x80, 0x05, 0x0F, 0xEF, 0xB4, 0x06, 0xD0, 0x90, 0x83, 0x35, 0xE0,
0xFF, 0xB4, 0x04, 0x25, 0xA3, 0xE0, 0xFE, 0x90, 0x83, 0x31, 0x12, 0x42, 0x4A, 0xEE, 0x12, 0x1F,
0xEA, 0x90, 0x83, 0x37, 0xE0, 0xFE, 0x90, 0x83, 0x31, 0x12, 0x42, 0x4A, 0x90, 0x00, 0x01, 0xEE,
0x12, 0x1F, 0xFC, 0x90, 0x00, 0x02, 0xE4, 0x80, 0x30, 0xEF, 0xB4, 0x02, 0x2F, 0x90, 0x83, 0x37,
0xE0, 0xFF, 0x90, 0x83, 0x31, 0x12, 0x42, 0x4A, 0xEF, 0x12, 0x1F, 0xEA, 0x90, 0x83, 0x37, 0xE0,
0x44, 0x20, 0x54, 0x7F, 0xFF, 0x90, 0x83, 0x31, 0x12, 0x42, 0x4A, 0x90, 0x00, 0x01, 0xEF, 0x12,
0x1F, 0xFC, 0x90, 0x83, 0x36, 0xE0, 0x90, 0x00, 0x02, 0x12, 0x1F, 0xFC, 0x90, 0x83, 0x31, 0x12,
0x42, 0x4A, 0xE9, 0x24, 0x03, 0xF9, 0xE4, 0x3A, 0xFA, 0x12, 0x1F, 0xA4, 0x44, 0x20, 0x12, 0x1F,
0xEA, 0x90, 0x83, 0x38, 0xE0, 0xFF, 0x90, 0x83, 0x31, 0x12, 0x42, 0x4A, 0x90, 0x00, 0x04, 0xEF,
0x12, 0x1F, 0xFC, 0x90, 0x83, 0x39, 0xE0, 0x90, 0x00, 0x05, 0x12, 0x1F, 0xFC, 0x90, 0x83, 0x3A,
0xE0, 0x90, 0x00, 0x06, 0x12, 0x1F, 0xFC, 0x90, 0x83, 0x3B, 0xE0, 0x90, 0x00, 0x07, 0x02, 0x1F,
0xFC, 0x90, 0x83, 0x4C, 0xED, 0xF0, 0x90, 0x83, 0x49, 0x12, 0x42, 0x53, 0x90, 0x00, 0x03, 0x12,
0x1F, 0xBD, 0x90, 0x83, 0x50, 0xF0, 0x90, 0x83, 0x49, 0x12, 0x42, 0x4A, 0x8B, 0x13, 0x8A, 0x14,
0x89, 0x15, 0x75, 0x16, 0x03, 0x7B, 0x01, 0x7A, 0x83, 0x79, 0x4D, 0x12, 0x2B, 0xED, 0x90, 0x83,
0x4C, 0xE0, 0x70, 0x46, 0xFF, 0x74, 0x4D, 0x2F, 0xF5, 0x82, 0xE4, 0x34, 0x83, 0xF5, 0x83, 0xE0,
0xB4, 0xFF, 0x0E, 0x74, 0x4D, 0x2F, 0xF5, 0x82, 0xE4, 0x34, 0x83, 0xF5, 0x83, 0xE4, 0xF0, 0x80,
0x0F, 0x74, 0x4D, 0x2F, 0xF5, 0x82, 0xE4, 0x34, 0x83, 0xF5, 0x83, 0xE0, 0x04, 0xF0, 0x80, 0x05,
0x0F, 0xEF, 0xB4, 0x03, 0xD0, 0x75, 0x13, 0x01, 0x75, 0x14, 0x83, 0x75, 0x15, 0x4D, 0x75, 0x16,
0x03, 0x90, 0x83, 0x49, 0x12, 0x42, 0x4A, 0x12, 0x2B, 0xED, 0x22, 0x00, 0x35, 0x41,
};
#if 0
u4Byte <API key> = 15554;
void
<API key>(
IN PDM_ODM_T pDM_Odm,
OUT u1Byte *pFirmware,
OUT u4Byte *pFirmwareSize
)
{
ODM_MoveMemory(pDM_Odm, pFirmware, <API key>, <API key>);
*pFirmwareSize = <API key>;
}
#endif
#endif // end of DM_ODM_SUPPORT_TYPE & (ODM_AP)
#endif // end of HWIMG_SUPPORT |
from django.db import models
from django.utils.encoding import <API key>
@<API key>
class area_annotation(models.Model):
"""
Not all parameters are listed here, only those that present some interest
in their Django implementation.
:param area: references :class:`.area`. This field is interesting because
it is both a Foreign Key to the Area model, as well as the Primary Key
for the Area Annotation model. In Django, this can be implemented as a
`OneToOneField`.
:param annotation: references :class:`.annotation`. Both the `area` and
the the `annotation` fields are primary keys in the SQL. In Django,
there can only be 1 primary key per model. The uniqueness required for
a primary key can be implemented in Django with a `OneToOneField`.
"""
area = models.OneToOneField('area', primary_key=True)
annotation = models.OneToOneField('annotation')
def __str__(self):
return 'Area Annotation'
class Meta:
db_table = 'area_annotation'
verbose_name_plural = 'Area Annotation' |
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http:
<head>
<title><API key>.download.downloader.Downloader</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="<API key>.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/geobricks/<API key>">Geobricks Downloader</a></th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="<API key>.html">Package <API key></a> ::
<a href="<API key>.download-module.html">Package download</a> ::
<a href="<API key>.download.downloader-module.html">Module downloader</a> ::
Class Downloader
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="<API key>.download.downloader.Downloader-class.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Class Downloader</h1><p class="nomargin-top"><span class="codelink"><a href="<API key>.download.downloader-pysrc.html#Downloader">source code</a></span></p>
<a name="<API key>"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="<API key>.download.downloader.Downloader-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">source</span>,
<span class="summary-sig-arg"><API key></span>,
<span class="summary-sig-arg"><API key></span>,
<span class="summary-sig-arg">threaded</span>=<span class="summary-sig-default">False</span>,
<span class="summary-sig-arg">username</span>=<span class="summary-sig-default">None</span>,
<span class="summary-sig-arg">password</span>=<span class="summary-sig-default">None</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="<API key>.download.downloader-pysrc.html#Downloader.__init__">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="download"></a><span class="summary-sig-name">download</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="<API key>.download.downloader-pysrc.html#Downloader.download">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="download_standard"></a><span class="summary-sig-name">download_standard</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="<API key>.download.downloader-pysrc.html#Downloader.download_standard">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="download_threaded"></a><span class="summary-sig-name">download_threaded</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="<API key>.download.downloader-pysrc.html#Downloader.download_threaded">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="progress"></a><span class="summary-sig-name">progress</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">downloaded</span>,
<span class="summary-sig-arg">total</span>)</span></td>
<td align="right" valign="top">
<span class="codelink"><a href="<API key>.download.downloader-pysrc.html#Downloader.progress">source code</a></span>
</td>
</tr>
</table>
</td>
</tr>
</table>
<a name="<API key>"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Class Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="source"></a><span class="summary-name">source</span> = <code title="None">None</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="<API key>"></a><span class="summary-name"><API key></span> = <code title="None">None</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="<API key>"></a><span class="summary-name"><API key></span> = <code title="None">None</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="username"></a><span class="summary-name">username</span> = <code title="None">None</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="password"></a><span class="summary-name">password</span> = <code title="None">None</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="threaded"></a><span class="summary-name">threaded</span> = <code title="False">False</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="source_type"></a><span class="summary-name">source_type</span> = <code title="'FTP'"><code class="variable-quote">'</code><code class="variable-string">FTP</code><code class="variable-quote">'</code></code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="config"></a><span class="summary-name">config</span> = <code title="None">None</code>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a name="target_dir"></a><span class="summary-name">target_dir</span> = <code title="None">None</code>
</td>
</tr>
</table>
<a name="<API key>"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">source</span>,
<span class="sig-arg"><API key></span>,
<span class="sig-arg"><API key></span>,
<span class="sig-arg">threaded</span>=<span class="sig-default">False</span>,
<span class="sig-arg">username</span>=<span class="sig-default">None</span>,
<span class="sig-arg">password</span>=<span class="sig-default">None</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
><span class="codelink"><a href="<API key>.download.downloader-pysrc.html#Downloader.__init__">source code</a></span>
</td>
</tr></table>
<dl class="fields">
<dt>Parameters:</dt>
<dd><ul class="nomargin-top">
<li><strong class="pname"><code>source</code></strong> (String) - e.g. 'modis', either lower or upper case.</li>
<li><strong class="pname"><code><API key></code></strong> (String | Dict) - This parameter can be either a String, representing the target
directory for the downloads (e.g. '/home/user/Desktop'), or a
Dict, describing the file system structure (e.g. {'target':
'/home/kalimaha/Desktop/MODIS', 'product': 'MOD13Q1', 'year':
'2014', 'day': '033'})</li>
<li><strong class="pname"><code><API key></code></strong> (Array) - Collection of objects containing the following fields:
'file_name', 'size', 'file_path', 'label'.</li>
<li><strong class="pname"><code>threaded</code></strong> (Boolean) - Run the downloader in multiple or single thread mode.</li>
<li><strong class="pname"><code>username</code></strong> (String) - Optional parameter.</li>
<li><strong class="pname"><code>password</code></strong> (String) - Optional parameter.</li>
</ul></dd>
</dl>
</td></tr></table>
</div>
<br />
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="<API key>.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
><a class="navbar" target="_top" href="https://github.com/geobricks/<API key>">Geobricks Downloader</a></th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Wed Oct 29 16:39:37 2014
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
</script>
</body>
</html> |
<?php
class CM_API{
private $name;
private $email_address;
private $api_key;
private $list_id;
private $subscription_option;
private $custom_field_name;
private $typesWithOptions;
// private $custom_field_id;
private $custom_field_obj;
private $custom_fields;
private $<API key>;
private $lists_connection;
public function __construct($api_key, $list_id)
{
$this->$api_key = $api_key;
$this->$list_id = $list_id;
$this->typesWithOptions = array(
'MultiSelectOne',
'MultiSelectMany'
);
//create <API key>
$this-><API key> = new CS_REST_Subscribers(
$list_id, array('api_key'=>$api_key)
);
$this->lists_connection = new CS_REST_Lists(
$list_id, array('api_key'=>$api_key)
);
}
public function subscribe($name, $email_address)
{
$this->name = $name;
$this->email_address = $email_address;
// $this->subscription_option = $subscription_option;
// $this->custom_field_name = $subscription_field;
$options = array(
'Name' => $this->name,
'EmailAddress' => $this->email_address,
'Resubscribe' => true
);
$user_details = $this->get_subscriber();
$<API key> = null;
if(!is_null($user_details))
{
// we have an existing user, grab their custom fields
$<API key> = $user_details->CustomFields;
}
if($this-><API key>($<API key>)){
//returns true if there are custom fields associated with our subscriber
$options['CustomFields'] = $this->custom_fields;
}
$api_result = $this-><API key>->add($options);
if(!$api_result->was_successful()){
throw new Exception('Unable to add subscriber: '.$api_result->report_error);
}
}
public function <API key>(&$current_values = null)
{
$<API key> = $this->lists_connection->get_custom_fields()->response;
if(is_null($current_values) && is_null($this->custom_fields)){
//no custom field values to deal with
return false;
}
foreach((array) $this->custom_fields as $key => &$value){
// iterate through fields, making sure they exist, and that the value is a viable option.
foreach ($<API key> as $fieldId => $field) {
if($value['FieldName'] === $field->FieldName){
$value['Key'] = $field->Key;
if(isset($field->FieldOptions)){
$value['Options'] = $field->FieldOptions;
$value['FieldOptions'] = &$value['Options'];
$value['DataType'] = $field->DataType;
}
break;
}
}
if(!isset($value['Key'])){ //not an existing custom field, create it
if(in_array($value['DataType'], $this->typesWithOptions)){//field type has pre-defined options
$value['Options'] = array($value['Value']);
}
$api_result = $this->lists_connection->create_custom_field($value);
if($api_result->was_successful()){
$value['Key'] = $api_result->response;
} else {
throw new Exception("Error adding new custom field: ".$api_result->response);
}
}
if(in_array($value['DataType'], $this->typesWithOptions) && !in_array($value['Value'],$value['Options'])){//availible options doesn't include our new value, add it
$api_result = $this->lists_connection-><API key>(
$value['Key'],
array($value['Value']),
true //keep existing options
);
if(!$api_result->was_successful()){
throw new Exception("Error adding new option to custom field: ".$api_result->response);
}
$value['Options'][] = $value['Value'];
}
// update the current values array with the new values
if($value['DataType'] != <API key>){ //check if field already has a value, and replace it
$found = false;
if(is_array($current_values)){
foreach ($current_values as &$current_value) {
if($current_value->Key == $value['FieldName']){
$found = true;
$current_value->Value = $value['Value'];
}
}
}
if(!$found){ //field doesn't currently have a value
$current_values[] = (object) array(
'Key'=>$value['FieldName'],
'Value'=>$value['Value']
);
}
} else { //multiselect, add the new value as an additional value
$current_values[] = (object) array(
'Key'=>$value['FieldName'],
'Value'=>$value['Value']
);
}
}
$this->custom_fields = $current_values;
return true;
}
/*
*
* Valid $type input values
* <API key> = Text
* <API key> = Number
* <API key> = MultiSelectOne
* <API key> = MultiSelectMany
* <API key> = Date
* <API key> = Country
*
*/
public function <API key>($key, $value, $type = <API key>, $add = false)
{
$this->custom_fields[] = array('FieldName' => $key, 'Value' => $value, 'DataType' => $type);
}
public function get_custom_fields()
{
return $this->custom_fields;
}
private function get_subscriber()
{
$result = $this-><API key>->get($this->email_address);
if($result->was_successful()){
return $result->response;
} else {
return null;
}
}
} |
package net.nikr.eve.jeveasset.io.local;
import java.io.FileWriter;
import java.io.IOException;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.supercsv.io.CsvMapWriter;
import org.supercsv.io.ICsvMapWriter;
import org.supercsv.prefs.CsvPreference;
public final class CsvWriter {
private static final Logger LOG = LoggerFactory.getLogger(CsvWriter.class);
private CsvWriter() { }
public static boolean save(final String filename, final List<Map<String, String>> data, final String[] header, final String[] headerKeys, final CsvPreference csvPreference) {
CsvWriter writer = new CsvWriter();
return writer.write(filename, data, header, headerKeys, csvPreference);
}
private boolean write(final String filename, final List<Map<String, String>> data, final String[] header, final String[] headerKeys, final CsvPreference csvPreference) {
ICsvMapWriter writer;
try {
writer = new CsvMapWriter(new FileWriter(filename), csvPreference);
writer.writeHeader(header);
for (Map<String, String> map : data) {
writer.write(map, headerKeys);
}
writer.close();
} catch (IOException ex) {
LOG.warn("CSV file not saved");
return false;
}
LOG.info("CSV file saved");
return true;
}
} |
<?php
defined('_JEXEC') or die;
JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');
// Create some shortcuts.
$params = &$this->item->params;
$n = count($this->items);
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
// Check for at least one editable article
$isEditable = false;
if (!empty($this->items))
{
foreach ($this->items as $article)
{
if ($article->params->get('access-edit'))
{
$isEditable = true;
break;
}
}
}
?>
<?php if (empty($this->items)) : ?>
<?php if ($this->params->get('show_no_articles', 1)) : ?>
<p><?php echo JText::_('<API key>'); ?></p>
<?php endif; ?>
<?php else : ?>
<form action="<?php echo htmlspecialchars(JUri::getInstance()->toString()); ?>" method="post" name="adminForm" id="adminForm" class="form-inline">
<?php if ($this->params->get('show_headings') || $this->params->get('filter_field') != 'hide' || $this->params->get('<API key>')) :?>
<fieldset class="filters btn-toolbar clearfix">
<?php if ($this->params->get('filter_field') != 'hide') :?>
<div class="btn-group">
<label class="filter-search-lbl element-invisible" for="filter-search">
<?php echo JText::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL') . ' '; ?>
</label>
<input type="text" name="filter-search" id="filter-search" value="<?php echo $this->escape($this->state->get('list.filter')); ?>" class="inputbox" onchange="document.adminForm.submit();" title="<?php echo JText::_('<API key>'); ?>" placeholder="<?php echo JText::_('COM_CONTENT_' . $this->params->get('filter_field') . '_FILTER_LABEL'); ?>" />
</div>
<?php endif; ?>
<?php if ($this->params->get('<API key>')) : ?>
<div class="btn-group pull-right">
<label for="limit" class="element-invisible">
<?php echo JText::_('JGLOBAL_DISPLAY_NUM'); ?>
</label>
<?php echo $this->pagination->getLimitBox(); ?>
</div>
<?php endif; ?>
<input type="hidden" name="filter_order" value="" />
<input type="hidden" name="filter_order_Dir" value="" />
<input type="hidden" name="limitstart" value="" />
<input type="hidden" name="task" value="" />
</fieldset>
<?php endif; ?>
<table class="category table table-striped table-bordered table-hover">
<?php
$headerTitle = '';
$headerDate = '';
$headerAuthor = '';
$headerHits = '';
$headerEdit = '';
?>
<?php if ($this->params->get('show_headings')) : ?>
<?php
$headerTitle = 'headers="<API key>"';
$headerDate = 'headers="<API key>"';
$headerAuthor = 'headers="<API key>"';
$headerHits = 'headers="<API key>"';
$headerEdit = 'headers="<API key>"';
?>
<thead>
<tr>
<th id="<API key>">
<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?>
</th>
<?php if ($date = $this->params->get('list_show_date')) : ?>
<th id="<API key>">
<?php if ($date == "created") : ?>
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.created', $listDirn, $listOrder); ?>
<?php elseif ($date == "modified") : ?>
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.modified', $listDirn, $listOrder); ?>
<?php elseif ($date == "published") : ?>
<?php echo JHtml::_('grid.sort', 'COM_CONTENT_' . $date . '_DATE', 'a.publish_up', $listDirn, $listOrder); ?>
<?php endif; ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_author')) : ?>
<th id="<API key>">
<?php echo JHtml::_('grid.sort', 'JAUTHOR', 'author', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($this->params->get('list_show_hits')) : ?>
<th id="<API key>">
<?php echo JHtml::_('grid.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?>
</th>
<?php endif; ?>
<?php if ($isEditable) : ?>
<th id="<API key>"><?php echo JText::_('<API key>'); ?></th>
<?php endif; ?>
</tr>
</thead>
<?php endif; ?>
<tbody>
<?php foreach ($this->items as $i => $article) : ?>
<?php if ($this->items[$i]->state == 0) : ?>
<tr class="system-unpublished cat-list-row<?php echo $i % 2; ?>">
<?php else: ?>
<tr class="cat-list-row<?php echo $i % 2; ?>" >
<?php endif; ?>
<td <?php echo $headerTitle; ?> class="list-title">
<?php if (in_array($article->access, $this->user->get<API key>())) : ?>
<a href="<?php echo JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language)); ?>">
<?php echo $this->escape($article->title); ?>
</a>
<?php else: ?>
<?php
echo $this->escape($article->title) . ' : ';
$menu = JFactory::getApplication()->getMenu();
$active = $menu->getActive();
$itemId = $active->id;
$link = JRoute::_('index.php?option=com_users&view=login&Itemid=' . $itemId);
$returnURL = JRoute::_(ContentHelperRoute::getArticleRoute($article->slug, $article->catid, $article->language));
$fullURL = new JUri($link);
$fullURL->setVar('return', base64_encode($returnURL));
?>
<a href="<?php echo $fullURL; ?>" class="register">
<?php echo JText::_('<API key>'); ?>
</a>
<?php endif; ?>
<?php if ($article->state == 0) : ?>
<span class="list-published label label-warning">
<?php echo JText::_('JUNPUBLISHED'); ?>
</span>
<?php endif; ?>
<?php if (strtotime($article->publish_up) > strtotime(JFactory::getDate())) : ?>
<span class="list-published label label-warning">
<?php echo JText::_('JNOTPUBLISHEDYET'); ?>
</span>
<?php endif; ?>
<?php if ((strtotime($article->publish_down) < strtotime(JFactory::getDate())) && $article->publish_down != JFactory::getDbo()->getNullDate()) : ?>
<span class="list-published label label-warning">
<?php echo JText::_('JEXPIRED'); ?>
</span>
<?php endif; ?>
</td>
<?php if ($this->params->get('list_show_date')) : ?>
<td <?php echo $headerDate; ?> class="list-date small">
<?php
echo JHtml::_(
'date', $article->displayDate,
$this->escape($this->params->get('date_format', JText::_('DATE_FORMAT_LC3')))
); ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_author', 1)) : ?>
<td <?php echo $headerAuthor; ?> class="list-author">
<?php if (!empty($article->author) || !empty($article->created_by_alias)) : ?>
<?php $author = $article->author ?>
<?php $author = ($article->created_by_alias ? $article->created_by_alias : $author);?>
<?php if (!empty($article->contact_link) && $this->params->get('link_author') == true) : ?>
<?php echo JText::sprintf('<API key>', JHtml::_('link', $article->contact_link, $author)); ?>
<?php else: ?>
<?php echo JText::sprintf('<API key>', $author); ?>
<?php endif; ?>
<?php endif; ?>
</td>
<?php endif; ?>
<?php if ($this->params->get('list_show_hits', 1)) : ?>
<td <?php echo $headerHits; ?> class="list-hits">
<span class="badge badge-info">
<?php echo JText::sprintf('JGLOBAL_HITS_COUNT', $article->hits); ?>
</span>
</td>
<?php endif; ?>
<?php if ($isEditable) : ?>
<td <?php echo $headerEdit; ?> class="list-edit">
<?php if ($article->params->get('access-edit')) : ?>
<?php echo JHtml::_('icon.edit', $article, $params); ?>
<?php endif; ?>
</td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php endif; ?>
<?php // Code to add a link to submit an article. ?>
<?php if ($this->category->getParams()->get('access-create')) : ?>
<?php echo JHtml::_('icon.create', $this->category, $this->category->params); ?>
<?php endif; ?>
<?php // Add pagination links ?>
<?php if (!empty($this->items)) : ?>
<?php if ($this->params->def('show_pagination', 2) == 1 || ($this->params->get('show_pagination') == 2 && $this->pagination->pagesTotal > 1)) : ?>
<div class="pagination">
<?php if ($this->params->def('<API key>', 1)) : ?>
<p class="counter pull-right">
<?php echo $this->pagination->getPagesCounter(); ?>
</p>
<?php endif; ?>
<?php echo $this->pagination->getPagesLinks(); ?>
</div>
<?php endif; ?>
</form>
<?php endif; ?> |
@extends('layouts.scaffold')
@section('main')
<h1>Administrative Dashboard</h1>
<p>Nice to see you, <b>{{{ Auth::user()->username }}}</b></p>
@stop |
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http:
<head>
<title>schrodinger.pipeline.stages.filtering.ChargeFilterStage</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="schrodinger-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>Suite 2012 Schrodinger Python API</th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="schrodinger-module.html">Package schrodinger</a> ::
<a href="schrodinger.pipeline-module.html">Package pipeline</a> ::
<a href="schrodinger.pipeline.stages-module.html">Package stages</a> ::
<a href="schrodinger.pipeline.stages.filtering-module.html">Module filtering</a> ::
Class ChargeFilterStage
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="schrodinger.pipeline.stages.filtering.<API key>.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Class ChargeFilterStage</h1><p class="nomargin-top"></p>
<pre class="base-tree">
UserDict.UserDict
|
UserDict.IterableUserDict
|
<a href="schrodinger.pipeline.stage.Stage-class.html">stage.Stage</a>
|
<strong class="uidshort">ChargeFilterStage</strong>
</pre>
<hr />
<p>Stage-based class for filtering a set of structure files by total
charge.</p>
<p>MIN_CHARGE and MAX_CHARGE are the two keywords specific to this stage.
If a structure has a total charge within [MIN_CHARGE,MAX_CHARGE]
(inclusive), it is retained; otherwise, the structure is filtered
out.</p>
<p>The stage takes one input structure file set and generates one set of
corresponding output structure files.</p>
<a name="<API key>"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="schrodinger.pipeline.stages.filtering.<API key>.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">*args</span>,
<span class="summary-sig-arg">**kwargs</span>)</span><br />
See class docstring.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="schrodinger.pipeline.stages.filtering.<API key>.html#operate" class="summary-sig-name">operate</a>(<span class="summary-sig-arg">self</span>)</span><br />
Read all the structures in the input files.</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="<API key>"><b>Inherited from <code><a href="schrodinger.pipeline.stage.Stage-class.html">stage.Stage</a></code></b>:
<code><a href="schrodinger.pipeline.stage.Stage-class.html#JobDJOptions">JobDJOptions</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#__getitem__">__getitem__</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#__getstate__">__getstate__</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#addExpectedInput">addExpectedInput</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#addExpectedOutput">addExpectedOutput</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#addOutputFile">addOutputFile</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#checkFile">checkFile</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#checkFiles">checkFiles</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#checkInputs">checkInputs</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#checkParameters">checkParameters</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#checkProducts">checkProducts</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#debug">debug</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#dump">dump</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#error">error</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#exit">exit</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#genFileName">genFileName</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#genOutputFileName">genOutputFileName</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getAdjustedNJobs">getAdjustedNJobs</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getCleanupRequested">getCleanupRequested</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getHostList">getHostList</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getHostStr">getHostStr</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getInput">getInput</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getInputNames">getInputNames</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getJobDJ">getJobDJ</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getLocal">getLocal</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getMaxRetries">getMaxRetries</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getNJobs">getNJobs</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getName">getName</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getOutput">getOutput</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getOutputName">getOutputName</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getOutputNames">getOutputNames</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getRuntimePath">getRuntimePath</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getStageDirectory">getStageDirectory</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#getVerbosity">getVerbosity</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#hasCompleted">hasCompleted</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#hasStarted">hasStarted</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#info">info</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#iterInputs">iterInputs</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#log">log</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#lognoret">lognoret</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#mainProduct">mainProduct</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#outputRequested">outputRequested</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#productsInstalled">productsInstalled</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#reportParameters">reportParameters</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#requiredProduct">requiredProduct</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#<API key>"><API key></a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#run">run</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#runJobDJ">runJobDJ</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#setInput">setInput</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#setJobDJOptions">setJobDJOptions</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#setJobOptions">setJobOptions</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#setMainProduct">setMainProduct</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#setOutput">setOutput</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#setOutputName">setOutputName</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#updateJobdj">updateJobdj</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#validateValues">validateValues</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#waitForFileStatus">waitForFileStatus</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#waitForFiles">waitForFiles</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#warning">warning</a></code>
</p>
<div class="private"> <p class="<API key>"><b>Inherited from <code><a href="schrodinger.pipeline.stage.Stage-class.html">stage.Stage</a></code></b> (private):
<code><a href="schrodinger.pipeline.stage.Stage-class.html#_adjustNJobs" onclick="show_private();">_adjustNJobs</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#_calcStsPerJob" onclick="show_private();">_calcStsPerJob</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#_getNCpus" onclick="show_private();">_getNCpus</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#_inputCheck" onclick="show_private();">_inputCheck</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#_minVersionPresent" onclick="show_private();">_minVersionPresent</a></code>,
<code><a href="schrodinger.pipeline.stage.Stage-class.html#<API key>" onclick="show_private();"><API key></a></code>
</p></div>
<p class="<API key>"><b>Inherited from <code>UserDict.IterableUserDict</code></b>:
<code>__iter__</code>
</p>
<p class="<API key>"><b>Inherited from <code>UserDict.UserDict</code></b>:
<code>__cmp__</code>,
<code>__contains__</code>,
<code>__delitem__</code>,
<code>__len__</code>,
<code>__repr__</code>,
<code>__setitem__</code>,
<code>clear</code>,
<code>copy</code>,
<code>get</code>,
<code>has_key</code>,
<code>items</code>,
<code>iteritems</code>,
<code>iterkeys</code>,
<code>itervalues</code>,
<code>keys</code>,
<code>pop</code>,
<code>popitem</code>,
<code>setdefault</code>,
<code>update</code>,
<code>values</code>
</p>
</td>
</tr>
</table>
<a name="<API key>"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Class Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="<API key>"><b>Inherited from <code>UserDict.UserDict</code></b>:
<code>fromkeys</code>
</p>
</td>
</tr>
</table>
<a name="<API key>"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Class Variables</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="<API key>"><b>Inherited from <code>UserDict.UserDict</code></b>:
<code>__hash__</code>
</p>
</td>
</tr>
</table>
<a name="<API key>"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">*args</span>,
<span class="sig-arg">**kwargs</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
<p>See class docstring.</p>
<dl class="fields">
<dt>Overrides:
UserDict.UserDict.__init__
</dt>
</dl>
</td></tr></table>
</div>
<a name="operate"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">operate</span>(<span class="sig-arg">self</span>)</span>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
<p>Read all the structures in the input files. If a structure's total
charge is between MIN_CHARGE and MAX_CHARGE, write it to a the
corresponding output file. Raises an IOError if there is a problem
reading an input file or writing an output file, and raises a SystemExit
if there are no output structures.</p>
<dl class="fields">
<dt>Overrides:
<a href="schrodinger.pipeline.stage.Stage-class.html#operate">stage.Stage.operate</a>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Home link -->
<th> <a
href="schrodinger-module.html">Home</a> </th>
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>Suite 2012 Schrodinger Python API</th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Tue Sep 25 02:23:05 2012
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
</script>
</body>
</html> |
from dbmail.providers.microsoft.base import MPNSBase
class MPNSRaw(MPNSBase):
NOTIFICATION_CLS = 3
TARGET = 'raw'
def payload(self, payload):
return payload
def send(uri, *_, **kwargs):
return MPNSRaw().send(uri, kwargs) |
{% extends "base.html" %}
{% load cms_tags staticfiles sekizai_tags menu_tags %}
{% block content %}
<article class="article container">
<div>
<h2> {% page_attribute "page_title" %} </h2>
{% placeholder "content" %}
</div>
</article>
{% endblock content %} |
package in.shabhushan.algo_trials.algorithms.chapter1.section5;
/**
* This is the lazy approach
* Union is quick but find takes more time if the tree is too tall.
*
* on n objects, find would take O(n^2) time
*/
public class WeightedQuickUnion implements UnionFind {
private int[] parent;
private int[] size;
private int count;
private int totalCount;
private int findCount;
private int checkParentCount;
private int updateParentCount;
public WeightedQuickUnion(int numComponents) {
parent = new int[numComponents];
size = new int[numComponents];
count = numComponents;
for (int i = 0; i < numComponents; i++) {
parent[i] = i;
size[i] = 1;
}
}
@Override
public void union(int p, int q) {
int rootP = find(p);
int rootQ = find(q);
if (rootP == rootQ) return;
updateParentCount++;
totalCount++;
if (size[rootP] < size[rootQ]) {
parent[rootP] = rootQ;
size[rootQ] += size[rootP];
} else {
parent[rootQ] = rootP;
size[rootP] += rootQ;
}
count
}
@Override
public boolean connected(int p, int q) {
p = find(p);
q = find(q);
return p == q;
}
@Override
public int find(int p) {
findCount++;
totalCount++;
while (parent[p] != p) {
checkParentCount++;
totalCount++;
p = parent[p];
}
return p;
}
@Override
public int count() {
return count;
}
@Override
public int[] getParent() {
return parent;
}
@Override
public int[] getTotalCount() {
int[] stats = new int[]{totalCount, findCount, checkParentCount, updateParentCount};
resetStats();
return stats;
}
private void resetStats() {
totalCount = 0;
findCount = 0;
checkParentCount = 0;
updateParentCount = 0;
}
} |
<!
IE 6 makes the page to wide with the following doctype. I accept
standards if they help me, not if they make anything even harder!
<!--NewPage
<HTML>
<HEAD>
<TITLE>Docs for page site_support.php</TITLE>
<LINK REL ='stylesheet' TYPE='text/css' HREF='../media/stylesheet.css' TITLE='Style'>
</HEAD>
<BODY BGCOLOR='white'>
<a name="top"></a><h3><SPAN class="type">File:</SPAN> /com_content/views/consulting/tmpl/site_support.php<HR>
</h3>
<p class="label"><b>filesource</b></p>
<p class=indent><a href="../__filesource/<API key>.php.html">Source Code for this file</a></p>
Classes in this file:
<dl>
</dl>
<hr>
<A NAME='include_summary'></A>
<H3>Include Statements Summary</H3>
<UL>
</UL>
<hr>
<A NAME='global_summary'></A>
<H3>Global Variable Summary</H3>
<UL>
</UL>
<hr>
<A NAME='constant_summary'></A>
<H3>Constant Summary</H3>
<UL>
</UL>
<hr>
<A NAME='function_summary'></A>
<H3>Function Summary</H3>
<UL>
</UL>
<hr>
<A NAME='include_detail'></A>
<H3>Include Statements Detail</H3>
<UL>
</UL>
<hr>
<A NAME='global_detail'></A>
<H3>Global Variable Detail</H3>
<UL>
</UL>
<hr>
<A NAME='constant_detail'></A>
<H3>Constant Detail</H3>
<UL>
</UL>
<hr>
<A NAME='function_detail'></A>
<H3>Function Detail</H3>
<UL>
</UL>
<hr>
<div id="credit">
<hr>
Documentation generated on Sun, 29 Jul 2012 11:24:16 +0400 by <a href="http:
</div>
</body>
</html>
</HTML> |
package com.openlinksw.bibm.tpchRefresh;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import com.csvreader.CsvReader;
import com.openlinksw.bibm.Exceptions.BadSetupException;
import com.openlinksw.bibm.Exceptions.ExceptionException;
import com.openlinksw.bibm.Exceptions.<API key>;
import com.openlinksw.util.DoubleLogger;
public class Refresh2 extends AbstractTestDriver {
File deleteFile;
private Connection conn;
public Refresh2(String args[]) throws IOException {
super(version, "Usage: com.openlinksw.bibm.tpchRefresh.Refresh2 <options> endpoints...", // CHECK package
"endpoint: The URL of the HTTP SPARQL or SQL endpoint");
<API key>(args);
deleteFile=new File(updateDir, "delete."+dsN.getValue());
if (!deleteFile.exists()) {
fatal("File not exisis:"+deleteFile.getCanonicalPath());
}
System.out.println("..done");
try {
conn = DriverManager.getConnection(endPoint);
} catch (SQLException e0) {
SQLException e=e0;
while(e!=null) {
e.printStackTrace();
e=e.getNextException();
}
throw new ExceptionException("SQLConnection()", e0);
}
}
private PreparedStatement <API key>(String updateString) throws SQLException {
PreparedStatement res=null;
try {
res = conn.prepareStatement(updateString);
return res;
} catch (SQLException e) {
// System.err.println(e.toString());
System.err.println(updateString);
throw e;
}
}
public void run() throws Exception {
BufferedReader freader = new BufferedReader(new FileReader(deleteFile) , 0x10000);
CsvReader reader=new CsvReader(freader, '|');
PreparedStatement stmt1=<API key>("DELETE FROM ORDERS WHERE O_ORDERKEY =?") ;
PreparedStatement stmt2=<API key>("DELETE FROM LINEITEM WHERE L_ORDERKEY =?") ;
int batchSize=2000;
int recN=0;
boolean eof=false;
for ( ; ; ) {
int n;
String[] values=null;
for (n=0; ; ) {
if (!reader.readRecord()) {
eof=true;
break;
}
values = reader.getValues();
for (int k = 0; k < values.length; k++) {
String value = values[k];
if (value.length()==0) {
// dbgen emits empy fields at the end of records
continue;
}
stmt1.setLong(k+1, Long.parseLong(value));
stmt1.addBatch();
recN++;
n++;
}
if (n>= batchSize) {
break;
}
}
if (n==0) {
break;
}
stmt1.executeBatch();
stmt2.executeBatch();
if (eof) {
break;
}
}
stmt1.close();
stmt2.close();
System.out.println(" ... file "+deleteFile.getCanonicalPath()+": "+recN+" processed");
}
public static void main(String argv[]) throws <API key> {
Refresh2 testDriver = null;
int res=1;
try {
testDriver = new Refresh2(argv);
testDriver.run();
res=0;
} catch (Throwable e) {
e.printStackTrace();
} finally {
System.exit(res);
}
}
} |
<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http:
<head>
<title>schrodinger.trajectory.ffstructure._FFBond</title>
<link rel="stylesheet" href="epydoc.css" type="text/css" />
<script type="text/javascript" src="epydoc.js"></script>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
alink="#204080">
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>2015-2Schrodinger Python API</th>
</tr></table></th>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="100%">
<span class="breadcrumbs">
<a href="schrodinger-module.html">Package schrodinger</a> ::
<a href="schrodinger.trajectory-module.html">Package trajectory</a> ::
<a href="schrodinger.trajectory.ffstructure-module.html">Module ffstructure</a> ::
Class _FFBond
</span>
</td>
<td>
<table cellpadding="0" cellspacing="0">
<!-- hide/show private -->
<tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
onclick="toggle_private();">hide private</a>]</span></td></tr>
<tr><td align="right"><span class="options"
>[<a href="frames.html" target="_top">frames</a
>] | <a href="schrodinger.trajectory.ffstructure._FFBond-class.html"
target="_top">no frames</a>]</span></td></tr>
</table>
</td>
</tr>
</table>
<h1 class="epydoc">Class _FFBond</h1><p class="nomargin-top"></p>
<pre class="base-tree">
<a href="object-class.html">object</a>
|
<strong class="uidshort">_FFBond</strong>
</pre>
<hr />
<p>A class to hold force field parameters for a bond.</p>
<a name="<API key>"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Instance Methods</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">ffhandle</span>,
<span class="summary-sig-arg">index</span>)</span><br />
x.__init__(...) initializes x; see help(type(x)) for signature</td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_getAi"></a><span class="summary-sig-name">_getAi</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_setAi"></a><span class="summary-sig-name">_setAi</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_getAj"></a><span class="summary-sig-name">_getAj</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_setAj"></a><span class="summary-sig-name">_setAj</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_getC1"></a><span class="summary-sig-name">_getC1</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_setC1"></a><span class="summary-sig-name">_setC1</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_getC2"></a><span class="summary-sig-name">_getC2</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_setC2"></a><span class="summary-sig-name">_setC2</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_getFunct"></a><span class="summary-sig-name">_getFunct</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_setFunct"></a><span class="summary-sig-name">_setFunct</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_getProperty"></a><span class="summary-sig-name">_getProperty</span>(<span class="summary-sig-arg">self</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr class="private">
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td><span class="summary-sig"><a name="_setProperty"></a><span class="summary-sig-name">_setProperty</span>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">d</span>)</span></td>
<td align="right" valign="top">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="<API key>"><b>Inherited from <code><a href="object-class.html">object</a></code></b>:
<code><a href="object-class.html#__delattr__">__delattr__</a></code>,
<code><a href="object-class.html#__format__">__format__</a></code>,
<code><a href="object-class.html#__getattribute__">__getattribute__</a></code>,
<code><a href="object-class.html#__hash__">__hash__</a></code>,
<code><a href="object-class.html#__new__">__new__</a></code>,
<code><a href="object-class.html#__reduce__">__reduce__</a></code>,
<code><a href="object-class.html#__reduce_ex__">__reduce_ex__</a></code>,
<code><a href="object-class.html#__repr__">__repr__</a></code>,
<code><a href="object-class.html#__setattr__">__setattr__</a></code>,
<code><a href="object-class.html#__sizeof__">__sizeof__</a></code>,
<code><a href="object-class.html#__str__">__str__</a></code>,
<code><a href="object-class.html#__subclasshook__">__subclasshook__</a></code>
</p>
</td>
</tr>
</table>
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Properties</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#section-Properties"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="schrodinger.trajectory.ffstructure._FFBond-class.html#ai" class="summary-name">ai</a><br />
atom index 1
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="schrodinger.trajectory.ffstructure._FFBond-class.html#aj" class="summary-name">aj</a><br />
atom index 2
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="schrodinger.trajectory.ffstructure._FFBond-class.html#c1" class="summary-name">c1</a><br />
ideal bond length
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="schrodinger.trajectory.ffstructure._FFBond-class.html#c2" class="summary-name">c2</a><br />
force constant
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="schrodinger.trajectory.ffstructure._FFBond-class.html#funct" class="summary-name">funct</a><br />
function name
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="summary">
<span class="summary-type"> </span>
</td><td class="summary">
<a href="schrodinger.trajectory.ffstructure._FFBond-class.html#property" class="summary-name">property</a><br />
properties
</td>
</tr>
<tr>
<td colspan="2" class="summary">
<p class="<API key>"><b>Inherited from <code><a href="object-class.html">object</a></code></b>:
<code><a href="object-class.html#__class__">__class__</a></code>
</p>
</td>
</tr>
</table>
<a name="<API key>"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Method Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="__init__"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr valign="top"><td>
<h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
<span class="sig-arg">ffhandle</span>,
<span class="sig-arg">index</span>)</span>
<br /><em class="fname">(Constructor)</em>
</h3>
</td><td align="right" valign="top"
>
</td>
</tr></table>
<p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
<dl class="fields">
<dt>Overrides:
object.__init__
<dd><em class="note">(inherited documentation)</em></dd>
</dt>
</dl>
</td></tr></table>
</div>
<br />
<a name="<API key>"></a>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
<td colspan="2" class="table-header">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr valign="top">
<td align="left"><span class="table-header">Property Details</span></td>
<td align="right" valign="top"
><span class="options">[<a href="#<API key>"
class="privatelink" onclick="toggle_private();"
>hide private</a>]</span></td>
</tr>
</table>
</td>
</tr>
</table>
<a name="ai"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">ai</h3>
<p>atom index 1</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_getAi" class="summary-sig-name" onclick="show_private();">_getAi</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_setAi" class="summary-sig-name" onclick="show_private();">_setAi</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="aj"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">aj</h3>
<p>atom index 2</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_getAj" class="summary-sig-name" onclick="show_private();">_getAj</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_setAj" class="summary-sig-name" onclick="show_private();">_setAj</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="c1"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">c1</h3>
<p>ideal bond length</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_getC1" class="summary-sig-name" onclick="show_private();">_getC1</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_setC1" class="summary-sig-name" onclick="show_private();">_setC1</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="c2"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">c2</h3>
<p>force constant</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_getC2" class="summary-sig-name" onclick="show_private();">_getC2</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_setC2" class="summary-sig-name" onclick="show_private();">_setC2</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="funct"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">funct</h3>
<p>function name</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_getFunct" class="summary-sig-name" onclick="show_private();">_getFunct</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_setFunct" class="summary-sig-name" onclick="show_private();">_setFunct</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">value</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<a name="property"></a>
<div>
<table class="details" border="1" cellpadding="3"
cellspacing="0" width="100%" bgcolor="white">
<tr><td>
<h3 class="epydoc">property</h3>
<p>properties</p>
<dl class="fields">
<dt>Get Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_getProperty" class="summary-sig-name" onclick="show_private();">_getProperty</a>(<span class="summary-sig-arg">self</span>)</span>
</dd>
<dt>Set Method:</dt>
<dd class="value"><span class="summary-sig"><a href="schrodinger.trajectory.ffstructure._FFBond-class.html#_setProperty" class="summary-sig-name" onclick="show_private();">_setProperty</a>(<span class="summary-sig-arg">self</span>,
<span class="summary-sig-arg">d</span>)</span>
</dd>
</dl>
</td></tr></table>
</div>
<br />
<table class="navbar" border="0" width="100%" cellpadding="0"
bgcolor="#a0c0ff" cellspacing="0">
<tr valign="middle">
<!-- Tree link -->
<th> <a
href="module-tree.html">Trees</a> </th>
<!-- Index link -->
<th> <a
href="identifier-index.html">Indices</a> </th>
<!-- Help link -->
<th> <a
href="help.html">Help</a> </th>
<!-- Project homepage -->
<th class="navbar" align="right" width="100%">
<table border="0" cellpadding="0" cellspacing="0">
<tr><th class="navbar" align="center"
>2015-2Schrodinger Python API</th>
</tr></table></th>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
<tr>
<td align="left" class="footer">
Generated by Epydoc 3.0.1 on Sat May 9 06:31:27 2015
</td>
<td align="right" class="footer">
<a target="mainFrame" href="http://epydoc.sourceforge.net"
>http://epydoc.sourceforge.net</a>
</td>
</tr>
</table>
<script type="text/javascript">
<!
// Private objects are initially displayed (because if
// javascript is turned off then we want them to be
// visible); but by default, we want to hide them. So hide
// them unless we have a cookie that says to show them.
checkCookie();
</script>
</body>
</html> |
package org.wordpress.android;
import android.os.StrictMode;
import com.facebook.stetho.Stetho;
import org.wordpress.android.util.AppLog;
import org.wordpress.android.util.AppLog.T;
public class WordPressDebug extends WordPress {
@Override
public void onCreate() {
super.onCreate();
// enableStrictMode()
Stetho.<API key>(this);
}
/**
* enables "strict mode" for testing - should NEVER be used in release builds
*/
private void enableStrictMode() {
// return if the build is not a debug build
if (!BuildConfig.DEBUG) {
AppLog.e(T.UTILS, "You should not call enableStrictMode() on a non debug build");
return;
}
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()
.detectDiskReads()
.detectDiskWrites()
.detectNetwork()
.penaltyLog()
.penaltyFlashScreen()
.build());
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectActivityLeaks()
.<API key>()
.<API key>()
.<API key>() // <-- requires Jelly Bean
.penaltyLog()
.build());
AppLog.w(T.UTILS, "Strict mode enabled");
}
} |
#include <sstream>
#include "<API key>.h"
#include "EngineChannel.h"
#include "Engine.h"
#include "../../common/global_private.h"
#include "../../common/Path.h"
#include "../../plugins/<API key>.h"
namespace LinuxSampler { namespace sf2 {
String <API key>::GetInstrumentName(instrument_id_t ID) {
Lock();
::sf2::Preset* pInstrument = Resource(ID, false);
String res = (pInstrument) ? pInstrument->GetName() : "";
Unlock();
return res;
}
std::vector<<API key>::instrument_id_t> <API key>::<API key>(String File) throw (<API key>) {
::RIFF::File* riff = NULL;
::sf2::File* sf2 = NULL;
try {
std::vector<instrument_id_t> result;
riff = new ::RIFF::File(File);
sf2 = new ::sf2::File(riff);
for (int i = 0; i < <API key>(sf2); i++) {
instrument_id_t id;
id.FileName = File;
id.Index = i;
result.push_back(id);
}
if (sf2) delete sf2;
if (riff) delete riff;
return result;
} catch (::RIFF::Exception e) {
if (sf2) delete sf2;
if (riff) delete riff;
throw <API key>(e.Message);
} catch (...) {
if (sf2) delete sf2;
if (riff) delete riff;
throw <API key>("Unknown exception while trying to parse '" + File + "'");
}
}
<API key>::instrument_info_t <API key>::GetInstrumentInfo(instrument_id_t ID) throw (<API key>) {
Lock();
::sf2::Preset* pInstrument = Resource(ID, false);
bool loaded = (pInstrument != NULL);
if (!loaded) Unlock();
::RIFF::File* riff = NULL;
::sf2::File* sf2 = NULL;
try {
if (!loaded) {
riff = new ::RIFF::File(ID.FileName);
sf2 = new ::sf2::File(riff);
pInstrument = GetSfInstrument(sf2, ID.Index);
}
instrument_info_t info;
for (int i = 0; i < 128; i++) { info.KeyBindings[i] = info.KeySwitchBindings[i] = 0; }
::sf2::File* pFile = pInstrument->GetFile();
info.FormatVersion = ToString(pFile->pInfo->pVer->Major);
info.Product = pFile->pInfo->Product;
info.Artists = pFile->pInfo->Engineers;
info.InstrumentName = pInstrument->Name;
for (int i = 0; i < pInstrument->GetRegionCount(); i++) {
int low = pInstrument->GetRegion(i)->loKey;
int high = pInstrument->GetRegion(i)->hiKey;
if (low == ::sf2::NONE || high == ::sf2::NONE) {
::sf2::Instrument* layer = pInstrument->GetRegion(i)->pInstrument;
for (int j = 0; j < layer->GetRegionCount(); j++) {
int lo = layer->GetRegion(j)->loKey;
int hi = layer->GetRegion(j)->hiKey;
SetKeyBindings(info.KeyBindings, lo, hi, ::sf2::NONE);
}
} else {
SetKeyBindings(info.KeyBindings, low, high, ::sf2::NONE);
}
}
if (loaded) Unlock();
if (sf2) delete sf2;
if (riff) delete riff;
return info;
} catch (::sf2::Exception e) {
if (loaded) Unlock();
if (sf2) delete sf2;
if (riff) delete riff;
throw <API key>(e.Message);
} catch (...) {
if (loaded) Unlock();
if (sf2) delete sf2;
if (riff) delete riff;
throw <API key>("Unknown exception while trying to parse '" + ID.FileName + "'");
}
}
::sf2::Preset* <API key>::Create(instrument_id_t Key, InstrumentConsumer* pConsumer, void*& pArg) {
// get sfz file from internal sfz file manager
::sf2::File* pSf2 = Sf2s.Borrow(Key.FileName, reinterpret_cast<Sf2Consumer*>(Key.Index)); // conversion kinda hackish :/
dmsg(1,("Loading sf2 instrument ('%s',%d)...",Key.FileName.c_str(),Key.Index));
::sf2::Preset* pInstrument = GetSfInstrument(pSf2, Key.Index);
dmsg(1,("OK\n"));
// cache initial samples points (for actually needed samples)
dmsg(1,("Caching initial samples..."));
float regTotal = 0, regCurrent = 0;
for (int i = 0 ; i < pInstrument->GetRegionCount() ; i++) {
::sf2::Instrument* sf2Instr = pInstrument->GetRegion(i)->pInstrument;
if (sf2Instr) regTotal += sf2Instr->GetRegionCount();
}
uint maxSamplesPerCycle = <API key>(pConsumer);
for (int i = 0 ; i < pInstrument->GetRegionCount() ; i++) {
::sf2::Instrument* sf2Instr = pInstrument->GetRegion(i)->pInstrument;
if (sf2Instr) {
// pInstrument is ::sf2::Preset
for (int j = 0 ; j < sf2Instr->GetRegionCount() ; j++) {
float localProgress = regCurrent++ / regTotal;
<API key>(Key, localProgress);
CacheInitialSamples(sf2Instr->GetRegion(j)->GetSample(), maxSamplesPerCycle);
}
}
}
dmsg(1,("OK\n"));
<API key>(Key, 1.0f); // done; notify all consumers about progress 100%
// we need the following for destruction later
instr_entry_t* pEntry = new instr_entry_t;
pEntry->ID.FileName = Key.FileName;
pEntry->ID.Index = Key.Index;
pEntry->pFile = pSf2;
// and we save this to check if we need to reallocate for an engine with higher value of 'MaxSamplesPerSecond'
pEntry->MaxSamplesPerCycle = maxSamplesPerCycle;
pArg = pEntry;
return pInstrument;
}
void <API key>::Destroy(::sf2::Preset* pResource, void* pArg) {
instr_entry_t* pEntry = (instr_entry_t*) pArg;
// we don't need the .sf2 file here anymore
Sf2s.HandBack(pEntry->pFile, reinterpret_cast<Sf2Consumer*>(pEntry->ID.Index)); // conversion kinda hackish :/
delete pEntry;
}
void <API key>::<API key>(::sf2::Region* pRegion, region_info_t* pRegInfo) {
// TODO: we could delete Region and Instrument here if they have become unused
}
void <API key>::<API key>(::sf2::Sample* pSample, region_info_t* pRegInfo) {
::sf2::File* sf2 = pRegInfo->file;
::RIFF::File* riff = static_cast< ::RIFF::File*>(pRegInfo->pArg);
if (sf2) {
sf2->DeleteSample(pSample);
if (!sf2->HasSamples()) {
dmsg(2,("No more samples in use - freeing sf2\n"));
delete sf2;
delete riff;
}
}
}
// internal sfz file manager
::sf2::File* <API key>::Sf2ResourceManager::Create(String Key, Sf2Consumer* pConsumer, void*& pArg) {
dmsg(1,("Loading sf2 file \'%s\'...", Key.c_str()));
::RIFF::File* pRIFF = new ::RIFF::File(Key);
::sf2::File* pSf2 = new ::sf2::File(pRIFF);
pArg = pRIFF;
dmsg(1,("OK\n"));
return pSf2;
}
void <API key>::Sf2ResourceManager::Destroy(::sf2::File* pResource, void* pArg) {
dmsg(1,("Freeing sf2 file from memory..."));
// Delete as much as possible of the sf2 file. Some of the
// regions and samples may still be in use - these
// will be deleted later by the HandBackRegion function.
bool deleteFile = true;
for (int i = pResource->GetInstrumentCount() - 1; i >= 0; i
::sf2::Instrument* pInstr = pResource->GetInstrument(i);
bool deleteInstrument = true;
for (int j = pInstr->GetRegionCount() - 1; j >= 0 ; j
::sf2::Region* pRegion = pInstr->GetRegion(j);
std::map< ::sf2::Region*, region_info_t>::iterator iter = parent->RegionInfo.find(pRegion);
if (iter != parent->RegionInfo.end()) {
region_info_t& regInfo = (*iter).second;
regInfo.file = pResource;
deleteFile = deleteInstrument = false;
} else {
pInstr->DeleteRegion(pRegion);
}
}
if (deleteInstrument) pResource->DeleteInstrument(pInstr);
}
if (deleteFile) {
delete pResource;
delete (::RIFF::File*) pArg;
} else {
dmsg(2,("keeping some samples that are in use..."));
for (int i = pResource->GetSampleCount() - 1; i >= 0; i
::sf2::Sample* sample = pResource->GetSample(i);
if (parent->SampleRefCount.find(sample) == parent->SampleRefCount.end()) {
pResource->DeleteSample(sample);
}
}
}
dmsg(1,("OK\n"));
}
int <API key>::<API key>(::sf2::File* pFile) {
return pFile->GetPresetCount();
}
::sf2::Preset* <API key>::GetSfInstrument(::sf2::File* pFile, int idx) {
if (idx >= pFile->GetPresetCount()) {
throw <API key>("There is no instrument with index " + ToString(idx));
}
return pFile->GetPreset(idx);
}
}} // namespace LinuxSampler::sfz |
# parallel-uglifyjs
Hunts for js files in a directory tree, and runs uglify-js on them in parallel
(one per CPU).
Easily modifiable to run any job in parallel (see worker.js).
On an 8-core machine a large test takes 2.5 hours utilising a single CPU, and
20 minutes with parallel-uglifyjs.
## Installation
$ npm install parallel-uglifyjs
## Usage
$ ./parallel_uglifyjs small_test |
<?php
namespace PHPExiftool\Driver\Tag\ID3v24;
use PHPExiftool\Driver\AbstractTag;
class InitialKey extends AbstractTag
{
protected $Id = 'TKEY';
protected $Name = 'InitialKey';
protected $FullName = 'ID3::v2_4';
protected $GroupName = 'ID3v2_4';
protected $g0 = 'ID3';
protected $g1 = 'ID3v2_4';
protected $g2 = 'Audio';
protected $Type = '?';
protected $Writable = false;
protected $Description = 'Initial Key';
} |
// INetGet - Lightweight command-line front-end to WinINet API
// This program is free software; you can redistribute it and/or
// as published by the Free Software Foundation; either version 2
// This program is distributed in the hope that it will be useful,
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#pragma once
#include <stdint.h>
class Timer
{
public:
Timer(void);
~Timer(void);
void reset(void);
double query(void);
private:
uint64_t m_reference;
const uint64_t m_frequency;
}; |
local function musiclink(msg, musicid)
local value = redis:hget('music:'..msg.to.id, musicid)
if not value then
return
else
value = value..'\n\n@XamarinTG'
return value
end
end
function sectomin (Sec)
if (tonumber(Sec) == nil) or (tonumber(Sec) == 0) then
return "00:00"
else
Seconds = math.floor(tonumber(Sec))
if Seconds < 1 then Seconds = 1 end
Minutes = math.floor(Seconds / 60)
Seconds = math.floor(Seconds - (Minutes * 60))
if Seconds < 10 then
Seconds = "0"..Seconds
end
if Minutes < 10 then
Minutes = "0"..Minutes
end
return Minutes..':'..Seconds
end
end
function run(msg, matches)
if string.match(msg.text, '[\216-\219][\128-\191]') then
return send_large_msg(get_receiver(msg), 'فارسی پشتیبانی نمیشود\nاز متن فینگلیش استفاده کنید. ')
end
if matches[1]:lower() == "dl" then
local value = redis:hget('music:'..msg.to.id, matches[2])
if not value then
return 'آهنگ مورد نظر پیدا نشد.'
else
value = value..'\n\n@XamarinTG'
return value
end
return
end
local url = http.request("http://api.gpmod.ir/music.search/?q="..URL.escape(matches[2]).."&count=30&sort=2")
-- Sort order:
-- max counts = 300
]]
local jdat = json:decode(url)
local text , time , num = ''
local hash = 'music:'..msg.to.id
redis:del(hash)
if #jdat.response < 2 then return "No result found." end
for i = 2, #jdat.response do
if 900 > jdat.response[i].duration then
num = i - 1
time = sectomin(jdat.response[i].duration)
text = text..num..'- Artist: '.. jdat.response[i].artist .. ' | '..time..'\nTitle: '..jdat.response[i].title..'\n\n'
redis:hset(hash, num, 'Artist: '.. jdat.response[i].artist .. '\nTitle: '..jdat.response[i].title..' | '..time..'\n\n'.."GPMod.ir/dl.php?q="..jdat.response[i].owner_id.."_"..jdat.response[i].aid)
end
end
text = text..'برای دریافـت لیـنـک دانلود آهـنـگ\nاز دستور (شماره) dl/ استفاده کنید.'
return text
end
return {
patterns = {
"^[/!]([Mm][Uu][Ss][Ii][Cc]) (.*)$",
"^[/!]([dD][Ll]) (.*)$"
},
run = run
} |
#include "oal_dt.h"
#include "usbdrv.h"
#include <linux/netlink.h>
#include <net/iw_handler.h>
zbuf_t* zfwBufAllocate(zdev_t* dev, u16_t len)
{
zbuf_t* buf;
buf = dev_alloc_skb(len);
return buf;
}
void zfwBufFree(zdev_t* dev, zbuf_t* buf, u16_t status)
{
dev_kfree_skb_any(buf);
}
u16_t zfwBufRemoveHead(zdev_t* dev, zbuf_t* buf, u16_t size)
{
buf->data += size;
buf->len -= size;
return 0;
}
u16_t zfwBufChain(zdev_t* dev, zbuf_t** head, zbuf_t* tail)
{
*head = tail;
return 0;
}
u16_t zfwBufCopy(zdev_t* dev, zbuf_t* dst, zbuf_t* src)
{
memcpy(dst->data, src->data, src->len);
dst->tail = dst->data;
skb_put(dst, src->len);
return 0;
}
u16_t zfwBufSetSize(zdev_t* dev, zbuf_t* buf, u16_t size)
{
#ifdef <API key>
buf->tail = 0;
buf->len = 0;
#else
buf->tail = buf->data;
buf->len = 0;
#endif
skb_put(buf, size);
return 0;
}
u16_t zfwBufGetSize(zdev_t* dev, zbuf_t* buf)
{
return buf->len;
}
void zfwCopyBufContext(zdev_t* dev, zbuf_t* source, zbuf_t* dst)
{
} |
<?php
defined('_JEXEC') or die('Restricted access');
?><div id="acy_content">
<div id="iframedoc"></div>
<form action="index.php?option=<?php echo <API key> ?>&ctrl=send" method="post" name="adminForm" id="adminForm" autocomplete="off">
<div>
<?php $displayWarning = false;
$config = acymailing_config();
$toggleClass = acymailing_get('helper.toggle');
if(empty($this->values->nbqueue)){
if(!empty($this->lists)){
?>
<div class="onelineblockoptions">
<span class="acyblocktitle"><?php echo <API key>('NEWSLETTER_SENT_TO'); ?></span>
<table class="acymailing_table" cellspacing="1" align="center">
<tbody>
<?php
$k = 0;
$listids = array();
foreach($this->lists as $row){
$listids[] = $row->listid;
if($row->nbsub > 100) $displayWarning = true;
?>
<tr class="<?php echo "row$k"; ?>">
<td>
<?php
echo acymailing_tooltip($row->description, $row->name, 'tooltip.png', $row->name);
echo ' ( '.<API key>('SELECTED_USERS', $row->nbsub).' )';
?>
</td>
</tr>
<?php
$k = 1 - $k;
} ?>
</tbody>
</table>
<?php
$filterClass = acymailing_get('class.filter');
if(!empty($this->mail->filter)){
$resultFilters = $filterClass->displayFilters($this->mail->filter);
if(!empty($resultFilters)){
echo '<br />'.<API key>('RECEIVER_LISTS').'<br />'.<API key>('FILTER_ONLY_IF');
echo '<ul><li>'.implode('</li><li>', $resultFilters).'</li></ul>';
}
}
$nbTotalReceivers = $nbTotalReceiversAll = $filterClass->countReceivers($listids, $this->mail->filter);
?>
</div>
<?php if(!empty($this->values->alreadySent)){
$filterClass->onlynew = true;
$nbTotalReceivers = $<API key> = $filterClass->countReceivers($listids, $this->mail->filter, $this->mail->mailid);
acymailing_display(<API key>('ALREADY_SENT', $this->values->alreadySent).'<br />'.<API key>('REMOVE_ALREADY_SENT').'<br />'.acymailing_boolean("onlynew", 'onclick="if(this.value == 1){document.getElementById(\'nbreceivers\').innerHTML = \''.$<API key>.'\';}else{document.getElementById(\'nbreceivers\').innerHTML = \''.$nbTotalReceiversAll.'\'}"', 1, <API key>('JOOMEXT_YES'), <API key>('SEND_TO_ALL')), 'warning');
}elseif($displayWarning){
if($config->get('warninglimitation', 1)){
$notremind = '<small style="float:right;margin-right:30px;position:relative;">'.$toggleClass->delete('<API key>', 'warninglimitation_0', 'config', false, <API key>('DONT_REMIND')).'</small>';
acymailing_display(<API key>('WARNING_LIMITATION').'<br /><a target="_blank" href="'.ACYMAILING_HELPURL.'send-process">'.<API key>('<API key>').'</a>'.$notremind, 'warning');
}
}
}else{
acymailing_display(<API key>('EMAIL_AFFECT'), 'warning');
}
}else{
acymailing_display(<API key>('NB_PENDING_EMAIL', $this->values->nbqueue, '<b><i>'.$this->mail->subject.'</i></b>').'<br />'.<API key>('SEND_CONTINUE'), 'info');
?>
<input type="hidden" name="totalsend" value="<?php echo $this->values->nbqueue; ?>"/>
<?php
}
?>
<?php if(!empty($this->mail->mailid) AND (!empty($this->lists) OR !empty($this->values->nbqueue))){
if(!acymailing_level(1) && $config->get('<API key>', 1)){
$notremind = '<small style="float:right;margin-right:30px;position:relative;">'.$toggleClass->delete('<API key>', '<API key>', 'config', false, <API key>('DONT_REMIND')).'</small>';
acymailing_display(<API key>('<API key>').$notremind, 'warning');
}
?>
<div style="text-align:center;font-size:14px;padding:20px;">
<?php if(empty($this->values->nbqueue)) echo <API key>('SENT_TO_NUMBER', '<span style="font-weight:bold;" id="nbreceivers" >'.$nbTotalReceivers.'</span>').'<br />'; ?>
<input onclick="document.adminForm.task.value='<?php echo empty($this->values->nbqueue) ? 'send' : 'continuesend'; ?>';" class="btn btn-primary" style="padding:10px 30px;margin:5px;font-size:14px;cursor:pointer;" type="submit" value="<?php echo empty($this->values->nbqueue) ? <API key>('SEND') : <API key>('CONTINUE') ?>"/>
</div>
<?php } ?>
</div>
<div class="clr"></div>
<input type="hidden" name="cid[]" value="<?php echo $this->mail->mailid; ?>"/>
<input type="hidden" name="hidemainmenu" value="1"/>
<?php <API key>(); ?>
</form>
</div> |
using MediaBrowser.Controller;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Library;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.MediaEncoding;
using MediaBrowser.Model.Dto;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Serialization;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using MediaBrowser.Model.Dlna;
namespace Emby.Server.Implementations.LiveTv
{
public class <API key> : <API key>
{
private readonly ILiveTvManager _liveTvManager;
private readonly IJsonSerializer _jsonSerializer;
private readonly ILogger _logger;
private readonly IMediaSourceManager _mediaSourceManager;
private readonly IMediaEncoder _mediaEncoder;
private readonly <API key> _appHost;
public <API key>(ILiveTvManager liveTvManager, IJsonSerializer jsonSerializer, ILogManager logManager, IMediaSourceManager mediaSourceManager, IMediaEncoder mediaEncoder, <API key> appHost)
{
_liveTvManager = liveTvManager;
_jsonSerializer = jsonSerializer;
_mediaSourceManager = mediaSourceManager;
_mediaEncoder = mediaEncoder;
_appHost = appHost;
_logger = logManager.GetLogger(GetType().Name);
}
public Task<IEnumerable<MediaSourceInfo>> GetMediaSources(IHasMediaSources item, Cancellation<API key>)
{
var baseItem = (BaseItem)item;
if (baseItem.SourceType == SourceType.LiveTV)
{
if (string.IsNullOrWhiteSpace(baseItem.Path))
{
return <API key>(item, cancellationToken);
}
}
return Task.FromResult<IEnumerable<MediaSourceInfo>>(new List<MediaSourceInfo>());
}
// Do not use a pipe here because Roku http requests to the server will fail, without any explicit error message.
private const char StreamIdDelimeter = '_';
private const string <API key> = "_";
private async Task<IEnumerable<MediaSourceInfo>> <API key>(IHasMediaSources item, Cancellation<API key>)
{
IEnumerable<MediaSourceInfo> sources;
var forceRequireOpening = false;
try
{
if (item is ILiveTvRecording)
{
sources = await _liveTvManager.<API key>(item, cancellationToken)
.ConfigureAwait(false);
}
else
{
sources = await _liveTvManager.<API key>(item, cancellationToken)
.ConfigureAwait(false);
}
}
catch (<API key>)
{
var hasMediaSources = (IHasMediaSources)item;
sources = _mediaSourceManager.<API key>(hasMediaSources, false)
.ToList();
forceRequireOpening = true;
}
var list = sources.ToList();
var serverUrl = await _appHost.GetLocalApiUrl().ConfigureAwait(false);
foreach (var source in list)
{
source.Type = MediaSourceType.Default;
source.BufferMs = source.BufferMs ?? 1500;
if (source.RequiresOpening || forceRequireOpening)
{
source.RequiresOpening = true;
}
if (source.RequiresOpening)
{
var openKeys = new List<string>();
openKeys.Add(item.GetType().Name);
openKeys.Add(item.Id.ToString("N"));
openKeys.Add(source.Id ?? string.Empty);
source.OpenToken = string.Join(<API key>, openKeys.ToArray());
}
// Dummy this up so that direct play checks can still run
if (string.IsNullOrEmpty(source.Path) && source.Protocol == MediaProtocol.Http)
{
source.Path = serverUrl;
}
}
_logger.Debug("MediaSources: {0}", _jsonSerializer.SerializeToString(list));
return list;
}
public async Task<Tuple<MediaSourceInfo, <API key>>> OpenMediaSource(string openToken, Cancellation<API key>)
{
MediaSourceInfo stream = null;
const bool isAudio = false;
var keys = openToken.Split(new[] { StreamIdDelimeter }, 3);
var mediaSourceId = keys.Length >= 3 ? keys[2] : null;
<API key> <API key> = null;
if (string.Equals(keys[0], typeof(LiveTvChannel).Name, StringComparison.OrdinalIgnoreCase))
{
var info = await _liveTvManager.GetChannelStream(keys[1], mediaSourceId, cancellationToken).ConfigureAwait(false);
stream = info.Item1;
<API key> = info.Item2;
}
else
{
stream = await _liveTvManager.GetRecordingStream(keys[1], cancellationToken).ConfigureAwait(false);
}
try
{
if (!stream.SupportsProbing || stream.MediaStreams.Any(i => i.Index != -1))
{
AddMediaInfo(stream, isAudio, cancellationToken);
}
else
{
await new LiveStreamHelper(_mediaEncoder, _logger).<API key>(stream, isAudio, cancellationToken).ConfigureAwait(false);
}
}
catch (Exception ex)
{
_logger.ErrorException("Error probing live tv stream", ex);
}
_logger.Info("Live stream info: {0}", _jsonSerializer.SerializeToString(stream));
return new Tuple<MediaSourceInfo, <API key>>(stream, <API key>);
}
private void AddMediaInfo(MediaSourceInfo mediaSource, bool isAudio, Cancellation<API key>)
{
mediaSource.<API key> = null;
// Null this out so that it will be treated like a live stream
mediaSource.RunTimeTicks = null;
var audioStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaBrowser.Model.Entities.MediaStreamType.Audio);
if (audioStream == null || audioStream.Index == -1)
{
mediaSource.<API key> = null;
}
else
{
mediaSource.<API key> = audioStream.Index;
}
var videoStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaBrowser.Model.Entities.MediaStreamType.Video);
if (videoStream != null)
{
if (!videoStream.BitRate.HasValue)
{
var width = videoStream.Width ?? 1920;
if (width >= 3000)
{
videoStream.BitRate = 30000000;
}
else if (width >= 1900)
{
videoStream.BitRate = 20000000;
}
else if (width >= 1200)
{
videoStream.BitRate = 8000000;
}
else if (width >= 700)
{
videoStream.BitRate = 2000000;
}
}
}
// Try to estimate this
mediaSource.InferTotalBitrate();
}
public Task CloseMediaSource(string liveStreamId)
{
return _liveTvManager.CloseLiveStream(liveStreamId);
}
}
} |
ShoterHomework
===========
Project for android to take care about my homeworks. It will be linked with external mySQL database. |
<?php
namespace pemapmodder\inventorygui;
use pocketmine\Player;
interface GUI{
/**
* @return int
*/
public function getID();
/**
* @return int
*/
public function getDamage();
/**
* @return number
*/
public function getPriority();
/**
* @param Player $player
* @return mixed
*/
public function onActivation(Player $player);
} |
MCU = atmega328p
F_CPU = 8000000
BAUD = 19200
## Also try BAUD = 19200 or 38400 if you're feeling lucky.
## This is where your main() routine lives
MAIN = sensors_module.c
## If you've split your program into multiple .c / .h files,
## include the additional source (in same directory) here
LOCAL_SOURCE = dht11.c
## Here you can link to one more directory (and multiple .c files)
EXTRA_SOURCE_DIR =
EXTRA_SOURCE_FILES =
PROGRAMMER_TYPE = usbasp
# extra arguments to avrdude: baud rate, chip type, -F flag, etc.
PROGRAMMER_ARGS = -F -V -c $(PROGRAMMER_TYPE) -P /dev/ttyACM0 -b $(BAUD)
## Defined programs / locations
CC = avr-gcc
OBJCOPY = avr-objcopy
OBJDUMP = avr-objdump
AVRSIZE = avr-size
AVRDUDE = avrdude
## Compilation options, type man avr-gcc if you're curious.
CFLAGS = -mmcu=$(MCU) -DF_CPU=$(F_CPU)UL -DBAUD=$(BAUD) -Os -I.
CFLAGS += -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums
CFLAGS += -Wall -Wstrict-prototypes
CFLAGS += -g -ggdb
CFLAGS += -ffunction-sections -fdata-sections -Wl,--gc-sections -Wl,--relax
CFLAGS += -std=gnu99
## CFLAGS += -Wl,-u,vfprintf -lprintf_flt -lm ## for floating-point printf
## CFLAGS += -Wl,-u,vfprintf -lprintf_min ## for smaller printf
LDFLAGS = -lavrutil
## Lump target and extra source files together
TARGET = $(strip $(basename $(MAIN)))
SRC = $(TARGET).c
EXTRA_SOURCE = $(addprefix $(EXTRA_SOURCE_DIR), $(EXTRA_SOURCE_FILES))
SRC += $(EXTRA_SOURCE)
SRC += $(LOCAL_SOURCE)
## List of all header files
HEADERS = $(SRC:.c=.h)
## For every .c file, compile an .o object file
OBJ = $(SRC:.c=.o)
## Generic Makefile targets. (Only .hex file is necessary)
all: $(TARGET).hex
%.hex: %.elf
$(OBJCOPY) -R .eeprom -O ihex $< $@
%.elf: $(SRC)
$(CC) $(CFLAGS) $(SRC) $(LDFLAGS) --output $@
clean:
rm -f $(TARGET).elf $(TARGET).hex $(TARGET).obj \
$(TARGET).o $(TARGET).d $(TARGET).eep $(TARGET).lst \
$(TARGET).lss $(TARGET).sym $(TARGET).map $(TARGET)~ \
$(TARGET).eeprom
flash: $(TARGET).hex
$(AVRDUDE) -c $(PROGRAMMER_TYPE) -p $(MCU) $(PROGRAMMER_ARGS) -U flash:w:$< |
#include "my_global.h"
#include <string.h>
#include <arpa/inet.h>
#include "util/util.h"
#include "value/value_constants.h"
#include "value/value.h"
#include "io/data_input.h"
namespace spotter {
data_input::data_input(char* buff) {
buffer = buff;
offset = 0;
buffer_length = 0;
}
data_input::~data_input() {
/*if(buffer != NULL) {
delete buffer;
}*/
delete[] buffer;
buffer = 0;
}
int64_t data_input::read_decimal() {
char type = read_uint8();
switch(type){
case 0:
return 0;
case 1:
return read_uint8();
case 2:
return read_int16();
case 4:
return read_int32();
case 8:
return read_int64();
default:
return read_int64();
}
}
uint32_t data_input::read_uint32() {
uint32_t temp = 0;
memcpy(&temp,buffer + offset, sizeof(uint32_t));
offset += sizeof(uint32_t);
return ntohl(temp);
}
uint64_t data_input::read_uint64() {
uint64_t temp = 0;
memcpy(&temp,buffer + offset, sizeof(uint64_t));
offset += sizeof(uint64_t);
return util::ntohll(temp); //todo: use Util
}
int32_t data_input::read_int32() {
uint32_t temp = 0;
memcpy(&temp,buffer + offset, sizeof(uint32_t));
offset += sizeof(uint32_t);
return (int32_t)ntohl(temp);
}
int64_t data_input::read_int64() {
uint64_t temp = 0;
memcpy(&temp,buffer + offset, sizeof(uint64_t));
offset += sizeof(uint64_t);
return (int64_t)util::ntohll(temp); //todo: use Util
}
uint8_t data_input::read_uint8() {
return (uint8_t)buffer[offset++];
}
int8_t data_input::read_int8() {
return (int8_t)buffer[offset++];
}
uint16_t data_input::read_uint16() {
ushort temp = 0;
memcpy(&temp,buffer + offset, sizeof(ushort));
offset += sizeof(ushort);
return ntohs(temp);
}
int16_t data_input::read_int16() {
uint16_t temp = 0;
memcpy(&temp,buffer + offset, sizeof(uint16_t));
offset += sizeof(uint16_t);
return (int16_t)ntohs(temp);
}
char* data_input::read_string() {
uint32_t size = read_uint32();
char* str = new char[size + 1];
memcpy(str,buffer + offset,size);
str[size] = 0;
offset+=size;
return str;
}
value* data_input::read_value() {
int8_t value_type = read_uint8();
value* value = value_constants::create(value_type);
//return value_constants::create(value_type)->read(this);
value->read(this);
return value;
}
} /* namespace spotter */ |
/**
* @file
* A JavaScript file for the theme.
*
* In order for this JavaScript to be loaded on pages, see the instructions in
* the README.txt next to this file.
*/
// JavaScript should be made compatible with libraries other than jQuery by
// wrapping it with an "anonymous closure". See:
(function ($, Drupal, window, document, undefined) {
// To understand behaviors, see https://drupal.org/node/756722#behaviors
Drupal.behaviors.my_custom_behavior = {
attach: function(context, settings) {
$('.node-16 .field .field-label').click(function(){
$(this).next().toggle(300);
});
}
};
})(jQuery, Drupal, this, this.document); |
// Decompiled by Deathway
// Date : 2007-03-09
#ifndef KALIMAGATE_H
#define KALIMAGATE_H
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "GameMain.h"
#include "user.h"
#define KALIMA_FLOORS 7
#define MAX_KALIMA_ENTER 5
#define KALIMA_GATE_TIMEOUT 180000
#define KUNDUN_MARK_COUNT 5
#define KALIMA_MAP_RANGE(x) ( ((x)<MAP_INDEX_KALIMA1)?FALSE:((x)>MAP_INDEX_KALIMA6)?(((x)==MAP_INDEX_KALIMA7)?TRUE:FALSE):TRUE )
#define KALIMA_FLOOR_RANGE(x) ( (x<0)?FALSE:(x>KALIMA_FLOORS-1)?FALSE:TRUE )
#define KUNDUN_MARK_RANGE(x) ( ((x) <0)?FALSE:((x) > KUNDUN_MARK_COUNT-1)?FALSE:TRUE)
#define <API key>(x) ( ((x)<51)?FALSE:((x)>58)?FALSE:TRUE )
static struct _KALIMAGATE_LEVEL
{
short iLOWER_BOUND;
short iUPPER_BOUND;
short <API key>;
short <API key>;
} <API key>[KALIMA_FLOORS] =
{
// Kalima 1
0x28, 0x82, // DK, DW, Elf
0x14, 0x6E, // MG, DL
// Kalima 2
0x83, 0xB4, // DK, DW, Elf
0x6F, 0xA0, // MG, DL
// Kalima 3
0xB5, 0xE6, // DK, DW, Elf
0xA1, 0xD2, // MG, DL
// Kalima 4
0xE7, 0x118, // DK, DW, Elf
0xD3, 0x104, // MG, DL
// Kalima 5
0x119, 0x14A, // DK, DW, Elf
0x105, 0x136, // MG, DL
// Kalima 6
0x14B, 0x15D, // DK, DW, Elf
0x137, 0x15D, // MG, DL
// Kalima 7
1, MAX_CHAR_LEVEL, // DK, DW, Elf
1, MAX_CHAR_LEVEL // MG, DL
};
static int <API key>[KALIMA_FLOORS] =
{
0x58, 0x59,
0x5A, 0x5B,
0x5C, 0x5D,
0x74
};
class CKalimaGate
{
private:
CRITICAL_SECTION m_critKalimaGate;
public:
CKalimaGate();
virtual ~CKalimaGate();
int CreateKalimaGate(int iIndex, BYTE btLevel, BYTE cTX, BYTE cTY);
void KalimaGateAct(int iIndex);
int <API key>(int iIndex, BYTE btLevel);
int DeleteKalimaGate(int iCallOwnerIndex);
int DeleteKalimaGate(int iKalimaGateIndex, int iCallOwnerIndex);
int CreateKalimaGate2(int iIndex, int iMonMapNumber, BYTE cTX, BYTE cTY);
void KalimaGateAct2(int iIndex);
int GetKalimaGateLevel2(int iIndex);
private:
int GetRandomLocation(int iMapNumber, BYTE& cX, BYTE& cY);
int GetKalimaGateLevel(int iIndex);
};
extern CKalimaGate g_KalimaGate;
#endif |
#include "VMapFactory.h"
#include "VMapManager2.h"
#include "VMapDefinitions.h"
#include "WorldModel.h"
#include "Entities//GameObject.h"
#include "World/World.h"
#include "GameObjectModel.h"
#include "Server/DBCStores.h"
struct GameobjectModelData
{
GameobjectModelData(const std::string& name_, const G3D::AABox& box) :
name(name_), bound(box) {}
std::string name;
G3D::AABox bound;
};
typedef std::unordered_map<uint32, GameobjectModelData> ModelList;
ModelList model_list;
void <API key>()
{
FILE* model_list_file = fopen((sWorld.GetDataPath() + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb");
if (!model_list_file)
return;
uint32 name_length, displayId;
char buff[500];
while (!feof(model_list_file))
{
fread(&displayId, sizeof(uint32), 1, model_list_file);
fread(&name_length, sizeof(uint32), 1, model_list_file);
if (name_length >= sizeof(buff))
{
sLog.outDebug("File %s seems to be corrupted", VMAP::GAMEOBJECT_MODELS);
break;
}
fread(&buff, sizeof(char), name_length, model_list_file);
Vector3 v1, v2;
fread(&v1, sizeof(Vector3), 1, model_list_file);
fread(&v2, sizeof(Vector3), 1, model_list_file);
model_list.insert(ModelList::value_type(displayId, GameobjectModelData(std::string(buff, name_length), AABox(v1, v2))));
}
fclose(model_list_file);
}
GameObjectModel::~GameObjectModel()
{
if (iModel)
((VMAP::VMapManager2*)VMAP::VMapFactory::<API key>())-><API key>(name);
}
bool GameObjectModel::initialize(const GameObject* const pGo, const <API key>* const pDisplayInfo)
{
ModelList::const_iterator it = model_list.find(pDisplayInfo->Displayid);
if (it == model_list.end())
return false;
G3D::AABox mdl_box(it->second.bound);
// ignore models with no bounds
if (mdl_box == G3D::AABox::zero())
{
sLog.outDebug("Model %s has zero bounds, loading skipped", it->second.name.c_str());
return false;
}
iModel = ((VMAP::VMapManager2*)VMAP::VMapFactory::<API key>())-><API key>(sWorld.GetDataPath() + "vmaps/", it->second.name);
if (!iModel)
return false;
name = it->second.name;
iPos = Vector3(pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ());
collision_enabled = true;
iScale = pGo->GetObjectScale();
iInvScale = 1.f / iScale;
G3D::Matrix3 iRotation = G3D::Matrix3::fromEulerAnglesZYX(pGo->GetOrientation(), 0, 0);
iInvRot = iRotation.inverse();
// transform bounding box:
mdl_box = AABox(mdl_box.low() * iScale, mdl_box.high() * iScale);
AABox rotated_bounds;
for (int i = 0; i < 8; ++i)
rotated_bounds.merge(iRotation * mdl_box.corner(i));
this->iBound = rotated_bounds + iPos;
#ifdef SPAWN_CORNERS
// test:
for (int i = 0; i < 8; ++i)
{
Vector3 pos(iBound.corner(i));
if (Creature* c = const_cast<GameObject*>(pGo)->SummonCreature(24440, pos.x, pos.y, pos.z, 0, <API key>, 0))
{
c->setFaction(35);
c->SetObjectScale(0.1f);
}
}
#endif
return true;
}
GameObjectModel* GameObjectModel::construct(const GameObject* const pGo)
{
const <API key>* info = <API key>.LookupEntry(pGo->GetDisplayId());
if (!info)
return nullptr;
GameObjectModel* mdl = new GameObjectModel();
if (!mdl->initialize(pGo, info))
{
delete mdl;
return nullptr;
}
return mdl;
}
bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool StopAtFirstHit, bool ignoreM2Model) const
{
if (!collision_enabled)
return false;
float time = ray.intersectionTime(iBound);
if (time == G3D::inf())
return false;
// child bounds are defined in object space:
Vector3 p = iInvRot * (ray.origin() - iPos) * iInvScale;
Ray modRay(p, iInvRot * ray.direction());
float distance = MaxDist * iInvScale;
bool hit = iModel->IntersectRay(modRay, distance, StopAtFirstHit, ignoreM2Model);
if (hit)
{
distance *= iScale;
MaxDist = distance;
}
return hit;
}
bool GameObjectModel::Relocate(GameObject const& go)
{
if (!iModel)
return false;
ModelList::const_iterator it = model_list.find(go.GetDisplayId());
if (it == model_list.end())
return false;
G3D::AABox mdl_box(it->second.bound);
// ignore models with no bounds
if (mdl_box == G3D::AABox::zero())
{
DEBUG_LOG("GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
return false;
}
iPos = Vector3(go.GetPositionX(), go.GetPositionY(), go.GetPositionZ());
G3D::Matrix3 iRotation = G3D::Matrix3::fromEulerAnglesZYX(go.GetOrientation(), 0, 0);
iInvRot = iRotation.inverse();
// transform bounding box:
mdl_box = AABox(mdl_box.low() * iScale, mdl_box.high() * iScale);
AABox rotated_bounds;
for (int i = 0; i < 8; ++i)
rotated_bounds.merge(iRotation * mdl_box.corner(i));
iBound = rotated_bounds + iPos;
#ifdef SPAWN_CORNERS
// test:
for (int i = 0; i < 8; ++i)
{
Vector3 pos(iBound.corner(i));
Creature* c = ((GameObject*)&go)->SummonCreature(1, pos.x, pos.y, pos.z, 0, <API key>, 4000);
c->SetFly(true);
c->SendHeartBeat();
}
#endif
return true;
} |
// Author : $Author$
// Date : $Date$
// Url : $URL$
// This program is free software; you can redistribute it and/or modify
// (at your option) any later version.
#ifndef <API key>
#define <API key>
#include "db_database_content.h"
#include "db_tree_cache.h"
#include "db_time.h"
#include "db_move.h"
#include "u_crc.h"
#include "m_string.h"
namespace mstl { class fstream; }
namespace mstl { class ostream; }
namespace util { class Progress; }
namespace util { class ByteStream; }
namespace TeXt { class Receptacle; }
namespace db {
class Board;
class Game;
class GameInfo;
class TagSet;
class DatabaseCodec;
class Consumer;
class Producer;
class Statistic;
class NamebaseEntry;
class NamebasePlayer;
class PlayerStats;
class TournamentTable;
class Filter;
class Log;
class Database : private DatabaseContent
{
public:
typedef type::ID Type;
typedef format::Type Format;
enum Storage { MemoryOnly, OnDisk };
enum Mode { ReadOnly, ReadWrite };
enum Access { GameIndex, MyIndex };
Database(Database const& db, mstl::string const& name);
Database(mstl::string const& name,
mstl::string const& encoding,
Storage storage = MemoryOnly,
Type type = type::Unspecific);
Database(mstl::string const& name,
mstl::string const& encoding,
Mode mode,
util::Progress& progress);
Database(mstl::string const& name, Producer& producer, util::Progress& progress);
~Database() throw();
Cast
DatabaseContent const& content() const;
Returns whether the database is set read-only or not.
bool isReadOnly() const;
Returns whether the database is potentially writeable or not.
bool isWriteable() const;
Returns whether the database is memory-only or not.
bool isMemoryOnly() const;
Returns whether the database is open.
bool isOpen() const;
Returns whether encoding failed.
bool encodingFailed() const;
Returns whether encoding is broken.
bool encodingIsBroken() const;
Returns whether asynchronous reader is in use.
bool usingAsyncReader() const;
Returns whether the database format should be upgraded.
bool shouldUpgrade() const;
Returns whether this database should be compressed.
bool shouldCompress() const;
Returns an unique database id.
unsigned id() const;
Counts the number of games in the database.
unsigned countGames() const;
Count the number of players in the database.
unsigned countPlayers() const;
Count the number of events in the database.
unsigned countEvents() const;
Count the number of sites in the database.
unsigned countSites() const;
Count the number of annotators in the database.
unsigned countAnnotators() const;
Count number of attendants of given event.
unsigned countPlayers(NamebaseEvent const& event, unsigned& averageElo, unsigned& category) const;
Returns name of database (may be a file name)
mstl::string const& name() const;
Returns extension of database name (codec type)
mstl::string const& extension() const;
Returns description of database
mstl::string const& description() const;
Returns the type of database
Type type() const;
Returns the (decoding) format of database
Format format() const;
Returns the encoding of database
mstl::string const& encoding() const;
Returns date of last modification.
Time modified() const;
Returns time of creation.
Time created() const;
Return timestamp of creation.
uint32_t creationTimestamp() const;
Returns statistic of database
Statistic const& statistic() const;
Returh maximal length of description.
unsigned <API key>() const;
Return timestamp of last change.
uint64_t lastChange() const;
Compute CRC for given game index.
util::crc::checksum_t computeChecksum(unsigned index) const;
Returns game information at given index.
GameInfo const& gameInfo(unsigned index) const;
Returns game information at given index.
GameInfo& gameInfo(unsigned index);
Returns the player at given index.
NamebasePlayer const& player(unsigned index) const;
Returns the player for given game index and specified side.
NamebasePlayer const& player(unsigned gameIndex, color::ID side) const;
Returns the event at given index.
NamebaseEvent const& event(unsigned index, Access access = MyIndex) const;
Returns the site at given index.
NamebaseSite const& site(unsigned index, Access access = MyIndex) const;
Returns the annotator at given index.
NamebaseEntry const& annotator(unsigned index) const;
Collect tags specific for current database format.
void getInfoTags(unsigned index, TagSet& tags) const;
Collect tags specific for current database format.
void getGameTags(unsigned index, TagSet& tags) const;
Returns the codec.
DatabaseCodec& codec();
Returns the codec.
DatabaseCodec const& codec() const;
Returns the tree cache.
TreeCache const& treeCache() const;
Returns the tree cache.
TreeCache& treeCache();
Loads a game from the given position.
load::State loadGame(unsigned index, Game& game);
Loads a game from the given position.
load::State loadGame(unsigned index, Game& game, mstl::string& encoding);
Saves a game at the given position.
void replaceGame(unsigned index, Game const& game);
Adds a game to the database.
save::State newGame(Game& game, GameInfo const& info);
Deletes (or undeletes) a game from the database.
void deleteGame(unsigned index, bool flag = true);
Set the game flags of the specified game.
void setGameFlags(unsigned index, unsigned flags);
Export one game at the given position.
save::State exportGame(unsigned index, Consumer& consumer);
Export one game at the given position.
save::State exportGame(unsigned index, Database& destination);
Add new game to database.
save::State addGame(Game& game);
Replace game in database.
save::State updateGame(Game& game);
Update the characteristics of a game
save::State <API key>(unsigned index, TagSet const& tags);
Update the move data of a game
save::State updateMoves(Game& game);
Removes all games from the database.
void clear();
Re-open the database.
void reopen(mstl::string const& encoding, util::Progress& progress);
Close database.
void close();
Sync database (save unsaved data).
void sync(util::Progress& progress);
Attach database to a file.
void attach(mstl::string const& filename, util::Progress& progress);
Update database files.
void save(util::Progress& progress, unsigned start = 0);
Write complete index of database to stream.
void writeIndex(mstl::ostream& os, util::Progress& progress);
Write complete namebases of database to stream.
void writeNamebases(mstl::ostream& os, util::Progress& progress);
Write all games of database to stream.
void writeGames(mstl::ostream& os, util::Progress& progress);
Recode content of database.
void recode(mstl::string const& encoding, util::Progress& progress);
Rename the database.
void rename(mstl::string const& name);
Remove database from disk
void remove();
Build tournament table for selected games.
TournamentTable* makeTournamentTable(Filter const& gameFilter) const;
Generate player dossier from whole database for given player.
void playerStatistic(NamebasePlayer const& player, PlayerStats& stats) const;
Generate player card information for given player.
void emitPlayerCard(TeXt::Receptacle& receptacle, NamebasePlayer const& player) const;
Open an asynchronous game stream (block file) reader for <API key>() operation.
void openAsyncReader();
Close asynchronous game stream reader.
void closeAsyncReader();
Setup tag/value pairs.
void setupTags(unsigned index, TagSet& tags) const;
Set database type.
void setType(Type type);
Set description of database.
void setDescription(mstl::string const& description);
Set/unset read-only flag.
void setReadOnly(bool flag = true);
Search for givee position and return following move.
Move <API key>(unsigned index, Board const& position, bool skipVariations) const;
Import single game.
unsigned importGame(Producer& producer, unsigned index);
Import whole database.
unsigned importGames(Producer& producer, util::Progress& progress);
Namebases& namebases();
using DatabaseContent::namebase;
private:
Opens the given database.
bool open(mstl::string const& name, bool readOnly);
Read the given gzipped PGN file
bool open(mstl::string const& name, mstl::fstream& stream);
void setEncodingFailed(bool flag);
load::State loadGame(unsigned index, Game& game, mstl::string* encoding);
NamebaseEntry const* insertPlayer(mstl::string const& name);
NamebaseEntry const* insertEvent(mstl::string const& name);
NamebaseEntry const* insertSite(mstl::string const& name);
NamebaseEntry const* insertAnnotator(mstl::string const& name);
DatabaseCodec* m_codec;
mstl::string m_name;
mstl::string m_rootname;
unsigned m_id;
unsigned m_size;
uint64_t m_lastChange;
TreeCache m_treeCache;
bool m_encodingFailed;
bool m_encodingOk;
bool m_usingAsyncReader;
};
} // namespace db
#include "db_database.ipp"
#endif // <API key>
// vi:set ts=3 sw=3: |
/**
* @file dock.c
* @author Joe Wingbermuehle
* @date 2006
*
* @brief Dock tray component.
*
*/
#include "jwm.h"
#include "dock.h"
#include "tray.h"
#include "main.h"
#include "error.h"
#include "color.h"
#include "misc.h"
#define <API key> 0
#define <API key> 1
#define <API key> 2
#define <API key> 0
#define <API key> 1
/** Structure to represent a docked window. */
typedef struct DockNode {
Window window;
char needs_reparent;
struct DockNode *next;
} DockNode;
/** Structure to represent a dock tray component. */
typedef struct DockType {
TrayComponentType *cp;
Window window;
int itemSize;
DockNode *nodes;
} DockType;
static const char BASE_SELECTION_NAME[] = "_NET_SYSTEM_TRAY_S%d";
static DockType *dock = NULL;
static char owner;
static Atom dockAtom;
static unsigned long orientation;
static void SetSize(TrayComponentType *cp, int width, int height);
static void Create(TrayComponentType *cp);
static void Resize(TrayComponentType *cp);
static void DockWindow(Window win);
static char UndockWindow(Window win);
static void UpdateDock(void);
static void GetDockItemSize(DockNode *np, int *width, int *height);
static void GetDockSize(int *width, int *height);
/** Initialize dock data. */
void InitializeDock(void)
{
owner = 0;
}
/** Startup the dock. */
void StartupDock(void)
{
char *selectionName;
if(!dock) {
/* No dock has been requested. */
return;
}
if(dock->window == None) {
/* No dock yet. */
/* Get the selection atom. */
selectionName = AllocateStack(sizeof(BASE_SELECTION_NAME));
snprintf(selectionName, sizeof(BASE_SELECTION_NAME),
BASE_SELECTION_NAME, rootScreen);
dockAtom = JXInternAtom(display, selectionName, False);
ReleaseStack(selectionName);
/* The location and size of the window doesn't matter here. */
dock->window = <API key>(display, rootWindow,
/* x, y, width, height */ 0, 0, 1, 1,
/* border_size, border_color */ 0, 0,
/* background */ colors[COLOR_TRAY_BG2]);
JXSelectInput(display, dock->window,
<API key>
| <API key>
| PointerMotionMask | <API key>);
}
dock->cp->window = dock->window;
}
/** Shutdown the dock. */
void ShutdownDock(void)
{
DockNode *np;
if(dock) {
/* Release memory used by the dock list. */
while(dock->nodes) {
np = dock->nodes->next;
JXReparentWindow(display, dock->nodes->window, rootWindow, 0, 0);
Release(dock->nodes);
dock->nodes = np;
}
/* Release the selection. */
if(owner) {
JXSetSelectionOwner(display, dockAtom, None, CurrentTime);
}
/* Destroy the dock window. */
JXDestroyWindow(display, dock->window);
}
}
/** Destroy dock data. */
void DestroyDock(void)
{
if(dock) {
Release(dock);
dock = NULL;
}
}
/** Create a dock component. */
TrayComponentType *CreateDock(int width)
{
TrayComponentType *cp;
if(JUNLIKELY(dock != NULL && dock->cp != NULL)) {
Warning(_("only one Dock allowed"));
return NULL;
} else if(dock == NULL) {
dock = Allocate(sizeof(DockType));
dock->nodes = NULL;
dock->window = None;
}
cp = CreateTrayComponent();
cp->object = dock;
cp->requestedWidth = 1;
cp->requestedHeight = 1;
dock->cp = cp;
dock->itemSize = width;
cp->SetSize = SetSize;
cp->Create = Create;
cp->Resize = Resize;
return cp;
}
/** Set the size of a dock component. */
void SetSize(TrayComponentType *cp, int width, int height)
{
Assert(cp);
Assert(dock);
/* Set the orientation. */
if(width == 0) {
orientation = <API key>;
} else if(height == 0) {
orientation = <API key>;
}
/* Get the size. */
cp->width = width;
cp->height = height;
GetDockSize(&cp->width, &cp->height);
cp->requestedWidth = cp->width;
cp->requestedHeight = cp->height;
}
/** Initialize a dock component. */
void Create(TrayComponentType *cp)
{
XEvent event;
Assert(cp);
/* Map the dock window. */
if(cp->window != None) {
JXResizeWindow(display, cp->window, cp->width, cp->height);
JXMapRaised(display, cp->window);
}
/* Set the orientation atom. */
SetCardinalAtom(dock->cp->window, <API key>,
orientation);
/* Get the selection if we don't already own it.
* If we did already own it, getting it again would cause problems
* with some clients due to the way restarts are handled.
*/
if(!owner) {
owner = 1;
JXSetSelectionOwner(display, dockAtom, dock->cp->window, CurrentTime);
if(JUNLIKELY(JXGetSelectionOwner(display, dockAtom)
!= dock->cp->window)) {
owner = 0;
Warning(_("could not acquire system tray selection"));
} else {
memset(&event, 0, sizeof(event));
event.xclient.type = ClientMessage;
event.xclient.window = rootWindow;
event.xclient.message_type = atoms[ATOM_MANAGER];
event.xclient.format = 32;
event.xclient.data.l[0] = CurrentTime;
event.xclient.data.l[1] = dockAtom;
event.xclient.data.l[2] = dock->cp->window;
event.xclient.data.l[3] = 0;
event.xclient.data.l[4] = 0;
JXSendEvent(display, rootWindow, False, StructureNotifyMask, &event);
}
}
}
/** Resize a dock component. */
void Resize(TrayComponentType *cp)
{
JXResizeWindow(display, cp->window, cp->width, cp->height);
UpdateDock();
}
/** Handle a dock event. */
void HandleDockEvent(const XClientMessageEvent *event)
{
Assert(event);
switch(event->data.l[1]) {
case <API key>:
DockWindow(event->data.l[2]);
break;
case <API key>:
break;
case <API key>:
break;
default:
Debug("invalid opcode in dock event");
break;
}
}
/** Handle a resize request event. */
char <API key>(const XResizeRequestEvent *event)
{
DockNode *np;
Assert(event);
if(!dock) {
return 0;
}
for(np = dock->nodes; np; np = np->next) {
if(np->window == event->window) {
JXResizeWindow(display, np->window, event->width, event->height);
UpdateDock();
return 1;
}
}
return 0;
}
/** Handle a configure request event. */
char <API key>(const <API key> *event)
{
DockNode *np;
Assert(event);
if(!dock) {
return 0;
}
for(np = dock->nodes; np; np = np->next) {
if(np->window == event->window) {
UpdateDock();
return 1;
}
}
return 0;
}
/** Handle a reparent notify event. */
char <API key>(const XReparentEvent *event)
{
DockNode *np;
char handled;
Assert(event);
/* Just return if there is no dock. */
if(!dock) {
return 0;
}
/* Check each docked window. */
handled = 0;
for(np = dock->nodes; np; np = np->next) {
if(np->window == event->window) {
if(event->parent != dock->cp->window) {
/* For some reason the application reparented the window.
* We make note of this condition and reparent every time
* the dock is updated. Unfortunately we can't do this for
* all applications because some won't deal with it.
*/
np->needs_reparent = 1;
handled = 1;
}
}
}
/* Layout the stuff on the dock again if something happened. */
if(handled) {
UpdateDock();
}
return handled;
}
/** Handle a destroy event. */
char HandleDockDestroy(Window win)
{
if(dock) {
return UndockWindow(win);
} else {
return 0;
}
}
/** Handle a selection clear event. */
char <API key>(const <API key> *event)
{
if(event->selection == dockAtom) {
Debug("lost _NET_SYSTEM_TRAY selection");
owner = 0;
}
return 0;
}
/** Add a window to the dock. */
void DockWindow(Window win)
{
DockNode *np;
/* If no dock is running, just return. */
if(!dock) {
return;
}
/* Make sure we have a valid window to add. */
if(JUNLIKELY(win == None)) {
return;
}
/* If this window is already docked ignore it. */
for(np = dock->nodes; np; np = np->next) {
if(np->window == win) {
return;
}
}
/* Add the window to our list. */
np = Allocate(sizeof(DockNode));
np->window = win;
np->needs_reparent = 0;
np->next = dock->nodes;
dock->nodes = np;
/* Update the requested size. */
GetDockSize(&dock->cp->requestedWidth, &dock->cp->requestedHeight);
/* It's safe to reparent at (0, 0) since we call
* ResizeTray which will invoke the Resize callback.
*/
JXAddToSaveSet(display, win);
JXSelectInput(display, win,
StructureNotifyMask
| ResizeRedirectMask
| PointerMotionMask | <API key>);
JXReparentWindow(display, win, dock->cp->window, 0, 0);
JXMapRaised(display, win);
/* Resize the tray containing the dock. */
ResizeTray(dock->cp->tray);
}
/** Remove a window from the dock. */
char UndockWindow(Window win)
{
DockNode *np;
DockNode *last;
/* If no dock is running, just return. */
if(!dock) {
return 0;
}
last = NULL;
for(np = dock->nodes; np; np = np->next) {
if(np->window == win) {
/* Remove the window from our list. */
if(last) {
last->next = np->next;
} else {
dock->nodes = np->next;
}
Release(np);
/* Update the requested size. */
GetDockSize(&dock->cp->requestedWidth, &dock->cp->requestedHeight);
/* Resize the tray. */
ResizeTray(dock->cp->tray);
return 1;
}
last = np;
}
return 0;
}
/** Layout items on the dock. */
void UpdateDock(void)
{
XConfigureEvent event;
DockNode *np;
int x, y;
int width, height;
int xoffset, yoffset;
int itemSize;
Assert(dock);
/* Determine the size of items in the dock. */
if(orientation == <API key>) {
itemSize = dock->cp->height;
} else {
itemSize = dock->cp->width;
}
if(dock->itemSize > 0 && itemSize > dock->itemSize) {
itemSize = dock->itemSize;
}
x = 0;
y = 0;
memset(&event, 0, sizeof(event));
for(np = dock->nodes; np; np = np->next) {
GetDockItemSize(np, &width, &height);
if(orientation == <API key>) {
xoffset = 0;
yoffset = (itemSize - height) / 2;
} else {
xoffset = (itemSize - width) / 2;
yoffset = 0;
}
JXMoveResizeWindow(display, np->window, x + xoffset, y + yoffset,
width, height);
/* Reparent if this window likes to go other places. */
if(np->needs_reparent) {
JXReparentWindow(display, np->window, dock->cp->window,
x + xoffset, y + yoffset);
}
event.type = ConfigureNotify;
event.event = dock->window;
event.window = np->window;
event.x = x + xoffset;
event.y = y + yoffset;
event.width = width;
event.height = height;
JXSendEvent(display, np->window, False, StructureNotifyMask,
(XEvent*)&event);
if(orientation == <API key>) {
x += width;
} else {
y += height;
}
}
}
/** Get the size of a particular window on the dock. */
void GetDockItemSize(DockNode *np, int *width, int *height)
{
int itemSize;
/* Determine the default size of items in the dock. */
if(orientation == <API key>) {
itemSize = dock->cp->height;
} else {
itemSize = dock->cp->width;
}
if(dock->itemSize > 0 && itemSize > dock->itemSize) {
itemSize = dock->itemSize;
}
/* Determine the size of the window. */
*width = itemSize;
*height = itemSize;
}
/** Get the size of the dock. */
void GetDockSize(int *width, int *height)
{
DockNode *np;
Assert(dock != NULL);
/* Determine the dimension that is fixed. */
if(orientation == <API key>) {
*width = 0;
*height = dock->cp->height;
} else {
*width = dock->cp->width;
*height = 0;
}
/* Determine the size of the items on the dock. */
for(np = dock->nodes; np; np = np->next) {
int itemWidth, itemHeight;
GetDockItemSize(np, &itemWidth, &itemHeight);
if(orientation == <API key>) {
/* Horizontal tray; height fixed, placement is left to right. */
*width += itemWidth;
} else {
/* Vertical tray; width fixed, placement is top to bottom. */
*height += itemHeight;
}
}
/* Don't allow the dock to have zero size since a size of
* zero indicates a variable sized component. */
if(orientation == <API key>) {
*width = Max(*width, 1);
} else {
*height = Max(*height, 1);
}
} |
<?php
defined('_JEXEC') or die('Restricted access');
foreach ($list as $review){
modReviewsHelper::renderReview($review, $params);
}
?> |
import App from 'app';
App.initialize(); |
<?php
// Change path to the plugin
function <API key>( $path ) {
$path = OUTDOOR_INC_DIR . '/admin/acf/';
return $path;
}
add_filter('acf/settings/path', '<API key>');
// Change dir to the plugin
function <API key>( $dir ) {
$dir = OUTDOOR_TPL_URI . '/include/admin/acf/';
return $dir;
}
add_filter('acf/settings/dir', '<API key>');
// Hide ACF field group menu item
add_filter('acf/settings/show_admin', '__return_false');
// Include settings a custom fields
require_once( OUTDOOR_INC_DIR . '/admin/acf-fields.php' ); |
#!/bin/bash
. ./cmd.sh
stage=1
train_stage=-10
use_gpu=true
. ./path.sh
. ./utils/parse_options.sh
if $use_gpu; then
if ! cuda-compiled; then
cat <<EOF && exit 1
This script is intended to be used with GPUs but you have not compiled Kaldi with CUDA
If you want to use GPUs (and have them), go to src/, and configure and make on a machine
where "nvcc" is installed. Otherwise, call this script with --use-gpu false
EOF
fi
parallel_opts="--gpu 1"
num_threads=1
minibatch_size=512
# the _a is in case I want to change the parameters.
else
# Use 4 nnet jobs just like run_4d_gpu.sh so the results should be
# almost the same, but this may be a little bit slow.
num_threads=16
minibatch_size=128
parallel_opts="--num-threads $num_threads"
fi
dir=exp/nnet2_online/nnet_a
if [ $stage -le 1 ]; then
mfccdir=mfcc_hires
if [[ $(hostname -f) == *.clsp.jhu.edu ]] && [ ! -d $mfccdir/storage ]; then
date=$(date +'%m_%d_%H_%M')
utils/create_split_dir.pl /export/b0{1,2,3,4}/$USER/kaldi-data/egs/swbd-$date/s5b/$mfccdir/storage $mfccdir/storage
fi
utils/copy_data_dir.sh data/train data/train_hires
steps/make_mfcc.sh --nj 70 --mfcc-config conf/mfcc_hires.conf \
--cmd "$train_cmd" data/train_hires exp/make_hires/train $mfccdir;
steps/compute_cmvn_stats.sh data/train_hires exp/make_hires/train $mfccdir;
# Remove the small number of utterances that couldn't be extracted for some
# reason (e.g. too short; no such file).
utils/fix_data_dir.sh data/train_hires;
# Create MFCCs for the eval set
utils/copy_data_dir.sh data/eval2000 data/eval2000_hires
steps/make_mfcc.sh --cmd "$train_cmd" --nj 10 --mfcc-config conf/mfcc_hires.conf \
data/eval2000_hires exp/make_hires/eval2000 $mfccdir;
steps/compute_cmvn_stats.sh data/eval2000_hires exp/make_hires/eval2000 $mfccdir;
utils/fix_data_dir.sh data/eval2000_hires # remove segments with problems
# Use the first 4k sentences as dev set. Note: when we trained the LM, we used
# the 1st 10k sentences as dev set, so the 1st 4k won't have been used in the
# LM training data. However, they will be in the lexicon, plus speakers
# may overlap, so it's still not quite equivalent to a test set.
utils/subset_data_dir.sh --first data/train_hires 4000 data/train_hires_dev ;# 5hr 6min
n=$[`cat data/train/segments | wc -l` - 4000]
utils/subset_data_dir.sh --last data/train_hires $n data/train_hires_nodev ;
# Take the first 30k utterances (about 1/8th of the data) this will be used
# for the diagubm training
utils/subset_data_dir.sh --first data/train_hires_nodev 30000 data/train_hires_30k
local/remove_dup_utts.sh 200 data/train_hires_30k data/<API key> # 33hr
# create a 100k subset for the lda+mllt training
utils/subset_data_dir.sh --first data/train_hires_nodev 100000 data/train_hires_100k;
local/remove_dup_utts.sh 200 data/train_hires_100k data/<API key>;
local/remove_dup_utts.sh 300 data/train_hires_nodev data/train_hires_nodup # 286hr
fi
if [ $stage -le 2 ]; then
# We need to build a small system just because we need the LDA+MLLT transform
# to train the diag-UBM on top of. We use --num-iters 13 because after we get
# the transform (12th iter is the last), any further training is pointless.
# this decision is based on fisher_english
steps/train_lda_mllt.sh --cmd "$train_cmd" --num-iters 13 \
--splice-opts "--left-context=3 --right-context=3" \
5500 90000 data/<API key> data/lang exp/tri2_ali_100k_nodup exp/nnet2_online/tri3b
fi
if [ $stage -le 3 ]; then
mkdir -p exp/nnet2_online
# To train a diagonal UBM we don't need very much data, so use the smallest subset.
steps/online/nnet2/train_diag_ubm.sh --cmd "$train_cmd" --nj 30 --num-frames 200000 \
data/<API key> 512 exp/nnet2_online/tri3b exp/nnet2_online/diag_ubm
fi
if [ $stage -le 4 ]; then
# iVector extractors can be sensitive to the amount of data, but this one has a
# fairly small dim (defaults to 100) so we don't use all of it, we use just the
# 100k subset (just under half the data).
steps/online/nnet2/<API key>.sh --cmd "$train_cmd" --nj 10 \
data/<API key> exp/nnet2_online/diag_ubm exp/nnet2_online/extractor || exit 1;
fi
if [ $stage -le 5 ]; then
# We extract iVectors on all the train_nodup data, which will be what we
# train the system on.
# having a larger number of speakers is helpful for generalization, and to
# handle per-utterance decoding well (iVector starts at zero).
steps/online/nnet2/copy_data_dir.sh --utts-per-spk-max 2 data/train_hires_nodup data/<API key>
steps/online/nnet2/<API key>.sh --cmd "$train_cmd" --nj 30 \
data/<API key> exp/nnet2_online/extractor exp/nnet2_online/<API key> || exit 1;
fi
if [ $stage -le 6 ]; then
# Because we have a lot of data here and we don't want the training to take
# too long so we reduce the number of epochs from the defaults (15 + 5) to (5
# + 2), and the (initial,final) learning rate from the defaults (0.04, 0.004)
# to (0.01, 0.001).
# decided to let others run their jobs too (we only have 10 GPUs on our queue
# at JHU). The number of parameters is smaller than the baseline system we had in
# mind (../nnet2/run_5d_gpu.sh, which had pnorm input/output dim 3000/300 and
# 5 hidden layers, versus our 3000/300 and 5 hidden layers, even though we're
# training on more data than the baseline system. The motivation here is that we
# want to demonstrate the capability of doing real-time decoding, and if the
# network was too bug we wouldn't be able to decode in real-time using a CPU.
steps/nnet2/train_pnorm_simple.sh --stage $train_stage \
--splice-width 7 --feat-type raw \
--online-ivector-dir exp/nnet2_online/<API key> \
--cmvn-opts "--norm-means=false --norm-vars=false" \
--num-threads "$num_threads" \
--minibatch-size "$minibatch_size" \
--parallel-opts "$parallel_opts" \
--num-jobs-nnet 6 \
--num-epochs 5 \
--add-layers-period 1 \
--num-hidden-layers 4 \
--mix-up 4000 \
--<API key> 0.01 --final-learning-rate 0.001 \
--cmd "$decode_cmd" \
--pnorm-input-dim 3000 \
--pnorm-output-dim 300 \
data/train_hires_nodup data/lang exp/tri4b_ali_nodup $dir || exit 1;
fi
if [ $stage -le 7 ]; then
for data in eval2000_hires train_hires_dev; do
steps/online/nnet2/<API key>.sh --cmd "$train_cmd" --nj 20 \
data/${data} exp/nnet2_online/extractor exp/nnet2_online/ivectors_${data} || exit 1;
done
fi
if [ $stage -le 8 ]; then
# this does offline decoding that should give the same results as the real
# online decoding (the one with --per-utt true)
for lm_suffix in tg fsh_tgpr; do
graph_dir=exp/tri4b/graph_sw1_${lm_suffix}
# use already-built graphs.
for data in eval2000_hires train_hires_dev; do
steps/nnet2/decode.sh --nj 30 --cmd "$decode_cmd" --config conf/decode.config \
--online-ivector-dir exp/nnet2_online/ivectors_${data} \
$graph_dir data/${data} $dir/decode_${data}_sw1_${lm_suffix} || exit 1;
done
done
fi
if [ $stage -le 9 ]; then
# If this setup used PLP features, we'd have to give the option --feature-type plp
# to the script below.
steps/online/nnet2/<API key>.sh --mfcc-config conf/mfcc_hires.conf \
data/lang exp/nnet2_online/extractor "$dir" ${dir}_online || exit 1;
fi
if [ $stage -le 10 ]; then
# do the actual online decoding with iVectors, carrying info forward from
# previous utterances of the same speaker.
for lm_suffix in tg fsh_tgpr; do
graph_dir=exp/tri4b/graph_sw1_${lm_suffix}
for data in eval2000_hires train_hires_dev; do
steps/online/nnet2/decode.sh --config conf/decode.config --cmd "$decode_cmd" --nj 30 \
"$graph_dir" data/${data} ${dir}_online/decode_${data}_sw1_${lm_suffix} || exit 1;
done
done
fi
if [ $stage -le 11 ]; then
# this version of the decoding treats each utterance separately
# without carrying forward speaker information.
for lm_suffix in tg fsh_tgpr; do
graph_dir=exp/tri4b/graph_sw1_${lm_suffix}
for data in eval2000_hires train_hires_dev; do
steps/online/nnet2/decode.sh --config conf/decode.config --cmd "$decode_cmd" --nj 30 \
--per-utt true \
"$graph_dir" data/${data} ${dir}_online/decode_${data}_sw1_${lm_suffix}_per_utt || exit 1;
done
done
fi
exit 0;
# get results on Dev with this command:
for x in exp/nnet2_online/nnet_a/<API key>*; do grep WER $x/wer_* | utils/best_wer.sh; done
# and results on eval2000 with this command:
for x in exp/nnet2_online/nnet_a/decode_eval2000_*; do grep Sum $x/score_*/*sys | utils/best_wer.sh; done
# for a baseline (although not the very best baseline we could do), here is a GMM-based
# system trained on all the training data. This is a speaker-adaptively trained system,
# so it would be quite tricky to get even this result online.
%WER 29.10 [ 14382 / 49427, 1963 ins, 3394 del, 9025 sub ] exp/tri4b/<API key>/wer_15
%WER 29.53 [ 14598 / 49427, 1885 ins, 3538 del, 9175 sub ] exp/tri4b/<API key>/wer_16
%WER 21.8 | 1831 21395 | 80.5 13.7 5.8 2.3 21.8 59.3 | exp/tri4b/<API key>/score_15/eval2000.ctm.swbd.filt.sys
%WER 22.4 | 1831 21395 | 80.0 13.9 6.1 2.4 22.4 60.0 | exp/tri4b/<API key>/score_16/eval2000.ctm.swbd.filt.sys
# our neural net trained with iVector input, tested in batch mode.
%WER 19.28 [ 9528 / 49427, 1041 ins, 2762 del, 5725 sub ] exp/nnet2_online/nnet_a_gpu/<API key>/wer_12
%WER 19.69 [ 9731 / 49427, 1077 ins, 2780 del, 5874 sub ] exp/nnet2_online/nnet_a_gpu/<API key>/wer_12
%WER 16.3 | 1831 21395 | 85.5 9.6 4.9 1.8 16.3 54.1 | exp/nnet2_online/nnet_a_gpu/<API key>/score_11/eval2000_hires.ctm.swbd.filt.sys
%WER 16.7 | 1831 21395 | 85.0 9.9 5.1 1.8 16.7 54.3 | exp/nnet2_online/nnet_a_gpu/<API key>/score_12/eval2000_hires.ctm.swbd.filt.sys
%WER 23.0 | 4459 42989 | 79.4 13.9 6.6 2.4 23.0 60.5 | exp/nnet2_online/nnet_a_gpu/<API key>/score_11/eval2000_hires.ctm.filt.sys
%WER 23.7 | 4459 42989 | 79.0 14.6 6.3 2.8 23.7 61.3 | exp/nnet2_online/nnet_a_gpu/<API key>/score_10/eval2000_hires.ctm.filt.sys
# the experiment tested using truly-online decoding, tested separately per
# utterance (which should in principle give the same results as the batch-mode
# test, which also was per-utterance); I'm not sure what the reason for the
# slight improvement is.
%WER 20.93 [ 10345 / 49427, 1385 ins, 2625 del, 6335 sub ] exp/nnet2_online/nnet_a_online/<API key>/wer_11
%WER 20.50 [ 10131 / 49427, 1239 ins, 2842 del, 6050 sub ] exp/nnet2_online/nnet_a_online/<API key>/wer_12
%WER 16.8 | 1831 21395 | 85.0 10.1 4.9 1.8 16.8 53.9 | exp/nnet2_online/nnet_a_online/<API key>/score_11/eval2000_hires.ctm.swbd.filt.sys
%WER 17.3 | 1831 21395 | 84.8 10.6 4.6 2.1 17.3 55.4 | exp/nnet2_online/nnet_a_online/<API key>/score_10/eval2000_hires.ctm.swbd.filt.sys
%WER 23.7 | 4459 42989 | 78.8 14.7 6.4 2.5 23.7 61.2 | exp/nnet2_online/nnet_a_online/<API key>/score_11/eval2000_hires.ctm.filt.sys
%WER 24.3 | 4459 42989 | 78.6 15.4 6.1 2.9 24.3 62.4 | exp/nnet2_online/nnet_a_online/<API key>/score_10/eval2000_hires.ctm.filt.sys
# truly-online decoding, but this time carrying forward the adaptation state (the iVector
# and associated CMVN) from one utterance to the next within the same speaker. It is
# definitely better than without carrying forward the adaptation state.
%WER 19.29 [ 9533 / 49427, 1060 ins, 2751 del, 5722 sub ] exp/nnet2_online/nnet_a_online/<API key>/wer_12
%WER 19.69 [ 9734 / 49427, 1093 ins, 2761 del, 5880 sub ] exp/nnet2_online/nnet_a_online/<API key>/wer_12
%WER 16.2 | 1831 21395 | 85.6 9.5 4.9 1.8 16.2 53.6 | exp/nnet2_online/nnet_a_online/<API key>/score_11/eval2000_hires.ctm.swbd.filt.sys
%WER 16.7 | 1831 21395 | 85.4 9.9 4.7 2.1 16.7 54.8 | exp/nnet2_online/nnet_a_online/<API key>/score_10/eval2000_hires.ctm.swbd.filt.sys
%WER 22.9 | 4459 42989 | 79.5 13.9 6.6 2.4 22.9 60.3 | exp/nnet2_online/nnet_a_online/<API key>/score_11/eval2000_hires.ctm.filt.sys
%WER 23.6 | 4459 42989 | 79.0 14.4 6.7 2.5 23.6 61.1 | exp/nnet2_online/nnet_a_online/<API key>/score_11/eval2000_hires.ctm.filt.sys
# These are not updated: these results are from systems not using hi-res features
# Here is the baseline experiment with no iVectors and no CMVN, also tested in batch mode.
# It's around 1% worse than (with iVectors, batch-mode)
%WER 18.9 | 1831 21395 | 82.9 11.4 5.7 1.8 18.9 56.6 | exp/nnet2_online/nnet_a_gpu_baseline/<API key>/score_11/eval2000.ctm.swbd.filt.sys
%WER 19.4 | 1831 21395 | 82.5 11.9 5.7 1.9 19.4 56.9 | exp/nnet2_online/nnet_a_gpu_baseline/<API key>/score_11/eval2000.ctm.swbd.filt.sys
# This is the baseline experiment tested in "online" mode; it's essentially the same as batch.
%WER 19.0 | 1831 21395 | 82.8 11.5 5.7 1.8 19.0 56.5 | exp/nnet2_online/<API key>/<API key>/score_11/eval2000.ctm.swbd.filt.sys
%WER 19.4 | 1831 21395 | 82.5 11.8 5.7 1.9 19.4 56.9 | exp/nnet2_online/<API key>/<API key>/score_11/eval2000.ctm.swbd.filt.sys |
#ifndef _WORKERTHREAD_H
#define _WORKERTHREAD_H
#include <thread>
#include "<API key>.h"
class MySQLConnection;
class SQLOperation;
class DatabaseWorker
{
public:
DatabaseWorker(<API key><SQLOperation*>* newQueue, MySQLConnection* connection);
~DatabaseWorker();
private:
<API key><SQLOperation*>* _queue;
MySQLConnection* _connection;
void WorkerThread();
std::thread _workerThread;
std::atomic_bool _cancelationToken;
DatabaseWorker(DatabaseWorker const& right) = delete;
DatabaseWorker& operator=(DatabaseWorker const& right) = delete;
};
#endif |
package sun.tools.jstatd;
import java.rmi.*;
import java.rmi.server.*;
import java.rmi.registry.Registry;
import java.rmi.registry.LocateRegistry;
import java.net.<API key>;
import sun.jvmstat.monitor.remote.*;
/**
* Application providing remote access to the jvmstat instrumentation
* exported by local Java Virtual Machine processes. Remote access is
* provided through an RMI interface.
*
* @author Brian Doherty
* @since 1.5
*/
public class Jstatd {
private static Registry registry;
private static int port = -1;
private static boolean startRegistry = true;
private static void printUsage() {
System.err.println("usage: jstatd [-nr] [-p port] [-n rminame]");
}
static void bind(String name, RemoteHostImpl remoteHost)
throws RemoteException, <API key>, Exception {
try {
Naming.rebind(name, remoteHost);
} catch (java.rmi.ConnectException e) {
/*
* either the registry is not running or we cannot contact it.
* start an internal registry if requested.
*/
if (startRegistry && registry == null) {
int localport = (port < 0) ? Registry.REGISTRY_PORT : port;
registry = LocateRegistry.createRegistry(localport);
bind(name, remoteHost);
}
else {
System.out.println("Could not contact registry\n"
+ e.getMessage());
e.printStackTrace();
}
} catch (RemoteException e) {
System.err.println("Could not bind " + name + " to RMI Registry");
e.printStackTrace();
}
}
public static void main(String[] args) {
String rminame = null;
int argc = 0;
for ( ; (argc < args.length) && (args[argc].startsWith("-")); argc++) {
String arg = args[argc];
if (arg.compareTo("-nr") == 0) {
startRegistry = false;
} else if (arg.startsWith("-p")) {
if (arg.compareTo("-p") != 0) {
port = Integer.parseInt(arg.substring(2));
} else {
argc++;
if (argc >= args.length) {
printUsage();
System.exit(1);
}
port = Integer.parseInt(args[argc]);
}
} else if (arg.startsWith("-n")) {
if (arg.compareTo("-n") != 0) {
rminame = arg.substring(2);
} else {
argc++;
if (argc >= args.length) {
printUsage();
System.exit(1);
}
rminame = args[argc];
}
} else {
printUsage();
System.exit(1);
}
}
if (argc < args.length) {
printUsage();
System.exit(1);
}
if (System.getSecurityManager() == null) {
System.setSecurityManager(new RMISecurityManager());
}
StringBuilder name = new StringBuilder();
if (port >= 0) {
name.append("//:").append(port);
}
if (rminame == null) {
rminame = "JStatRemoteHost";
}
name.append("/").append(rminame);
try {
// use 1.5.0 dynamically generated subs.
System.setProperty("java.rmi.server.ignoreSubClasses", "true");
RemoteHostImpl remoteHost = new RemoteHostImpl();
RemoteHost stub = (RemoteHost) UnicastRemoteObject.exportObject(
remoteHost, 0);
bind(name.toString(), remoteHost);
} catch (<API key> e) {
if (rminame != null) {
System.out.println("Bad RMI server name: " + rminame);
} else {
System.out.println("Bad RMI URL: " + name + " : "
+ e.getMessage());
}
System.exit(1);
} catch (java.rmi.ConnectException e) {
// could not attach to or create a registry
System.out.println("Could not contact RMI registry\n"
+ e.getMessage());
System.exit(1);
} catch (Exception e) {
System.out.println("Could not create remote object\n"
+ e.getMessage());
e.printStackTrace();
System.exit(1);
}
}
} |
.<API key>.tab-pane {
position: relative;
/*width: 100%; width needed weird IE bug */
/*margin-right: -2px; to make room for the shadow */
}
.<API key> .tab-row .tab {
height: 16px;
background-image: url( "tab.png" );
position: relative;
top: 0;
display: inline;
float: right;
overflow: hidden;
/*cursor: hand; not compatible with all browsers */
margin: 1px -1px 1px 2px;
padding: 2px 4px 0px 4px;
border-left: 1px solid #919B9C;
border-right: 1px solid #919B9C;
border-top: 1px solid #919B9C;
border-bottom-width: 0;
z-index: 1;
font: 11px Tahoma;
white-space: nowrap;
text-align: center;
}
.<API key> .tab-row .tab.selected {
height: 18px !important;
background-image: url( "tab_active.png" ) !important;
background-repeat: repeat;
border-left: 1px solid #919B9C;
border-right: 1px solid #919B9C;
border-bottom-width: 0;
border-top-width: 0;
z-index: 3;
padding: 2px 4px 0px 4px;
margin: 1px -3px -3px 0px;
top: -2px;
font: 11px Tahoma;
}
.<API key> .tab-row .tab a {
font: 11px Tahoma;
color: #333333;
text-decoration: none;
/*cursor: hand; not compatible with all browsers*/
}
.<API key> .tab-row .tab.hover {
font: 11px Tahoma;
height: 16px;
background-image: url( "tab_hover.png" );
background-repeat: repeat;
}
.<API key> .tab-page {
border: 1px solid rgb( 145, 155, 156 );
background: rgb( 252, 252, 254 );
z-index: 2;
position: relative;
top: -2px;
font: 11px Tahoma;
color: #333333;
/*244, 243, 238*/
/* 145, 155, 156*/
padding: 5px;
width: 97%; /* stupid stupid stupid IE!!! */
float: right;
}
.<API key> .tab-row {
z-index: 1;
white-space: nowrap;
} |
#ifndef _NET_H
#define _NET_H
#include <stdint.h>
#include "src/common/macros.h"
/* open a stream socket on an ephemereal port and put it into
* the listen state. fd and port are filled in with the new
* socket's file descriptor and port #.
*
* OUT fd - listening socket file descriptor number
* OUT port - TCP port number in host byte order
*/
int net_stream_listen(int *fd, short *port);
/* accept the incoming connection on the stream socket fd
*/
int net_accept_stream(int fd);
/* set low water mark on socket
*/
int net_set_low_water(int sock, size_t size);
#endif /* !_NET_H */ |
#include "genericmodelbase.h"
#include <QMetaType>
GenericModelBase::GenericModelBase(QObject *parent)
: QAbstractListModel(parent)
{
}
GenericModelBase::~GenericModelBase()
{
}
void GenericModelBase::getByIndex(int index)
{
emit populateCurrentItem(accessDataByIndex(index));
} |
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>Banner Ad</title>
</head>
<body>
<!-- Start of Brightcove Player -->
<div style="display:none">
</div>
<!
By use of this code snippet, I agree to the Brightcove Publisher T and C
found at https://accounts.brightcove.com/en/<API key>/.
<script type="text/javascript" src="http://admin.brightcove.com/js/<API key>.js"></script>
<object id="myExperience" class="<API key>">
<param name="bgcolor" value="#FFFFFF" />
<param name="width" value="486" />
<param name="height" value="412" />
<param name="playerID" value="4468173471001" />
<param name="playerKey" value="AQ~~,AAAEEFPipHE~,<API key>" />
<param name="isVid" value="true" />
<param name="dynamicStreaming" value="true" />
<param name="forceHTML" value="true" />
<param name="@videoPlayer" value="4472127903001" />
<!-- smart player api params -->
<param name="includeAPI" value="true" />
<param name="templateLoadHandler" value="onTemplateLoad" />
<param name="<API key>" value="onTemplateReady" />
</object>
<!
This script tag will cause the Brightcove Players defined above it to be created as soon
as the line is read by the browser. If you wish to have the player instantiated only after
the rest of the HTML is processed and the page load is complete, remove the line.
<script src="//docs.brightcove.com/en/scripts/https-fix.js"></script><script type="text/javascript">brightcove.createExperiences();</script>
<!-- End of Brightcove Player -->
<br/>
<!-- bottom banner image -->
<img id="bottomImage" width="300" />
<!-- custom script -->
<script type="text/JavaScript">
var player,
APIModules,
videoPlayer,
cuePoints,
image;
var onTemplateLoad = function(experienceID){
console.log("EVENT: onTemplateLoad");
player = brightcove.api.getExperience(experienceID);
APIModules = brightcove.api.modules.APIModules;
};
var onTemplateReady = function(evt) {
console.log("EVENT.onTemplateReady");
cuePoints = player.getModule(APIModules.CUE_POINTS);
cuePoints.addEventListener(brightcove.api.events.CuePointEvent.CUE, onCue);
}
var onCue = function(evt) {
console.log("EVENT.onCue");
image = evt.cuePoint.metadata;
console.log("Image for this cue point: " + image);
document.getElementById("bottomImage").src = image;
}
</script>
</body>
</html> |
# CPUfreq core
obj-$(CONFIG_CPU_FREQ) += cpufreq.o
# CPUfreq stats
obj-$(<API key>) += cpufreq_stats.o
# CPUfreq governors
obj-$(<API key>) += cpufreq_performance.o
obj-$(<API key>) += cpufreq_smartass.o
obj-$(<API key>) += cpufreq_powersave.o
obj-$(<API key>) += cpufreq_userspace.o
obj-$(<API key>) += cpufreq_ondemand.o
obj-$(<API key>) += <API key>.o
obj-$(<API key>) += cpufreq_interactive.o
# CPUfreq cross-arch helpers
obj-$(<API key>) += freq_table.o |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Mobissime Liberta source code Documentation</title>
<link rel="stylesheet" href="resources/bootstrap.min.css?<SHA1-like>">
<link rel="stylesheet" href="resources/style.css?<SHA1-like>">
</head>
<body>
<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a href="index.html" class="navbar-brand">Liberta Doc</a>
</div>
<div class="collapse navbar-collapse">
<form id="search" class="navbar-form navbar-left" role="search">
<input type="hidden" name="cx" value="">
<input type="hidden" name="ie" value="UTF-8">
<div class="form-group">
<input type="text" name="q" class="search-query form-control" placeholder="Search">
</div>
</form>
<ul class="nav navbar-nav">
<li>
<a href="namespace-MyCrm.Modules.LibertaTodos.Controllers.html" title="Summary of MyCrm\Modules\LibertaTodos\Controllers"><span>Namespace</span></a>
</li>
<li class="active">
<span>Class</span> </li>
</ul>
</div>
</div>
</nav>
<div id="left">
<div id="menu">
<div id="groups">
<h3>Namespaces</h3>
<ul>
<li class="active">
<a href="namespace-MyCrm.html">
MyCrm<span></span>
</a>
<ul>
<li class="active">
<a href="namespace-MyCrm.Modules.html">
Modules<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaDatastore.html">
LibertaDatastore<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaDatastore.Controllers.html">
Controllers </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.LibertaDatastore.Lib.html">
Lib </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.LibertaDatastore.Model.html">
Model </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaDocGenerator.html">
LibertaDocGenerator<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaDocGenerator.Controllers.html">
Controllers </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaMenus.html">
LibertaMenus<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaMenus.Controllers.html">
Controllers </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaModules.html">
LibertaModules<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaModules.Controllers.html">
Controllers </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.LibertaModules.Lib.html">
Lib </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.LibertaModules.Model.html">
Model </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaQueryBuilder.html">
LibertaQueryBuilder<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaQueryBuilder.Controllers.html">
Controllers </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.LibertaQueryBuilder.Model.html">
Model </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaTest.html">
LibertaTest<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaTest.Controllers.html">
Controllers </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaTickets.html">
LibertaTickets<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaTickets.Controllers.html">
Controllers </a>
</li>
</ul></li>
<li class="active">
<a href="namespace-MyCrm.Modules.LibertaTodos.html">
LibertaTodos<span></span>
</a>
<ul>
<li class="active">
<a href="namespace-MyCrm.Modules.LibertaTodos.Controllers.html">
Controllers </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.LibertaTodos.Model.html">
Model </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaUserProfile.html">
LibertaUserProfile<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaUserProfile.Controllers.html">
Controllers </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.LibertaUserProfile.Lib.html">
Lib </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.LibertaUsers.html">
LibertaUsers<span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.LibertaUsers.Controllers.html">
Controllers </a>
</li>
</ul></li>
<li>
<a href="namespace-MyCrm.Modules.<API key>.html">
<API key><span></span>
</a>
<ul>
<li>
<a href="namespace-MyCrm.Modules.<API key>.Controllers.html">
Controllers </a>
</li>
<li>
<a href="namespace-MyCrm.Modules.<API key>.Lib.html">
Lib </a>
</li>
</ul></li></ul></li></ul></li>
<li>
<a href="namespace-None.html">
None </a>
</li>
</ul>
</div>
<div id="elements">
<h3>Classes</h3>
<ul>
<li class="active"><a href="class-MyCrm.Modules.LibertaTodos.Controllers.DynamicController.html">DynamicController</a></li>
<li><a href="class-MyCrm.Modules.LibertaTodos.Controllers.MainController.html">MainController</a></li>
</ul>
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
<div id="content" class="class">
<h1>Class DynamicController</h1>
<dl class="tree well">
<dd style="padding-left:0px">
App\Lib\TwigController
</dd>
<dd style="padding-left:30px">
<img src="resources/inherit.png" alt="Extended by">
<b><span>MyCrm\Modules\LibertaTodos\Controllers\DynamicController</span></b>
</dd>
</dl>
<div class="alert alert-info">
<b>Namespace:</b> <a href="namespace-MyCrm.html">MyCrm</a>\<a href="namespace-MyCrm.Modules.html">Modules</a>\<a href="namespace-MyCrm.Modules.LibertaTodos.html">LibertaTodos</a>\<a href="namespace-MyCrm.Modules.LibertaTodos.Controllers.html">Controllers</a><br>
<b>Located at</b> <a href="source-class-MyCrm.Modules.LibertaTodos.Controllers.DynamicController.html#19-68" title="Go to source code">LibertaTodos/Controllers/DynamicController.php</a>
<br>
</div>
<div class="panel panel-default">
<div class="panel-heading"><h2>Methods summary</h2></div>
<table class="summary table table-bordered table-striped methods" id="methods">
<tr data-order="indexAction" id="_indexAction">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_indexAction">#</a>
<code><a href="source-class-MyCrm.Modules.LibertaTodos.Controllers.DynamicController.html#22-34" title="Go to source code">indexAction</a>( <span>Symfony\Component\HttpFoundation\Request <var>$request</var></span>, <span> <var>$appParams</var></span> )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
<tr data-order="showAction" id="_showAction">
<td class="attributes"><code>
public
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#_showAction">#</a>
<code><a href="source-class-MyCrm.Modules.LibertaTodos.Controllers.DynamicController.html#36-67" title="Go to source code">showAction</a>( <span>Symfony\Component\HttpFoundation\Request <var>$request</var></span>, <span> <var>$appParams</var></span>, <span> <var>$slug</var></span> )</code>
<div class="description short">
</div>
<div class="description detailed hidden">
</div>
</div></td>
</tr>
</table>
</div>
</div>
</div>
<div id="footer">
API documentation generated by <a href="https://github.com/paulcoiffier/Liberta-PhpApiGen">Liberta PhpApiGen plugin</a>
</div>
</div>
<script src="resources/combined.js"></script>
<script src="elementlist.js"></script>
</body>
</html> |
// Project: SuckMT, a multithreaded suck replacement
// Language : C++
// This program is free software; you can redistribute it and/or modify
// (at your option) any later version.
// If you reuse code from SuckMT you are required to put a notice of
// this fact in both your manual and about box.
#ifndef __COMMANDQUEUE_H__
#define __COMMANDQUEUE_H__
class CommandQueue; // Forward Declaration
#include "tsqueue.h"
#include "Command.h"
class CommandQueue : public thread_safe_queue<Command *>
{
public:
Command * GetCommand();
void AddCommand(Command * newCommand);
private:
omni_mutex cqmutex;
};
#endif // __COMMANDQUEUE_H__
// End of the file CommandQueue.h |
<?php
namespace TYPO3\CMS\Backend\History;
use TYPO3\CMS\Backend\Utility\BackendUtility;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\DataHandling\DataHandler;
use TYPO3\CMS\Core\Imaging\Icon;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Utility\DiffUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Fluid\View\StandaloneView;
/**
* Class for the record history display module show_rechis
*/
class RecordHistory
{
/**
* Maximum number of sys_history steps to show.
*
* @var int
*/
public $maxSteps = 20;
/**
* Display diff or not (0-no diff, 1-inline)
*
* @var int
*/
public $showDiff = 1;
/**
* On a pages table - show sub elements as well.
*
* @var int
*/
public $showSubElements = 1;
/**
* Show inserts and deletes as well
*
* @var int
*/
public $showInsertDelete = 1;
/**
* Element reference, syntax [tablename]:[uid]
*
* @var string
*/
public $element;
/**
* syslog ID which is not shown anymore
*
* @var int
*/
public $lastSyslogId;
/**
* @var string
*/
public $returnUrl;
/**
* @var array
*/
public $changeLog = [];
/**
* @var bool
*/
public $showMarked = false;
/**
* @var array
*/
protected $recordCache = [];
/**
* @var array
*/
protected $pageAccessCache = [];
/**
* @var string
*/
protected $rollbackFields = '';
/**
* @var IconFactory
*/
protected $iconFactory;
/**
* @var StandaloneView
*/
protected $view;
/**
* Constructor for the class
*/
public function __construct()
{
$this->iconFactory = GeneralUtility::makeInstance(IconFactory::class);
// GPvars:
$this->element = $this->getArgument('element');
$this->returnUrl = $this->getArgument('returnUrl');
$this->lastSyslogId = $this->getArgument('diff');
$this->rollbackFields = $this->getArgument('rollbackFields');
// Resolve sh_uid if set
$this->resolveShUid();
$this->view = $this-><API key>();
}
/**
* Main function for the listing of history.
* It detects incoming variables like element reference, history element uid etc. and renders the correct screen.
*
* @return string HTML content for the module
*/
public function main()
{
// Save snapshot
if ($this->getArgument('highlight') && !$this->getArgument('settings')) {
$this->toggleHighlight($this->getArgument('highlight'));
}
$this->displaySettings();
if ($this->createChangeLog()) {
if ($this->rollbackFields) {
$completeDiff = $this->createMultipleDiff();
$this->performRollback($completeDiff);
}
if ($this->lastSyslogId) {
$this->view->assign('lastSyslogId', $this->lastSyslogId);
$completeDiff = $this->createMultipleDiff();
$this->displayMultipleDiff($completeDiff);
}
if ($this->element) {
$this->displayHistory();
}
}
return $this->view->render();
}
/**
* Toggles highlight state of record
*
* @param int $uid Uid of sys_history entry
*/
public function toggleHighlight($uid)
{
$uid = (int)$uid;
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)-><API key>('sys_history');
$row = $queryBuilder
->select('snapshot')
->from('sys_history')
->where($queryBuilder->expr()->eq('uid', $queryBuilder-><API key>($uid, \PDO::PARAM_INT)))
->execute()
->fetch();
if (!empty($row)) {
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)-><API key>('sys_history');
$queryBuilder
->update('sys_history')
->set('snapshot', (int)!$row['snapshot'])
->where($queryBuilder->expr()->eq('uid', $queryBuilder-><API key>($uid, \PDO::PARAM_INT)))
->execute();
}
}
/**
* perform rollback
*
* @param array $diff Diff array to rollback
* @return string
* @access private
*/
public function performRollback($diff)
{
if (!$this->rollbackFields) {
return '';
}
$reloadPageFrame = 0;
$rollbackData = explode(':', $this->rollbackFields);
// PROCESS INSERTS AND DELETES
// rewrite inserts and deletes
$cmdmapArray = [];
$data = [];
if ($diff['insertsDeletes']) {
switch (count($rollbackData)) {
case 1:
// all tables
$data = $diff['insertsDeletes'];
break;
case 2:
// one record
if ($diff['insertsDeletes'][$this->rollbackFields]) {
$data[$this->rollbackFields] = $diff['insertsDeletes'][$this->rollbackFields];
}
break;
case 3:
// one field in one record -- ignore!
break;
}
if (!empty($data)) {
foreach ($data as $key => $action) {
$elParts = explode(':', $key);
if ((int)$action === 1) {
// inserted records should be deleted
$cmdmapArray[$elParts[0]][$elParts[1]]['delete'] = 1;
// When the record is deleted, the contents of the record do not need to be updated
unset($diff['oldData'][$key]);
unset($diff['newData'][$key]);
} elseif ((int)$action === -1) {
// deleted records should be inserted again
$cmdmapArray[$elParts[0]][$elParts[1]]['undelete'] = 1;
}
}
}
}
// Writes the data:
if ($cmdmapArray) {
$tce = GeneralUtility::makeInstance(DataHandler::class);
$tce->debug = 0;
$tce-><API key> = 1;
$tce->start([], $cmdmapArray);
$tce->process_cmdmap();
unset($tce);
if (isset($cmdmapArray['pages'])) {
$reloadPageFrame = 1;
}
}
// PROCESS CHANGES
// create an array for process_datamap
$diffModified = [];
foreach ($diff['oldData'] as $key => $value) {
$splitKey = explode(':', $key);
$diffModified[$splitKey[0]][$splitKey[1]] = $value;
}
switch (count($rollbackData)) {
case 1:
// all tables
$data = $diffModified;
break;
case 2:
// one record
$data[$rollbackData[0]][$rollbackData[1]] = $diffModified[$rollbackData[0]][$rollbackData[1]];
break;
case 3:
// one field in one record
$data[$rollbackData[0]][$rollbackData[1]][$rollbackData[2]] = $diffModified[$rollbackData[0]][$rollbackData[1]][$rollbackData[2]];
break;
}
// Removing fields:
$data = $this->removeFilefields($rollbackData[0], $data);
// Writes the data:
$tce = GeneralUtility::makeInstance(DataHandler::class);
$tce->debug = 0;
$tce-><API key> = 1;
$tce->start($data, []);
$tce->process_datamap();
unset($tce);
if (isset($data['pages'])) {
$reloadPageFrame = 1;
}
// Return to normal operation
$this->lastSyslogId = false;
$this->rollbackFields = '';
$this->createChangeLog();
$this->view->assign('reloadPageFrame', $reloadPageFrame);
}
/**
* Displays settings
*/
public function displaySettings()
{
// Get current selection from UC, merge data, write it back to UC
$currentSelection = is_array($this->getBackendUser()->uc['moduleData']['history'])
? $this->getBackendUser()->uc['moduleData']['history']
: ['maxSteps' => '', 'showDiff' => 1, 'showSubElements' => 1, 'showInsertDelete' => 1];
$<API key> = $this->getArgument('settings');
if ($<API key>) {
$currentSelection = array_merge($currentSelection, $<API key>);
$this->getBackendUser()->uc['moduleData']['history'] = $currentSelection;
$this->getBackendUser()->writeUC($this->getBackendUser()->uc);
}
// Display selector for number of history entries
$selector['maxSteps'] = [
10 => [
'value' => 10
],
20 => [
'value' => 20
],
50 => [
'value' => 50
],
100 => [
'value' => 100
],
999 => [
'value' => 'maxSteps_all'
],
'marked' => [
'value' => 'maxSteps_marked'
]
];
$selector['showDiff'] = [
0 => [
'value' => 'showDiff_no'
],
1 => [
'value' => 'showDiff_inline'
]
];
$selector['showSubElements'] = [
0 => [
'value' => 'no'
],
1 => [
'value' => 'yes'
]
];
$selector['showInsertDelete'] = [
0 => [
'value' => 'no'
],
1 => [
'value' => 'yes'
]
];
$scriptUrl = GeneralUtility::linkThisScript();
$languageService = $this->getLanguageService();
foreach ($selector as $key => $values) {
foreach ($values as $singleKey => $singleVal) {
$selector[$key][$singleKey]['scriptUrl'] = htmlspecialchars(GeneralUtility::quoteJSvalue($scriptUrl . '&settings[' . $key . ']=' . $singleKey));
}
}
$this->view->assign('settings', $selector);
$this->view->assign('currentSelection', $currentSelection);
$this->view->assign('TYPO3_REQUEST_URI', htmlspecialchars(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')));
// set values correctly
if ($currentSelection['maxSteps'] !== 'marked') {
$this->maxSteps = $currentSelection['maxSteps'] ? (int)$currentSelection['maxSteps'] : $this->maxSteps;
} else {
$this->showMarked = true;
$this->maxSteps = false;
}
$this->showDiff = (int)$currentSelection['showDiff'];
$this->showSubElements = (int)$currentSelection['showSubElements'];
$this->showInsertDelete = (int)$currentSelection['showInsertDelete'];
// Get link to page history if the element history is shown
$elParts = explode(':', $this->element);
if (!empty($this->element) && $elParts[0] !== 'pages') {
$this->view->assign('singleElement', 'true');
$pid = $this->getRecord($elParts[0], $elParts[1]);
if ($this->hasPageAccess('pages', $pid['pid'])) {
$this->view->assign('fullHistoryLink', $this->linkPage(htmlspecialchars($languageService->getLL('elementHistory_link')), ['element' => 'pages:' . $pid['pid']]));
}
}
}
/**
* Shows the full change log
*
* @return string HTML for list, wrapped in a table.
*/
public function displayHistory()
{
if (empty($this->changeLog)) {
return '';
}
$languageService = $this->getLanguageService();
$lines = [];
$beUserArray = BackendUtility::getUserNames();
$i = 0;
// Traverse changeLog array:
foreach ($this->changeLog as $sysLogUid => $entry) {
// stop after maxSteps
if ($this->maxSteps && $i > $this->maxSteps) {
break;
}
// Show only marked states
if (!$entry['snapshot'] && $this->showMarked) {
continue;
}
$i++;
// Build up single line
$singleLine = [];
// Get user names
$userName = $entry['user'] ? $beUserArray[$entry['user']]['username'] : $languageService->getLL('externalChange');
// Executed by switch-user
if (!empty($entry['originalUser'])) {
$userName .= ' (' . $languageService->getLL('viaUser') . ' ' . $beUserArray[$entry['originalUser']]['username'] . ')';
}
$singleLine['backendUserName'] = htmlspecialchars($userName);
$singleLine['backendUserUid'] = $entry['user'];
// add user name
// Diff link
$image = $this->iconFactory->getIcon('<API key>', Icon::SIZE_SMALL)->render();
$singleLine['rollbackLink']= $this->linkPage($image, ['diff' => $sysLogUid]);
// remove first link
$singleLine['time'] = htmlspecialchars(BackendUtility::datetime($entry['tstamp']));
// add time
$singleLine['age'] = htmlspecialchars(BackendUtility::calcAge($GLOBALS['EXEC_TIME'] - $entry['tstamp'], $languageService->sL('LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:labels.<API key>')));
// add age
$singleLine['tableUid'] = $this->linkPage(
$this->generateTitle($entry['tablename'], $entry['recuid']),
['element' => $entry['tablename'] . ':' . $entry['recuid']],
'',
htmlspecialchars($languageService->getLL('linkRecordHistory'))
);
// add record UID
// Show insert/delete/diff/changed field names
if ($entry['action']) {
// insert or delete of element
$singleLine['action'] = htmlspecialchars($languageService->getLL($entry['action']));
} else {
// Display field names instead of full diff
if (!$this->showDiff) {
// Re-write field names with labels
$tmpFieldList = explode(',', $entry['fieldlist']);
foreach ($tmpFieldList as $key => $value) {
$tmp = str_replace(':', '', htmlspecialchars($languageService->sL(BackendUtility::getItemLabel($entry['tablename'], $value))));
if ($tmp) {
$tmpFieldList[$key] = $tmp;
} else {
// remove fields if no label available
unset($tmpFieldList[$key]);
}
}
$singleLine['fieldNames'] = htmlspecialchars(implode(',', $tmpFieldList));
} else {
// Display diff
$diff = $this->renderDiff($entry, $entry['tablename']);
$singleLine['differences'] = $diff;
}
}
// Show link to mark/unmark state
if (!$entry['action']) {
if ($entry['snapshot']) {
$title = htmlspecialchars($languageService->getLL('unmarkState'));
$image = $this->iconFactory->getIcon('actions-unmarkstate', Icon::SIZE_SMALL)->render();
} else {
$title = htmlspecialchars($languageService->getLL('markState'));
$image = $this->iconFactory->getIcon('actions-markstate', Icon::SIZE_SMALL)->render();
}
$singleLine['markState'] = $this->linkPage($image, ['highlight' => $entry['uid']], '', $title);
} else {
$singleLine['markState'] = '';
}
// put line together
$lines[] = $singleLine;
}
$this->view->assign('history', $lines);
if ($this->lastSyslogId) {
$this->view->assign('fullViewLink', $this->linkPage(htmlspecialchars($languageService->getLL('fullView')), ['diff' => '']));
}
}
/**
* Displays a diff over multiple fields including rollback links
*
* @param array $diff Difference array
*/
public function displayMultipleDiff($diff)
{
// Get all array keys needed
$arrayKeys = array_merge(array_keys($diff['newData']), array_keys($diff['insertsDeletes']), array_keys($diff['oldData']));
$arrayKeys = array_unique($arrayKeys);
$languageService = $this->getLanguageService();
if ($arrayKeys) {
$lines = [];
foreach ($arrayKeys as $key) {
$singleLine = [];
$elParts = explode(':', $key);
// Turn around diff because it should be a "rollback preview"
if ((int)$diff['insertsDeletes'][$key] === 1) {
// insert
$singleLine['insertDelete'] = 'delete';
} elseif ((int)$diff['insertsDeletes'][$key] === -1) {
$singleLine['insertDelete'] = 'insert';
}
// Build up temporary diff array
// turn around diff because it should be a "rollback preview"
if ($diff['newData'][$key]) {
$tmpArr['newRecord'] = $diff['oldData'][$key];
$tmpArr['oldRecord'] = $diff['newData'][$key];
$singleLine['differences'] = $this->renderDiff($tmpArr, $elParts[0], $elParts[1]);
}
$elParts = explode(':', $key);
$singleLine['revertRecordLink'] = $this->createRollbackLink($key, htmlspecialchars($languageService->getLL('revertRecord')), 1);
$singleLine['title'] = $this->generateTitle($elParts[0], $elParts[1]);
$lines[] = $singleLine;
}
$this->view->assign('revertAllLink', $this->createRollbackLink('ALL', htmlspecialchars($languageService->getLL('revertAll')), 0));
$this->view->assign('multipleDiff', $lines);
}
}
/**
* Renders HTML table-rows with the comparison information of an sys_history entry record
*
* @param array $entry sys_history entry record.
* @param string $table The table name
* @param int $rollbackUid If set to UID of record, display rollback links
* @return string|NULL HTML table
* @access private
*/
public function renderDiff($entry, $table, $rollbackUid = 0)
{
$lines = [];
if (is_array($entry['newRecord'])) {
/* @var DiffUtility $diffUtility */
$diffUtility = GeneralUtility::makeInstance(DiffUtility::class);
$diffUtility->stripTags = false;
$fieldsToDisplay = array_keys($entry['newRecord']);
$languageService = $this->getLanguageService();
foreach ($fieldsToDisplay as $fN) {
if (is_array($GLOBALS['TCA'][$table]['columns'][$fN]) && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] !== 'passthrough') {
// Create diff-result:
$diffres = $diffUtility->makeDiffDisplay(
BackendUtility::getProcessedValue($table, $fN, $entry['oldRecord'][$fN], 0, true),
BackendUtility::getProcessedValue($table, $fN, $entry['newRecord'][$fN], 0, true)
);
$lines[] = [
'title' => ($rollbackUid ? $this->createRollbackLink(($table . ':' . $rollbackUid . ':' . $fN), htmlspecialchars($languageService->getLL('revertField')), 2) : '') . '
' . htmlspecialchars($languageService->sL(BackendUtility::getItemLabel($table, $fN))),
'result' => str_replace('\n', PHP_EOL, str_replace('\r\n', '\n', $diffres))
];
}
}
}
if ($lines) {
return $lines;
}
// error fallback
return null;
}
/**
* Creates a diff between the current version of the records and the selected version
*
* @return array Diff for many elements, 0 if no changelog is found
*/
public function createMultipleDiff()
{
$insertsDeletes = [];
$newArr = [];
$differences = [];
if (!$this->changeLog) {
return 0;
}
// traverse changelog array
foreach ($this->changeLog as $value) {
$field = $value['tablename'] . ':' . $value['recuid'];
// inserts / deletes
if ($value['action']) {
if (!$insertsDeletes[$field]) {
$insertsDeletes[$field] = 0;
}
if ($value['action'] === 'insert') {
$insertsDeletes[$field]++;
} else {
$insertsDeletes[$field]
}
// unset not needed fields
if ($insertsDeletes[$field] === 0) {
unset($insertsDeletes[$field]);
}
} else {
// update fields
// first row of field
if (!isset($newArr[$field])) {
$newArr[$field] = $value['newRecord'];
$differences[$field] = $value['oldRecord'];
} else {
// standard
$differences[$field] = array_merge($differences[$field], $value['oldRecord']);
}
}
}
// remove entries where there were no changes effectively
foreach ($newArr as $record => $value) {
foreach ($value as $key => $innerVal) {
if ($newArr[$record][$key] == $differences[$record][$key]) {
unset($newArr[$record][$key]);
unset($differences[$record][$key]);
}
}
if (empty($newArr[$record]) && empty($differences[$record])) {
unset($newArr[$record]);
unset($differences[$record]);
}
}
return [
'newData' => $newArr,
'oldData' => $differences,
'insertsDeletes' => $insertsDeletes
];
}
/**
* Creates change log including sub-elements, filling $this->changeLog
*
* @return int
*/
public function createChangeLog()
{
$elParts = explode(':', $this->element);
if (empty($this->element)) {
return 0;
}
$changeLog = $this->getHistoryData($elParts[0], $elParts[1]);
// get history of tables of this page and merge it into changelog
if ($elParts[0] === 'pages' && $this->showSubElements && $this->hasPageAccess('pages', $elParts[1])) {
foreach ($GLOBALS['TCA'] as $tablename => $value) {
// check if there are records on the page
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)-><API key>($tablename);
$queryBuilder->getRestrictions()->removeAll();
$rows = $queryBuilder
->select('uid')
->from($tablename)
->where(
$queryBuilder->expr()->eq(
'pid',
$queryBuilder-><API key>($elParts[1], \PDO::PARAM_INT)
)
)
->execute();
if ($rows->rowCount() === 0) {
continue;
}
foreach ($rows as $row) {
// if there is history data available, merge it into changelog
$newChangeLog = $this->getHistoryData($tablename, $row['uid']);
if (is_array($newChangeLog) && !empty($newChangeLog)) {
foreach ($newChangeLog as $key => $newChangeLogEntry) {
$changeLog[$key] = $newChangeLogEntry;
}
}
}
}
}
if (!$changeLog) {
return 0;
}
krsort($changeLog);
$this->changeLog = $changeLog;
return 1;
}
/**
* Gets history and delete/insert data from sys_log and sys_history
*
* @param string $table DB table name
* @param int $uid UID of record
* @return array|int Array of history data of the record or 0 if no history could be fetched
*/
public function getHistoryData($table, $uid)
{
if (empty($GLOBALS['TCA'][$table]) || !$this->hasTableAccess($table) || !$this->hasPageAccess($table, $uid)) {
// error fallback
return 0;
}
// If table is found in $GLOBALS['TCA']:
$uid = $this->resolveElement($table, $uid);
// Selecting the $this->maxSteps most recent states:
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)-><API key>('sys_history');
$rows = $queryBuilder
->select('sys_history.*', 'sys_log.userid', 'sys_log.log_data')
->from('sys_history')
->from('sys_log')
->where(
$queryBuilder->expr()->eq(
'sys_history.sys_log_uid',
$queryBuilder->quoteIdentifier('sys_log.uid')
),
$queryBuilder->expr()->eq(
'sys_history.tablename',
$queryBuilder-><API key>($table, \PDO::PARAM_STR)
),
$queryBuilder->expr()->eq(
'sys_history.recuid',
$queryBuilder-><API key>($uid, \PDO::PARAM_INT)
)
)
->orderBy('sys_log.uid', 'DESC')
->setMaxResults((int)$this->maxSteps)
->execute()
->fetchAll();
$changeLog = [];
if (!empty($rows)) {
// Traversing the result, building up changesArray / changeLog:
foreach ($rows as $row) {
// Only history until a certain syslog ID needed
if ($this->lastSyslogId && $row['sys_log_uid'] < $this->lastSyslogId) {
continue;
}
$hisDat = unserialize($row['history_data']);
$logData = unserialize($row['log_data']);
if (is_array($hisDat['newRecord']) && is_array($hisDat['oldRecord'])) {
// Add information about the history to the changeLog
$hisDat['uid'] = $row['uid'];
$hisDat['tstamp'] = $row['tstamp'];
$hisDat['user'] = $row['userid'];
$hisDat['originalUser'] = (empty($logData['originalUser']) ? null : $logData['originalUser']);
$hisDat['snapshot'] = $row['snapshot'];
$hisDat['fieldlist'] = $row['fieldlist'];
$hisDat['tablename'] = $row['tablename'];
$hisDat['recuid'] = $row['recuid'];
$changeLog[$row['sys_log_uid']] = $hisDat;
} else {
debug('ERROR: [getHistoryData]');
// error fallback
return 0;
}
}
}
// SELECT INSERTS/DELETES
if ($this->showInsertDelete) {
// Select most recent inserts and deletes // WITHOUT snapshots
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)-><API key>('sys_log');
$result = $queryBuilder
->select('uid', 'userid', 'action', 'tstamp', 'log_data')
->from('sys_log')
->where(
$queryBuilder->expr()->eq('type', $queryBuilder-><API key>(1, \PDO::PARAM_INT)),
$queryBuilder->expr()->orX(
$queryBuilder->expr()->eq('action', $queryBuilder-><API key>(1, \PDO::PARAM_INT)),
$queryBuilder->expr()->eq('action', $queryBuilder-><API key>(3, \PDO::PARAM_INT))
),
$queryBuilder->expr()->eq('tablename', $queryBuilder-><API key>($table, \PDO::PARAM_STR)),
$queryBuilder->expr()->eq('recuid', $queryBuilder-><API key>($uid, \PDO::PARAM_INT))
)
->orderBy('uid', 'DESC')
->setMaxResults((int)$this->maxSteps)
->execute();
// If none are found, nothing more to do
if ($result->rowCount() === 0) {
return $changeLog;
}
foreach ($result as $row) {
if ($this->lastSyslogId && $row['uid'] < $this->lastSyslogId) {
continue;
}
$hisDat = [];
$logData = unserialize($row['log_data']);
switch ($row['action']) {
case 1:
// Insert
$hisDat['action'] = 'insert';
break;
case 3:
// Delete
$hisDat['action'] = 'delete';
break;
}
$hisDat['tstamp'] = $row['tstamp'];
$hisDat['user'] = $row['userid'];
$hisDat['originalUser'] = (empty($logData['originalUser']) ? null : $logData['originalUser']);
$hisDat['tablename'] = $table;
$hisDat['recuid'] = $uid;
$changeLog[$row['uid']] = $hisDat;
}
}
return $changeLog;
}
/**
* Generates the title and puts the record title behind
*
* @param string $table
* @param string $uid
* @return string
*/
public function generateTitle($table, $uid)
{
$out = $table . ':' . $uid;
if ($labelField = $GLOBALS['TCA'][$table]['ctrl']['label']) {
$record = $this->getRecord($table, $uid);
$out .= ' (' . BackendUtility::getRecordTitle($table, $record, true) . ')';
}
return $out;
}
/**
* Creates a link for the rollback
*
* @param string $key Parameter which is set to rollbackFields
* @param string $alt Optional, alternative label and title tag of image
* @param int $type Optional, type of rollback: 0 - ALL; 1 - element; 2 - field
* @return string HTML output
*/
public function createRollbackLink($key, $alt = '', $type = 0)
{
return $this->linkPage('<span class="btn btn-default" style="margin-right: 5px;">' . $alt . '</span>', ['rollbackFields' => $key]);
}
/**
* Creates a link to the same page.
*
* @param string $str String to wrap in <a> tags (must be htmlspecialchars()'ed prior to calling function)
* @param array $inparams Array of key/value pairs to override the default values with.
* @param string $anchor Possible anchor value.
* @param string $title Possible title.
* @return string Link.
* @access private
*/
public function linkPage($str, $inparams = [], $anchor = '', $title = '')
{
// Setting default values based on GET parameters:
$params['element'] = $this->element;
$params['returnUrl'] = $this->returnUrl;
$params['diff'] = $this->lastSyslogId;
// Merging overriding values:
$params = array_merge($params, $inparams);
// Make the link:
$link = BackendUtility::getModuleUrl('record_history', $params) . ($anchor ? '#' . $anchor : '');
return '<a href="' . htmlspecialchars($link) . '"' . ($title ? ' title="' . $title . '"' : '') . '>' . $str . '</a>';
}
/**
* Will traverse the field names in $dataArray and look in $GLOBALS['TCA'] if the fields are of types which cannot
* be handled by the sys_history (that is currently group types with internal_type set to "file")
*
* @param string $table Table name
* @param array $dataArray The data array
* @return array The modified data array
* @access private
*/
public function removeFilefields($table, $dataArray)
{
if ($GLOBALS['TCA'][$table]) {
foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $config) {
if ($config['config']['type'] === 'group' && $config['config']['internal_type'] === 'file') {
unset($dataArray[$field]);
}
}
}
return $dataArray;
}
/**
* Convert input element reference to workspace version if any.
*
* @param string $table Table of input element
* @param int $uid UID of record
* @return int converted UID of record
*/
public function resolveElement($table, $uid)
{
if (isset($GLOBALS['TCA'][$table])) {
if ($workspaceVersion = BackendUtility::<API key>($this->getBackendUser()->workspace, $table, $uid, 'uid')) {
$uid = $workspaceVersion['uid'];
}
}
return $uid;
}
/**
* Resolve sh_uid (used from log)
*/
public function resolveShUid()
{
$shUid = $this->getArgument('sh_uid');
if (empty($shUid)) {
return;
}
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)-><API key>('sys_history');
$record = $queryBuilder
->select('*')
->from('sys_history')
->where($queryBuilder->expr()->eq('uid', $queryBuilder-><API key>($shUid, \PDO::PARAM_INT)))
->execute()
->fetch();
if (empty($record)) {
return;
}
$this->element = $record['tablename'] . ':' . $record['recuid'];
$this->lastSyslogId = $record['sys_log_uid'] - 1;
}
/**
* Determines whether user has access to a page.
*
* @param string $table
* @param int $uid
* @return bool
*/
protected function hasPageAccess($table, $uid)
{
$uid = (int)$uid;
if ($table === 'pages') {
$pageId = $uid;
} else {
$record = $this->getRecord($table, $uid);
$pageId = $record['pid'];
}
if (!isset($this->pageAccessCache[$pageId])) {
$this->pageAccessCache[$pageId] = BackendUtility::readPageAccess(
$pageId, $this->getBackendUser()->getPagePermsClause(1)
);
}
return $this->pageAccessCache[$pageId] !== false;
}
/**
* Determines whether user has access to a table.
*
* @param string $table
* @return bool
*/
protected function hasTableAccess($table)
{
return $this->getBackendUser()->check('tables_select', $table);
}
/**
* Gets a database record.
*
* @param string $table
* @param int $uid
* @return array|NULL
*/
protected function getRecord($table, $uid)
{
if (!isset($this->recordCache[$table][$uid])) {
$this->recordCache[$table][$uid] = BackendUtility::getRecord($table, $uid, '*', '', false);
}
return $this->recordCache[$table][$uid];
}
/**
* Gets the current backend user.
*
* @return \TYPO3\CMS\Core\Authentication\<API key>
*/
protected function getBackendUser()
{
return $GLOBALS['BE_USER'];
}
/**
* Fetches GET/POST arguments and sanitizes the values for
* the expected disposal. Invalid values will be converted
* to an empty string.
*
* @param string $name Name of the argument
* @return array|string|int
*/
protected function getArgument($name)
{
$value = GeneralUtility::_GP($name);
switch ($name) {
case 'element':
if ($value !== '' && !preg_match('#^[a-z0-9_.]+:[0-9]+$#i', $value)) {
$value = '';
}
break;
case 'rollbackFields':
case 'revert':
if ($value !== '' && !preg_match('#^[a-z0-9_.]+(:[0-9]+(:[a-z0-9_.]+)?)?$#i', $value)) {
$value = '';
}
break;
case 'returnUrl':
$value = GeneralUtility::sanitizeLocalUrl($value);
break;
case 'diff':
case 'highlight':
case 'sh_uid':
$value = (int)$value;
break;
case 'settings':
if (!is_array($value)) {
$value = [];
}
break;
default:
$value = '';
}
return $value;
}
/**
* @return \TYPO3\CMS\Lang\LanguageService
*/
protected function getLanguageService()
{
return $GLOBALS['LANG'];
}
/**
* returns a new standalone view, shorthand function
*
* @return StandaloneView
*/
protected function <API key>()
{
/** @var StandaloneView $view */
$view = GeneralUtility::makeInstance(StandaloneView::class);
$view->setLayoutRootPaths([GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Layouts')]);
$view->setPartialRootPaths([GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Partials')]);
$view-><API key>([GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates')]);
$view-><API key>(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/RecordHistory/Main.html'));
$view->getRequest()-><API key>('Backend');
return $view;
}
} |
package io.github.mzmine.parameters.parametertypes;
import java.util.List;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import org.w3c.dom.Element;
import io.github.mzmine.parameters.ParameterValidator;
public class ToggleParameter<ValueType> extends AbstractParameter<ValueType> {
private final @Nonnull List<ValueType> toggleValues;
public ToggleParameter(@Nonnull String name, @Nonnull String description,
@Nonnull String category, List<ValueType> toggleValues) {
this(name, description, category, null, toggleValues, null);
}
public ToggleParameter(@Nonnull String name, @Nonnull String description,
@Nonnull String category, List<ValueType> toggleValues,
String defaultValue) {
this(name, description, category, null, toggleValues, defaultValue);
}
public ToggleParameter(@Nonnull String name, @Nonnull String description,
@Nonnull String category,
@Nullable ParameterValidator<ValueType> validator,
List<ValueType> toggleValues) {
this(name, description, category, validator, toggleValues, null);
}
@SuppressWarnings("unchecked")
public ToggleParameter(@Nonnull String name, @Nonnull String description,
@Nonnull String category,
@Nullable ParameterValidator<ValueType> validator,
List<ValueType> toggleValues, @Nullable String defaultValue) {
super(name, description, category, (Class) ToggleEditor.class,
validator);
this.toggleValues = toggleValues;
setValue(defaultValue);
}
@Override
public @Nonnull ToggleParameter<ValueType> clone() {
ToggleParameter<ValueType> copy = new ToggleParameter<ValueType>(
getName(), getDescription(), getCategory(), getValidator(),
toggleValues);
copy.setValue(this.getValue());
return copy;
}
public List<ValueType> getToggleValues() {
return toggleValues;
}
@Override
public void loadValueFromXML(@Nonnull Element xmlElement) {
String stringValue = xmlElement.getTextContent();
for (ValueType value : toggleValues) {
if (value.toString().equals(stringValue)) {
setValue(value);
break;
}
}
}
@Override
public void saveValueToXML(@Nonnull Element xmlElement) {
Object value = getValue();
if (value == null)
return;
xmlElement.setTextContent(value.toString());
}
} |
#include <bits/stdc++.h>
int map[31][31], n, cur = 2;
bool check(int t1, int t2) {
if (t1 < 1 || t2 < 1 || t1 > n || t2 > n) return false;
return true;
}
int dir[4][2] = {{0, 1}, {0, -1}, {1, 0}, {-1, 0}};
int main() {
std::memset(map, -1, sizeof(map));
bool flag;
std::cin >> n;
int i, j, t1, t2;
for (i = 1; i <= n; i++)
for (j = 1; j <= n; j++) std::cin >> map[i][j];
std::queue<int> x;
std::queue<int> y;
for (i = 1; i <= n; i++)
for (j = 1; j <= n; j++) {
if (map[i][j] == 0) {
flag = true;
cur++;
x.push(i);
y.push(j);
map[i][j] = cur;
while (!x.empty()) {
for (i = 0; i < 4; i++) {
t1 = x.front() + dir[i][0];
t2 = y.front() + dir[i][1];
if (map[t1][t2] == -1) flag = false;
if (!check(t1, t2)) continue;
if ((map[t1][t2] == 0) && (map[x.front()][y.front()] != map[t1][t2])) {
map[t1][t2] = cur;
x.push(t1);
y.push(t2);
}
}
x.pop();
y.pop();
}
}
if (flag) {
for (i = 1; i <= n; i++) {
for (j = 1; j <= n; j++)
if (map[i][j] == cur) {
std::cout << "2 ";
} else {
if (map[i][j] == 1)
std::cout << "1 ";
else
std::cout << "0 ";
}
std::cout << std::endl;
}
return 0;
}
}
return 0;
} |
#ifndef <API key>
#define <API key>
// Auto generated for version 2, 4, 3, 8606
enum EObjectFields
{
OBJECT_FIELD_GUID = 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
OBJECT_FIELD_TYPE = 0x0002, // Size: 1, Type: INT, Flags: PUBLIC
OBJECT_FIELD_ENTRY = 0x0003, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = 0x0004, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = 0x0005, // Size: 1, Type: INT, Flags: NONE
OBJECT_END = 0x0006,
};
enum EItemFields
{
ITEM_FIELD_OWNER = OBJECT_END + 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x0002, // Size: 2, Type: LONG, Flags: PUBLIC
ITEM_FIELD_CREATOR = OBJECT_END + 0x0004, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x0006, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x0008, // Size: 1, Type: INT, Flags: OWNER_ONLY, UNK2
ITEM_FIELD_DURATION = OBJECT_END + 0x0009, // Size: 1, Type: INT, Flags: OWNER_ONLY, UNK2
<API key> = OBJECT_END + 0x000A, // Size: 5, Type: INT, Flags: OWNER_ONLY, UNK2
ITEM_FIELD_FLAGS = OBJECT_END + 0x000F, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0010, // Size: 33, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0031, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0032, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0033, // Size: 1, Type: INT, Flags: OWNER_ONLY
<API key> = OBJECT_END + 0x0034, // Size: 1, Type: INT, Flags: OWNER_ONLY, UNK2
<API key> = OBJECT_END + 0x0035, // Size: 1, Type: INT, Flags: OWNER_ONLY, UNK2
ITEM_END = OBJECT_END + 0x0036,
};
enum EContainerFields
{
<API key> = ITEM_END + 0x0000, // Size: 1, Type: INT, Flags: PUBLIC
CONTAINER_ALIGN_PAD = ITEM_END + 0x0001, // Size: 1, Type: BYTES, Flags: NONE
<API key> = ITEM_END + 0x0002, // Size: 72, Type: LONG, Flags: PUBLIC
CONTAINER_END = ITEM_END + 0x004A,
};
/**
* Fields that are available for a \ref Unit ?
* \see Object::HasFlag
* \todo Document this properly!
*/
enum EUnitFields
{
UNIT_FIELD_CHARM = OBJECT_END + 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
UNIT_FIELD_SUMMON = OBJECT_END + 0x0002, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x0004, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x0006, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x0008, // Size: 2, Type: LONG, Flags: PUBLIC
UNIT_FIELD_TARGET = OBJECT_END + 0x000A, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x000C, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x000E, // Size: 2, Type: LONG, Flags: PUBLIC
UNIT_FIELD_HEALTH = OBJECT_END + 0x0010, // Size: 1, Type: INT, Flags: DYNAMIC
UNIT_FIELD_POWER1 = OBJECT_END + 0x0011, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_POWER2 = OBJECT_END + 0x0012, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_POWER3 = OBJECT_END + 0x0013, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_POWER4 = OBJECT_END + 0x0014, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_POWER5 = OBJECT_END + 0x0015, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0016, // Size: 1, Type: INT, Flags: DYNAMIC
<API key> = OBJECT_END + 0x0017, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0018, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0019, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x001A, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x001B, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_LEVEL = OBJECT_END + 0x001C, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x001D, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_BYTES_0 = OBJECT_END + 0x001E, // Size: 1, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x001F, // Size: 3, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0022, // Size: 6, Type: BYTES, Flags: PUBLIC
UNIT_FIELD_FLAGS = OBJECT_END + 0x0028, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_FLAGS_2 = OBJECT_END + 0x0029, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_FIELD_AURA = OBJECT_END + 0x002A, // Size: 56, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0062, // Size: 14, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x0070, // Size: 14, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x007E, // Size: 14, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x008C, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x008D, // Size: 2, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x008F, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = OBJECT_END + 0x0090, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0091, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0092, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0093, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0094, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0095, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY, UNK3
<API key> = OBJECT_END + 0x0096, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY, UNK3
<API key> = OBJECT_END + 0x0097, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY, UNK3
<API key> = OBJECT_END + 0x0098, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY, UNK3
UNIT_FIELD_BYTES_1 = OBJECT_END + 0x0099, // Size: 1, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x009A, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x009B, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x009C, // Size: 1, Type: INT, Flags: OWNER_ONLY
<API key> = OBJECT_END + 0x009D, // Size: 1, Type: INT, Flags: OWNER_ONLY
UNIT_DYNAMIC_FLAGS = OBJECT_END + 0x009E, // Size: 1, Type: INT, Flags: DYNAMIC
UNIT_CHANNEL_SPELL = OBJECT_END + 0x009F, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_MOD_CAST_SPEED = OBJECT_END + 0x00A0, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = OBJECT_END + 0x00A1, // Size: 1, Type: INT, Flags: PUBLIC
UNIT_NPC_FLAGS = OBJECT_END + 0x00A2, // Size: 1, Type: INT, Flags: DYNAMIC
UNIT_NPC_EMOTESTATE = OBJECT_END + 0x00A3, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x00A4, // Size: 1, Type: TWO_SHORT, Flags: OWNER_ONLY
UNIT_FIELD_STAT0 = OBJECT_END + 0x00A5, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_STAT1 = OBJECT_END + 0x00A6, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_STAT2 = OBJECT_END + 0x00A7, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_STAT3 = OBJECT_END + 0x00A8, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_STAT4 = OBJECT_END + 0x00A9, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00AA, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_POSSTAT1 = OBJECT_END + 0x00AB, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_POSSTAT2 = OBJECT_END + 0x00AC, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_POSSTAT3 = OBJECT_END + 0x00AD, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00AE, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00AF, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_NEGSTAT1 = OBJECT_END + 0x00B0, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_NEGSTAT2 = OBJECT_END + 0x00B1, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_NEGSTAT3 = OBJECT_END + 0x00B2, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00B3, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00B4, // Size: 7, Type: INT, Flags: PRIVATE, OWNER_ONLY, UNK3
<API key> = OBJECT_END + 0x00BB, // Size: 7, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00C2, // Size: 7, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00C9, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x00CA, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_BYTES_2 = OBJECT_END + 0x00CB, // Size: 1, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x00CC, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00CD, // Size: 1, Type: TWO_SHORT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00CE, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00CF, // Size: 1, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00D0, // Size: 1, Type: TWO_SHORT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00D1, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00D2, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00D3, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00D4, // Size: 7, Type: INT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00DB, // Size: 7, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY
<API key> = OBJECT_END + 0x00E2, // Size: 1, Type: FLOAT, Flags: PRIVATE, OWNER_ONLY
UNIT_FIELD_PADDING = OBJECT_END + 0x00E3, // Size: 1, Type: INT, Flags: NONE
UNIT_END = OBJECT_END + 0x00E4,
PLAYER_DUEL_ARBITER = UNIT_END + 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
PLAYER_FLAGS = UNIT_END + 0x0002, // Size: 1, Type: INT, Flags: PUBLIC
PLAYER_GUILDID = UNIT_END + 0x0003, // Size: 1, Type: INT, Flags: PUBLIC
PLAYER_GUILDRANK = UNIT_END + 0x0004, // Size: 1, Type: INT, Flags: PUBLIC
PLAYER_BYTES = UNIT_END + 0x0005, // Size: 1, Type: BYTES, Flags: PUBLIC
PLAYER_BYTES_2 = UNIT_END + 0x0006, // Size: 1, Type: BYTES, Flags: PUBLIC
PLAYER_BYTES_3 = UNIT_END + 0x0007, // Size: 1, Type: BYTES, Flags: PUBLIC
PLAYER_DUEL_TEAM = UNIT_END + 0x0008, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x0009, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x000A, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x000B, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x000C, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x000D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x000E, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x000F, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0010, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0011, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0012, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0013, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0014, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0015, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0016, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0017, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0018, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0019, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x001A, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x001B, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x001C, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x001D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x001E, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x001F, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0020, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0021, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0022, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0023, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0024, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0025, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0026, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0027, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0028, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0029, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x002A, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x002B, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x002C, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x002D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x002E, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x002F, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0030, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0031, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0032, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0033, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0034, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0035, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0036, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0037, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0038, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0039, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x003A, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x003B, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x003C, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x003D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x003E, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x003F, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0040, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0041, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0042, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0043, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0044, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0045, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0046, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0047, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0048, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0049, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x004A, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x004B, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x004C, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x004D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x004E, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x004F, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0050, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0051, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0052, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0053, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0054, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0055, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0056, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0057, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0058, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0059, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x005A, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x005B, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x005C, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x005D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x005E, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x005F, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0060, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0061, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0062, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0063, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0064, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0065, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0066, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x0067, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0068, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0069, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x006A, // Size: 1, Type: INT, Flags: GROUP_ONLY
<API key> = UNIT_END + 0x006B, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x006C, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x006D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x006E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0070, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x007C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x007D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x007E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0080, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x008C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x008D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x008E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0090, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x009C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x009D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x009E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x00A0, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00AC, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x00AD, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00AE, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x00B0, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00BC, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x00BD, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00BE, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x00C0, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00CC, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x00CD, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00CE, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x00D0, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00DC, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x00DD, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00DE, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x00E0, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00EC, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x00ED, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00EE, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x00F0, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00FC, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x00FD, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x00FE, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0100, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x010C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x010D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x010E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0110, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x011C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x011D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x011E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0120, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x012C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x012D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x012E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0130, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x013C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x013D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x013E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0140, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x014C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x014D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x014E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0150, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x015C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x015D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x015E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0160, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x016C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x016D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x016E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0170, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x017C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x017D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x017E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0180, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x018C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x018D, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x018E, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = UNIT_END + 0x0190, // Size: 12, Type: INT, Flags: PUBLIC
<API key> = UNIT_END + 0x019C, // Size: 1, Type: TWO_SHORT, Flags: PUBLIC
<API key> = UNIT_END + 0x019D, // Size: 1, Type: INT, Flags: PUBLIC
PLAYER_CHOSEN_TITLE = UNIT_END + 0x019E, // Size: 1, Type: INT, Flags: PUBLIC
PLAYER_FIELD_PAD_0 = UNIT_END + 0x019F, // Size: 1, Type: INT, Flags: NONE
<API key> = UNIT_END + 0x01A0, // Size: 46, Type: LONG, Flags: PRIVATE
<API key> = UNIT_END + 0x01CE, // Size: 32, Type: LONG, Flags: PRIVATE
<API key> = UNIT_END + 0x01EE, // Size: 56, Type: LONG, Flags: PRIVATE
<API key> = UNIT_END + 0x0226, // Size: 14, Type: LONG, Flags: PRIVATE
<API key> = UNIT_END + 0x0234, // Size: 24, Type: LONG, Flags: PRIVATE
<API key> = UNIT_END + 0x024C, // Size: 64, Type: LONG, Flags: PRIVATE
<API key> = UNIT_END + 0x028C, // Size: 36, Type: LONG, Flags: PRIVATE
PLAYER_FARSIGHT = UNIT_END + 0x02B0, // Size: 2, Type: LONG, Flags: PRIVATE
<API key> = UNIT_END + 0x02B2, // Size: 2, Type: LONG, Flags: PRIVATE
PLAYER_XP = UNIT_END + 0x02B4, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x02B5, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x02B6, // Size: 384, Type: TWO_SHORT, Flags: PRIVATE
<API key> = UNIT_END + 0x0436, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0437, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0438, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0439, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x043A, // Size: 1, Type: FLOAT, Flags: PRIVATE
<API key> = UNIT_END + 0x043B, // Size: 1, Type: FLOAT, Flags: PRIVATE
<API key> = UNIT_END + 0x043C, // Size: 1, Type: FLOAT, Flags: PRIVATE
PLAYER_EXPERTISE = UNIT_END + 0x043D, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x043E, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x043F, // Size: 1, Type: FLOAT, Flags: PRIVATE
<API key> = UNIT_END + 0x0440, // Size: 1, Type: FLOAT, Flags: PRIVATE
<API key> = UNIT_END + 0x0441, // Size: 1, Type: FLOAT, Flags: PRIVATE
<API key> = UNIT_END + 0x0442, // Size: 7, Type: FLOAT, Flags: PRIVATE
PLAYER_SHIELD_BLOCK = UNIT_END + 0x0449, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x044A, // Size: 128, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x04CA, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04CB, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04CC, // Size: 7, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04D3, // Size: 7, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04DA, // Size: 7, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04E1, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04E2, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04E3, // Size: 1, Type: INT, Flags: PRIVATE
PLAYER_FIELD_BYTES = UNIT_END + 0x04E4, // Size: 1, Type: BYTES, Flags: PRIVATE
PLAYER_AMMO_ID = UNIT_END + 0x04E5, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04E6, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04E7, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04E8, // Size: 12, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x04F4, // Size: 12, Type: INT, Flags: PRIVATE
PLAYER_FIELD_KILLS = UNIT_END + 0x0500, // Size: 1, Type: TWO_SHORT, Flags: PRIVATE
<API key> = UNIT_END + 0x0501, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0502, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0503, // Size: 1, Type: INT, Flags: PRIVATE
PLAYER_FIELD_BYTES2 = UNIT_END + 0x0504, // Size: 1, Type: BYTES, Flags: PRIVATE
<API key> = UNIT_END + 0x0505, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0506, // Size: 24, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x051E, // Size: 18, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0530, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0531, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0532, // Size: 1, Type: FLOAT, Flags: PRIVATE
<API key> = UNIT_END + 0x0533, // Size: 1, Type: FLOAT, Flags: PRIVATE
<API key> = UNIT_END + 0x0534, // Size: 1, Type: INT, Flags: PRIVATE
<API key> = UNIT_END + 0x0535, // Size: 25, Type: INT, Flags: PRIVATE
PLAYER_END = UNIT_END + 0x054E,
};
enum EGameObjectFields
{
<API key> = OBJECT_END + 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
<API key> = OBJECT_END + 0x0002, // Size: 1, Type: INT, Flags: PUBLIC
GAMEOBJECT_FLAGS = OBJECT_END + 0x0003, // Size: 1, Type: INT, Flags: PUBLIC
GAMEOBJECT_ROTATION = OBJECT_END + 0x0004, // Size: 4, Type: FLOAT, Flags: PUBLIC
GAMEOBJECT_STATE = OBJECT_END + 0x0008, // Size: 1, Type: INT, Flags: PUBLIC
GAMEOBJECT_POS_X = OBJECT_END + 0x0009, // Size: 1, Type: FLOAT, Flags: PUBLIC
GAMEOBJECT_POS_Y = OBJECT_END + 0x000A, // Size: 1, Type: FLOAT, Flags: PUBLIC
GAMEOBJECT_POS_Z = OBJECT_END + 0x000B, // Size: 1, Type: FLOAT, Flags: PUBLIC
GAMEOBJECT_FACING = OBJECT_END + 0x000C, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = OBJECT_END + 0x000D, // Size: 1, Type: INT, Flags: DYNAMIC
GAMEOBJECT_FACTION = OBJECT_END + 0x000E, // Size: 1, Type: INT, Flags: PUBLIC
GAMEOBJECT_TYPE_ID = OBJECT_END + 0x000F, // Size: 1, Type: INT, Flags: PUBLIC
GAMEOBJECT_LEVEL = OBJECT_END + 0x0010, // Size: 1, Type: INT, Flags: PUBLIC
GAMEOBJECT_ARTKIT = OBJECT_END + 0x0011, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0012, // Size: 1, Type: INT, Flags: DYNAMIC
GAMEOBJECT_PADDING = OBJECT_END + 0x0013, // Size: 1, Type: INT, Flags: NONE
GAMEOBJECT_END = OBJECT_END + 0x0014,
};
enum <API key>
{
<API key> = OBJECT_END + 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
DYNAMICOBJECT_BYTES = OBJECT_END + 0x0002, // Size: 1, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x0003, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0004, // Size: 1, Type: FLOAT, Flags: PUBLIC
DYNAMICOBJECT_POS_X = OBJECT_END + 0x0005, // Size: 1, Type: FLOAT, Flags: PUBLIC
DYNAMICOBJECT_POS_Y = OBJECT_END + 0x0006, // Size: 1, Type: FLOAT, Flags: PUBLIC
DYNAMICOBJECT_POS_Z = OBJECT_END + 0x0007, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0008, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0009, // Size: 1, Type: INT, Flags: PUBLIC
DYNAMICOBJECT_END = OBJECT_END + 0x000A,
};
enum ECorpseFields
{
CORPSE_FIELD_OWNER = OBJECT_END + 0x0000, // Size: 2, Type: LONG, Flags: PUBLIC
CORPSE_FIELD_PARTY = OBJECT_END + 0x0002, // Size: 2, Type: LONG, Flags: PUBLIC
CORPSE_FIELD_FACING = OBJECT_END + 0x0004, // Size: 1, Type: FLOAT, Flags: PUBLIC
CORPSE_FIELD_POS_X = OBJECT_END + 0x0005, // Size: 1, Type: FLOAT, Flags: PUBLIC
CORPSE_FIELD_POS_Y = OBJECT_END + 0x0006, // Size: 1, Type: FLOAT, Flags: PUBLIC
CORPSE_FIELD_POS_Z = OBJECT_END + 0x0007, // Size: 1, Type: FLOAT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0008, // Size: 1, Type: INT, Flags: PUBLIC
CORPSE_FIELD_ITEM = OBJECT_END + 0x0009, // Size: 19, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x001C, // Size: 1, Type: BYTES, Flags: PUBLIC
<API key> = OBJECT_END + 0x001D, // Size: 1, Type: BYTES, Flags: PUBLIC
CORPSE_FIELD_GUILD = OBJECT_END + 0x001E, // Size: 1, Type: INT, Flags: PUBLIC
CORPSE_FIELD_FLAGS = OBJECT_END + 0x001F, // Size: 1, Type: INT, Flags: PUBLIC
<API key> = OBJECT_END + 0x0020, // Size: 1, Type: INT, Flags: DYNAMIC
CORPSE_FIELD_PAD = OBJECT_END + 0x0021, // Size: 1, Type: INT, Flags: NONE
CORPSE_END = OBJECT_END + 0x0022,
};
// Returns one plus the index of the least significant 1-bit of x, or if x is zero, returns zero
//static inline uint32 ffs(const uint32 x)
//#ifdef WIN32
// unsigned long r = 0;
// if (_BitScanForward(&r, x))
// return uint32(r + 1);
// return 0;
//#elif
// return __builtin_ffs(x);
//#endif
#endif |
#! /usr/bin/env python
#coding=utf-8
import sys, os, thread
from pymongo import Connection
from pymongo.errors import ConnectionFailure
from import_parameters import ImportParameters
from <API key> import GenerateReachTable
from find_sites import FindSites
from weights_mongo import GenerateWeightInfo
import util
from config import *
def BuildMongoDB(workingDir, modelName, stormMode, forCluster, \
hydroDBName=None, thiessenFilePreci=None, thiessenFileMeteo=None):
genIUH = True
statusFile = workingDir + os.sep + "status_BuildMongoDB.txt"
f = open(statusFile, 'w')
simuMode = 'DAILY'
if stormMode:
simuMode = 'STORM'
if not "storm" in modelName.lower():
modelName = modelName + "_storm"
genIUH = False
if not "model" in modelName.lower():
modelName = "model_" + modelName
if forCluster and (not "cluster" in modelName.lower()):
modelName = "cluster_" + modelName
# build mongodb database
try:
conn = Connection(host=HOSTNAME, port=PORT)
except ConnectionFailure, e:
sys.stderr.write("Could not connect to MongoDB: %s" % e)
sys.exit(1)
if modelName in conn.database_names():
conn.drop_database(modelName)
db = conn[modelName]
ImportParameters(sqliteFile, db)
f.write("10, Generating reach table...\n")
f.flush()
GenerateReachTable(workingDir, db, forCluster)
## prepare meteo data
subbasinFile = workingDir + os.sep + basinVec
subbasinRaster = workingDir + os.sep + mask_to_ext
if forCluster:
subbasinFile = workingDir + os.sep + "subbasins" + os.sep + subbasinVec
subbasinRaster = workingDir + os.sep + subbasinOut
if hydroDBName is not None:
if stormMode:
hydroDBName = hydroDBName + "_storm_cmorph"
if stormMode:
meteoThiessenList = [thiessenFilePreci]
meteoTypeList = ['P']
else:
meteoThiessenList = [thiessenFileMeteo, thiessenFilePreci]
meteoTypeList = ['M', 'P']
f.write("20, Finding nearby stations for each sub-basin...\n")
f.flush()
nSubbasins = FindSites(db, hydroDBName, subbasinFile, meteoThiessenList, meteoTypeList, simuMode)
print "Number of sub-basins:", nSubbasins
if not forCluster:
nSubbasins = 1
# import raster data to mongodb
f.write("40, Importing raster to database...\n")
f.flush()
tifFolder = workingDir + os.sep + "tif_files"
if not os.path.exists(tifFolder):
os.mkdir(tifFolder)
for i in range(1,nSubbasins+1):
subdir = tifFolder + os.sep + str(i)
if not os.path.exists(subdir):
os.mkdir(subdir)
strCmd = "%s/import_raster %s %s %s %s %d %s" % \
(CPP_PROGRAM_DIR, subbasinRaster, workingDir, modelName, HOSTNAME, PORT, tifFolder)
print strCmd
os.system(strCmd)
print 'Generating weight data...'
f.write("70, Generating weight data for interpolation of meteorology data...\n")
f.flush()
for i in range(nSubbasins):
GenerateWeightInfo(conn, modelName, i+1, stormMode)
if genIUH:
f.write("80, Generating IUH...\n")
f.flush()
dt = 24
print 'Generating IUH...'
strCmd = "%s/iuh %s %d %s %s %d" % (CPP_PROGRAM_DIR, HOSTNAME, PORT, modelName, dt, nSubbasins)
print strCmd
os.system(strCmd)
f.write("90, Grid layering...\n")
f.flush()
layeringDir = workingDir + os.sep + "layering_info"
if not os.path.exists(layeringDir):
os.mkdir(layeringDir)
print 'Grid layering...'
strCmd = "%s/grid_layering %s %d %s %s %d" % (CPP_PROGRAM_DIR, HOSTNAME, PORT, layeringDir, modelName, nSubbasins)
print strCmd
os.system(strCmd)
f.write("100,Finished!")
f.close()
print 'Build DB: %s finished!' % (modelName)
if __name__ == "__main__":
workingDir = r"/data/hydro_preprocessing/fenkeng"
modelName = "model_fenkeng"
genIUH = True
forCluster = True
stormMode = True
if len(sys.argv) >= 5:
workingDir = sys.argv[1]
modelName = sys.argv[2]
if int(sys.argv[3]) > 0:
stormMode = True
if int(sys.argv[4]) > 0:
forCluster = True
if stormMode:
genIUH = False
else:
genIUH = True
if forCluster and 'cluster_' not in modelName.lower():
modelName = 'cluster_' + modelName
BuildMongoDB(workingDir, modelName, stormMode, genIUH, forCluster) |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Web;
using Microsoft.AspNet.Identity;
using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security;
using Owin;
using Mathador.Models;
namespace Mathador.Account
{
public partial class Manage : System.Web.UI.Page
{
protected string SuccessMessage
{
get;
private set;
}
private bool HasPassword(<API key> manager)
{
return manager.HasPassword(User.Identity.GetUserId());
}
public bool HasPhoneNumber { get; private set; }
public bool TwoFactorEnabled { get; private set; }
public bool <API key> { get; private set; }
public int LoginsCount { get; set; }
protected void Page_Load()
{
var manager = Context.GetOwinContext().GetUserManager<<API key>>();
HasPhoneNumber = String.IsNullOrEmpty(manager.GetPhoneNumber(User.Identity.GetUserId()));
//PhoneNumber.Text = manager.GetPhoneNumber(User.Identity.GetUserId()) ?? String.Empty;
TwoFactorEnabled = manager.GetTwoFactorEnabled(User.Identity.GetUserId());
LoginsCount = manager.GetLogins(User.Identity.GetUserId()).Count;
var <API key> = HttpContext.Current.GetOwinContext().Authentication;
if (!IsPostBack)
{
if (HasPassword(manager))
{
ChangePassword.Visible = true;
}
else
{
CreatePassword.Visible = true;
ChangePassword.Visible = false;
}
var message = Request.QueryString["m"];
if (message != null)
{
Form.Action = ResolveUrl("~/Account/Manage");
SuccessMessage =
message == "ChangePwdSuccess" ? "Votre mot de passe a été modifié."
: message == "SetPwdSuccess" ? "Votre mot de passe a été défini."
: message == "RemoveLoginSuccess" ? "Le compte a été supprimé."
: message == "<API key>" ? "Le numéro de téléphone a été ajouté"
: message == "<API key>" ? "Le numéro de téléphone a été supprimé"
: String.Empty;
successMessage.Visible = !String.IsNullOrEmpty(SuccessMessage);
}
}
}
private void AddErrors(IdentityResult result)
{
foreach (var error in result.Errors)
{
ModelState.AddModelError("", error);
}
}
protected void RemovePhone_Click(object sender, EventArgs e)
{
var manager = Context.GetOwinContext().GetUserManager<<API key>>();
var signInManager = Context.GetOwinContext().Get<<API key>>();
var result = manager.SetPhoneNumber(User.Identity.GetUserId(), null);
if (!result.Succeeded)
{
return;
}
var user = manager.FindById(User.Identity.GetUserId());
if (user != null)
{
signInManager.SignIn(user, isPersistent: false, rememberBrowser: false);
Response.Redirect("/Account/Manage?m=<API key>");
}
}
// <API key>
protected void <API key>(object sender, EventArgs e)
{
var manager = Context.GetOwinContext().GetUserManager<<API key>>();
manager.SetTwoFactorEnabled(User.Identity.GetUserId(), false);
Response.Redirect("/Account/Manage");
}
//<API key>
protected void <API key>(object sender, EventArgs e)
{
var manager = Context.GetOwinContext().GetUserManager<<API key>>();
manager.SetTwoFactorEnabled(User.Identity.GetUserId(), true);
Response.Redirect("/Account/Manage");
}
}
} |
<!DOCTYPE html>
<html>
<head>
<script src="filters.js"></script>
<script src="effects.js"></script>
<style>
body {
text-align:center;
}
</style>
</head>
<body onload="Effects.init()">
<canvas id="image-effects" width="640" height="400">Not supported</canvas>
<div>
<button id="nav">Next</button>
<br>
<h2>Image Effects</h2>
<button class="effect">Original</button>
<button class="effect">Gray Scale</button>
<button class="effect">Duotone</button>
<button class="effect">Noise</button>
<button class="effect">Invert</button>
<button class="effect">Pixelate</button>
<button class="effect">Brighter</button>
<button class="effect">Sepia</button>
<br>
<button class="effect">Contrast</button>
<button class="effect">Threshold</button>
<button class="effect">Gamma</button>
<button class="effect">Pencil Sketch</button>
<button class="effect">Posterize</button>
<button class="effect">Scatter</button>
<button class="effect">Solarize</button>
<button class="effect">ASCII</button>
<br>
<h2>Kernel Effects</h2>
<button class="effect">Blur</button>
<button class="effect">Sharpen</button>
<button class="effect">Edge Detect</button>
<button class="effect">Emboss</button>
<button class="effect">Lighten</button>
<button class="effect">Darken</button>
<button class="effect">Sobel Filter</button>
<button class="effect">Gaussian Blur</button>
</div>
</body>
</html> |
<?php
/**
* @file
* Main view template.
*
* Variables available:
* - $classes_array: An array of classes determined in
* <API key>(). Default classes are:
* .view
* .view-[css_name]
* .view-id-[view_name]
* .view-display-id-[display_name]
* .view-dom-id-[dom_id]
* - $classes: A string version of $classes_array for use in the class attribute
* - $css_name: A css-safe version of the view name.
* - $css_class: The user-specified classes names, if any
* - $header: The view header
* - $footer: The view footer
* - $rows: The results of the view query, if any
* - $empty: The empty text to display if the view is empty
* - $pager: The pager next/prev links to display, if any
* - $exposed: Exposed widget form/info to display
* - $feed_icon: Feed icon to display, if any
* - $more: A link to view more, if any
*
* @ingroup views_templates
*/
?>
<div class="<?php print $classes; ?>">
<?php if ($title): ?>
<?php print $title; ?>
<?php endif; ?>
<?php if ($header): ?>
<div class="view-header">
<?php print $header; ?>
</div>
<?php endif; ?>
<?php if ($rows): ?>
<?php print $rows; ?>
<?php endif; ?>
<?php if ($pager): ?>
<?php print $pager; ?>
<?php endif; ?>
<center><h2><a href="/all-articles">More Articles ...</a></h2></center>
</div><?php /* class view */ ?> |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.