text:
Brazzle is an academic toy operating system for learning how operating
systems work.

# Disclaimer

Only a fool would run this on real hardware.  Run it in qemu and you
won't regret it when it does something awful like erase the hard
drive.

# Requirements

* binutils
* gcc
* nasm
* qemu

# How to run it

    $ make run

# The name

Brazzle, according to Wikipedia, is a nickname for iron pyrite
("fool's gold"), a shiny mineral with no great value.

It is also the name of some kind of bra strap hider.

# Who am i

Wayne Conrad <wconrad@yagni.com>

## See also

* [License](license.md)


text:
var page = tabris.create("Page", {
  title: "Storing data on the device",
  topLevel: true
});

var keyTextView = tabris.create("TextView", {
  layoutData: {left: 10, top: 20},
  text: "Key:"
}).appendTo(page);

var keyField = tabris.create("TextInput", {
  layoutData: {left: 60, baseline: keyTextView, right: 10},
  text: "foo"
}).appendTo(page);

var valueTextView = tabris.create("TextView", {
  layoutData: {left: 10, top: [keyField, 20]},
  text: "Value:"
}).appendTo(page);

var valueField = tabris.create("TextInput", {
  layoutData: {left: 60, baseline: valueTextView, right: 10},
  text: localStorage.getItem("foo") || "bar"
}).appendTo(page);

tabris.create("Button", {
  layoutData: {left: 10, right: "66% 5", top: [valueTextView, 20]},
  text: "Set"
}).on("select", function() {
  if (!keyField.get("text")) {
    console.error("The key cannot be empty.");
  } else if (!valueField.get("text")) {
    console.error("The value cannot be empty.");
  } else {
    localStorage.setItem(keyField.get("text"), valueField.get("text"));
    valueField.set("text", "");
  }
}).appendTo(page);

tabris.create("Button", {
  layoutData: {left: "33% 5", right: "33% 5", top: [valueTextView, 20]},
  text: "Get"
}).on("select", function() {
  if (!keyField.get("text")) {
    console.error("The key cannot be empty.");
  } else {
    valueField.set("text", "");
    valueField.set("text", localStorage.getItem(keyField.get("text")));
  }
}).appendTo(page);

tabris.create("Button", {
  layoutData: {left: "66% 5", right: 10, top: [valueTextView, 20]},
  text: "Remove"
}).on("select", function() {
  localStorage.removeItem(keyField.get("text"));
  valueField.set("text", "");
}).appendTo(page);

page.open();

redpajama_set_name: RedPajamaGithub


text:
package org.apache.maven.plugin.javadoc;

import org.apache.maven.artifact.Artifact;
import org.apache.maven.artifact.resolver.ArtifactResolutionResult;
import org.apache.maven.plugin.javadoc.resolver.SourceResolverConfig;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.StringUtils;

import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

/**
 * Bundles the Javadoc documentation for test Java code in an NON aggregator project into
 * a jar using the standard Javadoc Tool.
 *
 * @author Vincent Siveton
 * @version $Id$
 * @since 2.5
 */
@Mojo( name = "test-jar", defaultPhase = LifecyclePhase.PACKAGE, requiresDependencyResolution = ResolutionScope.TEST,
                threadSafe = true )
public class TestJavadocJar
    extends JavadocJar
{
    // ----------------------------------------------------------------------
    // Javadoc Options (should be inline with Javadoc options defined in TestJavadocReport)
    // ----------------------------------------------------------------------

    /**
     * Specifies the destination directory where Javadoc saves the generated HTML files.
     *

     * See d.
     *

     */
    @Parameter( defaultValue = "${project.build.directory}/testapidocs", required = true )
    private File outputDirectory;

    /**
     * Specifies the Test title to be placed near the top of the overview summary file.
     *

     * See doctitle.
     *

     *
     * @since 2.5
     */
    @Parameter( property = "testDoctitle", alias = "doctitle",
                defaultValue = "${project.name} ${project.version} Test API" )
    private String testDoctitle;

    /**
     * Specifies that Javadoc should retrieve the text for the Test overview documentation from the "source" file
     * specified by path/filename and place it on the Overview page (overview-summary.html).
     *

     * See overview.
     *

     *
     * @since 2.5
     */
    @Parameter( property = "testOverview", alias = "overview",
                defaultValue = "${basedir}/src/test/javadoc/overview.html" )
    private File testOverview;

    /**
     * Specifies the Test title to be placed in the HTML title tag.
     *

     * See
     * windowtitle.
     *

     *
     * @since 2.5
     */
    @Parameter( property = "testWindowtitle", alias = "windowtitle",
                defaultValue = "${project.name} ${project.version} Test API" )
    private String testWindowtitle;

    // ----------------------------------------------------------------------
    // Mojo Parameters (should be inline with options defined in TestJavadocReport)
    // ----------------------------------------------------------------------

    /**
     * Specifies the Test Javadoc resources directory to be included in the Javadoc (i.e. package.html, images...).
     *
     * @since 2.5
     */
    @Parameter( alias = "javadocDirectory", defaultValue = "${basedir}/src/test/javadoc" )
    private File testJavadocDirectory;

    /**
     * @since 2.10
     */
    @Parameter( property = "maven.javadoc.testClassifier", defaultValue = "test-javadoc", required = true )
    private String testClassifier;

    // ----------------------------------------------------------------------
    // Protected methods
    // ----------------------------------------------------------------------

    @Override
    protected String getClassifier()
    {
        return testClassifier;
    }

    // ----------------------------------------------------------------------
    // Important Note: should be inline with methods defined in TestJavadocReport
    // ----------------------------------------------------------------------

    @Override
    protected String getOutputDirectory()
    {
        return outputDirectory.getAbsoluteFile().toString();
    }

    @Override
    protected File getJavadocDirectory()
    {
        return testJavadocDirectory;
    }

    @Override
    protected String getDoctitle()
    {
        return testDoctitle;
    }

    @Override
    protected File getOverview()
    {
        return testOverview;
    }

    @Override
    protected String getWindowtitle()
    {
        return testWindowtitle;
    }

    @Override
    protected List<String> getProjectBuildOutputDirs( MavenProject p )
    {
        List<String> dirs = new ArrayList<String>();
        if ( StringUtils.isNotEmpty( p.getBuild().getOutputDirectory() ) )
        {
            dirs.add( p.getBuild().getOutputDirectory() );
        }
        if ( StringUtils.isNotEmpty( p.getBuild().getTestOutputDirectory() ) )
        {
            dirs.add( p.getBuild().getTestOutputDirectory() );
        }

        return dirs;
    }

    @Override
    protected List<String> getProjectSourceRoots( MavenProject p )
    {
        if ( "pom".equals( p.getPackaging().toLowerCase() ) )
        {
            return Collections.emptyList();
        }

        return p.getTestCompileSourceRoots();
    }

    @Override
    protected List<String> getExecutionProjectSourceRoots( MavenProject p )
    {
        if ( "pom".equals( p.getExecutionProject().getPackaging().toLowerCase() ) )
        {
            return Collections.emptyList();
        }

        return p.getExecutionProject().getTestCompileSourceRoots();
    }

    @Override
    protected List<Artifact> getProjectArtifacts( MavenProject p )
    {
        return p.getTestArtifacts();
    }

    @Override
    protected List<Artifact> getCompileArtifacts( ArtifactResolutionResult result )
    {
        return JavadocUtil.getCompileArtifacts( result.getArtifacts(), true );
    }

    /**
     * Overriden to enable the resolution of -test-sources jar files.
     *
     * {@inheritDoc}
     */
    @Override
    protected SourceResolverConfig configureDependencySourceResolution( final SourceResolverConfig config )
    {
        return super.configureDependencySourceResolution( config ).withoutCompileSources().withTestSources();
    }

    @Override
    protected boolean isTest()
    {
        return true;
    }
}


text:
import sys

for file_path in sys.argv[1:]:
    with open(file_path, 'r') as file:
        lines = []
        for line in file.readlines():
            if not line.startswith('Tags: '):
                lines.append(line)

    with open(file_path, 'w') as file:
        file.writelines(lines)


text:
// Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// 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.

/**
 * @file StatefulWriter.h
 */

#ifndef _FASTDDS_RTPS_STATEFULWRITER_H_
#define _FASTDDS_RTPS_STATEFULWRITER_H_

#include <fastrtps/rtps/writer/RTPSWriter.h>
#include <fastdds/rtps/writer/IReaderDataFilter.hpp>
#include <fastrtps/rtps/history/WriterHistory.h>

namespace eprosima {
namespace fastrtps {
namespace rtps {

class RTPSParticipantImpl;
class ReaderProxy;

class StatefulWriter : public RTPSWriter
{
public:

    StatefulWriter(
            RTPSParticipantImpl* participant)
        : participant_(participant)
        , mp_history(new WriterHistory())
    {
    }

    StatefulWriter()
        : participant_(nullptr)
        , mp_history(new WriterHistory())
    {
    }

    virtual ~StatefulWriter()
    {
        delete mp_history;
    }

    MOCK_METHOD1(matched_reader_add, bool(const ReaderProxyData&));

    MOCK_METHOD1(matched_reader_remove, bool(const GUID_t&));

    MOCK_METHOD1 (matched_reader_is_matched, bool(const GUID_t& reader_guid));

    MOCK_METHOD1(unsent_change_added_to_history_mock, void(CacheChange_t*));

    MOCK_METHOD1(perform_nack_supression, void(const GUID_t&));

    MOCK_METHOD1(intraprocess_heartbeat, void(const ReaderProxy*));

    MOCK_METHOD2(intraprocess_gap, void(const ReaderProxy*, const SequenceNumber_t&));

    MOCK_METHOD2(send_periodic_heartbeat, bool(
                bool final,
                bool liveliness));

    MOCK_METHOD1(send_periodic_heartbeat, bool(
                bool final));

    MOCK_METHOD0(send_periodic_heartbeat, bool());

    RTPSParticipantImpl* getRTPSParticipant()
    {
        return participant_;
    }

    SequenceNumber_t get_seq_num_min()
    {
        return SequenceNumber_t::unknown();
    }

    SequenceNumber_t next_sequence_number() const
    {
        return mp_history->next_sequence_number();
    }

    void reader_data_filter(
            fastdds::rtps::IReaderDataFilter* filter)
    {
        reader_data_filter_ = filter;
    }

    const fastdds::rtps::IReaderDataFilter* reader_data_filter() const
    {
        return reader_data_filter_;
    }

private:

    friend class ReaderProxy;

    RTPSParticipantImpl* participant_;

    WriterHistory* mp_history;

    fastdds::rtps::IReaderDataFilter* reader_data_filter_;

};

} // namespace rtps
} // namespace fastrtps
} // namespace eprosima

#endif // _FASTDDS_RTPS_STATEFULWRITER_H_


text:
define([
  // Libs
  "jquery",
  "use!underscore",
  "use!backbone"
],

function($, _, Backbone) {
  // Put application wide code here

  return {
    // This is useful when developing if you don't want to use a
    // build process every time you change a template.
    //
    // Delete if you are using a different template loading method.
    fetchTemplate: function(path, done) {
      var JST = window.JST = window.JST || {};
      var def = new $.Deferred();

      // Should be an instant synchronous way of getting the template, if it
      // exists in the JST object.
      if (JST[path]) {
        if (_.isFunction(done)) {
          done(JST[path]);
        }

        return def.resolve(JST[path]);
      }

      // Fetch it asynchronously if not available from JST
      $.get(path, function(contents) {
        JST[path] = _.template(contents);

        // Set the global JST cache and return the template
        if (_.isFunction(done)) {
          done(JST[path]);
        }

        // Resolve the template deferred
        def.resolve(JST[path]);
      }, "text");

      // Ensure a normalized return value (Promise)
      return def.promise();
    },

    // Create a custom object with a nested Views object
    module: function(additionalProps) {
      return _.extend({ Views: {} }, additionalProps);
    },

    // Keep active application instances namespaced under an app object.
    app: _.extend({}, Backbone.Events)
  };
});


text:
#ifndef TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_
#define TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_

#include <map>
#include <string>
#include <vector>

#include "talk/media/base/mediaengine.h"
#include "talk/media/webrtc/webrtcvideochannelfactory.h"
#include "talk/media/webrtc/webrtcvideodecoderfactory.h"
#include "talk/media/webrtc/webrtcvideoencoderfactory.h"
#include "webrtc/base/cpumonitor.h"
#include "webrtc/base/criticalsection.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/base/thread_annotations.h"
#include "webrtc/call.h"
#include "webrtc/common_video/interface/i420_video_frame.h"
#include "webrtc/transport.h"
#include "webrtc/video_receive_stream.h"
#include "webrtc/video_renderer.h"
#include "webrtc/video_send_stream.h"

namespace webrtc {
class VideoCaptureModule;
class VideoDecoder;
class VideoEncoder;
class VideoRender;
class VideoSendStreamInput;
class VideoReceiveStream;
}

namespace rtc {
class CpuMonitor;
class Thread;
}  // namespace rtc

namespace cricket {

class VideoCapturer;
class VideoFrame;
class VideoProcessor;
class VideoRenderer;
class VoiceMediaChannel;
class WebRtcDecoderObserver;
class WebRtcEncoderObserver;
class WebRtcLocalStreamInfo;
class WebRtcRenderAdapter;
class WebRtcVideoChannelRecvInfo;
class WebRtcVideoChannelSendInfo;
class WebRtcVoiceEngine;

struct CapturedFrame;
struct Device;

class WebRtcVideoRenderer;

class UnsignalledSsrcHandler {
 public:
  enum Action {
    kDropPacket,
    kDeliverPacket,
  };
  virtual Action OnUnsignalledSsrc(VideoMediaChannel* engine,
                                   uint32_t ssrc) = 0;
};

// TODO(pbos): Remove, use external handlers only.
class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler {
 public:
  DefaultUnsignalledSsrcHandler();
  virtual Action OnUnsignalledSsrc(VideoMediaChannel* engine,
                                   uint32_t ssrc) OVERRIDE;

  VideoRenderer* GetDefaultRenderer() const;
  void SetDefaultRenderer(VideoMediaChannel* channel, VideoRenderer* renderer);

 private:
  uint32_t default_recv_ssrc_;
  VideoRenderer* default_renderer_;
};

// CallFactory, overridden for testing to verify that webrtc::Call is configured
// properly.
class WebRtcCallFactory {
 public:
  virtual ~WebRtcCallFactory();
  virtual webrtc::Call* CreateCall(const webrtc::Call::Config& config);
};

// WebRtcVideoEngine2 is used for the new native WebRTC Video API (webrtc:1667).
class WebRtcVideoEngine2 : public sigslot::has_slots<> {
 public:
  // Creates the WebRtcVideoEngine2 with internal VideoCaptureModule.
  WebRtcVideoEngine2();
  virtual ~WebRtcVideoEngine2();

  // Used for testing to be able to check and use the webrtc::Call config.
  void SetCallFactory(WebRtcCallFactory* call_factory);

  // Basic video engine implementation.
  bool Init(rtc::Thread* worker_thread);
  void Terminate();

  int GetCapabilities();
  bool SetDefaultEncoderConfig(const VideoEncoderConfig& config);

  WebRtcVideoChannel2* CreateChannel(const VideoOptions& options,
                                     VoiceMediaChannel* voice_channel);

  const std::vector<VideoCodec>& codecs() const;
  const std::vector<RtpHeaderExtension>& rtp_header_extensions() const;
  void SetLogging(int min_sev, const char* filter);

  // Set a WebRtcVideoDecoderFactory for external decoding. Video engine does
  // not take the ownership of |decoder_factory|. The caller needs to make sure
  // that |decoder_factory| outlives the video engine.
  void SetExternalDecoderFactory(WebRtcVideoDecoderFactory* decoder_factory);
  // Set a WebRtcVideoEncoderFactory for external encoding. Video engine does
  // not take the ownership of |encoder_factory|. The caller needs to make sure
  // that |encoder_factory| outlives the video engine.
  virtual void SetExternalEncoderFactory(
      WebRtcVideoEncoderFactory* encoder_factory);

  bool EnableTimedRender();
  // This is currently ignored.
  sigslot::repeater2<VideoCapturer*, CaptureState> SignalCaptureStateChange;

  // Set the VoiceEngine for A/V sync. This can only be called before Init.
  bool SetVoiceEngine(WebRtcVoiceEngine* voice_engine);

  bool FindCodec(const VideoCodec& in);
  bool CanSendCodec(const VideoCodec& in,
                    const VideoCodec& current,
                    VideoCodec* out);
  // Check whether the supplied trace should be ignored.
  bool ShouldIgnoreTrace(const std::string& trace);

  VideoFormat GetStartCaptureFormat() const { return default_codec_format_; }

  rtc::CpuMonitor* cpu_monitor() { return cpu_monitor_.get(); }

 private:
  std::vector<VideoCodec> GetSupportedCodecs() const;

  rtc::Thread* worker_thread_;
  WebRtcVoiceEngine* voice_engine_;
  std::vector<VideoCodec> video_codecs_;
  std::vector<RtpHeaderExtension> rtp_header_extensions_;
  VideoFormat default_codec_format_;

  bool initialized_;

  rtc::scoped_ptr<rtc::CpuMonitor> cpu_monitor_;

  WebRtcCallFactory default_call_factory_;
  WebRtcCallFactory* call_factory_;

  WebRtcVideoDecoderFactory* external_decoder_factory_;
  WebRtcVideoEncoderFactory* external_encoder_factory_;
  rtc::scoped_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_;
};

class WebRtcVideoChannel2 : public rtc::MessageHandler,
                            public VideoMediaChannel,
                            public webrtc::newapi::Transport,
                            public webrtc::LoadObserver {
 public:
  WebRtcVideoChannel2(WebRtcCallFactory* call_factory,
                      WebRtcVoiceEngine* voice_engine,
                      VoiceMediaChannel* voice_channel,
                      const VideoOptions& options,
                      WebRtcVideoEncoderFactory* external_encoder_factory,
                      WebRtcVideoDecoderFactory* external_decoder_factory);
  ~WebRtcVideoChannel2();
  bool Init();

  // VideoMediaChannel implementation
  virtual bool SetRecvCodecs(const std::vector<VideoCodec>& codecs) OVERRIDE;
  virtual bool SetSendCodecs(const std::vector<VideoCodec>& codecs) OVERRIDE;
  virtual bool GetSendCodec(VideoCodec* send_codec) OVERRIDE;
  virtual bool SetSendStreamFormat(uint32 ssrc,
                                   const VideoFormat& format) OVERRIDE;
  virtual bool SetRender(bool render) OVERRIDE;
  virtual bool SetSend(bool send) OVERRIDE;

  virtual bool AddSendStream(const StreamParams& sp) OVERRIDE;
  virtual bool RemoveSendStream(uint32 ssrc) OVERRIDE;
  virtual bool AddRecvStream(const StreamParams& sp) OVERRIDE;
  virtual bool RemoveRecvStream(uint32 ssrc) OVERRIDE;
  virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) OVERRIDE;
  virtual bool GetStats(const StatsOptions& options,
                        VideoMediaInfo* info) OVERRIDE;
  virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) OVERRIDE;
  virtual bool SendIntraFrame() OVERRIDE;
  virtual bool RequestIntraFrame() OVERRIDE;

  virtual void OnPacketReceived(rtc::Buffer* packet,
                                const rtc::PacketTime& packet_time)
      OVERRIDE;
  virtual void OnRtcpReceived(rtc::Buffer* packet,
                              const rtc::PacketTime& packet_time)
      OVERRIDE;
  virtual void OnReadyToSend(bool ready) OVERRIDE;
  virtual bool MuteStream(uint32 ssrc, bool mute) OVERRIDE;

  // Set send/receive RTP header extensions. This must be done before creating
  // streams as it only has effect on future streams.
  virtual bool SetRecvRtpHeaderExtensions(
      const std::vector<RtpHeaderExtension>& extensions) OVERRIDE;
  virtual bool SetSendRtpHeaderExtensions(
      const std::vector<RtpHeaderExtension>& extensions) OVERRIDE;
  virtual bool SetMaxSendBandwidth(int bps) OVERRIDE;
  virtual bool SetOptions(const VideoOptions& options) OVERRIDE;
  virtual bool GetOptions(VideoOptions* options) const OVERRIDE {
    *options = options_;
    return true;
  }
  virtual void SetInterface(NetworkInterface* iface) OVERRIDE;
  virtual void UpdateAspectRatio(int ratio_w, int ratio_h) OVERRIDE;

  virtual void OnMessage(rtc::Message* msg) OVERRIDE;

  virtual void OnLoadUpdate(Load load) OVERRIDE;

  // Implemented for VideoMediaChannelTest.
  bool sending() const { return sending_; }
  uint32 GetDefaultSendChannelSsrc() { return default_send_ssrc_; }
  bool GetRenderer(uint32 ssrc, VideoRenderer** renderer);

 private:
  void ConfigureReceiverRtp(webrtc::VideoReceiveStream::Config* config,
                            const StreamParams& sp) const;
  bool CodecIsExternallySupported(const std::string& name) const;

  struct VideoCodecSettings {
    VideoCodecSettings();

    bool operator ==(const VideoCodecSettings& other) const;

    VideoCodec codec;
    webrtc::FecConfig fec;
    int rtx_payload_type;
  };

  // Wrapper for the sender part, this is where the capturer is connected and
  // frames are then converted from cricket frames to webrtc frames.
  class WebRtcVideoSendStream : public sigslot::has_slots<> {
   public:
    WebRtcVideoSendStream(
        webrtc::Call* call,
        WebRtcVideoEncoderFactory* external_encoder_factory,
        const VideoOptions& options,
        const Settable<VideoCodecSettings>& codec_settings,
        const StreamParams& sp,
        const std::vector<webrtc::RtpExtension>& rtp_extensions);

    ~WebRtcVideoSendStream();
    void SetOptions(const VideoOptions& options);
    void SetCodec(const VideoCodecSettings& codec);
    void SetRtpExtensions(
        const std::vector<webrtc::RtpExtension>& rtp_extensions);

    void InputFrame(VideoCapturer* capturer, const VideoFrame* frame);
    bool SetCapturer(VideoCapturer* capturer);
    bool SetVideoFormat(const VideoFormat& format);
    void MuteStream(bool mute);
    bool DisconnectCapturer();

    void Start();
    void Stop();

    VideoSenderInfo GetVideoSenderInfo();
    void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info);

    void OnCpuResolutionRequest(
        CoordinatedVideoAdapter::AdaptRequest adapt_request);

   private:
    // Parameters needed to reconstruct the underlying stream.
    // webrtc::VideoSendStream doesn't support setting a lot of options on the
    // fly, so when those need to be changed we tear down and reconstruct with
    // similar parameters depending on which options changed etc.
    struct VideoSendStreamParameters {
      VideoSendStreamParameters(
          const webrtc::VideoSendStream::Config& config,
          const VideoOptions& options,
          const Settable<VideoCodecSettings>& codec_settings);
      webrtc::VideoSendStream::Config config;
      VideoOptions options;
      Settable<VideoCodecSettings> codec_settings;
      // Sent resolutions + bitrates etc. by the underlying VideoSendStream,
      // typically changes when setting a new resolution or reconfiguring
      // bitrates.
      webrtc::VideoEncoderConfig encoder_config;
    };

    struct AllocatedEncoder {
      AllocatedEncoder(webrtc::VideoEncoder* encoder,
                       webrtc::VideoCodecType type,
                       bool external)
          : encoder(encoder), type(type), external(external) {}
      webrtc::VideoEncoder* encoder;
      webrtc::VideoCodecType type;
      bool external;
    };

    struct Dimensions {
      Dimensions() : width(-1), height(-1), is_screencast(false) {}
      int width;
      int height;
      bool is_screencast;
    };

    union VideoEncoderSettings {
      webrtc::VideoCodecVP8 vp8;
      webrtc::VideoCodecVP9 vp9;
    };

    static std::vector<webrtc::VideoStream> CreateVideoStreams(
        const VideoCodec& codec,
        const VideoOptions& options,
        size_t num_streams);
    static std::vector<webrtc::VideoStream> CreateSimulcastVideoStreams(
        const VideoCodec& codec,
        const VideoOptions& options,
        size_t num_streams);

    void* ConfigureVideoEncoderSettings(const VideoCodec& codec,
                                        const VideoOptions& options)
        EXCLUSIVE_LOCKS_REQUIRED(lock_);

    AllocatedEncoder CreateVideoEncoder(const VideoCodec& codec)
        EXCLUSIVE_LOCKS_REQUIRED(lock_);
    void DestroyVideoEncoder(AllocatedEncoder* encoder)
        EXCLUSIVE_LOCKS_REQUIRED(lock_);
    void SetCodecAndOptions(const VideoCodecSettings& codec,
                            const VideoOptions& options)
        EXCLUSIVE_LOCKS_REQUIRED(lock_);
    void RecreateWebRtcStream() EXCLUSIVE_LOCKS_REQUIRED(lock_);
    webrtc::VideoEncoderConfig CreateVideoEncoderConfig(
        const Dimensions& dimensions,
        const VideoCodec& codec) const EXCLUSIVE_LOCKS_REQUIRED(lock_);
    void SetDimensions(int width, int height, bool is_screencast)
        EXCLUSIVE_LOCKS_REQUIRED(lock_);

    webrtc::Call* const call_;
    WebRtcVideoEncoderFactory* const external_encoder_factory_
        GUARDED_BY(lock_);

    rtc::CriticalSection lock_;
    webrtc::VideoSendStream* stream_ GUARDED_BY(lock_);
    VideoSendStreamParameters parameters_ GUARDED_BY(lock_);
    VideoEncoderSettings encoder_settings_ GUARDED_BY(lock_);
    AllocatedEncoder allocated_encoder_ GUARDED_BY(lock_);
    Dimensions last_dimensions_ GUARDED_BY(lock_);

    VideoCapturer* capturer_ GUARDED_BY(lock_);
    bool sending_ GUARDED_BY(lock_);
    bool muted_ GUARDED_BY(lock_);
    VideoFormat format_ GUARDED_BY(lock_);

    rtc::CriticalSection frame_lock_;
    webrtc::I420VideoFrame video_frame_ GUARDED_BY(frame_lock_);
  };

  // Wrapper for the receiver part, contains configs etc. that are needed to
  // reconstruct the underlying VideoReceiveStream. Also serves as a wrapper
  // between webrtc::VideoRenderer and cricket::VideoRenderer.
  class WebRtcVideoReceiveStream : public webrtc::VideoRenderer {
   public:
    WebRtcVideoReceiveStream(
        webrtc::Call*,
        WebRtcVideoDecoderFactory* external_decoder_factory,
        const webrtc::VideoReceiveStream::Config& config,
        const std::vector<VideoCodecSettings>& recv_codecs);
    ~WebRtcVideoReceiveStream();

    void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs);
    void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions);

    virtual void RenderFrame(const webrtc::I420VideoFrame& frame,
                             int time_to_render_ms) OVERRIDE;

    void SetRenderer(cricket::VideoRenderer* renderer);
    cricket::VideoRenderer* GetRenderer();

    VideoReceiverInfo GetVideoReceiverInfo();

   private:
    struct AllocatedDecoder {
      AllocatedDecoder(webrtc::VideoDecoder* decoder,
                       webrtc::VideoCodecType type,
                       bool external)
          : decoder(decoder), type(type), external(external) {}
      webrtc::VideoDecoder* decoder;
      webrtc::VideoCodecType type;
      bool external;
    };

    void SetSize(int width, int height);
    void RecreateWebRtcStream();

    AllocatedDecoder CreateOrReuseVideoDecoder(
        std::vector<AllocatedDecoder>* old_decoder,
        const VideoCodec& codec);
    void ClearDecoders(std::vector<AllocatedDecoder>* allocated_decoders);

    webrtc::Call* const call_;

    webrtc::VideoReceiveStream* stream_;
    webrtc::VideoReceiveStream::Config config_;

    WebRtcVideoDecoderFactory* const external_decoder_factory_;
    std::vector<AllocatedDecoder> allocated_decoders_;

    rtc::CriticalSection renderer_lock_;
    cricket::VideoRenderer* renderer_ GUARDED_BY(renderer_lock_);
    int last_width_ GUARDED_BY(renderer_lock_);
    int last_height_ GUARDED_BY(renderer_lock_);
  };

  void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine);
  void SetDefaultOptions();

  virtual bool SendRtp(const uint8_t* data, size_t len) OVERRIDE;
  virtual bool SendRtcp(const uint8_t* data, size_t len) OVERRIDE;

  void StartAllSendStreams();
  void StopAllSendStreams();

  static std::vector<VideoCodecSettings> MapCodecs(
      const std::vector<VideoCodec>& codecs);
  std::vector<VideoCodecSettings> FilterSupportedCodecs(
      const std::vector<VideoCodecSettings>& mapped_codecs) const;

  void FillSenderStats(VideoMediaInfo* info);
  void FillReceiverStats(VideoMediaInfo* info);
  void FillBandwidthEstimationStats(const webrtc::Call::Stats& stats,
                                    VideoMediaInfo* info);

  uint32_t rtcp_receiver_report_ssrc_;
  bool sending_;
  rtc::scoped_ptr<webrtc::Call> call_;
  WebRtcCallFactory* call_factory_;

  uint32_t default_send_ssrc_;

  DefaultUnsignalledSsrcHandler default_unsignalled_ssrc_handler_;
  UnsignalledSsrcHandler* const unsignalled_ssrc_handler_;

  rtc::CriticalSection stream_crit_;
  // Using primary-ssrc (first ssrc) as key.
  std::map<uint32, WebRtcVideoSendStream*> send_streams_
      GUARDED_BY(stream_crit_);
  std::map<uint32, WebRtcVideoReceiveStream*> receive_streams_
      GUARDED_BY(stream_crit_);

  Settable<VideoCodecSettings> send_codec_;
  std::vector<webrtc::RtpExtension> send_rtp_extensions_;

  VoiceMediaChannel* const voice_channel_;
  WebRtcVideoEncoderFactory* const external_encoder_factory_;
  WebRtcVideoDecoderFactory* const external_decoder_factory_;
  std::vector<VideoCodecSettings> recv_codecs_;
  std::vector<webrtc::RtpExtension> recv_rtp_extensions_;
  webrtc::Call::Config::BitrateConfig bitrate_config_;
  VideoOptions options_;
};

}  // namespace cricket

#endif  // TALK_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_


text:
    <title>HTML text styles</title>

  <form>
  Back to start page

Some form elements

Textarea

  <textarea cols="30" rows="5">
  Hello GNU Classpath world. This text should show up in a text area
  that has a size of 30 columns and 5 rows
  </textarea>

Input fields

  <input type="text" value="This is a normal textfield">
  <input type="password" value="secret password">

Buttons

  <input type="submit"></input>
  <input type="reset"></input>
  <input type="button" value="Some button"></input>

Checkboxes and Radiobuttons

  <input type="checkbox" name="2">Check this!</input>
  <input type="checkbox" name="2">Or this</input>

  <input type="radio" name="1">A radio button</input>
  <input type="radio" name="1">Another radio</input>

Select lists and combo boxes

  <select>
    <option>Value1</option>
    <option>Value2</option>
    <option>Value3</option>
    <option label="Labeled value 4">Value4</option>
    <option>Value5</option>
    <option>Value6</option>
  </select>

  <select size="3">
    <option>Value1</option>
    <option>Value2</option>
    <option>Value3</option>
    <option label="Labeled value 4">Value4</option>
    <option>Value5</option>
    <option>Value6</option>
  </select>

  </form>


text:
<!DOCTYPE mapper
	PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
	"http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="TbSysCalendarNote">

	<resultMap type="com.netsteadfast.greenstep.po.hbm.TbSysCalendarNote" id="baseResultMap">
		<id column="OID" property="oid"/>
		<result column="ACCOUNT" property="account"/>
		<result column="CALENDAR_ID" property="calendarId"/>
		<result column="TITLE" property="title"/>
		<result column="NOTE" property="note"/>
		<result column="DATE" property="date"/>
		<result column="TIME" property="time"/>
		<result column="ALERT" property="alert"/>
		<result column="CONTACT" property="contact"/>
		<result column="CUSERID" property="cuserid"/>
		<result column="CDATE" property="cdate"/>
		<result column="UUSERID" property="uuserid"/>
		<result column="UDATE" property="udate"/>
	</resultMap>

	<select id="selectByParams" resultMap="baseResultMap" >
		select * from tb_sys_calendar_note where 1=1
		<if test="oid != null">
			AND OID = #{oid}
		</if>
		<if test="account != null">
			AND ACCOUNT = #{account}
		</if>
		<if test="calendarId != null">
			AND CALENDAR_ID = #{calendarId}
		</if>
		<if test="date != null">
			AND DATE = #{date}
		</if>
	</select>

	<select id="selectByValue" resultMap="baseResultMap" >
		select * from tb_sys_calendar_note where 1=1
		<if test="oid != null">
			AND OID = #{oid}
		</if>
		<if test="account != null">
			AND ACCOUNT = #{account}
		</if>
		<if test="calendarId != null">
			AND CALENDAR_ID = #{calendarId}
		</if>
		<if test="date != null">
			AND DATE = #{date}
		</if>
	</select>

</mapper>


text:
{% extends "base.html" %}
{% set active_page = "stats" %}
{% set page_title = "Stats - Lookup mining stats for an address" %}
{% block body %}

{{ _("Invalid or unsupported address!") }}

{{ _("The address you entered is either not valid or is not a currency type
    we pay out") }}

  {% if allowed_currencies %}

{{ _("Currently supported payout currencies include:") }}

  {% for abv in allowed_currencies %}
    {{ abv.name }}

  {% endfor %}
  {% endif %}

{% endblock %}


text:
var App = require('app');

var stringUtils = require('utils/string_utils');

App.HostStackVersion = DS.Model.extend({
  stack: DS.attr('string'),
  version: DS.attr('string'),
  repo: DS.belongsTo('App.Repository'),
  repoVersion: DS.attr('string'),
  displayName: DS.attr('string'),
  isVisible: DS.attr('boolean', {defaultValue: true}),
  /**
   * possible property value defined at App.HostStackVersion.statusDefinition
   * @type {string}
   */
  status: DS.attr('string'),
  host: DS.belongsTo('App.Host'),
  hostName: DS.attr('string'),

  /**
   * @type {boolean}
   */
  isCurrent: Em.computed.equal('status', 'CURRENT'),

  /**
   * @type {boolean}
   */
  isInstalling: Em.computed.equal('status', 'INSTALLING'),

  /**
   * @type {boolean}
   */
  isOutOfSync: Em.computed.equal('status', 'OUT_OF_SYNC'),
  /**
   * @type {string}
   */
  displayStatus: function() {
    return App.HostStackVersion.formatStatus(this.get('status'));
  }.property('status'),

  /**
   * @type {boolean}
   */
  installEnabled: Em.computed.existsIn('status', ['OUT_OF_SYNC', 'INSTALL_FAILED']),

  installDisabled: function(){
    return !this.get('installEnabled') || App.router.get('wizardWatcherController.isNonWizardUser');
  }.property('installEnabled', 'App.routerwizardWatcherController.isNonWizardUser')
});

App.HostStackVersion.FIXTURES = [];

/**
 * definition of possible statuses of Stack Version
 * @type {Array}
 */
App.HostStackVersion.statusDefinition = [
  "INSTALLED",
  "INSTALLING",
  "INSTALL_FAILED",
  "OUT_OF_SYNC",
  "CURRENT",
  "UPGRADING",
  "UPGRADE_FAILED"
];

/**
 * translate status to label
 * @param status
 * @return {string}
 */
App.HostStackVersion.formatStatus = function (status) {
  return App.HostStackVersion.statusDefinition.contains(status) ?
    Em.I18n.t('hosts.host.stackVersions.status.' + status.toLowerCase()) :
    stringUtils.upperUnderscoreToText(status);
};


text:
package org.roaringbitmap.circuits.topk;

import org.roaringbitmap.RoaringBitmap;

public interface TopK {

    public RoaringBitmap top(int k, int universe, RoaringBitmap... bsi);

    public String name();

}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.42000
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace SilDev.Properties {
    using System;

    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class ExceptionMessages {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal ExceptionMessages() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SilDev.Properties.ExceptionMessages", typeof(ExceptionMessages).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Argument is invalid..
        /// </summary>
        internal static string ArgumentInvalid {
            get {
                return ResourceManager.GetString("ArgumentInvalid", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Argument '{0}' is invalid..
        /// </summary>
        internal static string ArgumentInvalidParam {
            get {
                return ResourceManager.GetString("ArgumentInvalidParam", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The required assembly could not be found..
        /// </summary>
        internal static string AssemblyNotFound {
            get {
                return ResourceManager.GetString("AssemblyNotFound", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Async file download is already busy, multiple calls are not allowed..
        /// </summary>
        internal static string AsyncDownloadIsBusy {
            get {
                return ResourceManager.GetString("AsyncDownloadIsBusy", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The path contains invalid characters..
        /// </summary>
        internal static string BadCharsInPath {
            get {
                return ResourceManager.GetString("BadCharsInPath", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Reading has been failed. - Bytes Read: .
        /// </summary>
        internal static string BytesReadFailed {
            get {
                return ResourceManager.GetString("BytesReadFailed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Writing has been failed. - Bytes Written: .
        /// </summary>
        internal static string BytesWriteFailed {
            get {
                return ResourceManager.GetString("BytesWriteFailed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The input stream contains invalid characters..
        /// </summary>
        internal static string CharsInStreamAreInvalid {
            get {
                return ResourceManager.GetString("CharsInStreamAreInvalid", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The path cannot contain several consecutive separators. - Path: .
        /// </summary>
        internal static string ConsecutiveSeparatorsInPath {
            get {
                return ResourceManager.GetString("ConsecutiveSeparatorsInPath", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The destination path is invalid..
        /// </summary>
        internal static string DestPathNotValid {
            get {
                return ResourceManager.GetString("DestPathNotValid", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The directory name is longer than 248 characters. - Path: .
        /// </summary>
        internal static string DirLengthIsTooLong {
            get {
                return ResourceManager.GetString("DirLengthIsTooLong", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The following character code is invalid: .
        /// </summary>
        internal static string FollowingCharCodeIsInvalid {
            get {
                return ResourceManager.GetString("FollowingCharCodeIsInvalid", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The value is not defined.
        ///   Section: '{1}'
        ///   Key: '{0}'
        ///   FileOrContent: '{2}'.
        /// </summary>
        internal static string IniValueNotFound {
            get {
                return ResourceManager.GetString("IniValueNotFound", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The path does not contain a valid drive. - Path: .
        /// </summary>
        internal static string InvalidDriveInPath {
            get {
                return ResourceManager.GetString("InvalidDriveInPath", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The last block cannot be a single byte..
        /// </summary>
        internal static string LastBlockIsSingleByte {
            get {
                return ResourceManager.GetString("LastBlockIsSingleByte", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to access to the specified area of the memory..
        /// </summary>
        internal static string MemoryAccess {
            get {
                return ResourceManager.GetString("MemoryAccess", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Multiple calls are not supported..
        /// </summary>
        internal static string MultipleCalls {
            get {
                return ResourceManager.GetString("MultipleCalls", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to No network interfaces available..
        /// </summary>
        internal static string NetworkInterfacesNotFound {
            get {
                return ResourceManager.GetString("NetworkInterfacesNotFound", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The new principal name cannot be longer than the original one..
        /// </summary>
        internal static string NewPrincipalNameTooLong {
            get {
                return ResourceManager.GetString("NewPrincipalNameTooLong", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The path does not contain any drive. - Path: .
        /// </summary>
        internal static string NoDriveInPath {
            get {
                return ResourceManager.GetString("NoDriveInPath", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to create a new process with the duplicated token..
        /// </summary>
        internal static string NoProcessWithDuplicatedToken {
            get {
                return ResourceManager.GetString("NoProcessWithDuplicatedToken", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The "{0}" prefix is not supported. - Path: {1}.
        /// </summary>
        internal static string PathHasInvalidPrefix {
            get {
                return ResourceManager.GetString("PathHasInvalidPrefix", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The path does not contain a valid separator. - Path: .
        /// </summary>
        internal static string PathHasInvalidSeparators {
            get {
                return ResourceManager.GetString("PathHasInvalidSeparators", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The path does not contain any separator. - Path: .
        /// </summary>
        internal static string PathHasNoSeparators {
            get {
                return ResourceManager.GetString("PathHasNoSeparators", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The specified path is longer than 260 characters. - Path: .
        /// </summary>
        internal static string PathLengthIsTooLong {
            get {
                return ResourceManager.GetString("PathLengthIsTooLong", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The path length is lower than 3 characters. - Path: .
        /// </summary>
        internal static string PathLengthIsTooLow {
            get {
                return ResourceManager.GetString("PathLengthIsTooLow", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to find the target from the specified path..
        /// </summary>
        internal static string PathNotFound {
            get {
                return ResourceManager.GetString("PathNotFound", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Target '{0}' could not be found..
        /// </summary>
        internal static string PathNotFoundTarget {
            get {
                return ResourceManager.GetString("PathNotFoundTarget", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to A segment of the path is longer than 255 characters. - Path: .
        /// </summary>
        internal static string PathSegmentLengthIsTooLong {
            get {
                return ResourceManager.GetString("PathSegmentLengthIsTooLong", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Privilege value could not be retrieved..
        /// </summary>
        internal static string PrivilegeValueAccess {
            get {
                return ResourceManager.GetString("PrivilegeValueAccess", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to The pseudo handle could not be retrieved..
        /// </summary>
        internal static string PseudoHandleNotFound {
            get {
                return ResourceManager.GetString("PseudoHandleNotFound", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to open the token for the pseudo handle..
        /// </summary>
        internal static string PseudoHandleTokenAccess {
            get {
                return ResourceManager.GetString("PseudoHandleTokenAccess", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Collection is read-only..
        /// </summary>
        internal static string ReadOnlyCollection {
            get {
                return ResourceManager.GetString("ReadOnlyCollection", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Could not connect to service control manager..
        /// </summary>
        internal static string SCManagerConnectionCanceled {
            get {
                return ResourceManager.GetString("SCManagerConnectionCanceled", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Sequence contains no elements..
        /// </summary>
        internal static string SequenceIsEmpty {
            get {
                return ResourceManager.GetString("SequenceIsEmpty", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Service could not be accessed..
        /// </summary>
        internal static string ServiceAccessFailed {
            get {
                return ResourceManager.GetString("ServiceAccessFailed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Failed to install service..
        /// </summary>
        internal static string ServiceInstallationCanceled {
            get {
                return ResourceManager.GetString("ServiceInstallationCanceled", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Service not installed..
        /// </summary>
        internal static string ServiceNotFound {
            get {
                return ResourceManager.GetString("ServiceNotFound", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Service could not be started..
        /// </summary>
        internal static string ServiceStartCanceled {
            get {
                return ResourceManager.GetString("ServiceStartCanceled", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Service status could not be queried..
        /// </summary>
        internal static string ServiceStatusQueryFailed {
            get {
                return ResourceManager.GetString("ServiceStatusQueryFailed", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Service could not be deleted. - Error: .
        /// </summary>
        internal static string ServiceUninstallCanceled {
            get {
                return ResourceManager.GetString("ServiceUninstallCanceled", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to identifier the shell process..
        /// </summary>
        internal static string ShellPidNotFound {
            get {
                return ResourceManager.GetString("ShellPidNotFound", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to open the shell process object..
        /// </summary>
        internal static string ShellProcessAccess {
            get {
                return ResourceManager.GetString("ShellProcessAccess", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to open the shell process token..
        /// </summary>
        internal static string ShellProcessTokenAccess {
            get {
                return ResourceManager.GetString("ShellProcessTokenAccess", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to duplicate the shell process token..
        /// </summary>
        internal static string ShellProcessTokenDuplication {
            get {
                return ResourceManager.GetString("ShellProcessTokenDuplication", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to System restoring is disabled..
        /// </summary>
        internal static string SystemRestoringIsDisabled {
            get {
                return ResourceManager.GetString("SystemRestoringIsDisabled", resourceCulture);
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to Unable to adjust the token privileges..
        /// </summary>
        internal static string TokenPrivilegesAdjustment {
            get {
                return ResourceManager.GetString("TokenPrivilegesAdjustment", resourceCulture);
            }
        }
    }
}


text:
from msrest.serialization import Model

class EventData(Model):
    """The Azure event log entries are of type EventData.

    :param authorization:
    :type authorization: :class:`SenderAuthorization
     <azure.monitor.models.SenderAuthorization>`
    :param claims: key value pairs to identify ARM permissions.
    :type claims: dict
    :param caller: the email address of the user who has performed the
     operation, the UPN claim or SPN claim based on availability.
    :type caller: str
    :param description: the description of the event.
    :type description: str
    :param id: the Id of this event as required by ARM for RBAC. It contains
     the EventDataID and a timestamp information.
    :type id: str
    :param event_data_id: the event data Id. This is a unique identifier for
     an event.
    :type event_data_id: str
    :param correlation_id: the correlation Id, usually a GUID in the string
     format. The correlation Id is shared among the events that belong to the
     same uber operation.
    :type correlation_id: str
    :param event_name: the event name. This value should not be confused with
     OperationName. For practical purposes, OperationName might be more
     appealing to end users.
    :type event_name: :class:`LocalizableString
     <azure.monitor.models.LocalizableString>`
    :param category: the event category.
    :type category: :class:`LocalizableString
     <azure.monitor.models.LocalizableString>`
    :param http_request: the HTTP request info. Usually includes the
     'clientRequestId', 'clientIpAddress' (IP address of the user who initiated
     the event) and 'method' (HTTP method e.g. PUT).
    :type http_request: :class:`HttpRequestInfo
     <azure.monitor.models.HttpRequestInfo>`
    :param level: the event level. Possible values include: 'Critical',
     'Error', 'Warning', 'Informational', 'Verbose'
    :type level: str or :class:`EventLevel <azure.monitor.models.EventLevel>`
    :param resource_group_name: the resource group name of the impacted
     resource.
    :type resource_group_name: str
    :param resource_provider_name: the resource provider name of the impacted
     resource.
    :type resource_provider_name: :class:`LocalizableString
     <azure.monitor.models.LocalizableString>`
    :param resource_id: the resource uri that uniquely identifies the resource
     that caused this event.
    :type resource_id: str
    :param resource_type: the resource type
    :type resource_type: :class:`LocalizableString
     <azure.monitor.models.LocalizableString>`
    :param operation_id: It is usually a GUID shared among the events
     corresponding to single operation. This value should not be confused with
     EventName.
    :type operation_id: str
    :param operation_name: the operation name.
    :type operation_name: :class:`LocalizableString
     <azure.monitor.models.LocalizableString>`
    :param properties: the set of <Key, Value> pairs (usually a
     Dictionary<String, String>) that includes details about the event.
    :type properties: dict
    :param status: a string describing the status of the operation. Some
     typical values are: Started, In progress, Succeeded, Failed, Resolved.
    :type status: :class:`LocalizableString
     <azure.monitor.models.LocalizableString>`
    :param sub_status: the event sub status. Most of the time, when included,
     this captures the HTTP status code of the REST call. Common values are: OK
     (HTTP Status Code: 200), Created (HTTP Status Code: 201), Accepted (HTTP
     Status Code: 202), No Content (HTTP Status Code: 204), Bad Request(HTTP
     Status Code: 400), Not Found (HTTP Status Code: 404), Conflict (HTTP
     Status Code: 409), Internal Server Error (HTTP Status Code: 500), Service
     Unavailable (HTTP Status Code:503), Gateway Timeout (HTTP Status Code:
     504)
    :type sub_status: :class:`LocalizableString
     <azure.monitor.models.LocalizableString>`
    :param event_timestamp: the timestamp of when the event was generated by
     the Azure service processing the request corresponding the event. It in
     ISO 8601 format.
    :type event_timestamp: datetime
    :param submission_timestamp: the timestamp of when the event became
     available for querying via this API. It is in ISO 8601 format. This value
     should not be confused eventTimestamp. As there might be a delay between
     the occurence time of the event, and the time that the event is submitted
     to the Azure logging infrastructure.
    :type submission_timestamp: datetime
    :param subscription_id: the Azure subscription Id usually a GUID.
    :type subscription_id: str
    :param tenant_id: the Azure tenant Id
    :type tenant_id: str
    """

    _validation = {
        'level': {'required': True},
        'event_timestamp': {'required': True},
        'submission_timestamp': {'required': True},
    }

    _attribute_map = {
        'authorization': {'key': 'authorization', 'type': 'SenderAuthorization'},
        'claims': {'key': 'claims', 'type': '{str}'},
        'caller': {'key': 'caller', 'type': 'str'},
        'description': {'key': 'description', 'type': 'str'},
        'id': {'key': 'id', 'type': 'str'},
        'event_data_id': {'key': 'eventDataId', 'type': 'str'},
        'correlation_id': {'key': 'correlationId', 'type': 'str'},
        'event_name': {'key': 'eventName', 'type': 'LocalizableString'},
        'category': {'key': 'category', 'type': 'LocalizableString'},
        'http_request': {'key': 'httpRequest', 'type': 'HttpRequestInfo'},
        'level': {'key': 'level', 'type': 'EventLevel'},
        'resource_group_name': {'key': 'resourceGroupName', 'type': 'str'},
        'resource_provider_name': {'key': 'resourceProviderName', 'type': 'LocalizableString'},
        'resource_id': {'key': 'resourceId', 'type': 'str'},
        'resource_type': {'key': 'resourceType', 'type': 'LocalizableString'},
        'operation_id': {'key': 'operationId', 'type': 'str'},
        'operation_name': {'key': 'operationName', 'type': 'LocalizableString'},
        'properties': {'key': 'properties', 'type': '{str}'},
        'status': {'key': 'status', 'type': 'LocalizableString'},
        'sub_status': {'key': 'subStatus', 'type': 'LocalizableString'},
        'event_timestamp': {'key': 'eventTimestamp', 'type': 'iso-8601'},
        'submission_timestamp': {'key': 'submissionTimestamp', 'type': 'iso-8601'},
        'subscription_id': {'key': 'subscriptionId', 'type': 'str'},
        'tenant_id': {'key': 'tenantId', 'type': 'str'},
    }

    def __init__(self, level, event_timestamp, submission_timestamp, authorization=None, claims=None, caller=None, description=None, id=None, event_data_id=None, correlation_id=None, event_name=None, category=None, http_request=None, resource_group_name=None, resource_provider_name=None, resource_id=None, resource_type=None, operation_id=None, operation_name=None, properties=None, status=None, sub_status=None, subscription_id=None, tenant_id=None):
        self.authorization = authorization
        self.claims = claims
        self.caller = caller
        self.description = description
        self.id = id
        self.event_data_id = event_data_id
        self.correlation_id = correlation_id
        self.event_name = event_name
        self.category = category
        self.http_request = http_request
        self.level = level
        self.resource_group_name = resource_group_name
        self.resource_provider_name = resource_provider_name
        self.resource_id = resource_id
        self.resource_type = resource_type
        self.operation_id = operation_id
        self.operation_name = operation_name
        self.properties = properties
        self.status = status
        self.sub_status = sub_status
        self.event_timestamp = event_timestamp
        self.submission_timestamp = submission_timestamp
        self.subscription_id = subscription_id
        self.tenant_id = tenant_id


text:
/* jshint strict: false, unused: true */
define(['dojo/_base/declare', 'dojo/Stateful', 'dojo/_base/lang', '../../../core/array', '../../utils/domUtils', '../../utils/setClass'], function(declare, Stateful, lang, array, domUtils, setClass) {
	setClass = setClass.default;
	var ControlStateManager = (declare([Stateful],
	{
		filterBuilder: null,
		/*
		 * Possible values:
		 * "start": When we just created the control. At this point we should select the
		 * summary
		 * "selectedSummary": When we selected the summary (i.e.: If the filter is going
		 * to be about the value, the average, the count or any other aggregating
		 * function). At this point we should select the Field
		 * "selectedField": When we selected the field we are going to build our
		 * expression about. At this point we should select the operator.
		 * "selectedOperator": When we selected the operator. At this point we should
		 * select the value.
		 * "selectedValue": When we selected the value. At this point our expression
		 * should be complete.
		 */
		state: 'start',
		postCreate: function()
		{
			this.watch('state', lang.hitch(this, this.stateChanged));
			var selfStateManager = this;
			var filterBuilder = selfStateManager.get('filterBuilder');
			filterBuilder.on('stateChanged', function(data)
			{
				selfStateManager.set('state', data.state);
			});

			//At this point I'm propagating all events to the main FilterBuilder for it to
			// handle them. There is no point in processing them on a child
			filterBuilder.on('undo', function(data)
			{
				if (filterBuilder.get('parent'))
				{
					filterBuilder.get('parent').emit('undo', data);
				}
				else
				{
					selfStateManager.handleUndo(data);
				}
			});
			filterBuilder.on('redo', function(data)
			{
				if (filterBuilder.get('parent'))
				{
					filterBuilder.get('parent').emit('redo', data);
				}
				else
				{
					selfStateManager.handleRedo(data);
				}
			});
			filterBuilder.on('expressionChanged', function(data)
			{
				if (filterBuilder.get('parent'))
				{
					filterBuilder.get('parent').emit('expressionChanged', data);
				}
				else
				{
					selfStateManager.handleExpressionChange(data);
				}
			});
		},
		handleExpressionChange: function( /*data*/ )
		{
			if (!this.preventUpdatingUndoQueues)
			{
				var item = this.filterBuilder.get('expression').clone();
				this.undoQueue.push(item);
				while (this.redoQueue.length)
				{
					this.redoQueue.pop();
				}
				this.updateUndoButtonState();
			}
		},
		preventUndo: function()
		{
			this.preventUpdatingUndoQueues += 1;
		},
		resumeUndo: function()
		{
			this.preventUpdatingUndoQueues -= 1;
		},
		resetUndo: function(expression)
		{
			while (this.undoQueue.length)
			{
				this.undoQueue.pop();
			}
			while (this.redoQueue.length)
			{
				this.redoQueue.pop();
			}
			this.undoQueue.push(expression.clone());
			this.updateUndoButtonState();
		},
		preventState: function()
		{
			this.preventStateChanges += 1;
		},
		resumeState: function()
		{
			this.preventStateChanges -= 1;
		},
		preventStateChanges: 0,
		preventUpdatingUndoQueues: 0,
		undoQueue: [],
		redoQueue: [],
		updateUndoButtonState: function()
		{
			this.filterBuilder.get('toolbar').get('undoButton').set('disabled', (this.undoQueue.length <= 1));
			this.filterBuilder.get('toolbar').get('redoButton').set('disabled', (this.redoQueue.length === 0));
		},
		handleUndo: function( /*data*/ )
		{
			var inQueue = this.undoQueue,
				outQueue = this.redoQueue,
				item, previous;
			if (inQueue.length)
			{
				this.preventUndo();
				item = inQueue.pop();
				//the current expression
				outQueue.push(item);
				previous = inQueue.pop();
				inQueue.push(previous);
				//Push it back again
				this.filterBuilder.set('expression', previous, true /* preventReset Undo State */ );
				this.updateUndoButtonState();
				this.resumeUndo();
			}
		},
		handleRedo: function( /*data*/ )
		{
			var inQueue = this.redoQueue,
				outQueue = this.undoQueue,
				item;
			if (inQueue.length)
			{
				this.preventUndo();
				item = inQueue.pop();
				this.filterBuilder.set('expression', item, true /* preventReset Undo State */ );
				outQueue.push(item);
				this.updateUndoButtonState();
				this.resumeUndo();
			}
		},
		stateHandler:
		{
			'start': function(controls)
			{
				controls[0].set('value', null);
				if (domUtils.isHidden(controls[0].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[0].domNode.parentElement.parentElement);
				}
				if (!domUtils.isHidden(controls[1].domNode.parentElement.parentElement))
				{
					domUtils.hide(controls[1].domNode.parentElement.parentElement);
				}
				if (!domUtils.isHidden(controls[2].domNode.parentElement.parentElement))
				{
					domUtils.hide(controls[2].domNode.parentElement.parentElement);
				}
				if (!domUtils.isHidden(controls[3].domNode.parentElement.parentElement))
				{
					domUtils.hide(controls[3].domNode.parentElement.parentElement);
				}
			},
			'selectedSummary': function(controls)
			{
				if (!controls[1].get('value'))
				{
					controls[2].set('value', null);
					controls[3].set('value', null);
				}
				if (domUtils.isHidden(controls[0].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[0].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[1].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[1].domNode.parentElement.parentElement);
				}
				if (!domUtils.isHidden(controls[2].domNode.parentElement.parentElement))
				{
					domUtils.hide(controls[2].domNode.parentElement.parentElement);
				}
				if (!domUtils.isHidden(controls[3].domNode.parentElement.parentElement))
				{
					domUtils.hide(controls[3].domNode.parentElement.parentElement);
				}
			},
			'selectedField': function(controls)
			{
				if (!controls[2].get('value'))
				{
					controls[3].set('value', null);
				}
				if (domUtils.isHidden(controls[0].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[0].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[1].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[1].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[2].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[2].domNode.parentElement.parentElement);
				}
				if (!domUtils.isHidden(controls[3].domNode.parentElement.parentElement))
				{
					domUtils.hide(controls[3].domNode.parentElement.parentElement);
				}
			},
			'selectedOperator': function(controls)
			{
				if (domUtils.isHidden(controls[0].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[0].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[1].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[1].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[2].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[2].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[3].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[3].domNode.parentElement.parentElement);
				}
			},
			'selectedValue': function(controls, refreshValue)
			{
				if (domUtils.isHidden(controls[0].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[0].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[1].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[1].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[2].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[2].domNode.parentElement.parentElement);
				}
				if (domUtils.isHidden(controls[3].domNode.parentElement.parentElement))
				{
					domUtils.show(controls[3].domNode.parentElement.parentElement);
				}
				if (refreshValue)
				{
					controls[3].set('value', controls[3].get('value'));
				}
			}
		},
		stateChanged: function(name, oldValue, newValue)
		{
			var filter = this.get('filterBuilder'),
				expression = filter.get('expression'),
				controls = [],
				refreshValue = false;

			if ((!this.preventStateChanges) && (expression.get('operator') !== 'and') && (expression.get('operator') !== 'or'))
			{

				if ((newValue === 'start') && (filter.get('selectedSummarySelect').get('value')))
				{
					newValue = 'selectedSummary';
				}

				if ((newValue === 'selectedSummary') && (filter.get('selectedFieldSelect').get('value')))
				{
					newValue = 'selectedField';
				}

				if ((newValue === 'selectedField') && (filter.get('selectedOperatorSelect').get('value')))
				{
					newValue = 'selectedOperator';
				}

				if ((newValue === 'selectedOperator') && (filter.get('selectedValueSelect').get('value') !== null))
				{
					newValue = 'selectedValue';
					if (filter.config && filter.config.keepValuesWhileChangingFields)
					{
						refreshValue = true;
					}
				}

				controls.push(filter.get('selectedSummarySelect'));
				controls.push(filter.get('selectedFieldSelect'));
				controls.push(filter.get('selectedOperatorSelect'));
				controls.push(filter.get('selectedValueSelect'));

				if (array.some(controls, function(item)
				{
					return !item.domNode || !item.domNode.parentElement;
				}))
				{
					return;
				}

				if (this.stateHandler[newValue])
				{
					this.stateHandler[newValue](controls, refreshValue);
				}
				else
				{
					throw new Error('Invalid state: \'' + newValue + '\'');
				}

				setClass(filter.domNode, '!state-' + oldValue);
				setClass(filter.domNode, 'state-' + newValue);
			}
		}
	}));
	return ControlStateManager;
});


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <title></title>
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt"
        crossorigin="anonymous">
    <link rel="stylesheet" type="text/css" href="../css/projects.css" />

        Projects

                        project_name
                        description

                        project_name
                        description

                        project_name
                        description

                        project_name
                        description


text:
require_relative "../../files/chef-gem/build-chef-gem/gem-install-software-def"
BuildChefGem::GemInstallSoftwareDef.define(self, __FILE__)

license "MIT"
license_file "https://github.com/flavorjones/mini_portile/blob/master/LICENSE.txt"
skip_transitive_dependency_licensing true


text:
# PostCSS ScopeSelector

[PostCSS] plugin to prefix selector with a scope if matched selector exists. Current main use is to prefix `:hover`
selectors with [modernizr's](http://modernizr.com/) `.no-touchevents` class to prevent hover effects from affecting
touch devices.

[PostCSS]: https://github.com/postcss/postcss

```css
/* Input example */
.foo:hover {}
```

```css
/* Output example */
.no-touchevents .foo:hover {}
```

## Usage

```js
var gulp = require('gulp');
var postcss = require('gulp-postcss');
var scopeSelector = require('postcss-scope-selector');

gulp.task('css', function() {
    var prefix = '.no-touchevents';
    var selector = ':hover';

    return gulp.src('./styles.css')
        .pipe( postcss([ scopeSelector(prefix, selector) ]) )
        .pipe(gulp.dest('./'));
});
```

See [PostCSS] docs for examples for your environment.


text:
import Settings from '../../models/settings';

import * as weboob from '../../lib/sources/weboob';
import Emailer from '../../lib/emailer';
import { WEBOOB_NOT_INSTALLED } from '../../shared/errors.json';

import { KError, asyncErr, setupTranslator, checkWeboobMinimalVersion } from '../../helpers';

function postSave(key, value) {
    switch (key) {
        case 'email-recipient':
            Emailer.forceReinit(value);
            break;
        case 'locale':
            setupTranslator(value);
            break;
        default:
            break;
    }
}

export async function save(req, res) {
    try {
        let pair = req.body;

        if (typeof pair.key === 'undefined') {
            throw new KError('Missing key when saving a setting', 400);
        }
        if (typeof pair.value === 'undefined') {
            throw new KError('Missing value when saving a setting', 400);
        }

        let { id: userId } = req.user;
        await Settings.updateByKey(userId, pair.key, pair.value);
        postSave(pair.key, pair.value);

        res.status(200).end();
    } catch (err) {
        return asyncErr(res, err, 'when saving a setting');
    }
}

export async function getWeboobVersion(req, res) {
    try {
        const version = await weboob.getVersion(/* force = */ true);
        if (version <= 0) {
            throw new KError('cannot get weboob version', 500, WEBOOB_NOT_INSTALLED);
        }
        res.json({
            data: {
                version,
                isInstalled: checkWeboobMinimalVersion(version)
            }
        });
    } catch (err) {
        return asyncErr(res, err, 'when getting weboob version');
    }
}

export async function updateWeboob(req, res) {
    try {
        await weboob.updateWeboobModules();
        res.status(200).end();
    } catch (err) {
        return asyncErr(res, err, 'when updating weboob');
    }
}

export async function testEmail(req, res) {
    try {
        let { email } = req.body;
        if (!email) {
            throw new KError('Missing email recipient address when sending a test email', 400);
        }
        await Emailer.sendTestEmail(email);
        res.status(200).end();
    } catch (err) {
        return asyncErr(res, err, 'when trying to send an email');
    }
}

export function isDemoForced() {
    return process.kresus.forceDemoMode === true;
}

export async function isDemoEnabled(userId) {
    return isDemoForced() || (await Settings.findOrCreateDefaultBooleanValue(userId, 'demo-mode'));
}


text:
package service

import (
	"context"
	"sort"
	"strings"
	"sync"
	"time"

	"go-common/app/interface/main/web/model"
	resmdl "go-common/app/service/main/resource/model"
	"go-common/library/log"
)

const (
	_iconFixType = "fix"
)

// IndexIcon get index icons
func (s *Service) IndexIcon() (res *model.IndexIcon) {
	return s.indexIcon
}

func fmtIndexIcon(icons []*resmdl.IndexIcon) {
	for _, v := range icons {
		v.Icon = strings.Replace(v.Icon, "http://", "//", 1)
	}
}

func (s *Service) randomIndexIcon(icons []*resmdl.IndexIcon) (icon *model.IndexIcon) {
	var (
		item          *resmdl.IndexIcon
		total, weight int
	)
	length := len(icons)
	if length == 0 {
		return new(model.IndexIcon)
	}
	for _, v := range icons {
		if v.Weight == 0 {
			total++
		} else {
			total += v.Weight
		}
	}
	if total == length {
		item = icons[s.r.Intn(length)]
		return &model.IndexIcon{ID: item.ID, Title: item.Title, Links: item.Links, Icon: item.Icon, Weight: item.Weight}
	}
	randWeight := s.r.Intn(total)
	for _, v := range icons {
		if v.Weight == 0 {
			weight++
		} else {
			weight += v.Weight
		}
		if weight > randWeight {
			item = v
			break
		}
	}
	return &model.IndexIcon{ID: item.ID, Title: item.Title, Links: item.Links, Icon: item.Icon, Weight: item.Weight}
}

func (s *Service) indexIconproc() {
	var (
		data  map[string][]*resmdl.IndexIcon
		icons []*resmdl.IndexIcon
		ok    bool
		err   error
		mutex = sync.RWMutex{}
	)
	go func() {
		for {
			if data, err = s.res.IndexIcon(context.Background()); err != nil {
				log.Error("s.res.IndexIcon error(%v)", err)
				time.Sleep(time.Second)
				continue
			}
			mutex.Lock()
			icons, ok = data[_iconFixType]
			mutex.Unlock()
			if ok {
				if len(icons) == 0 {
					log.Error("s.res.IndexIcon data error")
					time.Sleep(time.Second)
					continue
				} else {
					sort.Slice(icons, func(i, j int) bool { return icons[i].Weight > icons[j].Weight })
					fmtIndexIcon(icons)
				}
			} else {
				log.Error("s.res.IndexIcon data error")
				time.Sleep(time.Second)
				continue
			}
			time.Sleep(time.Duration(s.c.WEB.PullOnlineInterval))
		}
	}()
	for {
		mutex.RLock()
		tempIcons := make([]*resmdl.IndexIcon, len(icons))
		copy(tempIcons, icons)
		mutex.RUnlock()
		s.indexIcon = s.randomIndexIcon(tempIcons)
		time.Sleep(500 * time.Millisecond)
	}
}


text:
package json.InsertObservationClasses;

import javax.annotation.Generated;

@Generated("org.jsonschema2pojo")
public class RelatedFeature {

    public String Role;
    public String Target;

}


text:
require 'gaql'
require 'gaql/schema'

module Gaql
  module Language
    class ReportQuery < Query
      def initialize(values={}, defaults={})
        super
        @options[:fields] = values[:fields] if values[:fields]
        if values[:options]
          values[:options].each do |option|
            @options.merge! option
          end
        end
      end

      def parameters
        params = {}

        metrics = Gaql.idents
        dimensions = Gaql.idents
        unknown = Gaql.idents

        classifier = Gaql::Schema.classifier
        @options[:fields].each do |f|
          if type = classifier[f.with_prefix]
            if type == :METRIC
              metrics << f
            elsif type == :DIMENSION
              dimensions << f
            else
              unknown << f
            end
          else
            unknown << f
          end
        end

        params['metrics'] = metrics.normalize
        params['dimensions'] = dimensions.normalize if dimensions.size > 0
        params['start-date'] = @options[:start_date].format if @options[:start_date]
        params['end-date'] = @options[:end_date].format if @options[:end_date]
        params['filters'] = @options[:filters].normalize if @options[:filters]

        requests = []
        @options[:views].each do |v|
          req = params.clone
          req['ids'] = v.with_prefix
          requests << req
        end

        requests
      end
    end

    module ReportParser
      def self.included(base)
        base.class_eval do
          rule(:report_query) {
            (
              str('report') >> spaces >>
              idents.as(:fields) >>
              ( spaces >> report_option ).repeat.as(:options)
            ).as(:report_query)
          }

          rule(:report_option) {
            report_views |
            report_start |
            report_end |
            report_filters
          }

          rule(:report_views) {
            ( str('views') | str('view') | str('ids') ) >>
            spaces >> numids.as(:views)
          }

          rule(:report_start) {
            ( str('start') | str('since') | str('from') ) >>
            spaces >> ( common_string.as(:chronic_date) ).as(:start_date)
          }

          rule(:report_end) {
            ( str('until') | str('end') | str('to') ) >>
            spaces >> ( common_string.as(:chronic_date) ).as(:end_date)
          }

          rule(:report_filters) {
            ( str('filters') | str('filter') | str('where') ) >>
            spaces >> expressions.as(:expressions).as(:filters)
          }
        end
      end
    end

    module ReportTransform
      def self.included(base)
        base.class_eval do
          rule(:report_query => subtree(:values)) {
            ReportQuery.new(values)
          }
          rule(:chronic_date => simple(:dt)) {
            ChronicDate.new(dt)
          }
        end
      end
    end
  end
end


text:
package types

import (
	"time"
)

// The following types are used internally in problem detector. In the future this could be the
// interface between node problem detector and other problem daemons.
// We added these types because:
// 1) The kubernetes api packages are too heavy.
// 2) We want to make the interface independent with kubernetes api change.

// Severity is the severity of the problem event. Now we only have 2 severity levels: Info and Warn,
// which are corresponding to the current kubernetes event types. We may want to add more severity
// levels in the future.
type Severity string

const (
	// Info is translated to a normal event.
	Info Severity = "info"
	// Warn is translated to a warning event.
	Warn Severity = "warn"
)

// Condition is the node condition used internally by problem detector.
type Condition struct {
	// Type is the condition type. It should describe the condition of node in problem. For example
	// KernelDeadlock, OutOfResource etc.
	Type string `json:"type"`
	// Status indicates whether the node is in the condition or not.
	Status bool `json:"status"`
	// Transition is the time when the node transits to this condition.
	Transition time.Time `json:"transition"`
	// Reason is a short reason of why node goes into this condition.
	Reason string `json:"reason"`
	// Message is a human readable message of why node goes into this condition.
	Message string `json:"message"`
}

// Event is the event used internally by node problem detector.
type Event struct {
	// Severity is the severity level of the event.
	Severity Severity `json:"severity"`
	// Timestamp is the time when the event is generated.
	Timestamp time.Time `json:"timestamp"`
	// Reason is a short reason of why the event is generated.
	Reason string `json:"reason"`
	// Message is a human readable message of why the event is generated.
	Message string `json:"message"`
}

// Status is the status other problem daemons should report to node problem detector.
type Status struct {
	// Source is the name of the problem daemon.
	Source string `json:"source"`
	// Events are temporary node problem events. If the status is only a condition update,
	// this field could be nil. Notice that the events should be sorted from oldest to newest.
	Events []Event `json:"events"`
	// Conditions are the permanent node conditions. The problem daemon should always report the
	// newest node conditions in this field.
	Conditions []Condition `json:"conditions"`
}


text: import account_analytic_default


text:
#ifndef ZEPHYR_INCLUDE_DEBUG_GCOV_H_
#define ZEPHYR_INCLUDE_DEBUG_GCOV_H_

#ifdef CONFIG_COVERAGE_GCOV
void gcov_coverage_dump(void);
void gcov_static_init(void);
#else
static inline void gcov_coverage_dump(void) { }
static inline void gcov_static_init(void) { }

#endif	/* CONFIG_COVERAGE */

#endif	/* ZEPHYR_INCLUDE_DEBUG_GCOV_H_ */