text:
package fr.adrienbrault.idea.symfony2plugin.asset;

import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileVisitor;
import com.intellij.psi.PsiDirectory;
import com.jetbrains.php.PhpIndex;
import fr.adrienbrault.idea.symfony2plugin.Settings;
import fr.adrienbrault.idea.symfony2plugin.util.SymfonyBundleUtil;
import fr.adrienbrault.idea.symfony2plugin.util.dict.SymfonyBundle;
import org.apache.commons.lang.StringUtils;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author Daniel Espendiller <daniel@espendiller.net>
 */
public class AssetDirectoryReader {

    public static AssetDirectoryReader INSTANCE = new  AssetDirectoryReader();

    final private boolean includeBundleDir;

    @NotNull
    final private Collection<String> filterExtension = new HashSet<>();

    public AssetDirectoryReader() {
        includeBundleDir = false;
    }

    public AssetDirectoryReader(@NotNull String[] filterExtension, boolean includeBundleDir) {
        this.includeBundleDir = includeBundleDir;
        this.filterExtension.addAll(Arrays.asList(filterExtension));
    }

    @Nullable
    private static VirtualFile getProjectAssetRoot(@NotNull Project project) {
        VirtualFile projectDirectory = project.getBaseDir();
        String webDirectoryName = Settings.getInstance(project).directoryToWeb;
        return VfsUtil.findRelativeFile(projectDirectory, webDirectoryName.split("/"));
    }

    @NotNull
    public Collection<AssetFile> getAssetFiles(@NotNull Project project) {
        Collection<AssetFile> files = new ArrayList<>();

        VirtualFile webDirectory = getProjectAssetRoot(project);
        if (null == webDirectory) {
            return files;
        }

        VfsUtil.visitChildrenRecursively(webDirectory, new VirtualFileVisitor() {
            @Override
            public boolean visitFile(@NotNull VirtualFile virtualFile) {
                if(isValidFile(virtualFile)) {
                    files.add(new AssetFile(virtualFile, AssetEnum.Position.Web, webDirectory));
                }
                return super.visitFile(virtualFile);
            }
        });

        if(!this.includeBundleDir) {
            return files;
        }

        SymfonyBundleUtil symfonyBundleUtil = new SymfonyBundleUtil(PhpIndex.getInstance(project));
        for(SymfonyBundle bundle : symfonyBundleUtil.getBundles()) {
            PsiDirectory bundleDirectory = bundle.getDirectory();
            if(null == bundleDirectory) {
                continue;
            }

            VirtualFile bundleDirectoryVirtual = bundleDirectory.getVirtualFile();
            VirtualFile resourceDirectory = VfsUtil.findRelativeFile(bundleDirectoryVirtual, "Resources");

            if (null != resourceDirectory) {
                VfsUtil.visitChildrenRecursively(resourceDirectory, new VirtualFileVisitor() {
                    @Override
                    public boolean visitFile(@NotNull VirtualFile virtualFile) {
                        if(isValidFile(virtualFile)) {
                            files.add(new AssetFile(virtualFile, AssetEnum.Position.Bundle, bundleDirectoryVirtual, '@' + bundle.getName() + "/"));
                        }
                        return super.visitFile(virtualFile);
                    }
                });
            }
        }

        return files;
    }

    /**
     * '@SampleBundle/Resources/public/js/*'
     * 'assets/js/*'
     * 'assets/js/*.js'
     */
    @NotNull
    public Collection<VirtualFile> resolveAssetFile(@NotNull Project project, @NotNull String filename) {
        String assetName = StringUtils.stripStart(filename.replace("\\", "/").replaceAll("/+", "/"), "/");

        // '@SampleBundle/Resources/public/js/foo,js'
        // TODO: '@SampleBundle/Resources/public/js/*'
        // TODO: '@SampleBundle/Resources/public/js/*.js'
        if(filename.startsWith("@")) {
            Collection<VirtualFile> files = new ArrayList<>();

            int i = filename.indexOf("/");
            if(i > 0) {
                String relativeFilename = filename.substring(1, i);
                SymfonyBundle bundle = new SymfonyBundleUtil(PhpIndex.getInstance(project)).getBundle(relativeFilename);
                if(bundle != null) {
                    String assetPath = filename.substring(i + 1);

                    Matcher matcher = Pattern.compile("^(.*[/\\\\])\\*([.\\w+]*)$").matcher(assetPath);
                    if (!matcher.find()) {
                        VirtualFile relative = bundle.getRelative(assetPath);
                        if(relative != null) {
                            files.add(relative);
                        }
                    } else {
                        // "/*"
                        // "/*.js"
                        PsiDirectory directory = bundle.getDirectory();
                        if(directory != null) {
                            files.addAll(collectWildcardDirectories(matcher, directory.getVirtualFile()));
                        }
                    }
                }
            }

            return files;
        }

        Collection<VirtualFile> files = new ArrayList<>();

        VirtualFile webDirectory = getProjectAssetRoot(project);
        if (null == webDirectory) {
            return files;
        }

        Matcher matcher = Pattern.compile("^(.*[/\\\\])\\*([.\\w+]*)$").matcher(assetName);
        if (!matcher.find()) {
            VirtualFile assetFile = VfsUtil.findRelativeFile(webDirectory, assetName.split("/"));
            if(assetFile != null) {
                files.add(assetFile);
            }
        } else {
            // "/*"
            // "/*.js"
            files.addAll(collectWildcardDirectories(matcher, webDirectory));
        }

        return files;
    }

    private Collection<VirtualFile> collectWildcardDirectories(@NotNull Matcher matcher, @NotNull VirtualFile directory) {
        Collection<VirtualFile> files = new HashSet<>();

        String pathName = matcher.group(1);
        String fileExtension = matcher.group(2).length() > 0 ? matcher.group(2) : null;

        pathName = StringUtils.stripEnd(pathName, "/");

        if(fileExtension == null) {
            // @TODO: filter files
            // 'assets/js/*'
            VirtualFile assetFile = VfsUtil.findRelativeFile(directory, pathName.split("/"));
            if(assetFile != null) {
                files.add(assetFile);
            }
        } else {
            // @TODO: filter files
            // 'assets/js/*.js'
            VirtualFile assetFile = VfsUtil.findRelativeFile(directory, pathName.split("/"));
            if(assetFile != null) {
                files.add(assetFile);
            }
        }

        return files;
    }

    private boolean isValidFile(@NotNull VirtualFile virtualFile) {
        if (virtualFile.isDirectory()) {
            return false;
        }

        if(filterExtension.size() == 0) {
            return true;
        }

        String extension = virtualFile.getExtension();
        return extension != null && this.filterExtension.contains(extension);
    }
}


text:
layout: base
title: Open Data Day
og-description: Open Data Day
og-image: img/odd.png
---

{{ page.title }}

               Glauben oder nicht glauben, Lorem Ipsum ist nicht nur ein zufälliger Text. Er hat Wurzeln aus der Lateinischen Literatur von 45 v. Chr, was ihn über 2000 Jahre alt macht. Richar McClintock, ein Lateinprofessor des Hampden-Sydney College in Virgnia untersuche einige undeutliche Worte, "consectetur", einer Lorem Ipsum Passage und fand eine unwiederlegbare Quelle. Lorem Ipsum komm aus der Sektion 1.10.32 und 1.10.33 des "de Finibus Bonorum et Malorum" (Die Extreme von Gut und Böse) von Cicero, geschrieben 45 v. Chr. Dieses Buch ist Abhandlung der Ethiktheorien, sehr bekannt wärend der Renaissance. Die erste Zeile des Lorem Ipsum, "Lorem ipsum dolor sit amet...", kommt aus einer Zeile der Sektion 1.10.32.

   {% for sitepage in site.pages %}
     {% if sitepage.type == 'ODD' and sitepage.layout == 'project' %}
      {% assign ODDprojectsExist = true %}
     {% endif %}
   {% endfor %}

   {% if ODDprojectsExist == true %}

Teilnehmende Projekte

...laden...

        {% for sitepage in site.pages %}
        {% if sitepage.type == 'ODD' and sitepage.layout == 'project' %}

          {% include project-teaser.html %}

        {% endif %}
        {% endfor %}

  {% endif %}

redpajama_set_name: RedPajamaGithub


text:
  TODO:
    * Make table headers more robust.
    * Get dynamic row heights working with text wrapping.
    * Every second row different background color applied.
]]
UITable = extends(UIWidget)

local HEADER_ID = 'row0'

function UITable.create()
  local table = UITable.internalCreate()
  table.headerRow = nil
  table.dataSpace = nil
  table.rows = {}
  table.rowBaseStyle = nil
  table.columns = {}
  table.columBaseStyle = nil
  table.headerRowBaseStyle = nil
  table.headerColumnBaseStyle = nil
  table.selectedRow = nil
  return table
end

function UITable:onDestroy()
  for k,row in pairs(self.rows) do
    row.onClick = nil
  end
  self.rows = {}
  self.columns = {}
  self.headerRow = {}
  self.selectedRow = nil

  if self.dataSpace then
    self.dataSpace:destroyChildren()
    self.dataSpace = nil
  end
end

function UITable:onStyleApply(styleName, styleNode)
  for name, value in pairs(styleNode) do
    if name == 'table-data' then
      addEvent(function()
        self:setTableData(self:getParent():getChildById(value))
      end)
    elseif name == 'column-style' then
      addEvent(function()
        self:setColumnStyle(value)
      end)
    elseif name == 'row-style' then
      addEvent(function()
        self:setRowStyle(value)
      end)
    elseif name == 'header-column-style' then
      addEvent(function()
        self:setHeaderColumnStyle(value)
      end)
    elseif name == 'header-row-style' then
      addEvent(function()
        self:setHeaderRowStyle(value)
      end)
    end
  end
end

function UITable:hasHeader()
  return self.headerRow ~= nil
end

function UITable:clearData()
  if not self.dataSpace then
    return
  end
  self.dataSpace:destroyChildren()
  self.selectedRow = nil
  self.columns = {}
  self.rows = {}
end

function UITable:addHeaderRow(data)
  if not data or type(data) ~= 'table' then
    g_logger.error('UITable:addHeaderRow - table columns must be provided in a table')
    return
  end

  -- build header columns
  local columns = {}
  for _, column in pairs(data) do
    local col = g_ui.createWidget(self.headerColumnBaseStyle)
    for type, value in pairs(column) do
      if type == 'width' then
        col:setWidth(value)
      elseif type == 'height' then
        col:setHeight(value)
      elseif type == 'text' then
        col:setText(value)
      elseif type == 'onClick' then
        col.onClick = value
      end
    end
    table.insert(columns, col)
  end

  -- create a new header
  local headerRow = g_ui.createWidget(self.headerRowBaseStyle, self)
  local newHeight = (self.dataSpace:getHeight()-headerRow:getHeight())-self.dataSpace:getMarginTop()
  self.dataSpace:applyStyle({ height = newHeight })

  headerRow:setId(HEADER_ID)
  for _, column in pairs(columns) do
    headerRow:addChild(column)
    self.columns[HEADER_ID] = column
  end

  headerRow.onClick = function(headerRow) self:selectRow(headerRow) end
  self.headerRow = headerRow
  return headerRow
end

function UITable:removeHeaderRow()
  self.headerRow:destroy()
  self.headerRow = nil
end

function UITable:addRow(data, ref, height)
  if not self.dataSpace then
    g_logger.error('UITable:addRow - table data space has not been set, cannot add rows.')
    return
  end
  if not data or type(data) ~= 'table' then
    g_logger.error('UITable:addRow - table columns must be provided in a table.')
    return
  end

  local row = g_ui.createWidget(self.rowBaseStyle)
  if ref then row.ref = ref end
  if height then row:setHeight(height) end

  local rowId = #self.rows
  row:setId('row'..(rowId < 1 and 1 or rowId))

  for _, column in pairs(data) do
    local col = g_ui.createWidget(self.columBaseStyle, row)
    for type, value in pairs(column) do
      if type == 'width' then
        col:setWidth(value)
      elseif type == 'height' then
        col:setHeight(value)
      elseif type == 'text' then
        col:setText(value)
      end
    end
    self.columns[rowId] = col
  end

  row.onFocusChange = function(row, focused)
    if focused then self:selectRow(row) end
  end
  self.dataSpace:addChild(row)

  table.insert(self.rows, row)
  return row
end

function UITable:removeRow(row)
  if self.selectedRow == row then
    self:selectRow(nil)
  end
  row.onClick = nil
  table.removevalue(self.rows, row)
end

function UITable:selectRow(selectedRow)
  if selectedRow == self.selectedRow then return end

  local previousSelectedRow = self.selectedRow
  self.selectedRow = selectedRow

  if previousSelectedRow then
    previousSelectedRow:setChecked(false)
  end

  if selectedRow then
    selectedRow:setChecked(true)
  end

  signalcall(self.onSelectionChange, self, selectedRow, previousSelectedRow)
end

function UITable:setTableData(tableData)
  self.dataSpace = tableData
  self.dataSpace:applyStyle({ height = self:getHeight() })
end

function UITable:setRowStyle(style)
  self.rowBaseStyle = style
  for _, row in pairs(self.rows) do
    row:setStyle(style)
  end
end

function UITable:setColumnStyle(style)
  self.columBaseStyle = style
  for _, col in pairs(self.columns) do
    col:setStyle(style)
  end
end

function UITable:setHeaderRowStyle(style)
  self.headerRowBaseStyle = style
  if self.headerRow then
    self.headerRow:setStyle(style)
  end
end

function UITable:setHeaderColumnStyle(style)
  self.headerColumnBaseStyle = style
  if table.hasKey(HEADER_ID) then
    self.columns[HEADER_ID]:setStyle(style)
  end
end


text:
package androidx.media3.exoplayer.dash;

import androidx.media3.common.C;
import androidx.media3.common.util.UnstableApi;
import androidx.media3.exoplayer.dash.manifest.RangedUri;
import androidx.media3.extractor.ChunkIndex;

/**
 * An implementation of {@link DashSegmentIndex} that wraps a {@link ChunkIndex} parsed from a media
 * stream.
 */
@UnstableApi
public final class DashWrappingSegmentIndex implements DashSegmentIndex {

  private final ChunkIndex chunkIndex;
  private final long timeOffsetUs;

  /**
   * @param chunkIndex The {@link ChunkIndex} to wrap.
   * @param timeOffsetUs An offset to subtract from the times in the wrapped index, in microseconds.
   */
  public DashWrappingSegmentIndex(ChunkIndex chunkIndex, long timeOffsetUs) {
    this.chunkIndex = chunkIndex;
    this.timeOffsetUs = timeOffsetUs;
  }

  @Override
  public long getFirstSegmentNum() {
    return 0;
  }

  @Override
  public long getFirstAvailableSegmentNum(long periodDurationUs, long nowUnixTimeUs) {
    return 0;
  }

  @Override
  public long getSegmentCount(long periodDurationUs) {
    return chunkIndex.length;
  }

  @Override
  public long getAvailableSegmentCount(long periodDurationUs, long nowUnixTimeUs) {
    return chunkIndex.length;
  }

  @Override
  public long getNextSegmentAvailableTimeUs(long periodDurationUs, long nowUnixTimeUs) {
    return C.TIME_UNSET;
  }

  @Override
  public long getTimeUs(long segmentNum) {
    return chunkIndex.timesUs[(int) segmentNum] - timeOffsetUs;
  }

  @Override
  public long getDurationUs(long segmentNum, long periodDurationUs) {
    return chunkIndex.durationsUs[(int) segmentNum];
  }

  @Override
  public RangedUri getSegmentUrl(long segmentNum) {
    return new RangedUri(
        null, chunkIndex.offsets[(int) segmentNum], chunkIndex.sizes[(int) segmentNum]);
  }

  @Override
  public long getSegmentNum(long timeUs, long periodDurationUs) {
    return chunkIndex.getChunkIndex(timeUs + timeOffsetUs);
  }

  @Override
  public boolean isExplicit() {
    return true;
  }
}


text:
copyright:
  years: 2015, 2016

---

{:new_window: target="_blank"}
{:shortdesc: .shortdesc}
{:screen:.screen}
{:codeblock:.codeblock}

# Informationen zu Insights for Weather
{: #about_weather}

*Letzte Aktualisierung: 19. Mai 2016*

Verwenden Sie {{site.data.keyword.weatherfull}},
um Wetterdaten von "The Weather Company" (TWC) in Ihre {{site.data.keyword.Bluemix}}-Anwendungen einzubinden.
{:shortdesc}

Sie können Wetterbeobachtungen und -vorhersagen zu Ihrer {{site.data.keyword.Bluemix_notm}}-Anwendung hinzufügen und die Wetterdaten
für ein durch Geoortungsdaten angegebenes Gebiet mit den [REST-APIs von Insights](https://twcservice.{APPDomain}/rest-api-deprecated/){:new_window} anzeigen.
"The Weather Company" ist der Anbieter mit den umfassendsten Langzeitwetterdaten und Vorhersagen. Es werden Daten zu allen Wetterphänomenen erfasst, darunter Niederschlag, Luftdruck, Wind und Gewitter.

Sie können die REST-APIs zum Abrufen der folgenden Informationen verwenden:

* Eine stündliche Wettervorhersage für die nächsten 24 Stunden, beginnend mit
dem aktuellen Zeitpunkt, für angegebene Geoortungsdaten.
* Eine tägliche Vorhersage für die nächsten 10 Tage, einschließlich Vorhersagen
für Tag und Nacht, für angegebene Geoortungsdaten. Diese Vorhersage umfasst eine
beschreibende Textzeichenfolge mit bis zu 256 Zeichen und die entsprechenden Maßeinheiten
für den angeforderten Standort und in der angeforderten Sprache.
* Die aktuellen Wetterbeobachtungsdaten für angegebene Geoortungsdaten. Zu diesen Wetterdaten
zählen Temperatur, Niederschlag, Windrichtung und -geschwindigkeit, Feuchtigkeit, Luftdruck,
Kondensationspunkt, Sichtweite und UV-Strahlung.
* Die Wetterbeobachtungsdaten für angegebene Geoortungsdaten für einen bestimmten Zeitraum. Diese Daten stammen von Beobachtungsstationen. Diese API gibt Wetterbeobachtungen
für aktuelle Bedingungen sowie zurückliegende Beobachtungen für einen Zeitraum von bis zu 24 Stunden zurück.

Weitere Informationen zu Wetterbezeichnungen und Wettersymbolen von "The Weather Company"
finden Sie in [Icon Code, Phrases and Images](https://docs.google.com/document/d/1MZwWYqki8Ee-V7c7InBuA5CDVkjb3XJgpc39hI9FsI0/edit?pli=1){:new_window}.
Sie können auch eine [Reihe von Symbolen herunterladen](https://twcdocs.mybluemix.net/download/weatherinsightsicons.zip){:new_window}, um Sie in Ihrer App zu verwenden.

## Preismodell
{: #pricing_models}

Das Preismodell basiert auf der Anzahl der täglichen Aufrufe der Insights for Weather-APIs, die dem Kunden monatlich
in Rechnung gestellt werden. Sie können die Wetterdaten in Ihren Anwendungen testen,
ohne dass Einschränkungen hinsichtlich Geografie, Vorhersagetyp oder Zeitreihenbeobachtungen bestehen.
Es besteht lediglich eine Einschränkung hinsichtlich der Anzahl der Aufrufe. Der Plan für kostenfreie Aufrufe, der Basisplan und der Premium-Plan können
ohne Vertrag erworben werden. Diese Pläne ermöglichen der App
500, 5.000 bzw. 50.000 API-Aufrufe pro Tag.

Es ist auch möglich, mehrere Premium-Pläne für jede Serviceinstanz zu erwerben,
die während des Abrechnungszeitraums bereitgestellt wird. Wenn Ihre App mehr als 50.000 Aufrufe pro Tag oder über 1.000 Aufrufe pro Minute verwendet,
benötigen Sie einen Vertrag mit IBM, damit die gewünschten Serviceleistungen weiterhin erbracht werden.

Wenn die App den Grenzwert der API-Aufrufe erreicht, die im Rahmen des ausgewählten Plans zulässig sind,
ist der darauf folgende API-Aufruf erst wieder erfolgreich, wenn die nächsten API-Aufrufe zulässig sind.

Beispiel: Im Rahmen des Basisplans kann die App 500 API-Aufrufe pro Minute durchführen,
auch wenn der Grenzwert des Plans überschritten wird, der nächsten API-Aufruf wird jedoch
erst 5 Minuten später zugelassen. Aus diesem Grund stellt ein Benutzer möglicherweise eine Verzögerung bei der Aktualisierung
der Wetterdaten in der App fest. Sie müssen sicherstellen, dass die App so entwickelt wird,
dass sie diese Grenzwerte berücksichtigt und keine großen Blöcke mit API-Aufrufen anfordert. Stattdessen können Sie die Verwendung von API-Aufrufen Ihrer App überwachen. Sie können prüfen, ob die App den Grenzwert des jeweiligen Plans erreicht,
indem Sie die Anzahl der Elemente, die durch den API-Aufruf zurückgegeben werden, überprüfen.

## Feedback und Support
{: #feedback_support}

Wenn Sie technische Fragen zum Erstellen einer App mit "Insights for Weather" haben, posten Sie Ihre Frage bei [Stack Overflow](http://stackoverflow.com/search?q=weather+bluemix){:new_window}
und versehen Sie Ihre Frage mit den Tags **bluemix** und **weather**.

Wenn Sie Probleme mit diesem Service haben sollten, verwenden Sie das Forum [IBM developerWorks Answers forum](https://developer.ibm.com/answers/topics/insights-weather/?smartspace=bluemix){:new_window}.
Schließen Sie die Tags **insights-weather** und **bluemix** in Ihre Beiträge ein, um IBM eine bessere Unterstützung für Sie zu ermöglichen.

Informationen zur Fehlerbehebung bei Bluemix finden Sie im Thema zur [Fehlerbehebung](https://console.{DomainName}/docs/troubleshoot/troubleshoot.html){: new_window}.
Details zur Suche nach Informationen und für das Stellen Fragen in Foren sowie zur Kontaktaufnahme mit dem Support finden Sie im Thema zum [Abrufen der Kundenunterstützung](https://console.{DomainName}/docs/support/index.html#getting-customer-support){: new_window}.


text:
import os
import re
import json

class FunctionParser(object):
    header_input_pattern = r"^[ \t\n]*[#]+[ \t\n]*input[ \t\n\w:;.,#]*[\s#\-]*[#]+[\w\s\d:,.()\" \t\n\-]*[\s#\-]*$"
    header_output_pattern = r"[\s#\-]*[#]+[ \t]*(return|output)[ \t\w:;.,#]*[\s#\-]*[#]+[\w\s\d:,.()\" \t\-]*[\s#\-]*$"
    function_pattern = r"^m_[\w]+[ \t\n]+=[ \t\n]+function[^#{]*"
    parameter_pattern = r"^m_[\w]+[\s]+=[\s]+function[\s]*\([\s]*([\w\[\]\s,\d=.\-'\"_\.]*)[\s]*\)[\s]*return[\s]*\([\s]*([\w\[\]\s,\d=.\-_]*)[\s]*\)[\s]*"
    header_parameter_pattern = r"[\s#\-]*[#]+[ \t]*([\w|-]+)[\s]+([\w]+)[\s]+([\w,\d.\"\-]+)[\s]+([\w|\W]+)"
    divider_pattern = r"[\s#\-]*"

    type_mapping_file = os.path.join('resources', 'type_mapping.json')

    def __init__(self, path: str, extension: str = 'dml'):
        """
        @param path: path where to look for python scripts
        """
        super(FunctionParser, self).__init__()
        self.path = path
        self.extension = '.{extension}'.format(extension=extension)
        self.files()

    def parse_function(self, path: str):
        """
        @param path: path of file to parse
        parses function
        @return:
            {
                'function_name': 'some_name',
                'parameters': [('param1','type','default_value'), ...],
                'return_values': [('retval1', 'type'),...]
            }
        """
        file_name = os.path.basename(path)
        function_name, extension = os.path.splitext(file_name)
        function_definition = self.find_function_definition(path)
        pattern = re.compile(
            self.__class__.parameter_pattern, flags=re.I | re.M)
        match = pattern.match(function_definition)
        if match:
            param_str, retval_str = match.group(1, 2)
            parameters = self.get_parameters(param_str)
            return_values = self.get_parameters(retval_str)
        else:
            # TODO handle default matrix variables.
            raise AttributeError("Unable to match to function definition:\n" + function_definition)
        data = {'function_name': function_name,
                    'parameters': parameters, 'return_values': return_values}
        return data

    def get_parameters(self, param_str: str):

        params = re.split(r",[\s]*", param_str)

        parameters = []
        for param in params:
            parameters.append(self.parse_single_parameter(param))
        return parameters

    def parse_single_parameter(self, param: str):
        splitted = re.split(r"[\s]+", param)
        dml_type = splitted[0]
        name = splitted[1]
        default_value = None

        if len(splitted) == 4:
            if splitted[2] == "=":
                default_value = splitted[3]
        elif "=" in name:
            default_split = name.split("=")
            name = default_split[0]
            default_value = default_split[1]
        return (name, dml_type, default_value)

    def get_header_parameters(self, param_str: str):
        parameters = list()
        pattern = re.compile(
            self.__class__.header_parameter_pattern, flags=re.I)

        for param_line in [s for s in param_str.split("\n") if s]:
            match = pattern.match(param_line)
            try:
                parameters.append((match.group(1), match.group(
                    2), match.group(3), match.group(4)))
            except Exception as e:
                if re.search(pattern=self.__class__.divider_pattern, string=param_line, flags=re.I | re.M) is not None:
                    continue
                print(e)
                return parameters

        return parameters

    def parse_header(self, path: str):
        """
        @param path: path of file to parse
        parses function
        @return:
            {
                'function_name': 'some_name',
                'parameters': [('param1','description'), ...],
                'return_values': [('retval1', 'description'),...]
            }
        """
        try:
            h_input = self.find_header_input_params(path)
            input_parameters = self.get_header_parameters(h_input)

            h_output = self.find_header_output_params(path)
            output_parameters = self.get_header_parameters(h_output)
        except AttributeError as e:
            file_name = os.path.basename(path)
            print("[WARNING] Could not parse header in file \'{file_name}\'.".format(
                file_name=file_name))
            input_parameters = []
            output_parameters = []
        data = {'function_name': None, 'parameters': input_parameters,
                'return_values': output_parameters}
        return data

    def find_header_input_params(self, path: str):
        with open(path, 'r') as f:
            content = f.read()
        start = re.search(pattern=self.__class__.header_input_pattern,
                          string=content, flags=re.I | re.M).end()
        end = re.search(pattern=self.__class__.header_output_pattern,
                        string=content, flags=re.I | re.M).start()
        header = content[start:end]
        return header

    def find_header_output_params(self, path: str):
        with open(path, 'r') as f:
            content = f.read()
        start = re.search(pattern=self.__class__.header_output_pattern,
                          string=content, flags=re.I | re.M).end()
        end = re.search(pattern=self.__class__.function_pattern,
                        string=content, flags=re.I | re.M).start()
        header = content[start:end]
        return header

    def find_function_definition(self, path: str):
        with open(path, 'r') as f:
            content = f.read()
        match = re.search(pattern=self.__class__.function_pattern,
                          string=content, flags=re.I | re.M)
        if match:
            start = match.start()
            end = match.end()
            return content[start:end]
        else:
            raise AttributeError("Function definition not found in : " + path)

    def files(self):
        """
        generator function to find files in self.path, that end with self.extension
        """
        files = os.listdir(self.path)
        files.sort()
        for f in files:
            name, extension = os.path.splitext(f)
            if extension == self.extension:
                yield os.path.join(self.path, f)

    def check_parameters(self, header, data):
        type_mapping_pattern = r"^([^\[\s]+)"

        path = os.path.dirname(__file__)
        type_mapping_path = os.path.join(
            path, self.__class__.type_mapping_file)

        with open(type_mapping_path, 'r') as mapping:
            type_mapping = json.load(mapping)

        header_param_names = [p[0].lower() for p in header["parameters"]]
        data_param_names = [p[0].lower() for p in data["parameters"]]
        if header_param_names != data_param_names:
            print("[WARNING] The parameter names of the function does not match with the documentation "
                  "for file \'{file_name}\'.".format(file_name=data["function_name"]))

        header_param_type = [p[1].lower() for p in header["parameters"]]
        header_param_type = [type_mapping["type"].get(
            item, item) for item in header_param_type]

        data_param_type = [p[1].lower() for p in data["parameters"]]
        data_param_type = [type_mapping["type"].get(
            re.search(type_mapping_pattern, str(item).lower()).group() if item else str(item).lower(), item)
            for item in data_param_type]

        if header_param_type != data_param_type:
            print("[WARNING] The parameter type of the function does not match with the documentation "
                  "for file \'{file_name}\'.".format(file_name=data["function_name"]))


text:
<?xml version="1.0" encoding="utf-8"?>
<com.mogujie.tt.ui.widget.message.AudioRenderView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:background="@color/default_bk"
    android:paddingBottom="20dp"
    android:paddingLeft="10dp" >

    <com.mogujie.tt.ui.widget.IMBaseImageView
        android:id="@+id/user_portrait"
        android:layout_width="40dp"
        android:layout_height="40dp"
        android:layout_alignParentLeft="true"
        android:scaleType="centerCrop"
        android:src="@drawable/tt_default_user_portrait_corner" />

    <LinearLayout
        android:id="@+id/content_layout"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="5dp"
        android:layout_marginRight="35dp"
        android:layout_toRightOf="@id/user_portrait"
        android:orientation="vertical" >

        <TextView
            android:id="@+id/name"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:layout_marginBottom="2dp"
            android:text="小明"
            android:textSize="11sp"
            android:visibility="gone" />

        <RelativeLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginLeft="5dp"
            android:layout_marginRight="35dp"
            android:layout_toRightOf="@id/user_portrait" >

            <LinearLayout
                android:id="@+id/message_layout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_marginLeft="6dp"
                android:background="@drawable/tt_other_item_bg_normal"
                android:gravity="left"
                android:orientation="vertical"
                android:paddingBottom="13dp"
                android:paddingLeft="21dp"
                android:paddingRight="13dp"
                android:paddingTop="13dp" >

                <View
                    android:id="@+id/audio_antt_view"
                    android:layout_width="11dp"
                    android:layout_height="17dp"
                    android:background="@anim/tt_voice_play_other" />
            </LinearLayout>

            <TextView
                android:id="@+id/audio_duration"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignBottom="@id/message_layout"
                android:layout_marginBottom="13dp"
                android:layout_marginLeft="7dp"
                android:layout_toRightOf="@id/message_layout"
                android:text="6"
                android:textSize="14sp" />

            <View
                android:id="@+id/audio_unread_notify"
                android:layout_width="10dp"
                android:layout_height="10dp"
                android:layout_toRightOf="@id/audio_duration"
                android:background="@drawable/tt_unread_message_notify_bg"
                android:visibility="gone" />

            <ImageView
                android:id="@+id/message_state_failed"
                android:layout_width="15dp"
                android:layout_height="15dp"
                android:layout_centerVertical="true"
                android:layout_marginLeft="5dp"
                android:layout_toRightOf="@id/audio_duration"
                android:adjustViewBounds="true"
                android:contentDescription="@string/message_image_desc"
                android:src="@drawable/tt_msg_tip"
                android:visibility="gone" />

            <ProgressBar
                android:id="@+id/progressBar1"
                style="?android:attr/progressBarStyleSmall"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:visibility="gone" />
        </RelativeLayout>
    </LinearLayout>
</com.mogujie.tt.ui.widget.message.AudioRenderView>


text:
package org.unitime.timetable.model.base;

import java.io.Serializable;
import java.util.Date;

import org.unitime.timetable.model.AcademicArea;
import org.unitime.timetable.model.AcademicClassification;
import org.unitime.timetable.model.CurriculumProjectionRule;
import org.unitime.timetable.model.PosMajor;

/**
 * Do not change this class. It has been automatically generated using ant create-model.
 * @see org.unitime.commons.ant.CreateBaseModelFromXml
 */
public abstract class BaseCurriculumProjectionRule implements Serializable {
	private static final long serialVersionUID = 1L;

	private Long iUniqueId;
	private Float iProjection;
	private Float iSnapshotProjection;
	private Date iSnapshotProjectedDate;

	private AcademicArea iAcademicArea;
	private PosMajor iMajor;
	private AcademicClassification iAcademicClassification;

	public static String PROP_UNIQUEID = "uniqueId";
	public static String PROP_PROJECTION = "projection";
	public static String PROP_SNAPSHOT_PROJ = "snapshotProjection";
	public static String PROP_SNAPSHOT_PROJ_DATE = "snapshotProjectedDate";

	public BaseCurriculumProjectionRule() {
		initialize();
	}

	public BaseCurriculumProjectionRule(Long uniqueId) {
		setUniqueId(uniqueId);
		initialize();
	}

	protected void initialize() {}

	public Long getUniqueId() { return iUniqueId; }
	public void setUniqueId(Long uniqueId) { iUniqueId = uniqueId; }

	public Float getProjection() { return iProjection; }
	public void setProjection(Float projection) { iProjection = projection; }

	public Float getSnapshotProjection() { return iSnapshotProjection; }
	public void setSnapshotProjection(Float snapshotProjection) { iSnapshotProjection = snapshotProjection; }

	public Date getSnapshotProjectedDate() { return iSnapshotProjectedDate; }
	public void setSnapshotProjectedDate(Date snapshotProjectedDate) { iSnapshotProjectedDate = snapshotProjectedDate; }

	public AcademicArea getAcademicArea() { return iAcademicArea; }
	public void setAcademicArea(AcademicArea academicArea) { iAcademicArea = academicArea; }

	public PosMajor getMajor() { return iMajor; }
	public void setMajor(PosMajor major) { iMajor = major; }

	public AcademicClassification getAcademicClassification() { return iAcademicClassification; }
	public void setAcademicClassification(AcademicClassification academicClassification) { iAcademicClassification = academicClassification; }

	public boolean equals(Object o) {
		if (o == null || !(o instanceof CurriculumProjectionRule)) return false;
		if (getUniqueId() == null || ((CurriculumProjectionRule)o).getUniqueId() == null) return false;
		return getUniqueId().equals(((CurriculumProjectionRule)o).getUniqueId());
	}

	public int hashCode() {
		if (getUniqueId() == null) return super.hashCode();
		return getUniqueId().hashCode();
	}

	public String toString() {
		return "CurriculumProjectionRule["+getUniqueId()+"]";
	}

	public String toDebugString() {
		return "CurriculumProjectionRule[" +
			"\n	AcademicArea: " + getAcademicArea() +
			"\n	AcademicClassification: " + getAcademicClassification() +
			"\n	Major: " + getMajor() +
			"\n	Projection: " + getProjection() +
			"\n	SnapshotProjectedDate: " + getSnapshotProjectedDate() +
			"\n	SnapshotProjection: " + getSnapshotProjection() +
			"\n	UniqueId: " + getUniqueId() +
			"]";
	}
}


text:
<!DOCTYPE HTML>

		<meta http-equiv="Content-Type" content="html/html; charset=utf-8" />
		<title>Bit6FileDownloader Class Reference</title>
		<meta id="xcode-display" name="xcode-display" content="render"/>
		<link rel="stylesheet" type="text/css" href="../css/styles.css" media="all" />
		<link rel="stylesheet" type="text/css" media="print" href="../css/stylesPrint.css" />
		<meta name="generator" content="appledoc 2.2 (build 963)" />

Bit6-SDK-for-iOS

				Bit6

Bit6FileDownloader Class Reference

					<button aria-label="Show Table of Contents" role="checkbox" class="open" id="table_of_contents">Table of Contents</button>

					<select id="jumpTo">
	<option value="top">Jump To…</option>

	<option value="overview">Overview</option>

	<option value="tasks">Tasks</option>

	<option value="class_methods">Class Methods</option>

	<option value="//api/name/cancelOperations">    + cancelOperations</option>

	<option value="//api/name/downloadFileAtURL:toFilePath:canReplace:preparationBlock:priority:completionHandler:">    + downloadFileAtURL:toFilePath:canReplace:preparationBlock:priority:completionHandler:</option>

	<option value="//api/name/isDownloadingFileAtURL:">    + isDownloadingFileAtURL:</option>

	<option value="//api/name/pathForFileName:">    + pathForFileName:</option>

</select>

Overview

Tasks

Class Methods

cancelOperations

downloadFileAtURL:toFilePath:canReplace:preparationBlock:priority:completionHandler:

isDownloadingFileAtURL:

pathForFileName:

Index

Hierarchy

Bit6FileDownloader Class Reference

	Inherits from
	NSObject

	Declared in
	Bit6FileDownloader.h

Overview

Bit6FileDownloader handles the downloads of the framework using NSOperationQueue and NSURLSessionDownloadTask.

Tasks

		+ cancelOperations

		+ downloadFileAtURL:toFilePath:canReplace:preparationBlock:priority:completionHandler:

		+ isDownloadingFileAtURL:

		+ pathForFileName:

Class Methods

cancelOperations

Cancels all pending download operations.

+ (void)cancelOperations

Declared In

		Bit6FileDownloader.h

downloadFileAtURL:toFilePath:canReplace:preparationBlock:priority:completionHandler:

Download a file. It can be set to replace any file in the indicated path if necessary. When running from an extension, a copy of the file will be saved in the SDK group container.

+ (void)downloadFileAtURL:(NSURL *)url toFilePath:(NSString *)filePath canReplace:(BOOL)replace preparationBlock:(nullable NSData *( ^ ) ( NSData *data ))preparationBlock priority:(NSOperationQueuePriority)priority completionHandler:(nullable void ( ^ ) ( NSURL *_Nullable location , NSURLResponse *_Nullable response , NSError *_Nullable error ))completionHandler

Parameters

url

remote URL address of the file to download.

filePath

local path where to save the file.

replace

the file will be downloaded and will replace the file in cache.

preparationBlock

block to process the downloaded data before saving it to the filePath.

priority

the execution priority of the operation in the operation queue.

completionHandler

Block to call after the operation has been completed. The “error” value can be use to know if the file was downloaded and saved in cache.

See Also

[Bit6 setAppGroupIdentifier:].

Declared In

		Bit6FileDownloader.h

isDownloadingFileAtURL:

Query is a URL is being downloaded.

+ (BOOL)isDownloadingFileAtURL:(NSURL *)url

Parameters

url

remote URL address of the file.

Return Value

true if the specified URL is being downloaded.

Declared In

		Bit6FileDownloader.h

pathForFileName:

Get the full path for a file in the ~/Cache/bit6 directory.

+ (NSString *)pathForFileName:(NSString *)fileName

Parameters

fileName

name of the file.

Return Value

full path for a file in the Bit6 cache directory.

Declared In

		Bit6FileDownloader.h

Index

Hierarchy

© 2016 Bit6. All rights reserved. (Last updated: 2016-10-10)

						Generated by appledoc 2.2 (build 963).


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>Admin Console - SB Admin</title>

    <link href="css/bootstrap.css" rel="stylesheet">

    <link href="css/sb-admin.css" rel="stylesheet">
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">

          <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
            Toggle navigation

          </button>
          FITeagle 2

 Dashboard

 Admin Console

 ------------

 User Management

 Testbed Management

 Resource Management

 Experiment Management

 UNIFI Lectures

 Configuration

               Layout

Dropdown Item

Another Item

Third Item

Last Item

               Messages 7

7 New Notifcations

                    Alexander Willner:
                    Hey there, I wanted to ask you something...
                     4:34 PM

                    Alexander Willner:
                    Hey there, I wanted to ask you something...
                     4:34 PM

                    Alexander Willner:
                    Hey there, I wanted to ask you something...
                     4:34 PM

View Inbox 7

               Alerts 3

Default Default

Primary Primary

Success Success

Info Info

Warning Warning

Danger Danger

View All

               Alexander Willner

 Profile

 Inbox 7

 Settings

 Log Out

Admin Console Built-In Admin Console

 Dashboard

 Admin Console

              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
              Be sure to visit the FITeagle documentation for more information.

                <form action="">
                <input onclick="send_message()" value="Send" type="button">
                <input id="textID" name="message" value="listResources" type="text">

                </form>

Message Bus live-view


text:
#include "src/gpu/GrCaps.h"
#include "src/gpu/GrColor.h"
#include "src/gpu/GrPipeline.h"
#include "src/gpu/GrProcessor.h"
#include "src/gpu/GrRenderTargetContext.h"
#include "src/gpu/effects/GrCoverageSetOpXP.h"
#include "src/gpu/glsl/GrGLSLBlend.h"
#include "src/gpu/glsl/GrGLSLFragmentShaderBuilder.h"
#include "src/gpu/glsl/GrGLSLUniformHandler.h"
#include "src/gpu/glsl/GrGLSLXferProcessor.h"

class CoverageSetOpXP : public GrXferProcessor {
public:
    CoverageSetOpXP(SkRegion::Op regionOp, bool invertCoverage)
            : INHERITED(kCoverageSetOpXP_ClassID)
            , fRegionOp(regionOp)
            , fInvertCoverage(invertCoverage) {}

    const char* name() const override { return "Coverage Set Op"; }

    GrGLSLXferProcessor* createGLSLInstance() const override;

    bool invertCoverage() const { return fInvertCoverage; }

private:

    void onGetGLSLProcessorKey(const GrShaderCaps& caps, GrProcessorKeyBuilder* b) const override;

    void onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const override;

    bool onIsEqual(const GrXferProcessor& xpBase) const override {
        const CoverageSetOpXP& xp = xpBase.cast<CoverageSetOpXP>();
        return (fRegionOp == xp.fRegionOp &&
                fInvertCoverage == xp.fInvertCoverage);
    }

    SkRegion::Op fRegionOp;
    bool         fInvertCoverage;

    typedef GrXferProcessor INHERITED;
};

///////////////////////////////////////////////////////////////////////////////

class GLCoverageSetOpXP : public GrGLSLXferProcessor {
public:
    GLCoverageSetOpXP(const GrProcessor&) {}

    ~GLCoverageSetOpXP() override {}

    static void GenKey(const GrProcessor& processor, const GrShaderCaps& caps,
                       GrProcessorKeyBuilder* b) {
        const CoverageSetOpXP& xp = processor.cast<CoverageSetOpXP>();
        uint32_t key = xp.invertCoverage() ?  0x0 : 0x1;
        b->add32(key);
    }

private:
    void emitOutputsForBlendState(const EmitArgs& args) override {
        const CoverageSetOpXP& xp = args.fXP.cast<CoverageSetOpXP>();
        GrGLSLXPFragmentBuilder* fragBuilder = args.fXPFragBuilder;

        if (xp.invertCoverage()) {
            fragBuilder->codeAppendf("%s = 1.0 - %s;", args.fOutputPrimary, args.fInputCoverage);
        } else {
            fragBuilder->codeAppendf("%s = %s;", args.fOutputPrimary, args.fInputCoverage);
        }
    }

    void onSetData(const GrGLSLProgramDataManager&, const GrXferProcessor&) override {}

    typedef GrGLSLXferProcessor INHERITED;
};

///////////////////////////////////////////////////////////////////////////////

void CoverageSetOpXP::onGetGLSLProcessorKey(const GrShaderCaps& caps,
                                            GrProcessorKeyBuilder* b) const {
    GLCoverageSetOpXP::GenKey(*this, caps, b);
}

GrGLSLXferProcessor* CoverageSetOpXP::createGLSLInstance() const {
    return new GLCoverageSetOpXP(*this);
}

void CoverageSetOpXP::onGetBlendInfo(GrXferProcessor::BlendInfo* blendInfo) const {
    switch (fRegionOp) {
        case SkRegion::kReplace_Op:
            blendInfo->fSrcBlend = kOne_GrBlendCoeff;
            blendInfo->fDstBlend = kZero_GrBlendCoeff;
            break;
        case SkRegion::kIntersect_Op:
            blendInfo->fSrcBlend = kDC_GrBlendCoeff;
            blendInfo->fDstBlend = kZero_GrBlendCoeff;
            break;
        case SkRegion::kUnion_Op:
            blendInfo->fSrcBlend = kOne_GrBlendCoeff;
            blendInfo->fDstBlend = kISC_GrBlendCoeff;
            break;
        case SkRegion::kXOR_Op:
            blendInfo->fSrcBlend = kIDC_GrBlendCoeff;
            blendInfo->fDstBlend = kISC_GrBlendCoeff;
            break;
        case SkRegion::kDifference_Op:
            blendInfo->fSrcBlend = kZero_GrBlendCoeff;
            blendInfo->fDstBlend = kISC_GrBlendCoeff;
            break;
        case SkRegion::kReverseDifference_Op:
            blendInfo->fSrcBlend = kIDC_GrBlendCoeff;
            blendInfo->fDstBlend = kZero_GrBlendCoeff;
            break;
    }
    blendInfo->fBlendConstant = SK_PMColor4fTRANSPARENT;
}

///////////////////////////////////////////////////////////////////////////////

constexpr GrCoverageSetOpXPFactory::GrCoverageSetOpXPFactory(SkRegion::Op regionOp,
                                                             bool invertCoverage)
        : fRegionOp(regionOp), fInvertCoverage(invertCoverage) {}

const GrXPFactory* GrCoverageSetOpXPFactory::Get(SkRegion::Op regionOp, bool invertCoverage) {
    // If these objects are constructed as static constexpr by cl.exe (2015 SP2) the vtables are
    // null.
#ifdef SK_BUILD_FOR_WIN
#define _CONSTEXPR_
#else
#define _CONSTEXPR_ constexpr
#endif
    switch (regionOp) {
        case SkRegion::kReplace_Op: {
            if (invertCoverage) {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gReplaceCDXPFI(
                        SkRegion::kReplace_Op, true);
                return &gReplaceCDXPFI;
            } else {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gReplaceCDXPF(
                        SkRegion::kReplace_Op, false);
                return &gReplaceCDXPF;
            }
        }
        case SkRegion::kIntersect_Op: {
            if (invertCoverage) {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gIntersectCDXPFI(
                        SkRegion::kIntersect_Op, true);
                return &gIntersectCDXPFI;
            } else {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gIntersectCDXPF(
                        SkRegion::kIntersect_Op, false);
                return &gIntersectCDXPF;
            }
        }
        case SkRegion::kUnion_Op: {
            if (invertCoverage) {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gUnionCDXPFI(SkRegion::kUnion_Op,
                                                                               true);
                return &gUnionCDXPFI;
            } else {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gUnionCDXPF(SkRegion::kUnion_Op,
                                                                              false);
                return &gUnionCDXPF;
            }
        }
        case SkRegion::kXOR_Op: {
            if (invertCoverage) {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gXORCDXPFI(SkRegion::kXOR_Op,
                                                                             true);
                return &gXORCDXPFI;
            } else {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gXORCDXPF(SkRegion::kXOR_Op,
                                                                            false);
                return &gXORCDXPF;
            }
        }
        case SkRegion::kDifference_Op: {
            if (invertCoverage) {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gDifferenceCDXPFI(
                        SkRegion::kDifference_Op, true);
                return &gDifferenceCDXPFI;
            } else {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gDifferenceCDXPF(
                        SkRegion::kDifference_Op, false);
                return &gDifferenceCDXPF;
            }
        }
        case SkRegion::kReverseDifference_Op: {
            if (invertCoverage) {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gRevDiffCDXPFI(
                        SkRegion::kReverseDifference_Op, true);
                return &gRevDiffCDXPFI;
            } else {
                static _CONSTEXPR_ const GrCoverageSetOpXPFactory gRevDiffCDXPF(
                        SkRegion::kReverseDifference_Op, false);
                return &gRevDiffCDXPF;
            }
        }
    }
#undef _CONSTEXPR_
    SK_ABORT("Unknown region op.");
}

sk_sp<const GrXferProcessor> GrCoverageSetOpXPFactory::makeXferProcessor(
        const GrProcessorAnalysisColor&,
        GrProcessorAnalysisCoverage,
        bool hasMixedSamples,
        const GrCaps& caps,
        GrClampType) const {
    // We don't support inverting coverage with mixed samples. We don't expect to ever want this in
    // the future, however we could at some point make this work using an inverted coverage
    // modulation table. Note that an inverted table still won't work if there are coverage procs.
    if (fInvertCoverage && hasMixedSamples) {
        SkASSERT(false);
        return nullptr;
    }

    return sk_sp<GrXferProcessor>(new CoverageSetOpXP(fRegionOp, fInvertCoverage));
}

GR_DEFINE_XP_FACTORY_TEST(GrCoverageSetOpXPFactory);

#if GR_TEST_UTILS
const GrXPFactory* GrCoverageSetOpXPFactory::TestGet(GrProcessorTestData* d) {
    SkRegion::Op regionOp = SkRegion::Op(d->fRandom->nextULessThan(SkRegion::kLastOp + 1));
    bool invertCoverage = d->fRandom->nextBool();
    return GrCoverageSetOpXPFactory::Get(regionOp, invertCoverage);
}
#endif


text:
<!DOCTYPE html>

    <title>UIImage Extension Reference</title>
    <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
    <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
    <meta charset="utf-8">

          AlamofireImage 4.2.0 Docs

         (77% documented)

        <form role="search" action="../search.json">
          <input type="text" placeholder="Search documentation" data-typeahead>
        </form>

            View on GitHub

            Install in Dash

      AlamofireImage Reference

      UIImage Extension Reference

            Classes

                AutoPurgingImageCache

                ImageDownloader

                – DownloadPrioritization

                ImageResponseSerializer

                RequestReceipt

            Enumerations

                AFIError

            Extensions

                AlamofireExtension

                DataRequest

                DataRequest

                UIButton

                UIImage

                UIImageView

                – ImageTransition

            Protocols

                CompositeImageFilter

                CoreImageFilter

                ImageCache

                ImageFilter

                ImageRequestCache

                Roundable

                Sizable

            Structures

                AspectScaledToFillSizeCircleFilter

                AspectScaledToFillSizeFilter

                AspectScaledToFillSizeWithRoundedCornersFilter

                AspectScaledToFitSizeFilter

                BlurFilter

                CircleFilter

                DynamicCompositeImageFilter

                DynamicImageFilter

                RoundedCornersFilter

                ScaledToSizeCircleFilter

                ScaledToSizeFilter

                ScaledToSizeWithRoundedCornersFilter

            Type Aliases

                AFIDataResponse

                AFIResult

                AnimationOptions

                ControlState

                Image

                Image

UIImage

extension UIImage: AlamofireExtended

Initialization

                    af_threadSafeImage(with:<wbr>)

Undocumented

Declaration

Swift

public static func af_threadSafeImage(with data: Data) -> UIImage?

                    af_threadSafeImage(with:<wbr>scale:<wbr>)

Undocumented

Declaration

Swift

public static func af_threadSafeImage(with data: Data, scale: CGFloat) -> UIImage?

Inflation

                    af_inflated

Undocumented

Declaration

Swift

public var af_inflated: Bool { get }

                    af_inflate()

Undocumented

Declaration

Swift

public func af_inflate()

Alpha

                    af_containsAlphaComponent

Undocumented

Declaration

Swift

public var af_containsAlphaComponent: Bool { get }

                    af_isOpaque

Undocumented

Declaration

Swift

public var af_isOpaque: Bool { get }

Scaling

                    af_imageScaled(to:<wbr>scale:<wbr>)

Undocumented

Declaration

Swift

public func af_imageScaled(to size: CGSize, scale: CGFloat? = nil) -> UIImage

                    af_imageAspectScaled(toFit:<wbr>scale:<wbr>)

Undocumented

Declaration

Swift

public func af_imageAspectScaled(toFit size: CGSize, scale: CGFloat? = nil) -> UIImage

                    af_imageAspectScaled(toFill:<wbr>scale:<wbr>)

Undocumented

Declaration

Swift

public func af_imageAspectScaled(toFill size: CGSize, scale: CGFloat? = nil) -> UIImage

Rounded Corners

                    af_imageRounded(withCornerRadius:<wbr>divideRadiusByImageScale:<wbr>)

Undocumented

Declaration

Swift

public func af_imageRounded(withCornerRadius radius: CGFloat, divideRadiusByImageScale: Bool = false) -> UIImage

                    af_imageRoundedIntoCircle()

Undocumented

Declaration

Swift

public func af_imageRoundedIntoCircle() -> UIImage

Core Image Filters

                    af_imageFiltered(withCoreImageFilter:<wbr>parameters:<wbr>)

Undocumented

Declaration

Swift

public func af_imageFiltered(withCoreImageFilter name: String, parameters: [String : Any]? = nil) -> UIImage?

© 2021 Alamofire Software Foundation. All rights reserved. (Last updated: 2021-04-03)

Generated by jazzy ♪♫ v0.13.6, a Realm project.


text:
package extractors;

import ninja.params.WithArgumentExtractor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * ninja extractor for loged in user
 * @author henrik
 */
@WithArgumentExtractor(AuthenticatedUserExtractor.class)
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER})
public @interface AuthenticatedUser {
}


text:
<?php if(!defined('GX_LIB')) die("Direct Access Not Allowed!");

/**
* Image Processor Class
*
* This class will run the image modifier.
*
* @author Puguh Wijayanto (www.metalgenix.com)
* @since 0.0.1
*/
class Image
{
    public function __construct () {

    }

    /**
    * Image Resize function.
    * This function will resize and crop images.
    *
    * @param string $src The source of the images.
    * @param string $dst The destination of the output image.
    * @param int $width The width dimension of the output images.
    * @param int $height The height dimension of the output images.
    * @param bool $crop 0 or 1, 0 for not cropped. and 1 for cropped.
    *
    * @return true
    *
    * @author promaty@gmail.com
    * @link http://php.net/manual/en/function.imagecopyresampled.php#104028
    */
    static public function resize($src, $dst, $width, $height, $crop=0){

        if(!list($w, $h) = getimagesize($src)) return "Unsupported picture type!";

        $type = strtolower(substr(strrchr($src,"."),1));
        if($type == 'jpeg') $type = 'jpg';
        switch($type){
            case 'bmp': $img = imagecreatefromwbmp($src); break;
            case 'gif': $img = imagecreatefromgif($src); break;
            case 'jpg': $img = imagecreatefromjpeg($src); break;
            case 'png': $img = imagecreatefrompng($src); break;
            default : return "Unsupported picture type!";
        }

        // resize
        if($crop){
            if($w < $width or $h < $height) return "Picture is too small!";
            $ratio = max($width/$w, $height/$h);
            $h = $height / $ratio;
            $x = ($w - $width / $ratio) / 2;
            $w = $width / $ratio;
        }
        else{
            if($w < $width and $h < $height) return "Picture is too small!";
            $ratio = min($width/$w, $height/$h);
            $width = $w * $ratio;
            $height = $h * $ratio;
            $x = 0;
        }

        $new = imagecreatetruecolor($width, $height);

        // preserve transparency
        if($type == "gif" or $type == "png"){
            imagecolortransparent($new, imagecolorallocatealpha($new, 0, 0, 0, 127));
            imagealphablending($new, false);
            imagesavealpha($new, true);
        }

        imagecopyresampled($new, $img, 0, 0, $x, 0, $width, $height, $w, $h);

        switch($type){
            case 'bmp': imagewbmp($new, $dst); break;
            case 'gif': imagegif($new, $dst); break;
            case 'jpg': imagejpeg($new, $dst); break;
            case 'png': imagepng($new, $dst); break;
        }
        return true;
    }

    static public function compress_png($path, $max_quality = 85) {

        $check = shell_exec("pngquant --version");
        if(!$check) {
            return false;
        }else{
            // guarantee that quality won't be worse than that.
            $min_quality = 60;

            // '-' makes it use stdout, required to save to $compressed_png_content variable
            // '<' makes it read from the given file path
            // escapeshellarg() makes this safe to use with any path
            $compressed_png_content = shell_exec("pngquant --quality=$min_quality-$max_quality - < ".escapeshellarg($path));

            if (!$compressed_png_content) {
                throw new Exception("Conversion to compressed PNG failed. Is pngquant 1.8+ installed on the server?");
            }else{
                file_put_contents($path, $compressed_png_content);
                return true;
            }

        }
    }

}


text:
package com.mm.test;

import net.sf.ehcache.CacheManager;
import net.sf.ehcache.Element;
import net.sf.ehcache.Cache;

/**
 * Created by Administrator on 2015/11/10.
 */
public class TestEhcache {
    public static void main(String[] args){

        System.out.println();

        //初始化
        CacheManager manager = new CacheManager("src/main/resources/ehcache.xml");
        //获取指定Cache对象
        Cache configCache = manager.getCache("configCache");

        //创建节点对象
        Element element = new Element("key1","value1");
        //保存节点到configCache
        configCache.put(element);
        //从configCache获取节点
        Element element2 = configCache.get("key1");
        Object  value = element2.getValue();
        //更新节点
        configCache.put(new Element("key1","value2"));
        //删除节点
        configCache.remove("key1");
        System.out.println("--"+value);
        try {
            Thread.sleep(100);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        //卸载缓存管理器
        manager.shutdown();
    }
}


text:
package com.alibaba.json.bvtVO;

import java.util.List;

public class Page<T> {
    private Integer count;
    private List<T> items;

    public void setCount(Integer count) {
        this.count = count;
    }

    public Integer getCount() {
        return count;
    }

    public void setItems(List<T> items) {
        this.items = items;
    }

    public List<T> getItems() {
        return items;
    }
}


text:
"""Pipeline stages."""

from src.clients import gcs
from src.pipelines import pipeline
from src.pipelines.stages import gcsdeleter

class GcsCompositor(pipeline.Pipeline):
  """Pipeline stage that composes source objects into one destination object.

  This stage will use the GCS object composition feature to combine all given
  sources into one object that will be stored at the URL of the first sink.
  """

  @staticmethod
  def GetHelp():
    return """Compose many objects into a single GCS object.

Object composition requires that all source objects reside in the same
bucket as the destination object. This stage will strip any sources
with buckets that do not match the destination as taken as the first
sink URL.
Optionally, sources can be deleted after composition.

The stage config should look like this:
```python
{
  "contentType": "...",
  "deleteSources": True,
}
```
  * contentType is optional.
"""

  def run(self, config):
    """Runs the stage.

    Object composition requires that all source objects reside in the same
    bucket as the destination object. This stage will strip any sources with
    buckets that do not match the destination as taken as the first sink URL.
    Optionally, sources can be deleted after composition.

    Args:
      config: Specifies the source object(s) and sink.

    Yields:
      Possible deleter stage future.
    """
    (dest_bucket, dest_obj) = gcs.Gcs.UrlToBucketAndName(config['sinks'][0])

    sources = config['sources']
    src_objects = [gcs.Gcs.UrlToBucketAndName(s)[1] for s in sources]

    storage = gcs.Gcs()
    storage.ComposeObjects(dest_bucket,
                           src_objects,
                           dest_obj,
                           config['contentType'])

    if config.get('deleteSources', False):
      yield gcsdeleter.GcsDeleter({'sources': sources})

  def Lint(self, linter):
    """Stage-specific configuration linting."""
    linter.FieldCheck('contentType', validator=self.ValidateContentType)

  def ValidateContentType(self, content_type):
    # super simple for now, for illustration
    if len(content_type.split('/')) != 2:
      raise ValueError('Invalid format.')


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
    Copyright 2016 jeasonlzy(廖子尧)

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->
<android.support.design.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.design.widget.AppBarLayout
        android:id="@+id/appbar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:theme="@style/AppTheme.AppBarOverlay">

        <android.support.v7.widget.Toolbar
            android:id="@+id/toolbar"
            android:layout_width="match_parent"
            android:layout_height="?attr/actionBarSize"
            app:layout_scrollFlags="scroll|enterAlways|snap"
            app:popupTheme="@style/AppTheme.PopupOverlay"/>

        <android.support.design.widget.TabLayout
            android:id="@+id/tab"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@color/colorPrimary"
            app:tabMode="fixed"/>
    </android.support.design.widget.AppBarLayout>

    <android.support.v4.view.ViewPager
        android:id="@+id/viewPager"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="@string/appbar_scrolling_view_behavior"/>

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="right|bottom"
        android:layout_marginBottom="32dp"
        android:layout_marginRight="16dp"
        android:src="@mipmap/ic_start"
        app:layout_behavior="@string/translate_up_down_behavior"
        app:layout_scrollFlags="scroll|enterAlways|snap"/>

</android.support.design.widget.CoordinatorLayout>


text:
package com.alibaba.rocketmq.client.producer;

import com.alibaba.rocketmq.client.ClientConfig;
import com.alibaba.rocketmq.client.QueryResult;
import com.alibaba.rocketmq.client.exception.MQBrokerException;
import com.alibaba.rocketmq.client.exception.MQClientException;
import com.alibaba.rocketmq.client.impl.producer.DefaultMQProducerImpl;
import com.alibaba.rocketmq.common.MixAll;
import com.alibaba.rocketmq.common.message.*;
import com.alibaba.rocketmq.remoting.RPCHook;
import com.alibaba.rocketmq.remoting.exception.RemotingException;

import java.util.List;

/**
 * @author shijia.wxr
 */
public class DefaultMQProducer extends ClientConfig implements MQProducer {
    protected final transient DefaultMQProducerImpl defaultMQProducerImpl;
    private String producerGroup;
    /**
     * Just for testing or demo program
     */
    private String createTopicKey = MixAll.DEFAULT_TOPIC;
    private volatile int defaultTopicQueueNums = 4;
    private int sendMsgTimeout = 3000;
    private int compressMsgBodyOverHowmuch = 1024 * 4;
    private int retryTimesWhenSendFailed = 2;
    private int retryTimesWhenSendAsyncFailed = 2;

    private boolean retryAnotherBrokerWhenNotStoreOK = false;
    private int maxMessageSize = 1024 * 1024 * 4; // 4M
    public DefaultMQProducer() {
        this(MixAll.DEFAULT_PRODUCER_GROUP, null);
    }

    public DefaultMQProducer(final String producerGroup, RPCHook rpcHook) {
        this.producerGroup = producerGroup;
        defaultMQProducerImpl = new DefaultMQProducerImpl(this, rpcHook);
    }

    public DefaultMQProducer(final String producerGroup) {
        this(producerGroup, null);
    }

    public DefaultMQProducer(RPCHook rpcHook) {
        this(MixAll.DEFAULT_PRODUCER_GROUP, rpcHook);
    }

    @Override
    public void start() throws MQClientException {
        this.defaultMQProducerImpl.start();
    }

    @Override
    public void shutdown() {
        this.defaultMQProducerImpl.shutdown();
    }

    @Override
    public List<MessageQueue> fetchPublishMessageQueues(String topic) throws MQClientException {
        return this.defaultMQProducerImpl.fetchPublishMessageQueues(topic);
    }

    @Override
    public SendResult send(Message msg) throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
        return this.defaultMQProducerImpl.send(msg);
    }

    @Override
    public SendResult send(Message msg, long timeout) throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
        return this.defaultMQProducerImpl.send(msg, timeout);
    }

    @Override
    public void send(Message msg, SendCallback sendCallback) throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.send(msg, sendCallback);
    }

    @Override
    public void send(Message msg, SendCallback sendCallback, long timeout)
            throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.send(msg, sendCallback, timeout);
    }

    @Override
    public void sendOneway(Message msg) throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.sendOneway(msg);
    }

    @Override
    public SendResult send(Message msg, MessageQueue mq)
            throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
        return this.defaultMQProducerImpl.send(msg, mq);
    }

    @Override
    public SendResult send(Message msg, MessageQueue mq, long timeout)
            throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
        return this.defaultMQProducerImpl.send(msg, mq, timeout);
    }

    @Override
    public void send(Message msg, MessageQueue mq, SendCallback sendCallback)
            throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.send(msg, mq, sendCallback);
    }

    @Override
    public void send(Message msg, MessageQueue mq, SendCallback sendCallback, long timeout)
            throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.send(msg, mq, sendCallback, timeout);
    }

    @Override
    public void sendOneway(Message msg, MessageQueue mq) throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.sendOneway(msg, mq);
    }

    @Override
    public SendResult send(Message msg, MessageQueueSelector selector, Object arg)
            throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
        return this.defaultMQProducerImpl.send(msg, selector, arg);
    }

    @Override
    public SendResult send(Message msg, MessageQueueSelector selector, Object arg, long timeout)
            throws MQClientException, RemotingException, MQBrokerException, InterruptedException {
        return this.defaultMQProducerImpl.send(msg, selector, arg, timeout);
    }

    @Override
    public void send(Message msg, MessageQueueSelector selector, Object arg, SendCallback sendCallback)
            throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.send(msg, selector, arg, sendCallback);
    }

    @Override
    public void send(Message msg, MessageQueueSelector selector, Object arg, SendCallback sendCallback, long timeout)
            throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.send(msg, selector, arg, sendCallback, timeout);
    }

    @Override
    public void sendOneway(Message msg, MessageQueueSelector selector, Object arg)
            throws MQClientException, RemotingException, InterruptedException {
        this.defaultMQProducerImpl.sendOneway(msg, selector, arg);
    }

    @Override
    public TransactionSendResult sendMessageInTransaction(Message msg, LocalTransactionExecuter tranExecuter, final Object arg)
            throws MQClientException {
        throw new RuntimeException("sendMessageInTransaction not implement, please use TransactionMQProducer class");
    }

    @Override
    public void createTopic(String key, String newTopic, int queueNum) throws MQClientException {
        createTopic(key, newTopic, queueNum, 0);
    }

    @Override
    public void createTopic(String key, String newTopic, int queueNum, int topicSysFlag) throws MQClientException {
        this.defaultMQProducerImpl.createTopic(key, newTopic, queueNum, topicSysFlag);
    }

    @Override
    public long searchOffset(MessageQueue mq, long timestamp) throws MQClientException {
        return this.defaultMQProducerImpl.searchOffset(mq, timestamp);
    }

    @Override
    public long maxOffset(MessageQueue mq) throws MQClientException {
        return this.defaultMQProducerImpl.maxOffset(mq);
    }

    @Override
    public long minOffset(MessageQueue mq) throws MQClientException {
        return this.defaultMQProducerImpl.minOffset(mq);
    }

    @Override
    public long earliestMsgStoreTime(MessageQueue mq) throws MQClientException {
        return this.defaultMQProducerImpl.earliestMsgStoreTime(mq);
    }

    @Override
    public MessageExt viewMessage(String offsetMsgId) throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
        return this.defaultMQProducerImpl.viewMessage(offsetMsgId);
    }

    @Override
    public QueryResult queryMessage(String topic, String key, int maxNum, long begin, long end)
            throws MQClientException, InterruptedException {
        return this.defaultMQProducerImpl.queryMessage(topic, key, maxNum, begin, end);
    }

    @Override
    public MessageExt viewMessage(String topic, String msgId) throws RemotingException, MQBrokerException, InterruptedException, MQClientException {
        try {
            MessageId oldMsgId = MessageDecoder.decodeMessageId(msgId);
            return this.viewMessage(msgId);
        } catch (Exception e) {
        }
        return this.defaultMQProducerImpl.queryMessageByUniqKey(topic, msgId);
    }

    public String getProducerGroup() {
        return producerGroup;
    }

    public void setProducerGroup(String producerGroup) {
        this.producerGroup = producerGroup;
    }

    public String getCreateTopicKey() {
        return createTopicKey;
    }

    public void setCreateTopicKey(String createTopicKey) {
        this.createTopicKey = createTopicKey;
    }

    public int getSendMsgTimeout() {
        return sendMsgTimeout;
    }

    public void setSendMsgTimeout(int sendMsgTimeout) {
        this.sendMsgTimeout = sendMsgTimeout;
    }

    public int getCompressMsgBodyOverHowmuch() {
        return compressMsgBodyOverHowmuch;
    }

    public void setCompressMsgBodyOverHowmuch(int compressMsgBodyOverHowmuch) {
        this.compressMsgBodyOverHowmuch = compressMsgBodyOverHowmuch;
    }

    public DefaultMQProducerImpl getDefaultMQProducerImpl() {
        return defaultMQProducerImpl;
    }

    public boolean isRetryAnotherBrokerWhenNotStoreOK() {
        return retryAnotherBrokerWhenNotStoreOK;
    }

    public void setRetryAnotherBrokerWhenNotStoreOK(boolean retryAnotherBrokerWhenNotStoreOK) {
        this.retryAnotherBrokerWhenNotStoreOK = retryAnotherBrokerWhenNotStoreOK;
    }

    public int getMaxMessageSize() {
        return maxMessageSize;
    }

    public void setMaxMessageSize(int maxMessageSize) {
        this.maxMessageSize = maxMessageSize;
    }

    public int getDefaultTopicQueueNums() {
        return defaultTopicQueueNums;
    }

    public void setDefaultTopicQueueNums(int defaultTopicQueueNums) {
        this.defaultTopicQueueNums = defaultTopicQueueNums;
    }

    public int getRetryTimesWhenSendFailed() {
        return retryTimesWhenSendFailed;
    }

    public void setRetryTimesWhenSendFailed(int retryTimesWhenSendFailed) {
        this.retryTimesWhenSendFailed = retryTimesWhenSendFailed;
    }

    public boolean isSendMessageWithVIPChannel() {
        return isVipChannelEnabled();
    }

    public void setSendMessageWithVIPChannel(final boolean sendMessageWithVIPChannel) {
        this.setVipChannelEnabled(sendMessageWithVIPChannel);
    }

    public long[] getNotAvailableDuration() {
        return this.defaultMQProducerImpl.getNotAvailableDuration();
    }

    public void setNotAvailableDuration(final long[] notAvailableDuration) {
        this.defaultMQProducerImpl.setNotAvailableDuration(notAvailableDuration);
    }

    public long[] getLatencyMax() {
        return this.defaultMQProducerImpl.getLatencyMax();
    }

    public void setLatencyMax(final long[] latencyMax) {
        this.defaultMQProducerImpl.setLatencyMax(latencyMax);
    }

    public boolean isSendLatencyFaultEnable() {
        return this.defaultMQProducerImpl.isSendLatencyFaultEnable();
    }

    public void setSendLatencyFaultEnable(final boolean sendLatencyFaultEnable) {
        this.defaultMQProducerImpl.setSendLatencyFaultEnable(sendLatencyFaultEnable);
    }

    public int getRetryTimesWhenSendAsyncFailed() {
        return retryTimesWhenSendAsyncFailed;
    }

    public void setRetryTimesWhenSendAsyncFailed(final int retryTimesWhenSendAsyncFailed) {
        this.retryTimesWhenSendAsyncFailed = retryTimesWhenSendAsyncFailed;
    }
}


text:
#pragma once

#include <React/RCTImageLoaderWithAttributionProtocol.h>

#include <react/core/ReactPrimitives.h>
#include <react/imagemanager/ImageInstrumentation.h>

NS_ASSUME_NONNULL_BEGIN

namespace facebook {
namespace react {

class RCTImageInstrumentationProxy final : public ImageInstrumentation {
 public:
  RCTImageInstrumentationProxy(id<RCTImageLoaderWithAttributionProtocol> imageLoader);
  ~RCTImageInstrumentationProxy();

  void didSetImage() const override;
  void didEnterVisibilityRange() const override;
  void didExitVisibilityRange() const override;

  void trackNativeImageView(UIView *imageView) const;
  void setImageURLLoaderRequest(RCTImageURLLoaderRequest *request);

 private:
  __weak id<RCTImageLoaderWithAttributionProtocol> imageLoader_;
  RCTImageURLLoaderRequest *imageURLLoaderRequest_;
};

} // namespace react
} // namespace facebook

NS_ASSUME_NONNULL_END


text:
<?php

class Ac_Model_Globals_Cookie extends Ac_Model_Globals {

    public function __construct() {
        parent::__construct("_COOKIE");
    }

    public function __set($name, $value) {
        parent::__set($name);
        $this->set($name, $value);
    }

    public function __unset($name) {
        parent::__unset($name);
        $this->delete($name);
    }

    /**
     * Send a cookie
     * @param string $name

     * The name of the cookie.
     *

     * @param string $value [optional]

     * The value of the cookie. This value is stored on the clients computer;
     * do not store sensitive information. Assuming the
     * name is 'cookiename', this
     * value is retrieved through $_COOKIE['cookiename']
     *

     * @param int $expire [optional]

     * The time the cookie expires. This is a Unix timestamp so is
     * in number of seconds since the epoch. In other words, you'll
     * most likely set this with the time function
     * plus the number of seconds before you want it to expire. Or
     * you might use mktime.
     * time()+60*60*24*30 will set the cookie to
     * expire in 30 days. If set to 0, or omitted, the cookie will expire at
     * the end of the session (when the browser closes).
     *

     *

     *

     * You may notice the expire parameter takes on a
     * Unix timestamp, as opposed to the date format Wdy, DD-Mon-YYYY
     * HH:MM:SS GMT, this is because PHP does this conversion
     * internally.
     *

     *

     * @param string $path [optional]

     * The path on the server in which the cookie will be available on.
     * If set to '/', the cookie will be available
     * within the entire domain. If set to
     * '/foo/', the cookie will only be available
     * within the /foo/ directory and all
     * sub-directories such as /foo/bar/ of
     * domain. The default value is the
     * current directory that the cookie is being set in.
     *

     * @param string $domain [optional]

     * The domain that the cookie is available to. To make the cookie
     * available on all subdomains of example.com (including example.com
     * itself) then you'd set it to '.example.com'.
     * Although some browsers will accept cookies without the initial
     * ., RFC 2109
     * requires it to be included. Setting the domain to
     * 'www.example.com' or
     * '.www.example.com' will make the cookie only
     * available in the www subdomain.
     *

     * @param bool $secure [optional]

     * Indicates that the cookie should only be transmitted over a
     * secure HTTPS connection from the client. When set to true, the
     * cookie will only be set if a secure connection exists.
     * On the server-side, it's on the programmer to send this
     * kind of cookie only on secure connection (e.g. with respect to
     * $_SERVER["HTTPS"]).
     *

     * @param bool $httponly [optional]

     * When true the cookie will be made accessible only through the HTTP
     * protocol. This means that the cookie won't be accessible by
     * scripting languages, such as JavaScript. It has been suggested that
     * this setting can effectively help to reduce identity theft through
     * XSS attacks (although it is not supported by all browsers), but that
     * claim is often disputed. Added in PHP 5.2.0.
     * true or false
     *

     * @return bool If output exists prior to calling this function,
     * setcookie will fail and return false. If
     * setcookie successfully runs, it will return true.
     * This does not indicate whether the user accepted the cookie.
     */
    public function set($name, $value, $expire = 0, $path = null, $domain = null, $secure = false, $httponly = null) {
        return setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
    }

    /**
     * Sends an expired cookie for delete it
     * @param string $name

     * The name of the cookie.
     *

     * @param string $path [optional]

     * The path on the server in which the cookie will be available on.
     * If set to '/', the cookie will be available
     * within the entire domain. If set to
     * '/foo/', the cookie will only be available
     * within the /foo/ directory and all
     * sub-directories such as /foo/bar/ of
     * domain. The default value is the
     * current directory that the cookie is being set in.
     *

     * @param string $domain [optional]

     * The domain that the cookie is available to. To make the cookie
     * available on all subdomains of example.com (including example.com
     * itself) then you'd set it to '.example.com'.
     * Although some browsers will accept cookies without the initial
     * ., RFC 2109
     * requires it to be included. Setting the domain to
     * 'www.example.com' or
     * '.www.example.com' will make the cookie only
     * available in the www subdomain.
     *

     * @param bool $secure [optional]

     * Indicates that the cookie should only be transmitted over a
     * secure HTTPS connection from the client. When set to true, the
     * cookie will only be set if a secure connection exists.
     * On the server-side, it's on the programmer to send this
     * kind of cookie only on secure connection (e.g. with respect to
     * $_SERVER["HTTPS"]).
     *

     * @param bool $httponly [optional]

     * When true the cookie will be made accessible only through the HTTP
     * protocol. This means that the cookie won't be accessible by
     * scripting languages, such as JavaScript. It has been suggested that
     * this setting can effectively help to reduce identity theft through
     * XSS attacks (although it is not supported by all browsers), but that
     * claim is often disputed. Added in PHP 5.2.0.
     * true or false
     *

     * @return bool If output exists prior to calling this function,
     * setcookie will fail and return false. If
     * setcookie successfully runs, it will return true.
     * This does not indicate whether the user accepted the cookie.
     */
    public function delete($name, $path = null, $domain = null, $secure = false, $httponly = null) {
        return setcookie($name, "", time() - 3600, $path, $domain, $secure, $httponly);
    }

}