text:
package org.j4g.spring.xml.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.AfterThrowing;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.l4g.spring.xml.model.ClientInfo;
import org.l4g.spring.xml.model.ClientStatus;

@Aspect
public class ClientAdvise {

	@Before("execution(* org.l4g.spring.xml.model.ClientInfo.printClientInfo(..))")
	public void beforeAdvice(JoinPoint jp) {
		System.out.println("[@Before] Advice executing before method...");
		System.out.println("[@Before] Method Signature: " + jp.getSignature());
		ClientInfo bean = (ClientInfo) jp.getTarget();
		int days = bean.getDaysWithoutShopping();
		System.out.println("[@Before] Target Status before advice: " + bean.getStatus());
		ClientStatus status = (days > 30) ? ClientStatus.INACTIVE : ClientStatus.ACTIVE;
		bean.setStatus(status);
	}

	@After("execution(* org.l4g.spring.xml.model.ClientInfo.printClientInfo(..))")
	public void afterAdvice(JoinPoint jp) {
		System.out.println("[@After]Advice executing after method...");
		System.out.println("[@After]Method Signature: " + jp.getSignature());
		ClientInfo bean = (ClientInfo) jp.getTarget();
		System.out.println("[@After]Target Status after method: " + bean.getStatus());
	}

	@Around("execution(* org.l4g.spring.xml.model.ClientInfo.printName(..))")
	public void aroundAdvice(ProceedingJoinPoint pjp) throws Throwable {
		System.out.println("[@Around]Advice executing around method...");
		ClientInfo client = (ClientInfo) pjp.getTarget();
		client.setName("Mr/Mrs " + client.getName());
		pjp.proceed();
		System.out.println("[@Around]Advice execution around method after method execution");
	}

	@AfterReturning(pointcut = "execution(* org.l4g.spring.xml.model.ClientInfo.isClientInExpiredStatus(..))", returning = "result")
	public void afterReturningAdvice(JoinPoint jp, Object result) {
		System.out.println("[@AfterReturning]Advice executing after returning method...");
		System.out.println("[@AfterReturning] Result: " + result);
	}

	@AfterThrowing(pointcut = "execution(* org.l4g.spring.xml.model.ClientInfo.isClientInExpiredStatus(..))", throwing = "error")
	public void afterThrowingAdvice(JoinPoint jp, Throwable error) {
		System.out.println("[@AfterThrowing]Advice executing after returning method...");
	}

}

redpajama_set_name: RedPajamaGithub


text:
namespace policy {

TpmEnrollmentKeySigningService::TpmEnrollmentKeySigningService() = default;

TpmEnrollmentKeySigningService::~TpmEnrollmentKeySigningService() = default;

void TpmEnrollmentKeySigningService::SignData(const std::string& data,
                                              SigningCallback callback) {
  const ash::attestation::AttestationCertificateProfile cert_profile =
      ash::attestation::PROFILE_ENTERPRISE_ENROLLMENT_CERTIFICATE;
  ::attestation::SignSimpleChallengeRequest request;
  request.set_username("");
  request.set_key_label(
      ash::attestation::GetKeyNameForProfile(cert_profile, ""));
  request.set_challenge(data);
  ash::AttestationClient::Get()->SignSimpleChallenge(
      request, base::BindOnce(&TpmEnrollmentKeySigningService::OnDataSigned,
                              weak_ptr_factory_.GetWeakPtr(), data,
                              std::move(callback)));
}

void TpmEnrollmentKeySigningService::OnDataSigned(
    const std::string& data,
    SigningCallback callback,
    const ::attestation::SignSimpleChallengeReply& reply) {
  enterprise_management::SignedData em_signed_data;
  ash::attestation::SignedData att_signed_data;
  const bool success =
      reply.status() == ::attestation::STATUS_SUCCESS &&
      att_signed_data.ParseFromString(reply.challenge_response());
  if (success) {
    em_signed_data.set_data(att_signed_data.data());
    em_signed_data.set_signature(att_signed_data.signature());
    em_signed_data.set_extra_data_bytes(att_signed_data.data().size() -
                                        data.size());
  }
  std::move(callback).Run(success, em_signed_data);
}

}  // namespace policy


text:
namespace Renderer
{
	struct SpriteInfo
	{
		SpriteInfo(const char* texturePath, int posX, int posY);

		const char* texturePath;

		int posX;
		int posY;
	};

	struct AtlasInfo
	{
		AtlasInfo(int strideX, int strideY, int bufferX, int bufferY);

		int strideX;
		int strideY;
		int bufferX;
		int bufferY;
	};

	class SpriteLoader
	{
	public:

		static void RegisterAtlas(const char* texturePath, int strideX, int strideY, int bufferX, int bufferY);
		static AtlasInfo* GetAtlasInfo(const char* texturePath) { return _atlases[texturePath]; }

		static void RegisterSprite(const char* texturePath, int posX, int posY, const char* spriteID);
		static SpriteInfo* GetSpriteInfo(const char* spriteID) { return _sprites[spriteID]; }

	private:

		static std::map<const char*, AtlasInfo*> _atlases;
		static std::map<const char*, SpriteInfo*> _sprites;
	};
}


text:
        <button routerLink="/lobby" class="btn btn-secondary">Back to lobby</button>
        <button (click)="sync(!inSync)" class="btn btn-secondary">{{ inSync ? 'desync' : 'sync' }}</button>

                        <video id="video-player" #videoPlayer controls
                            *ngIf="stream != null"
                            [currentTime]="streamTime"
                            (play)="playStream(videoPlayer.currentTime)"
                            (pause)="pauseStream(videoPlayer.currentTime)"
                            (seek)="seekStream(videoPlayer.currentTime)"
                        >
                            <source src="{{url}}">
                        </video>
                    <audio></audio>

            <form (ngSubmit)="streamUrl()" *ngIf="hasControl">

                        url:
                        <input [(ngModel)]="url" name="url" class="form-control">

                            <button type="submit" class="btn btn-default">Load</button>

            </form>

Chat

History

Users

                    <form (ngSubmit)='sendChatMessage()'>

                                <input [(ngModel)]="chatText" name="text" type="text" class="form-control">

                                    <button class="btn btn-default">Send</button>

                    </form>

{{entry.user}}: {{entry.message}}

Chat

History

Users

{{entry.url}}

Chat

History

Users

{{username}}


text:
THIS PACKAGE DOES NOT HAVE A STABLE RELEASE JUST YET. USAGE MAY CHANGE. SEE MILESTONES.

## Installation
> npm install bookshelf-imageclip

## Usage
Best to look at the tests.

Your schema must include ```<field>_file_name```.
```js
bookshelf.Model.extend({
  tableName: 'users',
  imageClip: {
    <field_name>: {
      <style_name>: {
        process: function( gm, model ) {
          return gm.resize( "500x500" ); //See node-gm documentation
        }
      }
    }
  }
```

## Examples
```js
    var bookshelf = require('bookshelf')(knex);
    bookshelf.plugin(require('bookshelf-imageclip'), {useImageMagick: true});

    User = bookshelf.Model.extend({
      tableName: 'users',
      imageClip: {
        avatar: {
          original: {
            process: function( gm, model ) {
              return gm;
            }
          },
          medium: {
            process: function( gm, model ) {
              return gm.resize( "500x500" ) ;
            }
          },
          thumb: {
            process: function( gm, model ) {
              return gm.resize( "100x100" ) ;
            }
          }
        }
      }
    });

    User.forge( )
        .save( { avatar: "http://hamburgerhelper.com/pigeon.jpg" } )
        .then( function( user ) {
          console.info( user.get( "avatar" ).medium ) // outputs: images/244/8ea/avatar/medium/pigeon.jpg
        } );
```

## Roadmap
See issues for milestones and changes for first stable release.

## Contributing
I'd be happy to pull in any requests as long as you add tests.


text:
.class synthetic Lnet/clickdev/music/utils/PopupMenuHelper$2;
.super Ljava/lang/Object;
.source "PopupMenuHelper.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lnet/clickdev/music/utils/PopupMenuHelper;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1008
    name = null
.end annotation

# static fields
.field static final synthetic $SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 182
    invoke-static {}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->values()[Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    move-result-object v0

    array-length v0, v0

    new-array v0, v0, [I

    sput-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    :try_start_0
    sget-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    sget-object v1, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->Artist:Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    invoke-virtual {v1}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->ordinal()I

    move-result v1

    const/4 v2, 0x1

    aput v2, v0, v1
    :try_end_0
    .catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_6

    :goto_0
    :try_start_1
    sget-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    sget-object v1, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->Album:Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    invoke-virtual {v1}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->ordinal()I

    move-result v1

    const/4 v2, 0x2

    aput v2, v0, v1
    :try_end_1
    .catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_5

    :goto_1
    :try_start_2
    sget-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    sget-object v1, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->Song:Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    invoke-virtual {v1}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->ordinal()I

    move-result v1

    const/4 v2, 0x3

    aput v2, v0, v1
    :try_end_2
    .catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_4

    :goto_2
    :try_start_3
    sget-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    sget-object v1, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->Playlist:Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    invoke-virtual {v1}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->ordinal()I

    move-result v1

    const/4 v2, 0x4

    aput v2, v0, v1
    :try_end_3
    .catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3

    :goto_3
    :try_start_4
    sget-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    sget-object v1, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->SmartPlaylist:Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    invoke-virtual {v1}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->ordinal()I

    move-result v1

    const/4 v2, 0x5

    aput v2, v0, v1
    :try_end_4
    .catch Ljava/lang/NoSuchFieldError; {:try_start_4 .. :try_end_4} :catch_2

    :goto_4
    :try_start_5
    sget-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    sget-object v1, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->SearchResult:Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    invoke-virtual {v1}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->ordinal()I

    move-result v1

    const/4 v2, 0x6

    aput v2, v0, v1
    :try_end_5
    .catch Ljava/lang/NoSuchFieldError; {:try_start_5 .. :try_end_5} :catch_1

    :goto_5
    :try_start_6
    sget-object v0, Lnet/clickdev/music/utils/PopupMenuHelper$2;->$SwitchMap$com$cyanogenmod$eleven$utils$PopupMenuHelper$PopupMenuType:[I

    sget-object v1, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->Queue:Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;

    invoke-virtual {v1}, Lnet/clickdev/music/utils/PopupMenuHelper$PopupMenuType;->ordinal()I

    move-result v1

    const/4 v2, 0x7

    aput v2, v0, v1
    :try_end_6
    .catch Ljava/lang/NoSuchFieldError; {:try_start_6 .. :try_end_6} :catch_0

    :goto_6
    return-void

    :catch_0
    move-exception v0

    goto :goto_6

    :catch_1
    move-exception v0

    goto :goto_5

    :catch_2
    move-exception v0

    goto :goto_4

    :catch_3
    move-exception v0

    goto :goto_3

    :catch_4
    move-exception v0

    goto :goto_2

    :catch_5
    move-exception v0

    goto :goto_1

    :catch_6
    move-exception v0

    goto :goto_0
.end method


text:
package nim

import (
	"path/filepath"
	"sort"
	"strings"

	"github.com/Jumpscale/go-raml/codegen/commons"
	cr "github.com/Jumpscale/go-raml/codegen/resource"
	"github.com/Jumpscale/go-raml/raml"
)

type resource struct {
	cr.Resource
	Methods []method
}

func newResource(name string, apiDef *raml.APIDefinition, isServer bool) resource {
	res := apiDef.Resources[name]

	rd := cr.New(apiDef, &res, name, false)

	nimRes := resource{
		Resource: rd,
	}

	for _, rm := range rd.Methods {
		var meth method
		if isServer {
			meth = newServerMethod(apiDef, rm)
		} else {
			meth = newClientMethod(rm)
		}
		nimRes.Methods = append(nimRes.Methods, meth)
	}
	return nimRes
}

// get array of all imported modules
func (r *resource) Imports() []string {
	ip := map[string]struct{}{}

	for _, m := range r.Methods {
		var names []string
		if m.ReqBody != "" {
			names = append(names, m.ReqBody)
		}
		if m.RespBody != "" {
			names = append(names, m.RespBody)
		}
		for _, name := range names {
			if tipe, ok := objectRegistered(name); ok {
				ip[tipe] = struct{}{}
			}
		}
	}
	return commons.MapToSortedStrings(ip)
}

// generate server resource API implementation
func (r *resource) generate(dir string) error {
	filename := filepath.Join(dir, r.apiName()+".nim")
	return commons.GenerateFile(r, "./templates/nim/server_resources_api_nim.tmpl", "server_resources_api_nim", filename, true)
}

// returns server's API name
func (r *resource) apiName() string {
	return strings.ToLower(r.Name) + "_api"
}

// NeedJWT returns true if this resource need JWT Library
func (r *resource) NeedJWT() bool {
	for _, m := range r.Methods {
		if m.Secured() {
			return true
		}
	}
	return false
}
func getAllResources(apiDef *raml.APIDefinition, isServer bool) []resource {
	rs := []resource{}

	// sort the keys, so we have resource sorted by keys.
	// the generated code actually don't need it to be sorted.
	// but test fixture need it
	var keys []string
	for k := range apiDef.Resources {
		keys = append(keys, k)
	}
	sort.Strings(keys)

	for _, k := range keys {
		rs = append(rs, newResource(k, apiDef, isServer))
	}
	return rs
}


text:
{% include 'navbar.html' %}

{% block content %}

                Patient
                Doctor
                Date
                Description
                ID

                Patient
                Doctor
                Date
                Description
                ID

            {% for apt in appointments %}

                    {{ apt.p_first_name }} {{ apt.p_last_name }}
                    {{ apt.doctor }}
                    {{ apt.date }}
                    {{ apt.description|escapejs }}
                    {{ apt.pk }}
                    {{ apt.date|escape }}

            {% endfor %}

                <form id="deleteForm" action="/deleteAppointment/" method="POST">

                        <button type="button" class="close" data-dismiss="modal">×</button>

Appointment View

                            {% if user.usertype == "nurse" %}

                                        Patient
                                        {{ form.p_first_name }}

                                        Doctor
                                        {{ form.doctor }}

                            {% elif user.usertype == 'doctor' %}

                                        Patient
                                        {{ form.p_first_name }}

                            {% else %}

                                        Doctor
                                        {{ form.doctor }}

                            {% endif %}

                                    Date & Time (8AM - 5PM)
                                    {{ form.date }}

                                    Description
                                    {{ form.description }}

                        {% csrf_token %}
                        <input type="submit" onclick="setAsSave()" class="btn btn-primary" value="Save Changes">
                        <input type="submit" class="btn btn-primary" value="Delete Appointment">
                        <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>

                </form>

{% endblock %}

{% block javascript %}

{% endblock %}