text:
function Addrow() {
  var number = ($('tbody tr').length)+1;
  var tr = '
'+
              ''+number+'	'+
              '<input type="text" placeholder="نام دانش آموز" class="form-control name">	'+
              '<input type="number" placeholder="نمره" class="form-control score">	'+
              '<input type="number" placeholder="ارفاق" class="form-control forgiveness" value="0">	'+
              '0	'+
              '	'+
              '<input type="button" class="btn btn-info btn-sm remove" value="حذف این نفر">	'+
            '
';
  $('tbody').append(tr);
}
//remove btn that remove the row which  is in it
function remove()
{
  $(this).parent().parent().remove();
  refresh_number();
  total_average();
}
//remove btn that will remove All rows
function removeAll()
{
  $('tbody tr').remove();
}
//this func will sum score and forgiveness in each row and then
function Calc()
{
  this_row = $(this);
  refresh(); //this func will clear the status to their default state for new value change...
  var score = parseInt(this_row.parent().parent().find('.score').val(),10),
      forgiveness = parseInt(this_row.parent().parent().find('.forgiveness').val(),10);
  final = score + forgiveness;
  this_row.parent().parent().find('.final').html(final);

   status();
}

function total_average() {
  var scoreAll = $('.final');
  var total = 0;
  var num = 0;
//  scoreAll.each(function(i,e){ //although each func is faster than loop but for practicing i'll use a loop instead
//    var num = parseInt($(this).html(),10);
//    total += num;
//  });
  for(i=0;i<scoreAll.length;i++)
  {
    var num = parseInt($(scoreAll[i]).text(),10);
    total += num;
    var total_state = $('.total').html();
  }
  average  = (total / $('tbody tr').length).toFixed('2');
  if(!isNaN(total) && total != '' && !isNaN(average) && average != '') $('.total').html('مجموع : ' + total + '
' + 'میانگین : ' + average );
}

function status() {
  var status = this_row.parent().parent().find('.status');
  var max = $('#max').val();
  min = $('#min').val();
  if(final<=max)
  {
    total_average();
    switch(true)
    {

      case (final>=min) : status.html('قبول').removeClass('undefine').addClass('alert-success'); break;
      case (final<min) : status.html('تجدید').removeClass('undefine').addClass('alert-danger'); break;
    }
  }

  if(final>max)
  {
    this_row.parent().parent().find('.final').html('بیشتر از '+ max +' ؟').addClass('alert alert-danger');
  }
}

function refresh () {
  var status = this_row.parent().parent().find('.status');
  status.removeClass('alert-success').removeClass('alert-danger').html('').addClass('undefine');
  this_row.parent().parent().find('.final').removeClass('alert alert-danger');
  $('.total').html('مجموع : ' + '');
}

function results() {
  $('#result_screen').removeClass('alert-danger').addClass('alert-success');;//refresh for new value!!
  results ='';
  $('.popup_header').html('اطلاعات کلی نمرات');
  var all_rows = $('tbody tr').length;
  var passed = $('tbody .alert-success').length;
  var failed = $('tbody .alert-danger').length;
  var undefine = $('tbody .undefine').length;
  var all = $('tbody tr');
  if(all_rows==0)
  {
    results = 'چون اطلاعات هیچ کس را بطور کامل وارد نکرده بودید همگی حذف گردیدند دوباره اقدام به وارد نمودن اطلاعات نمایید';
  }
  if(all_rows!=0 && undefine == 0)
  {
    switch(true)
    {
      case (passed==0) : results = 'میانگین نمرات این ' + all_rows + ' دانش آموز' + average + ' میباشد و همه آن ها نتوانسته نبره قبولی  (' + min +')' +' را به دست آورند و متاسفانه تجدید شده اند'; break;
      case (failed==0) : results = 'میانگین نمرات این ' + all_rows + ' دانش آموز' + average + ' میباشد و همه ی آن ها  نمره قبولی (' + min +')'+ ' را کسب کرده و قبول شده اند';  break;
      case (passed!=0 && failed!=0) : results = 'میانگین نمرات این ' + all_rows +' دانش آموز' + average + ' میباشد و ' + passed + ' نفر قبول و ' + failed + ' نفر متاسفانه تجدید شده اند.';break;
    }
  }
  if(undefine !=0)
  {
    results = 'لطفا اطلاعات '+ undefine + ' دانش آموز باقی مانده را وارد نمایید یا آن ها را حذف نمایید' + '<br'+
    '<input type="button" class="btn btn-success btn-sm" id="remove_undefine" style="float:left; margin-top:5px;">حذف آن ها</input>';
    $('#result_screen').removeClass('alert-success').addClass('alert-danger');
  }
  $('.popup_background,.popup_box').fadeIn(500);
  $('#result_screen').html(results);

}

function refresh_number() {
  var trs = $('tbody tr');
  var trs_len =  $('tbody tr').length;
  for(i=0;i<=trs_len;i++)
  {
    $($(trs[i])).find('.num').html(i+1);
  }
}
function remove_undefine() {
  $('tbody .undefine').parent().remove();
  refresh_number();
  Calc();
  $('#results').click();
}

function alphabet_order(){

  var name = $('.name');
  var score = $('.score');
  var name_vals = [];
  var score_vals = [];
  for(i=0 ; i < name.length ; i++)
  {
    name_vals.push($(name[i]).val());
    score_vals.push($(score[i]).val());
  }
  name_vals.sort();
for(i=0; i < name.length ; i++)
{
  $(name[i]).val(name_vals[i]);
  $(score[i]).val(score_vals[i]);
}
}

$(document).ready(function(){
  $('#Add').on('click',Addrow);
  $('tbody').on('click','.remove',remove);
  $('#removeAll').on('click',removeAll);
  $('body').on('change keyup','.score,.forgiveness',Calc);
  $('body').on('focus','.forgiveness',function(){$(this).val('');});
  $('#results').on('click',results);
  $('body').on('click','.popup_background,#exit,#close-start',function(){$('.popup_background,.popup_box').fadeOut(500);});
  $('body').on('change keyup','#max,#min',function(){var first_row = $('tbody tr'); $(first_row[0]).find('.score').change();});
  $('body').on('click','#remove_undefine',remove_undefine);
  $('body').on('click','#alphabet',alphabet_order);
  //$('#container,.describtion,#header_name,.main,.setting').show();

});

$(document).ready(function(){ // startup animation
  $('#container').delay("fast").toggle(1000,function(){
    $('.describtion').delay("fast").toggle(1000,function(){
      $('#header_name').delay(1500).animate({'font-size':'200%' },500);
      $('#header_credit').delay(1500).animate({'font-size':'120%' },500,function(){
        $('.main').delay(500).toggle(1000,function(){
          $('.setting').delay(100).toggle(1000,function(){
            $('.popup_background,.popup_box').delay(500).fadeIn(500);
          });
          $('.popup_header').html('خوش آمدید');
          $('#result_screen').html('برای شروع بکار نمرات  را در قسمت مشخص شده وارد نمایید. برای مشاهده  اطلاعت کلی نمرات دکمه ی اطلاعات را بفشارید'+
          '
' + '<input type="button" class="btn btn-primary" id="close-start" value="ورود به برنامه" style="float:left;">' )
        });
      });
    });
  });
});


text:
var babel = require('babel/register');
var reporter = require('./lib/smsReporter');

reporter('Test message');

redpajama_set_name: RedPajamaGithub


text:
package consulo.nuget.xml.dom;

import com.intellij.openapi.module.Module;
import com.intellij.openapi.module.ModuleUtil;
import com.intellij.openapi.module.ModuleUtilCore;
import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.Iconable;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.psi.xml.XmlFile;
import com.intellij.util.xml.DomFileDescription;
import consulo.nuget.icon.NuGetIconGroup;
import consulo.nuget.xml.module.extension.NuGetOldModuleExtension;
import consulo.nuget.xml.module.extension.NuGetXmlPackagesFile;
import consulo.ui.image.Image;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;

/**
 * @author VISTALL
 * @since 24.11.14
 */
public class NuGetPackagesDomFileDescription extends DomFileDescription<NuGetXmlPackagesFile>
{
	public NuGetPackagesDomFileDescription()
	{
		super(NuGetXmlPackagesFile.class, "packages");
	}

	@Override
	public boolean isMyFile(@Nonnull XmlFile file)
	{
		VirtualFile virtualFile = file.getVirtualFile();
		if(virtualFile == null)
		{
			return false;
		}

		Module moduleForPsiElement = ModuleUtilCore.findModuleForPsiElement(file);
		if(moduleForPsiElement == null)
		{
			return false;
		}
		NuGetOldModuleExtension nuGetModuleExtension = ModuleUtil.getExtension(moduleForPsiElement, NuGetOldModuleExtension.class);
		return nuGetModuleExtension != null && Comparing.equal(nuGetModuleExtension.getConfigFile(), virtualFile);
	}

	@Nullable
	@Override
	public Image getFileIcon(@Iconable.IconFlags int flags)
	{
		return NuGetIconGroup.nuget();
	}
}


text:
package org.apache.storm.daemon.metrics.reporters;

import com.codahale.metrics.ConsoleReporter;
import com.codahale.metrics.MetricRegistry;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.apache.storm.daemon.metrics.ClientMetricsUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class ConsolePreparableReporter implements PreparableReporter {
    private static final Logger LOG = LoggerFactory.getLogger(ConsolePreparableReporter.class);
    ConsoleReporter reporter = null;

    @Override
    public void prepare(MetricRegistry metricsRegistry, Map<String, Object> topoConf) {
        LOG.debug("Preparing...");
        ConsoleReporter.Builder builder = ConsoleReporter.forRegistry(metricsRegistry);

        builder.outputTo(System.out);
        Locale locale = ClientMetricsUtils.getMetricsReporterLocale(topoConf);
        if (locale != null) {
            builder.formattedFor(locale);
        }

        TimeUnit rateUnit = ClientMetricsUtils.getMetricsRateUnit(topoConf);
        if (rateUnit != null) {
            builder.convertRatesTo(rateUnit);
        }

        TimeUnit durationUnit = ClientMetricsUtils.getMetricsDurationUnit(topoConf);
        if (durationUnit != null) {
            builder.convertDurationsTo(durationUnit);
        }
        reporter = builder.build();
    }

    @Override
    public void start() {
        if (reporter != null) {
            LOG.debug("Starting...");
            reporter.start(10, TimeUnit.SECONDS);
        } else {
            throw new IllegalStateException("Attempt to start without preparing " + getClass().getSimpleName());
        }
    }

    @Override
    public void stop() {
        if (reporter != null) {
            LOG.debug("Stopping...");
            reporter.report();
            reporter.stop();
        } else {
            throw new IllegalStateException("Attempt to stop without preparing " + getClass().getSimpleName());
        }
    }
}


text:
@class DBASYNCLaunchEmptyResult;
@class DBASYNCLaunchResultBase;
@class DBASYNCPollError;
@class DBFILESLookupError;
@class DBNilObject;
@class DBSHARINGAccessLevel;
@class DBSHARINGAclUpdatePolicy;
@class DBSHARINGAddFileMemberError;
@class DBSHARINGAddFolderMemberError;
@class DBSHARINGAddMember;
@class DBSHARINGAddMemberSelectorError;
@class DBSHARINGCreateSharedLinkError;
@class DBSHARINGCreateSharedLinkWithSettingsError;
@class DBSHARINGExpectedSharedContentLinkMetadata;
@class DBSHARINGFileAction;
@class DBSHARINGFileMemberActionError;
@class DBSHARINGFileMemberActionIndividualResult;
@class DBSHARINGFileMemberActionResult;
@class DBSHARINGFileMemberRemoveActionResult;
@class DBSHARINGFilePermission;
@class DBSHARINGFolderAction;
@class DBSHARINGFolderPermission;
@class DBSHARINGFolderPolicy;
@class DBSHARINGGetFileMetadataBatchResult;
@class DBSHARINGGetFileMetadataError;
@class DBSHARINGGetFileMetadataIndividualResult;
@class DBSHARINGGetSharedLinkFileError;
@class DBSHARINGGetSharedLinksError;
@class DBSHARINGGetSharedLinksResult;
@class DBSHARINGGroupMembershipInfo;
@class DBSHARINGInsufficientQuotaAmounts;
@class DBSHARINGInviteeMembershipInfo;
@class DBSHARINGJobError;
@class DBSHARINGJobStatus;
@class DBSHARINGLinkAudience;
@class DBSHARINGLinkExpiry;
@class DBSHARINGLinkMetadata;
@class DBSHARINGLinkPassword;
@class DBSHARINGLinkPermissions;
@class DBSHARINGLinkSettings;
@class DBSHARINGListFileMembersBatchResult;
@class DBSHARINGListFileMembersContinueError;
@class DBSHARINGListFileMembersError;
@class DBSHARINGListFileMembersIndividualResult;
@class DBSHARINGListFilesContinueError;
@class DBSHARINGListFilesResult;
@class DBSHARINGListFolderMembersContinueError;
@class DBSHARINGListFoldersContinueError;
@class DBSHARINGListFoldersResult;
@class DBSHARINGListSharedLinksError;
@class DBSHARINGListSharedLinksResult;
@class DBSHARINGMemberAccessLevelResult;
@class DBSHARINGMemberAction;
@class DBSHARINGMemberPolicy;
@class DBSHARINGMemberSelector;
@class DBSHARINGModifySharedLinkSettingsError;
@class DBSHARINGMountFolderError;
@class DBSHARINGParentFolderAccessInfo;
@class DBSHARINGPathLinkMetadata;
@class DBSHARINGPendingUploadMode;
@class DBSHARINGRelinquishFileMembershipError;
@class DBSHARINGRelinquishFolderMembershipError;
@class DBSHARINGRemoveFileMemberError;
@class DBSHARINGRemoveFolderMemberError;
@class DBSHARINGRemoveMemberJobStatus;
@class DBSHARINGRequestedVisibility;
@class DBSHARINGRevokeSharedLinkError;
@class DBSHARINGShareFolderError;
@class DBSHARINGShareFolderJobStatus;
@class DBSHARINGShareFolderLaunch;
@class DBSHARINGSharePathError;
@class DBSHARINGSharedContentLinkMetadata;
@class DBSHARINGSharedFileMembers;
@class DBSHARINGSharedFileMetadata;
@class DBSHARINGSharedFolderAccessError;
@class DBSHARINGSharedFolderMemberError;
@class DBSHARINGSharedFolderMembers;
@class DBSHARINGSharedFolderMetadata;
@class DBSHARINGSharedLinkError;
@class DBSHARINGSharedLinkMetadata;
@class DBSHARINGSharedLinkPolicy;
@class DBSHARINGSharedLinkSettings;
@class DBSHARINGSharedLinkSettingsError;
@class DBSHARINGSharingFileAccessError;
@class DBSHARINGSharingUserError;
@class DBSHARINGTeamMemberInfo;
@class DBSHARINGTransferFolderError;
@class DBSHARINGUnmountFolderError;
@class DBSHARINGUnshareFileError;
@class DBSHARINGUnshareFolderError;
@class DBSHARINGUpdateFolderMemberError;
@class DBSHARINGUpdateFolderPolicyError;
@class DBSHARINGUserFileMembershipInfo;
@class DBSHARINGUserMembershipInfo;
@class DBSHARINGViewerInfoPolicy;
@class DBSHARINGVisibility;
@class DBUSERSTeam;

@protocol DBTransportClient;

///
/// Routes for the `Sharing` namespace
///

NS_ASSUME_NONNULL_BEGIN

@interface DBSHARINGUserAuthRoutes : NSObject

/// An instance of the networking client that each route will use to submit a
/// request.
@property (nonatomic, readonly) id<DBTransportClient> client;

/// Initializes the `DBSHARINGUserAuthRoutes` namespace container object with a
/// networking client.
- (instancetype)init:(id<DBTransportClient>)client;

///
/// Adds specified members to a file.
///
/// @param file File to which to add members.
/// @param members Members to add. Note that even an email address is given, this may result in a user being directy
/// added to the membership if that email is the user's main account email.
///
/// @return Through the response callback, the caller will receive a `NSArray<DBSHARINGFileMemberActionResult *>` object
/// on success or a `DBSHARINGAddFileMemberError` object on failure.
///
- (DBRpcTask<NSArray<DBSHARINGFileMemberActionResult *> *, DBSHARINGAddFileMemberError *> *)
addFileMember:(NSString *)file
      members:(NSArray<DBSHARINGMemberSelector *> *)members;

///
/// Adds specified members to a file.
///
/// @param file File to which to add members.
/// @param members Members to add. Note that even an email address is given, this may result in a user being directy
/// added to the membership if that email is the user's main account email.
/// @param customMessage Message to send to added members in their invitation.
/// @param quiet Whether added members should be notified via device notifications of their invitation.
/// @param accessLevel AccessLevel union object, describing what access level we want to give new members.
/// @param addMessageAsComment If the custom message should be added as a comment on the file.
///
/// @return Through the response callback, the caller will receive a `NSArray<DBSHARINGFileMemberActionResult *>` object
/// on success or a `DBSHARINGAddFileMemberError` object on failure.
///
- (DBRpcTask<NSArray<DBSHARINGFileMemberActionResult *> *, DBSHARINGAddFileMemberError *> *)
      addFileMember:(NSString *)file
            members:(NSArray<DBSHARINGMemberSelector *> *)members
      customMessage:(nullable NSString *)customMessage
              quiet:(nullable NSNumber *)quiet
        accessLevel:(nullable DBSHARINGAccessLevel *)accessLevel
addMessageAsComment:(nullable NSNumber *)addMessageAsComment;

///
/// Allows an owner or editor (if the ACL update policy allows) of a shared folder to add another member. For the new
/// member to get access to all the functionality for this folder, you will need to call `mountFolder` on their behalf.
/// Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param members The intended list of members to add.  Added members will receive invites to join the shared folder.
///
/// @return Through the response callback, the caller will receive a `void` object on success or a
/// `DBSHARINGAddFolderMemberError` object on failure.
///
- (DBRpcTask<DBNilObject *, DBSHARINGAddFolderMemberError *> *)addFolderMember:(NSString *)sharedFolderId
                                                                       members:(NSArray<DBSHARINGAddMember *> *)members;

///
/// Allows an owner or editor (if the ACL update policy allows) of a shared folder to add another member. For the new
/// member to get access to all the functionality for this folder, you will need to call `mountFolder` on their behalf.
/// Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param members The intended list of members to add.  Added members will receive invites to join the shared folder.
/// @param quiet Whether added members should be notified via email and device notifications of their invite.
/// @param customMessage Optional message to display to added members in their invitation.
///
/// @return Through the response callback, the caller will receive a `void` object on success or a
/// `DBSHARINGAddFolderMemberError` object on failure.
///
- (DBRpcTask<DBNilObject *, DBSHARINGAddFolderMemberError *> *)addFolderMember:(NSString *)sharedFolderId
                                                                       members:(NSArray<DBSHARINGAddMember *> *)members
                                                                         quiet:(nullable NSNumber *)quiet
                                                                 customMessage:(nullable NSString *)customMessage;

///
/// DEPRECATED: Identical to update_file_member but with less information returned.
///
/// @param file File for which we are changing a member's access.
/// @param member The member whose access we are changing.
/// @param accessLevel The new access level for the member.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGFileMemberActionResult` object on success
/// or a `DBSHARINGFileMemberActionError` object on failure.
///
- (DBRpcTask<DBSHARINGFileMemberActionResult *, DBSHARINGFileMemberActionError *> *)
changeFileMemberAccess:(NSString *)file
                member:(DBSHARINGMemberSelector *)member
           accessLevel:(DBSHARINGAccessLevel *)accessLevel
    __deprecated_msg("changeFileMemberAccess is deprecated. Use updateFileMember.");

///
/// Returns the status of an asynchronous job. Apps must have full Dropbox access to use this endpoint.
///
/// @param asyncJobId Id of the asynchronous job. This is the value of a response returned from the method that launched
/// the job.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGJobStatus` object on success or a
/// `DBASYNCPollError` object on failure.
///
- (DBRpcTask<DBSHARINGJobStatus *, DBASYNCPollError *> *)checkJobStatus:(NSString *)asyncJobId;

///
/// Returns the status of an asynchronous job for sharing a folder. Apps must have full Dropbox access to use this
/// endpoint.
///
/// @param asyncJobId Id of the asynchronous job. This is the value of a response returned from the method that launched
/// the job.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGRemoveMemberJobStatus` object on success
/// or a `DBASYNCPollError` object on failure.
///
- (DBRpcTask<DBSHARINGRemoveMemberJobStatus *, DBASYNCPollError *> *)checkRemoveMemberJobStatus:(NSString *)asyncJobId;

///
/// Returns the status of an asynchronous job for sharing a folder. Apps must have full Dropbox access to use this
/// endpoint.
///
/// @param asyncJobId Id of the asynchronous job. This is the value of a response returned from the method that launched
/// the job.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGShareFolderJobStatus` object on success
/// or a `DBASYNCPollError` object on failure.
///
- (DBRpcTask<DBSHARINGShareFolderJobStatus *, DBASYNCPollError *> *)checkShareJobStatus:(NSString *)asyncJobId;

///
/// DEPRECATED: Create a shared link. If a shared link already exists for the given path, that link is returned. Note
/// that in the returned PathLinkMetadata, the `url` in `DBSHARINGPathLinkMetadata` field is the shortened URL if
/// `shortUrl` in `DBSHARINGCreateSharedLinkArg` argument is set to true. Previously, it was technically possible to
/// break a shared link by moving or renaming the corresponding file or folder. In the future, this will no longer be
/// the case, so your app shouldn't rely on this behavior. Instead, if your app needs to revoke a shared link, use
/// `revokeSharedLink`.
///
/// @param path The path to share.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGPathLinkMetadata` object on success or a
/// `DBSHARINGCreateSharedLinkError` object on failure.
///
- (DBRpcTask<DBSHARINGPathLinkMetadata *, DBSHARINGCreateSharedLinkError *> *)createSharedLink:(NSString *)path
    __deprecated_msg("createSharedLink is deprecated. Use createSharedLinkWithSettings.");

///
/// DEPRECATED: Create a shared link. If a shared link already exists for the given path, that link is returned. Note
/// that in the returned PathLinkMetadata, the `url` in `DBSHARINGPathLinkMetadata` field is the shortened URL if
/// `shortUrl` in `DBSHARINGCreateSharedLinkArg` argument is set to true. Previously, it was technically possible to
/// break a shared link by moving or renaming the corresponding file or folder. In the future, this will no longer be
/// the case, so your app shouldn't rely on this behavior. Instead, if your app needs to revoke a shared link, use
/// `revokeSharedLink`.
///
/// @param path The path to share.
/// @param shortUrl Whether to return a shortened URL.
/// @param pendingUpload If it's okay to share a path that does not yet exist, set this to either `file` in
/// `DBSHARINGPendingUploadMode` or `folder` in `DBSHARINGPendingUploadMode` to indicate whether to assume it's a file
/// or folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGPathLinkMetadata` object on success or a
/// `DBSHARINGCreateSharedLinkError` object on failure.
///
- (DBRpcTask<DBSHARINGPathLinkMetadata *, DBSHARINGCreateSharedLinkError *> *)
createSharedLink:(NSString *)path
        shortUrl:(nullable NSNumber *)shortUrl
   pendingUpload:(nullable DBSHARINGPendingUploadMode *)pendingUpload
    __deprecated_msg("createSharedLink is deprecated. Use createSharedLinkWithSettings.");

///
/// Create a shared link with custom settings. If no settings are given then the default visibility is `public` in
/// `DBSHARINGRequestedVisibility` (The resolved visibility, though, may depend on other aspects such as team and shared
/// folder settings).
///
/// @param path The path to be shared by the shared link.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGCreateSharedLinkWithSettingsError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGCreateSharedLinkWithSettingsError *> *)
createSharedLinkWithSettings:(NSString *)path;

///
/// Create a shared link with custom settings. If no settings are given then the default visibility is `public` in
/// `DBSHARINGRequestedVisibility` (The resolved visibility, though, may depend on other aspects such as team and shared
/// folder settings).
///
/// @param path The path to be shared by the shared link.
/// @param settings The requested settings for the newly created shared link.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGCreateSharedLinkWithSettingsError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGCreateSharedLinkWithSettingsError *> *)
createSharedLinkWithSettings:(NSString *)path
                    settings:(nullable DBSHARINGSharedLinkSettings *)settings;

///
/// Returns shared file metadata.
///
/// @param file The file to query.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFileMetadata` object on success or
/// a `DBSHARINGGetFileMetadataError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFileMetadata *, DBSHARINGGetFileMetadataError *> *)getFileMetadata:(NSString *)file;

///
/// Returns shared file metadata.
///
/// @param file The file to query.
/// @param actions A list of `FileAction`s corresponding to `FilePermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFileMetadata` field describing the actions the  authenticated user can perform on
/// the file.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFileMetadata` object on success or
/// a `DBSHARINGGetFileMetadataError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFileMetadata *, DBSHARINGGetFileMetadataError *> *)
getFileMetadata:(NSString *)file
        actions:(nullable NSArray<DBSHARINGFileAction *> *)actions;

///
/// Returns shared file metadata.
///
/// @param files The files to query.
///
/// @return Through the response callback, the caller will receive a `NSArray<DBSHARINGGetFileMetadataBatchResult *>`
/// object on success or a `DBSHARINGSharingUserError` object on failure.
///
- (DBRpcTask<NSArray<DBSHARINGGetFileMetadataBatchResult *> *, DBSHARINGSharingUserError *> *)getFileMetadataBatch:
    (NSArray<NSString *> *)files;

///
/// Returns shared file metadata.
///
/// @param files The files to query.
/// @param actions A list of `FileAction`s corresponding to `FilePermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFileMetadata` field describing the actions the  authenticated user can perform on
/// the file.
///
/// @return Through the response callback, the caller will receive a `NSArray<DBSHARINGGetFileMetadataBatchResult *>`
/// object on success or a `DBSHARINGSharingUserError` object on failure.
///
- (DBRpcTask<NSArray<DBSHARINGGetFileMetadataBatchResult *> *, DBSHARINGSharingUserError *> *)
getFileMetadataBatch:(NSArray<NSString *> *)files
             actions:(nullable NSArray<DBSHARINGFileAction *> *)actions;

///
/// Returns shared folder metadata by its folder ID. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMetadata` object on success
/// or a `DBSHARINGSharedFolderAccessError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGSharedFolderAccessError *> *)getFolderMetadata:
    (NSString *)sharedFolderId;

///
/// Returns shared folder metadata by its folder ID. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param actions A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFolderMetadata` field describing the actions the  authenticated user can perform on
/// the folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMetadata` object on success
/// or a `DBSHARINGSharedFolderAccessError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGSharedFolderAccessError *> *)
getFolderMetadata:(NSString *)sharedFolderId
          actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
/// @param overwrite A boolean to set behavior in the event of a naming conflict. `YES` will overwrite conflicting file
/// at destination. `NO` will take no action, resulting in an `NSError` returned to the response handler in the event of
/// a file conflict.
/// @param destination The file url of the desired download output location.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)
getSharedLinkFileUrl:(NSString *)url
           overwrite:(BOOL)overwrite
         destination:(NSURL *)destination;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
/// @param path If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific
/// file or sub-folder in this folder. A relative path should be used.
/// @param linkPassword If the shared link has a password, this parameter can be used.
/// @param overwrite A boolean to set behavior in the event of a naming conflict. `YES` will overwrite conflicting file
/// at destination. `NO` will take no action, resulting in an `NSError` returned to the response handler in the event of
/// a file conflict.
/// @param destination The file url of the desired download output location.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)
getSharedLinkFileUrl:(NSString *)url
                path:(nullable NSString *)path
        linkPassword:(nullable NSString *)linkPassword
           overwrite:(BOOL)overwrite
         destination:(NSURL *)destination;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
/// @param overwrite A boolean to set behavior in the event of a naming conflict. `YES` will overwrite conflicting file
/// at destination. `NO` will take no action, resulting in an `NSError` returned to the response handler in the event of
/// a file conflict.
/// @param destination The file url of the desired download output location.
/// @param byteOffsetStart For partial file download. Download file beginning from this starting byte position. Must
/// include valid end range value.
/// @param byteOffsetEnd For partial file download. Download file up until this ending byte position. Must include valid
/// start range value.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)
getSharedLinkFileUrl:(NSString *)url
           overwrite:(BOOL)overwrite
         destination:(NSURL *)destination
     byteOffsetStart:(NSNumber *)byteOffsetStart
       byteOffsetEnd:(NSNumber *)byteOffsetEnd;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
/// @param path If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific
/// file or sub-folder in this folder. A relative path should be used.
/// @param linkPassword If the shared link has a password, this parameter can be used.
/// @param overwrite A boolean to set behavior in the event of a naming conflict. `YES` will overwrite conflicting file
/// at destination. `NO` will take no action, resulting in an `NSError` returned to the response handler in the event of
/// a file conflict.
/// @param destination The file url of the desired download output location.
/// @param byteOffsetStart For partial file download. Download file beginning from this starting byte position. Must
/// include valid end range value.
/// @param byteOffsetEnd For partial file download. Download file up until this ending byte position. Must include valid
/// start range value.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadUrlTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)
getSharedLinkFileUrl:(NSString *)url
                path:(nullable NSString *)path
        linkPassword:(nullable NSString *)linkPassword
           overwrite:(BOOL)overwrite
         destination:(NSURL *)destination
     byteOffsetStart:(NSNumber *)byteOffsetStart
       byteOffsetEnd:(NSNumber *)byteOffsetEnd;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)getSharedLinkFileData:
    (NSString *)url;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
/// @param path If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific
/// file or sub-folder in this folder. A relative path should be used.
/// @param linkPassword If the shared link has a password, this parameter can be used.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)
getSharedLinkFileData:(NSString *)url
                 path:(nullable NSString *)path
         linkPassword:(nullable NSString *)linkPassword;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
/// @param byteOffsetStart For partial file download. Download file beginning from this starting byte position. Must
/// include valid end range value.
/// @param byteOffsetEnd For partial file download. Download file up until this ending byte position. Must include valid
/// start range value.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)
getSharedLinkFileData:(NSString *)url
      byteOffsetStart:(NSNumber *)byteOffsetStart
        byteOffsetEnd:(NSNumber *)byteOffsetEnd;

///
/// Download the shared link's file from a user's Dropbox.
///
/// @param url URL of the shared link.
/// @param path If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific
/// file or sub-folder in this folder. A relative path should be used.
/// @param linkPassword If the shared link has a password, this parameter can be used.
/// @param byteOffsetStart For partial file download. Download file beginning from this starting byte position. Must
/// include valid end range value.
/// @param byteOffsetEnd For partial file download. Download file up until this ending byte position. Must include valid
/// start range value.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGGetSharedLinkFileError` object on failure.
///
- (DBDownloadDataTask<DBSHARINGSharedLinkMetadata *, DBSHARINGGetSharedLinkFileError *> *)
getSharedLinkFileData:(NSString *)url
                 path:(nullable NSString *)path
         linkPassword:(nullable NSString *)linkPassword
      byteOffsetStart:(NSNumber *)byteOffsetStart
        byteOffsetEnd:(NSNumber *)byteOffsetEnd;

///
/// Get the shared link's metadata.
///
/// @param url URL of the shared link.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGSharedLinkError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGSharedLinkError *> *)getSharedLinkMetadata:(NSString *)url;

///
/// Get the shared link's metadata.
///
/// @param url URL of the shared link.
/// @param path If the shared link is to a folder, this parameter can be used to retrieve the metadata for a specific
/// file or sub-folder in this folder. A relative path should be used.
/// @param linkPassword If the shared link has a password, this parameter can be used.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGSharedLinkError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGSharedLinkError *> *)
getSharedLinkMetadata:(NSString *)url
                 path:(nullable NSString *)path
         linkPassword:(nullable NSString *)linkPassword;

///
/// DEPRECATED: Returns a list of LinkMetadata objects for this user, including collection links. If no path is given,
/// returns a list of all shared links for the current user, including collection links, up to a maximum of 1000 links.
/// If a non-empty path is given, returns a list of all shared links that allow access to the given path.  Collection
/// links are never returned in this case. Note that the url field in the response is never the shortened URL.
///
///
/// @return Through the response callback, the caller will receive a `DBSHARINGGetSharedLinksResult` object on success
/// or a `DBSHARINGGetSharedLinksError` object on failure.
///
- (DBRpcTask<DBSHARINGGetSharedLinksResult *, DBSHARINGGetSharedLinksError *> *)getSharedLinks
    __deprecated_msg("getSharedLinks is deprecated. Use listSharedLinks.");

///
/// DEPRECATED: Returns a list of LinkMetadata objects for this user, including collection links. If no path is given,
/// returns a list of all shared links for the current user, including collection links, up to a maximum of 1000 links.
/// If a non-empty path is given, returns a list of all shared links that allow access to the given path.  Collection
/// links are never returned in this case. Note that the url field in the response is never the shortened URL.
///
/// @param path See `getSharedLinks` description.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGGetSharedLinksResult` object on success
/// or a `DBSHARINGGetSharedLinksError` object on failure.
///
- (DBRpcTask<DBSHARINGGetSharedLinksResult *, DBSHARINGGetSharedLinksError *> *)getSharedLinks:(nullable NSString *)path
    __deprecated_msg("getSharedLinks is deprecated. Use listSharedLinks.");

///
/// Use to obtain the members who have been invited to a file, both inherited and uninherited members.
///
/// @param file The file for which you want to see members.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFileMembers` object on success or a
/// `DBSHARINGListFileMembersError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFileMembers *, DBSHARINGListFileMembersError *> *)listFileMembers:(NSString *)file;

///
/// Use to obtain the members who have been invited to a file, both inherited and uninherited members.
///
/// @param file The file for which you want to see members.
/// @param actions The actions for which to return permissions on a member.
/// @param includeInherited Whether to include members who only have access from a parent shared folder.
/// @param limit Number of members to return max per query. Defaults to 100 if no limit is specified.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFileMembers` object on success or a
/// `DBSHARINGListFileMembersError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFileMembers *, DBSHARINGListFileMembersError *> *)
 listFileMembers:(NSString *)file
         actions:(nullable NSArray<DBSHARINGMemberAction *> *)actions
includeInherited:(nullable NSNumber *)includeInherited
           limit:(nullable NSNumber *)limit;

///
/// Get members of multiple files at once. The arguments to this route are more limited, and the limit on query result
/// size per file is more strict. To customize the results more, use the individual file endpoint. Inherited users and
/// groups are not included in the result, and permissions are not returned for this endpoint.
///
/// @param files Files for which to return members.
///
/// @return Through the response callback, the caller will receive a `NSArray<DBSHARINGListFileMembersBatchResult *>`
/// object on success or a `DBSHARINGSharingUserError` object on failure.
///
- (DBRpcTask<NSArray<DBSHARINGListFileMembersBatchResult *> *, DBSHARINGSharingUserError *> *)listFileMembersBatch:
    (NSArray<NSString *> *)files;

///
/// Get members of multiple files at once. The arguments to this route are more limited, and the limit on query result
/// size per file is more strict. To customize the results more, use the individual file endpoint. Inherited users and
/// groups are not included in the result, and permissions are not returned for this endpoint.
///
/// @param files Files for which to return members.
/// @param limit Number of members to return max per query. Defaults to 10 if no limit is specified.
///
/// @return Through the response callback, the caller will receive a `NSArray<DBSHARINGListFileMembersBatchResult *>`
/// object on success or a `DBSHARINGSharingUserError` object on failure.
///
- (DBRpcTask<NSArray<DBSHARINGListFileMembersBatchResult *> *, DBSHARINGSharingUserError *> *)
listFileMembersBatch:(NSArray<NSString *> *)files
               limit:(nullable NSNumber *)limit;

///
/// Once a cursor has been retrieved from `listFileMembers` or `listFileMembersBatch`, use this to paginate through all
/// shared file members.
///
/// @param cursor The cursor returned by your last call to `listFileMembers`, `listFileMembersContinue`, or
/// `listFileMembersBatch`.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFileMembers` object on success or a
/// `DBSHARINGListFileMembersContinueError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFileMembers *, DBSHARINGListFileMembersContinueError *> *)listFileMembersContinue:
    (NSString *)cursor;

///
/// Returns shared folder membership by its folder ID. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMembers` object on success or
/// a `DBSHARINGSharedFolderAccessError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMembers *, DBSHARINGSharedFolderAccessError *> *)listFolderMembers:
    (NSString *)sharedFolderId;

///
/// Returns shared folder membership by its folder ID. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMembers` object on success or
/// a `DBSHARINGSharedFolderAccessError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMembers *, DBSHARINGSharedFolderAccessError *> *)
listFolderMembers:(NSString *)sharedFolderId
          actions:(nullable NSArray<DBSHARINGMemberAction *> *)actions
            limit:(nullable NSNumber *)limit;

///
/// Once a cursor has been retrieved from `listFolderMembers`, use this to paginate through all shared folder members.
/// Apps must have full Dropbox access to use this endpoint.
///
/// @param cursor The cursor returned by your last call to `listFolderMembers` or `listFolderMembersContinue`.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMembers` object on success or
/// a `DBSHARINGListFolderMembersContinueError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMembers *, DBSHARINGListFolderMembersContinueError *> *)listFolderMembersContinue:
    (NSString *)cursor;

///
/// Return the list of all shared folders the current user has access to. Apps must have full Dropbox access to use this
/// endpoint.
///
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFoldersResult` object on success or a
/// `void` object on failure.
///
- (DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *)listFolders;

///
/// Return the list of all shared folders the current user has access to. Apps must have full Dropbox access to use this
/// endpoint.
///
/// @param limit The maximum number of results to return per request.
/// @param actions A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFolderMetadata` field describing the actions the  authenticated user can perform on
/// the folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFoldersResult` object on success or a
/// `void` object on failure.
///
- (DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *)listFolders:(nullable NSNumber *)limit
                                                                actions:(nullable NSArray<DBSHARINGFolderAction *> *)
                                                                            actions;

///
/// Once a cursor has been retrieved from `listFolders`, use this to paginate through all shared folders. The cursor
/// must come from a previous call to `listFolders` or `listFoldersContinue`. Apps must have full Dropbox access to use
/// this endpoint.
///
/// @param cursor The cursor returned by the previous API call specified in the endpoint description.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFoldersResult` object on success or a
/// `DBSHARINGListFoldersContinueError` object on failure.
///
- (DBRpcTask<DBSHARINGListFoldersResult *, DBSHARINGListFoldersContinueError *> *)listFoldersContinue:
    (NSString *)cursor;

///
/// Return the list of all shared folders the current user can mount or unmount. Apps must have full Dropbox access to
/// use this endpoint.
///
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFoldersResult` object on success or a
/// `void` object on failure.
///
- (DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *)listMountableFolders;

///
/// Return the list of all shared folders the current user can mount or unmount. Apps must have full Dropbox access to
/// use this endpoint.
///
/// @param limit The maximum number of results to return per request.
/// @param actions A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFolderMetadata` field describing the actions the  authenticated user can perform on
/// the folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFoldersResult` object on success or a
/// `void` object on failure.
///
- (DBRpcTask<DBSHARINGListFoldersResult *, DBNilObject *> *)
listMountableFolders:(nullable NSNumber *)limit
             actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions;

///
/// Once a cursor has been retrieved from `listMountableFolders`, use this to paginate through all mountable shared
/// folders. The cursor must come from a previous call to `listMountableFolders` or `listMountableFoldersContinue`. Apps
/// must have full Dropbox access to use this endpoint.
///
/// @param cursor The cursor returned by the previous API call specified in the endpoint description.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFoldersResult` object on success or a
/// `DBSHARINGListFoldersContinueError` object on failure.
///
- (DBRpcTask<DBSHARINGListFoldersResult *, DBSHARINGListFoldersContinueError *> *)listMountableFoldersContinue:
    (NSString *)cursor;

///
/// Returns a list of all files shared with current user.  Does not include files the user has received via shared
/// folders, and does  not include unclaimed invitations.
///
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFilesResult` object on success or a
/// `DBSHARINGSharingUserError` object on failure.
///
- (DBRpcTask<DBSHARINGListFilesResult *, DBSHARINGSharingUserError *> *)listReceivedFiles;

///
/// Returns a list of all files shared with current user.  Does not include files the user has received via shared
/// folders, and does  not include unclaimed invitations.
///
/// @param limit Number of files to return max per query. Defaults to 100 if no limit is specified.
/// @param actions A list of `FileAction`s corresponding to `FilePermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFileMetadata` field describing the actions the  authenticated user can perform on
/// the file.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFilesResult` object on success or a
/// `DBSHARINGSharingUserError` object on failure.
///
- (DBRpcTask<DBSHARINGListFilesResult *, DBSHARINGSharingUserError *> *)
listReceivedFiles:(nullable NSNumber *)limit
          actions:(nullable NSArray<DBSHARINGFileAction *> *)actions;

///
/// Get more results with a cursor from `listReceivedFiles`.
///
/// @param cursor Cursor in `cursor` in `DBSHARINGListFilesResult`.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListFilesResult` object on success or a
/// `DBSHARINGListFilesContinueError` object on failure.
///
- (DBRpcTask<DBSHARINGListFilesResult *, DBSHARINGListFilesContinueError *> *)listReceivedFilesContinue:
    (NSString *)cursor;

///
/// List shared links of this user. If no path is given, returns a list of all shared links for the current user. If a
/// non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to
/// the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting
/// direct_only to true.
///
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListSharedLinksResult` object on success
/// or a `DBSHARINGListSharedLinksError` object on failure.
///
- (DBRpcTask<DBSHARINGListSharedLinksResult *, DBSHARINGListSharedLinksError *> *)listSharedLinks;

///
/// List shared links of this user. If no path is given, returns a list of all shared links for the current user. If a
/// non-empty path is given, returns a list of all shared links that allow access to the given path - direct links to
/// the given path and links to parent folders of the given path. Links to parent folders can be suppressed by setting
/// direct_only to true.
///
/// @param path See `listSharedLinks` description.
/// @param cursor The cursor returned by your last call to `listSharedLinks`.
/// @param directOnly See `listSharedLinks` description.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGListSharedLinksResult` object on success
/// or a `DBSHARINGListSharedLinksError` object on failure.
///
- (DBRpcTask<DBSHARINGListSharedLinksResult *, DBSHARINGListSharedLinksError *> *)
listSharedLinks:(nullable NSString *)path
         cursor:(nullable NSString *)cursor
     directOnly:(nullable NSNumber *)directOnly;

///
/// Modify the shared link's settings. If the requested visibility conflict with the shared links policy of the team or
/// the shared folder (in case the linked file is part of a shared folder) then the `resolvedVisibility` in
/// `DBSHARINGLinkPermissions` of the returned SharedLinkMetadata will reflect the actual visibility of the shared link
/// and the `requestedVisibility` in `DBSHARINGLinkPermissions` will reflect the requested visibility.
///
/// @param url URL of the shared link to change its settings.
/// @param settings Set of settings for the shared link.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGModifySharedLinkSettingsError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGModifySharedLinkSettingsError *> *)
modifySharedLinkSettings:(NSString *)url
                settings:(DBSHARINGSharedLinkSettings *)settings;

///
/// Modify the shared link's settings. If the requested visibility conflict with the shared links policy of the team or
/// the shared folder (in case the linked file is part of a shared folder) then the `resolvedVisibility` in
/// `DBSHARINGLinkPermissions` of the returned SharedLinkMetadata will reflect the actual visibility of the shared link
/// and the `requestedVisibility` in `DBSHARINGLinkPermissions` will reflect the requested visibility.
///
/// @param url URL of the shared link to change its settings.
/// @param settings Set of settings for the shared link.
/// @param removeExpiration If set to true, removes the expiration of the shared link.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedLinkMetadata` object on success or
/// a `DBSHARINGModifySharedLinkSettingsError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedLinkMetadata *, DBSHARINGModifySharedLinkSettingsError *> *)
modifySharedLinkSettings:(NSString *)url
                settings:(DBSHARINGSharedLinkSettings *)settings
        removeExpiration:(nullable NSNumber *)removeExpiration;

///
/// The current user mounts the designated folder. Mount a shared folder for a user after they have been added as a
/// member. Once mounted, the shared folder will appear in their Dropbox. Apps must have full Dropbox access to use this
/// endpoint.
///
/// @param sharedFolderId The ID of the shared folder to mount.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMetadata` object on success
/// or a `DBSHARINGMountFolderError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGMountFolderError *> *)mountFolder:(NSString *)sharedFolderId;

///
/// The current user relinquishes their membership in the designated file. Note that the current user may still have
/// inherited access to this file through the parent folder. Apps must have full Dropbox access to use this endpoint.
///
/// @param file The path or id for the file.
///
/// @return Through the response callback, the caller will receive a `void` object on success or a
/// `DBSHARINGRelinquishFileMembershipError` object on failure.
///
- (DBRpcTask<DBNilObject *, DBSHARINGRelinquishFileMembershipError *> *)relinquishFileMembership:(NSString *)file;

///
/// The current user relinquishes their membership in the designated shared folder and will no longer have access to the
/// folder.  A folder owner cannot relinquish membership in their own folder. This will run synchronously if
/// leave_a_copy is false, and asynchronously if leave_a_copy is true. Apps must have full Dropbox access to use this
/// endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
///
/// @return Through the response callback, the caller will receive a `DBASYNCLaunchEmptyResult` object on success or a
/// `DBSHARINGRelinquishFolderMembershipError` object on failure.
///
- (DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGRelinquishFolderMembershipError *> *)relinquishFolderMembership:
    (NSString *)sharedFolderId;

///
/// The current user relinquishes their membership in the designated shared folder and will no longer have access to the
/// folder.  A folder owner cannot relinquish membership in their own folder. This will run synchronously if
/// leave_a_copy is false, and asynchronously if leave_a_copy is true. Apps must have full Dropbox access to use this
/// endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param leaveACopy Keep a copy of the folder's contents upon relinquishing membership.
///
/// @return Through the response callback, the caller will receive a `DBASYNCLaunchEmptyResult` object on success or a
/// `DBSHARINGRelinquishFolderMembershipError` object on failure.
///
- (DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGRelinquishFolderMembershipError *> *)
relinquishFolderMembership:(NSString *)sharedFolderId
                leaveACopy:(nullable NSNumber *)leaveACopy;

///
/// DEPRECATED: Identical to remove_file_member_2 but with less information returned.
///
/// @param file File from which to remove members.
/// @param member Member to remove from this file. Note that even if an email is specified, it may result in the removal
/// of a user (not an invitee) if the user's main account corresponds to that email address.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGFileMemberActionIndividualResult` object
/// on success or a `DBSHARINGRemoveFileMemberError` object on failure.
///
- (DBRpcTask<DBSHARINGFileMemberActionIndividualResult *, DBSHARINGRemoveFileMemberError *> *)
removeFileMember:(NSString *)file
          member:(DBSHARINGMemberSelector *)member
    __deprecated_msg("removeFileMember is deprecated. Use removeFileMember2.");

///
/// Removes a specified member from the file.
///
/// @param file File from which to remove members.
/// @param member Member to remove from this file. Note that even if an email is specified, it may result in the removal
/// of a user (not an invitee) if the user's main account corresponds to that email address.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGFileMemberRemoveActionResult` object on
/// success or a `DBSHARINGRemoveFileMemberError` object on failure.
///
- (DBRpcTask<DBSHARINGFileMemberRemoveActionResult *, DBSHARINGRemoveFileMemberError *> *)
removeFileMember2:(NSString *)file
           member:(DBSHARINGMemberSelector *)member;

///
/// Allows an owner or editor (if the ACL update policy allows) of a shared folder to remove another member. Apps must
/// have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param member The member to remove from the folder.
/// @param leaveACopy If true, the removed user will keep their copy of the folder after it's unshared, assuming it was
/// mounted. Otherwise, it will be removed from their Dropbox. Also, this must be set to false when kicking a group.
///
/// @return Through the response callback, the caller will receive a `DBASYNCLaunchResultBase` object on success or a
/// `DBSHARINGRemoveFolderMemberError` object on failure.
///
- (DBRpcTask<DBASYNCLaunchResultBase *, DBSHARINGRemoveFolderMemberError *> *)
removeFolderMember:(NSString *)sharedFolderId
            member:(DBSHARINGMemberSelector *)member
        leaveACopy:(NSNumber *)leaveACopy;

///
/// Revoke a shared link. Note that even after revoking a shared link to a file, the file may be accessible if there are
/// shared links leading to any of the file parent folders. To list all shared links that enable access to a specific
/// file, you can use the `listSharedLinks` with the file as the `path` in `DBSHARINGListSharedLinksArg` argument.
///
/// @param url URL of the shared link.
///
/// @return Through the response callback, the caller will receive a `void` object on success or a
/// `DBSHARINGRevokeSharedLinkError` object on failure.
///
- (DBRpcTask<DBNilObject *, DBSHARINGRevokeSharedLinkError *> *)revokeSharedLink:(NSString *)url;

///
/// Share a folder with collaborators. Most sharing will be completed synchronously. Large folders will be completed
/// asynchronously. To make testing the async case repeatable, set `ShareFolderArg.force_async`. If a `asyncJobId` in
/// `DBSHARINGShareFolderLaunch` is returned, you'll need to call `checkShareJobStatus` until the action completes to
/// get the metadata for the folder. Apps must have full Dropbox access to use this endpoint.
///
///
/// @return Through the response callback, the caller will receive a `DBSHARINGShareFolderLaunch` object on success or a
/// `DBSHARINGShareFolderError` object on failure.
///
- (DBRpcTask<DBSHARINGShareFolderLaunch *, DBSHARINGShareFolderError *> *)shareFolder:(NSString *)path;

///
/// Share a folder with collaborators. Most sharing will be completed synchronously. Large folders will be completed
/// asynchronously. To make testing the async case repeatable, set `ShareFolderArg.force_async`. If a `asyncJobId` in
/// `DBSHARINGShareFolderLaunch` is returned, you'll need to call `checkShareJobStatus` until the action completes to
/// get the metadata for the folder. Apps must have full Dropbox access to use this endpoint.
///
/// @param actions A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFolderMetadata` field describing the actions the  authenticated user can perform on
/// the folder.
/// @param linkSettings Settings on the link for this folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGShareFolderLaunch` object on success or a
/// `DBSHARINGShareFolderError` object on failure.
///
- (DBRpcTask<DBSHARINGShareFolderLaunch *, DBSHARINGShareFolderError *> *)
     shareFolder:(NSString *)path
 aclUpdatePolicy:(nullable DBSHARINGAclUpdatePolicy *)aclUpdatePolicy
      forceAsync:(nullable NSNumber *)forceAsync
    memberPolicy:(nullable DBSHARINGMemberPolicy *)memberPolicy
sharedLinkPolicy:(nullable DBSHARINGSharedLinkPolicy *)sharedLinkPolicy
viewerInfoPolicy:(nullable DBSHARINGViewerInfoPolicy *)viewerInfoPolicy
         actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions
    linkSettings:(nullable DBSHARINGLinkSettings *)linkSettings;

///
/// Transfer ownership of a shared folder to a member of the shared folder. User must have `owner` in
/// `DBSHARINGAccessLevel` access to the shared folder to perform a transfer. Apps must have full Dropbox access to use
/// this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param toDropboxId A account or team member ID to transfer ownership to.
///
/// @return Through the response callback, the caller will receive a `void` object on success or a
/// `DBSHARINGTransferFolderError` object on failure.
///
- (DBRpcTask<DBNilObject *, DBSHARINGTransferFolderError *> *)transferFolder:(NSString *)sharedFolderId
                                                                 toDropboxId:(NSString *)toDropboxId;

///
/// The current user unmounts the designated folder. They can re-mount the folder at a later time using `mountFolder`.
/// Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
///
/// @return Through the response callback, the caller will receive a `void` object on success or a
/// `DBSHARINGUnmountFolderError` object on failure.
///
- (DBRpcTask<DBNilObject *, DBSHARINGUnmountFolderError *> *)unmountFolder:(NSString *)sharedFolderId;

///
/// Remove all members from this file. Does not remove inherited members.
///
/// @param file The file to unshare.
///
/// @return Through the response callback, the caller will receive a `void` object on success or a
/// `DBSHARINGUnshareFileError` object on failure.
///
- (DBRpcTask<DBNilObject *, DBSHARINGUnshareFileError *> *)unshareFile:(NSString *)file;

///
/// Allows a shared folder owner to unshare the folder. You'll need to call `checkJobStatus` to determine if the action
/// has completed successfully. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
///
/// @return Through the response callback, the caller will receive a `DBASYNCLaunchEmptyResult` object on success or a
/// `DBSHARINGUnshareFolderError` object on failure.
///
- (DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGUnshareFolderError *> *)unshareFolder:(NSString *)sharedFolderId;

///
/// Allows a shared folder owner to unshare the folder. You'll need to call `checkJobStatus` to determine if the action
/// has completed successfully. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param leaveACopy If true, members of this shared folder will get a copy of this folder after it's unshared.
/// Otherwise, it will be removed from their Dropbox. The current user, who is an owner, will always retain their copy.
///
/// @return Through the response callback, the caller will receive a `DBASYNCLaunchEmptyResult` object on success or a
/// `DBSHARINGUnshareFolderError` object on failure.
///
- (DBRpcTask<DBASYNCLaunchEmptyResult *, DBSHARINGUnshareFolderError *> *)unshareFolder:(NSString *)sharedFolderId
                                                                             leaveACopy:(nullable NSNumber *)leaveACopy;

///
/// Changes a member's access on a shared file.
///
///
/// @return Through the response callback, the caller will receive a `DBSHARINGMemberAccessLevelResult` object on
/// success or a `DBSHARINGFileMemberActionError` object on failure.
///
- (DBRpcTask<DBSHARINGMemberAccessLevelResult *, DBSHARINGFileMemberActionError *> *)
updateFileMember:(NSString *)file
          member:(DBSHARINGMemberSelector *)member
     accessLevel:(DBSHARINGAccessLevel *)accessLevel;

///
/// Allows an owner or editor of a shared folder to update another member's permissions. Apps must have full Dropbox
/// access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param member The member of the shared folder to update.  Only the `dropboxId` in `DBSHARINGMemberSelector` may be
/// set at this time.
/// @param accessLevel The new access level for member. `owner` in `DBSHARINGAccessLevel` is disallowed.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGMemberAccessLevelResult` object on
/// success or a `DBSHARINGUpdateFolderMemberError` object on failure.
///
- (DBRpcTask<DBSHARINGMemberAccessLevelResult *, DBSHARINGUpdateFolderMemberError *> *)
updateFolderMember:(NSString *)sharedFolderId
            member:(DBSHARINGMemberSelector *)member
       accessLevel:(DBSHARINGAccessLevel *)accessLevel;

///
/// Update the sharing policies for a shared folder. User must have `owner` in `DBSHARINGAccessLevel` access to the
/// shared folder to update its policies. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMetadata` object on success
/// or a `DBSHARINGUpdateFolderPolicyError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGUpdateFolderPolicyError *> *)updateFolderPolicy:
    (NSString *)sharedFolderId;

///
/// Update the sharing policies for a shared folder. User must have `owner` in `DBSHARINGAccessLevel` access to the
/// shared folder to update its policies. Apps must have full Dropbox access to use this endpoint.
///
/// @param sharedFolderId The ID for the shared folder.
/// @param memberPolicy Who can be a member of this shared folder. Only applicable if the current user is on a team.
/// @param aclUpdatePolicy Who can add and remove members of this shared folder.
/// @param viewerInfoPolicy Who can enable/disable viewer info for this shared folder.
/// @param sharedLinkPolicy The policy to apply to shared links created for content inside this shared folder. The
/// current user must be on a team to set this policy to `members` in `DBSHARINGSharedLinkPolicy`.
/// @param linkSettings Settings on the link for this folder.
/// @param actions A list of `FolderAction`s corresponding to `FolderPermission`s that should appear in the  response's
/// `permissions` in `DBSHARINGSharedFolderMetadata` field describing the actions the  authenticated user can perform on
/// the folder.
///
/// @return Through the response callback, the caller will receive a `DBSHARINGSharedFolderMetadata` object on success
/// or a `DBSHARINGUpdateFolderPolicyError` object on failure.
///
- (DBRpcTask<DBSHARINGSharedFolderMetadata *, DBSHARINGUpdateFolderPolicyError *> *)
updateFolderPolicy:(NSString *)sharedFolderId
      memberPolicy:(nullable DBSHARINGMemberPolicy *)memberPolicy
   aclUpdatePolicy:(nullable DBSHARINGAclUpdatePolicy *)aclUpdatePolicy
  viewerInfoPolicy:(nullable DBSHARINGViewerInfoPolicy *)viewerInfoPolicy
  sharedLinkPolicy:(nullable DBSHARINGSharedLinkPolicy *)sharedLinkPolicy
      linkSettings:(nullable DBSHARINGLinkSettings *)linkSettings
           actions:(nullable NSArray<DBSHARINGFolderAction *> *)actions;

@end

NS_ASSUME_NONNULL_END


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <parent>
    <groupId>org.gosu-lang.gosu</groupId>
    <artifactId>ragnardb-parent</artifactId>
    <version>0.1-SNAPSHOT</version>
    <relativePath>../ragnardb-parent/pom.xml</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>

  <artifactId>ragnardb</artifactId>

  <name>ragnardb</name>

  <dependencies>
    <dependency>
      <groupId>org.gosu-lang.gosu</groupId>
      <artifactId>gosu-core-api</artifactId>
      <version>${gosu.version}</version>
    </dependency>
    <dependency>
      <groupId>org.gosu-lang.gosu</groupId>
      <artifactId>gosu-core</artifactId>
      <version>${gosu.version}</version>
      <scope>runtime</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.h2database</groupId>
      <artifactId>h2</artifactId>
      <version>1.4.187</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

  <build>
    <resources>
      <resource>
        <directory>src/main/gosu</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>src/test/gosu</directory>
      </testResource>
      <testResource>
        <directory>src/test/resources</directory>
      </testResource>
    </testResources>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Gosu-Typeloaders>ragnardb.plugin.SQLPlugin</Gosu-Typeloaders>
              <Contains-Sources>ddl, sql</Contains-Sources>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

</project>


text:
package de.tse.accessorconcept._03_read_and_write_interface.interfaces.bytearray.writer;

import de.tse.accessorconcept._03_read_and_write_interface.interfaces.bytearray.ByteArrayHelper;
import de.tse.accessorconcept._03_read_and_write_interface.interfaces.bytearray.ByteArrayAttribute;
import de.tse.accessorconcept._03_read_and_write_interface.accessor.writer.AttributeWriter;

public class IntegerAttributeWriter implements AttributeWriter<byte[], Integer, ByteArrayAttribute<Integer>> {

    @Override public void write(final byte[] data, final ByteArrayAttribute<Integer> attribute, final Integer value) {
        ByteArrayHelper.writeInteger(value, data, attribute.getIndex(), attribute.getLength());
    }
}


text:
class PuppetGem < FPM::Cookery::Recipe
  description 'secureserver agent'

  name 'agent'
  version '0.0.1'

  source "nothing", :with => :noop

  require 'facter'

  platforms [:ubuntu, :debian] do
    # Potential dependencies
  end

  platforms [:fedora, :redhat, :centos] do
    # Potential dependencies
  end

  depends 'curl'

  def build
    destdir.mkdir
    if Facter.operatingsystem == 'Debian' || Facter.operatingsystem == 'Ubuntu'
      cp "#{workdir}/../scripts/ubuntu_agent.sh", destdir('/secureserver-agent')
    elsif Facter.operatingsystem == 'CentOS' || Facter.operatingsystem == 'RedHat' || Facter.operatingsystem == 'Fedora'
      cp "#{workdir}/../scripts/rhel_agent.sh", destdir('/secureserver-agent')
    end
    # Install the config script
    cp "#{workdir}/../scripts/secureserver-config.sh", destdir('/secureserver-config')
  end

  def install
    # Install init-script and puppet.conf
    install_files

    # Provide 'safe' binaries in /opt/<package>/bin like Vagrant does
    destdir('../bin').mkdir
    destdir('../bin').install workdir('omnibus.bin'), 'secureserver-agent'
    destdir('../bin').install workdir('omnibus.bin'), 'secureserver-config'
  end

  private

  def install_files
    etc('secureserver').mkdir
    etc('secureserver').install workdir('../etc/agent.config') => 'agent.config'
    if Facter.operatingsystem == 'Debian' || Facter.operatingsystem == 'Ubuntu'
      etc('init.d').install workdir('../scripts/ubuntu_agent.init') => 'secureserver-agent'
    elsif Facter.operatingsystem == 'CentOS' || Facter.operatingsystem == 'RedHat' || Facter.operatingsystem == 'Fedora'
      etc('init.d').install workdir('../scripts/rhel_agent.init') => 'secureserver-agent'
    end
    chmod 0755, etc('init.d/secureserver-agent')
  end
end


text:
class CXTBarButton;

/////////////////////////////////////////////////////////////////////////////
// CXTDockWindow is a CXTControlBar derived class which is simular to
// the sizing / docking windows that are seen in Developer Studio.
/////////////////////////////////////////////////////////////////////////////
class _XT_EXT_CLASS CXTDockWindow : public CXTControlBar
{
	DECLARE_DYNAMIC(CXTDockWindow)

public:

	// -> Parameters:
	// -> Return Value:
	// -> Remarks:			Constructor - handles default initialization.
	CXTDockWindow();

	// -> Parameters:
	// -> Return Value:
	// -> Remarks:			Destructor - handles cleanup and de-allocation.
	virtual ~CXTDockWindow();

protected:

	int				m_cxOffset;		// used to offset the horizontal client area to allow room for the caption when docked.
	int				m_nBtnIndex;	// used to determine which button icon to display when the control bar is minimized or maximized depending on which side docked.
	CWnd*			m_pChildWnd;	// CWnd pointer which is contains child window that is displayed in the control bar, see SetChild(CWnd* pWnd).
	CXTBarButton*	m_pBtnClose;	// close button used in caption area.
	CXTBarButton*	m_pBtnMinim;	// minimize button used in the caption area.
	CToolTipCtrl	m_ToolTip;		// tooltip used for caption buttons.

public:

	// -> Parameters:		dwRemove -	Specifies CBRS_XT_ styles to be removed during style
	//									modification.
	//						dwAdd	 -	Specifies CBRS_XT_ styles to be added during style
	//									modification.
	//
	//                      The desired styles for the control bar can be one or more of the
	//						following:
	//
	//						CBRS_XT_BUTTONS			-	The control bar has a minimize and
	//													close button when docked.
	//						CBRS_XT_GRIPPER			-	The control bar has a gripper when
	//													docked.
	//						CBRS_XT_GRIPPER_FLAT	-	The control bar has a flat gripper,
	//													use with CBRS_XT_GRIPPER.
	//						CBRS_XT_GRIPPER_GRAD	-	The control bar has a gradient flat
	//													gripper use with CBRS_XT_GRIPPER_FLAT.
	//						CBRS_XT_GRIPPER_TEXT	-	The control bar draws text in the
	//													gripper area, use with CBRS_XT_GRIPPER.
	//						CBRS_XT_BUTTONS_FLAT	-	The control bar min and max buttons
	//													are flat, use with CBRS_XT_BUTTONS.
	//						CBRS_XT_BORDERS_FLAT	-	The control bar borders are flat.
	//						CBRS_XT_CLIENT_OUTLINE	-	Draw a single black border outline
	//													around the client area.
	//						CBRS_XT_CLIENT_STATIC	-	Draw a static rect around the client
	//													area.
	//						CBRS_XT_CLIENT_MODAL	-	Draw a modal rect around the client
	//													area.
	//						CBRS_XT_ALL_FLAT		-	The following styles combined by using
	//													the bitwise OR (|) operator CBRS_XT_GRIPPER_FLAT,
	//													CBRS_XT_BUTTONS_FLAT and CBRS_XT_BORDERS_FLAT.
	//						CBRS_XT_DEFAULT			-	The following styles combined by using
	//													the bitwise OR (|) operator CBRS_XT_BUTTONS,
	//													CBRS_XT_GRIPPER, CBRS_XT_GRIPPER_TEXT.
	//
	// -> Return Value:		Nonzero if style was successfully modified; otherwise, 0.
	// -> Remarks:			Call this member function to modify a control bar style. Styles to
	//						be added or removed can be combined by using the bitwise OR (|)
	//						operator. See SetXTBarStyle for information about the available
	//						control bar styles.
	virtual BOOL ModifyXTBarStyle(DWORD dwRemove, DWORD dwAdd, BOOL bRedraw=TRUE);

	// -> Parameters:		pParentWnd	-	Pointer to the window that is the control bar's
	//										parent.
	//						nID			-	The control bar's window ID.
	//						lpszCaption -	Points to a null-terminated character string that
	//										represents the control bar name. Used as text for
	//										the caption.
	//						size		-	Specifies the default size of the control bar.
	//						dwStyle		-	The control bar style. Additional toolbar styles
	//										supported are:
	//
	//										CBRS_TOP			-	Control bar is at top
	//																of the frame window.
	//										CBRS_BOTTOM			-	Control bar is at bottom
	//																of the frame window.
	//										CBRS_NOALIGN		-	Control bar is not repositioned
	//																when the parent is resized.
	//										CBRS_TOOLTIPS		-	Control bar displays tool tips.
	//										CBRS_SIZE_DYNAMIC   -	Control bar is dynamic.
	//										CBRS_SIZE_FIXED		-	Control bar is fixed.
	//										CBRS_FLOATING		-	Control bar is floating.
	//										CBRS_FLYBY			-	Status bar displays information
	//																about the button.
	//										CBRS_HIDE_INPLACE   -	Control bar is not displayed
	//																to the user.
	//						dwBarStyle	-	Specifies CBRS_XT_ styles to be used during creation,
	//										see SetXTBarStyle for information about the available
	//										control bar styles.
	// -> Return Value:		Nonzero if successful; otherwise 0.
	// -> Remarks:			This member function creates a CXTDockWindow (a docking window).
	//						It also sets the control bar default size, style, ID and caption text.
	virtual BOOL Create( CWnd* pParentWnd, UINT nID, LPCTSTR lpszCaption=NULL,
		CSize size=CSize(200,100), DWORD dwStyle=CBRS_LEFT, DWORD dwBarStyle=CBRS_XT_DEFAULT);

	// -> Parameters:		rect	-	Reference to a CRect object that is to receive the
	//									size of the insize rect for the child window associated
	//									with the control bar.
	// -> Return Value:
	// -> Remarks:			This member function is called to return the default size for
	//						a the child window associated with the control bar.
	virtual void GetInsideRect(CRect& rect);

	// -> Parameters:
	// -> Return Value:		The minimum extent for a minimized control bar.
	// -> Remarks:			This member function is called to determine the minimum extent
	//						of the control bar when miminized or maximized.
	virtual int GetMinExt();

	// -> Parameters:
	// -> Return Value:		Nonzero if docked control bar is maximized; otherwise 0.
	// -> Remarks:			This member function is used to determine if the docked control
	//						bar is maximized.
	virtual BOOL IsMaximized() const;

	// -> Parameters:		size -	A reference to a CSize object that contains the normal
	//								size that the control bar should be.
	// -> Return Value:
	// -> Remarks:			This member function is called to set the normal size the for
	//						the control bar.
	virtual void SetNormalSize(const CSize &size);

	// -> Parameters:
	// -> Return Value:
	// -> Remarks:			This member function is called to return the control bar to
	//						its normal size.
	virtual void Normalize();

	// -> Parameters:
	// -> Return Value:
	// -> Remarks:			This member function is called to minimize the control bar.
	virtual int Minimize();

	// -> Parameters:
	// -> Return Value:
	// -> Remarks:			This member function is called to maximize the control bar.
	virtual void Maximize(int size);

	// -> Parameters:		dwStyle	-	Specifies whether the control bar supports docking
	//									and the sides of its parent window to which the
	//									control bar can be docked, if supported. Can be one
	//									or more of the following:
	//
	//										CBRS_ALIGN_TOP	  -	Allows docking at the
	//															top of the client area.
	//										CBRS_ALIGN_BOTTOM -	Allows docking at the
	//															bottom of the client area.
	//										CBRS_ALIGN_LEFT   -	Allows docking on the left
	//															side of the client area.
	//										CBRS_ALIGN_RIGHT  -	Allows docking on the right
	//															side of the client area.
	//										CBRS_ALIGN_ANY	  - Allows docking on any side
	//															of the client area.
	//										CBRS_FLOAT_MULTI  -	Allows multiple control bars
	//															to be floated in a single
	//															mini-frame window. If 0 (that
	//															is, indicating no flags), the
	//															control bar will not dock.
	// -> Return Value:
	// -> Remarks:			Call this function to enable a control bar to be docked. The sides
	//						specified must match one of the sides enabled for docking in the
	//						destination frame window, or the control bar cannot be docked to
	//						that frame window.
	virtual void EnableDocking(DWORD dwDockStyle);

	// -> Parameters:
	// -> Return Value:		An int value that represents the current width of the control
	//						bar when docked vertical.
	// -> Remarks:			This member function is used to determine the width of the
	//						control bar when docked vertical.
	virtual int GetVertSize();

	// -> Parameters:
	// -> Return Value:		An int value that represents the current height of the control
	//						bar when docked horizontal.
	// -> Remarks:			This member function is used to determine the width of the
	//						control bar when docked horizontal.
	virtual int GetHorzSize();

	// -> Parameters:	strSection	-	Name of a section in the initialization file or a key
	//									in the Windows registry where state information is stored.
	// -> Return Value:
	// -> Remarks:		Call this function to restore the settings of each control bar owned by
	//					the frame window. This information is written to the initialization file
	//					using SaveBarSize. Information restored includes visibility,
	//					horizontal/vertical orientation, docking state, and control-bar position.
	//					This function call is handled by CXTFrameWnd::LoadBarState, and should
	//					not be called directly.
	void LoadBarSize(CString strSection);

	// -> Parameters:	strSection	-	Name of a section in the initialization file or a key
	//									in the Windows registry where state information is stored.
	// -> Return Value:
	// -> Remarks:		Call this function to store information about each control bar owned by
	//					the frame window. This information can be read from the initialization file
	//					using LoadBarSize. Information stored includes visibility,
	//					horizontal/vertical orientation, docking state, and control bar position.
	//					This function call is handled by CXTFrameWnd::SaveBarState, and should
	//					not be called directly.
	void SaveBarSize(CString strSection);

protected:

	// -> Parameters:
	// -> Return Value:
	// -> Remarks:
	virtual void DelayShow(BOOL bShow);

	// -> Parameters:
	// -> Return Value:	Returns a CRect value that represents the size and location of the first
	//					grip line in the caption area when docked.
	// -> Remarks:		This member function is called to caluclate the size of the gripper displayed
	//					in the caption area of a docked control bar.
	virtual CRect GetGripperRect();

	// -> Parameters:
	// -> Return Value:	Returns a CRect value that represents the size and location of the
	//					close frame button when the docked.
	// -> Remarks:		This member function is called to calculate the size of the frame buttons
	//					used in the caption area of a docked control bar.
	virtual CRect GetButtonRect();

	// -> Parameters:	pDC -	Points to a device context. The function draws the gripper into
	//							this device context.
	// -> Return Value:
	// -> Remarks:		This member function is called by the control bar to draw the gripper in
	//					the caption area of a docked control bar.
	virtual void DrawGripper(CDC* pDC);

	// -> Parameters:	pWnd -	Points to the child CWnd object that is associated with the control
	//							bar. This pointer is used to resize the child window accordingly.
	// -> Return Value:
	// -> Remarks:		This member function is used to associate a child window that is to be
	//					displayed in the control bar.
	virtual void SetChild(CWnd* pWnd);

	// -> Parameters:	pDC	 -	Points to a device context. The function draws the borders into
	//							this device context.
	//					rect -	A reference to a CRect object that represents the size of the
	//							border to be drawn.
	// -> Return Value:
	// -> Remarks:		This member function is called by the control bar to draw its borders.
	virtual void DrawBorders(CDC *pDC, CRect &rect);

	// -> Parameters:
	// -> Return Value:
	// -> Remarks:		This member function is called by the control bar to perform
	//					paint operations.
	virtual void EraseNonClient();

	// -> Parameters:		pBP -	Points to a XT_BARPLACEMENT struct which is used to
	//								initialize the placement for the control bar.
	// -> Return Value:
	// -> Remarks:		This member function is called to initialize the XT_BARPLACEMENT struct
	//					which contains size, location and style information for the control bar.
	virtual void SetBarPlacement(XT_BARPLACEMENT* pBP);

	// -> Parameters:		pDC			-
	//						rect		-
	// -> Return Value:
	// -> Remarks:
	virtual void DrawCaption(CDC* pDC, const CRect& rect);

// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CXTDockWindow)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	virtual void OnUpdateCmdUI(CFrameWnd* pTarget, BOOL bDisableIfNoHndler);
	virtual CSize CalcDynamicLayout(int nLength, DWORD nMode);
	virtual void DoPaint(CDC* pDC);
 	//}}AFX_VIRTUAL

// Generated message map functions
protected:
	//{{AFX_MSG(CXTDockWindow)
	afx_msg UINT OnNcHitTest(CPoint point);
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnWindowPosChanged(WINDOWPOS FAR* lpwndpos);
	afx_msg void OnButtonClose();
	afx_msg void OnUpdateButtonClose(CCmdUI* pCmdUI);
	afx_msg void OnButtonMinimize();
	afx_msg void OnUpdateButtonMinimize(CCmdUI* pCmdUI);
	afx_msg void OnWindowPosChanging(WINDOWPOS FAR* lpwndpos);
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

	friend class CXTDockBar;
	friend class CXTFrameWnd;
	friend class CXTSplitterDock;

//---------------------------------------------------------------------------
// NOTE: The following methods are obsolete, and are included here only for
// support to users who have upgraded from CJLibrary.
//---------------------------------------------------------------------------
public:
	DWORD& m_eChildBorder;
	inline void EnableDockingOnSizeBar(DWORD dwDockStyle) {
		EnableDocking(dwDockStyle);
	}
	inline void SetMenuID(UINT menuID, UINT popToolbarID=0, int nPos=0) {
		CXTControlBar::SetMenuID(menuID, nPos);
	}
	inline void EnableFlatLook(BOOL bFlat=TRUE) {
		ModifyXTBarStyle(bFlat?0:CBRS_XT_ALL_FLAT, bFlat?CBRS_XT_ALL_FLAT:0);
	}
	inline void GetChildRect(CRect &rect) {
		GetInsideRect(rect);
	}
};

//---------------------------------------------------------------------------
inline int CXTDockWindow::GetVertSize()
	{ ASSERT(::IsWindow(m_hWnd)); return m_bp.sizeDefault.cx; }
//---------------------------------------------------------------------------
inline int CXTDockWindow::GetHorzSize()
	{ ASSERT(::IsWindow(m_hWnd)); return m_bp.sizeDefault.cy; }
//---------------------------------------------------------------------------
inline void CXTDockWindow::SetChild(CWnd *pWnd)
	{ ASSERT(::IsWindow(m_hWnd)); m_pChildWnd=pWnd; }
//---------------------------------------------------------------------------
inline BOOL CXTDockWindow::IsMaximized() const
	{ ASSERT(::IsWindow(m_hWnd)); return (m_bp.bMaximized); }
//---------------------------------------------------------------------------

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

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.

#endif // #if !defined(__XTDOCKWINDOW_H__)


text:
import * as _ from 'lodash';
import {
  DATA_TYPES,
  BASIC_TYPES,
  ID,
  SUPERTYPE,
  TYPE
} from './constants';

export const byType = (type: string) => {
  return (element: any) => element[TYPE] === type;
};

export const byName = (name: string) => {
  return (schemaClass: any) => schemaClass.name === name;
};

export const byExists = (value: any) => !!value;

export const toId = (reference: any) => reference && reference[ID];

export const stripPrefix = (uri: string) => {
  return uri && uri.replace(/.*\//, '');
};

export const indent = (spaces: number) => {
  const spacing = new Array(spaces + 1).join(' ');
  return (content: string) => spacing + content;
};

export const toDatatype = (schemaType: string) => {
  return DATA_TYPES[schemaType] || schemaType;
};

export const byUnique = (element: any, index: number, array: any[]) => array.indexOf(element) === index;

export const toFlatArray = (array: any[], subArray: any[]) => array.concat(...subArray);

export const not = (fn: (v: any) => boolean) => {
  return (value: any) => !fn(value);
};

export const and = (fn1: (v: any) => boolean, fn2: (v: any) => boolean) => {
  return (value: any) => fn1(value) && fn2(value);
};

export const or = (fn1: (v: any) => boolean, fn2: (v: any) => boolean) => {
  return (value: any) => fn1(value) || fn2(value);
};

export const inArray = (array: any[]) => {
  return (value: any) => array.indexOf(value) !== -1;
}

export const byProperty = (name: string) => {
  return (a: any, b: any) => (a[name] < b[name]) ? -1 : (a[name] > b[name]) ? 1 : 0;
};

export const superClasses = (schemaType: any): string[] => {
  const parentTypes = schemaType[SUPERTYPE] ? _.flatten([schemaType[SUPERTYPE]]) : [];
  return parentTypes.map(toId).map(stripPrefix).filter((typeName: string) => !_(BASIC_TYPES).includes(typeName));
};


text:
* [Sum of palindromic numbers][]

[Sum of palindromic numbers]: https://www.codechef.com/LTIME28/problems/SPALNUM


text:
void TE_FireBullets(
	int	iPlayerIndex,
	const Vector &vOrigin,
	const QAngle &vAngles,
	int	iWeaponID,
	int	iMode,
	int iSeed,
	float flSpread
	);

#endif // TE_FIREBULLETS_H


text:
package sg.edu.nus.iss.phoenix.schedule.android.ui;

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

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;

import sg.edu.nus.iss.phoenix.R;
import sg.edu.nus.iss.phoenix.schedule.android.entity.ProgramSlot;

/**
 * Created by treza on 16/9/17.
 */

public class ScheduleAdapter extends ArrayAdapter<ProgramSlot> {
    public ScheduleAdapter(@NonNull Context context, ArrayList<ProgramSlot> programSlots){
        super(context, 0, programSlots);
    }

    @NonNull
    @Override
    public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {
        View listItemView = convertView;
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MMM-dd HH:mm");
        if (listItemView == null) {
            listItemView = LayoutInflater.from(getContext()).inflate(
                    R.layout.schedule_list, parent, false);
        }

        ProgramSlot programSlot = getItem(position);

        TextView lblProgramSlot = (TextView)listItemView.findViewById(R.id.lblSchedule);
        lblProgramSlot.setText(programSlot.getProgramName());

        TextView lblProgramSlotDatetime = (TextView) listItemView.findViewById(R.id.lblScheduleDateTime);
        lblProgramSlotDatetime.setText(sdf.format(programSlot.getDateOfProgram()));

        return listItemView;
    }
}


text:
package net.morimekta.testing.matchers;

import org.hamcrest.StringDescription;
import org.junit.Test;

import java.util.Objects;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;

/**
 * Testing the is-equal-ignore-indent matcher.
 */
public class EqualIgnoreIndentTest {
    @Test
    public void testConstructor() {
        EqualIgnoreIndent range = new EqualIgnoreIndent("short\n\t\tabba");
        assertFalse(range.matches("blah"));
        assertTrue(range.matches("short\nabba"));
        assertTrue(range.matches("short\n        abba"));
        assertFalse(range.matches("short abba"));

        assertBad("Missing expected.", null);
    }

    private void assertBad(String message, String str) {
        try {
            new EqualIgnoreIndent(str);
            fail(String.format("Expected exception on new EqualIgnoreIndent(%s)",
                               Objects.toString(str)));
        } catch (AssertionError e) {
            assertEquals(message, e.getMessage());
        }
    }

    @Test
    public void testDescribeTo() {
        StringDescription description = new StringDescription();

        new EqualIgnoreIndent("short\n\t\tabba").describeTo(description);
        assertEquals("equalIgnoreIndent(short\n" +
                     "\t\tabba)", description.toString());
    }

    @Test
    public void testDescribeMismatch() {
        StringDescription description = new StringDescription();

        new EqualIgnoreIndent("short\n\t\tabba").describeMismatch("short\n\n  abba", description);
        assertEquals("was short\n" +
                     "\n" +
                     "  abba", description.toString());
    }
}


text:
<?php

namespace Castoridae\ComputerBundle\Entity\Computer\Data;

use Doctrine\ORM\EntityRepository;

/**
 * CpuRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class CpuRepository extends EntityRepository
{
}


text:
@class Network;
@class PCSocialActivity;

@protocol NetworksManagerDelegate  <NSObject>
- (void)socialActivity:(PCSocialActivity *)activity didBeginPostingToNetwork:(NSUInteger)index;
- (void)socialActivity:(PCSocialActivity *)activity didCompletePostingToNetwork:(NSUInteger)index;
- (void)socialActivity:(PCSocialActivity *)activity postingToNetwork:(NSUInteger)index updatedWithProgress:(double)fraction;
- (void)socialActivity:(PCSocialActivity *)activity postingToNetwork:(NSUInteger)index updatedWithMessage:(NSString *)message;
- (void)socialActivity:(PCSocialActivity *)activity postingToNetwork:(NSUInteger)index didFailwithError:(NSError *)error;
- (void)socialActivityComplete:(PCSocialActivity *)activity;
@end

@interface NetworksManager : NSObject

@property(nonatomic, weak) id<NetworksManagerDelegate> delegate;
@property(nonatomic, strong) NSString *documentsDirectory;
@property(nonatomic, weak) UIViewController *rootViewController;
//@property(nonatomic, strong) NSMutableArray *networks; //Array of (Network *)s
@property(nonatomic, strong) PCSocialActivity *currentSocialActivity;
@property(nonatomic) NSUInteger currentNetworkCompletionCount;

+ (NetworksManager *)sharedInstance;
- (void)postActivity:(PCSocialActivity *)activity;
- (void)network:(Network *)network updatedProgress:(double)fraction;
- (void)network:(Network *)network updateMessage:(NSString *)message;
- (void)network:(Network *)network didFailWithError:(NSError *)error;
- (void)network:(Network *)network didCompletePostingWithInfo:(NSDictionary *)info;

@end