text:
#define READ_BUF_SIZE               0xFFFF
#ifdef BSD
 #define AP_NEED_SET_MUTEX_PERMS    1
#endif

#ifdef _WIN32
 #include <windows.h>
 #include <sys/utime.h>
#else
 #include <pthread.h>      // pthread_create
 #include <dlfcn.h>        // dlopen

 #define HANDLE            void *
 #define HMODULE           HANDLE
 #define LPVOID            void *

 #define SOCKET            int
 #define INVALID_SOCKET    -1
 #include <utime.h>
#endif

#include "AnsiString.h"
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>

#ifdef _WIN32
 #include <io.h>
 #include <direct.h>

 #define pipe(phandles)    _pipe(phandles, 4096, _O_BINARY); setmode(phandles[0], _O_BINARY); setmode(phandles[1], _O_BINARY);
#else
 #include <sys/select.h>
 #include <netinet/tcp.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
 #define PIPE_TYPE    int
#endif

extern "C" {
#include <httpd.h>
#include <http_config.h>
#include <http_protocol.h>
#include <http_request.h>
#include <http_core.h>
#include <http_log.h>
#include <apr_strings.h>
#include <apr_optional.h>
#include <apr_lib.h>
#include <util_script.h>
#ifdef AP_NEED_SET_MUTEX_PERMS
 #include "unixd.h"
#endif
}

#include <map>
#include "semhh.h"

static std::map<unsigned long, void *> LocalBases;
HHSEM map_lock;

#ifdef _WIN32
 #define IPC_FILE_NAME    "logs/Mod_Concept_"
 #define IPC_FILE_LOCK    "logs/Mod_Concept_Lock"
 #define DO_ROOT(pool, file)    ap_server_root_relative(pool, file)
#else
 #define IPC_FILE_NAME    "/tmp/Mod_Concept_"
 #define IPC_FILE_LOCK    "/tmp/Mod_Concept_Lock"
 #define DO_ROOT(pool, file)    file
#endif

static int max_processes = 5;
static apr_global_mutex_t *global_mutex = 0;

static void GlobalLock() {
    if (global_mutex) {
        if (apr_global_mutex_lock(global_mutex) != APR_SUCCESS)
            fprintf(stderr, "mod_concept: error global locking\n");
    }
}

static void GlobalUnlock() {
    if (global_mutex) {
        if (apr_global_mutex_unlock(global_mutex) != APR_SUCCESS)
            fprintf(stderr, "mod_concept: error global unlocking\n");
    }
}

static const char *concept_parameters(cmd_parms *cmd, void *dummy, const char *arg) {
    max_processes = atoi(arg);
    return NULL;
}

static const command_rec concept_cmds[] = {
    AP_INIT_TAKE1("ConceptProcesses", (const char *(*)())concept_parameters, NULL, RSRC_CONF, "the maximum number of concurent processes per script"),
    { NULL }
};

int SetHeaders(const char *key, const char *value, request_rec *r) {
    if (!strcasecmp(key, "content-type"))
        ap_set_content_type(r, value);
    else
    if (!strcasecmp(key, "status")) {
        r->status = atoi(value);
    } else
        apr_table_set(r->headers_out, key, value);
    return 1;
}

struct WorkerBase {
#ifndef _WIN32
    char         stdin_base[0xFF];
    char         stdout_base[0xFF];
    char         backcomm_base[0xFF];
#endif
    char         initialized;
    int          stdin_pipe[2];
    int          stdout_pipe[2];
    int          backcomm_pipe[2];
    char         in_use;
    char         thread_ended;
    unsigned int remaining_sessions;
    // dummy
    const void   *reserved;
    const void   *reserved_apr;
};

#ifndef _WIN32
AnsiString Temp() {
    AnsiString s(getenv("tmp"));

    if (!s.Length())
        s = "/tmp";
    return s;
}

AnsiString fifo_pipe(int *p, unsigned int hash, long order, char *hint) {
    p[0] = 0;
    p[1] = 0;
    AnsiString s("/ConceptFIFO-");
    s += AnsiString(order);
    s += ".";

    char buf[0x20];
    buf[0] = 0;
    sprintf(buf, "%x", hash);
    s += buf;
    s += hint;
    s += ".tmp";

    AnsiString full_path = Temp() + s;
    unlink(full_path.c_str());
    mkfifo(full_path.c_str(), S_IWUSR | S_IRUSR);
    return s;
}

static void OpenBase(WorkerBase *Base) {
    AnsiString tmp = Temp();

    Base->stdout_pipe[0]   = open(tmp + Base->stdout_base, O_RDONLY);
    Base->stdout_pipe[1]   = Base->stdout_pipe[0];
    Base->stdin_pipe[0]    = open(tmp + Base->stdin_base, O_WRONLY);
    Base->stdin_pipe[1]    = Base->stdin_pipe[0];
    Base->backcomm_pipe[0] = open(tmp + Base->backcomm_base, O_RDONLY);
    Base->backcomm_pipe[1] = Base->backcomm_pipe[0];

    if (Base->stdout_pipe[0] <= 0)
        fprintf(stderr, "Error opening FIFO/stdout\n");
    if (Base->stdin_base[0] <= 0)
        fprintf(stderr, "Error opening FIFO/stdin\n");
    if (Base->backcomm_base[0] <= 0)
        fprintf(stderr, "Error opening FIFO/comm\n");
}

static void CloseBase(WorkerBase *Base) {
    close(Base->stdout_pipe[0]);
    close(Base->stdin_base[0]);
    close(Base->backcomm_base[0]);
}
#endif

static void InitBase(WorkerBase *Base, const void *filename, long order, unsigned int hash, void *apr_context) {
    Base->in_use             = 1;
    Base->thread_ended       = 0;
    Base->initialized        = 1;
    Base->remaining_sessions = 1;
#ifdef _WIN32
    pipe(Base->stdout_pipe);
    pipe(Base->backcomm_pipe);
    pipe(Base->stdin_pipe);
#else
    AnsiString temp = fifo_pipe(Base->stdout_pipe, hash, order, "stdout");
    memcpy(Base->stdout_base, temp.c_str(), temp.Length() + 1);
    temp = fifo_pipe(Base->backcomm_pipe, hash, order, "comm");
    memcpy(Base->backcomm_base, temp.c_str(), temp.Length() + 1);
    temp = fifo_pipe(Base->stdin_pipe, hash, order, "stdin");
    memcpy(Base->stdin_base, temp.c_str(), temp.Length() + 1);
#endif
    Base->reserved     = filename;
    Base->reserved_apr = apr_context;
}

static void DoneBase(WorkerBase *Base) {
    Base->in_use = 1;
#ifdef _WIN32
    close(Base->stdin_pipe[0]);
    close(Base->stdin_pipe[1]);
    close(Base->stdout_pipe[0]);
    close(Base->stdout_pipe[1]);
    close(Base->backcomm_pipe[0]);
    close(Base->backcomm_pipe[1]);
#else
    AnsiString tmp = Temp();
    unlink(tmp + Base->stdout_base);
    unlink(tmp + Base->stdin_base);
    unlink(tmp + Base->backcomm_base);
#endif
    Base->thread_ended = 1;
    apr_shm_t *t = (apr_shm_t *)Base->reserved_apr;
    memset(Base, 0, sizeof(WorkerBase));
    Base->remaining_sessions = 1;

    if (t)
        apr_shm_detach(t);
}

class WorkerProcess {
public:

    WorkerBase *Base;

    const void    *reserved;
    char          *headers;
    apr_shm_t     *dzone;
    int           headers_index;
    int           size;
    unsigned long outputsize;

    WorkerProcess(WorkerBase *_Base, apr_shm_t *m) {
        this->Base    = _Base;
        headers       = 0;
        headers_index = 0;
        size          = 0;
        reserved      = 0;
        outputsize    = 0;
        dzone         = m;
    }

    char GetEnded() {
        char res = 0;

        GlobalLock();
        res = Base->thread_ended;
        GlobalUnlock();
        return res;
    }

    char *HeaderEnd(char **dif, int *len) {
        *len = 0;
        *dif = 0;
        if (!headers)
            return 0;

        headers[headers_index] = 0;
        int  delta       = 2;
        int  empty_lines = 0;
        int  line_len    = 1;
        int  cached_len  = 0;
        char *end        = 0;
        for (int i = 0; i < headers_index; i++) {
            char c = headers[i];
            if (c == '\n') {
                if (!line_len) {
                    *len       = headers_index - i - 1;
                    *dif       = headers + i + 1;
                    headers[i] = 0;
                    break;
                } else
                    line_len = 0;
            } else
            if (c != '\r')
                line_len++;
        }
        return *dif;
    }

    void DoHeaders(request_rec *r) {
        char *ptr = headers;

        headers[headers_index] = 0;
        while ((ptr) && (*ptr)) {
            char *sep = strchr(ptr, ':');
            if (sep) {
                sep[0] = 0;
                sep++;
                // trim
                while (*sep == ' ')
                    sep++;
                char *nl = strchr(sep, '\n');
                if (nl) {
                    nl[0] = 0;
                    char *s2 = strchr(sep, '\r');
                    if (s2)
                        s2[0] = 0;
                }
                SetHeaders((const char *)ptr, (const char *)sep, r);
                if (nl) {
                    ptr = nl + 1;
                    while (*ptr == ' ')
                        ptr++;
                } else
                    break;
            } else
                break;
        }
    }

    void AddHeader(char *buffer, int size) {
        if (!headers)
            this->DoHeadersBuffer();
        if (headers_index + size < this->size) {
            memcpy(headers + headers_index, buffer, size);
            headers_index         += size;
            headers[headers_index] = 0;
        }
    }

    void DoHeadersBuffer(int size = READ_BUF_SIZE + 0xFF) {
        DoneHeaders();
        headers       = (char *)malloc(size + 1);
        headers[0]    = 0;
        headers_index = 0;
        this->size    = size;
    }

    void DoneHeaders() {
        if (headers) {
            free(headers);
            headers       = 0;
            size          = 0;
            headers_index = 0;
        }
    }

    ~WorkerProcess() {
#ifndef _WIN32
        CloseBase(Base);
#endif
        GlobalLock();
        Base->in_use = 0;
        GlobalUnlock();
        Base = 0;
        DoneHeaders();
        if (dzone) {
            apr_shm_detach(dzone);
            dzone = 0;
        }
    }
};

static AnsiString env_buffer;
static AnsiString HOME_PATH;

unsigned int murmur_hash(const void *key) {
    if (!key)
        return 0;
    int len = strlen((char *)key);
    if (!len)
        return 0;

    const unsigned int  m     = 0x5bd1e995;
    const int           r     = 24;
    unsigned int        seed  = 0x7870AAFF;
    const unsigned char *data = (const unsigned char *)key;
    //int len = strlen((const char *)data);
    if (!len)
        return 0;

    unsigned int h = seed ^ len;

    while (len >= 4) {
        unsigned int k = *(unsigned int *)data;

        k *= m;
        k ^= k >> r;
        k *= m;

        h *= m;
        h ^= k;

        data += 4;
        len  -= 4;
    }

    switch (len) {
        case 3:
            h ^= data[2] << 16;

        case 2:
            h ^= data[1] << 8;

        case 1:
            h ^= data[0];
            h *= m;
    }

    h ^= h >> 13;
    h *= m;
    h ^= h >> 15;
    return h;
}

static const char *lookup_header(const char *name, request_rec *r) {
    return apr_table_get(r->headers_in, name);
}

void EnvEmulator(request_rec *r, AnsiString& result) {
    result += "HTTP_USER_AGENT=";
    result += (char *)apr_table_get(r->headers_in, "User-Agent");
    result += "\nHTTP_REFERER=";
    result += (char *)apr_table_get(r->headers_in, "Referer");
    result += "\nHTTP_COOKIE=";
    result += (char *)apr_table_get(r->headers_in, "Cookie");
    result += "\nHTTP_FORWARDED=";
    result += (char *)apr_table_get(r->headers_in, "Forwarded");
    result += "\nHTTP_HOST=";
    result += (char *)apr_table_get(r->headers_in, "Host");
    result += "\nHTTP_PROXY_CONNECTION=";
    result += (char *)apr_table_get(r->headers_in, "Proxy-Connection");
    result += "\nHTTP_ACCEPT=";
    result += (char *)apr_table_get(r->headers_in, "Accept");
    result += "\nHTTP_ACCEPT_LANGUAGE=";
    result += (char *)apr_table_get(r->headers_in, "HTTP_ACCEPT_LANGUAGE");
    result += "\nHTTP_ACCEPT_ENCODING=";
    result += (char *)apr_table_get(r->headers_in, "HTTP_ACCEPT_ENCODING");
    result += "\nHTTP_ACCEPT_CHARSET=";
    result += (char *)apr_table_get(r->headers_in, "HTTP_ACCEPT_CHARSET");
    result += "\nHTTP_CONNECTION=";
    result += (char *)apr_table_get(r->headers_in, "HTTP_CONNECTION");
    result += "\nREDIRECT_HANDLER=";
    result += (char *)apr_table_get(r->subprocess_env, "REDIRECT_HANDLER");
    result += "\nREDIRECT_STATUS=";
    result += (char *)apr_table_get(r->subprocess_env, "REDIRECT_STATUS");
    result += "\nREQUEST_METHOD=";
    result += (char *)r->method;
    result += "\nREQUEST_SCHEME=";
    result += (char *)ap_http_scheme(r);
    result += "\nREQUEST_URI=";
    result += (char *)r->uri;
    result += "\nREQUEST_FILENAME=";
    result += (char *)r->filename;
    result += "\nREMOTE_ADDR=";
    result += (char *)r->connection->remote_ip;
    result += "\nREMOTE_IDENT=";
    result += (char *)ap_get_remote_logname(r);
    result += "\nREMOTE_USER=";
    result += (char *)r->user;
    result += "\nSERVER_ADMIN=";
    result += (char *)r->server->server_admin;
    result += "\nSERVER_NAME=";
    result += (char *)ap_get_server_name(r);
    result += "\nSERVER_PORT=";
    result += AnsiString((long)ap_get_server_port(r));
    result += "\nSERVER_PROTOCOL=";
    result += (char *)r->protocol;
    result += "\nSCRIPT_FILENAME=";
    result += (char *)r->filename;
    result += "\nSERVER_SIGNATURE=";
    result += (char *)apr_table_get(r->subprocess_env, "SERVER_SIGNATURE");
    result += "\nSERVER_ADDR=";
    result += (char *)apr_table_get(r->subprocess_env, "SERVER_ADDR");
    result += "\nSERVER_PORT=";
    result += (char *)apr_table_get(r->subprocess_env, "SERVER_PORT");
    result += "\nREMOTE_PORT=";
    result += (char *)apr_table_get(r->subprocess_env, "REMOTE_PORT");
    result += "\nREDIRECT_URL=";
    result += (char *)apr_table_get(r->subprocess_env, "REDIRECT_URL");
    result += "\nSCRIPT_NAME=";
    result += (char *)apr_table_get(r->subprocess_env, "SCRIPT_NAME");
    result += "\nSERVER_SOFTWARE=";
    result += (char *)ap_get_server_banner();
    result += (char *)" ConceptWEB Embedded";
    result += "\nQUERY_STRING=";
    result += (char *)r->args;
    result += "\nIS_SUBREQ=";
    result += (char *)(r->main != NULL ? "true" : "false");
    result += "\nDOCUMENT_ROOT=";
    result += (char *)ap_document_root(r);
    result += "\nAUTH_TYPE=";
    result += (char *)r->ap_auth_type;
    result += "\nTHE_REQUEST=";
    result += (char *)r->the_request;
    result += "\nPATH_INFO=";
    if ((r->path_info) && (r->path_info[0]))
        result += (char *)r->path_info;
    else
        result += (char *)r->uri;
    result += "\nPATH_TRANSLATED=";
    result += (char *)apr_table_get(r->subprocess_env, "PATH_TRANSLATED");
    result += "\nCONTENT_TYPE=";
    result += (char *)apr_table_get(r->subprocess_env, "CONTENT_TYPE");
    result += "\nGATEWAY_INTERFACE=CGI/1.1";
}

static apr_off_t get_content_length(request_rec *r) {
    apr_off_t len = 0;

    if (r->clength > 0)
        return r->clength;
    else if (r->main == NULL) {
        const char *clp = apr_table_get(r->headers_in, "Content-Length");

        if (clp) {
            char *errp;
            if (apr_strtoff(&len, clp, &errp, 10) || *errp || (len < 0))
                len = 0;
        }
    }

    return len;
}

int check_type(apr_bucket *bucket, char *what) {
    if (!bucket->type)
        return 0;
    int res = strncmp((char *)bucket->type, what, 3);
    return !res;
}

apr_off_t getPOST3(int fd, request_rec *r) {
    apr_size_t         len;
    apr_bucket_brigade *brigade;
    apr_off_t          count_bytes = get_content_length(r);

    if (count_bytes) {
        count_bytes += 8192;

        if (ap_setup_client_block(r, REQUEST_CHUNKED_DECHUNK) != OK) {
            fprintf(stderr, "mod_concept: Error reading client block\n");
            return 0;
        }
    } else
        return 0;

    char buf[4096];
    if (ap_should_client_block(r)) {
        while ((len = ap_get_client_block(r, buf, 4096)) > 0)
            write(fd, buf, len);
    }
    return count_bytes;
}

void Print(char *str, int length, request_rec *r, WorkerProcess *wp = 0) {
    if (r) {
        if (wp) {
            wp->outputsize += length;
            if ((length > 0) && (wp->headers)) {
                wp->AddHeader(str, length);
                char *dif;
                int  len;
                if (wp->HeaderEnd(&dif, &len)) {
                    wp->DoHeaders(r);
                    if ((len) && (dif))
                        ap_rwrite(dif, len, r);
                    wp->DoneHeaders();
                }
                return;
            }
        }
        if (length > 0) {
            ap_rwrite(str, length, r);
        } else
            ap_rputs(str, r);
    }
}

#ifdef _WIN32
extern "C" {
extern BOOL WINAPI SetDllDirectoryA(LPCTSTR lpathName);
}
#endif

AnsiString GetDirectory() {
#ifdef _WIN32
    char       tempPath[8192];
    char       file_buffer[8193];
    AnsiString tp_path;

    tempPath[0] = 0;

    if (GetTempPath(8192, tempPath) > 0)
        tp_path = tempPath;

    tp_path += "\\GetConceptDirectory.tmp";

    int res = system(AnsiString("HTTPModHelper.exe > \"") + AnsiString(tp_path) + "\"");
    if (res != 0xAB)
        fprintf(stderr, "mod_concept: cannot determine the Concept instalation path, code %i\n", res);
    char *path = getenv("CONCEPT_BIN_PATH");
    if (!path) {
        FILE *in = fopen(tp_path.c_str(), "rb");
        if (in) {
            int size = fread(file_buffer, 1, 8192, in);
            if (size > 0) {
                file_buffer[size] = 0;
                path = file_buffer;
            }
            fclose(in);
        }
    }
    unlink(tp_path.c_str());

    if (path) {
 #ifdef _WIN32
        SetDllDirectoryA(path);
 #endif
        return AnsiString(path);
    } else {
        fprintf(stderr, "mod_concept: cannot determine the Concept instalation path (no environment CONCEPT_BIN_PATH is set)\n", path);
        return AnsiString("");
    }
#else
    return LINUX_PATH;
#endif
}

void CreateWorker(WorkerBase *Base) {
#ifdef _WIN32
    AnsiString stdin_pipe((long)Base->stdin_pipe[0]);
    AnsiString stdout_pipe((long)Base->stdout_pipe[1]);
    AnsiString stderr_pipe((long)STDERR_FILENO);
    AnsiString comm_pipe((long)Base->stdin_pipe[0]);
    AnsiString backcomm_pipe((long)Base->backcomm_pipe[1]);
#else
    AnsiString stderr_pipe((long)STDERR_FILENO);
#endif
    char *path = HOME_PATH.c_str();
    semp(map_lock);
    LocalBases[(unsigned long)Base] = Base;
    semv(map_lock);
#ifdef _WIN32
    AnsiString reserved = (char *)"\"";
    reserved += (char *)Base->reserved;
    reserved += (char *)"\"";
    int res = _spawnl(_P_WAIT, path, (char *)reserved.c_str() /*Base->reserved*/, stdin_pipe.c_str(), stdout_pipe.c_str(), stderr_pipe.c_str(), comm_pipe.c_str(), backcomm_pipe.c_str(), 0);
#else
    int res = 0;

    /*pid_t pid = fork();
       if (pid < 0)
        fprintf(stderr, "%s", "mod_concept: error in fork()\n");
       else
       if (!pid) {
        execl(path, (char *)Base->reserved, Base->stdin_base, Base->stdout_base, stderr_pipe.c_str(), Base->stdin_base, Base->backcomm_base, 0);
       } else {
        waitpid(pid, &res, WNOHANG);
        res=WEXITSTATUS(res);
       }*/
    apr_proc_t proc;
    apr_pool_t *pool = 0;
    apr_pool_create(&pool, NULL);
    apr_status_t rv = apr_proc_fork(&proc, pool);
    if (rv == APR_INCHILD) {
        execl(path, (char *)Base->reserved, Base->stdin_base, Base->stdout_base, stderr_pipe.c_str(), Base->stdin_base, Base->backcomm_base, 0);
    } else
    if (rv == APR_INPARENT) {
        apr_proc_wait(&proc, &res, NULL, APR_WAIT);
    } else {
        fprintf(stderr, "%s", "mod_concept: error in fork()\n");
    }
    if (pool)
        apr_pool_destroy(pool);
#endif
    semp(map_lock);
    LocalBases.erase((unsigned long)Base);
    semv(map_lock);
    GlobalLock();
    Base->thread_ended = 1;
    GlobalUnlock();

    int is_used    = 1;
    int iterations = 0;
    while (is_used) {
        GlobalLock();
        is_used = Base->in_use;
        // ensure nobody uses it anymore
        if (!is_used)
            Base->in_use = 1;
        GlobalUnlock();
        if (is_used)
#ifdef _WIN32
            Sleep(300);
#else
            usleep(300000);
#endif
        iterations++;
        if (iterations > 3)
            break;
    }
    GlobalLock();
    DoneBase(Base);
    GlobalUnlock();
    if (res < 0)
        fprintf(stderr, "mod_concept: CGI handler '%s' returned error code %i\n", path, res);
}

#ifdef _WIN32
DWORD WINAPI ModExecuteT(LPVOID userdata) {
#else
LPVOID ModExecuteT(LPVOID userdata) {
#endif
    CreateWorker((WorkerBase *)userdata);
    return 0;
}

WorkerProcess *GetWorker(request_rec *r, unsigned int hash, const char *scriptname) {
    WorkerProcess *wp = 0;

    AnsiString file(IPC_FILE_NAME);
    char       buf[0xFF];

    buf[0] = 0;
    sprintf(buf, "%u", hash);
    file += buf;

    char *filename = DO_ROOT(r->pool, file.c_str());

    if (max_processes <= 0)
        max_processes = 5;

    apr_shm_t  *t          = 0;
    apr_shm_t  *target_ref = 0;
    apr_pool_t *pool       = r->server->process->pool;

    int ap_res = apr_shm_attach(&t, filename, pool);
    if (ap_res != APR_SUCCESS) {
        unlink(filename);
        ap_res = apr_shm_create(&t, sizeof(WorkerBase) * max_processes, filename, pool);
        if (ap_res != APR_SUCCESS) {
            ap_log_error(APLOG_MARK, APLOG_CRIT, ap_res, r->server, "mod_concept: error creating shared object '%s'", filename);
            //fprintf(stderr, "mod_concept: error creating shared memory buffer\n");
            return 0;
        } else {
            memset(apr_shm_baseaddr_get(t), 0, sizeof(WorkerBase) * max_processes);
        }
    }
    target_ref = t;

    WorkerBase *base      = 0;
    WorkerBase *base_init = 0;

    int iterations = 0;
    do {
        GlobalLock();
        WorkerBase *base_list = (WorkerBase *)apr_shm_baseaddr_get(t);
        for (int i = 0; i < max_processes; i++) {
            WorkerBase *iterator = &base_list[i];
            if ((iterator->initialized) && (!iterator->in_use) && (!iterator->thread_ended) && (iterator->remaining_sessions)) {
                base         = iterator;
                base->in_use = 1;
                break;
            }
        }
        GlobalUnlock();
        // alow to unlock if just terminated
        if (!base) {
            GlobalLock();
            for (int i = 0; i < max_processes; i++) {
                WorkerBase *iterator = &base_list[i];
                if (!iterator->initialized) {
                    base      = iterator;
                    base_init = iterator;
                    InitBase(base_init, scriptname, i, hash, target_ref);
                    base->in_use = 1;
                    // we don't want to dettach this one
                    target_ref = 0;
                    break;
                }
            }
            GlobalUnlock();
        }
        iterations++;
        if (!base) {
#ifdef _WIN32
            Sleep(50);
#else
            usleep(50000);
#endif
        }
    } while ((!base) && (iterations < 100));

    if (base_init) {
#ifdef _WIN32
        DWORD  threadID;
        HANDLE handle = CreateThread(NULL, 0, ModExecuteT, (LPVOID)base_init, 0, &threadID);
#else
        pthread_t threadID;
        pthread_create(&threadID, NULL, ModExecuteT, (LPVOID)base_init);
#endif
    }

    if (base) {
        wp           = new WorkerProcess(base, target_ref);
        wp->reserved = scriptname;
        return wp;
    }
    if (target_ref)
        apr_shm_detach(target_ref);
    return 0;
}

#ifndef _WIN32
int eof(int stream) {
    struct timeval timeout;

    timeout.tv_sec  = 0;
    timeout.tv_usec = 1;
    fd_set s;
    fd_set fds_exception;

    FD_ZERO(&s);
    FD_ZERO(&fds_exception);

    FD_SET(stream, &s);
    FD_SET(stream, &fds_exception);

    int val = select(stream + 1, &s, NULL, &fds_exception, &timeout);

    //if ((val<0) && (!errno))
    //    return 1;
    // error !
    if (val < 0)
        return -1;
    if (val) {
        if (FD_ISSET(stream, &s))
            return 0;
    }
    return 1;
}
#endif

int pipe_write(int f, char *buf, int size) {
    if (!size)
        return 0;

    int w_size = 4096;
    if (size < w_size)
        return write(f, buf, size);

    int res           = 0;
    int total_written = 0;
    while (size > 0) {
        int res_w = write(f, buf + total_written, w_size);
        if (res_w <= 0)
            return res_w;

        total_written += res_w;
        size          -= total_written;

        if (size < w_size)
            w_size = size;
    }
    return total_written;
}

int ModExecute(char *filename, request_rec *r) {
    char         run_result = -20;
    unsigned int hash       = murmur_hash(filename);

    if (!hash) {
        return -20;
    }

    WorkerProcess *wp = GetWorker(r, hash, apr_table_get(r->subprocess_env, "PATH_TRANSLATED"));

    if (wp) {
        GlobalLock();
        wp->Base->remaining_sessions = 0;
        GlobalUnlock();

        char *buf = (char *)malloc(READ_BUF_SIZE + 1);
#ifndef _WIN32
        OpenBase(wp->Base);
#endif
        int iterate = 1;
        // clean it
        while (eof(wp->Base->stdout_pipe[0]) == 0) {
            if (read(wp->Base->stdout_pipe[0], buf, READ_BUF_SIZE) <= 0) {
                iterate = 0;
                break;
            }
        }

        if ((iterate) && (wp->GetEnded()))
            iterate = 0;

        AnsiString env;
        EnvEmulator(r, env);
        env += (char *)"\nCONTENT_LENGTH=";
        env += AnsiString((long)get_content_length(r));
        env += (char *)"\n\n";

        if (iterate) {
            pipe_write(wp->Base->stdin_pipe[1], env.c_str(), env.Length());
            getPOST3(wp->Base->stdin_pipe[1], r);
        }

        int res   = 0;
        int clean = 0;

        wp->DoHeadersBuffer();
        unsigned int remaining_sessions = 1;
        while (iterate) {
            int read_op    = 0;
            int eof_result = eof(wp->Base->stdout_pipe[0]);
            if (eof_result < 0)
                break;
            while (!eof_result) {
                res = read(wp->Base->stdout_pipe[0], buf, READ_BUF_SIZE);
                if (res > 0) {
                    //if (res) {
                    read_op++;
                    buf[res] = 0;
                    Print(buf, res, r, wp);
                    //}
                } else {
                    fprintf(stderr, "mod_concept: Error in CGI/stdout (result=%i, errno=%i)\n", res, errno);
                    iterate = 0;
                    break;
                }
                eof_result = eof(wp->Base->stdout_pipe[0]);
                if (eof_result < 0)
                    break;

                if (wp->GetEnded()) {
                    free(buf);
                    delete wp;
                    return -1;
                }
            }

            if (eof_result < 0) {
                GlobalLock();
                wp->Base->remaining_sessions = 0;
                GlobalUnlock();
                iterate = 0;
                break;
            }

            if (eof_result) {
                eof_result = eof(wp->Base->backcomm_pipe[0]);
                if (eof_result < 0) {
                    GlobalLock();
                    wp->Base->remaining_sessions = 0;
                    GlobalUnlock();
                    break;
                }
                if (!eof_result) {
                    iterate = 0;
                    unsigned int total_size = 0;
                    res = read(wp->Base->backcomm_pipe[0], &total_size, sizeof(total_size));
                    if (res != sizeof(total_size)) {
                        GlobalLock();
                        wp->Base->remaining_sessions = 0;
                        GlobalUnlock();
                        break;
                    }

                    remaining_sessions = 1;
                    int res2 = read(wp->Base->backcomm_pipe[0], &remaining_sessions, sizeof(remaining_sessions));
                    if (res2 != sizeof(remaining_sessions)) {
                        GlobalLock();
                        wp->Base->remaining_sessions = 0;
                        GlobalUnlock();
                        break;
                    }
                    GlobalLock();
                    wp->Base->remaining_sessions = remaining_sessions;
                    GlobalUnlock();

                    if (res == sizeof(unsigned int)) {
                        run_result = 0;
                        //while ((!eof(wp->stdout_pipe[0])) || (wp->outputsize < total_size) || (!wp->outputsize)) {
                        eof_result = eof(wp->Base->stdout_pipe[0]);
                        if (eof_result < 0)
                            break;
                        while ((!eof_result) /* || (wp->outputsize < total_size)*/) {
                            if (wp->GetEnded())
                                break;
                            res = read(wp->Base->stdout_pipe[0], buf, sizeof(buf));
                            if (res <= 0)
                                break;
                            Print(buf, res, r, wp);
                            eof_result = eof(wp->Base->stdout_pipe[0]);
                            if (eof_result < 0)
                                break;
                        }
                    }
                    write(wp->Base->stdin_pipe[1], &remaining_sessions, sizeof(remaining_sessions));
                    clean = 1;
                    break;
                }
            }
            if (!read_op) {
                if (wp->GetEnded()) {
                    clean = 1;
                    break;
                }
#ifdef _WIN32
                Sleep(1);
#else
                usleep(1000);
#endif
            }
        }
        free(buf);
        if (run_result) {
            Print("<br /><b>ERROR :</b> Script reported errors.", -1, r);
        }
        if ((!clean) && (res <= 0)) {
            remaining_sessions = 0;
            write(wp->Base->stdin_pipe[1], &remaining_sessions, sizeof(remaining_sessions));
        }
        //if (!remaining_sessions)
        //    wp->Base->done_thread=-1;
        delete wp;
    } else {
        Print("<br /><b>ERROR :</b> Server is too busy. Please retry later.", -1, r);
        return HTTP_SERVICE_UNAVAILABLE;
    }

    const char *location = apr_table_get(r->headers_out, "Location");

    if (location && (location[0] == '/') && (r->status == 200)) {
        r->method        = apr_pstrdup(r->pool, "GET");
        r->method_number = M_GET;

        apr_table_unset(r->headers_in, "Content-Length");

        ap_internal_redirect_handler(location, r);
        return OK;
    } else if (location && (r->status == 200))     {
        return HTTP_MOVED_TEMPORARILY;
    }
    return 0;
}

int check_file(char *filename) {
    FILE *in = 0;

    //char *filename=getenv("PATH_TRANSLATED");
    in = fopen(filename, "rb");
    if (in) {
        fclose(in);
        return 1;
    }
    return 0;
}

#define CONCEPT_MAGIC_TYPE    "application/x-httpd-concept"

static void add_ssi_vars(request_rec *r) {
    apr_table_t *e = r->subprocess_env;

    if (r->path_info && (r->path_info[0] != '\0')) {
        request_rec *pa_req;

        apr_table_setn(e, "PATH_INFO", ap_escape_shell_cmd(r->pool,
                                                           r->path_info));

        pa_req = ap_sub_req_lookup_uri(ap_escape_uri(r->pool, r->path_info),
                                       r, NULL);
        if (pa_req->filename)
            apr_table_setn(e, "PATH_TRANSLATED",
                           apr_pstrcat(r->pool, pa_req->filename,
                                       pa_req->path_info, NULL));
        else {
            apr_table_setn(e, "PATH_TRANSLATED", r->filename);
            apr_table_setn(e, "PATH_INFO", r->uri);
        }
        ap_destroy_sub_req(pa_req);
    } else {
        apr_table_setn(e, "PATH_TRANSLATED", r->filename);
        apr_table_setn(e, "PATH_INFO", r->uri);
    }

    if (r->args) {
        char *arg_copy = apr_pstrdup(r->pool, r->args);

        apr_table_setn(e, "QUERY_STRING", r->args);
        ap_unescape_url(arg_copy);
        apr_table_setn(e, "QUERY_STRING_UNESCAPED",
                       ap_escape_shell_cmd(r->pool, arg_copy));
    }
}

static int mod_concept_method_handler(request_rec *r) {
    if (strcmp(r->handler, CONCEPT_MAGIC_TYPE))
        return DECLINED;

    if ((r->finfo.filetype == 0) || (!check_file(r->filename))) {
        fprintf(stderr, "script '%s' not found or unable to stat\n", r->uri);
        return HTTP_NOT_FOUND;
    }
    if (r->finfo.filetype == APR_DIR) {
        fprintf(stderr, "attempt to invoke directory '%s' as script\n", r->uri);
        return HTTP_FORBIDDEN;
    }

    ap_add_common_vars(r);
    ap_add_cgi_vars(r);
    add_ssi_vars(r);

    SetHeaders("Content-Type", "text/html", r);
    int res = ModExecute(r->filename, r);
    if (res < 0)
        fprintf(stderr, "mod_concept: Error executing script (%s), code: %i\n", r->filename, res);

    if (res > 0)
        return res;
    return OK;
}

static int concept_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp) {
    HOME_PATH = GetDirectory();
#ifdef _WIN32
    HOME_PATH += "concept-cgi.exe";
#else
    HOME_PATH += "conceptcgi";
#endif
    return OK;
}

static void concept_child_init(apr_pool_t *p, server_rec *s) {
    char *full_name = DO_ROOT(p, IPC_FILE_LOCK);

    if (!global_mutex) {
        int rv = apr_global_mutex_child_init(&global_mutex, full_name, p);
        if (rv != APR_SUCCESS)
            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "mod_concept: Failed to attach to mod_concept shared memory file '%s'", full_name);
    }
}

static int concept_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s) {
    void       *data         = NULL;
    const char *userdata_key = "mod_concept_post_config";

    apr_pool_userdata_get(&data, userdata_key, s->process->pool);
    if (data == NULL) {
        apr_pool_userdata_set((const void *)1, userdata_key, apr_pool_cleanup_null, s->process->pool);
        return OK; /* This would be the first time through */
    }
    if (!global_mutex) {
        char *full_name = DO_ROOT(ptemp, IPC_FILE_LOCK);
        unlink(full_name);
        int rv = apr_global_mutex_create(&global_mutex, full_name, APR_LOCK_DEFAULT, pconf);
        if (rv != APR_SUCCESS) {
            //fprintf(stderr, "mod_concept: error creating mutex object (%s)\n", full_name);
            ap_log_error(APLOG_MARK, APLOG_CRIT, rv, s, "mod_concept: error creating mutex object '%s'", full_name);
            return HTTP_INTERNAL_SERVER_ERROR;
        }
#ifdef AP_NEED_SET_MUTEX_PERMS
        unixd_set_global_mutex_perms(global_mutex);
#endif
    }
    return OK;
}

static apr_status_t destroy_pool(void *s) {
    // child done !
    std::map<unsigned long, void *>::iterator it;

    semp(map_lock);

    for (it = LocalBases.begin(); it != LocalBases.end(); it++) {
        WorkerBase *Base = (WorkerBase *)(*it).second;
        if (Base) {
            GlobalLock();
            DoneBase(Base);
            GlobalUnlock();
        }
    }
    semv(map_lock);

    semdel(map_lock);
    return APR_SUCCESS;
}

static void concept_apache_child_init(apr_pool_t *pool, server_rec *s) {
    seminit(map_lock, 1);
    apr_pool_cleanup_register(pool, s, destroy_pool, destroy_pool);
}

static void mod_concept_register_hooks(apr_pool_t *p) {
    // I think this is the call to make to register a handler for method calls (GET PUT et. al.).
    // We will ask to be last so that the comment has a higher tendency to
    // go at the end.
    ap_hook_pre_config(concept_pre_config, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(concept_child_init, NULL, NULL, APR_HOOK_REALLY_FIRST);
    ap_hook_post_config(concept_server_startup, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_handler(mod_concept_method_handler, NULL, NULL, APR_HOOK_MIDDLE);
    ap_hook_child_init(concept_apache_child_init, NULL, NULL, APR_HOOK_MIDDLE);
}

module AP_MODULE_DECLARE_DATA concept_module =
{
    // Only one callback function is provided.  Real
    // modules will need to declare callback functions for
    // server/directory configuration, configuration merging
    // and other tasks.
    STANDARD20_MODULE_STUFF,
    NULL,
    NULL,
    NULL,
    NULL,
    concept_cmds,
    mod_concept_register_hooks                          /* callback for registering hooks */
};

#ifdef _WIN32
// DLL Entry Point ... nothing ...
int WINAPI DllEntryPoint(HINSTANCE hinst, unsigned long reason, void *lpReserved) {
    return 1;
}
#endif

redpajama_set_name: RedPajamaGithub


text:
Archives Search
CHRAB
Archives Policies
State Archives Statute - Article 6
State Archives Statute - Article 72
Mission Statement, Services, and Functions
Colorado State Archives mission is safeguarding the administrative and documentary history of Colorado by managing, collecting, preserving, and providing access to state and local government records.
Records management, archives management and micrographics quality control are administrative functions provided to state and local government agencies in Colorado to ensure the preservation of Colorado's permanent legal and historical records. Information and research functions provide for citizen access to public records created by the legislative, executive and judicial branches of state government.
The Colorado State Archives is the legal repository for selected historical and contemporary records and information generated by state and local governments in Colorado. The National Association of Government Archives and Records Administration and the Council of State Governments have said that "state archives are the guardians of much of a state's public documentary heritage, resources essential in establishing a citizen's rights, understanding his past, coping with his present, and planning for his future. The value of a state archive stems from the information it contains and the evidence it provides. Its records are essential to administrative and cultural continuity."
Records Management/Records Disaster Recovery/Records Destruction Services
Employees from state and local government agencies can request assistance with records retention and disposition scheduling. By statute, the State Archives sets legal retention periods and disposition requirements for records created by over 240 state agencies, offices of the 64 counties, 280 municipalities, 176 school districts and 1400 special districts. The State Archives advises when and how public records may be transferred, destroyed or if they must be kept permanently. In addition, the State Archives can provide guidance in the recovery of damage to records from disasters. Please see our Records Management page for detailed information.
Micrographics/Optical Imaging and Disaster Recovery Services
Any agency of state or local government that microfilms or images its records may store the original at the State Archives for back-up or disaster recovery purposes at no cost. Guidelines on micrographics quality and optical imaging are available from our office.
Records Transfer and Storage Services
The State Archives serves as the legal repository for permanent records generated by state agencies. Records are transferred from state agencies in accordance with agency records retention schedules. Some records from local governments may be accepted for permanent storage on a very selective basis.
Research and Reference Services
The Colorado State Archives has a wealth of information for research and reference. We receive additional accessions periodically. We will respond to mail and phone requests but suggest that you conduct any extensive research at our facility whenever possible because of the voluminous nature of our collections. Records deposited at the Colorado State Archives are available for use subject to restrictions or limitations imposed by law, by executive order, by the agency from which they have been transferred, or by the State Archivist. The research and reference functions are cash funded activities of state government, hence fees for service apply. Please see Colorado Laws Concerning Public Records for more information about fees. The staff will assist researchers in identifying records that will assist them with their information needs and will retrieve records requested by researchers. Many original records may also be available for viewing in micrographic formats. Records must be used in the Research Room because they may be the only or definitive copy, and may not be withdrawn from the State Archives. There is also a pull limit of 10 boxes or record items during your visit, so please plan accordingly. The staff will make copies of records upon request. Please see our Public Records page for further descriptions of the records we have.
History of the Colorado State Archives
In 1943, the Colorado legislature created the position of State Archivist to oversee the retention and disposition of public records. The first State Archivist, Herbert O. Brayer, filled the office as a staff member of the Colorado State Historical Society. Dolores C. Renze, one of three women to hold such a position at the time, succeeded to the office in 1949, retaining the position until 1973. During her tenure, the State Archives and the Public Records became a division within the Historical Society. In 1959, the State Archives became independent of the Society. George E. Warren became State Archivist in 1974 and retired in 1987. Terry Ketelsen worked for the state for over 40 years and retired as State Archivist in 2012. George Orlowski became State Archivist in 2012 and retired in June 2016. Aly Jabrocki, current State Archivist, took the reign in November 2016.
The State Archives has been housed in four different state buildings during these years, including the old Woodward mansion at 1530 Sherman Street. Records were housed in tunnels under the capitol complex and in rented storage space in nearby buildings before its move into the Centennial building in 1976, where the State Archives now occupies the three lower floors. The State Archives also stores records in a satellite storage facility southeast of Denver near Simla, and a northern facility in Thornton, Colorado.
Colorado State Archives
1313 Sherman St., Room 1B-20
History Colorado
Colorado State Publications Library
Colorado Historic Newspapers
Department of Personnel & Administration
Division of Central Services
Colorado Official State Web Portal

redpajama_set_name: RedPajamaCommonCrawl


NASA wind tunnel with the model of a plane.
A model Cessna with helium-filled bubbles showing streamlines of the wingtip vortices.
A wind tunnel is a research tool used in aerodynamic research. It is used to study the effects of air moving past solid objects.
Wind tunnels were first proposed as a means of studying vehicles (primarily airplanes) in free flight. The wind tunnel was envisioned as a means of reversing the usual paradigm: instead of the air's standing still and the aircraft moving at speed through it, the same effect would be obtained if the aircraft stood still and the air moved at speed past it. In that way a stationary observer could study the aircraft in action, and could measure the aerodynamic forces being imposed on the aircraft.
Later, wind tunnel study came into its own: the effects of wind on manmade structures or objects needed to be studied, when buildings became tall enough to present large surfaces to the wind, and the resulting forces had to be resisted by the building's internal structure. Determining such forces was required before building codes could specify the required strength of such buildings.
Still later, wind-tunnel testing was applied to automobiles, not so much to determine aerodynamic forces per se but more to determine ways to reduce the power required to move the vehicle on roadways at a given speed. In these studies, the interaction between the road and the vehicle plays a significant role, and this interaction must be taken into consideration when interpreting the test results. In an actual situation the roadway is moving relative to the vehicle but the air is stationary relative to the roadway, but in the wind tunnel the air is moving relative to the roadway, while the roadway is stationary relative to the test vehicle. Some automotive-test wind tunnels have incorporated moving belts under the test vehicle in an effort to approximate the actual condition.
pressure distributions can also be conveniently measured by the use of pressure-sensitive pressure belts, a recent development in which multiple ultra-miniaturized pressure sensor modules are integrated into a flexible strip. The strip is attached to the aerodynamic surface with tape, and it sends signals depicting the pressure distribution along its surface.
pressure distributions on a test model can also be determined by performing a wake survey, in which either a single pitot tube is used to obtain multiple readings downstream of the test model, or a multiple-tube manometer is mounted downstream and all its readings are taken (often by photograph).
Sir George Cayley (1773-1857) also used a whirling arm to measure the drag and lift of various airfoils. His whirling arm was 5 feet long and attained top speeds between 10 and 20 feet per second.
However, the whirling arm does not produce a reliable flow of air impacting the test shape at a normal incidence. Centrifugal forces and the fact that the object is moving in its own wake mean that detailed examination of the airflow is difficult. Francis Herbert Wenham (1824-1908), a Council Member of the Aeronautical Society of Great Britain, addressed these issues by inventing, designing and operating the first enclosed wind tunnel in 1871. Once this breakthrough had been achieved, detailed technical data was rapidly extracted by the use of this tool. Wenham and his colleague Browning are credited with many fundamental discoveries, including the measurement of l/d ratios, and the revelation of the beneficial effects of a high aspect ratio.
Carl Rickard Nyberg used a wind tunnel when designing his Flugan from 1897 and onwards.
In a classic set of experiments, the Englishman Osborne Reynolds (1842-1912) of the University of Manchester demonstrated that the airflow pattern over a scale model would be the same for the full-scale vehicle if a certain flow parameter were the same in both cases. This factor, now known as the Reynolds Number, is a basic parameter in the description of all fluid-flow situations, including the shapes of flow patterns, the ease of heat transfer, and the onset of turbulence. This comprises the central scientific justification for the use of models in wind tunnels to simulate real-life phenomena. However, there are limitations on conditions in which dynamic similarity is based upon the Reynolds number alone.
Replica of the Wright brothers' wind tunnel.
Wind tunnels were often limited in the volume and speed of airflow which could be delivered.
For limited applications, Computational fluid dynamics (CFD) can augment or possibly replace the use of wind tunnels. For example, the experimental rocket plane SpaceShipOne was designed without any use of wind tunnels. However, on one test, flight threads were attached to the surface of the wings, performing a wind tunnel type of test during an actual flight in order to refine the computational model. It should be noted that, for situations where external turbulent flow is present, CFD is not practical due to limitations in present day computing resources. For example, an area that is still much too complex for the use of CFD is determining the effects of flow on and around structures, bridges, terrain, etc.
Fan blades of Langley Research Center's 16 foot transonic wind tunnel in 1990, before it was mothballed in 2004.
The airflow created by the fans that is entering the tunnel is itself highly turbulent due to the fan blade motion (when the fan is blowing air into the test section - when it is sucking air out of the test section downstream, the fan-blade turbulence is not a factor), and so is not directly useful for accurate measurements. The air moving through the tunnel needs to be relatively turbulence-free and laminar. To correct this problem, closely-spaced vertical and horizontal air vanes are used to smooth out the turbulent airflow before reaching the subject of the testing.
Lighting is usually recessed into the circular walls of the tunnel and shines in through windows. If the light were mounted on the inside surface of the tunnel in a conventional manner, the light bulb would generate turbulence as the air blows around it. Similarly, observation is usually done through transparent portholes into the tunnel. Rather than simply being flat discs, these lighting and observation windows may be curved to match the cross-section of the tunnel and further reduce turbulence around the window.
A typical lift coefficient versus angle of attack curve.
Because air is transparent it is difficult to directly observe the air movement itself. Instead, a smoke particulate or a fine mist of liquid is sprayed into the tunnel just ahead of the device being tested. The particulate is sufficiently low mass to stay suspended in the air without falling to the floor of the tunnel, and is light enough to easily move with the airflow.
If the air movement in the tunnel is sufficiently non-turbulent, a particle stream released into the airflow will not break up as the air moves along, but stays together as a sharp thin line. Multiple particle streams released from a grid of many nozzles can provide a dynamic three-dimensional shape of the airflow around the object being tested. As with the force balance, these injection pipes and nozzles need to be shaped in a manner that minimizes the introduction of turbulent airflow into the airstream.
Air is not always the best test medium to study small-scale aerodynamic principles, due to the speed of the air flow and airfoil movement. A study of fruit fly wings designed to understand how the wings produce lift was performed using a large tank of mineral oil and wings 100 times larger than actual size, in order to slow down the wing beats and make the vortices generated by the insect wings easier to see and understand.
In Wind Engineering, Wind Tunnel Tests are often used to measure the velocity around, and forces or pressures upon structures. Usually very tall buildings, buildings with unusual or complicated shapes (such as a tall building with a parabolic or a hyperbolic shape), cable suspension bridges or cable stayed bridges are analysed in specialized atmospheric boundary layer wind tunnels. These feature a long upwind section to accurately represent the wind speed and turbulence profile acting on the structure. Wind tunnel tests provide the necessary design pressure measurements for use in the dynamic analysis of the structure.
↑ Dodson, MG (2005). "An Historical and Applied Aerodynamic Study of the Wright Brothers' Wind Tunnel Test Program and Application to Successful Manned Flight". US Naval Academy Technical Report USNA-334, http://archive.rubicon-foundation.org/3585. Retrieved on 11 March 2009.
Test SLATE - Automated Test Software for Wind Tunnels and Similar Test Facilities - by JACOBS"


Irregular Choice Kids shoes have just as much charm as their adult equivalents, providing truly unique designs that make a real statement. The brand is known for their bold and incredibly detailed styling, making use of various patterns and embellishments in order to create some of the most fabulous and fun kids footwear on the market.
Discover our fantastic range of Irregular Choice Kids shoes today!


text:
All Rights ReservedView Desktop Version
Brace for Bay Bridge Pre-Thanksgiving Gridlock
It just might be the perfect storm on what is typically the busiest travel day of the year: the day before Thanksgiving.
Nearly half a million people are predicted to cross the Bay Bridge this Thanksgiving week, in the midst of the bridge deck rehabilitation project that has already snarled traffic in Anne Arundel and Queen Anne's Counties, on both sides of the bridge. The backups, which have stretched up to 12 miles at times, prompted Governor Larry Hogan to order transportation leaders to speed up the project to an earlier finish date.
As a result, the Maryland Transportation Authority (MDTA) explains, "To expedite the rehabilitation project, crews are working day and night, seven days a week, and will continue during Thanksgiving week."
The $27 million project requires the Bay Bridge westbound span's right lane to remain closed. MDTA explains that the deck surface of that lane has reached the end of its service life and is "severely deteriorated."
Ahead of the holiday, MDTA has been warning drivers of severe delays, recommending drivers add 20 to 30 minutes to their planned trip. To help ease congestion, cashless tolling will be in effect from 9 a.m. to 9 p.m. daily on Wednesday through Saturday.
"We're expecting nearly 465,000 vehicles to cross the Bay Bridge during the holiday week, and so we're urging travelers to go early, stay late, and cross the bridge during our recommended travel times, when we expect the least number of vehicles," said MDTA Executive Director Jim Ports.
MDTA released the following list of recommended times to cross the Bay Bridge during the Thanksgiving holiday:
Eastbound: Tuesday through Friday, November 26-29, before 9 a.m. and after 9 p.m. Monday, December 2, before noon and after 8 p.m.
Westbound: Tuesday and Wednesday, November 26-27, before 5 a.m. and after 6 p.m.Thursday through Sunday, November 28-December 1, before 9 a.m. and after 9 p.m. Monday, December 2, before 5 a.m. and after 2 p.m.
MDTA Police will continue to work with Maryland State Police and local police to monitor traffic flow on US 50 and parallel routes.
-Meg Walburn Viviano
NextSLIDESHOW: Baltimore's Inner Harbor Hosts Expanded Christmas Village »
Previous « Boatworks Fire Destroys $1 Million in Historic Boats
The plans to put offshore wind farms off the shores of Ocean City, Maryland have…
Weigh in on Md. Rockfish Recreational Limits
On Thursday, January 9, the Maryland Department of Natural Resources (DNR) will hold a public…
Boater's Body Pulled from Water in Annapolis
A man's body has been found in the water off of a marina in Annapolis,…
After more than a year of negotiations, a key Chesapeake Bay port and a regional Native American tribe have come…
Some anglers luck into setting records, and then there is the extremely small group of anglers who are obsessed with…
Maryland's Eastern Shore is known for many things: its crabs, its rural farm traditions, its idyllic waterfront landscape. But what…
This time next year, there will be a lot fewer plastic bags washing into the Baltimore harbor and out to…
The plans to put offshore wind farms off the shores of Ocean City, Maryland have grown increasingly controversial, and this…
Take Part in Restoring 1912 River Tug in St. Michaels
The Chesapeake Bay Maritime Museum's (CBMM) popular Apprentice for a Day program is offering historic boat enthusiasts a special opportunity…
Get Bay Bulletin


Mess-Free Chimney Sweeping Is A Trinity Chimney Service Specialty!
A fireplace or stove can be a real blessing on a cool, damp night. But if the chimney or stove pipe isn't clean and clear, the safety and efficiency of the attached appliance will suffer. You won't enjoy the level of performance you expect from your fireplace or stove and the safety of you and your family could be put at risk unnecessarily. The good news is, it's easy to keep your chimney/venting system clean with Trinity Chimney Service.
Our team specializes in the sweeping of chimneys, fireplaces, vents, and solid fuel-burning appliances to remove soot and light creosote deposits within the flue lining. While a standard sweeping will not remove glazed, caked, or layered creosote deposits, it can get rid of any other buildup or blockages. And if you're keeping up with chimney sweepings and making them a regular part of your home maintenance plan, glazed creosote shouldn't be a problem anyway.
When Should You Clean Your Chimney?
So when should you clean your chimney? The chimney liner should be swept annually if it is used once or more in a given year. If you use your fireplace or stove a lot, you may need to schedule cleanings more frequently.
One thing you can do is check for buildup yourself and schedule a cleaning anytime you have a soot accumulation of 1/8" or more and anytime you spot shiny, glazed creosote inside the flue. You can also schedule an inspection for a more thorough evaluation. We'll get a good look at the flue lining and let you know when we recommend a chimney cleaning.
Annual chimney sweepings can remove all of the buildup and blockages so that your chimney system stays in great condition and the attached appliance works as safely and as efficiently as it should.
What Can You Expect When Trinity Chimney Service Sweeps Your Chimney?
The team of Chimney Safety Institute of America (CSIA)-certified chimney sweeps here at Trinity Chimney Service takes pride in ensuring your home is soot-free throughout the whole sweeping process. Our use of vacuums and tarps allows for the dust and soot to be concentrated in the firebox or appliance area, and we work hard to ensure debris will not escape those areas.
So aside from our no-mess guarantee, what can you expect during the sweeping process when you choose Trinity Chimney Service?
Our professionals will start with a level 1 inspection as defined by the National Fire Protection Association (NFPA). We will need to access the roof to inspect the exterior of the chimney or vent, but the rest of the sweeping service will be completed from inside the home. It's actually best to sweep from the bottom, rather than from the top, and the use of a rotary style power sweeping method allows us to remove extra soot and creosote deposits that the brush style from the roof would not remove.
After the sweeping is completed, we'll use a premier video camera to scan the flue lining, and encourage you, the homeowner or tenant, to watch with us so you can see the results of our work for yourself — instead of just taking our word for it.
Do you have a fireplace or stove in your home? Make sure it's ready to keep you warm and cozy this fall and winter by scheduling your chimney sweeping with the experienced and dependable CSIA-certified sweeps here at Trinity Chimney. We have 30 years of experience in various fields of the fire industry and we pride ourselves on a job well done. To schedule your chimney sweeping, call 443-602-4306 or fill out our online appointment request form. It's as easy as that!
Our chimney and fireplace services include levels 1, 2, and 3 chimney inspections so we can pinpoint any and every problem within the chimney system.


text:
Accueil du portail Eduscol langues étrangères School Education in France Teaching programmes
Teaching programmes and the Common core of knowledge, skills and culture
The Consolidation Cycle (cycle 3)
Cycle 3 has two main objectives: reinforcing the base knowledge learned in Cycle 2 and helping with the transition from primary school to lower secondary school. It covers the last two years of primary school and the first year of lower secondary, in order to reinforce the continuity and consistency of learning between them. The "Sixième" class (first year of lower secondary) therefore occupies a particular place in this cycle, allowing pupils to adapt to the pace, educational organisation and lifestyle of lower secondary school while continuing on from CM1 and CM2 (Cours Moyen 1ère année, age 9-10 and Cours Moyen 2e année, age 10-11). Subjects covered in Cycle 3 include French, Modern Languages (foreign and regional), Art, Music, History of art, Physical and sport education, Civic and moral education, History and Geography, Science and Technology, and Mathematics.
Modern languages (foreign or regional)
Civic and moral education
During Cycle 3, pupils consolidate and reinforce everything they have learned in Cycle 2, particularly language proficiency, which is essential to learning other subjects such as French, Mathematics, artistic and physical expression.
During this cycle, pupils are also gradually introduced to academic subjects and their specific knowledge, language, approaches and methods, especially history and geography, science and technology. Pupils' capacity for abstract analysis increases and they begin to produce and structure their thoughts by taking in new knowledge. This introduction to academic subjects is marked during the cycle by the transition from a single teacher covering all subjects in primary school to one teacher per subject in the first year of lower secondary school.
Cycle 2 focused on the acquisition of reading and writing skills; in Cycle 3, the teaching of French helps to reinforce this knowledge, which is essential for all other subjects. The central objective is language proficiency, ensuring that all pupils can read and write independently so that they begin Cycle 4 with the skills they need to continue their education. This proficiency is achieved through daily writing practice and regular, numerous reading and oral activities, complemented by grammar, spelling and vocabulary activities that help them understand how the French language works and learn its rules.
During Cycle 3, the study of literary texts or artistic works takes on an increasingly important role; pupils gradually learn to identify subtext and go beyond the literal meaning to redevelop the work's figurative meaning and offer a simple interpretation.
The main points covered are:
comprehension and oral expression
Pupils learn to use oral language to give explanations, information or opinions in a clear, ordered way, interacting effectively and clearly with their classmates to compare reactions or points of view, refining their thoughts by identifying ideas or formulations to prepare a written piece or speech. They work on reading texts out loud, memorising them and reciting by heart. They practise making short oral presentations in front of the class, relying on notes, a slideshow or other digital tool.
Pupils continue to learn cursive handwriting so that their gestures are automatic and they can write effectively and quickly. They also learn to type on the keyboard and use word processing tools. Pupils write every day, in varied situations, to react to what they have read, to reflect and prepare a requested task, to reformulate or summarise results, to explain or justify what they have done, to express an emotion or personal judgement, or to exercise their imagination. They acquire a level of autonomy in their writing, learning to rework their own text and make use of drafts, notes and successive versions. By the end of the cycle, they are capable of writing a text of one to two pages in response to a precise, organised and coherent objective, in legible handwriting and respecting the spelling rules studied in class.
The goal in Cycle 3 is to develop independent readers, both at school and at home, who can read out loud or in silence, fluently and quickly. Pupils read a wide variety of texts and documents (tables, graphs, charts, diagrams, images, etc.) so that they are capable of understanding and learning other subjects, and to enrich their vocabulary, feed their imagination, arouse their interest and develop their knowledge and culture. Reading activities are linked to writing activities, whether these are written pieces related to what they are reading (exercise books or reading records for noting their reactions as a reader, copying poems, text extracts, posters, blogs), writing linked to comprehension work (reformulating, answers to questions, notes, diagrams, etc.) or creative writing using their imagination. In CM1 and CM2 (last two years of primary), they read at least seven works each year, and six in the first year of lower secondary: these are works from children's literature and classic literature.
Understanding of language (grammar, spelling, vocabulary)
In Cycle 3, the objective is to ensure solid grammatical knowledge of central concepts, highlight the main regularities of the French language in order to master its spelling, and begin studying the system of the language. Learning spelling (spelling of words and rules on agreement) and verb forms (conjugation) is central; the focus is on regular grammar and the most common cases; irregular or exceptional cases are memorised by pupils if frequently used. By the end of the cycle, pupils will have mastered nominal group agreements (article, noun, adjective), the agreement between the verb and its subject, and agreement of the attribute with the subject. Pupils learn language through practical writing, reading and oral expression activities.
Literary and artistic culture
From the main topics on the curriculum, teachers freely choose literary and artistic works to be studied and encourage personal reading; pupils therefore acquire basic knowledge of a common literary and artistic culture.
Topics on the curriculum:
In CM1 and CM2 (last two years of primary school, age 9 and 10): "Heroes / heroines and characters" (stories, tales or fables about a heroic character, cartoon books, films); "Questions of morality" (stories and fables); "Encountering the strange and magical" (tales and legends, mythological stories); "Experiencing adventures" (adventure novel), "Imagining, describing and celebrating the world" (poetry and tales); "Discovering yourself and forming relationships with others" (coming-of-age novels and autobiographical stories).
- In "sixième": (first year of lower secondary school, age 11) "Monsters and the limits of human beings" (extracts from the Odyssey or Metamorphoses, fairy tales, mythological stories and ancient legends, related to the history syllabus); "Adventure stories" (adventure novels and films); "Creative stories, poetry" (related to the history syllabus, a long extract from Genesis in the Bible); "Defying the strongest: tricks, lies and masks" (fables, stories, farces, plays).
Teaching of the modern language chosen in the preparatory class has two main, closely linked objectives: to learn to communicate in another language (understand and express yourself orally and in writing, and have conversations with others) and to discover another culture. Regular, daily exposure to the language helps pupils to make progress, often by using digital media and tools in lessons.
The same curriculum applies to all foreign and regional languages, each teacher adapting it to the language they teach, particularly as regards linguistic knowledge (vocabulary, grammar, pronunciation). Five language skills are developed simultaneously: listening and understanding, reading, reacting and conversing, speaking continuously, writing and responding to writing. The skills levels used in all European countries, on a scale from A1 (minimal skills, beginner level) to C2 (advanced skills) are used as a reference point for teachers: by the end of Cycle 3, all pupils should have reached at least level A1 in the five language activities, and may have reached level A2 (intermediate level) in one or more activities.
With regard to the cultural dimension of modern language learning, three areas are explored in Cycle 3:
people and everyday life (the human body, clothes, lifestyles, physical and moral characteristics, the urban environment);
geographical, historical and cultural landmarks (geographical location, physical features and cultural landmarks, some historical and contemporary figures, a few main historical events specific to the area studied);
the imagination (children's literature, tales, myths and legends of the country or region, heroes/heroines and fictional characters, cartoons, TV series and films).
In this way, lifestyles, festivals and traditions, historical and geographical landmarks, cultural personalities in the region or country concerned, famous monuments and works, stories, legends and nursery rhymes are explored and studied in context thanks to the possibilities offered by classroom teaching, various activities, interests and events taking place during the school year. These cultural landmarks promote an awareness of differences, developing curiosity and the desire to communicate. Contacts with schools in the countries or regions concerned can help to facilitate and reinforce this linguistic and cultural learning.
During Cycle 3, the teaching of art gradually leads pupils towards more independent artistic practice, which they also learn to analyse in greater depth. Each pupil's potential for innovation and creativity is developed. Pupils learn how to draw on their own experiences to identify, name and choose the resources they use, questioning the effectiveness of tools, materials, formats and techniques according to their intentions and their projects. Specific work is carried out on the effects produced by the various ways in which artworks are presented to the public, in order to examine the relationship of the work to a display medium (frame, plinth, etc.), a place (wall, floor, closed or open space) and the spectator. Creative activities are continually linked to the exploration of leading contemporary and past, Western and non-Western artworks, in order to nurture pupils' sensitivity and imagination, enrich their capacity for expression and form their judgement. They acquire specific vocabulary so that they can gradually move from describing a work to analysing it.
There are three main topics on the curriculum, studied in each year of the cycle:
artistic representation and presentation methods;
artistic production and the relationship between the object and the space;
the material nature of art production and awareness of the elements included in the work.
Practices are varied: two-dimensional (drawing, painting, collage, etc.), three-dimensional (modelling, sculpture, assembly, installation, etc.) or imagery (photography, video, digital creation).
The teaching of music combines expressive and creative activities, usually in a group, with listening to and analysing a variety of musical works. Its main objectives are to develop pupils' imagination, creativity and capacity for expression, train their ear, learn how to cooperate, shape their artistic culture and improve their capacity for analysis.
In musical practice, pupils reproduce works they have heard or participate in imagining and creating their own. They learn how to use their voices and bodies to sing a simple melody with expression, a song learned by heart through imitation, take full part in a group performance and gradually increase their repertoire of new songs. They also learn how to connect the music they sing to what they hear.
In music listening activities, pupils learn to describe and compare pieces of music from different contexts and identify relationships, resemblances and differences between several works. They structure their artistic culture by learning about a variety of important musical works, from all genres and all eras, suitable for their age group. They exercise critical thinking and express personal opinions by gradually going beyond first impressions and immediate emotions.
Pupils begin learning this new subject in the first year of Cycle 3 at the same time as history. From the first year of lower secondary, this subject is taught by teachers of several subjects, mainly Art and Music, French, History and Geography, and Modern Languages. Its main purpose is to structure pupils' artistic culture: they acquire and consolidate cultural references to major artworks and movements of the past and present, learning how to situate them in space and time, how to interpret them and relate them to each other, and developing their awareness of and tastes in art. This subject covers local, national and international art history, academic as well as popular or traditional; it requires contact with works of art and cultural organisations, directly and through digital resources.
In Cycle 3, pupils learn how to describe an artwork using simple and appropriate language, how to situate it in a time period and geographical area based on its main characteristics, how to express their impressions and opinions of a work and how to make an initial analysis. They also learn how to find their way around a museum or art gallery, adapt their behaviour to the place and identify the roles of the main people working there. They are aware of the influence of past and present art on their environment.
The main objectives of Physical and sport education are the same throughout the three cycles of primary school and lower secondary school, with levels of learning that increase through the cycles:
developing motor skills and learning to express yourself using your body;
becoming familiar with working tools and methods by practising sport;
sharing rules and taking on roles and responsibilities within a team;
learning how to look after your health through regular physical activity;
becoming familiar with a physical and artistic sport culture.
Following increasing levels of difficulty, pupils gradually learn to produce their best performance, adapt their movements to varied environments, express themselves in front of others through artistic or acrobatic activities, lead and manage a match in a team or between two players. Depending on their pupils, teachers freely choose the available materials and equipment and different physical and sports activities for the lessons (athletics, swimming, dance, circus arts, gymnastics, team ball games, racket sports, etc.), constructing an appropriate, coherent training programme. They ensure that each pupil participates in a variety of individual and group activities during the cycle.
During Cycle 3, pupils exercise and reinforce their motor skills in more challenging, diverse contexts. They learn to identify and analyse the immediate effects of their actions to perfect them and improve performance, which involves both oral and written work. In team sports and activities, they continue to learn various roles (referee, observer, etc.) and understand the need for rules. Through significant practice time, pupils test and develop the working methods specific to the subject, via action, imitation, observation and cooperation. As in Cycle 2, learning to swim remains a priority.
Civic and moral education has four main objectives during the three cycles of primary and lower secondary school:
emotional awareness education, to learn to identify feelings and emotions, put them into words, discuss them and understand other people's feelings and emotions;
education in rules and law, to understand the meaning of rules in the classroom, primary or secondary school and to make pupils (future citizens) aware of the role and importance of law in the French Republic;
education in moral judgement, in order to understand and discuss the moral choices encountered in life, requiring pupils to put forward arguments, debate and justify their choices;
experiencing engagement, encouraging pupils to participate in the social life of their class and school, acquire a spirit of cooperation and a sense of responsibility towards others.
In Cycle 3, this subject is allocated one hour every week. In the first year of lower secondary, it is delivered by voluntary teachers of various subjects. This is not theoretical education, but practical, concrete education that puts pupils in role play situations to get them to think, express themselves, act and react.
On the curriculum in Cycle 3:
Emotional awareness: expressing and sharing your emotions and feelings with others about literary or artistic works or during group discussions on classroom life; respect for and acceptance of others and their differences in language and attitude; understanding the meaning of the symbols of the French Republic. For example, pupils may take part in role plays, drama games, mimes, or take part in philosophical discussions supervised and led by the teacher on the topics of tolerance and mockery.
Rules and law: understanding, accepting and applying the concepts of rights and duties, applying the principle of equality between girls and boys, understanding the principles and values of the French Republic and the European Union, understanding the founding characteristics of the French Republic (institutions, the basis of law, the concept of citizenship, etc.). For example, pupils may define and discuss the rules of debate, analyse gender stereotypes using examples from manuals, literature or films, or study the founding texts of institutions and their history.
Moral judgement: learning to debate (speaking in front of others, listening to others, formulating and justifying a point of view), exercising critical judgement about information received from the media, differentiating between personal interest and collective interest. For example, pupils may exercise their critical judgement on events relating to life in the class, school or outside school to combat prejudices (racism, sexism, homophobia, etc.).
Experience of engagement: learning to explain and justify choices, integration and personal involvement in a group, understanding the values of fraternity and solidarity, etc. Pupils may, for example, play an active role in a group project within the class, school or town, connected to an association.
Once pupils have acquired basic knowledge in Cycle 2 and an ability to situate themselves in time and space, they begin two separate subjects in Cycle 3, History and Geography, and so continue to construct their relationship to time and space. These two subjects are closely linked, dealing with common topics and concepts and sharing tools and methods.
The objective in Cycle 3 is not for pupils to gain an exhaustive knowledge of History, which is premature at this level, but rather to lay the foundations of the initial historical landmarks, which will be consolidated and extended in Cycle 4. These landmarks help pupils to understand that today's world and contemporary society are the descendants of long processes, changes and choices made by men and women in the past.
Pupils observe the concrete traces of history (particularly in their nearby, everyday environment) and question their meaning; they are gradually introduced to other types of sources and other evidence, relating to worlds farther away in time and space. They understand that the narrative of history is constantly nourished and altered by new archaeological and scientific discoveries, giving a new, different understanding of the past.
By examining historical events, pupils learn to distinguish history from fiction and understand that the past is a source of investigation. In particular, pupils have the opportunity to compare historical facts and beliefs: the study of religious events systematically roots these events in their cultural and geopolitical contexts.
In CM1 and CM2, they discover key moments in the history of France in chronological order, from the traces of early occupation of the French territory up to the construction of the European Union. Following this introduction, in the first year of lower secondary, pupils look more closely at questions and approaches specific to historical science, by studying prehistory and Antiquity.
CM1 (year before last of primary school, age 9):
Topic 1: Before France
What are the earliest traces of human occupation in French territory?
Celts, Gauls, Greeks and Romans: what is the heritage from ancient cultures?
The main population movements (4th to 10th century).
Clovis and Charlemagne, Merovingians and Carolingians, after the fall of the Roman Empire.
Topic 2: The Kings
Louis IX, the "Christian King" of the 13th century.
François I, protector of Arts and Literature in the Renaissance.
Henri IV and the Edict of Nantes.
Louis XIV, the Sun King at Versailles.
Topic 3: The Revolution and the Empire
From 1789 to the execution of the King: Louis XVI, the Revolution, the Nation.
Napoleon Bonaparte, from General to Emperor, from the Revolution to the Empire
CM2 (last year of primary school, age 10):
Topic 1: The Republic
1892: the centenary of the Republic.
Primary school at the time of Jules Ferry.
Several republics, one democracy: liberties, rights and duties.
Topic 2: The industrial age in France
Energy and machines.
Working in a mine, factory, workshop or store.
The industrial town.
The rural economy.
Topic 3: France, from the World Wars to the European Union
Two World Wars in the 20th century.
The construction of Europe.
"Sixième" (first year of lower secondary, age 11):
Topic 1: The long history of humanity and its migrations.
The beginnings of humanity.
The Neolithic "revolution".
The first States and early writings.
Topic 2: Foundation stories, beliefs and citizenship in the ancient Mediterranean in the first millennium BC.
The world of Greek cities.
Rome, from myth to history.
The birth of Jewish monotheism in a polytheistic world.
Topic 3: The Roman Empire in the ancient world
Conquests, Roman peace and Romanisation.
Christians in the Empire.
The relationship of the Roman Empire with other ancient worlds: the ancient Silk Route and China under the Han dynasty.
The geography curriculum in Cycle 3 is organised around the concept of "living": the ways that humans organise and use their living spaces, on all scales. This concept enables pupils to identify and grasp the objective and methods of learning geography. Using very practical case studies (work, consumption, leisure, etc.), pupils are introduced to geographical reasoning by discovering, analysing and understanding the dynamics between individuals and societies and the land and places that they use, design and organise.
Firstly, pupils discover and explore every day, local living environments. They then examine other scales and other social and cultural environments; finally, in the last year of the cycle, they analyse the diversity of "living" environments across the world.
The topics on the curriculum encourage reflection on the challenges and necessity of sustainable development in territories.
Topic 1: Explore the place(s) where I live
Identify the features of my living environment(s).
Locate my living environment(s) and situate it on different scales.
Topic 2: Living, working, educating and enjoying leisure time in France
In urban environments.
In a tourist area.
Topic 3: The consumer society in France
Meeting energy and water needs.
Meeting food nutritional needs.
CM2 (last year of primary, age 10):
Topic 1: Getting around
Everyday transport in France.
Everyday transport in another place in the world.
Getting from town to town in France, Europe and the world.
Topic 2: Communicating across the world via the Internet
A world of networks.
A population connected to the world.
Inequality of connected populations in the world.
Topic 3: Better living
Promoting the role of "nature" in towns.
Recycling.
Living in a green neighbourhood.
Topic 1: Living in a city
Cities and their inhabitants.
The city of the future.
Topic 2: Living in a low density area
Living in an area with significant natural constraints and/or great biodiversity.
Living in an area with a low density of agricultural land.
Topic 3: Living on the coast
Industrial port coastlines, tourist coastlines.
Topic 4: The inhabited world
Distribution of the global population and its dynamics.
The variety of forms of spatial occupation in the world.
During Cycle 2, pupils "explored" the natural world by observing, questioning and carrying out basic experiments. In Cycle 3, in "Science and Technology", they begin to make an initial rational, coherent representation of this world, by tackling genuine scientific concepts. They also acquire skills and knowledge linked to the world of technology. The "Science and Technology" subject in Cycle 3 will later be sub-divided into three separate subjects (Cycle 4 at lower secondary school): Physics-Chemistry, Life and Earth Sciences, and Technology.
In Cycle 3, pupils are introduced to scientific approaches with support and help from the teacher, in a practical manner: by formulating questions, exploring research areas, then offering explanatory hypotheses, testing them through experiments, observations or simulations, and communicating their results and conclusions. They develop their curiosity, manual skills, precision in using language and rigorous reasoning, and gradually learn to differentiate scientifically validated facts from opinions.
In terms of technology, pupils explore the technical world, in particular through the history of the development of objects, designing and producing models or prototypes. They improve their skills in using digital tools.
The Science and Technology curriculum covers four topics:
Matter, movement, energy, information
Pupils learn to distinguish between living and inert matter, and different materials (metals, glass, plastic, etc.) and their physical characteristics. They observe and describe different types of movements, examine the concept of speed, using examples that mean something to them (riding a bike, travelling by train, movements of the planets). Finally, they discover different energy sources and how these are converted to make them usable by humans.
The living world, its diversity and the functions that characterise it
Pupils learn how to classify living species and discover the relationships between them. By observing changes in species on Earth over time, they examine the concept of the evolution of the species. The role of nutrition in living beings, their development and reproduction are also studied in this topic.
Materials and technical objects
Pupils identify that objects respond to needs and that our changing needs lead to the development of new objects. Using everyday examples, they study how technical objects work and how they are made. Finally, they create a technical project, from design to manufacture.
Planet Earth. Living beings in their environment
In this topic, pupils learn to situate the Earth in the solar system and identify the conditions under which life appears and develops on our planet. Observing different habitats shows pupils that living beings are distributed across the Earth according to the conditions of their environment. In our use of natural resources (living species and geological resources), human beings modify these habitats. The study of natural phenomena, both geological (volcanoes, earthquakes, etc.) and climatic (storms, floods, etc.) is linked to the risks posed to populations.
During Cycle 3, pupils will reinforce the techniques they have previously studied such as mental calculation and written calculation techniques, until they become automatic (addition, subtraction and multiplication) and they will also learn new ones (division).
They discover new mathematical concepts: decimal numbers, proportionality, new measurements (area, volume, angles, etc.). In geometry, they manipulate concrete objects and discover new ways to represent space (templates, perspectives, front, side and top views, etc.). For working on numbers, and in geometry, digital tools - in particular, software - are used in addition to "paper and pencil" activities.
Finally, in Cycle 3, pupils begin a new form of mathematical exercise: problem solving. They discover that the mathematical skills and concepts they have learned are tools that will help them to solve mathematical problems. Examples of problems are taken from other subjects and from everyday life, and pupils are encouraged to find problems themselves.
The curriculum covers three major topics:
Numbers and calculation
Pupils continue to study whole numbers and large numbers (up to 12 figures) orally and in writing, becoming ever more proficient in the number system and knowing how to use it when calculating. They tackle decimal numbers (decimal point), learn to write a number as a fraction and solve basic problems that use fractions and decimals. They practise mental calculation, especially when estimating the magnitude of the result. They perform written calculations: addition, subtraction, multiplication and division. They use a calculator, especially to check their calculations.
Size and measurements
Pupils revise the measurements already studied (length, mass, content, price, etc.) and learn new ones (area, perimeter, volume, angle). They measure, compare and estimate measurements: the perimeter of a square or rectangle; the area of simple geometrical shapes (rectangle, triangle, disc), the volume of a cube, measurement of angles, periods of time, etc. They learn to use the common, official units for measurements.
Space and geometry
Pupils learn spatial recognition and use representations (maps, plans, etc.) to indicate a position or make movements. In geometry, they construct three-dimensional solids, manipulate them and learn how to represent them (templates, 3D software). They construct geometrical shapes using their instruments (graduated ruler, compass, set square) and give them properties (equality of length, perpendicularity, parallelism, symmetry in relation to an axis, etc.).
They are introduced to coding through location finding activities (for example programming the movements of a robot) or geometrical activities (constructing simple shapes on a computer).
Mis à jour le 23 mai 2017
Accueil du dossier
The Common Core of Knowledge, Skills, and Culture
The Fundamental Learning Cycle (cycle 2)
The Development Cycle (cycle 4)
International sections (french + english version)
Baccalauréat international 2015 (french version)
The latest news about french education policy, such as
The French Digital Plan For Education
French Government Action Plan to Halve School Dropout
Teacher Training Key in Education Reform Implementation
Educational Priority - A Government Programme To Cut The Impact of Social Inequalities
French Nursery Schools Implement Changes for September 2015
French Schools Put the Spotlight on Sustainability
A new program to teach citizenship


How to Recover Data from Sony SD Card?
Secure Digital card which is known as SD card in short is a portable storage media used mobiles and digital camera. It was developed by Sony. Generally, there size is equal to a small chip shape designed to be fit into digital devices like mobiles and cameras. Companies today are competing with each other to manufacture SD card with optimized and advanced features. They are widely used as a storage device on portable devices like handheld computers, IPods, video game consoles, digital cameras and cell phones.
What are the reasons for data loss from Sony SD memory card?
Sony SD memory card recovery is used by majority of the users facing a data loss from their SD card after storing their valuable files on it. This tool can restore raw files and other generic form of files used on computers basically. Popular brands of SD cards like SanDisk, Panasonic, Transcend, Kingston etc can be recovered with the help of this tool. With the use of this software you can perform Sony digital camera image recovery of formats like PNG, BMP, JPEG, GIF etc.
After the recovery, you can preview the content and restore them back safely on your computer or any portable device. It can restore Sony memory stick of Pro, Duo and Pro Duo version. It recovers files in a accurate and safe manner it's equipped with a fast scanning algorithm.
Other than SD cards, the Sony Card Recovery software also works perfectly to restore deleted or lost data from Sony CF cards. To get complete idea regarding the recovery process and the data loss scenarios, visit here.
Step 1- Download and install the software on your PC. Then connect the Sony SD memory card drive o the system. Next run the application and select "Recover Photos" option.
Step 3- Then the software scans the specified SD memory card drive and returns a list of found files. Preview the recovered file and save the recovery session for future use. Finally select the required filesand save them on any drive / partition.


Product & process quality inspections and acceptance activities, control of non-conforming products , quality improvements, including support for the new product development and regulatory requirements & compliance.
Plan, perform and document the First Article Evaluation, Incoming, In-Process and Out-going quality assurance, inspections and records.
Plan, perform and document the control of non-conforming parts, materials & products process, including support for the Material Review Board, disposition, follow-up actions until close-out.
Responsible for incoming quality assurance. Accurately complete all administrative activities associated with incoming quaity inspection. Perform incoming inspection. Prepare & execute Inspection plan, checklist or equivalent.
Download and analyze quality information from quality system to be used for Quality reports. Generate Quality metrics. Prepare Statistical Process Control Charts.
Plan and direct activities concerned with the etablishment and / or continuance of process related requirements and other quality programs.
Assist for authorizing the release of final products to customer. Prepare quality documentation or equivalent.
Actively engaged in measureing, inspecting, and/or testing products or parts and tabulating data conerning materials, product or process quality and reliability.
Supervise inspectors, operators or junior staffs on the inspection plan. Good team player, able to work independently without supervison and under stress environment, and self-motivated.
Ability to communicate with all levels of stafs and overseas counterparts, customers, vendors and representatives from the regulatory bodies. Proficiency in written and communication skills in English.
Able to work in a cleanroom environment with the required gownings and personal protective equipment (gloves). Willing to work in day and night shifts.
Ability to interpret within established procedures and follow. Careful with details and systematic in managing quality issues.
Alternatively, you may call 6815-9722 to book appointment for registration.
Local candidates may walk-in from Monday to Friday 10:00am to 4:00PM at 37 Onan Road, S424487. Foreign candidates from overseas may apply for this position. (Skype Interview available).
ano. pa po position na. avail?
Hi thank you for waiting. The employer already selected one candidate for this post.


Self Description: I'm a sincere, loyal, kind, traditional woman who likes her job. I'm very familiar, and traditional.
Comments: I'm looking for a respectful, honest and kind man who wants a serious relationship. Up to 50.
My additional Photos My additional Photos Medellin Tour Photos Meet Diana Carolina On The Medellin Tour Write Me Now! Send flowers Call me Now!