text:
package org.eclipse.jnosql.artemis.graph;

import jakarta.nosql.mapping.Page;
import jakarta.nosql.mapping.Pagination;
import org.apache.tinkerpop.gremlin.structure.Edge;
import org.apache.tinkerpop.gremlin.structure.Graph;
import org.apache.tinkerpop.gremlin.structure.Vertex;
import org.eclipse.jnosql.artemis.graph.model.Person;
import jakarta.nosql.tck.test.CDIExtension;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import javax.inject.Inject;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;

import static java.util.stream.Collectors.joining;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertThrows;

@CDIExtension
class GraphPageTest {

    @Inject
    protected GraphTemplate template;

    @Inject
    private Graph graph;

    private Person otavio;
    private Person poliana;
    private Person paulo;

    @BeforeEach
    public void setUp() {

        graph.traversal().V().toList().forEach(Vertex::remove);
        graph.traversal().E().toList().forEach(Edge::remove);

        otavio = template.insert(Person.builder().withAge(27)
                .withName("Otavio").build());
        poliana = template.insert(Person.builder().withAge(26)
                .withName("Poliana").build());
        paulo = template.insert(Person.builder().withAge(50)
                .withName("Paulo").build());
    }

    @AfterEach
    public void after() {
        template.delete(otavio.getId());
        template.delete(poliana.getId());
        template.delete(paulo.getId());

        graph.traversal().V().toList().forEach(Vertex::remove);
        graph.traversal().E().toList().forEach(Edge::remove);
    }

    @Test
    public void shouldReturnErrorWhenPaginationIsNull() {
        assertThrows(NullPointerException.class, () -> template.getTraversalVertex().page(null));
    }

    @Test
    public void shouldPaginate() {
        Pagination pagination = Pagination.page(1).size(1);
        Page<Person> page = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .page(pagination);
        assertNotNull(page);

        List<Person> people = page.<Person>getContent().collect(Collectors.toList());
        Person first = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .<Person>getResult().findFirst().get();

        assertEquals(pagination, page.getPagination());
        assertEquals(1, people.size());
    }

    @Test
    public void shouldStream() {
        Pagination pagination = Pagination.page(1).size(1);
        Page<Person> page = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .page(pagination);

        assertNotNull(page);
        Stream<Person> people = page.get();

        assertEquals(pagination, page.getPagination());
        assertEquals(poliana.getName(), people.map(Person::getName).collect(joining()));
    }

    @Test
    public void shouldReturnErrorWhenCollectionFactoryIsNull() {
        Pagination pagination = Pagination.page(1).size(1);
        Page<Person> page = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .page(pagination);
        assertNotNull(page);
        assertThrows(NullPointerException.class, () -> page.getContent(null));
    }

    @Test
    public void shouldReturnCollectionFromCollectionFactory() {
        Pagination pagination = Pagination.page(1).size(1);
        Page<Person> page = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .page(pagination);
        assertNotNull(page);

        Set<Person> people = page.getContent(HashSet::new);
        Person first = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .<Person>getResult().findFirst().get();

        assertEquals(pagination, page.getPagination());
        assertEquals(1, people.size());

    }

    @Test
    public void shouldRequestPageTwice() {
        Pagination pagination = Pagination.page(1).size(1);
        Page<Person> page = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .page(pagination);

        List<Person> people = page.getContent().collect(Collectors.toList());
        assertFalse(people.isEmpty());
        assertNotNull(page.getContent(ArrayList::new));
        assertNotNull(page.getContent(HashSet::new));
    }

    @Test
    public void shouldNext() {
        Pagination pagination = Pagination.page(1).size(1);
        Page<Person> page = template.getTraversalVertex()
                .orderBy("name")
                .asc()
                .page(pagination);

        assertNotNull(page);
        Stream<Person> people = page.get();

        assertEquals(pagination, page.getPagination());
        assertEquals(otavio.getName(), people.map(Person::getName).collect(joining()));

        pagination = pagination.next();

        page = page.next();
        people = page.get();
        assertEquals(pagination, page.getPagination());
        assertEquals(paulo.getName(), people.map(Person::getName).collect(joining()));

        pagination = pagination.next();
        page = page.next();
        people = page.get();

        assertEquals(pagination, page.getPagination());
        assertEquals(poliana.getName(), people.map(Person::getName).collect(joining()));

    }

    @Test
    public void shouldNext2() {
        Pagination pagination = Pagination.page(1).size(1);
        Page<Person> page = template.getTraversalVertex()
                .orderBy("name")
                .desc()
                .page(pagination);

        assertNotNull(page);
        Stream<Person> people = page.get();

        assertEquals(pagination, page.getPagination());
        assertEquals(poliana.getName(), people.map(Person::getName).collect(joining()));

        pagination = pagination.next();

        page = page.next();
        people = page.get();
        assertEquals(pagination, page.getPagination());
        assertEquals(paulo.getName(), people.map(Person::getName).collect(joining()));

        pagination = pagination.next();
        page = page.next();
        people = page.get();

        assertEquals(pagination, page.getPagination());
        assertEquals(otavio.getName(), people.map(Person::getName).collect(joining()));

    }

}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
	<item android:state_pressed="true" android:drawable="@android:color/transparent" />
	<item android:state_pressed="false" android:drawable="@drawable/umeng_fb_list_icon" />
</selector>

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
using System.Threading.Tasks;
using Grpc.Core.Internal;
using Grpc.Core.Utils;

namespace Grpc.Core.Internal
{
    /// <summary>
    /// Base for handling both client side and server side calls.
    /// Handles native call lifecycle and provides convenience methods.
    /// </summary>
    internal abstract class AsyncCallBase<TWrite, TRead>
    {
        readonly Func<TWrite, byte[]> serializer;
        readonly Func<byte[], TRead> deserializer;

        protected readonly CompletionCallbackDelegate sendFinishedHandler;
        protected readonly CompletionCallbackDelegate readFinishedHandler;
        protected readonly CompletionCallbackDelegate halfclosedHandler;

        protected readonly object myLock = new object();

        protected GCHandle gchandle;
        protected CallSafeHandle call;
        protected bool disposed;

        protected bool started;
        protected bool errorOccured;
        protected bool cancelRequested;

        protected AsyncCompletionDelegate sendCompletionDelegate;  // Completion of a pending send or sendclose if not null.
        protected bool readPending;  // True if there is a read in progress.
        protected bool readingDone;
        protected bool halfcloseRequested;
        protected bool halfclosed;
        protected bool finished;  // True if close has been received from the peer.

        // Streaming reads will be delivered to this observer. For a call that only does unary read it may remain null.
        protected IObserver<TRead> readObserver;

        public AsyncCallBase(Func<TWrite, byte[]> serializer, Func<byte[], TRead> deserializer)
        {
            this.serializer = Preconditions.CheckNotNull(serializer);
            this.deserializer = Preconditions.CheckNotNull(deserializer);

            this.sendFinishedHandler = CreateBatchCompletionCallback(HandleSendFinished);
            this.readFinishedHandler = CreateBatchCompletionCallback(HandleReadFinished);
            this.halfclosedHandler = CreateBatchCompletionCallback(HandleHalfclosed);
        }

        /// <summary>
        /// Requests cancelling the call.
        /// </summary>
        public void Cancel()
        {
            lock (myLock)
            {
                Preconditions.CheckState(started);
                cancelRequested = true;

                if (!disposed)
                {
                    call.Cancel();
                }
            }
        }

        /// <summary>
        /// Requests cancelling the call with given status.
        /// </summary>
        public void CancelWithStatus(Status status)
        {
            lock (myLock)
            {
                Preconditions.CheckState(started);
                cancelRequested = true;

                if (!disposed)
                {
                    call.CancelWithStatus(status);
                }
            }
        }

        protected void InitializeInternal(CallSafeHandle call)
        {
            lock (myLock)
            {
                // Make sure this object and the delegated held by it will not be garbage collected
                // before we release this handle.
                gchandle = GCHandle.Alloc(this);
                this.call = call;
            }
        }

        /// <summary>
        /// Initiates sending a message. Only once send operation can be active at a time.
        /// completionDelegate is invoked upon completion.
        /// </summary>
        protected void StartSendMessageInternal(TWrite msg, AsyncCompletionDelegate completionDelegate)
        {
            byte[] payload = UnsafeSerialize(msg);

            lock (myLock)
            {
                Preconditions.CheckNotNull(completionDelegate, "Completion delegate cannot be null");
                CheckSendingAllowed();

                call.StartSendMessage(payload, sendFinishedHandler);
                sendCompletionDelegate = completionDelegate;
            }
        }

        /// <summary>
        /// Requests receiving a next message.
        /// </summary>
        protected void StartReceiveMessage()
        {
            lock (myLock)
            {
                Preconditions.CheckState(started);
                Preconditions.CheckState(!disposed);
                Preconditions.CheckState(!errorOccured);

                Preconditions.CheckState(!readingDone);
                Preconditions.CheckState(!readPending);

                call.StartReceiveMessage(readFinishedHandler);
                readPending = true;
            }
        }

        /// <summary>
        /// Default behavior just completes the read observer, but more sofisticated behavior might be required
        /// by subclasses.
        /// </summary>
        protected virtual void CompleteReadObserver()
        {
            FireReadObserverOnCompleted();
        }

        /// <summary>
        /// If there are no more pending actions and no new actions can be started, releases
        /// the underlying native resources.
        /// </summary>
        protected bool ReleaseResourcesIfPossible()
        {
            if (!disposed && call != null)
            {
                if (halfclosed && readingDone && finished)
                {
                    ReleaseResources();
                    return true;
                }
            }
            return false;
        }

        private void ReleaseResources()
        {
            if (call != null)
            {
                call.Dispose();
            }
            gchandle.Free();
            disposed = true;
        }

        protected void CheckSendingAllowed()
        {
            Preconditions.CheckState(started);
            Preconditions.CheckState(!disposed);
            Preconditions.CheckState(!errorOccured);

            Preconditions.CheckState(!halfcloseRequested, "Already halfclosed.");
            Preconditions.CheckState(sendCompletionDelegate == null, "Only one write can be pending at a time");
        }

        protected byte[] UnsafeSerialize(TWrite msg)
        {
            return serializer(msg);
        }

        protected bool TrySerialize(TWrite msg, out byte[] payload)
        {
            try
            {
                payload = serializer(msg);
                return true;
            }
            catch (Exception)
            {
                Console.WriteLine("Exception occured while trying to serialize message");
                payload = null;
                return false;
            }
        }

        protected bool TryDeserialize(byte[] payload, out TRead msg)
        {
            try
            {
                msg = deserializer(payload);
                return true;
            }
            catch (Exception)
            {
                Console.WriteLine("Exception occured while trying to deserialize message");
                msg = default(TRead);
                return false;
            }
        }

        protected void FireReadObserverOnNext(TRead value)
        {
            try
            {
                readObserver.OnNext(value);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occured while invoking readObserver.OnNext: " + e);
            }
        }

        protected void FireReadObserverOnCompleted()
        {
            try
            {
                readObserver.OnCompleted();
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occured while invoking readObserver.OnCompleted: " + e);
            }
        }

        protected void FireReadObserverOnError(Exception error)
        {
            try
            {
                readObserver.OnError(error);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occured while invoking readObserver.OnError: " + e);
            }
        }

        protected void FireCompletion(AsyncCompletionDelegate completionDelegate, Exception error)
        {
            try
            {
                completionDelegate(error);
            }
            catch (Exception e)
            {
                Console.WriteLine("Exception occured while invoking completion delegate: " + e);
            }
        }

        /// <summary>
        /// Creates completion callback delegate that wraps the batch completion handler in a try catch block to
        /// prevent propagating exceptions accross managed/unmanaged boundary.
        /// </summary>
        protected CompletionCallbackDelegate CreateBatchCompletionCallback(Action<bool, BatchContextSafeHandleNotOwned> handler)
        {
            return new CompletionCallbackDelegate((error, batchContextPtr) =>
            {
                try
                {
                    var ctx = new BatchContextSafeHandleNotOwned(batchContextPtr);
                    bool wasError = (error != GRPCOpError.GRPC_OP_OK);
                    handler(wasError, ctx);
                }
                catch (Exception e)
                {
                    Console.WriteLine("Caught exception in a native handler: " + e);
                }
            });
        }

        /// <summary>
        /// Handles send completion.
        /// </summary>
        private void HandleSendFinished(bool wasError, BatchContextSafeHandleNotOwned ctx)
        {
            AsyncCompletionDelegate origCompletionDelegate = null;
            lock (myLock)
            {
                origCompletionDelegate = sendCompletionDelegate;
                sendCompletionDelegate = null;

                ReleaseResourcesIfPossible();
            }

            if (wasError)
            {
                FireCompletion(origCompletionDelegate, new OperationFailedException("Send failed"));
            }
            else
            {
                FireCompletion(origCompletionDelegate, null);
            }
        }

        /// <summary>
        /// Handles halfclose completion.
        /// </summary>
        private void HandleHalfclosed(bool wasError, BatchContextSafeHandleNotOwned ctx)
        {
            AsyncCompletionDelegate origCompletionDelegate = null;
            lock (myLock)
            {
                halfclosed = true;
                origCompletionDelegate = sendCompletionDelegate;
                sendCompletionDelegate = null;

                ReleaseResourcesIfPossible();
            }

            if (wasError)
            {
                FireCompletion(origCompletionDelegate, new OperationFailedException("Halfclose failed"));
            }
            else
            {
                FireCompletion(origCompletionDelegate, null);
            }
        }

        /// <summary>
        /// Handles streaming read completion.
        /// </summary>
        private void HandleReadFinished(bool wasError, BatchContextSafeHandleNotOwned ctx)
        {
            var payload = ctx.GetReceivedMessage();

            lock (myLock)
            {
                readPending = false;
                if (payload == null)
                {
                    readingDone = true;
                }

                ReleaseResourcesIfPossible();
            }

            // TODO: handle the case when error occured...

            if (payload != null)
            {
                // TODO: handle deserialization error
                TRead msg;
                TryDeserialize(payload, out msg);

                FireReadObserverOnNext(msg);

                // Start a new read. The current one has already been delivered,
                // so correct ordering of reads is assured.
                StartReceiveMessage();
            }
            else
            {
                CompleteReadObserver();
            }
        }
    }
}


text:
#ifndef ILOGSTORAGESTATUS_HPP_
#define ILOGSTORAGESTATUS_HPP_

#include <cstdint>

namespace kaa {

/**
 * @brief The public interface to represent the current log storage state.
 *
 * Extend this interface to get extra information about the specific @c ILogStorage implementation.
 * The default implementation can be found in @c MemoryLogStorage.
 */
class ILogStorageStatus {
public:
    /**
     * @brief Returns amount of bytes collected logs are consumed.
     *
     * @return Size (in bytes).
     */
    virtual std::size_t getConsumedVolume() = 0;

    /**
     * @brief Returns the number of collected logs.
     *
     * @return The number of collected logs.
     */
    virtual std::size_t getRecordsCount() = 0;

    virtual ~ILogStorageStatus() {}
};

}  // namespace kaa

#endif /* ILOGSTORAGESTATUS_HPP_ */


text:
"""bjtalk.py
Usage:
  bjtalk.py (-s <SERVER>) (-p <SERVER_PORT>) (-u <USERNAME>)

Examples:
  bjtalk.py -s 'example.com' -p '27010' -u 'Tom'

Options:
  -h --help       Show this screen
  -s SERVER       server
  -p SERVER_PORT  server port
  -u USERNAME
"""

import time
import socket
import queue
from threading import Thread
from docopt import docopt
import pyaudio

def log(*args):
    print(*args)

class BjtalkClient:
    def __init__(self, serv_addr, username):
        # ('127.0.0.1', 27010)
        self.serv_addr = serv_addr
        self.username = username
        self.c = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
        self.c.bind(('0.0.0.0', 27011))
        self.q = queue.Queue()
        p = pyaudio.PyAudio()
        self.buf_len = 512
        self.stream = p.open(
            format=p.get_format_from_width(2),
            channels=1,
            rate=22500,
            input=True,
            output=True,
            frames_per_buffer=self.buf_len)

    def ping(self):
        while True:
            self.c.sendto(b'ping' + self.username.encode(), self.serv_addr)
            time.sleep(2)

    def record(self):
        while True:
            data = self.stream.read(self.buf_len)
            self.c.sendto(data, self.serv_addr)
            # self.q.put(data)

    def play(self, data):
        # time.sleep(1)
        self.stream.write(data, self.buf_len)

    def run(self):
        Thread(target=self.ping).start()
        Thread(target=self.record).start()

        while True:
            data, _ = self.c.recvfrom(2048)
            # data = self.q.get()
            if data.startswith(b'ping'):
                log(data[4:])

            else:
                # self.play(data)
                Thread(target=self.play, args=(data,)).start()

def main():
    args = docopt(__doc__)
    serv = args.get('-s').strip('\'\"')
    port = int(args.get('-p'))
    name = args.get('-u').strip('\'\"')

    serv_addr = (serv, port)
    cli = BjtalkClient(serv_addr, name)
    cli.run()

if __name__ == '__main__':
    main()


text:
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Migrations.History;

namespace EntityFramework.DynamicFilters.Example
{

    public class MySqlConfiguration : DbConfiguration
    {
        public MySqlConfiguration()
        {
            //  Necessary because MySQL doesn't allow key length > 767.  The default __MigrationHistory table exceeds that.
            SetHistoryContext("MySql.Data.MySqlClient", (conn, schema) => new MySqlHistoryContext(conn, schema));
        }
    }

    public class MySqlHistoryContext : HistoryContext
    {
        public MySqlHistoryContext(DbConnection existingConnection, string defaultSchema)
            : base(existingConnection, defaultSchema)
        {
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            modelBuilder.Entity<HistoryRow>().Property(h => h.MigrationId).HasMaxLength(100).IsRequired();
            modelBuilder.Entity<HistoryRow>().Property(h => h.ContextKey).HasMaxLength(200).IsRequired();
        }
    }

    public class ExampleContext : ContextBase
    {
        public ExampleContext()
        {
            Database.SetInitializer(new ContentInitializer<ExampleContext>());
            Database.Log = log => System.Diagnostics.Debug.WriteLine(log);
            Database.Initialize(false);
        }
    }

    //  2nd (duplicate) DbContext to verify issues with multiple DbContexts being used at same time
    //  (to fix issue where DynamicFilters were being double-initialized causing duplicate calls
    //  to DynamicFilterInterceptor & DynamicFilterCommandInterceptor.
    public class SecondContext : ContextBase
    {
        public SecondContext()
        {
            Database.SetInitializer(new ContentInitializer<SecondContext>());
            Database.Log = log => System.Diagnostics.Debug.WriteLine(log);
            Database.Initialize(false);
        }
    }

    public abstract class ContextBase : DbContext
    {
        //  A static/globally scoped value that will be used to restrict queries against the BlogEntries table.
        public static Guid CurrentAccountID { get; set; }

        public DbSet<Account> Accounts { get; set; }
        public DbSet<BlogEntry> BlogEntries { get; set; }

        public DbSet<EntityA> EntityASet { get; set; }
        public DbSet<EntityB> EntityBSet { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            //  Filter to restrict all queries on BlogEntries to only those for the current user.
            //  Global filter is used here with a delegate so that it's evaluated every time it's needed.
            //  ** IMPORTANT: Make sure if a delegate/Func<object> is used for the value that it has *GLOBAL*
            //  scope in your application.  In this example, CurrentAccountID is static.  If it were not static,
            //  setting the CurrentAccountID would have no effect since the Func would be using the instance of
            //  the DbContext that was used in the call to OnModelCreating - which only happens once per app lifetime.
            //modelBuilder.Filter("BlogEntriesForCurrentUser", (BlogEntry b) => b.AccountID, () => CurrentAccountID);
            //modelBuilder.Filter("BlogEntriesForCurrentUser", (BlogEntry b, Guid accountID) => b.AccountID == accountID, () => CurrentAccountID);

            //  Global filter on any class implementing ISoftDelete to match on records with IsDeleted=false
            //modelBuilder.Filter("IsDeleted", (ISoftDelete d) => d.IsDeleted, false);
            //modelBuilder.Filter("IsDeleted", (ISoftDelete b, bool isDeleted) => (b.IsDeleted == isDeleted), false);

            modelBuilder.Filter("BlogEntryFilter", (BlogEntry b, Guid accountID, bool isDeleted) => (b.AccountID == accountID) && (b.IsDeleted == isDeleted),
                                                () => CurrentAccountID, () => false);

            //  Filter to test handling of entity properties that are mapped to a different conceptual name.
            //modelBuilder.Filter("ConceptualNameTest", (Account a) => a.RemappedEntityProp, false);
            modelBuilder.Filter("ConceptualNameTest", (Account a, bool remappedEntityProp) => a.RemappedEntityProp == remappedEntityProp, false);

            //  Filters to test Contains() in linq filter:
            //{
            //    List<Guid> accounts = new List<Guid> { Guid.Parse("3A298D91-3857-E411-829F-001C428D83FF"), Guid.Parse("3B298D91-3857-E411-829F-001C428D83FF") };
            //    modelBuilder.Filter("BlogContainsTest", (BlogEntry b, List<Guid> accountList) => accountList.Contains(b.AccountID), () => accounts);

            //    var values = new List<int> { 1, 2, 3, 4, 5 };
            //    modelBuilder.Filter("BlogContainsTest", (BlogEntry b, List<int> valueList) => valueList.Contains(b.IntValue.Value), () => values);

            //    var values = new List<string> { "1", "2", "3", "4", "5" };
            //    modelBuilder.Filter("BlogContainsTest", (BlogEntry b, List<string> valueList) => valueList.Contains(b.StringValue), () => values);

            //    var values = new List<bool> { true, false };
            //    modelBuilder.Filter("BlogContainsTest", (BlogEntry b, List<bool> valueList) => valueList.Contains(b.IsDeleted), () => values);

            //    var values = new List<DateTime> { new DateTime(2015, 1, 1), new DateTime(2015, 1, 2, 12, 34, 56, 789), new DateTime(2015, 1, 3) };
            //    modelBuilder.Filter("BlogContainsTest", (BlogEntry b, List<DateTime> valueList) => valueList.Contains(b.DateValue.Value), () => values);

            //    modelBuilder.Filter("BlogContainsTest", (BlogEntry b) => (new List<int> { 1, 2, 3, 4, 5 }).Contains(b.IntValue.Value));

            //    int value1 = 1;
            //    int value2 = 2;
            //    modelBuilder.Filter("BlogContainsTest", (BlogEntry b, int val1, int val2) => (new List<int> { val1, val2, 3, 4, 5 }).Contains(b.IntValue.Value), () => value1, () => value2);
            //}

            //  TODO: This generates invalid sql.  Creates where clause like this: WHERE  NOT ([Var_1].[IsDeleted])
            //modelBuilder.Filter("IsDeleted", (ISoftDelete d) => !d.IsDeleted);

            //  Multiple navigation property filter
            modelBuilder.Filter("IsDeleted", (IEntitySoftDelete d) => d.IsDeleted, false);
        }
    }

    public class ContentInitializer<T> : DropCreateDatabaseAlways<T>
        where T : ContextBase
    {
        protected override void Seed(T context)
        {
            System.Diagnostics.Debug.Print("Seeding db");

            //  Seeds 2 accounts with 9 blog entries, 4 of which are deleted

            var homer = new Account
            {
                UserName = "homer",
                BlogEntries = new List<BlogEntry>
                {
                    new BlogEntry { Body="Homer's first blog entry", IsDeleted=false, IsActive=true, StringValue="1"},
                    new BlogEntry { Body="Homer's second blog entry", IsDeleted=false, IsActive=true, StringValue="2"},
                    new BlogEntry { Body="Homer's third blog entry (deleted)", IsDeleted=true, IsActive=true, StringValue="3"},
                    new BlogEntry { Body="Homer's fourth blog entry (deleted)", IsDeleted=true, IsActive=true, StringValue="4"},
                    new BlogEntry { Body="Homer's 5th blog entry (inactive)", IsDeleted=false, IsActive=false, StringValue="5"},
                    new BlogEntry { Body="Homer's 6th blog entry (deleted and inactive)", IsDeleted=true, IsActive=false, StringValue="6"},
                }
            };
            context.Accounts.Add(homer);

            var bart = new Account
            {
                UserName = "bart",
                BlogEntries = new List<BlogEntry>
                {
                    new BlogEntry { Body="Bart's first blog entry", IsDeleted=false, IsActive=true, StringValue="7"},
                    new BlogEntry { Body="Bart's second blog entry", IsDeleted=false, IsActive=true, StringValue="8"},
                    new BlogEntry { Body="Bart's third blog entry", IsDeleted=false, IsActive=true, StringValue="9"},
                    new BlogEntry { Body="Bart's fourth blog entry (deleted)", IsDeleted=true, IsActive=true, StringValue="10"},
                    new BlogEntry { Body="Bart's fifth blog entry (deleted)", IsDeleted=true, IsActive=true, StringValue="11"},
                    new BlogEntry { Body="Bart's 6th blog entry (inactive)", IsDeleted=false, IsActive=false, StringValue="12"},
                    new BlogEntry { Body="Bart's 7th blog entry (deleted and inactive)", IsDeleted=true, IsActive=false, StringValue="13"},
                }
            };
            context.Accounts.Add(bart);

            context.SaveChanges();

            var a1 = new EntityA { IsDeleted = false, Nav1 = new EntityB { IsDeleted = false }, Nav2 = new EntityB { IsDeleted = true } };
            var a2 = new EntityA { IsDeleted = false, Nav1 = new EntityB { IsDeleted = false }, Nav2 = new EntityB { IsDeleted = true }, Nav3 = a1 };
            var a3 = new EntityA { IsDeleted = true };
            context.EntityASet.Add(a1);
            context.EntityASet.Add(a2);
            context.EntityASet.Add(a3);
            context.SaveChanges();
        }
    }
}


text:
The Revolver4D Math Engine is a math engine implemented in C++. The math engine can be used in 3D computer graphics applications.

Please see the wiki for instructions on how to use it.


text:
namespace signin {

class HeaderModificationDelegate;

// This class is used to modify the main frame request made when loading the
// GAIA signin realm.
class URLLoaderThrottle : public blink::URLLoaderThrottle,
                          public base::SupportsUserData {
 public:
  // Creates a new throttle if |delegate| says that this request should be
  // intercepted.
  static std::unique_ptr<URLLoaderThrottle> MaybeCreate(
      std::unique_ptr<HeaderModificationDelegate> delegate,
      content::WebContents::Getter web_contents_getter);

  ~URLLoaderThrottle() override;

  // blink::URLLoaderThrottle
  void WillStartRequest(network::ResourceRequest* request,
                        bool* defer) override;
  void WillRedirectRequest(
      net::RedirectInfo* redirect_info,
      const network::mojom::URLResponseHead& response_head,
      bool* defer,
      std::vector<std::string>* headers_to_remove,
      net::HttpRequestHeaders* modified_headers,
      net::HttpRequestHeaders* modified_cors_exempt_headers) override;
  void WillProcessResponse(const GURL& response_url,
                           network::mojom::URLResponseHead* response_head,
                           bool* defer) override;

 private:
  class ThrottleRequestAdapter;
  class ThrottleResponseAdapter;

  URLLoaderThrottle(std::unique_ptr<HeaderModificationDelegate> delegate,
                    content::WebContents::Getter web_contents_getter);

  const std::unique_ptr<HeaderModificationDelegate> delegate_;
  const content::WebContents::Getter web_contents_getter_;

  // Information about the current request.
  GURL request_url_;
  GURL request_referrer_;
  net::HttpRequestHeaders request_headers_;
  net::HttpRequestHeaders request_cors_exempt_headers_;
  blink::mojom::ResourceType request_resource_type_;

  base::OnceClosure destruction_callback_;

  DISALLOW_COPY_AND_ASSIGN(URLLoaderThrottle);
};

}  // namespace signin

#endif  // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_URL_LOADER_THROTTLE_H_


text:
describe("Updates", function() {
  var view;

  beforeEach(function() {
    view = new App.views.Project.views.Updates({ parent: { on: function(){} } });
    app = new App();
  });

  describe("#onUpdateCreate", function() {
    beforeEach(function() {
      spyOn(view.$results, "prepend");
      spyOn(app, "flash");
      view.onUpdateCreate(null, 'test');
    });

    it("should prepend data", function() {
      expect(view.$results.prepend).wasCalledWith('test');
    });

    it("should display flash", function() {
      expect(app.flash.wasCalled();
    });
  });

  describe("#onUpdateDestroy", function() {
    var $target;
    var $count;
    beforeEach(function() {
      view.parent = { $: function(){} };
      $target = $('
');
      $count = $('
');
      spyOn(window, "$").andReturn($target);
      spyOn($target, "remove");
      spyOn(view.parent, "$").andReturn($count);
      spyOn($count, "html");

      view.onUpdateDestroy({currentTarget: $target});
    });

    it("should get currentTarget and remove it", function() {
      expect(window.$).wasCalledWith($target);
      expect($target.remove).wasCalled();
    });

     it("should update count", function() {
       expect($count.html).wasCalledWith(' (0)');
     });
  });
});


text:
#import <Foundation/Foundation.h>
#import <GLKit/GLKMath.h>

@class PlugInNode;
@class SequencerNodeProperty;

@interface NodeInfo : NSObject
{
    PlugInNode* __weak plugIn;
    NSMutableDictionary* extraProps;
    NSMutableDictionary* animatableProperties;
    NSMutableDictionary* baseValues;
    NSMutableArray* customProperties;
    NSString* displayName;
}

@property (nonatomic,weak) PlugInNode* plugIn;
@property (nonatomic,readonly) NSMutableDictionary* extraProps;
@property (nonatomic,strong) NSMutableDictionary* animatableProperties;
@property (nonatomic,readonly) NSMutableDictionary* baseValues;
@property (nonatomic,copy) NSString* displayName;
@property (nonatomic,strong) NSMutableArray* customProperties;
@property (nonatomic,assign) GLKMatrix4 startMatrix;
@property (nonatomic,assign) CGPoint startAnchorPoint;

+ (id) nodeInfoWithPlugIn:(PlugInNode*)pin;

@end


text:
require 'spec_helper'

describe ApplicationHelper, :type => :helper do
  describe '#google_analytics_js' do
    it "includes tag" do
      helper.google_analytics_js.should match '2778'
    end
  end
  describe '#set_focus_to_id' do
    it "focuses on the ID" do
      helper.set_focus_to_id("#x").should =~ /#x/
      helper.set_focus_to_id("#x").should =~ /focus/
    end
  end
  describe '#clothing_thumbnail' do
    before do
      @c = create(:clothing, image: fixture_file_upload('/files/sample-color-ff0000.png', 'image/png'))
    end
    it "requires clothing" do
      helper.clothing_thumbnail(nil).should be_nil
    end
    it "displays the last time something was worn" do
      @c.last_worn = Time.zone.now - 1.day
      helper.clothing_thumbnail(@c).should match '1 day ago'
    end
    it "shows tiny thumbnail" do
      expect(@c.image).to receive(:url).with(:small)
      expect(helper.clothing_thumbnail(@c, size: :tiny)).to match "clothing_#{@c.id}"
    end
    it "includes large thumbnail if specified" do
      expect(@c.image).to receive(:url).with(:large)
      expect(helper.clothing_thumbnail(@c, size: :large)).to match "clothing_#{@c.id}"
    end
    it "includes medium thumbnail by default" do
      expect(@c.image).to receive(:url).with(:medium)
      expect(helper.clothing_thumbnail(@c)).to match "clothing_#{@c.id}"
    end
  end
  describe '#date_ago_future' do
    it "shows the dates for the future" do
      expect(helper.date_ago_future(Time.zone.local(2100, 1, 1))).to be_within(1.day).of(Time.zone.local(2100, 1, 1))
    end
    it "shows 'today'" do
      expect(helper.date_ago_future(Time.zone.now)).to eq 'today'
    end
    it "shows days ago" do
      expect(helper.date_ago_future(Time.zone.now - 1.day)).to eq '1 day ago'
      expect(helper.date_ago_future(Time.zone.now - 2.days)).to eq '2 days ago'
    end
  end
  describe '#resource_name' do
    it "returns the resource name" do
      expect(helper.resource_name).to eq :user
    end
  end
  describe '#resource' do
    it "returns a resource" do
      expect(helper.resource.class).to eq User
    end
  end
  describe '#devise_mapping' do
    it "returns user" do
      @request.env["devise.mapping"] = Devise.mappings[:user]
      expect(helper.devise_mapping).to eq Devise.mappings[:user]
    end
  end
  describe '#conditional_html' do
    it 'returns IE code' do
      expect(helper.conditional_html('en')).to match 'IE 7'
    end
  end
  describe '#object_labels' do
    it "shows the status" do
      expect(helper.object_labels(build_stubbed(:clothing, status: 'donated'))).to match 'donated'
    end
    it "shows private" do
      expect(helper.object_labels(build_stubbed(:tap_log_record, note: '!private'))).to match I18n.t('app.general.private')
    end
  end
  describe '#actions' do
    context "when logged in" do
      before do
        @user = create(:user, :confirmed)
        allow(helper).to receive(:can?).and_return(true)
        allow(helper).to receive(:managing?).and_return(true)
        allow(helper).to receive(:current_account).and_return(@user)
      end
      context "when given a memory" do
        subject { helper.actions(build_stubbed(:memory, user: @user)).join('') }
        it { should match 'edit' }
        it { should match 'delete' }
      end
      context "when given a record category - activity" do
        subject { helper.actions(build_stubbed(:record_category, user: @user)).join('') }
        it { should match 'edit' }
        it { should match I18n.t('record_categories.show.start_activity') }
        it { should_not match I18n.t('record_categories.show.record') }
      end
      context "when given a record category - record" do
        subject { helper.actions(build_stubbed(:record_category, user: @user, category_type: 'record')).join('') }
        it { should match 'edit' }
        it { should match I18n.t('record_categories.show.record') }
      end
      context "when given a record" do
        subject { helper.actions(build_stubbed(:record, user: @user)).join('') }
        it { should match 'edit' }
        it { should match 'delete' }
        it { should match 'clone' }
      end
      context "when given a context" do
        subject { helper.actions(build_stubbed(:context, user: @user)).join('') }
        it { should match 'edit' }
        it { should match 'Start' }
      end
      context "when given a goal" do
        subject { helper.actions(build_stubbed(:goal, user: @user)).join('') }
        it { should match 'edit' }
        it { should match 'delete' }
      end
    end
    context "when not logged in" do
      before do
        @user = create(:user, :demo)
        allow(helper).to receive(:can?).and_return(false)
        allow(helper).to receive(:managing?).and_return(false)
        allow(helper).to receive(:current_account).and_return(create(:user, :confirmed))
      end
      context "when given a memory" do
        subject { helper.actions(build_stubbed(:memory, user: @user)).join('') }
        it { should_not match 'edit' }
        it { should_not match 'delete' }
        it { should match I18n.t('app.general.view') }
      end
      context "when given a record category - activity" do
        subject { helper.actions(build_stubbed(:record_category, user: @user)).join('') }
        it { should_not match 'edit' }
        it { should_not match I18n.t('record_categories.show.start_activity') }
        it { should_not match I18n.t('record_categories.show.record') }
      end
      context "when given a record category - record" do
        subject { helper.actions(build_stubbed(:record_category, user: @user, category_type: 'record')).join('') }
        it { should_not match 'edit' }
        it { should_not match I18n.t('record_categories.show.record') }
      end
      context "when given a record" do
        subject { helper.actions(build_stubbed(:record, user: @user)).join('') }
        it { should_not match 'edit' }
        it { should_not match 'delete' }
        it { should_not match 'clone' }
      end
      context "when given a context" do
        subject { helper.actions(build_stubbed(:context, user: @user)).join('') }
        it { should_not match 'edit' }
        it { should_not match 'Start' }
      end
    end
  end
  describe '#tags' do
    it "returns a list of tags" do
      expect(helper.tags(create(:clothing, user: @user, tag_list: 'a, b'))).to eq 'a, b'
    end
  end
  describe '#after_title' do
    it "stores the info if given a string" do
      expect(helper).to receive(:content_for).with(:after_title)
      helper.after_title('hello')
    end
    it "stores the info if given a block" do
      expect(helper).to receive(:content_for).with(:after_title)
      helper.after_title do 'hello' end
    end
  end
  describe '#active_menu' do
    let(:request) { double('request', :fullpath => '/time') }
    it "matches regular expressions" do
      expect(active_menu(/\/time/)).to eq 'active'
    end
    it "does not match regular expressions if inactive" do
      expect(active_menu(/\/dashboard/)).to eq 'inactive'
    end
  end
  describe '#duration' do
    it "shows as time" do
      allow(helper).to receive(:params).and_return({ display_type: 'time' })
      expect(helper.duration(60 * 6)).to eq '0:06'
    end
    it "shows as decimal" do
      allow(helper).to receive(:params).and_return({ display_type: 'decimal' })
      expect(helper.duration(60 * 6)).to eq '0.1'
    end
  end
  describe '#record_category_breadcrumbs' do
    it "shows a hierarchy" do
      @u = create(:user, :confirmed)
      @c1 = create(:record_category, user: @u, name: 'AB')
      @c2 = create(:record_category, user: @u, parent: @c1, name: 'CD')
      expect(helper.record_category_breadcrumbs(@c2)).to match 'AB'
      expect(helper.record_category_breadcrumbs(@c2)).to_not match 'CD'
    end
  end
  describe '#delete_icon' do
    it "gets the path when passed an object" do
      expect(helper.delete_icon(create(:user, :confirmed))).to match /user/
    end
  end
  describe "#record_category_full" do
    it "requires a category" do
      expect(helper.record_category_full(nil)).to eq '(deleted?)'
    end
    it "displays the full name" do
      @u = create(:user, :confirmed)
      @c1 = create(:record_category, user: @u, name: 'AB')
      @c2 = create(:record_category, user: @u, parent: @c1, name: 'CD')
      expect(helper.record_category_full(@c2)).to match 'AB'
      expect(helper.record_category_full(@c2)).to match 'CD'
    end
  end
  describe "#record_data" do
    before do
      @u = create(:user, :confirmed)
      @c1 = create(:record_category, user: @u, name: 'AB', data: { note: { key: 'note', label: 'Note', type: 'text' }  })
    end
    it "returns blank if there is no data" do
      @record_blank = create(:record, user: @u, record_category: @c1)
      expect(helper.record_data(@record_blank.data)).to eq ''
    end
    it "returns blank if there is zero data" do
      @record_blank = create(:record, user: @u, record_category: @c1, data: {})
      expect(helper.record_data(@record_blank.data)).to eq ''
    end
    it "displays one item" do
      @record = create(:record, user: @u, record_category: @c1, data: { note: 'Note' })
      expect(helper.record_data(@record.data)).to eq 'Note: Note'
    end
    it "displays multiple items" do
      @c2 = create(:record_category, user: @u, name: 'AB', data: { note: { key: 'note', label: 'Note', type: 'text' },
                     note2: { key: 'another', label: 'Another', type: 'text' } })
      @record2 = create(:record, user: @u, record_category: @c2, data: { note: 'NValue', another: 'AValue' })
      expect(helper.record_data(@record2.data)).to match 'Note: NValue'
      expect(helper.record_data(@record2.data)).to match 'Another: AValue'
    end
  end
  describe '#graph_time_entry' do
    before do
      @user = create(:user, :confirmed)
    end
    it "outputs Javascript with the category color" do
      cat = create(:record_category, color: '#000')
      @row = [Time.zone.now, Time.zone.now + 1.hour, create(:record, user: @user, record_category: cat)]
      expect(helper.graph_time_entry('canvas', 0, @row)).to match '1:00'
      expect(helper.graph_time_entry('canvas', 0, @row)).to match '#000'
    end
    it "outputs Javascript default color" do
      @row = [Time.zone.now, Time.zone.now + 1.hour, create(:record, user: @user)]
      expect(helper.graph_time_entry('canvas', 0, @row)).to match '1:00'
      expect(helper.graph_time_entry('canvas', 0, @row)).to match '#ccc'
    end
  end
  describe '#graph_time_total' do
    it "uses the category color" do
      cat = create(:record_category, color: '#000')
      rec = create(:record, timestamp: Time.zone.now, end_timestamp: Time.zone.now + 1.hour, record_category: cat)
      x = helper.graph_time_total('canvas', Time.zone.now.midnight..(Time.zone.now.midnight + 1.day), Time.zone.now.midnight, rec.record_category, 3600)
      expect(x).to match '#000'
    end
    it "uses the default color" do
      rec = create(:record, timestamp: Time.zone.now, end_timestamp: Time.zone.now + 1.hour)
      x = helper.graph_time_total('canvas', Time.zone.now.midnight..(Time.zone.now.midnight + 1.day), Time.zone.now.midnight, rec.record_category, 3600)
      expect(x).to match rec.record_category.name
      expect(x).to match '#ccc'
    end
  end
  describe '#record_data_input' do
    before :each do
      @u = create(:user, :confirmed)
      @c2 = create(:record_category, user: @u, name: 'AB', data: { note: { key: 'note', label: 'Note', type: 'text' },
                     note2: { key: 'another', label: 'Another', type: 'number' } })
      @record2 = create(:record, user: @u, record_category: @c2, data: { note: 'NValue', another: 'AValue' })
    end
    context "when given a textarea" do
      subject { helper.record_data_input(@record2, @c2.data[:note]) }
      it { should match 'textarea' }
      it { should match 'note' }
    end
    context "when given a number" do
      subject { helper.record_data_input(@record2, @c2.data[:note2]) }
      it { should match 'input' }
      it { should match 'another' }
    end
  end
  describe '#explain_op(op)' do
    it "turns operators into English" do
      list = {'>' => 'should be greater than',
        '>=' => 'should be greater than or equal to',
        '<=' => 'should be less than or equal to',
        '<' => 'should be less than',
        '=' => 'should be equal to',
        '!=' => 'should not be equal to'}
      list.each do |k,v|
        expect(helper.explain_op(k)).to eq v
      end
    end
  end

end


text:
/** @module */
"use static"

const Monad = require("./monad")
const { wrap } = require("./utils")

/**
 * @alias module:lib/node-continuation.NodeContinuation
 * @description node continuaton monad
 */
class NodeContinuationMonad extends Array {

  constructor(err=null, value=null) {
    super(err, value)
  }

  static return(value) {
    return new NodeContinuationMonad(null, value)
  }

  static fail(err) {
    return new NodeContinuationMonad(err, null)
  }

  static join(stack, nodeCb, cb) {
    nodeCb((err, ...args) => {
      if (!err) {
        const { doBlock } = stack[0]
        cb(doBlock.next(wrap(args.length > 1 ? args : args[0], stack.length)))
      } else {
        const { doBlock } = stack[stack.length - 1]
        const value = NodeContinuationMonad.fail(err)
        doBlock.next({ value, done: true })
        cb(stack[0].doBlock.next({ value, done: false }))
      }
    })
  }
}

module.exports = NodeContinuationMonad


text:
package co.nstant.in.cbor.examples;

import co.nstant.in.cbor.model.AbstractNumberTest;

/**
 * 0 -> 0x00
 */
public class Example02Test extends AbstractNumberTest {

    public Example02Test() {
        super(1, new byte[] { 0x01 });
    }

}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Phytopathology 36: 775 (1946)

#### Original name
Coryneum asperulum Lombard & R.W. Davidson

### Remarks
null


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Erb. critt. Ital. , Ser. 2 no. 1460 (1881)

#### Original name
Asterina dodonaei Pass.

### Remarks
null


text:
<TITLE>Review for Arrival, The (1996)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Arrival, The (1996)

reviewed by
Mark R. Leeper

                                THE ARRIVAL
                      A film review by Mark R. Leeper
                       Copyright 1996 Mark R. Leeper

               Capsule: This is a tired retread of too many
          action films with an unnecessary science fiction
          premise thrown in.  Some of the special effects are
          reasonable, but there is a great deal of silliness
          in the plot.  If you really are looking for
          something original and different to see this summer
          you will find that THE ARRIVAL is not much of a
          departure.  Rating: high 0 (-4 to +4) [A discussion
          of some of the ideas follows the main review, but
          at least one of the comments might be a spoiler.]

     Start with a standard conspiracy and cover-up story.  However,
instead of making the villain be the government or the Mafia or enemy
agents, this time make it be aliens.  That gives you a little latitude
for a few nice special effects and allows you to exploit the publicity
for INDEPENDENCE DAY.  That seems to be what happened with THE ARRIVAL.
The plot is pretty much a standard loner-on-the-run not knowing whom he
can trust that has been around since THE 39 STEPS and probably longer.
David Twohy proves that it does not take a whole lot of effort to make
this tried-and-true suspense formula into a science fiction film.  Two
previously wrote and directed DISASTER IN TIME, and there he did a
reasonable job.  That adaptation of C. L. Moore's "Vintage Season"
added adventure elements to a classic story and arguably actually
improved on the original.  However he also co-authored the script for
WATERWORLD, which depended too much on all-too-familiar action film
devices.  With THE ARRIVAL he is back to re-framing the all-too-
familiar, once again writing and directing.

     Zane Zaminski (played by Charlie Sheen) is a radio astronomer
working for NASA on the Search for Extra- terrestrial Intelligence
project when he receives a signal from space that seems to be a message
from something intelligent.  Bringing it to his supervisor, Gordian
(Ron Silver), he finds that some people, and especially Gordian, seem
more anxious to hush up the discovery than to act on the tremendous
implications of the signal.  Zaminski finds himself fired and the tape
of the intercepted signal is destroyed.  He determines that he can
search for the signal again by hijacking all the television satellite
dishes in the neighborhood, re-rigging them so that he can direct them
at will, and using them to try to again find his signal. The
information he gets is sufficient to tip him off that there is
something odd that has to be investigated in Mexico and the chase
begins in earnest.

     Twohy's script really needed to use its science fiction premise
more effectively in the plot.  Too often the premise of the aliens is
relegated to McGuffin.  If a character is hanging onto something for
dear life, does it really make this a science fiction film if the thing
held onto is a radio telescope rather than the Statue of Liberty?  Does
it make the story any more exciting?  And for an action plot, THE
ARRIVAL's is rather flaccid with only one scene of any real tension,
and that involving poisonous insects and not aliens.  Charlie Sheen
could have used a winning performance to his credit, but his radio
astronomer is neither winning nor believable.  Lindsay Crouse, whose
wooden performance was the only major problem with HOUSE OF GAMES,
gives an only slightly better performance here.  Tony T. Johnson is the
little boy next door, to whom Sheen can explain what would not
otherwise be obvious to the audience.  Teri Polo, the Christine Daae of
the 1990 TV version of THE PHANTOM OF THE OPERA, is along as the female
companion of Zaminski, but neither the character nor the actress is
very much help.

     I somehow think that David Twohy wanted to have made a science
fiction film, but did not have his heart in writing science fiction.
This chase/action film gets a high 0 on the -4 to +4 scale.

SPOILER... SPOILER... SPOILER... SPOILER... SPOILER... SPOILER...

     The idea that Zaminski could build his own radio telescope to find
the signal again is ludicrous since it would take more money than he
could put into the project and putting all the television satellite
antennas out of commission would give him away before he could use the
scheme.  My guess is that this handful of small dishes would not
accomplish his purpose in any case.  Radio telescopes have to be really
large because they generally use very large wave lengths, though
admittedly the script says that Zaminski was looking in the FM band.
The Very Large Array near Socorro, New Mexico has 21 antennas, each 81
feet high and 422 feet in diameter.  They are on a Y-shaped rail track
22 miles across.  They can be brought in to the center in a tight
configuration or spread out over the whole track, having the equivalent
effect of looking with a wide-angle lens or with a telephoto lens.
However, this array is very often used in conjunction with other radio
telescopes in other parts of the world so the huge array that so
astounded Zaminski at one point in the plot should not have been even a
novel idea to a real radio astronomer.  Another problem that is
conveniently overlooked is the length of time it takes the aliens to
communicate with "something that moves like a star" and not a
satellite, so presumably it is a star.  There is also a plot problem
involving the note that Kiki left for his grandmother.

                                        Mark R. Leeper
                                        mleeper@lucent.com

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
package org.apache.ofbiz.widget.renderer.html;

import java.io.IOException;
import java.io.StringWriter;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.UtilValidate;
import org.apache.ofbiz.entity.Delegator;
import org.apache.ofbiz.entity.GenericEntityException;
import org.apache.ofbiz.entity.GenericValue;
import org.apache.ofbiz.widget.content.WidgetContentWorker;
import org.apache.ofbiz.widget.model.ModelMenuItem;

/**
 * Widget Library - HTML Menu Renderer implementation
 */

public class HtmlMenuRendererImage extends HtmlMenuRenderer {

    protected HtmlMenuRendererImage() {}

    public HtmlMenuRendererImage(HttpServletRequest request, HttpServletResponse response) {
        super(request, response);
    }

    public String buildDivStr(ModelMenuItem menuItem, Map<String, Object> context) throws IOException {

        StringBuilder imgStr = new StringBuilder("<img src=\"");
        String contentId = menuItem.getAssociatedContentId(context);
        Delegator delegator = (Delegator)request.getAttribute("delegator");
        GenericValue webSitePublishPoint = null;
        try {
            if (WidgetContentWorker.getContentWorker() != null) {
                webSitePublishPoint = WidgetContentWorker.getContentWorker().getWebSitePublishPointExt(delegator, contentId, false);
            } else {
                Debug.logError("Not rendering image because can't get WebSitePublishPoint, not ContentWorker found.", module);
            }
        } catch (GenericEntityException e) {
            throw new RuntimeException(e.getMessage());
        }
        String medallionLogoStr = webSitePublishPoint.getString("medallionLogo");
        StringWriter buf = new StringWriter();
        appendContentUrl(buf, medallionLogoStr);
        imgStr.append(buf.toString());
        String cellWidth = menuItem.getCellWidth();
        imgStr.append("\"");
        if (UtilValidate.isNotEmpty(cellWidth)) {
            imgStr.append(" width=\"").append(cellWidth).append("\" ");
        }

        imgStr.append(" border=\"0\" />");
        return imgStr.toString();
    }

}


text:
package net.bytebuddy.instrumentation;

import net.bytebuddy.test.packaging.PackagePrivateMethod;
import org.junit.Test;

public class MethodDelegationExceptionTest extends AbstractInstrumentationTest {

    @Test(expected = IllegalArgumentException.class)
    public void testNoMethod() throws Exception {
        instrument(Foo.class, MethodDelegation.to(Bar.class));
    }

    @Test(expected = IllegalArgumentException.class)
    public void testNoVisibleMethod() throws Exception {
        instrument(Foo.class, MethodDelegation.to(new PackagePrivateMethod()));
    }

    @Test(expected = IllegalArgumentException.class)
    public void testNoCompatibleMethod() throws Exception {
        instrument(Foo.class, MethodDelegation.to(Qux.class));
    }

    @Test(expected = IllegalArgumentException.class)
    public void testInterface() throws Exception {
        MethodDelegation.to(Runnable.class);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testArray() throws Exception {
        MethodDelegation.to(int[].class);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testPrimitive() throws Exception {
        MethodDelegation.to(int.class);
    }

    public static class Foo {

        public void bar() {
            /* do nothing */
        }
    }

    public static class Bar {
        /* empty */
    }

    public static class Qux {

        public static void foo(Object o) {
            /* do nothing */
        }
    }
}


text:
import lowerCaseFirst from 'lower-case-first';

export default function extendActions(
  ResourceActions,
  {
    apiKey = `${lowerCaseFirst(this.name)}Api`
  }
) {
  class ResourceActionsWithApi extends ResourceActions {
    getApi() {
      return this.app[apiKey];
    }
  }

  return ResourceActionsWithApi;
}


text:
Settings_Workflows_Edit_Js("Settings_Workflows_Edit1_Js",{},{

	init : function() {
		this.initialize();
	},
	/**
	 * Function to get the container which holds all the reports step1 elements
	 * @return jQuery object
	 */
	getContainer : function() {
		return this.step1Container;
	},

	/**
	 * Function to set the reports step1 container
	 * @params : element - which represents the reports step1 container
	 * @return : current instance
	 */
	setContainer : function(element) {
		this.step1Container = element;
		return this;
	},

	/**
	 * Function  to intialize the reports step1
	 */
	initialize : function(container) {
		if(typeof container == 'undefined') {
			container = jQuery('#workflow_step1');
		}
		if(container.is('#workflow_step1')) {
			this.setContainer(container);
		}else{
			this.setContainer(jQuery('#workflow_step1'));
		}
	},

	submit : function(){
		var aDeferred = jQuery.Deferred();
		var form = this.getContainer();
		var formData = form.serializeFormData();
		var progressIndicatorElement = jQuery.progressIndicator({
			'position' : 'html',
			'blockInfo' : {
				'enabled' : true
			}
		});
		AppConnector.request(formData).then(
			function(data) {
				form.hide();
				progressIndicatorElement.progressIndicator({
					'mode' : 'hide'
				})
				aDeferred.resolve(data);
			},
			function(error,err){

			}
		);
		return aDeferred.promise();
	},

	registerEvents : function(){
		var container = this.getContainer();

		//After loading 1st step only, we will enable the Next button
		container.find('[type="submit"]').removeAttr('disabled');

		var opts = app.validationEngineOptions;
		// to prevent the page reload after the validation has completed
		opts['onValidationComplete'] = function(form,valid) {
            //returns the valid status
            return valid;
        };
		opts['promptPosition'] = "bottomRight";
		container.validationEngine(opts);
	}
});


text:
FOUNDATION_EXPORT double Pods_TableViewModel_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_TableViewModel_ExampleVersionString[];


text:
abstract class NonNullOnParameterAbstract {
	public void test(@lombok.NonNull String arg) {
		System.out.println("Hey");
	}

	public abstract void test2(@lombok.NonNull String arg);
}


text:
import logging

from . import model, tag

log = logging.getLogger(__name__)

class RemoteApplication(model.ModelEntity):

    @property
    def status(self):
        """Get the application status, as set by the charm's leader.

        """
        return self.safe_data['status']['current']

    @property
    def status_message(self):
        """Get the application status message, as set by the charm's leader.

        """
        return self.safe_data['status']['message']

    @property
    def tag(self):
        return tag.application(self.name)

class ApplicationOffer(model.ModelEntity):
    @property
    def tag(self):
        return tag.application(self.name)


text:
<?php
namespace Admin\Model;

class Utilisateurs
{
	public $id;
	public $username;
	public $password;
	public $nom;
	public $prenom;
	public $role;
	public $id_service;
	public $fonction;
	public $id_personne;

	public function exchangeArray($data)
	{
		$this->id     = (!empty($data['id'])) ? $data['id'] : null;
		$this->username = (!empty($data['username'])) ? $data['username'] : null;
		$this->password  = (!empty($data['password'])) ? $data['password'] : null;
		$this->nom  = (!empty($data['nom'])) ? $data['nom'] : null;
		$this->prenom  = (!empty($data['prenom'])) ? $data['prenom'] : null;
		$this->role  = (!empty($data['role'])) ? $data['role'] : null;
		$this->id_service  = (!empty($data['id_service'])) ? $data['id_service'] : null;
		$this->fonction  = (!empty($data['fonction'])) ? $data['fonction'] : null;
		$this->id_personne  = (!empty($data['id_personne'])) ? $data['id_personne'] : null;
	}
}


text:
#ifndef __MESSTREE_H__
#define __MESSTREE_H__

typedef int (*t_messcall)(t_pd *, t_symbol *, int, t_atom *);
typedef char *t_messarg;

typedef struct _messslot
{
    char        *ms_name;
    t_messcall   ms_call;
    char        *ms_argument;
    int          ms_flags;
    struct _messnode  *ms_subnode;
} t_messslot;

typedef struct _messnode  /* a parser's symbol definition, sort of... */
{
    t_messslot  *mn_table;
    int          mn_nslots;
    int          mn_index;
} t_messnode;

EXTERN_STRUCT _messtree;
#define t_messtree  struct _messtree

#define MESSTREE_NSLOTS(slots)  (sizeof(slots)/sizeof(*(slots)))

enum { MESSTREE_OK,        /* done current message parsing, parse next */
       MESSTREE_CONTINUE,  /* continue current message parsing */
       MESSTREE_UNKNOWN,   /* current message unknown, parse next */
       MESSTREE_CORRUPT,   /* current message corrupt, parse next */
       MESSTREE_FATAL      /* exit parsing */
};

#define MESSTREE_NONEXCLUSIVE  1

t_messtree *messtree_new(t_symbol *selector);
void messtree_add(t_messtree *mt, t_messnode *rootnode);
t_messtree *messtree_build(t_messslot *rootslot);
int messtree_doit(t_messtree *mt, t_messslot **msp, int *nargp,
		  t_pd *target, t_symbol *s, int ac, t_atom *av);

#endif


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
J. Bot. 68: 270 (1930)

#### Original name
Phomopsis armeriae Grove

### Remarks
null


text:
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\title{Sergio Ramos}
\author{Patryk Sobolewski}
\institute{UWM}
\date{\today}
\usepackage{amsfonts}
\usepackage[MeX]{polski}
\usepackage{graphicx}
\begin{document}
\frame{\titlepage}

\begin{frame}
\frametitle{Spis Treści}
\tableofcontents
\end{frame}

\section{Życiorys}
\begin{frame}{}
\begin{itemize}
\item{Sergio Ramos García ;(ur. 30 marca 1986 w Camas) – hiszpański piłkarz występujący na pozycji obrońcy w hiszpańskim klubie Real Madryt, którego jest kapitanem. Reprezentant Hiszpanii.}
\begin{figure}
\includegraphics[width=0.25\hsize] {Sergio.jpg}
\caption{Sergio Ramos}\label{fig:Sergio}
\end{figure}
\end{itemize}
\end{frame}

\begin{frame}{Życiorys, cd.}
\begin{itemize}
\item<1>Karierę rozpoczynał w Sevilli. W sezonie 2004/2005 rozegrał 31 ligowych spotkań, udało mu się strzelić 2 bramki. Ramos był ostrzegany przez sędziów kartkami zaledwie pięciokrotnie. To niedużo, jak na środkowego obrońcę.
\item<2>Świetne występy w Pucharze UEFA sprawiły, że okrzyknięto go najlepszym młodym graczem tych rozgrywek w sezonie 2004/2005. Ramos zaliczył także występy w młodzieżowej reprezentacji Hiszpanii do lat 21. Zadebiutował w niej w 2004 roku. Rozegrał 6 spotkań.
\item<3>Latem 2005 roku Real Madryt rozpoczął starania o przeprowadzenie transferu obrońcy Sevilli. Negocjacje zakończyły się sukcesem dopiero wieczorem 31 sierpnia, na chwilę przed zamknięciem okienka transferowego. Kwota transferu wyniosła 27 mln euro.
\end{itemize}
\end{frame}

\section{Kariera w reprezentacji}
\begin{frame}{Reprezentacja:}
\begin{itemize}

\item<1>W 2005 roku, mając 19 lat, utalentowany defensor, zadebiutował w pierwszej reprezentacji Hiszpanii. W ten sposób został najmłodszym graczem, który zadebiutował w drużynie z Półwyspu Iberyjskiego od 55 lat. Następstwem dobrej gry były występy w trudniejszych i ważniejszych meczach, podczas eliminacji do Mistrzostw Świata.
\item<2>Hiszpania grała mecz o wszystko z Serbią. Podczas nieobecności Míchela Salgado, swoje umiejętności mógł zaprezentować Ramos. Mimo młodego wieku zdołał upilnować tak renomowanych piłkarzy jak Mateja Kežman, Savo Milošević czy Dejan Stanković.
\end{itemize}
\end{frame}

\begin{frame}{Ważne momenty życiowe:}
\begin{itemize}
\item{Selekcjoner reprezentacji Hiszpanii Luis Aragonés postanowił zabrać go na Mistrzostwa Świata w Piłce Nożnej 2006 do Niemiec, gdzie pomógł drużynie dotrzeć do 1/8 finałów.
\begin{figure}
\includegraphics[width=0.5\hsize] {ss.jpg}
\label{fig:ss}
\end{figure}
}
\end{itemize}
\end{frame}

\begin{frame}{Statystyki kariery:}
\begin{itemize}
\section{Statystyki kariery}

\begin{table}
\begin{tabular}{lcr}
\hline
\textbf{Sezon}&\textbf{Mecze}&\textbf{Gole}&\textbf{Asysty}\\
\hline
2003{/}04&7&0&0\\
2004{/}05&31&2&0\\
2005{/}06&33&4&0\\
2006{/}07&33&5&2\\
2007{/}08&33&5&4\\
2008{/}09&32&4&3\\
2009{/}10&33&4&5\\
20010{/}11&31&3&2\\
20011{/}12&34&3&6\\
20012{/}13&26&4&0\\
20013{/}14&32&4&1\\
20014{/}15&27&4&1\\
20015{/}16&23&2&3\\
\hline
\end{tabular}
\end{table}

\end{itemize}
\end{frame}

\section{Sukcesy}
\begin{frame}{Real Madryt}
\begin{itemize}
\item Klubowe mistrzostwo świata: 2014, 2016
\item Superpuchar Europy UEFA: 2014, 2016, 2017
\item Liga Mistrzów UEFA: 2013/2014, 2015/2016, 2016/2017
\item Mistrzostwo Hiszpanii: 2006/2007, 2007/2008, 2011/2012, 2016/2017
\item Puchar Hiszpanii: 2010/2011, 2013/2014
\item Superpuchar Hiszpanii: 2008, 2012, 2017
\end{itemize}
\end{frame}

\begin{frame}{Reprezentacja}
\begin{itemize}
\item Mistrzostwo Europy U-19 2004  Złoto
\item Mistrzostwo Europy 2008  Złoto
\item Puchar Konfederacji: 2009 Brąz
\item Mistrzostwo Świata 2010 Złoto
\item Mistrzostwo Europy 2012 Złoto
\item Puchar Konfederacji: 2013 Srebro
\end{itemize}
\end{frame}

\begin{frame}{Indywidualne}
\begin{itemize}
\item Najlepszy zawodnik La Liga poniżej 20. roku życia według UEFA: 2005
\item Najlepszy obrońca na świecie poniżej 20. roku życia według UEFA: 2006
\item Don Balón Award: 2005
\item Jedenastka Roku według ESM: 2008, 2012
\item FIFPro World XI: 2008, 2011, 2012, 2013, 2014
\item Drużyna Roku UEFA: 2008, 2012, 2013, 2014
\item Antonio Puerta Award: 2008
\item Móstoles Sports Elite Award: 2009
\item Najlepszy zawodnik Mistrzostw Świata 2010 w RPA według Castrol Index
\item Jedenastka marzeń według FIFA podczas Mistrzostw Świata 2010 w RPA
\item Najlepszy zawodnik Mistrzostw Europy 2012 w Polsce i Ukrainie według Castrol Index
\item Drużyna marzeń według UEFA podczas Mistrzostw Europy 2012 w Polsce i Ukrainie
\item Najlepszy obrońca Primera División: 2012, 2013, 2014
\item Najlepszy zawodnik Klubowych Mistrzostw Świata: 2014
\item Drużyna sezonu Ligi Mistrzów: 2016/2017
\end{itemize}
\end{frame}

\section{Życie prywatne}
\begin{frame}{Prywatnie:}
\begin{itemize}
Piłkarz jest w związku z Pilar Rubio, hiszpańską reporterką. 6 maja 2014 na świat przyszedł Sergio Ramos Rubio, pierwsze dziecko pary. Agentem Sergia Ramosa jest jego brat, Rene.

\end{itemize}
\end{frame}

\end{document}


text:
Hello! Thank you for choosing to help contribute to one of the SendGrid open source projects. There are many ways you can contribute and help is always welcome.  We merely ask that you follow the following contribution policies.

- [Improvements to the Codebase](#improvements-to-the-codebase)
- [Understanding the Code Base](#understanding-the-codebase)
- [Testing](#testing)
- [Style Guidelines & Naming Conventions](#style-guidelines-and-naming-conventions)
- [Creating a Pull Request](#creating-a-pull-request)
- [Code Reviews](#code-reviews)

## Improvements to the Codebase

We welcome direct contributions to the php-http-client code base. Thank you!

### Development Environment ###

#### Install and Run Locally ####

##### Prerequisites #####

- PHP version 7.3, 7.4, 8.0, or 8.1
- [Composer](https://getcomposer.org/)

##### Initial setup: #####

```bash
git clone https://github.com/sendgrid/php-http-client.git
cd php-http-client
```

### Environment Variables

First, get your free SendGrid account [here](https://sendgrid.com/free?source=php-http-client).

Next, update your environment with your [SENDGRID_API_KEY](https://app.sendgrid.com/settings/api_keys).

```bash
echo "export SENDGRID_API_KEY='YOUR_API_KEY'" > sendgrid.env
echo "sendgrid.env" >> .gitignore
source ./sendgrid.env
```

##### Execute: #####

See the [examples folder](examples).

## Understanding the Code Base

**/examples**

Working examples that demonstrate usage.

**/test/unit**

Unit tests.

**/lib/SendGrid/Client.php**

An HTTP client with a fluent interface using method chaining and reflection. By returning `$this` on [__call](lib/Client.php#L576), we can dynamically build the URL using method chaining and [__call](lib/Client.php#L576) allows us to dynamically receive the method calls to achieve reflection.

This allows for the following mapping from a URL to a method chain:

`/api_client/{api_key_id}/version` maps to `client->api_client().->_($api_key_id)->version-><method>()` where <method> is a [HTTP verb](lib/Client.php#L210).

**/lib/SendGrid/Config.php**

Loads the environment variables.

## Testing

All PRs require passing tests before the PR will be reviewed.

All test files are in the [`/test/unit`](test/unit) directory.

For the purposes of contributing to this repo, please update the [`ClientTest.php`](test/unit/ClientTest.php) file with unit tests as you modify the code.

```bash
composer install
cd test/unit
../../vendor/bin/phpunit . --bootstrap bootstrap.php --filter test*
```

## Style Guidelines & Naming Conventions

Generally, we follow the style guidelines as suggested by the official language. However, we ask that you conform to the styles that already exist in the library. If you wish to deviate, please explain your reasoning.

- [pear coding standards](https://pear.php.net/manual/en/standards.php)

Please run your code through:

- [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)

## Creating a Pull Request

1. [Fork](https://help.github.com/fork-a-repo/) the project, clone your fork,
   and configure the remotes:

   ```bash
   # Clone your fork of the repo into the current directory
   git clone https://github.com/sendgrid/php-http-client
   # Navigate to the newly cloned directory
   cd php-http-client
   # Assign the original repo to a remote called "upstream"
   git remote add upstream https://github.com/sendgrid/php-http-client
   ```

2. If you cloned a while ago, get the latest changes from upstream:

   ```bash
   git checkout <dev-branch>
   git pull upstream <dev-branch>
   ```

3. Create a new topic branch (off the main project development branch) to
   contain your feature, change, or fix:

   ```bash
   git checkout -b <topic-branch-name>
   ```

4. Commit your changes in logical chunks. Please adhere to these [git commit
   message guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)
   or your code is unlikely be merged into the main project. Use Git's
   [interactive rebase](https://help.github.com/articles/interactive-rebase)
   feature to tidy up your commits before making them public.

4a. Create tests.

4b. Create or update the example code that demonstrates the functionality of this change to the code.

5. Locally merge (or rebase) the upstream development branch into your topic branch:

   ```bash
   git pull [--rebase] upstream main
   ```

6. Push your topic branch up to your fork:

   ```bash
   git push origin <topic-branch-name>
   ```

7. [Open a Pull Request](https://help.github.com/articles/using-pull-requests/)
    with a clear title and description against the `main` branch. All tests must be passing before we will review the PR.

## Code Reviews
If you can, please look at open PRs and review them. Give feedback and help us merge these PRs much faster! If you don't know how, Github has some great [information on how to review a Pull Request](https://help.github.com/articles/about-pull-request-reviews/).


text:
XCTAssertNoThrow((expr))

#import "EXPExpect+Test.h"

#import <malloc/malloc.h>
#import <objc/runtime.h>

SpecBegin(FBExampleView)

__block CGRect frame = CGRectMake(0, 0, 64, 64);
__block NSFileManager *fileManager = [[NSFileManager alloc] init];
__block NSString *imagesDirectory = [NSString stringWithFormat:@"%s/%@", FB_REFERENCE_IMAGE_DIR, @"FBExampleViewSpec"];

describe(@"snapshots", ^{

    dispatch_block_t deleteSnapshots = ^{
        NSArray *files = [fileManager contentsOfDirectoryAtPath:imagesDirectory error:nil];
        for (NSString *file in files) {
            NSString *fullPath = [imagesDirectory stringByAppendingPathComponent:file];
            [fileManager removeItemAtPath:fullPath error:nil];
        }
    };

    beforeEach(deleteSnapshots);
    afterAll(deleteSnapshots);

    describe(@"with a view", ^{
        __block FBExampleView *view;

        beforeEach(^{
            view = [[FBRedView alloc] initWithFrame:frame];
        });

        describe(@"recording", ^{
            it(@"named", ^{
                expect(view).toNot.recordSnapshotNamed(@"view 1"); // Using "toNot" because recording always causes the test to fail.
                NSString *imageName = [[fileManager contentsOfDirectoryAtPath:imagesDirectory error:nil] firstObject];
                expect(imageName).to.contain(@"view 1");
            });

            it(@"unnamed", ^{
                expect(view).toNot.recordSnapshot();
                NSString *imageName = [[fileManager contentsOfDirectoryAtPath:imagesDirectory error:nil] firstObject];
                expect(imageName).to.contain(@"snapshots_with_a_view_recording_unnamed");
            });
        });

        describe(@"matching", ^{
            describe(@"named", ^{
                it(@"matches view", ^{
                    expect(view).toNot.recordSnapshotNamed(@"view 2");
                    expect(view).to.haveValidSnapshotNamed(@"view 2");
                });

                it(@"doesn't match if file doesn't exist", ^{
                    expect(view).toNot.haveValidSnapshotNamed(@"nonexistent image");
                });

                it(@"doesn't match if files differ", ^{
                    expect(view).toNot.recordSnapshotNamed(@"view 3");
                    UIView *newView = [[FBBlueView alloc] initWithFrame:frame];
                    expect(newView).toNot.haveValidSnapshotNamed(@"view 3");
                });
            });

            describe(@"unnamed", ^{
                it(@"matches view", ^{
                    expect(view).toNot.recordSnapshot();
                    expect(view).to.haveValidSnapshot();
                });

                it(@"doesn't match if file doesn't exist", ^{
                    expect(view).toNot.haveValidSnapshot();
                });

                it(@"doesn't match if files differ", ^{
                    expect(view).toNot.recordSnapshot();
                    UIView *newView = [[FBBlueView alloc] initWithFrame:frame];
                    expect(newView).toNot.haveValidSnapshot();
                });
            });
        });
    });

    describe(@"with a view controller", ^{
        __block FBViewController *controller;

        before(^{
            controller = [[FBRedViewController alloc] init];
            controller.view.frame = frame;
        });

        describe(@"recording", ^{
            it(@"named", ^{
                expect(controller).toNot.recordSnapshotNamed(@"view controller 1");
                expect(controller.viewWillAppearCalled).to.beTruthy();
                expect(controller.viewDidAppearCalled).to.beTruthy();
                NSString *imageName = [[fileManager contentsOfDirectoryAtPath:imagesDirectory error:nil] firstObject];
                expect(imageName).to.contain(@"view controller 1");
            });

            it(@"unnamed", ^{
                expect(controller).toNot.to.recordSnapshot();
                expect(controller.viewWillAppearCalled).to.beTruthy();
                expect(controller.viewDidAppearCalled).to.beTruthy();
                NSString *imageName = [[fileManager contentsOfDirectoryAtPath:imagesDirectory error:nil] firstObject];
                expect(imageName).to.contain(@"snapshots_with_a_view_controller_recording_unnamed");
            });
        });

        describe(@"matching", ^{

            describe(@"named", ^{
                it(@"matches view controller", ^{
                    expect(controller).toNot.recordSnapshotNamed(@"view controller 2");

                    FBViewController *newVC = [[FBRedViewController alloc] init];
                    newVC.view.frame = frame;
                    expect(newVC).to.haveValidSnapshotNamed(@"view controller 2");
                    expect(newVC.viewWillAppearCalled).to.beTruthy();
                    expect(newVC.viewDidAppearCalled).to.beTruthy();
                });

                it(@"doesn't match if file doesn't exist", ^{
                    expect(controller).toNot.haveValidSnapshotNamed(@"nonexistent image");
                    expect(controller.viewWillAppearCalled).to.beTruthy();
                    expect(controller.viewDidAppearCalled).to.beTruthy();
                });

                it(@"doesn't match if files differ", ^{
                    expect(controller).toNot.recordSnapshotNamed(@"view controller 3");

                    FBViewController *newVC = [[FBBlueViewController alloc] init];
                    newVC.view.frame = frame;
                    expect(newVC).toNot.haveValidSnapshotNamed(@"view controller 3");
                    expect(newVC.viewWillAppearCalled).to.beTruthy();
                    expect(newVC.viewDidAppearCalled).to.beTruthy();
                });
            });

            describe(@"unnamed", ^{
                it(@"matches view controller", ^{
                    expect(controller).toNot.recordSnapshot();

                    FBViewController *newVC = [[FBRedViewController alloc] init];
                    newVC.view.frame = frame;
                    expect(newVC).to.haveValidSnapshot();
                    expect(newVC.viewWillAppearCalled).to.beTruthy();
                    expect(newVC.viewDidAppearCalled).to.beTruthy();
                });

                it(@"doesn't match if file doesn't exist", ^{
                    expect(controller).toNot.haveValidSnapshot();
                    expect(controller.viewWillAppearCalled).to.beTruthy();
                    expect(controller.viewDidAppearCalled).to.beTruthy();
                });

                it(@"doesn't match if files differ", ^{
                    expect(controller).toNot.recordSnapshot();

                    FBViewController *newVC = [[FBBlueViewController alloc] init];
                    newVC.view.frame = frame;
                    expect(newVC).toNot.haveValidSnapshot();
                    expect(newVC.viewWillAppearCalled).to.beTruthy();
                    expect(newVC.viewDidAppearCalled).to.beTruthy();
                });
            });

        });

        it(@"Raises when a nil is passed in", ^{
            expect(^{
                [expect(nil) test].to.haveValidSnapshot() ;
            }).to.raise(@"Nil was passed into haveValidSnapshot. snapshots_with_a_view_controller_Raises_when_a_nil_is_passed_in");
        });
    });

  describe(@"device agnostic", ^{

    __block FBViewController *controller;

    before(^{
      controller = [[FBRedViewController alloc] init];
      controller.view.frame = frame;
      [Expecta setDeviceAgnostic:TRUE];
    });

    after(^{
      [Expecta setDeviceAgnostic:FALSE];
    });

    describe(@"recording", ^{

      it(@"named", ^{
        expect(controller).toNot.recordSnapshotNamed(@"view controller 1");
        expect(controller.viewWillAppearCalled).to.beTruthy();
        expect(controller.viewDidAppearCalled).to.beTruthy();
        NSString *imageName = [[fileManager contentsOfDirectoryAtPath:imagesDirectory error:nil] firstObject];
        expect(imageName).to.contain(@"view controller 1");
      });

      it(@"unnamed", ^{
        expect(controller).toNot.recordSnapshot();
        expect(controller.viewWillAppearCalled).to.beTruthy();
        expect(controller.viewDidAppearCalled).to.beTruthy();
        NSString *imageName = [[fileManager contentsOfDirectoryAtPath:imagesDirectory error:nil] firstObject];
        NSString *expectedImageName = FBFileNameIncludeNormalizedFileNameFromOption(@"snapshots_device_agnostic_recording_unnamed", 0);
        expect(imageName).to.contain(expectedImageName);
      });

    });

    describe(@"unnamed", ^{

      describe(@"named", ^{

        it(@"matches view controller", ^{
          expect(controller).toNot.recordSnapshotNamed(@"view controller 2");

          FBViewController *newVC = [[FBRedViewController alloc] init];
          newVC.view.frame = frame;
          expect(newVC).to.haveValidSnapshotNamed(@"view controller 2");
          expect(newVC.viewWillAppearCalled).to.beTruthy();
          expect(newVC.viewDidAppearCalled).to.beTruthy();
        });

      });

      it(@"matches view controller", ^{
        expect(controller).toNot.recordSnapshot();

        FBViewController *newVC = [[FBRedViewController alloc] init];
        newVC.view.frame = frame;
        expect(newVC).to.haveValidSnapshot();
        expect(newVC.viewWillAppearCalled).to.beTruthy();
        expect(newVC.viewDidAppearCalled).to.beTruthy();
      });

    });

  });

    describe(@"with tolerance", ^{
        __block FBExampleView *view;

        before(^{
            view = [[FBRedView alloc] initWithFrame:frame];
            expect(view).toNot.recordSnapshot();

            CGAffineTransform scale = CGAffineTransformMakeScale(0.5, 0.5);
            CGRect rect = CGRectApplyAffineTransform(frame, scale);
            FBBlueView *blueView = [[FBBlueView alloc] initWithFrame:rect];
            [view addSubview:blueView];
        });

        it(@"matches if tolerance is enough", ^{
            expect(view).to.haveValidSnapshotWithTolerance(0.25);
        });

        it(@"does not match if tolerance is not enough", ^{
            expect(view).toNot.haveValidSnapshotWithTolerance(0.24);
        });
    });

    it(@"matches view with 256 bytes aligned pointer", ^{
        Class viewClass = [UIView class];
        size_t viewInstanceSize = class_getInstanceSize(viewClass);
        void *ptr = calloc(255 + viewInstanceSize, 1);
        void *alignedPtr = nil;

        for (int i = 0; i < 256; ++i) {
            signed char ptrVal = (signed char)(ptr + i);

            if (ptrVal == 0) {
                alignedPtr = ptr + i;
            }
        }

        UIView *view;

        @autoreleasepool {
            if (alignedPtr) {
                id result = (__bridge_transfer id)alignedPtr;
                object_setClass(result, viewClass);

                view = [result initWithFrame:frame];
                CFRetain((__bridge CFTypeRef)view); // prevent ARC from deallocation
            }

            expect(view).toNot.recordSnapshot();
            expect(view).to.haveValidSnapshot();

//            [view dealloc]; // should be called manually
        }

        free(ptr);
    });
});

SpecEnd


text:
mod date_and_time;
mod numeric;

use super::connection::SqliteValue;
use super::Sqlite;
use crate::deserialize::{self, FromSql};
use crate::query_builder::QueryId;
use crate::serialize::{self, IsNull, Output, ToSql};
use crate::sql_types;
use crate::sql_types::SqlType;

/// The returned pointer is *only* valid for the lifetime to the argument of
/// `from_sql`. This impl is intended for uses where you want to write a new
/// impl in terms of `String`, but don't want to allocate. We have to return a
/// raw pointer instead of a reference with a lifetime due to the structure of
/// `FromSql`
#[cfg(feature = "sqlite")]
impl FromSql<sql_types::VarChar, Sqlite> for *const str {
    fn from_sql(value: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        let text = value.read_text();
        Ok(text as *const _)
    }
}

/// The returned pointer is *only* valid for the lifetime to the argument of
/// `from_sql`. This impl is intended for uses where you want to write a new
/// impl in terms of `Vec<u8>`, but don't want to allocate. We have to return a
/// raw pointer instead of a reference with a lifetime due to the structure of
/// `FromSql`
#[cfg(feature = "sqlite")]
impl FromSql<sql_types::Binary, Sqlite> for *const [u8] {
    fn from_sql(bytes: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        let bytes = bytes.read_blob();
        Ok(bytes as *const _)
    }
}

#[cfg(feature = "sqlite")]
impl FromSql<sql_types::SmallInt, Sqlite> for i16 {
    fn from_sql(value: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        Ok(value.read_integer() as i16)
    }
}

#[cfg(feature = "sqlite")]
impl FromSql<sql_types::Integer, Sqlite> for i32 {
    fn from_sql(value: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        Ok(value.read_integer())
    }
}

#[cfg(feature = "sqlite")]
impl FromSql<sql_types::Bool, Sqlite> for bool {
    fn from_sql(value: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        Ok(value.read_integer() != 0)
    }
}

#[cfg(feature = "sqlite")]
impl FromSql<sql_types::BigInt, Sqlite> for i64 {
    fn from_sql(value: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        Ok(value.read_long())
    }
}

#[cfg(feature = "sqlite")]
impl FromSql<sql_types::Float, Sqlite> for f32 {
    fn from_sql(value: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        Ok(value.read_double() as f32)
    }
}

#[cfg(feature = "sqlite")]
impl FromSql<sql_types::Double, Sqlite> for f64 {
    fn from_sql(value: SqliteValue<'_, '_, '_>) -> deserialize::Result<Self> {
        Ok(value.read_double())
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::Bool, Sqlite> for bool {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        let int_value = if *self { &1 } else { &0 };
        <i32 as ToSql<sql_types::Integer, Sqlite>>::to_sql(int_value, out)
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::Text, Sqlite> for str {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        out.set_value(self);
        Ok(IsNull::No)
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::Binary, Sqlite> for [u8] {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        out.set_value(self);
        Ok(IsNull::No)
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::SmallInt, Sqlite> for i16 {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        out.set_value(*self as i32);
        Ok(IsNull::No)
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::Integer, Sqlite> for i32 {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        out.set_value(*self);
        Ok(IsNull::No)
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::BigInt, Sqlite> for i64 {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        out.set_value(*self);
        Ok(IsNull::No)
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::Float, Sqlite> for f32 {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        out.set_value(*self as f64);
        Ok(IsNull::No)
    }
}

#[cfg(feature = "sqlite")]
impl ToSql<sql_types::Double, Sqlite> for f64 {
    fn to_sql<'b>(&'b self, out: &mut Output<'b, '_, Sqlite>) -> serialize::Result {
        out.set_value(*self);
        Ok(IsNull::No)
    }
}

/// The SQLite timestamp with time zone type
///
/// ### [`ToSql`] impls
///
/// - [`chrono::NaiveDateTime`] with `feature = "chrono"`
/// - [`chrono::DateTime`] with `feature = "chrono"`
/// - [`time::PrimitiveDateTime`] with `feature = "time"`
/// - [`time::OffsetDateTime`] with `feature = "time"`
///
/// ### [`FromSql`] impls
///
/// - [`chrono::NaiveDateTime`] with `feature = "chrono"`
/// - [`chrono::DateTime`] with `feature = "chrono"`
/// - [`time::PrimitiveDateTime`] with `feature = "time"`
/// - [`time::OffsetDateTime`] with `feature = "time"`
///
/// [`ToSql`]: crate::serialize::ToSql
/// [`FromSql`]: crate::deserialize::FromSql
#[cfg_attr(
    feature = "chrono",
    doc = " [`chrono::NaiveDateTime`]: chrono::naive::NaiveDateTime"
)]
#[cfg_attr(
    not(feature = "chrono"),
    doc = " [`chrono::NaiveDateTime`]: https://docs.rs/chrono/0.4.19/chrono/naive/struct.NaiveDateTime.html"
)]
#[cfg_attr(feature = "chrono", doc = " [`chrono::DateTime`]: chrono::DateTime")]
#[cfg_attr(
    not(feature = "chrono"),
    doc = " [`chrono::DateTime`]: https://docs.rs/chrono/0.4.19/chrono/struct.DateTime.html"
)]
#[cfg_attr(
    feature = "time",
    doc = " [`time::PrimitiveDateTime`]: time::PrimitiveDateTime"
)]
#[cfg_attr(
    not(feature = "time"),
    doc = " [`time::PrimitiveDateTime`]: https://docs.rs/time/0.3.9/time/struct.PrimitiveDateTime.html"
)]
#[cfg_attr(
    feature = "time",
    doc = " [`time::OffsetDateTime`]: time::OffsetDateTime"
)]
#[cfg_attr(
    not(feature = "time"),
    doc = " [`time::OffsetDateTime`]: https://docs.rs/time/0.3.9/time/struct.OffsetDateTime.html"
)]
#[derive(Debug, Clone, Copy, Default, QueryId, SqlType)]
#[diesel(sqlite_type(name = "Text"))]
#[cfg(feature = "sqlite")]
pub struct Timestamptz;


text:
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class com_rhomobile_rhodes_file_RhoFileApi */

#ifndef _Included_com_rhomobile_rhodes_file_RhoFileApi
#define _Included_com_rhomobile_rhodes_file_RhoFileApi
#ifdef __cplusplus
extern "C" {
#endif
#undef com_rhomobile_rhodes_file_RhoFileApi_MAX_SIZE
#define com_rhomobile_rhodes_file_RhoFileApi_MAX_SIZE 2097152L
/*
 * Class:     com_rhomobile_rhodes_file_RhoFileApi
 * Method:    nativeInitPath
 * Signature: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
 */
JNIEXPORT void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInitPath
  (JNIEnv *, jclass, jstring, jstring, jstring);

/*
 * Class:     com_rhomobile_rhodes_file_RhoFileApi
 * Method:    nativeInit
 * Signature: ()V
 */
JNIEXPORT void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_nativeInit
  (JNIEnv *, jclass);

/*
 * Class:     com_rhomobile_rhodes_file_RhoFileApi
 * Method:    updateStatTable
 * Signature: (Ljava/lang/String;Ljava/lang/String;JJ)V
 */
JNIEXPORT void JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_updateStatTable
  (JNIEnv *, jclass, jstring, jstring, jlong, jlong);

/*
 * Class:     com_rhomobile_rhodes_file_RhoFileApi
 * Method:    normalizePath
 * Signature: (Ljava/lang/String;)Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_normalizePath
  (JNIEnv *, jclass, jstring);

/*
 * Class:     com_rhomobile_rhodes_file_RhoFileApi
 * Method:    absolutePath
 * Signature: (Ljava/lang/String;)Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_absolutePath
  (JNIEnv *, jclass, jstring);

/*
 * Class:     com_rhomobile_rhodes_file_RhoFileApi
 * Method:    needEmulate
 * Signature: (Ljava/lang/String;)Z
 */
JNIEXPORT jboolean JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_needEmulate
  (JNIEnv *, jclass, jstring);

/*
 * Class:     com_rhomobile_rhodes_file_RhoFileApi
 * Method:    makeRelativePath
 * Signature: (Ljava/lang/String;)Ljava/lang/String;
 */
JNIEXPORT jstring JNICALL Java_com_rhomobile_rhodes_file_RhoFileApi_makeRelativePath
  (JNIEnv *, jclass, jstring);

#ifdef __cplusplus
}
#endif
#endif


text:
package com.terremark.api;

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

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;

/**
 *

 * Java class for PerformanceStatistics complex type.
 *

 * The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType name="PerformanceStatistics">
 *   <complexContent>
 *     <extension base="{}Resource">
 *       <sequence>
 *         <element name="StartTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         <element name="EndTime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         <element name="VirtualMachines" type="{}VirtualMachinePerformanceStatistics" minOccurs="0"/>
 *       </sequence>
 *     </extension>
 *   </complexContent>
 * </complexType>
 *

 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "PerformanceStatistics", propOrder = {"startTime", "endTime", "virtualMachines"})
@javax.xml.bind.annotation.XmlRootElement(name = "PerformanceStatistics")
public final class PerformanceStatistics extends Resource {

    @XmlElement(name = "StartTime")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar startTime;
    @XmlElement(name = "EndTime")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar endTime;
    @XmlElementWrapper(name = "VirtualMachines")
    @XmlElement(name = "VirtualMachine")
    protected List<VirtualMachinePerformanceStatistic> virtualMachines;

    /**
     * Gets the value of the startTime property.
     *
     * @return possible object is {@link XMLGregorianCalendar }
     */
    public XMLGregorianCalendar getStartTime() {
        return startTime;
    }

    /**
     * Sets the value of the startTime property.
     *
     * @param value allowed object is {@link XMLGregorianCalendar }
     */
    public void setStartTime(final XMLGregorianCalendar value) {
        this.startTime = value;
    }

    /**
     * Gets the value of the endTime property.
     *
     * @return possible object is {@link XMLGregorianCalendar }
     */
    public XMLGregorianCalendar getEndTime() {
        return endTime;
    }

    /**
     * Sets the value of the endTime property.
     *
     * @param value allowed object is {@link XMLGregorianCalendar }
     */
    public void setEndTime(final XMLGregorianCalendar value) {
        this.endTime = value;
    }

    public List<VirtualMachinePerformanceStatistic> getVirtualMachines() {
        if (virtualMachines == null) {
            virtualMachines = new ArrayList<VirtualMachinePerformanceStatistic>();
        }
        return virtualMachines;
    }
}


text:
<title>Berkeley DB Reference Guide: Release 4.1: DB_ENV->memp_sync</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">

Berkeley DB Reference Guide:
Upgrading Berkeley DB Applications

Release 4.1: DB_ENV->memp_sync

Historical documentation for the DB_ENV->memp_sync method stated:

In addition, if DB_ENV->memp_sync returns success, the value of
lsn will be overwritten with the largest log sequence number
from any page that was written by DB_ENV->memp_sync to satisfy this
request.

This functionality was never correctly implemented, and has been removed
in the Berkeley DB 4.1 release.  It is very unlikely application programs used
this information.  If your application used this information, please
contact us for help in upgrading.

Copyright (c) 1996,2008 Oracle.  All rights reserved.