text:
#ifndef __RMQ_DEFAULTMQPUSHCONSUMER_H__
#define __RMQ_DEFAULTMQPUSHCONSUMER_H__

#include <list>
#include <string>

#include "RocketMQClient.h"
#include "MQClientException.h"
#include "Message.h"
#include "MessageExt.h"
#include "MessageQueue.h"
#include "MessageListener.h"
#include "PullResult.h"
#include "ClientConfig.h"
#include "MQPushConsumer.h"

namespace rmq
{
	class AllocateMessageQueueStrategy;
	class DefaultMQPushConsumerImpl;
	class OffsetStore;

	/**
	* ÀàËÆÓÚBroker PushÏûÏ¢µ½Consumer·½Ê½£¬µ«Êµ¼ÊÈÔÈ»ÊÇConsumerÄÚ²¿ºǫ́´ÓBroker PullÏûÏ¢

	* ²ÉÓó¤ÂÖѯ·½Ê½ÀÏûÏ¢£¬ÊµÊ±ÐÔͬpush·½Ê½Ò»Ö£¬ÇÒ²»»áÎÞνµÄÀÏûÏ¢µ¼ÖÂBroker¡¢ConsumerѹÁ¦Ôö´ó
	*
	*/
	class DefaultMQPushConsumer : public ClientConfig ,public MQPushConsumer
	{
	public:
		DefaultMQPushConsumer();
		DefaultMQPushConsumer(const std::string& consumerGroup);
		~DefaultMQPushConsumer();

		//MQAdmin
		void createTopic(const std::string& key, const std::string& newTopic, int queueNum);
		long long searchOffset(const MessageQueue& mq, long long timestamp);
		long long maxOffset(const MessageQueue& mq);
		long long minOffset(const MessageQueue& mq);
		long long earliestMsgStoreTime(const MessageQueue& mq);
		MessageExt* viewMessage(const std::string& msgId);
		QueryResult queryMessage(const std::string& topic,
								 const std::string&  key,
								 int maxNum,
								 long long begin,
								 long long end);

		// MQadmin end

		AllocateMessageQueueStrategy* getAllocateMessageQueueStrategy();
		void setAllocateMessageQueueStrategy(AllocateMessageQueueStrategy* pAllocateMessageQueueStrategy);

		int getConsumeConcurrentlyMaxSpan();
		void setConsumeConcurrentlyMaxSpan(int consumeConcurrentlyMaxSpan);

		ConsumeFromWhere getConsumeFromWhere();
		void setConsumeFromWhere(ConsumeFromWhere consumeFromWhere);

		int getConsumeMessageBatchMaxSize();
		void setConsumeMessageBatchMaxSize(int consumeMessageBatchMaxSize);

		std::string getConsumerGroup();
		void setConsumerGroup(const std::string& consumerGroup) ;

		int getConsumeThreadMax() ;
		void setConsumeThreadMax(int consumeThreadMax);

		int getConsumeThreadMin();
		void setConsumeThreadMin(int consumeThreadMin);

		MessageListener* getMessageListener();
		void setMessageListener(MessageListener* pMessageListener);

		MessageModel getMessageModel();
		void setMessageModel(MessageModel messageModel) ;

		int getPullBatchSize() ;
		void setPullBatchSize(int pullBatchSize);

		long getPullInterval();
		void setPullInterval(long pullInterval);

		int getPullThresholdForQueue();
		void setPullThresholdForQueue(int pullThresholdForQueue);

		std::map<std::string, std::string>& getSubscription();
		void setSubscription(const std::map<std::string, std::string>& subscription);

		//MQConsumer
		void sendMessageBack(MessageExt& msg, int delayLevel);
		void sendMessageBack(MessageExt& msg, int delayLevel, const std::string brokerName);
		std::set<MessageQueue>* fetchSubscribeMessageQueues(const std::string& topic);

		void start();
		void shutdown();
		//MQConsumer end

		//MQPushConsumer
		void registerMessageListener(MessageListener* pMessageListener);

		void subscribe(const std::string& topic, const std::string& subExpression);
		void unsubscribe(const std::string& topic);

		void updateCorePoolSize(int corePoolSize);

		void suspend() ;
		void resume();
		//MQPushConsumer end

		OffsetStore* getOffsetStore();
		void setOffsetStore(OffsetStore* offsetStore);

		std::string getConsumeTimestamp();
	    void setConsumeTimestamp(std::string consumeTimestamp);

		DefaultMQPushConsumerImpl* getDefaultMQPushConsumerImpl();

		bool isPostSubscriptionWhenPull();
		void setPostSubscriptionWhenPull(bool postSubscriptionWhenPull);

		bool isUnitMode();
		void setUnitMode(bool isUnitMode);

		int getMaxReconsumeTimes();
		void setMaxReconsumeTimes(int maxReconsumeTimes);

		int getSuspendCurrentQueueTimeMillis();
		void setSuspendCurrentQueueTimeMillis(int suspendCurrentQueueTimeMillis);

		int getConsumeTimeout();
		void setConsumeTimeout(int consumeTimeout);

	protected:
		DefaultMQPushConsumerImpl* m_pDefaultMQPushConsumerImpl;

	private:
		/**
		* ×öͬÑùÊÂÇéµÄConsumer¹éΪͬһ¸öGroup£¬Ó¦ÓñØÐëÉèÖ㬲¢±£Ö¤ÃüÃûΨһ
		*/
		std::string m_consumerGroup;

		/**
		* ¼¯ÈºÏû·Ñ/¹ã²¥Ïû·Ñ
		*/
		MessageModel m_messageModel;

		/**
		* ConsumerÆô¶¯Ê±£¬´ÓÄÄÀ↑'Ïû·Ñ
		*/
		ConsumeFromWhere m_consumeFromWhere;

		/**
	     * Backtracking consumption time with second precision.time format is
	     * 20131223171201

	     * Implying Seventeen twelve and 01 seconds on December 23, 2013 year

	     * Default backtracking consumption time Half an hour ago
	     */
		std::string m_consumeTimestamp;

		/**
		* ¶ÓÁзÖÅäËã·¨£¬Ó¦ÓÿÉÖØд
		*/
		AllocateMessageQueueStrategy* m_pAllocateMessageQueueStrategy ;

		/**
		* ¶©ÔĹØϵ
		*/
		std::map<std::string /* topic */, std::string /* sub expression */> m_subscription ;

		/**
		* ÏûÏ¢¼àÌýÆ÷
		*/
		MessageListener* m_pMessageListener;

		/**
		* Offset´æ´¢£¬ÏµÍ³»á¸ù¾Ý¿Í»§¶ËÅäÖÃ×Ô¶¯´´½¨ÏàÓ¦µÄʵÏÖ£¬Èç¹ûÓ¦ÓÃÅäÖÃÁË£¬ÔòÒÔÓ¦ÓÃÅäÖõÄΪÖ÷
		*/
		OffsetStore* m_pOffsetStore;

		/**
		* Ïû·ÑÏûÏ¢Ị̈߳¬×îСÊýÄ¿
		*/
		int m_consumeThreadMin;

		/**
		* Ïû·ÑÏûÏ¢Ị̈߳¬×î´óÊýÄ¿
		*/
		int m_consumeThreadMax;

		/**
		* ͬһ¶ÓÁв¢ÐÐÏû·ÑµÄ×î´ó¿ç¶È£¬Ë³ÐòÏû·Ñ·½Ê½Çé¿öÏ£¬´Ë²ÎÊýÎÞЧ
		*/
		int m_consumeConcurrentlyMaxSpan;

		/**
		* ±¾µØ¶ÓÁÐÏûÏ¢Êý³¬¹ý´Ë·§Öµ£¬¿ªÊ¼Á÷¿Ø
		*/
		int m_pullThresholdForQueue;

		/**
		* ÀÏûÏ¢¼ä¸ô£¬Èç¹ûΪÁ˽µµÍÀÈ¡Ëٶȣ¬¿ÉÒÔÉèÖôóÓÚ0µÄÖµ
		*/
		long m_pullInterval;

		/**
		* Ïû·ÑÒ»ÅúÏûÏ¢£¬×î´óÊý
		*/
		int m_consumeMessageBatchMaxSize;

		/**
		* ÀÏûÏ¢£¬Ò»´ÎÀ¶àÉÙÌõ
		*/
		int m_pullBatchSize;

		/**
	     * Whether update subscription relationship when every pull
	     */
	    bool m_postSubscriptionWhenPull;

	    /**
	     * Whether the unit of subscription group
	     */
	    bool m_unitMode;

		/**
		 * Öظ´×î´óÖØÊÔ´ÎÊý£¬Ä¬ÈÏ15´Î
		 */
	    int m_maxReconsumeTimes;

		/**
		 * ¶ÓÁйÒÆðʱ¼ä(ms)£¬Ä¬ÈÏ1000ms
		 */
	    long m_suspendCurrentQueueTimeMillis;

		/**
		 * Ïû·Ñ³¬Ê±Ê±¼ä(·ÖÖÓ)
		 * ĬÈÏ15·ÖÖÓ
		 */
	    long m_consumeTimeout;
	};
}

#endif


text:
// Copyright (c) 2012 Ecma International.  All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
es5id: 15.2.3.7-5-b-170
description: >
    Object.defineProperties - value of 'writable' property of
    'descObj' is -0 (8.10.5 step 6.b)
includes: [propertyHelper.js]
---*/

var obj = {};

Object.defineProperties(obj, {
    property: {
        writable: -0
    }
});

assert(obj.hasOwnProperty("property"));
verifyNotWritable(obj, "property");

redpajama_set_name: RedPajamaGithub


text:
package virtuozo.showcase.infra;

import virtuozo.infra.AsyncException;
import virtuozo.infra.Elements;
import virtuozo.infra.HttpClient;
import virtuozo.infra.TextCallback;
import virtuozo.infra.BrowserStorage.StoreKey;
import virtuozo.infra.HttpClient.PathBuilder;
import virtuozo.infra.HttpMethod.MediaType;
import virtuozo.interfaces.Component;
import virtuozo.showcase.infra.events.FailureEvent;

public class CodeConsumer {
  private static final CodeConsumer instance = new CodeConsumer();

  public static CodeConsumer get() {
    return instance;
  }

  public CodeConsumer load(Class<?> target, final CodeCallback callback) {
    String path = target.getName().replace(".", "/").concat(".java");
    HttpClient client = HttpClient.create(PathBuilder.create("code-server").append(path));
    client.get().accept(MediaType.TEXT).send(new TextCallback(){
      @Override
      public void onFailure(AsyncException exception) {
        FailureEvent event = new FailureEvent();
        event.publish().with(exception).fire();
      }

      @Override
      public void onSuccess(String response) {
        callback.onCodeResponse(response);
      }
    });
    return this;
  }

  public static class Code extends Component<Code> {
    public Code() {
      super(Elements.div());
      this.css().set("highlight");
    }

    public Code set(String code) {
      this.html(code);
      return this;
    }
  }

  public static interface CodeCallback{
    void onCodeResponse(String code);
  }

  public static enum Key implements StoreKey {
    SAMPLE_CODE
  }
}


text:
package com.retroquack.kwak123.mymovies.ui.adapters;

import android.content.Context;
import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;

import com.retroquack.kwak123.mymovies.R;
import com.retroquack.kwak123.mymovies.model.MovieClass;
import com.retroquack.kwak123.mymovies.tools.UrlTool;
import com.retroquack.kwak123.mymovies.ui.activities.MainActivity;
import com.squareup.picasso.Picasso;

import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * Custom ArrayAdapter for binding images to the GridView. Progress bars removed for smoother UI.
 *
 * Added static ViewHolder class for AdapterView standards.
 */

public class MovieAdapter extends ArrayAdapter<MovieClass> {

    public MovieAdapter(Context context, List<MovieClass> movieClasses) {
        super(context, 0, movieClasses);
    }

    @Override
    @NonNull
    public View getView(int position, View convertView, @NonNull ViewGroup parent) {

        ViewHolder holder;

        if (convertView != null) {
            holder = (ViewHolder) convertView.getTag();
        } else {
            convertView = LayoutInflater.from(getContext())
                    .inflate(R.layout.grid_layout_item, parent, false);
            holder = new ViewHolder(convertView);
            convertView.setTag(holder);
        }

        final MovieClass movie = getItem(position);

        // ImageView loading for movie posters on the main fragment

        if (movie != null) {
            Picasso.with(getContext())
                    .load(UrlTool.buildPosterUrl(movie.getPosterKey()).toString())
                    .into(holder.posterView);

            Picasso.with(getContext())
                    .load(UrlTool.buildBackdropUrl(movie.getBackdropKey()).toString())
                    .into(holder.backdropView);
        } else {
            holder.posterView.setImageResource(R.mipmap.no_pic);
        }

        return convertView;
    }

    public void onFavoritesRefresh(List<MovieClass> movieClasses) {
        if (movieClasses == null) {
            ((MainActivity) getContext()).showSnackBar();
            return;
        }
        addAll(movieClasses);
        notifyDataSetChanged();
    }

    static class ViewHolder {
        @BindView(R.id.poster_view) ImageView posterView;
        @BindView(R.id.backdrop_view) ImageView backdropView;

        ViewHolder(View view) {
            ButterKnife.bind(this, view);
        }
    }

}


text:
from setuptools import setup

setup(name='turtleart',
      version='0.2',
      description='Library to facilitate Turtle Art',
      author='Ava and Teo Lisitza',
      author_email='mlisitza+github@gmail.com',
      packages=['turtleart', 'turtleart.scripts'],
      entry_points={
          'console_scripts': [
              'qturtle = turtleart.scripts.qturtle:main'
          ]
      },
      install_requires=[
          'ipython',
      ]
     )


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>EdItem</title>
<meta name="date" content="2014-08-26">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

com.socar.hrsocar.model

Class EdItem

java.lang.Object

com.socar.hrsocar.model.EdItem

public class EdItem
extends java.lang.Object

Constructor Summary

Constructors

Constructor and Description

EdItem()

Method Summary

All Methods Instance Methods Concrete Methods

Modifier and Type
Method and Description

java.lang.String
getBegda()

java.lang.String
getCountry()

java.lang.String
getDipNum()

java.lang.String
getDocumentType()

java.lang.String
getEduDegree()

java.lang.String
getEduInstitution()

java.lang.String
getEduType()

java.lang.String
getEndda()

java.lang.String
getFinalGrade()

java.lang.String
getIstiqamet()

java.lang.String
getMajor()

java.lang.String
getScientificDegree()

void
setBegda(java.lang.String begda)

void
setCountry(java.lang.String country)

void
setDipNum(java.lang.String dipNum)

void
setDocumentType(java.lang.String documentType)

void
setEduDegree(java.lang.String eduDegree)

void
setEduInstitution(java.lang.String eduInstitution)

void
setEduType(java.lang.String eduType)

void
setEndda(java.lang.String endda)

void
setFinalGrade(java.lang.String finalGrade)

void
setIstiqamet(java.lang.String istiqamet)

void
setMajor(java.lang.String major)

void
setScientificDegree(java.lang.String scientificDegree)

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

EdItem

public EdItem()

Method Detail

getBegda

public java.lang.String getBegda()

setBegda

public void setBegda(java.lang.String begda)

getEndda

public java.lang.String getEndda()

setEndda

public void setEndda(java.lang.String endda)

getCountry

public java.lang.String getCountry()

setCountry

public void setCountry(java.lang.String country)

getScientificDegree

public java.lang.String getScientificDegree()

setScientificDegree

public void setScientificDegree(java.lang.String scientificDegree)

getEduDegree

public java.lang.String getEduDegree()

setEduDegree

public void setEduDegree(java.lang.String eduDegree)

getDocumentType

public java.lang.String getDocumentType()

setDocumentType

public void setDocumentType(java.lang.String documentType)

getFinalGrade

public java.lang.String getFinalGrade()

setFinalGrade

public void setFinalGrade(java.lang.String finalGrade)

getEduInstitution

public java.lang.String getEduInstitution()

setEduInstitution

public void setEduInstitution(java.lang.String eduInstitution)

getIstiqamet

public java.lang.String getIstiqamet()

setIstiqamet

public void setIstiqamet(java.lang.String istiqamet)

getMajor

public java.lang.String getMajor()

setMajor

public void setMajor(java.lang.String major)

getEduType

public java.lang.String getEduType()

setEduType

public void setEduType(java.lang.String eduType)

getDipNum

public java.lang.String getDipNum()

setDipNum

public void setDipNum(java.lang.String dipNum)

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
@interface AARootViewController ()

@end

@implementation AARootViewController

- (void)loadView
{
    self.view = [AARootView new];
}

@end


text:
David Pfau, Oriol Vinyals

Both generative adversarial networks (GAN) in unsupervised learning and actor-critic methods in reinforcement learning (RL) have gained a reputation for being
difficult to optimize.

Practitioners in both fields have amassed a large number of strategies to mitigate these instabilities and improve training. Here we show that
GANs can be viewed as actor-critic methods in an environment where the actor cannot affect the reward.

We review the strategies for stabilizing training for each class of models, both those that generalize between the two and those that are particular to that model. We also review a number of extensions to GANs and RL
algorithms with even more complicated information flow.

We hope that by highlighting this formal connection we will encourage both GAN and RL communities to develop general, scalable, and stable algorithms for multilevel optimization with deep networks, and to draw inspiration across communities.


text:
import sys
import re
import os
import urllib
import urllib2
import gdata.photos
import gdata.photos.service

pws = gdata.photos.service.PhotosService()

def main():
  username = sys.argv[1]
  resume = ''
  l_username = False
  l_password = False
  force = False
  for arg in sys.argv:
    if arg.startswith('--resume='):
      resume = arg.split('--resume=')[1]
    if arg.startswith('--username='):
      l_username = arg.split('--username=')[1]
    if arg.startswith('--password='):
      l_password = arg.split('--password=')[1]
    if arg == '--force':
      force = True

  if l_username and l_password:
    pws.ClientLogin(l_username, l_password)
    print 'Logged in as %s.' %(username)
  else:
    print 'Logged in as anonymous.'
  print 'Grabbing %s\'s photos' %username
  albums = pws.GetUserFeed(user=username).entry
  flag = not bool(resume)
  for album in albums:
    if album.name.text.lower() == resume.lower():
      flag = True
    if flag:
      process_album(album, force)
    else:
      print 'Skipping %s' %(album.name.text)

def process_album(album, force):
  album_name = album.name.text
  create_dir(album_name)
  print 'Starting %s' %(album_name)
  photos = pws.GetFeed(album.GetPhotosUri()).entry
  try:
    photo = photos[0]
  except IndexError:
    print 'No photos in %s' %(album_name)
    return
  gallery_link = str(photo.GetHtmlLink().href)
  text = grab_url(gallery_link)
  found = re.findall('"width":"(.*?)","height":"(.*?)","size":"(.*?)","commentingEnabled":"(.*?)","allowNameTags":"(.*?)","media":\{"content":\[\{"url":"https:\/\/(.*?)",', text)
  #print found
  #url_list = []
  for object in found:
    split = object[5].split('/')
    split.append(split[5]) #extra item
    if int(object[0]) > 2048:
      size = '2048'
    else:
      size = object[0]
    split[5] = 's'+size
    url = 'https://' + '/'.join(split)
    filename = split[6]
    if os.path.isfile(filename) and (not force):
      continue
    #print url
    try:
      download_image(url, album_name.lower(), filename)
    except KeyboardInterrupt:
      sys.exit(1)
    except:
      print 'Skipping: Error on %s' %(url)
    print 'Successfully grabbed %s' %(split[6])
    #url_list.append(url)
  print 'Finished %s' %(album_name)

def download_image(url, album, filename):
  img = grab_url(url)
  file = open(album+'/'+filename, 'w')
  file.write(img)
  file.close()

def grab_url(link):
  obj = urllib.urlopen(link)
  text = obj.read()
  obj.close()
  return text

def create_dir(name):
  try:
    os.mkdir(name.lower())
  except OSError:
    pass

if __name__ == "__main__":
  main()


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.aarnam.softwares.udacitysunshineapp" >

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <provider
            android:authorities="com.aarnam.softwares.udacitysunshineapp"
            android:name=".data.WeatherProvider"></provider>
        <activity
            android:name=".HomeActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".WeatherDetails"
            android:label="@string/title_activity_weather_details"
            android:parentActivityName=".HomeActivity" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.aarnam.softwares.udacitysunshineapp.HomeActivity" />
        </activity>
        <activity
            android:name=".SettingsActivity"
            android:label="@string/title_activity_settings" >
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value="com.aarnam.softwares.udacitysunshineapp.HomeActivity" />
        </activity>
    </application>

</manifest>


text:
module Spree
  class BaseMailer < ActionMailer::Base

    def from_address
      Spree::Store.current.mail_from_address
    end

    def money(amount, currency = Spree::Config[:currency])
      Spree::Money.new(amount, currency: currency).to_s
    end
    helper_method :money

    def mail(headers={}, &block)
      super if Spree::Config[:send_core_emails]
    end

  end
end


text:
import Framework7, { Framework7Plugin } from '../../components/app/app-class';

export namespace Touch {
  interface AppMethods {
    touchEvents: {
      start: string;
      move: string;
      end: string;
    };
  }
  interface AppParams {
    /** Object with touch-module related parameters */
    touch?:
      | {
          /** Distance threshold (in px) to prevent short swipes. So if tap/move distance is larger than this value then "click" will not be triggered. (default 5) */
          touchClicksDistanceThreshold?: number;
          /** . (default true) */
          disableContextMenu?: boolean;
          /** Enables tap hold. (default false) */
          tapHold?: boolean;
          /** Determines how long (in ms) the user must hold their tap before the taphold event is fired on the target element. (default 750) */
          tapHoldDelay?: number;
          /** When enabled (by default), then click event will not be fired after tap hold event. (default true) */
          tapHoldPreventClicks?: boolean;
          /** When enabled, app will add "active-state" class to currently touched (:active) element.. (default true) */
          activeState?: boolean;
          /** CSS selector of elements where enabled activeState will add appropriate active class. (default a, button, label, span, .actions-button, .stepper-button, .stepper-button-plus, .stepper-button-minus, .card-expandable, .menu-item, .link, .item-link) */
          activeStateElements?: string;
          /** Enables MD-theme specific touch ripple effect. (default true) */
          mdTouchRipple?: boolean;
          /** Enables iOS-theme specific touch ripple effect. (default false) */
          iosTouchRipple?: boolean;
          /** Enables Aurora-theme specific touch ripple effect. (default false) */
          auroraTouchRipple?: boolean;
          /** CSS selector of elements to apply touch ripple effect on click. (default .ripple, .link, .item-link, .list-button, .links-list a, .button, button, .input-clear-button, .dialog-button, .tab-link, .item-radio, .item-checkbox, .actions-button, .searchbar-disable-button, .fab a, .checkbox, .radio, .data-table .sortable-cell:not(.input-cell), .notification-close-button, .stepper-button, .stepper-button-minus, .stepper-button-plus, .menu-item-content) */
          touchRippleElements?: string;
          /** CSS selector of elements to with inset touch ripple effect. (default .ripple-inset, .icon-only, .searchbar-disable-button, .input-clear-button, .notification-close-button, .md .navbar .link.back) */
          touchRippleInsetElements?: string;
        }
      | undefined;
  }
  interface AppEvents {
    /** Event will be fired on app click */
    click: (event: Event) => void;
    /** Event will be fired on touch start (mousedown) event added as active listener (possible to prevent default) */
    'touchstart:active': (event: Event) => void;
    /** Event will be fired on touch move (mousemove) event added as active listener (possible to prevent default) */
    'touchmove:active': (event: Event) => void;
    /** Event will be fired on touch end (mouseup) event added as active listener (possible to prevent default) */
    'touchend:active': (event: Event) => void;
    /** Event will be fired on touch start (mousedown) event added as passive listener (impossible to prevent default) */
    'touchstart:passive': (event: Event) => void;
    /** Event will be fired on touch move (mousemove) event added as passive listener (impossible to prevent default) */
    'touchmove:passive': (event: Event) => void;
    /** Event will be fired on touch end (mouseup) event added as passive listener (impossible to prevent default) */
    'touchend:passive': (event: Event) => void;
  }
}

declare const TouchModule: Framework7Plugin;

export default TouchModule;


text:
<component name="ProjectDictionaryState">
  <dictionary name="justin">
    <words>
      <w>revalidates</w>
      <w>unpauses</w>
    </words>
  </dictionary>
</component>


text:
//Copyright(c) 2013 Martin Evans

//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//copies of the Software, and to permit persons to whom the Software is
//furnished to do so, subject to the following conditions:

//The above copyright notice and this permission notice shall be included in
//all copies or substantial portions of the Software.

//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
//THE SOFTWARE.

using System;
using System.Collections.Generic;
using System.Linq;
using MumbleProto;
using MumbleSharp;
using MumbleSharp.Audio;
using MumbleSharp.Audio.Codecs;
using MumbleSharp.Model;
using NAudio.Wave;

namespace MumblePlugin
{
    /// <summary>
    /// A test mumble protocol. Currently just prints the name of whoever is speaking, as well as printing messages it receives
    /// </summary>
    public class ConsoleMumbleProtocol
        : BasicMumbleProtocol
    {
        /*
        readonly Dictionary<User, AudioPlayer> _players = new Dictionary<User, AudioPlayer>();

        public override void EncodedVoice(byte[] data, uint userId, long sequence, IVoiceCodec codec, SpeechTarget target)
        {
            User user = Users.FirstOrDefault(u => u.Id == userId);
            if (user != null)
                Console.WriteLine(user.Name + " is speaking. Seq" + sequence);

            base.EncodedVoice(data, userId, sequence, codec, target);
        }
        */
        protected override void UserJoined(User user)
        {
            base.UserJoined(user);

            //_players.Add(user, new AudioPlayer(user.Voice));
        }

        protected override void UserLeft(User user)
        {
            base.UserLeft(user);

            //_players.Remove(user);
        }

        public override void ServerConfig(ServerConfig serverConfig)
        {
            base.ServerConfig(serverConfig);

            //Console.WriteLine(serverConfig.welcome_text);
        }

        protected override void ChannelMessageReceived(ChannelMessage message)
        {
            if (message.Channel.Equals(LocalUser.Channel))
                //Console.WriteLine(string.Format("{0} (channel message): {1}", message.Sender.Name, message.Text));

            base.ChannelMessageReceived(message);
        }

        protected override void PersonalMessageReceived(PersonalMessage message)
        {
            //Console.WriteLine(string.Format("{0} (personal message): {1}", message.Sender.Name, message.Text));

            base.PersonalMessageReceived(message);
        }
        /*
        private class AudioPlayer
        {
            private readonly WaveOut _playbackDevice = new WaveOut();

            public AudioPlayer(IWaveProvider provider)
            {
                _playbackDevice.Init(provider);
                _playbackDevice.Play();

                _playbackDevice.PlaybackStopped += (sender, args) => Console.WriteLine("Playback stopped: " + args.Exception);
            }
        }
        */
    }
}


text:
package github

import (
	"fmt"
	"strings"
	"time"
)

const (
	releaseListPath   = "/repos/%s/%s/releases"
	releaseLatestPath = "/repos/%s/%s/releases/latest"
)

// Release is a Github API Release type
type Release struct {
	URL         string     `json:"url"`
	PageURL     string     `json:"html_url"`
	UploadURL   string     `json:"upload_url"`
	ID          int        `json:"id"`
	Name        string     `json:"name"`
	Description string     `json:"body"`
	TagName     string     `json:"tag_name"`
	Draft       bool       `json:"draft"`
	Prerelease  bool       `json:"prerelease"`
	Created     *time.Time `json:"created_at"`
	Published   *time.Time `json:"published_at"`
	Assets      []Asset    `json:"assets"`
}

// CleanUploadURL is URL for uploading a release
func (r *Release) CleanUploadURL() string {
	bracket := strings.Index(r.UploadURL, "{")

	if bracket == -1 {
		return r.UploadURL
	}

	return r.UploadURL[0:bracket]
}

// ReleaseCreate is a Github API ReleaseCreate type
type ReleaseCreate struct {
	TagName         string `json:"tag_name"`
	TargetCommitish string `json:"target_commitish,omitempty"`
	Name            string `json:"name"`
	Body            string `json:"body"`
	Draft           bool   `json:"draft"`
	Prerelease      bool   `json:"prerelease"`
}

// Releases returns releases for a repo
func Releases(user, repo, token string) (releases []Release, err error) {
	u, err := githubURL(githubAPIURL)
	if err != nil {
		return nil, err
	}
	u.Path = fmt.Sprintf(releaseListPath, user, repo)
	err = Get(token, u.String(), &releases)
	if err != nil {
		return
	}
	return
}

// LatestRelease returns latest release for repo
func LatestRelease(user, repo, token string) (release *Release, err error) {
	u, err := githubURL(githubAPIURL)
	if err != nil {
		return
	}
	u.Path = fmt.Sprintf(releaseLatestPath, user, repo)
	err = Get(token, u.String(), &release)
	return
}

// ReleaseOfTag returns release for tag
func ReleaseOfTag(user, repo, tag, token string) (*Release, error) {
	releases, err := Releases(user, repo, token)
	if err != nil {
		return nil, err
	}

	for _, release := range releases {
		if release.TagName == tag {
			return &release, nil
		}
	}

	return nil, &ErrNotFound{Name: "release", Key: "tag", Value: tag}
}


text:
.class public abstract Lcom/samsung/android/security/IDirEncryptService$Stub;
.super Landroid/os/Binder;
.source "IDirEncryptService.java"

# interfaces
.implements Lcom/samsung/android/security/IDirEncryptService;

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/samsung/android/security/IDirEncryptService;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x409
    name = "Stub"
.end annotation

.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/samsung/android/security/IDirEncryptService$Stub$Proxy;
    }
.end annotation

# static fields
.field private static final DESCRIPTOR:Ljava/lang/String; = "IDirEncryptService"

.field static final TRANSACTION_SetMountSDcardToHelper:I = 0x2a

.field static final TRANSACTION_clearPrefs:I = 0xd

.field static final TRANSACTION_encryptStorage:I = 0x9

.field static final TRANSACTION_getAdditionalSpaceRequired:I = 0x8

.field static final TRANSACTION_getCurrentStatus:I = 0x6

.field static final TRANSACTION_getLastError:I = 0x7

.field static final TRANSACTION_getSdCardEncryptionPreferences:I = 0xa

.field static final TRANSACTION_isEncryptionAppliedSDCard:I = 0xe

.field static final TRANSACTION_isStorageCardEncryptionPoliciesApplied:I = 0x4

.field static final TRANSACTION_registerListener:I = 0x1

.field static final TRANSACTION_setNeedToCreateKey:I = 0x29

.field static final TRANSACTION_setPassword:I = 0x5

.field static final TRANSACTION_setSdCardEncryptionPolicy:I = 0xc

.field static final TRANSACTION_setStorageCardEncryptionPolicy:I = 0x3

.field static final TRANSACTION_unmountSDCardByAdmin:I = 0xb

.field static final TRANSACTION_unregisterListener:I = 0x2

# direct methods
.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/os/Binder;-><init>()V

    const-string/jumbo v0, "IDirEncryptService"

    invoke-virtual {p0, p0, v0}, Lcom/samsung/android/security/IDirEncryptService$Stub;->attachInterface(Landroid/os/IInterface;Ljava/lang/String;)V

    return-void
.end method

.method public static asInterface(Landroid/os/IBinder;)Lcom/samsung/android/security/IDirEncryptService;
    .locals 2

    const/4 v1, 0x0

    if-nez p0, :cond_0

    return-object v1

    :cond_0
    const-string/jumbo v1, "IDirEncryptService"

    invoke-interface {p0, v1}, Landroid/os/IBinder;->queryLocalInterface(Ljava/lang/String;)Landroid/os/IInterface;

    move-result-object v0

    if-eqz v0, :cond_1

    instance-of v1, v0, Lcom/samsung/android/security/IDirEncryptService;

    if-eqz v1, :cond_1

    check-cast v0, Lcom/samsung/android/security/IDirEncryptService;

    return-object v0

    :cond_1
    new-instance v1, Lcom/samsung/android/security/IDirEncryptService$Stub$Proxy;

    invoke-direct {v1, p0}, Lcom/samsung/android/security/IDirEncryptService$Stub$Proxy;-><init>(Landroid/os/IBinder;)V

    return-object v1
.end method

# virtual methods
.method public asBinder()Landroid/os/IBinder;
    .locals 0

    return-object p0
.end method

.method public onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z
    .locals 9
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation

    const/4 v1, 0x0

    const/4 v5, 0x1

    sparse-switch p1, :sswitch_data_0

    invoke-super {p0, p1, p2, p3, p4}, Landroid/os/Binder;->onTransact(ILandroid/os/Parcel;Landroid/os/Parcel;I)Z

    move-result v5

    return v5

    :sswitch_0
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p3, v6}, Landroid/os/Parcel;->writeString(Ljava/lang/String;)V

    return v5

    :sswitch_1
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v6

    invoke-static {v6}, Lcom/samsung/android/security/IDirEncryptServiceListener$Stub;->asInterface(Landroid/os/IBinder;)Lcom/samsung/android/security/IDirEncryptServiceListener;

    move-result-object v2

    if-nez v2, :cond_0

    return v1

    :cond_0
    invoke-virtual {p0, v2}, Lcom/samsung/android/security/IDirEncryptService$Stub;->registerListener(Lcom/samsung/android/security/IDirEncryptServiceListener;)V

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    return v5

    :sswitch_2
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readStrongBinder()Landroid/os/IBinder;

    move-result-object v6

    invoke-static {v6}, Lcom/samsung/android/security/IDirEncryptServiceListener$Stub;->asInterface(Landroid/os/IBinder;)Lcom/samsung/android/security/IDirEncryptServiceListener;

    move-result-object v2

    if-nez v2, :cond_1

    return v1

    :cond_1
    invoke-virtual {p0, v2}, Lcom/samsung/android/security/IDirEncryptService$Stub;->unregisterListener(Lcom/samsung/android/security/IDirEncryptServiceListener;)V

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    return v5

    :sswitch_3
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v6

    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v7

    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v8

    invoke-virtual {p0, v6, v7, v8}, Lcom/samsung/android/security/IDirEncryptService$Stub;->setStorageCardEncryptionPolicy(III)I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_4
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v6

    invoke-virtual {p2}, Landroid/os/Parcel;->readInt()I

    move-result v7

    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v8

    invoke-virtual {p0, v6, v7, v8}, Lcom/samsung/android/security/IDirEncryptService$Stub;->setSdCardEncryptionPolicy(IILjava/lang/String;)I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_5
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lcom/samsung/android/security/IDirEncryptService$Stub;->clearPrefs(Ljava/lang/String;)V

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    return v5

    :sswitch_6
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/samsung/android/security/IDirEncryptService$Stub;->isStorageCardEncryptionPoliciesApplied()I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_7
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lcom/samsung/android/security/IDirEncryptService$Stub;->setPassword(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_8
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/samsung/android/security/IDirEncryptService$Stub;->getCurrentStatus()I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_9
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/samsung/android/security/IDirEncryptService$Stub;->getLastError()I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_a
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/samsung/android/security/IDirEncryptService$Stub;->getAdditionalSpaceRequired()I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_b
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lcom/samsung/android/security/IDirEncryptService$Stub;->encryptStorage(Ljava/lang/String;)I

    move-result v0

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    invoke-virtual {p3, v0}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    :sswitch_c
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readString()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {p0, v6}, Lcom/samsung/android/security/IDirEncryptService$Stub;->getSdCardEncryptionPreferences(Ljava/lang/String;)Lcom/samsung/android/security/SemSdCardEncryptionPolicy;

    move-result-object v3

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    if-eqz v3, :cond_2

    invoke-virtual {p3, v5}, Landroid/os/Parcel;->writeInt(I)V

    invoke-virtual {v3, p3, v5}, Lcom/samsung/android/security/SemSdCardEncryptionPolicy;->writeToParcel(Landroid/os/Parcel;I)V

    :cond_2
    return v5

    :sswitch_d
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/samsung/android/security/IDirEncryptService$Stub;->unmountSDCardByAdmin()V

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    return v5

    :sswitch_e
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readByte()B

    move-result v6

    if-ne v6, v5, :cond_3

    move v1, v5

    :cond_3
    invoke-virtual {p0, v1}, Lcom/samsung/android/security/IDirEncryptService$Stub;->setNeedToCreateKey(Z)V

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    return v5

    :sswitch_f
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p2}, Landroid/os/Parcel;->readByte()B

    move-result v6

    if-ne v6, v5, :cond_4

    move v1, v5

    :cond_4
    invoke-virtual {p0, v1}, Lcom/samsung/android/security/IDirEncryptService$Stub;->SetMountSDcardToHelper(Z)V

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    return v5

    :sswitch_10
    const-string/jumbo v6, "IDirEncryptService"

    invoke-virtual {p2, v6}, Landroid/os/Parcel;->enforceInterface(Ljava/lang/String;)V

    invoke-virtual {p0}, Lcom/samsung/android/security/IDirEncryptService$Stub;->isEncryptionAppliedSDCard()Z

    move-result v4

    invoke-virtual {p3}, Landroid/os/Parcel;->writeNoException()V

    if-eqz v4, :cond_5

    move v1, v5

    :cond_5
    invoke-virtual {p3, v1}, Landroid/os/Parcel;->writeInt(I)V

    return v5

    nop

    :sswitch_data_0
    .sparse-switch
        0x1 -> :sswitch_1
        0x2 -> :sswitch_2
        0x3 -> :sswitch_3
        0x4 -> :sswitch_6
        0x5 -> :sswitch_7
        0x6 -> :sswitch_8
        0x7 -> :sswitch_9
        0x8 -> :sswitch_a
        0x9 -> :sswitch_b
        0xa -> :sswitch_c
        0xb -> :sswitch_d
        0xc -> :sswitch_4
        0xd -> :sswitch_5
        0xe -> :sswitch_10
        0x29 -> :sswitch_e
        0x2a -> :sswitch_f
        0x5f4e5446 -> :sswitch_0
    .end sparse-switch
.end method


text:
#import <Foundation/Foundation.h>

#import "SBJson5StreamTokeniser.h"
#import "SBJson5StreamParser.h"

@interface SBJson5StreamParserState : NSObject
+ (id)sharedInstance;

- (BOOL)parser:(SBJson5StreamParser *)parser shouldAcceptToken:(sbjson5_token_t)token;
- (SBJson5ParserStatus)parserShouldReturn:(SBJson5StreamParser *)parser;
- (void)parser:(SBJson5StreamParser *)parser shouldTransitionTo:(sbjson5_token_t)tok;
- (BOOL)needKey;
- (BOOL)isError;

- (NSString*)name;

@end

@interface SBJson5StreamParserStateStart : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateComplete : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateError : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateObjectStart : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateObjectGotKey : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateObjectSeparator : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateObjectGotValue : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateObjectNeedKey : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateArrayStart : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateArrayGotValue : SBJson5StreamParserState
@end

@interface SBJson5StreamParserStateArrayNeedValue : SBJson5StreamParserState
@end


text:
require 'spec_helper'
require_relative '../../config/initializers/6_validations.rb'

describe '6_validations', lib: true do
  before :all do
    FileUtils.mkdir_p('tmp/tests/paths/a/b/c/d')
    FileUtils.mkdir_p('tmp/tests/paths/a/b/c2')
    FileUtils.mkdir_p('tmp/tests/paths/a/b/d')
  end

  after :all do
    FileUtils.rm_rf('tmp/tests/paths')
  end

  context 'with correct settings' do
    before do
      mock_storages('foo' => 'tmp/tests/paths/a/b/c', 'bar' => 'tmp/tests/paths/a/b/d')
    end

    it 'passes through' do
      expect { validate_storages }.not_to raise_error
    end
  end

  context 'with invalid storage names' do
    before do
      mock_storages('name with spaces' => 'tmp/tests/paths/a/b/c')
    end

    it 'throws an error' do
      expect { validate_storages }.to raise_error('"name with spaces" is not a valid storage name. Please fix this in your gitlab.yml before starting GitLab.')
    end
  end

  context 'with nested storage paths' do
    before do
      mock_storages('foo' => 'tmp/tests/paths/a/b/c', 'bar' => 'tmp/tests/paths/a/b/c/d')
    end

    it 'throws an error' do
      expect { validate_storages }.to raise_error('bar is a nested path of foo. Nested paths are not supported for repository storages. Please fix this in your gitlab.yml before starting GitLab.')
    end
  end

  context 'with similar but un-nested storage paths' do
    before do
      mock_storages('foo' => 'tmp/tests/paths/a/b/c', 'bar' => 'tmp/tests/paths/a/b/c2')
    end

    it 'passes through' do
      expect { validate_storages }.not_to raise_error
    end
  end

  def mock_storages(storages)
    allow(Gitlab.config.repositories).to receive(:storages).and_return(storages)
  end
end


text:
<!doctype html>

  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta name="description" content="">
  <meta name="author" content="">
  <link rel="icon" href="favicon.ico">

  <title>Starter Template for Bootstrap</title>

  <link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap/dist/css/bootstrap.min.css"/>
  <link type="text/css" rel="stylesheet" href="https://unpkg.com/bootstrap-vue@latest/dist/bootstrap-vue.css"/>

    Company Jobs

        Home
        My resume

          Jobs
          Employee
          Candidates

          Skills

          Profile
          Signout

      <router-view></router-view>


text:
@implementation AFXMLRequestSerializer

#pragma mark - AFURLRequestSerialization

- (NSURLRequest *)requestBySerializingRequest:(NSURLRequest *)request
                               withParameters:(id)parameters
                                        error:(NSError *__autoreleasing *)error
{
    NSParameterAssert(request);
    NSMutableURLRequest *mutableRequest = [request mutableCopy];
    [self.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) {
        if (![request valueForHTTPHeaderField:field]) {
            [mutableRequest setValue:value forHTTPHeaderField:field];
        }
    }];

    if (parameters) {
        NSString *query = parameters;
        if ([self.HTTPMethodsEncodingParametersInURI containsObject:[[request HTTPMethod] uppercaseString]]) {
            mutableRequest.URL = [NSURL URLWithString:[[mutableRequest.URL absoluteString] stringByAppendingFormat:mutableRequest.URL.query ? @"&%@" : @"?%@", query]];
        } else {
            if (![mutableRequest valueForHTTPHeaderField:@"Content-Type"]) {
                [mutableRequest setValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"];
            }
            [mutableRequest setHTTPBody:[query dataUsingEncoding:self.stringEncoding]];
        }
    }
    return mutableRequest;
}

@end