text:
using std::size_t;
using namespace primesieve;

namespace {

template <typename T>
void* get_primes(uint64_t start, uint64_t stop, size_t* size)
{
  try
  {
    malloc_vector<T> primes;
    store_primes(start, stop, primes);
    if (size)
      *size = primes.size();

    return primes.release();
  }
  catch (const std::exception& e)
  {
    if (size)
      *size = 0;

    std::cerr << "primesieve_generate_primes: " << e.what() << std::endl;
    errno = EDOM;
    return nullptr;
  }
}

template <typename T>
void* get_n_primes(uint64_t n, uint64_t start)
{
  try
  {
    malloc_vector<T> primes;
    store_n_primes(n, start, primes);
    return primes.release();
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_generate_n_primes: " << e.what() << std::endl;
    errno = EDOM;
    return nullptr;
  }
}

} // namespace

void* primesieve_generate_primes(uint64_t start, uint64_t stop, size_t* size, int type)
{
  switch (type)
  {
    case SHORT_PRIMES:     return get_primes<short>(start, stop, size);
    case USHORT_PRIMES:    return get_primes<unsigned short>(start, stop, size);
    case INT_PRIMES:       return get_primes<int>(start, stop, size);
    case UINT_PRIMES:      return get_primes<unsigned int>(start, stop, size);
    case LONG_PRIMES:      return get_primes<long>(start, stop, size);
    case ULONG_PRIMES:     return get_primes<unsigned long>(start, stop, size);
    case LONGLONG_PRIMES:  return get_primes<long long>(start, stop, size);
    case ULONGLONG_PRIMES: return get_primes<unsigned long long>(start, stop, size);
    case INT16_PRIMES:     return get_primes<int16_t>(start, stop, size);
    case UINT16_PRIMES:    return get_primes<uint16_t>(start, stop, size);
    case INT32_PRIMES:     return get_primes<int32_t>(start, stop, size);
    case UINT32_PRIMES:    return get_primes<uint32_t>(start, stop, size);
    case INT64_PRIMES:     return get_primes<int64_t>(start, stop, size);
    case UINT64_PRIMES:    return get_primes<uint64_t>(start, stop, size);
  }

  if (size)
    *size = 0;

  std::cerr << "primesieve_generate_primes: Invalid type parameter!" << std::endl;
  errno = EDOM;
  return nullptr;
}

void* primesieve_generate_n_primes(uint64_t n, uint64_t start, int type)
{
  switch (type)
  {
    case SHORT_PRIMES:     return get_n_primes<short>(n, start);
    case USHORT_PRIMES:    return get_n_primes<unsigned short>(n, start);
    case INT_PRIMES:       return get_n_primes<int>(n, start);
    case UINT_PRIMES:      return get_n_primes<unsigned int>(n, start);
    case LONG_PRIMES:      return get_n_primes<long>(n, start);
    case ULONG_PRIMES:     return get_n_primes<unsigned long>(n, start);
    case LONGLONG_PRIMES:  return get_n_primes<long long>(n, start);
    case ULONGLONG_PRIMES: return get_n_primes<unsigned long long>(n, start);
    case INT16_PRIMES:     return get_n_primes<int16_t>(n, start);
    case UINT16_PRIMES:    return get_n_primes<uint16_t>(n, start);
    case INT32_PRIMES:     return get_n_primes<int32_t>(n, start);
    case UINT32_PRIMES:    return get_n_primes<uint32_t>(n, start);
    case INT64_PRIMES:     return get_n_primes<int64_t>(n, start);
    case UINT64_PRIMES:    return get_n_primes<uint64_t>(n, start);
  }

  std::cerr << "primesieve_generate_n_primes: Invalid type parameter!" << std::endl;
  errno = EDOM;
  return nullptr;
}

void primesieve_free(void* primes)
{
  free(primes);
}

uint64_t primesieve_nth_prime(int64_t n, uint64_t start)
{
  try
  {
    return nth_prime(n, start);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_nth_prime: " << e.what() << std::endl;
    errno = EDOM;
    return PRIMESIEVE_ERROR;
  }
}

uint64_t primesieve_count_primes(uint64_t start, uint64_t stop)
{
  try
  {
    return count_primes(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_count_primes: " << e.what() << std::endl;
    errno = EDOM;
    return PRIMESIEVE_ERROR;
  }
}

uint64_t primesieve_count_twins(uint64_t start, uint64_t stop)
{
  try
  {
    return count_twins(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_count_twins: " << e.what() << std::endl;
    errno = EDOM;
    return PRIMESIEVE_ERROR;
  }
}

uint64_t primesieve_count_triplets(uint64_t start, uint64_t stop)
{
  try
  {
    return count_triplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_count_triplets: " << e.what() << std::endl;
    errno = EDOM;
    return PRIMESIEVE_ERROR;
  }
}

uint64_t primesieve_count_quadruplets(uint64_t start, uint64_t stop)
{
  try
  {
    return count_quadruplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_count_quadruplets: " << e.what() << std::endl;
    errno = EDOM;
    return PRIMESIEVE_ERROR;
  }
}

uint64_t primesieve_count_quintuplets(uint64_t start, uint64_t stop)
{
  try
  {
    return count_quintuplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_count_quintuplets: " << e.what() << std::endl;
    errno = EDOM;
    return PRIMESIEVE_ERROR;
  }
}

uint64_t primesieve_count_sextuplets(uint64_t start, uint64_t stop)
{
  try
  {
    return count_sextuplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_count_sextuplets: " << e.what() << std::endl;
    errno = EDOM;
    return PRIMESIEVE_ERROR;
  }
}

void primesieve_print_primes(uint64_t start, uint64_t stop)
{
  try
  {
    print_primes(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_print_primes: " << e.what() << std::endl;
    errno = EDOM;
  }
}

void primesieve_print_twins(uint64_t start, uint64_t stop)
{
  try
  {
    print_twins(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_print_twins: " << e.what() << std::endl;
    errno = EDOM;
  }
}

void primesieve_print_triplets(uint64_t start, uint64_t stop)
{
  try
  {
    print_triplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_print_triplets: " << e.what() << std::endl;
    errno = EDOM;
  }
}

void primesieve_print_quadruplets(uint64_t start, uint64_t stop)
{
  try
  {
    print_quadruplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_print_quadruplets: " << e.what() << std::endl;
    errno = EDOM;
  }
}

void primesieve_print_quintuplets(uint64_t start, uint64_t stop)
{
  try
  {
    print_quintuplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_print_quintuplets: " << e.what() << std::endl;
    errno = EDOM;
  }
}

void primesieve_print_sextuplets(uint64_t start, uint64_t stop)
{
  try
  {
    print_sextuplets(start, stop);
  }
  catch (const std::exception& e)
  {
    std::cerr << "primesieve_print_sextuplets: " << e.what() << std::endl;
    errno = EDOM;
  }
}

int primesieve_get_sieve_size()
{
  return get_sieve_size();
}

int primesieve_get_num_threads()
{
  return get_num_threads();
}

void primesieve_set_sieve_size(int sieve_size)
{
  set_sieve_size(sieve_size);
}

void primesieve_set_num_threads(int num_threads)
{
  set_num_threads(num_threads);
}

uint64_t primesieve_get_max_stop()
{
  return get_max_stop();
}

const char* primesieve_version()
{
  return PRIMESIEVE_VERSION;
}


text:
typedef struct rectangle {
	double freq;
	unsigned char row;
	unsigned char col;
	unsigned char length;
	unsigned char traveled;
} rectangle;
// -----------------------------------------------------

// -------------------Circular Array --------------------
typedef struct CircleArray {
	unsigned char cap;
	rectangle* LED_notes;
	rectangle* limit;
	rectangle* head;
	rectangle* tail;
	unsigned char sz;
} CircleArray;

unsigned char isEmpty(CircleArray* circle) {
	if (circle->sz == 0) {
		return 0;
	}
	else {
		return 1;
	}
}

rectangle* next(CircleArray* circle, rectangle* curr) {
	++curr;
	if (curr == circle->limit) { //if reached end of array, circle back
		return circle->LED_notes;
	}
	else {
		return curr;
	}
}

void pop_front(CircleArray* circle) {
	if (circle->sz > 0) {
		--(circle->sz);
		circle->head = next(circle, circle->head);
	}
}

void push_back(CircleArray* circle, rectangle* toAdd) {
	if (circle->sz < circle->cap) {
		++(circle->sz);
		*(circle->tail) = *toAdd;
		circle->tail = next(circle, circle->tail);
	}
}
// -------------------------------------------------------
#endif

redpajama_set_name: RedPajamaGithub


text:
using System;
using Xamarin.Forms;

namespace CheckBoxDemo
{
    public partial class CheckBoxDemoPage : ContentPage
    {
        public CheckBoxDemoPage()
        {
            InitializeComponent();
        }

        void OnItalicCheckBoxChanged(object sender, bool isChecked)
        {
            if (isChecked)
            {
                label.FontAttributes |= FontAttributes.Italic;
            }
            else
            {
                label.FontAttributes &= ~FontAttributes.Italic;
            }
        }

        void OnBoldCheckBoxChanged(object sender, bool isChecked)
        {
            if (isChecked)
            {
                label.FontAttributes |= FontAttributes.Bold;
            }
            else
            {
                label.FontAttributes &= ~FontAttributes.Bold;
            }
        }
    }
}


text: OBJS:= arch/$(ARCH)/boot.o $(OBJS) arch/$(ARCH)/isr.o arch/$(ARCH)/interrupt.o


text:
<?php

namespace Karwana\Penelope;

class NodeCollection extends ObjectCollection {

	public function __construct(NodeSchema $node_schema) {
		parent::__construct($node_schema);
	}

	protected function getQueryString($aggregate = null, array &$query_params) {
		$query_string = 'MATCH (o:' . $this->object_schema->getName() . ')';

		$i = 0;
		foreach ((array) $this->properties as $name => $value) {
			$query_params['value_' . $i] = $value;
			$where_parts[] = 'ANY (m IN {value_' . $i . '} WHERE m IN o.' . $name . ')';
			$i++;
		}

		if (!empty($where_parts)) {
			$query_string .= ' WHERE ' . join(' AND ', $where_parts);
		}

		if ($aggregate) {
			$query_string .= ' RETURN ' . $aggregate . '(o)';
		} else {
			$query_string .= ' RETURN (o)';
		}

		// Order by only makes sense when not using aggregate.
		if (!$aggregate and ($order_by = $this->getOrderBy())) {
			$query_string .= ' ORDER BY o.' . join(', o.', (array) $order_by);
		}

		return $query_string;
	}
}


text:
const int R = 256;

struct Node {
    int val = -1;
    Node* next[R];
};

class TrieST {
private:
    Node *root;
    Node* get(Node *, std::string, int);
    Node* put(Node *, std::string, int, int);

public:
    int size();
    int size(Node *);
    int get(std::string);
    void put(std::string, int);
    std::queue<std::string> keys();
    std::queue<std::string> keysWithPrefix(std::string);
    void collect(Node *, std::string, std::queue<std::string> *);

};

#endif //SANDBOX_TRIEST_HPP


text:
#import "UIView.h"

#import "GEOResourceManifestTileGroupObserver-Protocol.h"
#import "MKAnnotationContainerViewDelegate-Protocol.h"
#import "MKAnnotationManagerDelegate-Protocol.h"
#import "MKAnnotationMarkerContainer-Protocol.h"
#import "MKMapGestureControllerDelegate-Protocol.h"
#import "UIGestureRecognizerDelegate-Protocol.h"
#import "VKMapViewDelegate-Protocol.h"

@class GEOMapRegion, MKAnnotationView, MKBasicMapView, MKMapAnnotationManager, MKMapGestureController, MKNewAnnotationContainerView, MKUserLocation, NSArray, NSMutableSet, NSTimer, UIGestureRecognizer, UIImageView, UILabel, UILongPressGestureRecognizer, UIPanGestureRecognizer, UITapGestureRecognizer, UITextView, VKLabelMarker, VKMapView, VKPuckAnimator;

@interface MKWorldView : UIView <VKMapViewDelegate, UIGestureRecognizerDelegate, MKAnnotationManagerDelegate, MKAnnotationMarkerContainer, MKMapGestureControllerDelegate, GEOResourceManifestTileGroupObserver, MKAnnotationContainerViewDelegate>
{
    UIView *_contentView;
    MKBasicMapView *_basicMapView;
    VKMapView *_mapView;
    MKMapAnnotationManager *_annotationManager;
    MKNewAnnotationContainerView *_annotationContainer;
    id <MKWorldViewDelegate> _delegate;
    MKUserLocation *_userLocation;
    MKAnnotationView *_userLocationView;
    long long _userTrackingMode;
    UILabel *_debugView;
    NSTimer *_debugTimer;
    UIGestureRecognizer *_debugConsoleGesture;
    UITextView *_vectorKitDebugView;
    UIPanGestureRecognizer *_vectorKitStyleDebugGesture;
    UITapGestureRecognizer *_selectingTapGestureRecognizer;
    UITapGestureRecognizer *_nonselectingTapGestureRecognizer;
    UILongPressGestureRecognizer *_longPressGestureRecognizer;
    VKPuckAnimator *_userLocationAnimator;
    NSTimer *_defaultLocationTimer;
    id _annotationRectTest;
    id _annotationCoordinateTest;
    unsigned long long _effectsPauseCount;
    long long _originalLoopRate;
    long long _preGesturingLoopRate;
    UIImageView *_attributionBadgeView;
    struct CGSize _attributionAnchorOffset;
    MKMapGestureController *_gestureController;
    _Bool _shouldSplitRouteLine;
    MKAnnotationView *_longPressStartAnnotationView;
    NSMutableSet *_rasterOverlays;
    id _debugConsoleAdditionalInfoProvider;
    id _selectAnnotationViewAfterRedrawBlock;
    struct {
        unsigned int showsUserLocation:1;
        unsigned int ignoreLocationUpdates:1;
        unsigned int debugConsoleEnabled:1;
        unsigned int vectorKitConsoleEnabled:1;
        unsigned int inactive:1;
        unsigned int gesturing:1;
        unsigned int panning:1;
        unsigned int zooming:1;
        unsigned int rotating:1;
        unsigned int animatingRegionChange:1;
        unsigned int didStartPanningDeceleration:1;
        unsigned int regionChangeIsAnimated:1;
        unsigned int canSelectPOIs:1;
        unsigned int canSelectAllLabels:1;
        unsigned int isDraggingAnnotationMarker:1;
        unsigned int userInteractionPausesLocationUpdates:1;
        unsigned int locationPropagationEnabled:1;
        unsigned int locationPulseEnabled:1;
        unsigned int allowsRotation:1;
        unsigned int rotationEnabled:1;
        unsigned int allowsTilt:1;
        unsigned int tiltEnabled:1;
        unsigned int allowsMotionControl:1;
        unsigned int motionControlEnabled:1;
        unsigned int motionPermitted:1;
        unsigned int loading:1;
        unsigned int hasCustomLabelScaleFactor:1;
        unsigned int scrollWasEnabledBeforeProgrammaticPan:1;
        unsigned int hasFinishedInitialRender:1;
        unsigned int hasPendingCameraChange:1;
        unsigned int delegateImplementsDidStartLoading:1;
        unsigned int delegateImplementsDidFinishLoading:1;
        unsigned int delegateImplementsDidFailLoading:1;
        unsigned int delegateImplementsDidBecomeFullyDrawn:1;
        unsigned int delegateImplementsCalloutAccessoryControlTapped:1;
        unsigned int delegateImplementsWillAnimateInAnnotationViews:1;
        unsigned int delegateImplementsDidAnimateInAnnotationViews:1;
        unsigned int delegateImplementsPainterForOverlay:1;
        unsigned int delegateImplementsDidChangeMapType:1;
        unsigned int delegateImplementsWillChangeToMapDisplayStyle:1;
        unsigned int delegateImplementsDidChangeMapDisplayStyle:1;
        unsigned int delegateImplementsDidUpdateUserLocation:1;
        unsigned int delegateImplementsDidFailToLocateUser:1;
        unsigned int delegateImplementsDidChangeUserTrackingModeButton:1;
        unsigned int delegateImplementsDidChangeUserTrackingMode:1;
        unsigned int delegateImplementsRegionWillChangeAnimated:1;
        unsigned int delegateImplementsRegionDidChangeAnimated:1;
        unsigned int delegateImplementsDidChangeVisibleRegion:1;
        unsigned int delegateImplementsShouldSelectLabelMarker:1;
        unsigned int delegateImplementsWillSelectLabelMarker:1;
        unsigned int delegateImplementsDidSelectLabelMarker:1;
        unsigned int delegateImplementsLabelMarkerCalloutAccessoryControlTapped:1;
        unsigned int delegateImplementsDidDeselectLabelMarker:1;
        unsigned int delegateImplementsDidBecomePitched:1;
        unsigned int delegateImplementsCanEnter3DModeDidChange:1;
        unsigned int delegateImplementsAllowsRotationDidChange:1;
        unsigned int delegateImplementsAllowsTiltDidChange:1;
        unsigned int delegateImplementsAllowsMotionControlDidChange:1;
        unsigned int delegateImplementsDidStartUserInteraction:1;
        unsigned int delegateImplementsDidStopUserInteraction:1;
        unsigned int delegateImplementsWillStartRespondingToGesture:1;
        unsigned int delegateImplementsDidStopRespondingToGesture:1;
        unsigned int delegateImplementsShouldDelayTapResponseForAnnotationView:1;
        unsigned int delegateImplementsRectToAvoidForCallout:1;
        unsigned int delegateImplementsCurrentRouteMatch:1;
        unsigned int delegateImplementsCanShowFlyover:1;
        unsigned int delegateImplementsShowingFlyover:1;
    } _flags;
}

+ (id)mapRegionWithCenterCoordinate:(CDStruct_c3b9c2ee)arg1 zoomScale:(double)arg2 size:(struct CGSize)arg3;
@property(copy, nonatomic) id debugConsoleAdditionalInfoProvider; // @synthesize debugConsoleAdditionalInfoProvider=_debugConsoleAdditionalInfoProvider;
@property(nonatomic) struct CGSize attributionAnchorOffset; // @synthesize attributionAnchorOffset=_attributionAnchorOffset;
@property(readonly, nonatomic) VKMapView *mapView; // @synthesize mapView=_mapView;
@property(nonatomic) long long userTrackingMode; // @synthesize userTrackingMode=_userTrackingMode;
@property(readonly, nonatomic) UITapGestureRecognizer *nonselectingTapGestureRecognizer; // @synthesize nonselectingTapGestureRecognizer=_nonselectingTapGestureRecognizer;
@property(nonatomic) _Bool shouldSplitRouteLine; // @synthesize shouldSplitRouteLine=_shouldSplitRouteLine;
@property(nonatomic) id <MKWorldViewDelegate> delegate; // @synthesize delegate=_delegate;
- (void)removeRasterOverlay:(id)arg1;
- (void)addRasterOverlay:(id)arg1;
- (void)annotationContainerDidFinishMapsTransitionExpanding:(id)arg1;
- (struct CGRect)annotationContainerVisibleRect:(id)arg1;
- (struct CGRect)visibleCenteringRectInView:(id)arg1;
- (struct CGRect)visibleRectInView:(id)arg1;
- (void)annotationContainerDidDropPins:(id)arg1;
- (void)annotationContainerWillDropPins:(id)arg1;
- (void)annotationContainerDidAnimateBubble:(id)arg1;
- (void)annotationContainerWillAnimateBubble:(id)arg1;
- (double)annotationContainer:(id)arg1 pinDropDistanceForCoordinate:(CDStruct_c3b9c2ee)arg2 maxDistance:(double *)arg3 startPoint:(struct CGPoint *)arg4 shadowStartPoint:(struct CGPoint *)arg5;
- (void)annotationContainer:(id)arg1 scrollToRevealCalloutWithOffset:(struct CGPoint)arg2 annotationCoordinate:(CDStruct_c3b9c2ee)arg3 completionHandler:(id)arg4;
- (void)annotationContainer:(id)arg1 annotationView:(id)arg2 calloutAccessoryControlTapped:(id)arg3;
- (_Bool)annotationContainerIsRotated:(id)arg1;
- (_Bool)annotationContainerShouldAlignToPixels:(id)arg1;
- (void)puckAnimator:(id)arg1 updatedTargetPosition:(CDStruct_31142d93)arg2;
- (void)puckAnimatorDidStop:(id)arg1;
- (void)puckAnimator:(id)arg1 updatedPosition:(CDStruct_31142d93)arg2 course:(double)arg3;
- (void)puckAnimator:(id)arg1 runAnimation:(id)arg2;
- (void)setTracePlaybackSpeedMultiplier:(double)arg1;
- (_Bool)shouldHideOffscreenSelectedAnnotation;
- (id)annotationCoordinateTest;
- (id)annotationRectTest;
- (void)moveAnnotationRepresentation:(id)arg1 fromCoordinate:(CDStruct_c3b9c2ee)arg2 animated:(_Bool)arg3 duration:(double)arg4;
- (void)deselectAnnotationRepresentation:(id)arg1 animated:(_Bool)arg2;
- (void)showCalloutIfNecessaryForAnnotationRepresentation:(id)arg1 animated:(_Bool)arg2 avoid:(struct CGRect)arg3;
- (void)selectAnnotationRepresentation:(id)arg1 animated:(_Bool)arg2 avoid:(struct CGRect)arg3;
- (void)removeAnnotationRepresentation:(id)arg1;
- (void)addAnnotationRepresentation:(id)arg1 allowAnimation:(_Bool)arg2;
- (void)annotationManager:(id)arg1 didDeselectAnnotationRepresentation:(id)arg2;
- (void)annotationManager:(id)arg1 didSelectAnnotationRepresentation:(id)arg2;
- (void)annotationManager:(id)arg1 didAddAnnotationRepresentations:(id)arg2;
- (id)annotationManager:(id)arg1 representationForAnnotation:(id)arg2;
- (void)_handleStyleDebugGesture:(id)arg1;
- (_Bool)gestureRecognizer:(id)arg1 shouldReceiveTouch:(id)arg2;
- (_Bool)hitSomethingAtTouch:(id)arg1;
- (void)_handleLongPress:(id)arg1;
- (void)_annotationViewDragStateChanged:(id)arg1;
- (void)_handleTapToDeselect:(id)arg1;
- (void)_handleTapToSelect:(id)arg1;
- (double)gestureController:(id)arg1 shouldWaitForNextTapForDuration:(double)arg2 afterTouch:(id)arg3;
- (void)selectLabelMarker:(id)arg1 animated:(_Bool)arg2;
- (void)selectLabelMarker:(id)arg1 animated:(_Bool)arg2 avoid:(struct CGRect)arg3;
- (void)locationManagerDidResumeLocationUpdates:(id)arg1;
- (void)locationManagerDidPauseLocationUpdates:(id)arg1;
- (_Bool)locationManagerShouldPauseLocationUpdates:(id)arg1;
- (void)locationManagerDidReset:(id)arg1;
- (void)locationManagerUpdatedHeading:(id)arg1;
- (void)locationManagerFailedToUpdateLocation:(id)arg1 withError:(id)arg2;
- (void)locationManagerUpdatedLocation:(id)arg1;
- (void)_toggleDebugConsole:(id)arg1;
@property(nonatomic, getter=isVectorKitStyleDebugEnabled) _Bool vectorKitStyleDebugEnabled;
@property(nonatomic, getter=isVectorKitConsoleEnabled) _Bool vectorKitConsoleEnabled;
@property(nonatomic, getter=isDebugConsoleEnabled) _Bool debugConsoleEnabled;
- (struct CGRect)_debugViewFrame;
- (void)_updateDebugViewFrameWithEdgeInsets;
- (void)_updateDebugConsole;
- (id)_descriptionForLocation:(id)arg1 compact:(_Bool)arg2;
- (void)_updateUserLocationEffects;
- (void)setUserTrackingMode:(long long)arg1 animated:(_Bool)arg2;
- (void)_setUserTrackingMode:(long long)arg1 animated:(_Bool)arg2 fromTrackingButton:(_Bool)arg3;
@property(nonatomic) long long userTrackingZoomStyle;
- (void)_updateHeadingOrientation;
- (long long)_interfaceOrientation;
- (_Bool)canRotateForHeading;
@property(readonly, nonatomic) MKUserLocation *userLocation;
@property(readonly, nonatomic) _Bool hasUserLocation;
@property(nonatomic) _Bool showsUserLocation;
- (void)resumeUserLocationUpdates;
- (void)pauseUserLocationUpdates;
@property(nonatomic) _Bool userInteractionPausesLocationUpdates;
- (void)_stopUpdatingUserLocation;
- (void)_startUpdatingUserLocation;
@property(nonatomic) _Bool showingTraffic;
- (void)removePersistentOverlay:(id)arg1;
- (void)addPersistentOverlay:(id)arg1;
- (void)removeOverlay:(id)arg1;
- (void)addOverlay:(id)arg1;
- (struct CGPoint)convertCoordinate:(CDStruct_c3b9c2ee)arg1 toPointToView:(id)arg2;
- (CDStruct_c3b9c2ee)convertPoint:(struct CGPoint)arg1 toCoordinateFromView:(id)arg2;
- (id)mapView:(id)arg1 painterForOverlay:(id)arg2;
- (void)mapView:(id)arg1 didFinishAddingAnnotationMarkers:(id)arg2;
- (void)deselectAnnotation:(id)arg1 animated:(_Bool)arg2;
- (void)selectAnnotation:(id)arg1 animated:(_Bool)arg2 avoid:(struct CGRect)arg3;
- (void)selectAnnotation:(id)arg1 animated:(_Bool)arg2;
@property(readonly, nonatomic) MKAnnotationView *selectedAnnotationView;
@property(nonatomic) _Bool canSelectAllLabels;
@property(nonatomic) _Bool canSelectPOIs;
- (void)deselectLabelMarkerAnimated:(_Bool)arg1;
@property(readonly, nonatomic) VKLabelMarker *selectedLabelMarker;
- (void)dismissExpandedCallout;
- (_Bool)isCalloutExpanded;
- (id)calloutPopoverController;
- (void)addViewsForAnnotations:(id)arg1;
- (id)viewForAnnotation:(id)arg1;
- (id)dequeueReusableAnnotationViewWithIdentifier:(id)arg1;
@property(readonly, nonatomic) NSArray *annotationViews;
@property(readonly, nonatomic) NSArray *annotations;
- (void)replaceAnnotation:(id)arg1 withAnnotation:(id)arg2;
- (void)removeAnnotations:(id)arg1;
- (void)removeAnnotation:(id)arg1;
- (void)addAnnotations:(id)arg1 allowAnimation:(_Bool)arg2;
- (void)addAnnotation:(id)arg1 allowAnimation:(_Bool)arg2;
- (void)addAnnotations:(id)arg1;
- (void)addAnnotation:(id)arg1;
- (void)stopScenicAnimation;
- (void)performScenicAnimationForLocation:(CDStruct_c3b9c2ee)arg1 animationType:(int)arg2;
- (void)prepareScenicAnimationForLocation:(CDStruct_c3b9c2ee)arg1 animationType:(int)arg2 completion:(id)arg3;
@property(nonatomic) _Bool rendersInBackground;
- (id)snapshotImage;
- (void)stopPlaceCardAnimation;
- (void)startPlaceCardAnimationAtCoordinate:(CDStruct_c3b9c2ee)arg1 andDistance:(double)arg2;
@property(readonly, nonatomic) _Bool canShowAnimationForPlaceCard;
- (void)showAnimationForSearchResult:(id)arg1 withMapRegion:(id)arg2;
- (_Bool)canShowAnimationForSearchResultWithMapRegion:(id)arg1;
@property(readonly, nonatomic, getter=isGoingToDefaultLocation) _Bool goingToDefaultLocation;
- (void)goToDefaultLocation;
@property(readonly, nonatomic) _Bool canShowFlyover;
@property(readonly, nonatomic, getter=isShowingFlyover) _Bool showingFlyover;
@property(readonly, nonatomic, getter=isMotionControlActive) _Bool motionControlActive;
- (void)stopMotionControl;
- (void)startMotionControl;
@property(readonly, nonatomic) _Bool canEnter3DMode;
@property(readonly, nonatomic, getter=isPitched) _Bool pitched;
- (void)exit3DMode;
- (void)enter3DMode;
- (CDStruct_90e2a262)mapRectThatFits:(CDStruct_90e2a262)arg1 edgePadding:(struct UIEdgeInsets)arg2;
- (void)goToCoordinateRegion:(CDStruct_90e2a262)arg1 animationType:(int)arg2;
- (void)goToCenterCoordinate:(CDStruct_c3b9c2ee)arg1 zoomLevel:(double)arg2 animationType:(int)arg3;
- (void)_goToMapRegion:(id)arg1 animationType:(int)arg2;
- (id)_mapRegionWithCenterCoordinate:(CDStruct_c3b9c2ee)arg1 zoomScale:(double)arg2;
@property(readonly) double zoomLevel;
- (double)_zoomScale;
- (double)_zoomScaleForMapRegion:(id)arg1;
- (void)setMapRegion:(id)arg1 animationDuration:(double)arg2 pitch:(double)arg3 yaw:(double)arg4 completion:(id)arg5;
- (void)setMapRegion:(id)arg1 animated:(_Bool)arg2 completion:(id)arg3;
- (void)setMapRegion:(id)arg1 animated:(_Bool)arg2;
@property(retain, nonatomic) GEOMapRegion *mapRegion;
- (void)stopPanningAtPoint:(struct CGPoint)arg1;
- (void)updatePanWithTranslation:(struct CGPoint)arg1;
- (void)startPanningAtPoint:(struct CGPoint)arg1;
- (void)zoomOut;
- (void)zoomIn;
- (void)_zoomWithAmount:(double)arg1;
- (id)mapRegionThatFits:(id)arg1 edgePadding:(struct UIEdgeInsets)arg2;
@property(readonly, nonatomic) GEOMapRegion *mapRegionOfInterest;
- (void)setCenterCoordinate:(CDStruct_c3b9c2ee)arg1 animated:(_Bool)arg2;
@property(nonatomic) CDStruct_c3b9c2ee centerCoordinate;
@property(readonly, nonatomic) double yaw;
@property(nonatomic) _Bool panWithMomentum;
@property(nonatomic, getter=isTiltEnabled) _Bool tiltEnabled;
@property(readonly, nonatomic, getter=isZooming) _Bool zooming;
@property(readonly, nonatomic, getter=isRotating) _Bool rotating;
@property(nonatomic, getter=isRotationEnabled) _Bool rotationEnabled;
@property(nonatomic, getter=isZoomEnabled) _Bool zoomEnabled;
@property(nonatomic, getter=isScrollEnabled) _Bool scrollEnabled;
- (void)setUserInteractionEnabled:(_Bool)arg1;
- (_Bool)isUserInteractionEnabled;
- (void)setFrame:(struct CGRect)arg1;
- (void)setBounds:(struct CGRect)arg1;
- (void)_sizeDidChange;
- (void)setHidden:(_Bool)arg1;
@property(nonatomic) long long mapDisplayStyle;
@property(nonatomic) unsigned long long mapType;
- (_Bool)_supportsVKMapType:(long long)arg1;
- (void)stopEffects;
- (void)startEffects;
@property(readonly, nonatomic) _Bool regionChangeIsUserInitiated;
@property(readonly, nonatomic, getter=isChangingRegion) _Bool changingRegion;
- (id)mapView:(id)arg1 presentationForAnnotation:(id)arg2;
- (void)mapView:(id)arg1 showingFlyoverDidChange:(_Bool)arg2;
- (void)mapView:(id)arg1 canShowFlyoverDidChange:(_Bool)arg2;
- (void)mapView:(id)arg1 canEnter3DModeDidChange:(_Bool)arg2;
- (void)mapView:(id)arg1 didFinishChangingMapDisplayStyle:(long long)arg2;
- (void)mapView:(id)arg1 didBecomePitched:(_Bool)arg2;
- (void)mapView:(id)arg1 willTransitionFrom:(long long)arg2 to:(long long)arg3 duration:(double)arg4;
- (void)gestureControllerDidStopTiltingDecelerating:(id)arg1;
- (void)gestureControllerDidStopTilting:(id)arg1 willDecelerate:(_Bool)arg2;
- (void)gestureControllerWillStartTilting:(id)arg1;
- (void)gestureControllerDidStopRotatingDecelerating:(id)arg1;
- (void)gestureControllerDidStopRotating:(id)arg1 willDecelerate:(_Bool)arg2;
- (void)gestureControllerWillStartRotating:(id)arg1;
- (void)gestureControllerDidStopTwoFingerLongPress:(id)arg1;
- (void)gestureControllerWillStartTwoFingerLongPress:(id)arg1;
- (void)gestureControllerDidStopZoomingDecelerating:(id)arg1 direction:(long long)arg2;
- (void)gestureControllerDidStopZooming:(id)arg1 direction:(long long)arg2 willDecelerate:(_Bool)arg3;
- (void)gestureControllerWillStartZooming:(id)arg1 animated:(_Bool)arg2;
- (void)gestureControllerDidStopPanningDecelerating:(id)arg1;
- (void)gestureControllerDidStopPanning:(id)arg1 willDecelerate:(_Bool)arg2;
- (void)gestureControllerWillStartPanning:(id)arg1;
- (void)mapView:(id)arg1 selectedLabelMarkerWillDisappear:(id)arg2;
- (void)mapViewDidStopRegionAnimation:(id)arg1 completed:(_Bool)arg2;
- (void)mapViewWillStartRegionAnimation:(id)arg1;
- (void)_updateIconsShouldAlignToPixels;
- (_Bool)_iconsShouldAlignToPixels;
- (void)mapViewDidChangeVisibleRegion:(id)arg1;
- (void)_didChangeRegion;
- (void)_willChangeRegion:(_Bool)arg1 userInitiated:(_Bool)arg2;
- (void)gestureControllerDidStopUserInteraction:(id)arg1;
- (void)gestureControllerWillStartUserInteraction:(id)arg1;
- (void)mapViewDidBecomeFullyDrawn:(id)arg1 hasFailedTiles:(_Bool)arg2;
- (void)mapViewDidFailLoadingTiles:(id)arg1 withError:(id)arg2;
- (void)mapViewDidFinishLoadingTiles:(id)arg1;
- (void)mapViewDidStartLoadingTiles:(id)arg1;
- (void)mapViewDidDraw:(id)arg1;
- (void)applicationDidBecomeActive:(id)arg1;
- (void)applicationWillResignActive:(id)arg1;
- (void)_addDebugGesture;
- (struct UIEdgeInsets)defaultInsetsForPinAnnotations;
@property(nonatomic) struct UIEdgeInsets fullyOccludedEdgeInsets;
@property(nonatomic) struct UIEdgeInsets edgeInsets;
- (void)restoreViewportFromDictionary:(id)arg1;
- (id)viewportDictionary;
@property(nonatomic, getter=isLoadingEnabled) _Bool loadingEnabled;
@property(nonatomic, getter=isLocationPulseEnabled) _Bool locationPulseEnabled;
@property(nonatomic, getter=isLocationPropagationEnabled) _Bool locationPropagationEnabled;
@property(nonatomic) _Bool allowsPopoverWhenNotInWindow;
@property(nonatomic) _Bool motionPermitted;
- (void)_updateMotionState;
- (void)_updateAllowsMotionControl;
@property(readonly, nonatomic) _Bool allowsMotionControl;
- (void)_updateAllowsTilt;
@property(readonly, nonatomic) _Bool allowsTilt;
- (void)_updateAllowsRotation;
@property(readonly, nonatomic) _Bool allowsRotation;
- (id)detailedDescription;
- (id)mapAttributionWithStringAttributes:(id)arg1;
@property(readonly, nonatomic) NSArray *visibleTileSets;
- (void)deviceOrientationDidChange:(id)arg1;
- (void)contentSizeCategoryDidChange:(id)arg1;
- (void)geoDefaultsDidChange:(id)arg1;
- (void)resourceManifestManagerDidChangeActiveTileGroup:(id)arg1;
- (void)resourceManifestManagerWillChangeActiveTileGroup:(id)arg1;
- (void)_updateAttribution;
@property(readonly, nonatomic, getter=isFullyDrawn) _Bool fullyDrawn;
@property(nonatomic) long long labelScaleFactor;
@property(nonatomic) double longPressDuration;
- (void)dealloc;
- (id)initWithFrame:(struct CGRect)arg1 gestureRecognizerHostView:(id)arg2 motionPermitted:(_Bool)arg3;
- (id)initWithFrame:(struct CGRect)arg1;

@end


text:
require 'spec_helper'

describe Blacklist do
  it 'handles blacklisted URLs' do
    urls = [
      "https://github.com/author/notips",
      "https://bitbucket.org/author/notips",
      "https://github.com/notips/*",
      "https://bitbucket.org/notips/*",
    ]

    list = Blacklist.new(urls)

    # Blacklisted projects.
    expect(list.include?("https://github.com/author/notips")).to eq(true)
    expect(list.include?("http://github.com/author/notips?tips=true")).to eq(true)
    expect(list.include?("https://bitbucket.org/author/notips")).to eq(true)
    expect(list.include?("github.com/author/notips")).to eq(true)
    expect(list.include?("author/notips")).to eq(true)

    # Non-blacklisted projects.
    expect(list.include?("https://github.com/author/tipme")).to eq(false)
    expect(list.include?("https://bitbucket.org/author/tipme")).to eq(false)

    # Blacklisted authors.
    expect(list.include?("https://github.com/notips/tipme")).to eq(true)
    expect(list.include?("https://bitbucket.org/notips/tipme")).to eq(true)
  end
end


text:
package com.haskforce.frege.lang.parser;

import com.haskforce.frege.lang.FregeLanguage;
import com.haskforce.frege.lang.lexer.FregeParsingLexer;
import com.haskforce.frege.lang.psi.FregeElementFactory;
import com.haskforce.frege.lang.psi.FregeFile;
import com.haskforce.frege.lang.psi.FregeTokenTypes;
import com.intellij.extapi.psi.ASTWrapperPsiElement;
import com.intellij.lang.ASTNode;
import com.intellij.lang.ParserDefinition;
import com.intellij.lang.PsiParser;
import com.intellij.lexer.Lexer;
import com.intellij.openapi.project.Project;
import com.intellij.psi.FileViewProvider;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.psi.tree.IFileElementType;
import com.intellij.psi.tree.TokenSet;
import org.jetbrains.annotations.NotNull;

/** Registers a parser and parsing lexer for Frege files. */
public class FregeParserDefinition implements ParserDefinition {

  // NOTE: You must use CabalLanguage.INSTANCE instead of Language.findInstance()
  // since the language may not have been initialized yet.
  private static final IFileElementType FILE = new IFileElementType(FregeLanguage.INSTANCE);

  @NotNull
  @Override
  public Lexer createLexer(Project project) {
    return new FregeParsingLexer();
  }

  @Override
  public PsiParser createParser(Project project) {
    return new FregePsiParser();
  }

  @Override
  public IFileElementType getFileNodeType() {
    return FILE;
  }

  @NotNull
  @Override
  public TokenSet getWhitespaceTokens() {
    return whitespaceTokens;
  }

  private static TokenSet whitespaceTokens = TokenSet.create(
    FregeTokenTypes.WHITE_SPACE
  );

  @NotNull
  @Override
  public TokenSet getCommentTokens() {
    return commentTokens;
  }

  private static TokenSet commentTokens = TokenSet.create(
    FregeTokenTypes.BLOCK_COMMENT,
    FregeTokenTypes.LINE_COMMENT,
    FregeTokenTypes.DOC_COMMENT
  );

  @NotNull
  @Override
  public TokenSet getStringLiteralElements() {
    return stringLiterals;
  }

  private static TokenSet stringLiterals = TokenSet.create(
    FregeTokenTypes.STRING_LITERAL
  );

  @NotNull
  @Override
  public PsiElement createElement(ASTNode node) {
    return FregeElementFactory.createElement(node);
  }

  @Override
  public PsiFile createFile(FileViewProvider viewProvider) {
    return new FregeFile(viewProvider);
  }

  @Override
  public SpaceRequirements spaceExistanceTypeBetweenTokens(ASTNode left, ASTNode right) {
    return SpaceRequirements.MAY;
  }
}


text:
/**
 * Nahravani souboru.
 *
 */
angular.module('zdrojak.service').factory('uploadFile', function(){
  return function() {
    return new Upload(new XMLHttpRequest(), new FormData());
  }
});


text:
external help file: Microsoft.Azure.Commands.ResourceManager.Cmdlets.dll-Help.xml
Module Name: AzureRM.Resources
ms.assetid: D5067FD8-2FB1-413C-9F59-84E83A74343E
online version: https://docs.microsoft.com/en-us/powershell/module/azurerm.resources/register-azurermresourceprovider
schema: 2.0.0
---

# Register-AzureRmResourceProvider

## SYNOPSIS
Registers a resource provider.

## SYNTAX

```
Register-AzureRmResourceProvider -ProviderNamespace <String> [-ApiVersion <String>] [-Pre]
 [-DefaultProfile <IAzureContextContainer>] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION
The **Register-AzureRmResourceProvider** cmdlet registers an Azure resource provider.

## EXAMPLES

### 1:
```

```

## PARAMETERS

### -ApiVersion
Specifies the API version that is supported by the resource Provider.
You can specify a different version than the default version.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure

```yaml
Type: IAzureContextContainer
Parameter Sets: (All)
Aliases: AzureRmContext, AzureCredential

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -Pre
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ProviderNamespace
Specifies the namespace of the resource provider.

```yaml
Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
```

### -Confirm
Prompts you for confirmation before running the cmdlet.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

### Microsoft.Azure.Commands.ResourceManager.Cmdlets.SdkModels.PSResourceProvider

## NOTES

## RELATED LINKS

[Get-AzureRmResourceProvider](./Get-AzureRmResourceProvider.md)

[Unregister-AzureRmResourceProvider](./Unregister-AzureRmResourceProvider.md)


text:
package comparison_instructions

import (
	"github.com/Frederick-S/jvmgo/instructions/base_instructions"
	"github.com/Frederick-S/jvmgo/runtime_data_area"
)

// if_acmpeq
// Branch if reference comparison succeeds
type IfACmpEq struct {
	base_instructions.BranchInstruction
}

func (ifACmpEq *IfACmpEq) Execute(frame *runtime_data_area.Frame) {
	operandStack := frame.GetOperandStack()
	referenceValue2 := operandStack.PopReferenceValue()
	referenceValue1 := operandStack.PopReferenceValue()

	if referenceValue1 == referenceValue2 {
		base_instructions.JumpToBranch(frame, ifACmpEq.Offset)
	}
}


text:
using System;
using System.Windows;
using MahApps.Metro.Controls.Dialogs;
using System.Collections.ObjectModel;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Media;
using System.Collections.Generic;

namespace PengChat3
{
    internal static class Utility
    {
        public static void Error(string msg, bool useWin8Style = true, bool shutdown = false)
        {
            if (useWin8Style)
            {
                App.Instance.ShowMessageAsync("PengChat3 - error", msg, MessageDialogStyle.Affirmative);
            }
            else
                MessageBox.Show(msg, "PengChat3 - error", MessageBoxButton.OK, MessageBoxImage.Error);

            if (shutdown)
                Application.Current.Shutdown(-1);
        }

        public static T Find<T>(this ObservableCollection<T> coll, Func<T, bool> condition)
        {
            var item = coll.Where(condition);

            if (item.Count() > 0)
                return item.ToArray()[0];
            else
                return default(T);
        }

        public static int Remove<T>(this ObservableCollection<T> coll, Func<T, bool> condition)
        {
            var itemsToRemove = coll.Where(condition).ToList();

            foreach (var itemToRemove in itemsToRemove)
            {
                coll.Remove(itemToRemove);
            }

            return itemsToRemove.Count;
        }
    }

    public static class VisualTreeHelperExtensions
    {
        public static T FindVisualParent<T>(DependencyObject depObj) where T : DependencyObject
        {
            var parent = VisualTreeHelper.GetParent(depObj);

            if (parent == null || parent is T)
                return (T)parent;

            return FindVisualParent<T>(parent);
        }

        public static T FindVisualChild<T>(DependencyObject depObj) where T : Visual
        {
            if (depObj != null)
            {
                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)
                {
                    DependencyObject child = VisualTreeHelper.GetChild(depObj, i);

                    if (child != null && child is T)
                    {
                        return (T)child;
                    }

                    foreach (T childOfChild in FindVisualChildren<T>(child))
                    {
                        return childOfChild;
                    }
                }
            }
            return null;
        }

        public static T FindVisualChild<T>(DependencyObject depObj, string name) where T : FrameworkElement
        {
            if (depObj != null)
            {
                for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)
                {
                    DependencyObject child = VisualTreeHelper.GetChild(depObj, i);

                    if (child != null && child is T && (child as T).Name.Equals(name))
                    {
                        return (T)child;
                    }

                    foreach (T childOfChild in FindVisualChildren<T>(child))
                    {
                        if (childOfChild.Name.Equals(name))
                            return childOfChild;
                    }
                }
            }
            return null;
        }

        public static IEnumerable<T> FindVisualChildren<T>(DependencyObject depObj) where T : DependencyObject
        {
            if (depObj == null)
                yield break;

            for (int i = 0; i < VisualTreeHelper.GetChildrenCount(depObj); i++)
            {
                DependencyObject child = VisualTreeHelper.GetChild(depObj, i);

                if (child != null && child is T)
                {
                    yield return (T)child;
                }

                foreach (T childOfChild in FindVisualChildren<T>(child))
                {
                    yield return childOfChild;
                }
            }
        }
    }
}


text:
package time;

import org.joda.time.*;
import org.joda.time.chrono.CopticChronology;
import org.joda.time.chrono.JulianChronology;
import org.junit.Test;

/**
 * @author ze.liu
 * @since 2014/6/5
 */
public class JodaExample2 {

    /**
     * 部分时间Partial,与Instant的区别是,不包含时区
     */
    @Test
    public void test01() {
        //年月日
        LocalDate localDate = new LocalDate();
        System.out.println(localDate);
        //时分秒
        LocalTime localTime = new LocalTime();
        System.out.println(localTime);
        //都有
        LocalDateTime localDateTime = new LocalDateTime();
        System.out.println(localDateTime);
    }

    @Test
    public void test02() {
        //夏令时转换
        LocalDate localDate = new LocalDate(1987, 4, 12);
        DateTime dateTime = localDate.toDateTimeAtStartOfDay();
        System.out.println(dateTime);

        LocalDateTime localDateTime = new LocalDateTime(1987, 4, 12, 0, 0);
        System.out.println(localDateTime);
        //下面转换报异常,因为0点被跳过了
//        localDateTime.toDateTime();
//        java.lang.IllegalArgumentException:Illegal instant due to com.jt.boot.time zone offset transition:1987 - 04 - 11 T16:
//        00:00.000
        //转成LocalDate再用toDateTimeAtStartOfDay
        LocalDate localDate1 = new LocalDate(localDateTime);
        System.out.println(localDate1);
    }

    /**
     * 间隔是两个时间之间的毫秒数
     * 包含时区,但是支持一个时区,一个日历
     * 是半闭半开,start是包含的,end是不包含的,因为end都比start大
     */
    @Test
    public void test03() {
        DateTime start = new DateTime(2004, 12, 25, 0, 0, 0, 0);
        DateTime end = new DateTime(2004, 12, 25, 0, 0, 0, 1);
        Interval interval = new Interval(start, end);
        System.out.println(interval.toDurationMillis());

        DateTime startDateTime = interval.getStart();
        DateTime endDateTime = interval.getEnd();

        Duration duration = interval.toDuration();

        Period period = interval.toPeriod();
    }

    /**
     * instant  +  duration  =  instant
     * duration通过间隔获取,只是毫秒数,不含时区
     */
    @Test
    public void test04() {
        DateTime start = new DateTime(2004, 12, 25, 0, 0, 0, 0);
        DateTime end = new DateTime(2004, 12, 25, 0, 0, 1, 100);
        Interval interval = new Interval(start, end);
        Duration duration = interval.toDuration();
        System.out.println(duration.getStandardSeconds());

        DateTime startDateTime = new DateTime(2004, 12, 25, 0, 0, 0, 0);
        DateTime endDateTime = new DateTime(2005, 1, 1, 0, 0, 0, 0);

// duration in ms between two instants
        Duration dur = new Duration(start, end);

// calc will be the same as end
        DateTime calc = start.plus(dur);

    }

    /**
     * duration和period的区别是period还可以用年、日表示,但duration只用毫秒数表示
     *

     * instant  +  period  =  instant
     * 如果你给二月加一个月,那么是三月,给四月加一个月,是五月,但这一个月的毫秒数不同,所以需要period
     */
    @Test
    public void test05() {
        DateTime start = new DateTime(2004, 12, 25, 0, 0, 0, 0);
        DateTime end = new DateTime(2006, 1, 1, 0, 0, 0, 0);

// period of 1 year and 7 days
        Period period = new Period(start, end);

// calc will equal end
        DateTime calc = start.plus(period);

// able to calculate whole days between two dates easily
        Days days = Days.daysBetween(start, end);

// able to calculate whole months between two dates easily
        Months months = Months.monthsBetween(start, end);
    }

    /**
     * 年表的概念joda与jdk不同,jdk的实现是通过实现calendar的子类来实现不同的日历,这样不容易扩展
     * joda使用可拔插的方式实现年表,在子类之间添加一个容器,用来装需要的年表
     * 1583之前的日期不使用,因为计算闰年的方式不同
     * The Julian calendar defines a leap year as once every four years.但这是不准确的
     * 有以下几种年表实现
     *

     *
ISO - Based on the ISO8601 standard and suitable for use after about 1600
     *
GJ - Historically accurate calendar with Julian followed by Gregorian
     *
Gregorian - The Gregorian calendar system used for all com.jt.boot.time (proleptic)
     *
Julian - The Julian calendar system used for all com.jt.boot.time (proleptic)
     *
Buddhist - The Buddhist calendar system which is an offset in years from GJ
     *
Coptic - The Coptic calendar system which defines 30 day months
     *
Ethiopic - The Ethiopic calendar system which defines 30 day months
     *

     */
    @Test
    public void test06() {
        DateTimeZone zone = DateTimeZone.forID("Europe/London");
        Chronology coptic = CopticChronology.getInstance(zone);

// current com.jt.boot.time with coptic chronology
        DateTime dt = new DateTime(coptic);

        int year = dt.getYear();   // gets the current coptic year
        int month = dt.getMonthOfYear(); // gets the current coptic month

        // setup date object for the Battle of Hastings in 1066
        Chronology chrono = JulianChronology.getInstance();
        DateTime dt2 = new DateTime(1066, 10, 14, 10, 0, 0, 0, chrono);
    }

    /**
     * 时区的问题
     * 可以下载 tz database,然后重新打包,对joda进行时区的更新(因为时区总是变的,例如中国在86年到91年间实行夏令时,后来又不用了)
     * org.joda.com.jt.boot.time.tz下面是时区库
     */
    @Test
    public void test07() {

    }
}


text:
package com.speedment.runtime.compute.trait;

import com.speedment.runtime.compute.expression.Expression;

import java.util.function.Function;

/**
 * Trait for expressions that has a {@link #compose(Function)} method similar to
 * {@link Function#compose(Function)}, but even primitive expressions might
 * implement this trait.
 *
 * @author Emil Forslund
 * @since  1.2.0
 */
public interface HasCompose<T> {

    /**
     * Returns a composed expression that first applies the {@code before}
     * function to its input, and then applies this function to the result.
     * If evaluation of either function throws an exception, it is relayed to
     * the caller of the composed function.
     *
     * @param <V> the type of input to the {@code before} function, and to the
     *            composed expression
     * @param before the function to apply before this function is applied
     * @return a composed function that first applies the {@code before}
     *         function and then applies this function
     * @throws NullPointerException if before is null
     */
    <V> Expression<V> compose(Function<? super V, ? extends T> before);
}


text:
var util = require("util"),
    http = require("http"),
    https = require("https"),
    url = require("url"),
    EventEmitter = require("events").EventEmitter,
    UserError = require("usererror"),
    BufferedStream = require("bufferedstream"),
    utils = require("./utils");

/**
 * The current version of Strata as [major, minor, patch].
 */
exports.version = [0, 15, 1];

/**
 * The default port that Strata servers run on.
 */
exports.defaultPort = 1982;

exports.run = run;
exports.createServer = createServer;
exports.startServer = startServer;
exports.bind = bind;
exports.env = makeEnv;
exports.call = call;
exports.handleError = handleError;
exports.Error = StrataError;
exports.InvalidRequestBodyError = InvalidRequestBodyError;

// Setup methods that can be called directly on this module that will delegate
// to the default build. This is the high-level sugar API.

var build = require("./build");
var _defaultApp;

function defaultApp() {
    if (_defaultApp == null) {
        _defaultApp = build();
    }

    return _defaultApp;
}

["use", "map", "route", "get", "post", "put", "delete", "head", "options"].forEach(function (method) {
    exports[method] = function () {
        var app = defaultApp();
        return app[method].apply(app, arguments);
    };
});

exports.__defineGetter__("app", function () {
    return _defaultApp;
});

/**
 * Creates and starts a server for the given `app`. If an `opts` object is
 * given it may contain any properties used to create and start the server
 * (see `createServer` and `startServer`).
 */
function run(app, opts, listeningListener) {
    if (typeof app === "function") {
        // If the user supplies an app here and we already have a _defaultApp
        // configured, then delegate to the _defaultApp.
        if (_defaultApp && _defaultApp !== app) {
            _defaultApp.run(app);
            app = _defaultApp;
        }
    } else {
        listeningListener = opts;
        opts = app;
        app = defaultApp(); // Run the _defaultApp.
    }

    if (typeof opts === "function") {
        listeningListener = opts;
        opts = null;
    }

    opts = opts || {};

    var server = createServer(opts);
    bind(app, server);
    startServer(server, opts, listeningListener);

    return server;
}

/**
 * Creates an HTTP server. If an `opts` object is given, it may contain any of
 * the following properties:
 *
 *   - key      Private key to use for SSL (HTTPS only)
 *   - cert     Public X509 certificate to use (HTTPS only)
 *
 * If given, the `requestListener` callback is bound to the "request" event
 * of the server.
 */
function createServer(opts, requestListener) {
    if (typeof opts === "function") {
        requestListener = opts;
        opts = null;
    }

    opts = opts || {};

    var server;
    if (opts.key && opts.cert) {
        server = https.createServer({key: opts.key, cert: opts.cert});
    } else {
        server = http.createServer();
    }

    if (typeof requestListener === "function") {
        server.on("request", requestListener);
    }

    return server;
}

/**
 * Starts the given `server`. The given `opts` object may contain any of the
 * following properties:
 *
 *   - host     The host name to accept connections on (defaults to INADDR_ANY)
 *   - port     The port to listen on (defaults to strata.defaultPort)
 *   - socket   Unix socket file to listen on (trumps host/port)
 *   - quiet    Set `true` to prevent the server from writing a startup message
 *              to the console after it starts
 *
 * If given, the `listeningListener` callback is bound to the "listening" event
 * of the server.
 */
function startServer(server, opts, listeningListener) {
    if (typeof opts === "function") {
        listeningListener = opts;
        opts = null;
    }

    opts = opts || {};

    if (!opts.quiet) {
        server.on("listening", function () {
            var addr = server.address();

            var msg = ">> Strata web server version " + exports.version.join(".");
            msg += " running on node " + process.versions.node + "\n";
            msg += ">> Listening on " + addr.address;

            if (addr.port) {
                msg += ":" + addr.port;
            }

            msg += ", CTRL+C to stop";

            console.log(msg);
        });
    }

    if (typeof listeningListener === "function") {
        server.on("listening", listeningListener);
    }

    if (opts.socket) {
        server.listen(opts.socket);
    } else {
        server.listen(opts.port || exports.defaultPort, opts.host);
    }
}

/**
 * Binds the given `app` to be called whenever the given `server` receives a
 * new request. The `app` must be a valid strata application (see the SPEC).
 */
function bind(app, server) {
    if (typeof app !== "function") {
        throw new StrataError("App must be a function");
    }

    var protocol;
    if (server instanceof https.Server) {
        protocol = "https:";
    } else {
        protocol = "http:";
    }

    var serverName, serverPort;
    server.on("listening", function () {
        var addr = server.address();
        serverName = process.env.SERVER_NAME || addr.address;
        serverPort = String(addr.port || "");
    });

    server.on("request", function (req, res) {
        var uri = url.parse(req.url);
        var env = makeEnv({
            protocol: protocol,
            protocolVersion: req.httpVersion,
            requestMethod: req.method,
            requestTime: new Date,
            remoteAddr: req.connection.remoteAddress,
            remotePort: req.connection.remotePort,
            serverName: serverName,
            serverPort: serverPort,
            pathInfo: uri.pathname,
            queryString: uri.query,
            headers: req.headers,
            input: req,
            error: process.stderr
        });

        call(app, env, function (status, headers, body) {
            res.writeHead(status, headers);

            if (typeof body === "string") {
                if (body == "") {
                    res.end();
                } else {
                    res.end(body);
                }
            } else {
                // Resume the stream in case it's paused.
                if (typeof body.resume === "function") {
                    body.resume();
                }

                util.pump(body, res);
            }
        });
    });
}

/**
 * Creates an environment object using the given `opts`, which should be an
 * object with any of the following properties:
 *
 *   - protocol             The protocol being used (i.e. "http:" or "https:")
 *   - protocolVersion      The protocol version
 *   - requestMethod        The request method (e.g. "GET" or "POST")
 *   - requestTime          A Date that indicates the time the request was received
 *   - remoteAddr           The IP address of the client
 *   - remotePort           The port being used on the client machine
 *   - serverName           The host name of the server
 *   - serverPort           The port number the server is listening on
 *   - scriptName           The virtual location of the application
 *   - pathInfo             The path of the request
 *   - queryString          The query string
 *   - headers              An object of HTTP headers
 *   - input                The input stream of the request body
 *   - error                The error stream
 */
function makeEnv(opts) {
    opts = opts || {};

    var env = {};

    env.protocol = opts.protocol || "http:";
    env.protocolVersion = opts.protocolVersion || "1.0";
    env.requestMethod = (opts.requestMethod || "GET").toUpperCase();
    env.requestTime = opts.requestTime || new Date;
    env.remoteAddr = opts.remoteAddr || "";
    env.remotePort = opts.remotePort || "";
    env.serverName = opts.serverName || "";
    env.serverPort = opts.serverPort || "";
    env.scriptName = opts.scriptName || "";
    env.pathInfo = opts.pathInfo || "";
    env.queryString = opts.queryString || "";

    if (env.pathInfo === "" && env.scriptName === "") {
        env.pathInfo = "/";
    }

    if (opts.headers) {
        var propName;
        for (var headerName in opts.headers) {
            switch (headerName.toLowerCase()) {
            case "content-type":
                env.contentType = opts.headers[headerName];
                break;
            case "content-length":
                env.contentLength = opts.headers[headerName];
                break;
            default:
                // Add http* properties for all other HTTP headers.
                propName = utils.httpPropertyName(headerName);
                env[propName] = opts.headers[headerName];
            }
        }
    }

    env.input = new BufferedStream(opts.input || "");
    env.error = opts.error || process.stderr;
    env.strataVersion = exports.version;

    return env;
}

/**
 * Calls the given `app` with the given `env` and `callback`. If any error is
 * thrown synchronously, it is caught and passed to `handleError`.
 *
 * IMPORTANT: This does not handle errors that are thrown inside a callback. Any
 * error that occurs inside a callback should pass that object as the first
 * argument to the caller.
 */
function call(app, env, callback) {
    function handleResponse(status, headers, body) {
        if (env.requestMethod == "HEAD" || utils.emptyBody(status)) {
            headers["Content-Length"] = "0";
            body = "";
        } else if (typeof body !== "string" && !headers["Content-Length"]) {
            headers["Transfer-Encoding"] = "chunked";
        }

        callback(status, headers, body);
    }

    try {
        app(env, handleResponse);
    } catch (err) {
        handleError(err, env, handleResponse);
    }
}

/**
 * This is the default global error handler. It simply logs the error to
 * the `env.error` stream and returns a 500 response to the client. Override
 * this function for custom error handling.
 *
 * IMPORTANT: The return value of this function is a boolean that indicates
 * whether or not a response was issued via the given callback. If no response
 * is issued the calling code may assume that the error was successfully
 * recovered and should continue.
 */
function handleError(err, env, callback) {
    var stack = err.fullStack || err.stack;

    if (!stack) {
        // Provide as much information as we can, even though the error
        // doesn't have a proper stack trace.
        stack = (err.name || "Error") + ": " + err.message;
    }

    env.error.write("Unhandled error!\n" + stack + "\n");

    utils.serverError(env, callback);

    return true;
}

/**
 * This error is the base class for all errors in Strata.
 */
function StrataError(message, cause) {
    UserError.apply(this, arguments);
}

util.inherits(StrataError, UserError);

/**
 * This error is returned when the request body is not valid for some reason,
 * probably because it does not conform to the Content-Type indicated in the
 * request headers.
 */
function InvalidRequestBodyError(message, cause) {
    message = message || "Invalid Request Body";
    StrataError.call(this, message, cause);
}

util.inherits(InvalidRequestBodyError, StrataError);

// Setup dynamic loading of modules, accessible by property name.

var modules = {
    // Constructors
    "Header": "header",
    "Request": "request",
    "Response": "response",
    // Middleware
    "authBasic": "auth/basic",
    "build": "build",
    "cascade": "cascade",
    "commonLogger": "commonlogger",
    "contentLength": "contentlength",
    "contentType": "contenttype",
    "directory": "directory",
    "file": "file",
    "flash": "flash",
    "gzip": "gzip",
    "jsonp": "jsonp",
    "lint": "lint",
    "methodOverride": "methodoverride",
    "rewrite": "rewrite",
    "router": "router",
    "sessionCookie": "session/cookie",
    "timeout": "servertimeout",
    // Other
    "manual": "manual",
    "mock": "mock",
    "multipart": "multipart",
    "querystring": "querystring",
    "redirect": "redirect",
    "urlMap": "urlmap",
    "utils": "utils"
};

for (var propertyName in modules) {
    (function (path) {
        exports.__defineGetter__(propertyName, function () {
            return require("./" + path);
        });
    })(modules[propertyName]);
}


text:
package apple.mediaplayer;

import java.io.*;
import java.nio.*;
import java.util.*;
import com.google.j2objc.annotations.*;
import com.google.j2objc.runtime.*;
import com.google.j2objc.runtime.block.*;
import apple.audiotoolbox.*;
import apple.corefoundation.*;
import apple.coregraphics.*;
import apple.coreservices.*;
import apple.foundation.*;
import apple.uikit.*;

/**
 * @since Available in iOS 4.0 and later.
 */
@Library("MediaPlayer/MediaPlayer.h") @Mapping("MPTimedMetadata")
public class MPTimedMetadata
    extends NSObject
     {

    @Mapping("init")
    public MPTimedMetadata() { }

    @Mapping("key")
    public native String getKey();
    @Mapping("keyspace")
    public native String getKeyspace();
    @Mapping("value")
    public native Object getValue();
    @Mapping("timestamp")
    public native double getTimestamp();
    @Mapping("allMetadata")
    public native NSDictionary<NSString, NSObject> getAllMetadata();

    /**
     * @since Available in iOS 4.0 and later.
     */
    @GlobalConstant("MPMoviePlayerTimedMetadataKeyName")
    public static native NSString Name();
    /**
     * @since Available in iOS 4.0 and later.
     */
    @GlobalConstant("MPMoviePlayerTimedMetadataKeyInfo")
    public static native NSString Info();
    /**
     * @since Available in iOS 4.0 and later.
     */
    @GlobalConstant("MPMoviePlayerTimedMetadataKeyMIMEType")
    public static native NSString MIMEType();
    /**
     * @since Available in iOS 4.0 and later.
     */
    @GlobalConstant("MPMoviePlayerTimedMetadataKeyDataType")
    public static native NSString DataType();
    /**
     * @since Available in iOS 4.0 and later.
     */
    @GlobalConstant("MPMoviePlayerTimedMetadataKeyLanguageCode")
    public static native NSString LanguageCode();

}


text:
class Cms::Line::File
  include SS::Model::File

  def resizing_with_max_file_size
  end
end


text:
@protocol TLFormFieldDelegate <NSObject>

- (void)didSelectField:(TLFormField *)field;
- (void)didChangeValueForField:(TLFormField *)field newValue:(id)value;

@end

extern int const TLFormFieldTitleLabelTag;
extern int const TLFormFieldValueLabelTag;

//Forward declaration of some properties and methods used for the subclases

@interface TLFormField ()

@property (nonatomic, strong) id defautValue;
@property (nonatomic, weak) id <TLFormFieldDelegate> formDelegate;
@property (nonatomic, readonly) NSDictionary *defaultMetrics;
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong, setter = setValue: , getter = getValue) id fieldValue;

- (void)setupField:(BOOL)editing;
- (UIView *)titleView;

@end


text:
<?php

namespace Jaguar\Tests\Action;

use Jaguar\Action\Rotate;

class RotateTest extends AbstractActionTest
{

    public function getAction()
    {
        return new Rotate();
    }

    public function actionFilesProvider()
    {
        return array(
            array(
                $this->getFixture('sky.jpg')
                , new Rotate(90)
                , new \Jaguar\Dimension(300, 400)
            ),
            array(
                $this->getFixture('google.png')
                , new Rotate(180)
                , new \Jaguar\Dimension(538, 190)
            )
        );
    }

    /**
     * @dataProvider actionFilesProvider
     *
     * @param string                $file
     * @param \Jaguar\Action\Rotate $action
     * @param \Jaguar\Dimension     $expectedDimension
     */
    public function testApply($file, Rotate $action, \Jaguar\Dimension $expectedDimension)
    {
        $canvas = new \Jaguar\Canvas();
        $canvas->fromFile($file);

        $this->assertInstanceOf('\Jaguar\Action\Rotate', $action->apply($canvas));
        $this->assertTrue($canvas->getDimension()->equals($expectedDimension));
    }

}


text:
package bingo.lang;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Console {

	protected Console(){

	}

	public static String readLine() {
		BufferedReader reader = null;
		try{
			reader = new BufferedReader(new InputStreamReader(System.in));
			return reader.readLine();
		}catch(IOException e){
			throw Exceptions.uncheck(e);
		}
	}

	public static String readLine(String promote){
		write(promote);
		return readLine();
	}

	public static String readLine(String promote,boolean retryWhenEmpty){
		if(!retryWhenEmpty){
			return readLine(promote);
		}

		write(promote);
		String s = null;

		while(Strings.isEmpty(s = readLine())){
			;
		}

		return s;
	}

	public static String readLine(String promote,String defaultValue){
		String value = readLine(promote);

		return Strings.isEmpty(value) ? defaultValue : value;
	}

	public static void write(String string){
		System.out.print(string);
	}

	public static void writeLine(){
		System.out.println("");
	}

	public static void writeLine(String string){
		System.out.println(string);
	}
}


text:
package io.github.jsbd.common.lang;

import java.beans.XMLDecoder;
import java.beans.XMLEncoder;
import java.io.*;

public class Object2XML {

    /**
     * 对象输出到XML文件
     *
     * @param obj         待输出的对象
     * @param outFileName 目标XML文件的文件名
     * @return 返回输出XML文件的路径
     * @throws FileNotFoundException
     */
    public static String object2XML(Object obj, String outFileName)
            throws FileNotFoundException {
        // 构造输出XML文件的字节输出流
        File outFile = new File(outFileName);
        BufferedOutputStream bos = new BufferedOutputStream(
                new FileOutputStream(outFile));

        // 构造一个XML编码器
        XMLEncoder xmlEncoder = new XMLEncoder(bos);
        // 使用XML编码器写对象
        xmlEncoder.writeObject(obj);
        // 关闭编码器
        xmlEncoder.close();

        return outFile.getAbsolutePath();
    }

    /**
     * 把XML文件解码成对象
     *
     * @param inFileName 输入的XML文件
     * @return 返回生成的对象
     * @throws FileNotFoundException
     */
    public static Object xml2Object(String inFileName)
            throws FileNotFoundException {
        // 构造输入的XML文件的字节输入流
        BufferedInputStream bis = new BufferedInputStream(new FileInputStream(
                inFileName));
        // 构造一个XML解码器
        XMLDecoder xmlDecoder = new XMLDecoder(bis);
        // 使用XML解码器读对象
        Object obj = xmlDecoder.readObject();
        // 关闭解码器
        xmlDecoder.close();

        return obj;
    }
}


text:
module Rave
  module Models
    # An annotation applying styling or other meta-data to a section of text.
    class Annotation
      include Rave::Mixins::ObjectFactory

      JAVA_CLASS = "com.google.wave.api.Annotation"

      # Name of the annotation type [String]
      def name # :nodoc:
        # If @id is defined, then put that into the type, otherwise just the type is fine.
        @id ? type.sub(WILDCARD, @id) : type
      end

      # Value of the annotation [String]
      def value # :nodoc:
        @value.dup
      end

      # Range of characters over which the annotation applies [Range]
      def range # :nodoc:
        @range.dup
      end

      # +value+:: Value of the annotation [String]
      # +range+:: Range of characters that the annotation applies to [Range]
      def initialize(value, range); end
      # +id+:: The non-class-dependent part of the name [String]
      # +value+:: Value of the annotation [String]
      # +range+:: Range of characters that the annotation applies to [Range]
      def initialize(id, value, range); end
      def initialize(*args) # :nodoc:
        case args.length
        when 3
          @id, @value, @range = args
        when 2
          @value, @range = args
        end
      end

      def to_json # :nodoc:
        {
          'javaClass' => JAVA_CLASS,
          'name' => name,
          'value' => value,
          'range' => range.to_rave_hash,
        }.to_json
      end

      factory_register '*' # Accept all unrecognised annotations.

      # Annotation classes:

      # Language selected, such as "en", "de", etc.
      class Language < Annotation
        factory_register 'lang'
      end

      # Style, acting the same as the similarly named CSS properties.
      class Style < Annotation

        factory_register 'style/*' # Accept all unrecognised style annotations.

        class BackgroundColor < Style
          factory_register 'style/backgroundColor'
        end

        class Color < Style
          factory_register 'style/color'
        end

        class FontFamily < Style
          factory_register 'style/fontFamily'
        end

        class FontSize < Style
          factory_register 'style/fontSize'
        end

        class FontWeight < Style
          factory_register 'style/fontWeight'
        end

        class TextDecoration < Style
          factory_register 'style/textDecoration'
        end

        class VerticalAlign < Style
          factory_register 'style/verticalAlign'
        end
      end

      class Conversation < Annotation
        factory_register 'conv/*' # Accept all unrecognised conv annotations.

        class Title < Conversation
          factory_register "conv/title"
        end
      end

      # (Abstract)
      class Link < Annotation
        factory_register 'link/*' # Accept all unrecognised link annotations.

        class Manual < Link
          factory_register "link/manual"
        end

        class Auto < Link
          factory_register "link/autoA"
        end

        class Wave < Link
          factory_register "link/waveA"
        end
      end

      # (Abstract)
      class User < Annotation
        factory_register 'user/*' # Accept all unrecognised user annotations.

        # Session ID for the user annotation.
        def session_id # :nodoc:
          name =~ %r!/([^/]+)$!
          $1
        end

        def initialize(session_id, value, range)
          super
        end

        class Document < User
          factory_register "user/d/*"
        end

        class Selection < User
          factory_register "user/r/*"
        end

        class Focus < User
          factory_register "user/e/*"
        end
      end
    end
  end
end


text:
from __future__ import division
import asyncio
import discord
import random
from   discord.ext import commands
from   Cogs import Settings, Utils

from pyparsing import (Literal,CaselessLiteral,Word,Combine,Group,Optional,
                    ZeroOrMore,Forward,nums,alphas,oneOf)
import math
import operator

def setup(bot):
    # Add the bot
    bot.add_cog(Calc(bot))

__author__='Paul McGuire'
__version__ = '$Revision: 0.0 $'
__date__ = '$Date: 2009-03-20 $'
__source__='''http://pyparsing.wikispaces.com/file/view/fourFn.py
http://pyparsing.wikispaces.com/message/view/home/15549426
'''
__note__='''
All I've done is rewrap Paul McGuire's fourFn.py as a class, so I can use it
more easily in other places.
'''

class NumericStringParser(object):
    '''
    Most of this code comes from the fourFn.py pyparsing example

    '''
    def pushFirst(self, strg, loc, toks ):
        self.exprStack.append( toks[0] )
    def pushUMinus(self, strg, loc, toks ):
        if toks and toks[0]=='-':
            self.exprStack.append( 'unary -' )
    def __init__(self):
        """
        expop   :: '^'
        multop  :: 'x' | '*' | '/'
        addop   :: '+' | '-'
        integer :: ['+' | '-'] '0'..'9'+
        atom    :: PI | E | real | fn '(' expr ')' | '(' expr ')'
        factor  :: atom [ expop factor ]*
        term    :: factor [ multop factor ]*
        expr    :: term [ addop term ]*
        """
        point = Literal( "." )
        e     = CaselessLiteral( "E" )
        fnumber = Combine( Word( "+-"+nums, nums ) +
                        Optional( point + Optional( Word( nums ) ) ) +
                        Optional( e + Word( "+-"+nums, nums ) ) )
        ident = Word(alphas, alphas+nums+"_$")
        plus  = Literal( "+" )
        minus = Literal( "-" )
        mult  = Literal( "x" )
        div   = Literal( "/" )
        lpar  = Literal( "(" ).suppress()
        rpar  = Literal( ")" ).suppress()
        addop  = plus | minus
        multop = mult | div
        expop = Literal( "^" )
        pi    = CaselessLiteral( "PI" )
        expr = Forward()
        atom = ((Optional(oneOf("- +")) +
                (pi|e|fnumber|ident+lpar+expr+rpar).setParseAction(self.pushFirst))
                | Optional(oneOf("- +")) + Group(lpar+expr+rpar)
                ).setParseAction(self.pushUMinus)
        # by defining exponentiation as "atom [ ^ factor ]..." instead of
        # "atom [ ^ atom ]...", we get right-to-left exponents, instead of left-to-right
        # that is, 2^3^2 = 2^(3^2), not (2^3)^2.
        factor = Forward()
        factor << atom + ZeroOrMore( ( expop + factor ).setParseAction( self.pushFirst ) )
        term = factor + ZeroOrMore( ( multop + factor ).setParseAction( self.pushFirst ) )
        expr << term + ZeroOrMore( ( addop + term ).setParseAction( self.pushFirst ) )
        # addop_term = ( addop + term ).setParseAction( self.pushFirst )
        # general_term = term + ZeroOrMore( addop_term ) | OneOrMore( addop_term)
        # expr <<  general_term
        self.bnf = expr
        # map operator symbols to corresponding arithmetic operations
        epsilon = 1e-12
        self.opn = { "+" : operator.add,
                "-" : operator.sub,
                "x" : operator.mul,
                "/" : operator.truediv,
                "^" : operator.pow }
        self.fn  = { "sin" : math.sin,
                "cos" : math.cos,
                "tan" : math.tan,
                "abs" : abs,
                "trunc" : lambda a: int(a),
                "round" : round,
                "sgn" : lambda a: abs(a)>epsilon and cmp(a,0) or 0}
    def evaluateStack(self, s ):
        op = s.pop()
        if op == 'unary -':
            return -self.evaluateStack( s )
        if op in "+-x/^":
            op2 = self.evaluateStack( s )
            op1 = self.evaluateStack( s )
            return self.opn[op]( op1, op2 )
        elif op == "PI":
            return math.pi # 3.1415926535
        elif op == "E":
            return math.e  # 2.718281828
        elif op in self.fn:
            return self.fn[op]( self.evaluateStack( s ) )
        elif op[0].isalpha():
            return 0
        else:
            return float( op )
    def eval(self,num_string,parseAll=True):
        self.exprStack=[]
        results=self.bnf.parseString(num_string,parseAll)
        val=self.evaluateStack( self.exprStack[:] )
        return val

class Calc(commands.Cog):

    # Init with the bot reference, and a reference to the settings var
    def __init__(self, bot):
        self.bot = bot
        self.nsp=NumericStringParser()
        global Utils
        Utils = self.bot.get_cog("Utils")

    @commands.command(aliases=["calculate","math"])
    async def calc(self, ctx, *, formula = None):
        """Do some math."""

        if formula == None: return await ctx.send('Usage: `{}calc [formula]`'.format(ctx.prefix))
        formula = formula.replace("*","x")

        try:
            answer=self.nsp.eval(formula)
        except:
            msg = 'I couldn\'t parse "{}" :(\n\n'.format(formula.replace('*', '\\*').replace('`', '\\`').replace('_', '\\_'))
            msg += 'I understand the following syntax:\n```\n'
            msg += "expop   :: '^'\n"
            msg += "multop  :: 'x' | '*' | '/'\n"
            msg += "addop   :: '+' | '-'\n"
            msg += "integer :: ['+' | '-'] '0'..'9'+\n"
            msg += "atom    :: PI | E | real | fn '(' expr ')' | '(' expr ')'\n"
            msg += "factor  :: atom [ expop factor ]*\n"
            msg += "term    :: factor [ multop factor ]*\n"
            msg += "expr    :: term [ addop term ]*```"
            return await ctx.send(Utils.suppressed(ctx,msg))

        if int(answer) == answer:
            # Check if it's a whole number and cast to int if so
            answer = int(answer)

        # Say message
        await ctx.send('{} = {}'.format(formula, answer))


text:
"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;

var _experimentalUtils = require("@typescript-eslint/experimental-utils");

var _utils = require("./utils");

const testCaseNames = new Set([...Object.keys(_utils.TestCaseName), 'it.only', 'it.concurrent.only', 'it.skip', 'it.concurrent.skip', 'test.only', 'test.concurrent.only', 'test.skip', 'test.concurrent.skip', 'fit.concurrent']);

const isTestArrowFunction = node => node.parent !== undefined && node.parent.type === _experimentalUtils.AST_NODE_TYPES.CallExpression && testCaseNames.has((0, _utils.getNodeName)(node.parent.callee));

const conditionName = {
  [_experimentalUtils.AST_NODE_TYPES.ConditionalExpression]: 'conditional',
  [_experimentalUtils.AST_NODE_TYPES.SwitchStatement]: 'switch',
  [_experimentalUtils.AST_NODE_TYPES.IfStatement]: 'if'
};

var _default = (0, _utils.createRule)({
  name: __filename,
  meta: {
    docs: {
      description: 'Disallow conditional logic',
      category: 'Best Practices',
      recommended: false
    },
    messages: {
      noConditionalExpect: 'Test should not contain { condition } statements.'
    },
    schema: [],
    type: 'suggestion'
  },
  defaultOptions: [],

  create(context) {
    const stack = [];

    function validate(node) {
      const lastElementInStack = stack[stack.length - 1];

      if (stack.length === 0 || !lastElementInStack) {
        return;
      }

      context.report({
        data: {
          condition: conditionName[node.type]
        },
        messageId: 'noConditionalExpect',
        node
      });
    }

    return {
      CallExpression(node) {
        stack.push((0, _utils.isTestCase)(node));
      },

      FunctionExpression() {
        stack.push(false);
      },

      FunctionDeclaration(node) {
        const declaredVariables = context.getDeclaredVariables(node);
        const testCallExpressions = (0, _utils.getTestCallExpressionsFromDeclaredVariables)(declaredVariables);
        stack.push(testCallExpressions.length > 0);
      },

      ArrowFunctionExpression(node) {
        stack.push(isTestArrowFunction(node));
      },

      IfStatement: validate,
      SwitchStatement: validate,
      ConditionalExpression: validate,

      'CallExpression:exit'() {
        stack.pop();
      },

      'FunctionExpression:exit'() {
        stack.pop();
      },

      'FunctionDeclaration:exit'() {
        stack.pop();
      },

      'ArrowFunctionExpression:exit'() {
        stack.pop();
      }

    };
  }

});

exports.default = _default;


text:
@implementation GeneratedMessageTests

- (void) testDefaultInstance {
  STAssertTrue([TestAllTypes defaultInstance] ==
               [[TestAllTypes defaultInstance] defaultInstance], @"");
  STAssertTrue([TestAllTypes defaultInstance] ==
               [[TestAllTypes builder] defaultInstance], @"");
}

- (void) testAccessors {
  TestAllTypes_Builder* builder = [TestAllTypes builder];
  [TestUtilities setAllFields:builder];
  TestAllTypes* message = [builder build];
  [TestUtilities assertAllFieldsSet:message];
}

- (void) testRepeatedAppend {
  TestAllTypes_Builder* builder = [TestAllTypes builder];

  NSArray* array =
  [NSArray arrayWithObjects:
   [NSNumber numberWithInt:1],
   [NSNumber numberWithInt:2],
   [NSNumber numberWithInt:3],
   [NSNumber numberWithInt:4], nil];

  [builder setRepeatedInt32Array:array];
  [builder setRepeatedForeignEnumArray:
   [NSArray arrayWithObject:
    [NSNumber numberWithInt:ForeignEnumForeignBaz]]];

  ForeignMessage* foreignMessage = [[[ForeignMessage builder] setC:12] build];
  [builder setRepeatedForeignMessageArray:[NSArray arrayWithObject:foreignMessage]];

  TestAllTypes* message = [builder build];
  STAssertTrue(1 == message.repeatedForeignMessage.count, @"");
  STAssertTrue(12 == [[message repeatedForeignMessageAtIndex:0] c], @"");
}

- (void) testClearExtension {
  // clearExtension() is not actually used in TestUtil, so try it manually.
  PBExtendableMessage_Builder* builder1 =
  [[TestAllExtensions builder]
   setExtension:[UnittestRoot optionalInt32Extension] value:[NSNumber numberWithInt:1]];

  STAssertTrue([builder1 hasExtension:[UnittestRoot optionalInt32Extension]], @"");
  [builder1 clearExtension:[UnittestRoot optionalInt32Extension]];
  STAssertFalse([builder1 hasExtension:[UnittestRoot optionalInt32Extension]], @"");

  PBExtendableMessage_Builder* builder2 =
  [[TestAllExtensions builder]
   addExtension:[UnittestRoot repeatedInt32Extension] value:[NSNumber numberWithInt:1]];

  STAssertTrue(1 == [[builder2 getExtension:[UnittestRoot repeatedInt32Extension]] count], @"");
  [builder2 clearExtension:[UnittestRoot repeatedInt32Extension]];
  STAssertTrue(0 == [[builder2 getExtension:[UnittestRoot repeatedInt32Extension]] count], @"");
}

- (void) testExtensionAccessors {
  TestAllExtensions_Builder* builder = [TestAllExtensions builder];
  [TestUtilities setAllExtensions:builder];
  TestAllExtensions* message = [builder build];
  [TestUtilities assertAllExtensionsSet:message];
}

- (void) testExtensionRepeatedSetters {
  TestAllExtensions_Builder* builder = [TestAllExtensions builder];
  [TestUtilities setAllExtensions:builder];
  [TestUtilities modifyRepeatedExtensions:builder];
  TestAllExtensions* message = [builder build];
  [TestUtilities assertRepeatedExtensionsModified:message];
}

- (void) testExtensionDefaults {
  [TestUtilities assertExtensionsClear:[TestAllExtensions defaultInstance]];
  [TestUtilities assertExtensionsClear:[[TestAllExtensions builder] build]];
}

@end


text:
package org.apache.drill.exec.ops;

import com.google.common.base.Preconditions;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import io.netty.buffer.DrillBuf;

import org.apache.drill.common.exceptions.DrillRuntimeException;
import org.apache.drill.exec.memory.BufferAllocator;
import org.apache.drill.exec.memory.OutOfMemoryException;
import org.apache.drill.exec.physical.base.PhysicalOperator;

import com.carrotsearch.hppc.LongObjectOpenHashMap;
import org.apache.drill.exec.testing.ExecutionControls;
import org.apache.drill.exec.store.dfs.DrillFileSystem;
import org.apache.drill.exec.work.WorkManager;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.security.UserGroupInformation;

import java.io.IOException;
import java.security.PrivilegedExceptionAction;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutorService;

class OperatorContextImpl extends OperatorContext implements AutoCloseable {
  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(OperatorContextImpl.class);

  private final BufferAllocator allocator;
  private final ExecutionControls executionControls;
  private boolean closed = false;
  private PhysicalOperator popConfig;
  private OperatorStats stats;
  private LongObjectOpenHashMap<DrillBuf> managedBuffers = new LongObjectOpenHashMap<>();
  private final boolean applyFragmentLimit;
  private DrillFileSystem fs;
  private final ExecutorService executor;

  /**
   * This lazily initialized executor service is used to submit a {@link Callable task} that needs a proxy user. There
   * is no pool that is created; this pool is a decorator around {@link WorkManager#executor the worker pool} that
   * returns a {@link ListenableFuture future} for every task that is submitted. For the shutdown sequence,
   * see {@link WorkManager#close}.
   */
  private ListeningExecutorService delegatePool;

  public OperatorContextImpl(PhysicalOperator popConfig, FragmentContext context, boolean applyFragmentLimit) throws OutOfMemoryException {
    this.applyFragmentLimit=applyFragmentLimit;
    this.allocator = context.getNewChildAllocator(popConfig.getInitialAllocation(), popConfig.getMaxAllocation(), applyFragmentLimit);
    this.popConfig = popConfig;

    OpProfileDef def = new OpProfileDef(popConfig.getOperatorId(), popConfig.getOperatorType(), getChildCount(popConfig));
    stats = context.getStats().newOperatorStats(def, allocator);
    executionControls = context.getExecutionControls();
    executor = context.getDrillbitContext().getExecutor();
  }

  public OperatorContextImpl(PhysicalOperator popConfig, FragmentContext context, OperatorStats stats, boolean applyFragmentLimit) throws OutOfMemoryException {
    this.applyFragmentLimit=applyFragmentLimit;
    this.allocator = context.getNewChildAllocator(popConfig.getInitialAllocation(), popConfig.getMaxAllocation(), applyFragmentLimit);
    this.popConfig = popConfig;
    this.stats     = stats;
    executionControls = context.getExecutionControls();
    executor = context.getDrillbitContext().getExecutor();
  }

  public DrillBuf replace(DrillBuf old, int newSize) {
    if (managedBuffers.remove(old.memoryAddress()) == null) {
      throw new IllegalStateException("Tried to remove unmanaged buffer.");
    }
    old.release();
    return getManagedBuffer(newSize);
  }

  public DrillBuf getManagedBuffer() {
    return getManagedBuffer(256);
  }

  public DrillBuf getManagedBuffer(int size) {
    DrillBuf newBuf = allocator.buffer(size);
    managedBuffers.put(newBuf.memoryAddress(), newBuf);
    newBuf.setOperatorContext(this);
    return newBuf;
  }

  public ExecutionControls getExecutionControls() {
    return executionControls;
  }

  public BufferAllocator getAllocator() {
    if (allocator == null) {
      throw new UnsupportedOperationException("Operator context does not have an allocator");
    }
    return allocator;
  }

  public boolean isClosed() {
    return closed;
  }

  @Override
  public void close() {
    if (closed) {
      logger.debug("Attempted to close Operator context for {}, but context is already closed", popConfig != null ? popConfig.getClass().getName() : null);
      return;
    }
    logger.debug("Closing context for {}", popConfig != null ? popConfig.getClass().getName() : null);

    // release managed buffers.
    Object[] buffers = ((LongObjectOpenHashMap<Object>)(Object)managedBuffers).values;
    for (int i =0; i < buffers.length; i++) {
      if (managedBuffers.allocated[i]) {
        ((DrillBuf)buffers[i]).release();
      }
    }

    if (allocator != null) {
      allocator.close();
    }

    if (fs != null) {
      try {
        fs.close();
      } catch (IOException e) {
        throw new DrillRuntimeException(e);
      }
    }
    closed = true;
  }

  public OperatorStats getStats() {
    return stats;
  }

  public <RESULT> ListenableFuture<RESULT> runCallableAs(final UserGroupInformation proxyUgi,
                                                         final Callable<RESULT> callable) {
    synchronized (this) {
      if (delegatePool == null) {
        delegatePool = MoreExecutors.listeningDecorator(executor);
      }
    }
    return delegatePool.submit(new Callable<RESULT>() {
      @Override
      public RESULT call() throws Exception {
        final Thread currentThread = Thread.currentThread();
        final String originalThreadName = currentThread.getName();
        currentThread.setName(proxyUgi.getUserName() + ":task-delegate-thread");
        final RESULT result;
        try {
          result = proxyUgi.doAs(new PrivilegedExceptionAction<RESULT>() {
            @Override
            public RESULT run() throws Exception {
              return callable.call();
            }
          });
        } finally {
          currentThread.setName(originalThreadName);
        }
        return result;
      }
    });
  }

  @Override
  public DrillFileSystem newFileSystem(Configuration conf) throws IOException {
    Preconditions.checkState(fs == null, "Tried to create a second FileSystem. Can only be called once per OperatorContext");
    fs = new DrillFileSystem(conf, getStats());
    return fs;
  }

}


text:
  Siarrouy est
       un village
       géographiquement positionné dans le département des Hautes-Pyrénées en Midi-Pyrénées. Elle comptait 440 habitants en 2008.

À coté de Siarrouy sont situées les villes de
Sarniguet localisée à 4 km, 241 habitants,
Andrest localisée à 1 km, 1 306 habitants,
Aurensan située à 4 km, 721 habitants,
Marsac à 4 km, 218 habitants,
Oursbelille à 3 km, 1 200 habitants,
Lagarde à 1 km, 486 habitants,
 entre autres. De plus, Siarrouy est située à seulement dix km de Tarbes.

Siarrouy est localisé à seulement 10 km de Tarbes, les étudiants qui souhaiteront se loger à moindre coût pourront envisager de prendre un logement à Siarrouy. Siarrouy est aussi un bon placement locatif du fait de sa proximité de Tarbes et de ses Universités. Il sera envisageable de trouver un logement à vendre.

Si vous envisagez de demenager à Siarrouy, vous pourrez facilement trouver une maison à acheter.

Le parc d'habitations, à Siarrouy, était réparti en 2011 en deux appartements et 180 maisons soit
 un marché plutôt équilibré.

La ville propose quelques  aménagements, elle dispose, entre autres, de un terrain de tennis et un terrain de sport.


text:
using Entitas;

namespace Entitas {

    public partial class Entity {

        public SaveComponent save { get { return (SaveComponent)GetComponent(InputComponentIds.Save); } }
        public bool hasSave { get { return HasComponent(InputComponentIds.Save); } }

        public Entity AddSave(string newName, System.Xml.Linq.XDocument newXDoc) {
            var component = CreateComponent<SaveComponent>(InputComponentIds.Save);
            component.name = newName;
            component.xDoc = newXDoc;
            return AddComponent(InputComponentIds.Save, component);
        }

        public Entity ReplaceSave(string newName, System.Xml.Linq.XDocument newXDoc) {
            var component = CreateComponent<SaveComponent>(InputComponentIds.Save);
            component.name = newName;
            component.xDoc = newXDoc;
            ReplaceComponent(InputComponentIds.Save, component);
            return this;
        }

        public Entity RemoveSave() {
            return RemoveComponent(InputComponentIds.Save);
        }
    }

    public partial class Pool {

        public Entity saveEntity { get { return GetGroup(InputMatcher.Save).GetSingleEntity(); } }
        public SaveComponent save { get { return saveEntity.save; } }
        public bool hasSave { get { return saveEntity != null; } }

        public Entity SetSave(string newName, System.Xml.Linq.XDocument newXDoc) {
            if(hasSave) {
                throw new EntitasException("Could not set save!\n" + this + " already has an entity with SaveComponent!",
                    "You should check if the pool already has a saveEntity before setting it or use pool.ReplaceSave().");
            }
            var entity = CreateEntity();
            entity.AddSave(newName, newXDoc);
            return entity;
        }

        public Entity ReplaceSave(string newName, System.Xml.Linq.XDocument newXDoc) {
            var entity = saveEntity;
            if(entity == null) {
                entity = SetSave(newName, newXDoc);
            } else {
                entity.ReplaceSave(newName, newXDoc);
            }

            return entity;
        }

        public void RemoveSave() {
            DestroyEntity(saveEntity);
        }
    }
}

    public partial class InputMatcher {

        static IMatcher _matcherSave;

        public static IMatcher Save {
            get {
                if(_matcherSave == null) {
                    var matcher = (Matcher)Matcher.AllOf(InputComponentIds.Save);
                    matcher.componentNames = InputComponentIds.componentNames;
                    _matcherSave = matcher;
                }

                return _matcherSave;
            }
        }
    }


text:
package com.tle.core.db.types
import java.util.Locale

import com.tle.common.i18n.LangUtils
import io.circe.{Decoder, Encoder}
import io.doolse.simpledba.circe._
import scala.collection.JavaConverters._

case class LocaleStrings(strings: Map[String, String]) extends JsonColumn {
  def stringsOrNone: Option[Map[String, String]] =
    if (strings.size > 1) {
      Some(strings)
    } else None

  def closest(locale: Locale): Option[String] = {
    Option(LangUtils.getClosestObjectForLocale(strings.asJava, locale))
  }
}

object LocaleStrings {
  val empty        = LocaleStrings(Map.empty)
  implicit val enc = Encoder.encodeMap[String, String].contramap[LocaleStrings](_.strings)
  implicit val dec = Decoder.decodeMap[String, String].map(LocaleStrings.apply)
  implicit val iso = circeIso(empty)

  def fromStrings(
      single: String,
      map: Option[Map[String, String]],
      currentLocale: Locale
  ): Option[(String, LocaleStrings)] = map match {
    case None =>
      if (single.isEmpty) None
      else Some((single, LocaleStrings(Map(currentLocale.toLanguageTag -> single))))
    case Some(langMap) =>
      val nonEmpties = langMap.filter(_._2.nonEmpty)
      if (nonEmpties.isEmpty) None
      else
        Some(
          LangUtils.getClosestObjectForLocale(nonEmpties.asJava, currentLocale),
          LocaleStrings(nonEmpties)
        )
  }
}


text:
@implementation BKLabel
- (void)highLight {
	self.backgroundColor = [UIColor yellowColor];
}

- (void)unhighLight {
	self.backgroundColor = [UIColor clearColor];
}

- (BOOL)isHighLighted {
	return (self.backgroundColor == [UIColor yellowColor]);
}
@end


text:
FROM node:8.0.0-alpine

LABEL maintainer="https://github.com/10sr/cron-cli-js" \
      description="Simple cron command implementation in Nodejs"

RUN apk add --update tini && rm -rf /var/cache/apk/*

ENV NODE_ENV=production

RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

COPY package.json .

RUN npm install

COPY . .

ENTRYPOINT ["/sbin/tini", "--"]
CMD ["node", "bin/cron", "/etc/crontab"]


text:
<!DOCTYPE html>

    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>The Style of a Chairman</title>
    <meta name="description" content="Zian "Zane" Liu - Bioengineer, synthetic biologist, regulatory consultant, STEM outreach organizer, political junkie, menswear enthusiast, fountain pen user, coffee addict, and more..." />

    <meta name="HandheldFriendly" content="True" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />

    <link rel="shortcut icon" href="/assets/images/favicon.ico" >

    <link rel="stylesheet" type="text/css" href="/assets/css/screen.css" />
    <link rel="stylesheet" type="text/css"
          href="//fonts.googleapis.com/css?family=Merriweather:300,700,700italic,300italic|Open+Sans:700,400" />
    <link rel="stylesheet" type="text/css" href="/assets/css/syntax.css" />

    <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.3.0/styles/default.min.css">

        <link rel="canonical" href="/" />
    <meta name="referrer" content="origin" />
    <link rel="next" href="/page2/" />

    <meta property="og:site_name" content="Zian "Zane" Liu" />
    <meta property="og:type" content="website" />
    <meta property="og:title" content="Zian "Zane" Liu" />
    <meta property="og:description" content="Bioengineer, synthetic biologist, regulatory consultant, STEM outreach organizer, political junkie, menswear enthusiast, fountain pen user, coffee addict, and more..." />
    <meta property="og:url" content="/" />
    <meta property="og:image" content="/assets/images/cover1.jpg" />

    <meta name="twitter:card" content="summary_large_image" />
    <meta name="twitter:title" content="Zian "Zane" Liu" />
    <meta name="twitter:description" content="Bioengineer, synthetic biologist, regulatory consultant, STEM outreach organizer, political junkie, menswear enthusiast, fountain pen user, coffee addict, and more..." />
    <meta name="twitter:url" content="/" />
    <meta name="twitter:image:src" content="/assets/images/cover1.jpg" />

    <meta name="generator" content="Jekyll 3.0.0" />
    <link rel="alternate" type="application/rss+xml" title="Zian "Zane" Liu" href="/feed.xml" />

Menu

        Close

Home

About Zian

Resume

Projects

Leadership

Menswear Advice

Interests

Contact Me

Follow @chairmanzian

            Menu

Zian "Zane" Liu

Bioengineer, synthetic biologist, regulatory consultant, STEM outreach organizer, political junkie, menswear enthusiast, fountain pen user, coffee addict, and more...

    Scroll Down

            « Newer Posts

     Page 5 of 8

        Older Posts »

My First Fountain Pen

Sometime in elementary school (for me, it was second grade), every Chinese kid would need to switch from writing with pencil to writing with a fountain... »

            Zian Liu

                on

                       Interests,

                       Fountainpen

            <time class="post-date" datetime="2016-06-25">25 Jun 2016</time>

No Longer Eat Alone

I wrote this essay in the beginning of my Freshman year of college. Now that I'm about to graduate, I'm posting this again for reflections. It... »

            Zian Liu

                on

                       Leadership

            <time class="post-date" datetime="2016-05-14">14 May 2016</time>

Rice 360 Design Competition

My undergraduate biodesign team, Team ForSight, was invited to participate in the Rice 360° Sixth Annual Undergraduate Global Health Technologies Design Competition. My team mates, Amanda... »

            Zian Liu

                on

                       Projects

            <time class="post-date" datetime="2016-04-15">15 Apr 2016</time>

Bioweapons Departmental Seminar at the MIIS

By the invitation of Dr. Ray Zilinskas, I spoke at a departmental seminar at the Middlebury Institute of International Studies today, where I presented my research... »

            Zian Liu

                on

                       Projects

            <time class="post-date" datetime="2016-02-25">25 Feb 2016</time>

The Brooks Brothers No. 1 Stripe

A photo posted by Zian Liu (@chairmanzian) on Dec 2, 2015 at 9:34am PST There are few ties that scream "America" as much as the Brooks... »

            Zian Liu

                on

                       Style

            <time class="post-date" datetime="2015-12-02">02 Dec 2015</time>

            « Newer Posts

     Page 5 of 8

        Older Posts »

Zian "Zane" Liu © 2018

Proudly published with Jekyll using Jasper