App-Chart

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

misc/t-intraday-combobox.pl
misc/t-intraday-image.pl
misc/t-latest-handler.pl
misc/t-latest.pl
misc/t-line-drawer.pl
misc/t-linreg.pl
misc/t-list-of-lists.pl
misc/t-listseq.pl
misc/t-lj.pl
misc/t-lme.pl
misc/t-locale.c
misc/t-main.pl
misc/t-menu-tearoff-resize.pl
misc/t-misc.pl
misc/t-mlc.pl
misc/t-mon.pl
misc/t-notify.pl
misc/t-nz.pl
misc/t-open-model.pl
misc/t-overload.pl
misc/t-raw.pl

Makefile.PL  view on Meta::CPAN

    'HTTP::Cookies' => 0,
    'HTTP::Message' => '5.814',
    'HTTP::Request' => 0,
    'HTML::Form'    => 0,

    'Math::Round' => 0,
    'Module::Find' => 0.06, # version 0.06 avoids duplicates
    'Module::Util' => 0,
    'Module::Pluggable' => 0,

    # version 1.60 for fixups to initializing in locales like de_DE with "."
    # as the monetary thousands sep
    'Number::Format' => '1.60',

    'PerlIO::via::EscStatus' => 2,  # version 2 fixing erase on close
    # parts of EscStatus used explicitly
    'PerlIO::via::EscStatus::Parser' => 0,
    'PerlIO::via::EscStatus::ShowAll' => 0,
    'PerlIO::via::EscStatus::ShowNone' => 0,

    'Proc::SyncExec' => 0,

SIGNATURE  view on Meta::CPAN

SHA256 e7adcca66ad74137a3c8b033a2d08bb62b1d7ddc58711bc22610cd564dd695ed misc/t-intraday-combobox.pl
SHA256 d5bdef29cb5de758a503e126cc1273b70b1bf96c4df609de4a0633c2545b4c1c misc/t-intraday-image.pl
SHA256 18ba07f00d8081c1ed96b05fac61c841e60f4b232606057c71165f174a2116e0 misc/t-latest-handler.pl
SHA256 91b22a5be9102539bd0297ecf46fa41a97908a9992a1bd76665fd438d725b269 misc/t-latest.pl
SHA256 e28e5d249d21957b3e5e6b990a0dccfacf81e8cfe73939a686f0a3bbbd8949e3 misc/t-line-drawer.pl
SHA256 cd290ca2c64132671800af8f05b20bde17f6a02422d7c421496f70ae3a0a121a misc/t-linreg.pl
SHA256 d5faf10b122ce67057d1088f095379e3403dd71d1c79b6b79e21e7996f303346 misc/t-list-of-lists.pl
SHA256 fc99da2d632e7610cbf75a0738a43472f23463809a62784a1b8e23c4fd7f6885 misc/t-listseq.pl
SHA256 2e5334d931f09e442d84ab048198cacb910ffada30e3ac49f49b2cb6e64628d4 misc/t-lj.pl
SHA256 b54bef77586949b31f288f84a3034654ad4aa53c0a23ea525cdddffaa1ca0acb misc/t-lme.pl
SHA256 a04f492462eafef989618c4cacc22491fa998a2ad0d8576142cab938551081ca misc/t-locale.c
SHA256 75fbc17b0a8aedb6c47b54c5320b0c4461c064c0cf18c76c45c5ca7e4e8de700 misc/t-main.pl
SHA256 1eeac5cd9d053315aadedd790b35dc79e6a2e712d909ff7c3fba60f2953b00a8 misc/t-menu-tearoff-resize.pl
SHA256 9560ab7e101e32770d11226094ceaee6571b16b3f3eecbe7741f81a87eaee3fd misc/t-misc.pl
SHA256 19aac8ef5cb2d93b52749a5aea454119b6086270fdc5ecc5f06b7d5394c96a71 misc/t-mlc.pl
SHA256 bba18c7739339be1dbcfae2cf75f250ba01403f83f3bb3204f74fe81039cfc84 misc/t-mon.pl
SHA256 b988eeb4909bb94810e432d90bb3a9f6466df15e4689d3a64248a1f448e38a38 misc/t-notify.pl
SHA256 f53eb6c20892cbb0e5a2305e24a1ae5edecac54d4fa2184298437bcb73ba3bd0 misc/t-nz.pl
SHA256 8006e0ae724f8b5a1816c948118fcb79626c07699122a8c8777ebcfa2fcbf97b misc/t-open-model.pl
SHA256 2f5351ff77f77dc9307f7f0e5e19d9dc5efdccfe4d60d8aed95e5bc8409c5216 misc/t-overload.pl
SHA256 ff6a95779c9edf777bea127df9d5498bfad784076ffafa23004357d88a3dbc68 misc/t-raw.pl

chart  view on Meta::CPAN

$|=1;

# uncomment this to run the ### lines
# use Smart::Comments;

if (@ARGV >= 1 && ($ARGV[0] eq '--subprocess' || $ARGV[0] eq '--emacs')) {
  binmode (STDOUT, ':utf8') or die;
  binmode (STDERR, ':utf8') or die;

} else {
  # locale encoding conversion on the tty, wide-chars everywhere internally
  require Encode::Locale;
  require PerlIO::encoding;
  unless (binmode(STDIN, ":encoding(console_in)")
          && binmode(STDOUT, ":encoding(console_out)")) {
    warn "Cannot set :encoding on stdin/out: $!\n";
  }
  # Not sure coding on STDERR is a good idea, could loop trying to print.
  # binmode(STDERR, ":encoding(console_out)")

  # Old code:
  #
  # # version 0.06 for bug fix of a struct size for perl 5.10 (there's some
  # # fragile duplication)
  # require Encode;           # Encode::PERLQQ
  # require PerlIO::locale; PerlIO::locale->VERSION(0.06);
  # { no warnings 'once';
  #   local $PerlIO::encoding::fallback = Encode::PERLQQ; # \x{1234} style
  #   (binmode (STDOUT, ':locale') && binmode (STDERR, ':locale'))
  #     or die "Cannot set :encoding on stdout/stderr: $!\n";
  # }
  # Makefile: 'PerlIO::locale' => '0.06',
  # , libperlio-locale-perl (>= 0.06)
}

my $option_output;
my $option_mode;
my @args;

{
  # callback option arg in perl 5.8 is a string, but in 5.10 it's a
  # Getopt::Long::Callback object, must stringize to get the plain name
  my $set_mode = sub {

chart  view on Meta::CPAN

#
sub initfile {
  my ($filename) = @_;
  if (! -e $filename) { return; }
  $! = 0;
  my $ret = do $filename;
  if (! defined $ret) {
    my $display_filename = Glib::filename_display_name($filename);
    if ($@) {
      my $err = $@;
      unless (utf8::is_utf8($err)) { $err = Encode::decode('locale',$err); }
      print __x("chart: error in {filename}\n{error}\n  (starting anyway)\n",
                filename => $display_filename,
                error => $err);
    } elsif ($! != 0) {
      my $err = Glib::strerror($!);
      print __x("chart: cannot read {filename}: {error}\n  (starting anyway)\n",
                filename => $display_filename,
                error => $err);
    } else {
      print __x("chart: {filename} didn't end with a true value\n",

debian/control  view on Meta::CPAN

Section: misc
Priority: optional
Build-Depends: cdbs, debhelper (>= 5), texinfo, libfile-slurp-perl
Maintainer: Kevin Ryde <user42_kevin@yahoo.com.au>
Standards-Version: 4.2.1
Homepage: http://user42.tuxfamily.org/chart/index.html
Bugs: mailto:user42_kevin@yahoo.com.au

Package: chart
Architecture: all
Depends: perl (>= 5.10), libclass-singleton-perl (>= 1.4), libclass-weaksingleton-perl, libconstant-defer-perl, libdate-calc-perl (>= 5.0), libdbd-sqlite3-perl (>= 1.27), libdbi-perl, libencode-locale-perl (>= 0.02), libfile-homedir-perl (>= 0.61), l...
Recommends: libcrypt-ssleay-perl, libdevel-stacktrace-perl (>= 1.19), libintl-xs-perl (>= 1.19), libset-intspan-fast-xs-perl (>= 0.05), libspreadsheet-parseexcel-perl
Suggests: bash-completion, emacs | emacsen, libbsd-resource-perl, libdevel-arena-perl, libdevel-findblessedrefs-perl, libdevel-mallinfo-perl, libfinance-quote-perl, libfinance-ta-perl, libgt-perl, sensible-utils
Description: Stock and commodity charting
 Chart displays stock and commodity charts from downloaded data.
 .
 Share quotes and data from Yahoo and some other sources.  Fund
 quotes and data from MLC and Yahoo (US funds).
 .
 Chart is written in Perl using Gtk2-Perl to for the Gtk toolkit.
 Extensions and customizations can be made using Perl.

devel/DownloadDialog.t  view on Meta::CPAN


use lib 't';
use MyTestHelpers;
BEGIN { MyTestHelpers::nowarnings() }

require App::Chart::Gtk2::DownloadDialog;

#------------------------------------------------------------------------------

require Gtk2;
Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
my $have_display = Gtk2->init_check;

SKIP: {
  $have_display or skip 'due to no DISPLAY available', 1;

  {
    my $dialog = App::Chart::Gtk2::DownloadDialog->new;
    require Scalar::Util;
    Scalar::Util::weaken ($dialog);
    $dialog->destroy;

devel/Main.t  view on Meta::CPAN

use lib 't';
use MyTestHelpers;
BEGIN { MyTestHelpers::nowarnings() }
use AppChartTestHelpers;

require App::Chart::Gtk2::Main;

#-----------------------------------------------------------------------------

require Gtk2;
Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
my $have_display = Gtk2->init_check;

# Test::Weaken 3 for "contents"
my $have_test_weaken = eval "use Test::Weaken 3; 1";
if (! $have_test_weaken) {
  diag "Test::Weaken 3 not available -- $@";
}


#-----------------------------------------------------------------------------

devel/VacuumDialog.t  view on Meta::CPAN

use warnings;

use Test::More 0.82 tests => 3;

use lib 't';
use MyTestHelpers;
BEGIN { MyTestHelpers::nowarnings() }

require App::Chart::Gtk2::VacuumDialog;
require Gtk2;
Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
my $have_display = Gtk2->init_check;

#------------------------------------------------------------------------------

SKIP: {
  $have_display or skip 'due to no DISPLAY available', 2;

  {
    my $dialog = App::Chart::Gtk2::VacuumDialog->new;
    $dialog->destroy;

devel/generate-gt-names.pl  view on Meta::CPAN

use strict;
use warnings;
use Module::Find;
use Module::Util;
use File::Slurp;
use Data::Dumper;
use POSIX ();

my $option_verbose = 1;

POSIX::setlocale(POSIX::LC_MESSAGES(), 'C');

my @modules = Module::Find::findsubmod ('GT::Indicators');
foreach my $module (@modules) {
  my $filename = Module::Util::find_installed ($module)
    || die "oops $module filename not found";

  my $key = $module;
  $key =~ s/^GT::Indicators:://;

  my $content = File::Slurp::slurp ($filename);

devel/generate-indicator-model.pl  view on Meta::CPAN

use Module::Util;
use Data::Dumper;
use POSIX ();

my $option_verbose = 0;
if (($ARGV[0]||'') eq '--verbose') {
  $option_verbose = 1;
  shift @ARGV;
}

POSIX::setlocale(POSIX::LC_MESSAGES(), 'C');

my $toplevel_dir = File::Spec->catdir ($FindBin::Bin, File::Spec->updir);
my $manifest_file = File::Spec->catfile ($toplevel_dir, 'MANIFEST');
my $manifest = ExtUtils::Manifest::maniread ($manifest_file);

my @files = keys %$manifest;
@files = grep {m{^lib/App/Chart/Series/Derived/}} @files;
my @modules = map {Module::Util::path_to_module(substr($_,4))} @files;

my @data;

devel/langinfo.c  view on Meta::CPAN

   details.

   You should have received a copy of the GNU General Public License
   along with Chart.  If not, see <http://www.gnu.org/licenses/>.
*/

#define _GNU_SOURCE

#include <nl_types.h>
#include <langinfo.h>
#include <locale.h>
#include <stdio.h>

int
main (void)
{
  nl_item key;
  char *p, *l;
  int i, n;

  key = ERA;
  key = ALT_DIGITS;
  
  putenv ("LANGUAGE=ja_JP");
  putenv ("LANG=ja_JP");
  l = setlocale (LC_ALL, "");
  printf ("locale \"%s\"\n", l);

  p = nl_langinfo (key);
  printf ("key %#X %p '%s'\n", key, p, p);

  for (n = 0; ; n++) {
    int len = strlen(p);
    if (len == 0) break;

    printf ("  %d %p '%s'", n, p, p);
    for (i = 0; i < len; i++) {

devel/run-diagnostics.pl  view on Meta::CPAN


if (($ARGV[0]//'') eq '--db') {
  require App::Chart::DBI;
  App::Chart::DBI->instance;
}

my $str = App::Chart::Gtk2::Diagnostics->str();
print "$progname: length ", length($str), "\n";
print $str;

Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
Gtk2->init;
my $dialog = App::Chart::Gtk2::Diagnostics->popup;

my $textview = $dialog->{'textview'};
print "$progname: textview font ",$textview->style->font_desc->to_string,"\n";

Gtk2->main;
exit 0;


devel/run-haxis.pl  view on Meta::CPAN

# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.


use strict;
use warnings;
use Gtk2 '-init';
use POSIX qw(setlocale LC_ALL strftime);
use App::Chart::Gtk2::HAxis;
use App::Chart::Gtk2::HScale;
use App::Chart::Timebase::Months;

use FindBin;
my $progname = $FindBin::Script;

{
  $ENV{'LANG'} = 'ja_JP';
  setlocale(LC_ALL, ''); # or die;
  my $tb = App::Chart::Timebase::Months->new_from_iso ('1970-01-01');
  print $tb->strftime ('%a %B', 1),"\n";
}

my $toplevel = Gtk2::Window->new('toplevel');
$toplevel->signal_connect (destroy => sub { Gtk2->main_quit });
$toplevel->set_default_size (1000, -1);

my $vbox = Gtk2::VBox->new;
$toplevel->add ($vbox);

devel/run-intraday.pl  view on Meta::CPAN

use FindBin;
my $progname = $FindBin::Script;

$App::Chart::option{'verbose'} = 1;

{
  my $symbol = $ARGV[0] || '^GSPC';
  my @list = App::Chart::IntradayHandler->handlers_for_symbol($symbol);
  print "$progname: handlers for $symbol: ",Dumper (\@list);

  Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
  Gtk2->init;
  my $dialog = App::Chart::Gtk2::IntradayDialog->popup ($symbol);
  print "$progname: dialog $dialog\n";
  $dialog->signal_connect_after
    (response => sub {
       my ($self, $response) = @_;
       print "$progname: response $response\n";
       if ($response eq 'close' || $response eq 'delete-event') {
         Gtk2->main_quit;
       }

doc/chart.texi  view on Meta::CPAN

@end multitable
@end quotation



@c ---------------------------------------------------------------------------
@node Internationalization, Emacs, Data Sources, Top
@chapter Internationalization
@cindex Internationalization
@cindex Localization
@cindex Preferences, locale

Chart is written in English, but has support for various localizations,
selected by the usual system mechanisms.

@table @asis
@item Numbers
@cindex Decimal point
@cindex Thousands character
Numbers are shown with the locale decimal point and thousands separator.  You
can also customize these in your @file{init.pl}.

@item Dates
@cindex Date format
Dates are shown in the locale format, or the usual C language default is
@samp{mm/dd/yy}.  You can also customize this in your @file{init.pl} to set a
personal preference, like the month as a name instead of a number.

@item Messages
@cindex Message translations
@cindex Translations, messages
Message strings are translated into the selected language, when a translation
is available.  Gtk has a good set of translations for the standard menus and
dialogs, but for Chart specifics there's almost nothing yet.
@c

doc/chart.texi  view on Meta::CPAN

@item Stock and commodity names
@cindex Stock name translations
@cindex Commodity name translations
@cindex Name translations
@cindex Weblink
Names are downloaded in the selected or highest preference language, when
there's a choice.  Weblinks to company information or the exchange home page
likewise.

@item Annotations
@cindex Annotation locale
@cindex UTF-8
Annotation notes (@pxref{Annotations}) can be entered with unicode characters.

@c , Dividends
@c and dividends (@pxref{Dividends}) ...
@end table

@c @ifinfo
@c @sp 1
@c @end ifinfo
@section Locale Selection
@cindex Locale selection

@cindex Language
@cindex @env{LANG}
On a typical Unix/POSIX-style system the locale is selected with the
@env{LANG} environment variable, set to a language code and optional territory
and charset.  For example US English,

@example
LANG=en_US
export LANG
@end example

This is often set by the system administrator, but you can do it yourself in
your @file{~/.profile} (@pxref{Bash Startup Files,,, bashref, Bash Features}).

@cindex Language codes
@cindex Country codes
Language and country codes can be found in @ref{Language Codes,,, gettext, GNU
@command{gettext} utilities}, and @ref{Country Codes,,, gettext, GNU
@command{gettext} utilities}.  Usually there's only a few combinations
available on a system, run @samp{locale -a} to see them.

@cindex @env{LANGUAGE}
Additionally, on a GNU system the @env{LANGUAGE} environment variable gives a
list of language preferences for message translations (@pxref{Using
gettextized software,, User influence on @code{gettext}, libc, GNU C Library
Reference Manual}).  For example to have Italian preferred, otherwise Spanish,
otherwise English,

@example
LANGUAGE=it_IT:es:en

doc/chart.texi  view on Meta::CPAN

@findex @code{chart-quote}
@kbd{M-x chart-quote} displays a quote for a given symbol in the message area.
It prompts for the symbol with default a symbol at point.  @key{Tab}
completion is available (@pxref{Completion,,, emacs, The Emacs Editor}) using
the database symbols, favourites list, and previously requested symbols.

@findex @code{chart-quote-at-point}
@kbd{M-x chart-quote-at-point} displays a quote for the symbol at point,
without prompting.

The language, date formats, etc, follow the Chart locale selection described
in @ref{Internationalization}.  Emacs @kbd{M-x set-language-environment} and
other Emacs setups don't influence the display.


@section UTF-8
@cindex Asian characters in Emacs
@cindex XEmacs UTF-8

UTF-8 is used in Emacs, the same as in the Gtk GUI display.  This is easiest
to implement, and should mean whatever is seen in the GUI can be seen in
Emacs.

@table @asis
@cindex MULE-UCS
@item Emacs 21
If you use an Asian locale then you probably know Emacs 21 has limited support
for Asian parts of UTF-8.  The typical symptom is @samp{\207}, @samp{\221} etc
in the display.  Install the MULE-UCS package to add to the builtin
characters: @uref{http://www.m17n.org}

@item XEmacs 21
If you use XEmacs 21 you probably know it has no builtin UTF-8.  To run
@code{chartprog.el} you must get one of the add-ons providing that.  MULE-UCS
is recommended (@uref{http://www.m17n.org}), and @code{chartprog.el} will
attempt to load it automatically.
@end table

examples/intraday.pl  view on Meta::CPAN

';
              exit 0;
            }
           ) or exit 1;
if (@ARGV > 1) {
  print "intraday.pl: only one symbol allowed\n";
  exit 1;
}
my $symbol = $ARGV[0] || '';

Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
Gtk2->init;
my $dialog = App::Chart::Gtk2::IntradayDialog->new (symbol => $symbol,
                                              mode   => $mode);
$dialog->signal_connect (destroy => sub { Gtk2->main_quit; });
$dialog->show;
Gtk2->main;
exit 0;

__END__

lib/App/Chart.pm  view on Meta::CPAN

    return File::Spec->catdir($home, 'Chart');
  }
};

use constant::defer chart_dirbroadcast => sub {
  require App::Chart::Glib::Ex::DirBroadcast;
  return App::Chart::Glib::Ex::DirBroadcast->new
    (File::Spec->catdir(chart_directory(), 'broadcast'));
};

# force LC_NUMERIC to the locale, whereas perl normally runs with "C"
use constant::defer number_formatter => sub {
  require Number::Format;
  my $oldlocale = POSIX::setlocale(POSIX::LC_NUMERIC());
  POSIX::setlocale (POSIX::LC_NUMERIC(), "");
  my $nf = Number::Format->new;
  POSIX::setlocale (POSIX::LC_NUMERIC(), $oldlocale);
  return $nf;
};

use constant { UP_COLOUR   => 'light green',
                 DOWN_COLOUR => 'pink',
                 BAND_COLOUR => 'blue',
                 GREY_COLOUR => 'grey' };

#------------------------------------------------------------------------------

lib/App/Chart/DownloadHandler.pm  view on Meta::CPAN

# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::DownloadHandler;
use 5.010;
use strict;
use warnings;
use sort 'stable'; # lexical in 5.10
use Carp;
use Encode;
use Encode::Locale;  # for coding system "locale"
use List::Util qw(min max);
use List::MoreUtils;
use POSIX::Wide;
use Locale::TextDomain ('App-Chart');

use App::Chart;
use App::Chart::Database;

use constant DEBUG => 0;

lib/App/Chart/DownloadHandler.pm  view on Meta::CPAN

    foreach my $symbol_group (@symbol_groups) {
      if ($self->{'proc_with_self'}) {
        $proc->($self, $symbol_group);
      } else {
        $proc->($symbol_group);
      }
    }
    1;
  }) {
    my $err = $@;
    unless (utf8::is_utf8($err)) { $err = Encode::decode('locale',$err); }
    $err = App::Chart::collapse_whitespace ($err);
    App::Chart::Download::download_message ("Download error: $err\n");
    return 0;
  }
  return 1;
}

sub available_tdate_for_symbol {
  my ($self, $symbol) = @_;

lib/App/Chart/EmacsMain.pm  view on Meta::CPAN


# ENHANCE-ME:
# remember which latests sent, only give 'update' for them


package App::Chart::EmacsMain;
use 5.010;
use strict;
use warnings;
use Encode;
use Encode::Locale;  # for coding system "locale"
use IO::Handle;
use Lisp::Reader;
use Lisp::Printer ('lisp_print');
use Lisp::Symbol ('symbol');
use POSIX ();
use Regexp::Common 'whitespace';
use Locale::TextDomain 'App-Chart';

use App::Chart;

lib/App/Chart/EmacsMain.pm  view on Meta::CPAN

  if (DEBUG) { print "Changed: ",join(' ',keys %$changed),"\n"; }
  emacs_write (symbol('update'), [ keys %$changed ]);

  # this is a bit excessive, only really want to know if new symbols have
  # been added to the latest quotes
  completions_update();
}

sub exception_handler {
  my ($msg) = @_;
  # perhaps some modules like LWP will put through a locale $! or similar
  unless (utf8::is_utf8($msg)) { $msg = Encode::decode('locale',$msg); }
  if (DEBUG) { print "Error ", $msg; }

  $msg =~ s/$RE{ws}{crop}//g;      # leading and trailing whitespace

  # $trace->as_string has non-ascii de-fanged to something printable, so it
  # can go straight out
  #
  my $backtrace;
  if (eval { require Devel::StackTrace; }) {
    $backtrace = Devel::StackTrace->new->as_string;

lib/App/Chart/Gtk2/IntradayImage.pm  view on Meta::CPAN

# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::Gtk2::IntradayImage;
use 5.010;
use strict;
use warnings;
use Carp;
use Gtk2 1.220;
use Encode;
use Encode::Locale;  # for coding system "locale"
use List::Util qw(min max);
use Locale::TextDomain ('App-Chart');

use Gtk2::Ex::Units;
use Gtk2::Ex::PixbufBits;
use App::Chart::Database;
use App::Chart::Gtk2::GUI;

# uncomment this to run the ### lines
# use Smart::Comments;

lib/App/Chart/Gtk2/IntradayImage.pm  view on Meta::CPAN

  if (eval {
    $loader->write ($image);
    $loader->close ();
    $pixbuf = $loader->get_pixbuf;
    1 }) {
    return $pixbuf;
  } else {
    # Should be Glib::Error in $@ thrown by $loader, but allow for plain
    # string too.
    my $err = "$@";
    unless (utf8::is_utf8($err)) { $err = Encode::decode('locale',$err); }
    return $err;
  }
}

sub _do_intraday_changed {
  my ($self, $symbol, $mode) = @_;
  ### IntradayImage _do_intraday_changed(): "\"$symbol\" \"$mode\"\n"
  if ($self->{'symbol'} eq $symbol && $self->{'mode'} eq $mode) {
    # new image (or new no image)
    delete $self->{'xor_background'};  # new colour scheme

lib/App/Chart/Gtk2/Main.pm  view on Meta::CPAN

  }

  require Gtk2::Ex::ErrorTextDialog::Handler;
  Glib->install_exception_handler
    (\&Gtk2::Ex::ErrorTextDialog::Handler::exception_handler);
  if (0) {
    ## no critic (RequireLocalizedPunctuationVars)
      $SIG{'__WARN__'} = \&Gtk2::Ex::ErrorTextDialog::Handler::exception_handler;
  }

  Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
  Gtk2->init;

  Glib::Idle->add
      (sub {
         my $self = $class->instance;
         $self->signal_connect (destroy => sub { Gtk2->main_quit; });

         main::initfile (File::Spec->catfile(App::Chart::chart_directory(),
                                             'gui.pl'));

lib/App/Chart/Gtk2/TickerMain.pm  view on Meta::CPAN


# 'activate' on quit menu item
sub _do_quit {
  my ($item, $ref_weak_self) = @_;
  my $self = $$ref_weak_self || return;
  $self->destroy;
}

sub main {
  my ($class, $args) = @_;
  Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
  Gtk2->init;

  require Gtk2::Ex::ErrorTextDialog::Handler;
  Glib->install_exception_handler
    (\&Gtk2::Ex::ErrorTextDialog::Handler::exception_handler);
  {
    ## no critic (RequireLocalizedPunctuationVars)
    $SIG{'__WARN__'} = \&Gtk2::Ex::ErrorTextDialog::Handler::exception_handler;
  }
  my $self = $class->new;

lib/App/Chart/Gtk2/WatchlistDialog.pm  view on Meta::CPAN

    }
  }
  return $pos;
}

#------------------------------------------------------------------------------

sub main {
  my ($class, $args) = @_;

  Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
  Gtk2->init;

  require Gtk2::Ex::ErrorTextDialog::Handler;
  Glib->install_exception_handler
    (\&Gtk2::Ex::ErrorTextDialog::Handler::exception_handler);
  ## no critic (RequireLocalizedPunctuationVars)
  $SIG{'__WARN__'} = \&Gtk2::Ex::ErrorTextDialog::Handler::exception_handler;
  ## use critic

  require App::Chart::Gtk2::TickerMain;

lib/App/Chart/LatestHandler.pm  view on Meta::CPAN

#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

package App::Chart::LatestHandler;
use 5.010;
use strict;
use warnings;
use Carp;
use Encode;
use Encode::Locale;  # for coding system "locale"
use List::Util;
# use Locale::TextDomain ('App-Chart');

use App::Chart;
use App::Chart::Database;
use App::Chart::Download;
use App::Chart::Sympred;

# uncomment this to run the ### lines
# use Smart::Comments;

lib/App/Chart/LatestHandler.pm  view on Meta::CPAN

        (# $App::Chart::option{'verbose'} &&
         eval { require Devel::StackTrace; 1 }
         ? sub {
           { local $@; $trace = Devel::StackTrace->new; }
           die $@;
         }
         : $SIG{'__DIE__'});
      eval { $proc->(\@this_list); 1 };
    }) {
      my $err = $@;
      unless (utf8::is_utf8($err)) { $err = Encode::decode('locale',$err); }
      print "Latest download error: ", $err, "\n";
      if (defined $trace) {
        print $trace->as_string, "\n";
      }
    }
  }
}

sub expand_arguments {
  my ($args) = @_;

lib/App/Chart/doc/chart.html  view on Meta::CPAN

</div>
</div>
<div class="chapter-level-extent" id="Internationalization">
<div class="nav-panel">
<p>
Next: <a href="#Emacs" accesskey="n" rel="next">Emacs</a>, Previous: <a href="#Data-Sources" accesskey="p" rel="prev">Data Sources</a>, Up: <a href="#Top" accesskey="u" rel="up">Chart</a> &nbsp; [<a href="#Concept-Index" title="Index" rel="index">Ind...
</div>
<h2 class="chapter" id="Internationalization-1"><span>17 Internationalization<a class="copiable-link" href="#Internationalization-1"> &para;</a></span></h2>
<a class="index-entry-id" id="index-Internationalization"></a>
<a class="index-entry-id" id="index-Localization"></a>
<a class="index-entry-id" id="index-Preferences_002c-locale"></a>

<p>Chart is written in English, but has support for various localizations,
selected by the usual system mechanisms.
</p>
<dl class="table">
<dt><a class="index-entry-id" id="index-Thousands-character"></a>
<a id="index-Decimal-point"></a><span>Numbers<a class="copiable-link" href="#index-Decimal-point"> &para;</a></span></dt>
<dd><p>Numbers are shown with the locale decimal point and thousands separator.  You
can also customize these in your <samp class="file">init.pl</samp>.
</p>
</dd>
<dt><a id="index-Date-format"></a><span>Dates<a class="copiable-link" href="#index-Date-format"> &para;</a></span></dt>
<dd><p>Dates are shown in the locale format, or the usual C language default is
&lsquo;<samp class="samp">mm/dd/yy</samp>&rsquo;.  You can also customize this in your <samp class="file">init.pl</samp> to set a
personal preference, like the month as a name instead of a number.
</p>
</dd>
<dt><a class="index-entry-id" id="index-Translations_002c-messages"></a>
<a id="index-Message-translations"></a><span>Messages<a class="copiable-link" href="#index-Message-translations"> &para;</a></span></dt>
<dd><p>Message strings are translated into the selected language, when a translation
is available.  Gtk has a good set of translations for the standard menus and
dialogs, but for Chart specifics there&rsquo;s almost nothing yet.
</p>

lib/App/Chart/doc/chart.html  view on Meta::CPAN

<dt><a class="index-entry-id" id="index-Commodity-name-translations"></a>
<a class="index-entry-id" id="index-Name-translations"></a>
<a class="index-entry-id" id="index-Weblink"></a>
<a id="index-Stock-name-translations"></a><span>Stock and commodity names<a class="copiable-link" href="#index-Stock-name-translations"> &para;</a></span></dt>
<dd><p>Names are downloaded in the selected or highest preference language, when
there&rsquo;s a choice.  Weblinks to company information or the exchange home page
likewise.
</p>
</dd>
<dt><a class="index-entry-id" id="index-UTF_002d8"></a>
<a id="index-Annotation-locale"></a><span>Annotations<a class="copiable-link" href="#index-Annotation-locale"> &para;</a></span></dt>
<dd><p>Annotation notes (see <a class="pxref" href="#Annotations">Annotations</a>) can be entered with unicode characters.
</p>
</dd>
</dl>

<ul class="mini-toc">
<li><a href="#Locale-Selection" accesskey="1">Locale Selection</a></li>
</ul>
<div class="section-level-extent" id="Locale-Selection">
<h3 class="section"><span>17.1 Locale Selection<a class="copiable-link" href="#Locale-Selection"> &para;</a></span></h3>
<a class="index-entry-id" id="index-Locale-selection"></a>

<a class="index-entry-id" id="index-Language"></a>
<a class="index-entry-id" id="index-LANG"></a>
<p>On a typical Unix/POSIX-style system the locale is selected with the
<code class="env">LANG</code> environment variable, set to a language code and optional territory
and charset.  For example US English,
</p>
<div class="example">
<pre class="example-preformatted">LANG=en_US
export LANG
</pre></div>

<p>This is often set by the system administrator, but you can do it yourself in
your <samp class="file">~/.profile</samp> (see <a data-manual="bashref" href="http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html">Bash Startup Files</a> in <cite class="cite">Bash Features</cite>).
</p>
<a class="index-entry-id" id="index-Language-codes"></a>
<a class="index-entry-id" id="index-Country-codes"></a>
<p>Language and country codes can be found in <a data-manual="gettext" href="https://www.gnu.org/software/gettext/manual/gettext.html#Language-Codes">Language Codes</a> in <cite class="cite">GNU
<code class="command">gettext</code> utilities</cite>, and <a data-manual="gettext" href="https://www.gnu.org/software/gettext/manual/gettext.html#Country-Codes">Country Codes</a> in <cite class="cite">GNU
<code class="command">gettext</code> utilities</cite>.  Usually there&rsquo;s only a few combinations
available on a system, run &lsquo;<samp class="samp">locale -a</samp>&rsquo; to see them.
</p>
<a class="index-entry-id" id="index-LANGUAGE"></a>
<p>Additionally, on a GNU system the <code class="env">LANGUAGE</code> environment variable gives a
list of language preferences for message translations (see <a data-manual="libc" href="https://www.gnu.org/software/libc/manual/html_mono/libc.html#Using-gettextized-software">User influence on <code class="code">gettext</code></a> in <cite class="ci...
Reference Manual</cite>).  For example to have Italian preferred, otherwise Spanish,
otherwise English,
</p>
<div class="example">
<pre class="example-preformatted">LANGUAGE=it_IT:es:en
export LANGUAGE

lib/App/Chart/doc/chart.html  view on Meta::CPAN

<a class="index-entry-id" id="index-chart_002dquote"></a>
<p><kbd class="kbd">M-x chart-quote</kbd> displays a quote for a given symbol in the message area.
It prompts for the symbol with default a symbol at point.  <kbd class="key">Tab</kbd>
completion is available (see <a data-manual="emacs" href="https://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Completion">Completion</a> in <cite class="cite">The Emacs Editor</cite>) using
the database symbols, favourites list, and previously requested symbols.
</p>
<a class="index-entry-id" id="index-chart_002dquote_002dat_002dpoint"></a>
<p><kbd class="kbd">M-x chart-quote-at-point</kbd> displays a quote for the symbol at point,
without prompting.
</p>
<p>The language, date formats, etc, follow the Chart locale selection described
in <a class="ref" href="#Internationalization">Internationalization</a>.  Emacs <kbd class="kbd">M-x set-language-environment</kbd> and
other Emacs setups don&rsquo;t influence the display.
</p>

</div>
<div class="section-level-extent" id="UTF_002d8">
<h3 class="section"><span>18.2 UTF-8<a class="copiable-link" href="#UTF_002d8"> &para;</a></span></h3>
<a class="index-entry-id" id="index-Asian-characters-in-Emacs"></a>
<a class="index-entry-id" id="index-XEmacs-UTF_002d8"></a>

<p>UTF-8 is used in Emacs, the same as in the Gtk GUI display.  This is easiest
to implement, and should mean whatever is seen in the GUI can be seen in
Emacs.
</p>
<dl class="table">
<dt><a id="index-MULE_002dUCS"></a><span>Emacs 21<a class="copiable-link" href="#index-MULE_002dUCS"> &para;</a></span></dt>
<dd><p>If you use an Asian locale then you probably know Emacs 21 has limited support
for Asian parts of UTF-8.  The typical symptom is &lsquo;<samp class="samp">\207</samp>&rsquo;, &lsquo;<samp class="samp">\221</samp>&rsquo; etc
in the display.  Install the MULE-UCS package to add to the builtin
characters: <a class="uref" href="http://www.m17n.org">http://www.m17n.org</a>
</p>
</dd>
<dt>XEmacs 21</dt>
<dd><p>If you use XEmacs 21 you probably know it has no builtin UTF-8.  To run
<code class="code">chartprog.el</code> you must get one of the add-ons providing that.  MULE-UCS
is recommended (<a class="uref" href="http://www.m17n.org">http://www.m17n.org</a>), and <code class="code">chartprog.el</code> will
attempt to load it automatically.

lib/App/Chart/doc/chart.html  view on Meta::CPAN

<tr><td></td><td class="printindex-index-entry"><a href="#index-Add_002don-indicators">Add-on indicators</a></td><td class="printindex-index-section"><a href="#Other-Indicator-Packages">Other Indicator Packages</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ADX">ADX</a></td><td class="printindex-index-section"><a href="#Directional-Movement-Index">Directional Movement Index</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Alert-levels">Alert levels</a></td><td class="printindex-index-section"><a href="#Annotations">Annotations</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Alert-list">Alert list</a></td><td class="printindex-index-section"><a href="#Annotations">Annotations</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Alerts-list">Alerts list</a></td><td class="printindex-index-section"><a href="#Symbol-Lists">Symbol Lists</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-All-list">All list</a></td><td class="printindex-index-section"><a href="#Symbol-Lists">Symbol Lists</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-American-Stock-Exchange">American Stock Exchange</a></td><td class="printindex-index-section"><a href="#Yahoo-Exchanges">Yahoo Exchanges</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-AMEX">AMEX</a></td><td class="printindex-index-section"><a href="#Yahoo-Finance">Yahoo Finance</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-AMEX-1">AMEX</a></td><td class="printindex-index-section"><a href="#Yahoo-Exchanges">Yahoo Exchanges</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Amsterdam-Stock-Exchange">Amsterdam Stock Exchange</a></td><td class="printindex-index-section"><a href="#Yahoo-Exchanges">Yahoo Exchanges</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Annotation-locale">Annotation locale</a></td><td class="printindex-index-section"><a href="#Internationalization">Internationalization</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Annotations">Annotations</a></td><td class="printindex-index-section"><a href="#Annotations">Annotations</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Appel_002c-Gerard">Appel, Gerard</a></td><td class="printindex-index-section"><a href="#MACD">MACD</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Argentina">Argentina</a></td><td class="printindex-index-section"><a href="#Yahoo-Exchanges">Yahoo Exchanges</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Arms_002c-Richard">Arms, Richard</a></td><td class="printindex-index-section"><a href="#Ease-of-Movement">Ease of Movement</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Aroon">Aroon</a></td><td class="printindex-index-section"><a href="#Aroon">Aroon</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ASI">ASI</a></td><td class="printindex-index-section"><a href="#Accumulative-Swing-Index">Accumulative Swing Index</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Asian-characters-in-Emacs">Asian characters in Emacs</a></td><td class="printindex-index-section"><a href="#Emacs">Emacs</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-ATR">ATR</a></td><td class="printindex-index-section"><a href="#Average-True-Range">Average True Range</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Australia">Australia</a></td><td class="printindex-index-section"><a href="#Yahoo-Exchanges">Yahoo Exchanges</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Australian-dollar">Australian dollar</a></td><td class="printindex-index-section"><a href="#Reserve-Bank-of-Australia">Reserve Bank of Australia</a></td></tr>

lib/App/Chart/doc/chart.html  view on Meta::CPAN

<tr><td></td><td class="printindex-index-entry"><a href="#index-Page_002dDown"><kbd class="key">Page-Down</kbd></a></td><td class="printindex-index-section"><a href="#Main-Window">Main Window</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Page_002dUp"><kbd class="key">Page-Up</kbd></a></td><td class="printindex-index-section"><a href="#Main-Window">Main Window</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Parabolic-SAR">Parabolic SAR</a></td><td class="printindex-index-section"><a href="#Parabolic-SAR">Parabolic SAR</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Paris-Stock-Exchange">Paris Stock Exchange</a></td><td class="printindex-index-section"><a href="#Yahoo-Exchanges">Yahoo Exchanges</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PDF-manual">PDF manual</a></td><td class="printindex-index-section"><a href="#Installing">Installing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Pee_002c-M_002e-H_002e">Pee, M. H.</a></td><td class="printindex-index-section"><a href="#Trend-Intensity-Index">Trend Intensity Index</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PFE">PFE</a></td><td class="printindex-index-section"><a href="#Polarized-Fractal-Efficiency">Polarized Fractal Efficiency</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PGO">PGO</a></td><td class="printindex-index-section"><a href="#Pretty-Good-Oscillator">Pretty Good Oscillator</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Polarized-fractal-efficiency">Polarized fractal efficiency</a></td><td class="printindex-index-section"><a href="#Polarized-Fractal-Efficiency">Polarized Fractal Efficiency</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PostScript-manual">PostScript manual</a></td><td class="printindex-index-section"><a href="#Installing">Installing</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Preferences_002c-locale">Preferences, locale</a></td><td class="printindex-index-section"><a href="#Internationalization">Internationalization</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Pretty-good-oscillator">Pretty good oscillator</a></td><td class="printindex-index-section"><a href="#Pretty-Good-Oscillator">Pretty Good Oscillator</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Price-and-volume-trend">Price and volume trend</a></td><td class="printindex-index-section"><a href="#Price-and-Volume-Trend">Price and Volume Trend</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-PVT">PVT</a></td><td class="printindex-index-section"><a href="#Price-and-Volume-Trend">Price and Volume Trend</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Concept-Index_cp_letter-Q">Q</th></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-QStick">QStick</a></td><td class="printindex-index-section"><a href="#QStick">QStick</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Quadratic-mean">Quadratic mean</a></td><td class="printindex-index-section"><a href="#Ulcer-Index">Ulcer Index</a></td></tr>
<tr><td></td><td class="printindex-index-entry"><a href="#index-Quadratic-mean-1">Quadratic mean</a></td><td class="printindex-index-section"><a href="#Standard-Deviation">Standard Deviation</a></td></tr>
<tr><td colspan="3"><hr></td></tr>
<tr><th id="Concept-Index_cp_letter-R">R</th></tr>

maybe/Build-PL  view on Meta::CPAN

                 # strings
                 'Locale::TextDomain' => '1.16',

                 # dunno what version actually needed, at least 5.803 for a
                 # working "decoded_content".
                 LWP => '5.803',

                 'Math::Round' => 0,
                 'Module::Load' => 0,

                 # need 1.60 for fixups to initializing in locales like
                 # de_DE with "."  as the monetary thousands sep
                 'Number::Format' => '1.60',

                 'Perl6::Slurp' => 0,
                 'Proc::SyncExec' => 0,
                 'Regexp::Common' => 0,
                 'Scope::Guard' => 0,

                 # 1.10 for contains_all_range()
                 'Set::IntSpan::Fast' => '1.10',

maybe/SymbolHistory.t  view on Meta::CPAN

use lib 't';
use MyTestHelpers;

use Test::More 0.82 tests => 7;

SKIP: { eval 'use Test::NoWarnings; 1'
          or skip 'Test::NoWarnings not available', 1; }

require App::Chart::SymbolHistory;
require Gtk2;
Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
my $have_display = Gtk2->init_check;

#-----------------------------------------------------------------------------
# back_menu(), forward_menu()

SKIP: {
  $have_display or skip 'due to no DISPLAY available', 4;

  my $history = App::Chart::SymbolHistory->new;

misc/gc.pl  view on Meta::CPAN

# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

use strict;
use warnings;
use Data::Dumper;
use Gtk2;

Gtk2->disable_setlocale;  # leave LC_NUMERIC alone for version nums
Gtk2->init;

my $toplevel = Gtk2::Window->new ('toplevel');
print "cmap ", $toplevel->get_colormap,"\n";
print "win  ", $toplevel->window||'undef',"\n";
#print "win  ", $toplevel->get_depth,"\n";

my $label = Gtk2::Label->new ('foo');
$toplevel->add ($label);
$toplevel->show_all;

misc/t-adjscale.pl  view on Meta::CPAN

# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
# details.
#
# You should have received a copy of the GNU General Public License along
# with Chart.  If not, see <http://www.gnu.org/licenses/>.

use strict;
use warnings;
use Gtk2 '-init';
use POSIX qw(setlocale LC_ALL strftime);
use App::Chart::Gtk2::AdjScale;
use Data::Dumper;

my $toplevel = Gtk2::Window->new('toplevel');
$toplevel->set_size_request (300, 200);
$toplevel->realize;

my $adj = App::Chart::Gtk2::AdjScale->new (widget => $toplevel);
$adj->set_page_range (0, 100_000);
print Dumper ($adj);

misc/t-locale.c  view on Meta::CPAN

  Chart is distributed in the hope that it will be useful, but WITHOUT ANY
  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  details.

  You should have received a copy of the GNU General Public License along
  with Chart.  If not, see <http://www.gnu.org/licenses/>.
*/

#include <stdio.h>
#include <locale.h>
int
main (void)
{
  char *l;
  struct lconv* lconv;
  
  l = setlocale (LC_ALL, "");
  printf ("%s\n", l);

  l = setlocale (LC_MONETARY, "");
  printf ("%s\n", l);

  l = setlocale (LC_NUMERIC, "C");
  printf ("%s\n", l);

  lconv = localeconv();
  printf ("dec  '%s'\n", lconv->decimal_point);
  printf ("thou '%s'\n", lconv->thousands_sep);
  return 0;
}



( run in 3.238 seconds using v1.01-cache-2.11-cpan-ceb78f64989 )