text:
<?php

abstract class PluginObject {
    /**
     * @var (boolean) This plugin has a CMS module. This means that implements the [pluginName]_cms_controller.php convention.
     */
    protected $_hasCmsModule = true;

    /**
     * @var (string) Show in CMS home.
     */
    protected $_showInCmsHome = true;

    /**
     * @var (string) Show in CMS menu.
     */
    protected $_showInBakeryMenu = true;

    /**
     * @var (boolean) Is a submenu.
     */
    protected $_isCmsSubMenu = false;

    /**
     * @var (string) Plugin name of the father menu.
     */
    protected $_cmsMenuFather = '';

    /**
     * @var (boolean) Only Super Admins have access.
     */
    protected $_restricted = false;

    /*
     * Getters
     */
    // MUST be implemented.
    public function getCmsModuleName()
    {
        return __d('cms', 'No name');
    }

    public function hasCmsModule()
    {
        return $this->_hasCmsModule;
    }

    public function showInCmsHome() {
        return ($this->_hasCmsModule && $this->_showInCmsHome);
    }

    public function showInBakeryMenu() {
        return ($this->_hasCmsModule && $this->_showInBakeryMenu);
    }

    public function isCmsSubMenu() {
        return ($this->_hasCmsModule && $this->_isCmsSubMenu);
    }

    public function getBakeryMenuFather()
    {
        return $this->_cmsMenuFather;
    }

    public function isRestricted()
    {
        return $this->_restricted;
    }
}


text:
// -*- C++ -*-

//==========================================================================
/**
 *  @file    ARGV.h
 *
 *  $Id: ARGV.h 76208 2006-12-28 15:02:27Z schmidt $
 *
 *  @author Doug Schmidt <schmidt@cs.wustl.edu>
 *  @author Everett Anderson <eea1@cs.wustl.edu>
 */
//==========================================================================

#ifndef ACE_ARGUMENT_VECTOR_H
#define ACE_ARGUMENT_VECTOR_H
#include /**/ "ace/pre.h"

#include /**/ "ace/ACE_export.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "ace/Unbounded_Queue.h"

// Open versioned namespace, if enabled by the user.
ACE_BEGIN_VERSIONED_NAMESPACE_DECL

/**
 * @class ACE_ARGV_Queue_Entry_T
 *
 * @brief An entry in the queue which keeps user supplied arguments.
 */
template <typename CHAR_TYPE>
class ACE_ARGV_Queue_Entry_T
{
public:
  // = Initialization and termination.
  /// Initialize a ACE_ARGV_Queue_Entry_T.
  ACE_ARGV_Queue_Entry_T (void);

  /**
   * Initialize a ACE_ARGV_Queue_Entry_T.
   *
   * @param arg   Pointer to an argument
   *
   * @param quote_arg The argument @a arg need to be quoted
   *              while adding to the vector.
   */
  ACE_ARGV_Queue_Entry_T (const CHAR_TYPE *arg,
                          bool quote_arg);

  /**
   * Initialize a ACE_ARGV_Queue_Entry_T.
   *
   * @param entry Pointer to a queue entry
   */
  ACE_ARGV_Queue_Entry_T (const ACE_ARGV_Queue_Entry_T<CHAR_TYPE> &entry);

  /// We need this destructor to keep some compilers from complaining.
  /// It's just a no-op, however.
  ~ACE_ARGV_Queue_Entry_T (void);

  /// Dump the state of this object.
  void dump (void) const;

  // Declare the dynamic allocation hooks.
  ACE_ALLOC_HOOK_DECLARE;

  /// Pointer to the argument.
  const CHAR_TYPE * arg_;

  /// The argument need to be quoted while adding to the vector.
  bool quote_arg_;
};

/**
 * @class ACE_ARGV_T
 *
 * @brief Builds a counted argument vector (ala argc/argv) from either
 * a string or a set of separate tokens. This class preserves whitespace
 * within tokens only if the whitespace-containing token is enclosed in
 * either single (') or double (") quotes. This is consistent with the
 * expected behavior if an argument vector obtained using this class is
 * passed to, for example, ACE_Get_Opt.
 *
 * This class can substitute environment variable values for tokens that
 * are environment variable references (e.g., @c $VAR). This only works
 * if the token is an environment variable reference and nothing else; it
 * doesn't substitute environment variable references within a token.
 * For example, @c $HOME/file will not substitute the value of the HOME
 * environment variable.
 */
template <typename CHAR_TYPE>
class ACE_ARGV_T
{
public:
  // = Initialization and termination.
  /**
   * Splits the specified string into an argument vector. Arguments in the
   * string are delimited by whitespace. Whitespace-containing arguments
   * must be enclosed in quotes, either single (') or double (").
   *
   * @param buf   A nul-terminated CHAR_TYPE array to split into arguments
   *              for the vector.
   *
   * @param substitute_env_args  If non-zero, any token that is an
   *              environment variable reference (e.g., @c $VAR) will have
   *              its environment variable value in the resultant vector
   *              in place of the environment variable name.
   */
  ACE_ARGV_T (const CHAR_TYPE buf[],
              bool substitute_env_args = true);

  /**
   * Initializes the argument vector from a set of arguments. Any environment
   * variable references are translated (if applicable) during execution of
   * this method.
   *
   * @param argv  An array of tokens to initialize the object with. The
   *              array must be terminated with a 0 pointer. All needed
   *              data is copied from @a argv during this call; the pointers
   *              in @a argv are not needed after this call, and the memory
   *              referred to by @a argv is not referenced by this object.
   *
   * @param substitute_env_args  If non-zero, any element of @a argv that is
   *              an environment variable reference (e.g., @c $VAR) will have
   *              its environment variable value in the resultant vector
   *              in place of the environment variable name.
   *
   * @param quote_args  If non-zero each argument @a argv[i] needs to
   *                    be enclosed in double quotes ('"').
   */
  ACE_ARGV_T (CHAR_TYPE *argv[],
              bool substitute_env_args = true,
              bool quote_args = false);

  /**
   * Initializes the argument vector from two combined argument vectors.
   *
   * @param first_argv   An array of tokens to initialize the object with.
   *                     The array must be terminated with a 0 pointer.
   * @param second_argv  An array of tokens that is concatenated with the
   *                     the tokens in @a first_argv. The array must be
   *                     terminated with a 0 pointer.
   * @param substitute_env_args  If non-zero, any element of @a first_argv
   *              or @a second_argv that is an environment variable
   *              reference (e.g., @c $VAR) will have its environment
   *              variable value in the resultant vector in place
   *              of the environment variable name.
   *
   * @param quote_args  If non-zero each arguments @a first_argv[i] and
   *                    @a second_argv[i] needs to be enclosed
   *                    in double quotes ('"').
   */
  ACE_ARGV_T (CHAR_TYPE *first_argv[],
              CHAR_TYPE *second_argv[],
              bool substitute_env_args = true,
              bool quote_args = false);

  /**
   * Initialize this object so arguments can be added later using one
   * of the add methods. This is referred to as the @i iterative method
   * of adding arguments to this object.
   */
  ACE_ARGV_T (bool substitute_env_args = true);

  /// Destructor.
  ~ACE_ARGV_T (void);

  /** @name Accessor methods
   *
   * These methods access the argument vector contained in this object.
   */
  //@{
  /**
   * Returns the specified element of the current argument vector.
   *
   * @param index   Index to the desired element.
   *
   * @retval   Pointer to the indexed string.
   * @retval   0 if @a index is out of bounds.
   */
  const CHAR_TYPE *operator[] (size_t index);

  /**
   * Returns the current argument vector. The returned pointers are to data
   * maintained internally to this class. Do not change or delete either the
   * pointers or the memory to which they refer.
   */
  CHAR_TYPE **argv (void);

  /// Returns the current number of arguments.
  int argc (void) const;

  /**
   * Returns a single string form of the current arguments. The returned
   * pointer refers to memory maintained internally to this class. Do not
   * change or delete it.
   */
  const CHAR_TYPE *buf (void);

  //@}

  /// Dump the state of this object.
  void dump (void) const;

  // Declare the dynamic allocation hooks.
  ACE_ALLOC_HOOK_DECLARE;

  /**
   * Add another argument. This only works in the iterative mode.
   *
   * @note This method copies the specified pointer, but not the data
   *       contained in the referenced memory. Thus, if the content of
   *       the memory referred to by @a next_arg are changed after this
   *       method returns, the results are undefined.
   *
   * @param next_arg    Pointer to the next argument to add to the vector.
   *
   * @param quote_arg   The argument @a next_arg need to be quoted while
   *                    adding to the vector.
   *
   * @retval 0 on success; -1 on failure. Most likely @c errno values are:
   *       - EINVAL: This object is not in iterative mode.
   *       - ENOMEM: Not enough memory available to save @a next_arg.
   */
  int add (const CHAR_TYPE *next_arg, bool quote_arg = false);

  /**
   * Add an array of arguments. This only works in the iterative mode.
   *
   * @note This method copies the specified pointers, but not the data
   *       contained in the referenced memory. Thus, if the content of
   *       the memory referred to by any of the @a argv elements is
   *       changed after this method returns, the results are undefined.
   *
   * @param argv    Pointers to the arguments to add to the vector.
   *                @a argv must be terminated by a 0 pointer.
   *
   * @param quote_args  If non-zero each argument @a argv[i] needs to
   *                    be enclosed in double quotes ('"').
   *
   * @retval 0 on success; -1 on failure. Most likely @c errno values are:
   *       - EINVAL: This object is not in iterative mode.
   *       - ENOMEM: Not enough memory available to save @a next_arg.
   */
  int add (CHAR_TYPE *argv[], bool quote_args = false);

private:
  /// Copy constructor not implemented.
  ACE_UNIMPLEMENTED_FUNC (ACE_ARGV_T (const ACE_ARGV_T<CHAR_TYPE>&))

  /// Assignment operator not implemented.
  ACE_UNIMPLEMENTED_FUNC (ACE_ARGV_T operator= (const ACE_ARGV_T<CHAR_TYPE>&))

  /// Creates buf_ from the queue of added args, deletes previous buf_.
  int create_buf_from_queue (void);

  /// Converts buf_ into the CHAR_TYPE *argv[] format.
  int string_to_argv (void);

  /// Replace args with environment variable values?
  bool substitute_env_args_;

  bool iterative_;

  /// Number of arguments in the ARGV array.
  int argc_;

  /// The array of string arguments.
  CHAR_TYPE **argv_;

  /// Buffer containing the <argv> contents.
  CHAR_TYPE *buf_;

  /// Total length of the arguments in the queue, not counting
  /// separating spaces
  size_t length_;

  /// Queue which keeps user supplied arguments.  This is only
  /// active in the "iterative" mode.
  ACE_Unbounded_Queue<ACE_ARGV_Queue_Entry_T<CHAR_TYPE> > queue_;
};

typedef ACE_ARGV_Queue_Entry_T<ACE_TCHAR> ACE_ARGV_Queue_Entry;
typedef ACE_ARGV_T<ACE_TCHAR> ACE_ARGV;

// Close versioned namespace, if enabled by the user.
ACE_END_VERSIONED_NAMESPACE_DECL

#if defined (__ACE_INLINE__)
#include "ace/ARGV.inl"
#endif /* __ACE_INLINE__ */

#if defined (ACE_TEMPLATES_REQUIRE_SOURCE)
#include "ace/ARGV.cpp"
#endif /* ACE_TEMPLATES_REQUIRE_SOURCE */

#if defined (ACE_TEMPLATES_REQUIRE_PRAGMA)
#pragma implementation ("ARGV.cpp")
#endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */

#include /**/ "ace/post.h"
#endif /* ACE_ARGUMENT_VECTOR_H */

redpajama_set_name: RedPajamaGithub


text:
#ifndef CEN_TIMER_H
#define CEN_TIMER_H

#include <stdbool.h>

/**
 * Define the timer divider to have a timer at 1 Hertz (every second).
 */
// #define TIME_DIVIDER_1_HERTZ                 31250
// TODO : Find why this has changed ????
// #define TIME_DIVIDER_1_HERTZ                 15625
#define TIME_DIVIDER_1_HERTZ                 15625

/**
 * Define the timer divider to have a timer at 2 Hertz.
 */
#define TIME_DIVIDER_2_HERTZ                 (TIME_DIVIDER_1_HERTZ / 2)

/**
 * Define the timer divider to have a timer at 5 Hertz.
 */
#define TIME_DIVIDER_3_HERTZ                 (TIME_DIVIDER_1_HERTZ / 3)

/**
 * Define the timer divider to have a timer at 5 Hertz.
 */
#define TIME_DIVIDER_5_HERTZ                 (TIME_DIVIDER_1_HERTZ / 5)

/**
 * Define the timer divider to have a timer at 10 Hertz.
 */
#define TIME_DIVIDER_10_HERTZ                 (TIME_DIVIDER_1_HERTZ / 10)

/**
 * Define the timer divider to have a timer at 16 Hertz.
 */
#define TIME_DIVIDER_16_HERTZ                 (TIME_DIVIDER_1_HERTZ / 16)

/**
 * Define the timer divider to have a timer at 30 Hertz.
 */
#define TIME_DIVIDER_30_HERTZ                 (TIME_DIVIDER_1_HERTZ / 30)

/**
 * Define the timer divider to have a timer at 50 Hertz.
 */
#define TIME_DIVIDER_50_HERTZ                 (TIME_DIVIDER_1_HERTZ / 50)

/**
 * Define the timer divider to have a timer at 100 Hertz.
 */
#define TIME_DIVIDER_100_HERTZ                 (TIME_DIVIDER_1_HERTZ / 100)

/**
 * Define the timer divider to have a timer at 1000 Hertz (every millisecond).
 * This is approximative because division is not exact.
 */
#define TIME_DIVIDER_1000_HERTZ                (TIME_DIVIDER_1_HERTZ / 1000)

/**
 * Define the timer divider to have a timer at 2000 Hertz
 * This is approximative because division is not exact.
 */
#define TIME_DIVIDER_2000_HERTZ                (TIME_DIVIDER_1_HERTZ / 2000)

/**
 * Define the timer divider to have a timer at 10000 Hertz.
 * This is approximative because division is not exact.
 */
#define TIME_DIVIDER_10000_HERTZ                3

// forward declaration
struct Timer;
typedef struct Timer Timer;

/**
 * Definition of a function for callBack of timer.
 * @param timer the pointer on timer object (POO simulation)
 */
typedef void interruptTimerCallbackFunc(Timer* timer);

/**
 * The structure used to manage several Timers.
 */
struct Timer {
    /** The code of the timer (unique in all applications), not necessary equal to index in a timer List . */
    unsigned char timerCode;
    /** The divider timer. */
    unsigned long timeDiviser;
    /** The internal counter to divide the timer. */
    unsigned long timeInternalCounter;
    /** The value of the timer. */
    unsigned long time;
    /** The value of the mark. */
    unsigned long markTime;
    /** The function which must be used. */
    interruptTimerCallbackFunc* callback;
    /** if the timer is enabled or not. */
    bool enabled;
    /** if the timer is locked or not. */
    volatile bool lock;
    /** if the timer is in the callback function and is working. */
    volatile bool working;
    /** name of the timer (to have a better way to debug) */
    char* name;
    /** A generic object so that we could something external to the timer when firing timer. */
    int* object;
};

/**
 * Convert a time Diviser into a frequency value in Hertz
 * @param timeDiviser the low level value used internally in the timer
 * @return the frequency value in Hertz
 */
float timeDiviserToFrequencyInHertz(float timeDiviser);

/**
 * Returns the time value.
 * @param timer a pointer on the timer object for which we want the time value (POO simulation).
 * @return the time value.
 */
unsigned long getTime(Timer* Timer);

/**
 * Sets the time value.
 * @param timer a pointer on the timer object for which we want the set timer  (POO simulation).
 * @param time the new time value
 */
void setTime(Timer* Timer, unsigned long time);

// START - STOP

/**
 * Starts the timer given in argument.
 * @param timer a pointer on the timer object that we want to start  (POO simulation).
 */
void startTimer(Timer* timer);

/**
 * Stops the timer given in arguments.
 * @param timer a pointer on the timer object that we want to stop  (POO simulation).
 */
void stopTimer(Timer* timer);

// MARK

/**
 * Mark the timer. Remembers the current timer value  (POO simulation).
 * @return the markTime
 */
unsigned long markTimer(Timer* timer);

/**
 * Get the time difference since the last mark.
 * @param timer the pointer on timer object (POO simulation)
 */
unsigned long getTimeSinceLastMark(Timer* timer);

/**
 * Check if the last mark was done after markTime + time.
 * @param timer the pointer on timer object (POO simulation)
 * @param timeToCheck the time to compare if we are in timeout or not
 * return true if (markTime + time > timer->time)
 */
bool timeout(Timer* timer, unsigned long timeToCheck);

// LOCK

/**
 * Lock the timer to avoid that the timer fires.
 * @param timer a pointer on the timer object that we want to lock (POO simulation).
 */
void lockTimer(Timer* timer);

/**
 * wait for the timer to be sure that interrupt is not in progress, and lock
 * to be sure that until unlockTimer, timer will not be enabled.
 * @param timer a pointer on timer object to lock and wait (POO simulation).
 */
void lockAndWaitForTimer(Timer* timer);

/**
 * unlock the timer. If the timer is enabled, the timer will be fired next time.
 * @param timer a pointer on timer object to unlock (POO simulation).
 */
void unlockTimer(Timer* timer);

#endif


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>GNU Binary Utilities: size</title>

<meta name="description" content="GNU Binary Utilities: size">
<meta name="keywords" content="GNU Binary Utilities: size">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Binutils-Index.html#Binutils-Index" rel="index" title="Binutils Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="index.html#Top" rel="up" title="Top">
<link href="strings.html#strings" rel="next" title="strings">
<link href="ranlib.html#ranlib" rel="prev" title="ranlib">

Next: strings, Previous: ranlib, Up: Top   [Contents][Index]

6 size

size [<samp>-A</samp>|<samp>-B</samp>|<samp>--format=</samp><var>compatibility</var>]
     [<samp>--help</samp>]
     [<samp>-d</samp>|<samp>-o</samp>|<samp>-x</samp>|<samp>--radix=</samp><var>number</var>]
     [<samp>--common</samp>]
     [<samp>-t</samp>|<samp>--totals</samp>]
     [<samp>--target=</samp><var>bfdname</var>] [<samp>-V</samp>|<samp>--version</samp>]
     [<var>objfile</var>…]

The GNU size utility lists the section sizes—and the total
size—for each of the object or archive files <var>objfile</var> in its
argument list.  By default, one line of output is generated for each
object file or each module in an archive.

<var>objfile</var>… are the object files to be examined.
If none are specified, the file a.out will be used.

The command line options have the following meanings:

-A

-B

--format=<var>compatibility</var>

Using one of these options, you can choose whether the output from GNU
size resembles output from System V size (using <samp>-A</samp>,
or <samp>--format=sysv</samp>), or Berkeley size (using <samp>-B</samp>, or
<samp>--format=berkeley</samp>).  The default is the one-line format similar to
Berkeley’s.

Here is an example of the Berkeley (default) format of output from
size:

$ size --format=Berkeley ranlib size
text    data    bss     dec     hex     filename
294880  81920   11592   388392  5ed28   ranlib
294880  81920   11888   388688  5ee50   size

This is the same data, but displayed closer to System V conventions:

$ size --format=SysV ranlib size
ranlib  :
section         size         addr
.text         294880         8192
.data          81920       303104
.bss           11592       385024
Total         388392

size  :
section         size         addr
.text         294880         8192
.data          81920       303104
.bss           11888       385024
Total         388688

--help

Show a summary of acceptable arguments and options.

-d

-o

-x

--radix=<var>number</var>

Using one of these options, you can control whether the size of each
section is given in decimal (<samp>-d</samp>, or <samp>--radix=10</samp>); octal
(<samp>-o</samp>, or <samp>--radix=8</samp>); or hexadecimal (<samp>-x</samp>, or
<samp>--radix=16</samp>).  In <samp>--radix=<var>number</var></samp>, only the three
values (8, 10, 16) are supported.  The total size is always given in two
radices; decimal and hexadecimal for <samp>-d</samp> or <samp>-x</samp> output, or
octal and hexadecimal if you’re using <samp>-o</samp>.

--common

Print total size of common symbols in each file.  When using Berkeley
format these are included in the bss size.

-t

--totals

Show totals of all objects listed (Berkeley format listing mode only).

--target=<var>bfdname</var>

Specify that the object-code format for <var>objfile</var> is
<var>bfdname</var>.  This option may not be necessary; size can
automatically recognize many formats.
See Target Selection, for more information.

-V

--version

Display the version number of size.

Next: strings, Previous: ranlib, Up: Top   [Contents][Index]


text:
module Sunspot
  module Type
    class JoinField < AbstractType
      def indexed_name(name) #:nodoc:
        "#{name}_join"
      end

      def to_indexed(value) #:nodoc:
        value.to_s if value
      end

      def cast(text)
        text
      end

      def accepts_dynamic?
        false
      end

      def accepts_more_like_this?
        true
      end
    end
  end
end


text:
function buyNumber(twilioSid, twilioToken, areaCode)

  local response = http.request {
    method = 'POST',
    url = string.format('https://api.twilio.com/2010-04-01/Accounts/%s/IncomingPhoneNumbers.json', twilioSid),
    auth = { twilioSid, twilioToken },
    data = { AreaCode = areaCode }
  }

  if response.statuscode == 201 then
    return json.parse(response.content)
  else
    return nil
  end

end

return {
  buyNumber = buyNumber
}