"""distutils.command.build_ext Implements the Distutils 'build_ext' command, for building extension modules (currently limited to C extensions, should accommodate C++ extensions ASAP).""" import contextlib import os import re import sys from distutils.core import Command from distutils.errors import * from distutils.sysconfig import customize_compiler, get_python_version from distutils.sysconfig import get_config_h_filename from distutils.dep_util import newer_group from distutils.extension import Extension from distutils.util import get_platform from distutils import log from . import py37compat from site import USER_BASE # An extension name is just a dot-separated list of Python NAMEs (ie. # the same as a fully-qualified module name). extension_name_re = re.compile \ (r'^[a-zA-Z_][a-zA-Z_0-9]*(\.[a-zA-Z_][a-zA-Z_0-9]*)*$') def show_compilers (): from distutils.ccompiler import show_compilers show_compilers() class build_ext(Command): description = "build C/C++ extensions (compile/link to build directory)" # XXX thoughts on how to deal with complex command-line options like # these, i.e. how to make it so fancy_getopt can suck them off the # command line and make it look like setup.py defined the appropriate # lists of tuples of what-have-you. # - each command needs a callback to process its command-line options # - Command.__init__() needs access to its share of the whole # command line (must ultimately come from # Distribution.parse_command_line()) # - it then calls the current command class' option-parsing # callback to deal with weird options like -D, which have to # parse the option text and churn out some custom data # structure # - that data structure (in this case, a list of 2-tuples) # will then be present in the command object by the time # we get to finalize_options() (i.e. the constructor # takes care of both command-line and client options # in between initialize_options() and finalize_options()) sep_by = " (separated by '%s')" % os.pathsep user_options = [ ('build-lib=', 'b', "directory for compiled extension modules"), ('build-temp=', 't', "directory for temporary files (build by-products)"), ('plat-name=', 'p', "platform name to cross-compile for, if supported " "(default: %s)" % get_platform()), ('inplace', 'i', "ignore build-lib and put compiled extensions into the source " + "directory alongside your pure Python modules"), ('include-dirs=', 'I', "list of directories to search for header files" + sep_by), ('define=', 'D', "C preprocessor macros to define"), ('undef=', 'U', "C preprocessor macros to undefine"), ('libraries=', 'l', "external C libraries to link with"), ('library-dirs=', 'L', "directories to search for external C libraries" + sep_by), ('rpath=', 'R', "directories to search for shared C libraries at runtime"), ('link-objects=', 'O', "extra explicit link objects to include in the link"), ('debug', 'g', "compile/link with debugging information"), ('force', 'f', "forcibly build everything (ignore file timestamps)"), ('compiler=', 'c', "specify the compiler type"), ('parallel=', 'j', "number of parallel build jobs"), ('swig-cpp', None, "make SWIG create C++ files (default is C)"), ('swig-opts=', None, "list of SWIG command line options"), ('swig=', None, "path to the SWIG executable"), ('user', None, "add user include, library and rpath") ] boolean_options = ['inplace', 'debug', 'force', 'swig-cpp', 'user'] help_options = [ ('help-compiler', None, "list available compilers", show_compilers), ] def initialize_options(self): self.extensions = None self.build_lib = None self.plat_name = None self.build_temp = None self.inplace = 0 self.package = None self.include_dirs = None self.define = None self.undef = None self.libraries = None self.library_dirs = None self.rpath = None self.link_objects = None self.debug = None self.force = None self.compiler = None self.swig = None self.swig_cpp = None self.swig_opts = None self.user = None self.parallel = None def finalize_options(self): from distutils import sysconfig self.set_undefined_options('build', ('build_lib', 'build_lib'), ('build_temp', 'build_temp'), ('compiler', 'compiler'), ('debug', 'debug'), ('force', 'force'), ('parallel', 'parallel'), ('plat_name', 'plat_name'), ) if self.package is None: self.package = self.distribution.ext_package self.extensions = self.distribution.ext_modules # Make sure Python's include directories (for Python.h, pyconfig.h, # etc.) are in the include search path. py_include = sysconfig.get_python_inc() plat_py_include = sysconfig.get_python_inc(plat_specific=1) if self.include_dirs is None: self.include_dirs = self.distribution.include_dirs or [] if isinstance(self.include_dirs, str): self.include_dirs = self.include_dirs.split(os.pathsep) # If in a virtualenv, add its include directory # Issue 16116 if sys.exec_prefix != sys.base_exec_prefix: self.include_dirs.append(os.path.join(sys.exec_prefix, 'include')) # Put the Python "system" include dir at the end, so that # any local include dirs take precedence. self.include_dirs.extend(py_include.split(os.path.pathsep)) if plat_py_include != py_include: self.include_dirs.extend( plat_py_include.split(os.path.pathsep)) self.ensure_string_list('libraries') self.ensure_string_list('link_objects') # Life is easier if we're not forever checking for None, so # simplify these options to empty lists if unset if self.libraries is None: self.libraries = [] if self.library_dirs is None: self.library_dirs = [] elif isinstance(self.library_dirs, str): self.library_dirs = self.library_dirs.split(os.pathsep) if self.rpath is None: self.rpath = [] elif isinstance(self.rpath, str): self.rpath = self.rpath.split(os.pathsep) # for extensions under windows use different directories # for Release and Debug builds. # also Python's library directory must be appended to library_dirs if os.name == 'nt': # the 'libs' directory is for binary installs - we assume that # must be the *native* platform. But we don't really support # cross-compiling via a binary install anyway, so we let it go. self.library_dirs.append(os.path.join(sys.exec_prefix, 'libs')) if sys.base_exec_prefix != sys.prefix: # Issue 16116 self.library_dirs.append(os.path.join(sys.base_exec_prefix, 'libs')) if self.debug: self.build_temp = os.path.join(self.build_temp, "Debug") else: self.build_temp = os.path.join(self.build_temp, "Release") # Append the source distribution include and library directories, # this allows distutils on windows to work in the source tree self.include_dirs.append(os.path.dirname(get_config_h_filename())) _sys_home = getattr(sys, '_home', None) if _sys_home: self.library_dirs.append(_sys_home) # Use the .lib files for the correct architecture if self.plat_name == 'win32': suffix = 'win32' else: # win-amd64 suffix = self.plat_name[4:] new_lib = os.path.join(sys.exec_prefix, 'PCbuild') if suffix: new_lib = os.path.join(new_lib, suffix) self.library_dirs.append(new_lib) # For extensions under Cygwin, Python's library directory must be # appended to library_dirs if sys.platform[:6] == 'cygwin': if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(os.path.join(sys.prefix, "lib", "python" + get_python_version(), "config")) else: # building python standard extensions self.library_dirs.append('.') # For building extensions with a shared Python library, # Python's library directory must be appended to library_dirs # See Issues: #1600860, #4366 if (sysconfig.get_config_var('Py_ENABLE_SHARED')): if not sysconfig.python_build: # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions self.library_dirs.append('.') # The argument parsing will result in self.define being a string, but # it has to be a list of 2-tuples. All the preprocessor symbols # specified by the 'define' option will be set to '1'. Multiple # symbols can be separated with commas. if self.define: defines = self.define.split(',') self.define = [(symbol, '1') for symbol in defines] # The option for macros to undefine is also a string from the # option parsing, but has to be a list. Multiple symbols can also # be separated with commas here. if self.undef: self.undef = self.undef.split(',') if self.swig_opts is None: self.swig_opts = [] else: self.swig_opts = self.swig_opts.split(' ') # Finally add the user include and library directories if requested if self.user: user_include = os.path.join(USER_BASE, "include") user_lib = os.path.join(USER_BASE, "lib") if os.path.isdir(user_include): self.include_dirs.append(user_include) if os.path.isdir(user_lib): self.library_dirs.append(user_lib) self.rpath.append(user_lib) if isinstance(self.parallel, str): try: self.parallel = int(self.parallel) except ValueError: raise DistutilsOptionError("parallel should be an integer") def run(self): from distutils.ccompiler import new_compiler # 'self.extensions', as supplied by setup.py, is a list of # Extension instances. See the documentation for Extension (in # distutils.extension) for details. # # For backwards compatibility with Distutils 0.8.2 and earlier, we # also allow the 'extensions' list to be a list of tuples: # (ext_name, build_info) # where build_info is a dictionary containing everything that # Extension instances do except the name, with a few things being # differently named. We convert these 2-tuples to Extension # instances as needed. if not self.extensions: return # If we were asked to build any C/C++ libraries, make sure that the # directory where we put them is in the library search path for # linking extensions. if self.distribution.has_c_libraries(): build_clib = self.get_finalized_command('build_clib') self.libraries.extend(build_clib.get_library_names() or []) self.library_dirs.append(build_clib.build_clib) # Setup the CCompiler object that we'll use to do all the # compiling and linking self.compiler = new_compiler(compiler=self.compiler, verbose=self.verbose, dry_run=self.dry_run, force=self.force) customize_compiler(self.compiler) # If we are cross-compiling, init the compiler now (if we are not # cross-compiling, init would not hurt, but people may rely on # late initialization of compiler even if they shouldn't...) if os.name == 'nt' and self.plat_name != get_platform(): self.compiler.initialize(self.plat_name) # And make sure that any compile/link-related options (which might # come from the command-line or from the setup script) are set in # that CCompiler object -- that way, they automatically apply to # all compiling and linking done here. if self.include_dirs is not None: self.compiler.set_include_dirs(self.include_dirs) if self.define is not None: # 'define' option is a list of (name,value) tuples for (name, value) in self.define: self.compiler.define_macro(name, value) if self.undef is not None: for macro in self.undef: self.compiler.undefine_macro(macro) if self.libraries is not None: self.compiler.set_libraries(self.libraries) if self.library_dirs is not None: self.compiler.set_library_dirs(self.library_dirs) if self.rpath is not None: self.compiler.set_runtime_library_dirs(self.rpath) if self.link_objects is not None: self.compiler.set_link_objects(self.link_objects) # Now actually compile and link everything. self.build_extensions() def check_extensions_list(self, extensions): """Ensure that the list of extensions (presumably provided as a command option 'extensions') is valid, i.e. it is a list of Extension objects. We also support the old-style list of 2-tuples, where the tuples are (ext_name, build_info), which are converted to Extension instances here. Raise DistutilsSetupError if the structure is invalid anywhere; just returns otherwise. """ if not isinstance(extensions, list): raise DistutilsSetupError( "'ext_modules' option must be a list of Extension instances") for i, ext in enumerate(extensions): if isinstance(ext, Extension): continue # OK! (assume type-checking done # by Extension constructor) if not isinstance(ext, tuple) or len(ext) != 2: raise DistutilsSetupError( "each element of 'ext_modules' option must be an " "Extension instance or 2-tuple") ext_name, build_info = ext log.warn("old-style (ext_name, build_info) tuple found in " "ext_modules for extension '%s' " "-- please convert to Extension instance", ext_name) if not (isinstance(ext_name, str) and extension_name_re.match(ext_name)): raise DistutilsSetupError( "first element of each tuple in 'ext_modules' " "must be the extension name (a string)") if not isinstance(build_info, dict): raise DistutilsSetupError( "second element of each tuple in 'ext_modules' " "must be a dictionary (build info)") # OK, the (ext_name, build_info) dict is type-safe: convert it # to an Extension instance. ext = Extension(ext_name, build_info['sources']) # Easy stuff: one-to-one mapping from dict elements to # instance attributes. for key in ('include_dirs', 'library_dirs', 'libraries', 'extra_objects', 'extra_compile_args', 'extra_link_args'): val = build_info.get(key) if val is not None: setattr(ext, key, val) # Medium-easy stuff: same syntax/semantics, different names. ext.runtime_library_dirs = build_info.get('rpath') if 'def_file' in build_info: log.warn("'def_file' element of build info dict " "no longer supported") # Non-trivial stuff: 'macros' split into 'define_macros' # and 'undef_macros'. macros = build_info.get('macros') if macros: ext.define_macros = [] ext.undef_macros = [] for macro in macros: if not (isinstance(macro, tuple) and len(macro) in (1, 2)): raise DistutilsSetupError( "'macros' element of build info dict " "must be 1- or 2-tuple") if len(macro) == 1: ext.undef_macros.append(macro[0]) elif len(macro) == 2: ext.define_macros.append(macro) extensions[i] = ext def get_source_files(self): self.check_extensions_list(self.extensions) filenames = [] # Wouldn't it be neat if we knew the names of header files too... for ext in self.extensions: filenames.extend(ext.sources) return filenames def get_outputs(self): # Sanity check the 'extensions' list -- can't assume this is being # done in the same run as a 'build_extensions()' call (in fact, we # can probably assume that it *isn't*!). self.check_extensions_list(self.extensions) # And build the list of output (built) filenames. Note that this # ignores the 'inplace' flag, and assumes everything goes in the # "build" tree. outputs = [] for ext in self.extensions: outputs.append(self.get_ext_fullpath(ext.name)) return outputs def build_extensions(self): # First, sanity-check the 'extensions' list self.check_extensions_list(self.extensions) if self.parallel: self._build_extensions_parallel() else: self._build_extensions_serial() def _build_extensions_parallel(self): workers = self.parallel if self.parallel is True: workers = os.cpu_count() # may return None try: from concurrent.futures import ThreadPoolExecutor except ImportError: workers = None if workers is None: self._build_extensions_serial() return with ThreadPoolExecutor(max_workers=workers) as executor: futures = [executor.submit(self.build_extension, ext) for ext in self.extensions] for ext, fut in zip(self.extensions, futures): with self._filter_build_errors(ext): fut.result() def _build_extensions_serial(self): for ext in self.extensions: with self._filter_build_errors(ext): self.build_extension(ext) @contextlib.contextmanager def _filter_build_errors(self, ext): try: yield except (CCompilerError, DistutilsError, CompileError) as e: if not ext.optional: raise self.warn('building extension "%s" failed: %s' % (ext.name, e)) def build_extension(self, ext): sources = ext.sources if sources is None or not isinstance(sources, (list, tuple)): raise DistutilsSetupError( "in 'ext_modules' option (extension '%s'), " "'sources' must be present and must be " "a list of source filenames" % ext.name) # sort to make the resulting .so file build reproducible sources = sorted(sources) ext_path = self.get_ext_fullpath(ext.name) depends = sources + ext.depends if not (self.force or newer_group(depends, ext_path, 'newer')): log.debug("skipping '%s' extension (up-to-date)", ext.name) return else: log.info("building '%s' extension", ext.name) # First, scan the sources for SWIG definition files (.i), run # SWIG on 'em to create .c files, and modify the sources list # accordingly. sources = self.swig_sources(sources, ext) # Next, compile the source code to object files. # XXX not honouring 'define_macros' or 'undef_macros' -- the # CCompiler API needs to change to accommodate this, and I # want to do one thing at a time! # Two possible sources for extra compiler arguments: # - 'extra_compile_args' in Extension object # - CFLAGS environment variable (not particularly # elegant, but people seem to expect it and I # guess it's useful) # The environment variable should take precedence, and # any sensible compiler will give precedence to later # command line args. Hence we combine them in order: extra_args = ext.extra_compile_args or [] macros = ext.define_macros[:] for undef in ext.undef_macros: macros.append((undef,)) objects = self.compiler.compile(sources, output_dir=self.build_temp, macros=macros, include_dirs=ext.include_dirs, debug=self.debug, extra_postargs=extra_args, depends=ext.depends) # XXX outdated variable, kept here in case third-part code # needs it. self._built_objects = objects[:] # Now link the object files together into a "shared object" -- # of course, first we have to figure out all the other things # that go into the mix. if ext.extra_objects: objects.extend(ext.extra_objects) extra_args = ext.extra_link_args or [] # Detect target language, if not provided language = ext.language or self.compiler.detect_language(sources) self.compiler.link_shared_object( objects, ext_path, libraries=self.get_libraries(ext), library_dirs=ext.library_dirs, runtime_library_dirs=ext.runtime_library_dirs, extra_postargs=extra_args, export_symbols=self.get_export_symbols(ext), debug=self.debug, build_temp=self.build_temp, target_lang=language) def swig_sources(self, sources, extension): """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and return a modified 'sources' list with SWIG source files replaced by the generated C (or C++) files. """ new_sources = [] swig_sources = [] swig_targets = {} # XXX this drops generated C/C++ files into the source tree, which # is fine for developers who want to distribute the generated # source -- but there should be an option to put SWIG output in # the temp dir. if self.swig_cpp: log.warn("--swig-cpp is deprecated - use --swig-opts=-c++") if self.swig_cpp or ('-c++' in self.swig_opts) or \ ('-c++' in extension.swig_opts): target_ext = '.cpp' else: target_ext = '.c' for source in sources: (base, ext) = os.path.splitext(source) if ext == ".i": # SWIG interface file new_sources.append(base + '_wrap' + target_ext) swig_sources.append(source) swig_targets[source] = new_sources[-1] else: new_sources.append(source) if not swig_sources: return new_sources swig = self.swig or self.find_swig() swig_cmd = [swig, "-python"] swig_cmd.extend(self.swig_opts) if self.swig_cpp: swig_cmd.append("-c++") # Do not override commandline arguments if not self.swig_opts: for o in extension.swig_opts: swig_cmd.append(o) for source in swig_sources: target = swig_targets[source] log.info("swigging %s to %s", source, target) self.spawn(swig_cmd + ["-o", target, source]) return new_sources def find_swig(self): """Return the name of the SWIG executable. On Unix, this is just "swig" -- it should be in the PATH. Tries a bit harder on Windows. """ if os.name == "posix": return "swig" elif os.name == "nt": # Look for SWIG in its standard installation directory on # Windows (or so I presume!). If we find it there, great; # if not, act like Unix and assume it's in the PATH. for vers in ("1.3", "1.2", "1.1"): fn = os.path.join("c:\\swig%s" % vers, "swig.exe") if os.path.isfile(fn): return fn else: return "swig.exe" else: raise DistutilsPlatformError( "I don't know how to find (much less run) SWIG " "on platform '%s'" % os.name) # -- Name generators ----------------------------------------------- # (extension names, filenames, whatever) def get_ext_fullpath(self, ext_name): """Returns the path of the filename for a given extension. The file is located in `build_lib` or directly in the package (inplace option). """ fullname = self.get_ext_fullname(ext_name) modpath = fullname.split('.') filename = self.get_ext_filename(modpath[-1]) if not self.inplace: # no further work needed # returning : # build_dir/package/path/filename filename = os.path.join(*modpath[:-1]+[filename]) return os.path.join(self.build_lib, filename) # the inplace option requires to find the package directory # using the build_py command for that package = '.'.join(modpath[0:-1]) build_py = self.get_finalized_command('build_py') package_dir = os.path.abspath(build_py.get_package_dir(package)) # returning # package_dir/filename return os.path.join(package_dir, filename) def get_ext_fullname(self, ext_name): """Returns the fullname of a given extension name. Adds the `package.` prefix""" if self.package is None: return ext_name else: return self.package + '.' + ext_name def get_ext_filename(self, ext_name): r"""Convert the name of an extension (eg. "foo.bar") into the name of the file from which it will be loaded (eg. "foo/bar.so", or "foo\bar.pyd"). """ from distutils.sysconfig import get_config_var ext_path = ext_name.split('.') ext_suffix = get_config_var('EXT_SUFFIX') return os.path.join(*ext_path) + ext_suffix def get_export_symbols(self, ext): """Return the list of symbols that a shared extension has to export. This either uses 'ext.export_symbols' or, if it's not provided, "PyInit_" + module_name. Only relevant on Windows, where the .pyd file (DLL) must export the module "PyInit_" function. """ suffix = '_' + ext.name.split('.')[-1] try: # Unicode module name support as defined in PEP-489 # https://www.python.org/dev/peps/pep-0489/#export-hook-name suffix.encode('ascii') except UnicodeEncodeError: suffix = 'U' + suffix.encode('punycode').replace(b'-', b'_').decode('ascii') initfunc_name = "PyInit" + suffix if initfunc_name not in ext.export_symbols: ext.export_symbols.append(initfunc_name) return ext.export_symbols def get_libraries(self, ext): """Return the list of libraries to link against when building a shared extension. On most platforms, this is just 'ext.libraries'; on Windows, we add the Python library (eg. python20.dll). """ # The python library is always needed on Windows. For MSVC, this # is redundant, since the library is mentioned in a pragma in # pyconfig.h that MSVC groks. The other Windows compilers all seem # to need it mentioned explicitly, though, so that's what we do. # Append '_d' to the python import library on debug builds. if sys.platform == "win32": from distutils._msvccompiler import MSVCCompiler if not isinstance(self.compiler, MSVCCompiler): template = "python%d%d" if self.debug: template = template + '_d' pythonlib = (template % (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff)) # don't extend ext.libraries, it may be shared with other # extensions, it is a reference to the original list return ext.libraries + [pythonlib] else: # On Android only the main executable and LD_PRELOADs are considered # to be RTLD_GLOBAL, all the dependencies of the main executable # remain RTLD_LOCAL and so the shared libraries must be linked with # libpython when python is built with a shared python library (issue # bpo-21536). # On Cygwin (and if required, other POSIX-like platforms based on # Windows like MinGW) it is simply necessary that all symbols in # shared libraries are resolved at link time. from distutils.sysconfig import get_config_var link_libpython = False if get_config_var('Py_ENABLE_SHARED'): # A native build on an Android device or on Cygwin if hasattr(sys, 'getandroidapilevel'): link_libpython = True elif sys.platform == 'cygwin': link_libpython = True elif '_PYTHON_HOST_PLATFORM' in os.environ: # We are cross-compiling for one of the relevant platforms if get_config_var('ANDROID_API_LEVEL') != 0: link_libpython = True elif get_config_var('MACHDEP') == 'cygwin': link_libpython = True if link_libpython: ldversion = get_config_var('LDVERSION') return ext.libraries + ['python' + ldversion] return ext.libraries + py37compat.pythonlib()


Helps to visualize multi-variate time-series having numeric and factor variables. You can use the package for visual analysis of data by plotting the data for each variable in the desired order and study interaction between a factor and a numeric variable by creating overlapping plots.
| Version: | 0.1.0 |
| Depends: | R (≥ 3.3.0) |
| Imports: | dplyr, lubridate, stringr, futile.logger, ggplot2, gtable, grid, mtconnectR |
| Suggests: | testthat, knitr, rmarkdown |
| Published: | 2017-05-25 |
| Author: | Mohsin Vindhani [aut, cre], Alex Joseph [aut], Ananthapadmanabhan [aut], Subramanyam Ravishankar [aut] |
| Maintainer: | Mohsin Vindhani <mohsin at systeminsights.com> |
| License: | AGPL-3 |
| NeedsCompilation: | no |
| Materials: | README |
| CRAN checks: | timelineR results |
| Reference manual: | timelineR.pdf |
| Vignettes: |
timelineR |
| Package source: | timelineR_0.1.0.tar.gz |
| Windows binaries: | r-devel: timelineR_0.1.0.zip, r-release: timelineR_0.1.0.zip, r-oldrel: timelineR_0.1.0.zip |
| OS X binaries: | r-release: timelineR_0.1.0.tgz, r-oldrel: timelineR_0.1.0.tgz |
Please use the canonical form https://CRAN.R-project.org/package=timelineR to link to this page.


Kent. I THOUGHT the King had more affected the Duke of Albany than Cornwall.
Glou. It did always seem so to us; but now, in the division of the kingdom, it appears not which of the Dukes he values most; for qualities are so weigh’d, that curiosity in neither can make choice of either’s moiety.
Kent. Is not this your son, my lord?
Glou. His breeding, sir, hath been at my charge. I have so often blush’d to acknowledge him, that now I am braz’d to ’t.
Kent.
Kent. I cannot wish the fault undone, the issue of it being so proper.
Glou. But I have a son, sir, by order of law, some year elder than this, who yet is no dearer in my account. Though this knave came something saucily into the world before he was sent for, yet was his mother fair; there was good sport at his making, and the whoreson must be acknowledged. Do you know this noble gentleman, Edmund?
Edm. No, my lord.
Glou. My Lord of Kent. Remember him hereafter as my honourable friend.
Edm. My services to your lordship.
Kent. I must love you, and sue to know you better.
Edm. Sir, I shall study deserving.
Glou. He hath been out nine years, and away he shall again. The King is coming.
Lear. Attend the lords of France and Burgundy, Gloucester.
Glou. I shall, my lord. Exeunt [GLOUCESTER and EDMUND].
Lear. Meantime we shall express our darker purpose.
Give me the map there. Know that we have divided
In three our kingdom; and ’tis our fast intent
To shake all cares and business from our age,
Conferring them on younger strengths, while we
Unburden’d crawl toward death. Our son of Cornwall,
And you, our no less loving son of Albany,
We have this hour a constant will to publish
Our daughters’ several dowers, that future strife
May be prevented now. The Princes, France and Burgundy,
Great rivals in our youngest daughter’s love,
Long in our court have made their amorous sojourn,
And here are to be answer’d. Tell me, my daughters,—
Since now we will divest us both of rule,
Interest of territory, cares of state,—
Which of you shall we say doth love us most,
That we our largest bounty may extend
Where nature doth with merit challenge? Goneril,
Our eldest-born, speak first.
Gon. Sir, I love you more than word can wield the matter;
Dearer than eye-sight, space, and liberty;
Beyond what can be valued, rich or rare;
No less than life, with grace, health, beauty, honour;
As much as child e’er lov’d, or father found;
A love that makes breath poor, and speech unable:
Beyond all manner of so much I love you.
Cor. [Aside.] What shall Cordelia speak? Love and be silent.
Lear. Of all these bounds, even from this line to this,
With shadowy forests and with champains rich’d,
With plenteous rivers and wide-skirted meads,
We make thee lady. To thine and Albany’s issues
Be this perpetual. What says our second daughter,
Our dearest Regan, wife of Cornwall? Speak.
Reg. I am made of that self metal as my sister,
And prize me at her worth. In my true heart
I find she names my very deed of love;
Only she comes too short, that I profess
Myself an enemy to all other joys
Which the most precious square of sense possesses;
And find I am alone felicitate
In your dear Highness’ love.
Cor. [Aside.] Then poor Cordelia!
And yet not so; since, I am sure, my love’s
More ponderous than my tongue.
Lear. To thee and thine hereditary ever
Remain this ample third of our fair kingdom;
No less in space, validity, and pleasure,
Than that conferr’d on Goneril. Now, our joy,
Although our last and least, to whose young love
The vines of France and milk of Burgundy
Strive to be interess’d, what can you say to draw
A third more opulent than your sisters? Speak.
Cor. Nothing, my lord.
Lear. Nothing!
Cor. Nothing.
Lear. Nothing will come of nothing. Speak again.
Cor. Unhappy that I am, I cannot heave
My heart into my mouth. I love your Majesty
According to my bond; no more nor less.
Lear. How, how, Cordelia! Mend your speech a little,
Lest you may mar your fortunes.
Cor. Good my lord,
You have begot me, bred me, lov’d me: I
Return those duties back as are right fit;
Obey you, love you, and most honour you.
Why have my sisters husbands, if they say
They love you all? Haply, when I shall wed,
That lord whose hand must take my plight shall carry
Half my love with him, half my care and duty.
Sure, I shall never marry like my sisters
[To love my father all].
Lear. But goes thy heart with this?
Cor. Ay, my good lord.
Lear. So young, and so untender?
Cor. So young, my lord, and true.
Lear. Let it be so; thy truth, then, be thy dower!
For, by the scared radiance of the sun,
The mysteries of Hecate, and the night;
By all the operation of the orbs
From whom we do exist, and cease to be;
Here I disclaim all my paternal care,
Propinquity and property of blood,
And as a stranger to my heart and me
Hold thee, from this, for ever. The barbarous Scythian,
Or he that makes his generation messes
To gorge his appetite, shall to my bosom
Be as well neighbour’d, piti’d, and reliev’d,
As thou my sometime daughter.
Kent. Good my liege,—
Lear. Peace, Kent!
Come not between the dragon and his wrath.
I lov’d her most, and thought to set my rest
On her kind nursery. [To COR.] Hence, and avoid my sight!—
So be my grave my peace, as here I give
Her father’s heart from her! Call France.—Who stirs?
Call Burgundy. Cornwall and Albany,
With my two daughters’ dowers digest the third;
Let pride, which she calls plainness, marry her.
I do invest you jointly with my power,
Pre-eminence, and all the large effects
That troop with majesty.  Only we shall retain
The name, and all the addition to a king;
The sway, revenue, execution of the rest,
Beloved sons, be yours; which to confirm,
This coronet part between you.
Kent. Royal Lear,
Whom I have ever honour’d as my king,
Lov’d as my father, as my master follow’d,
As my great patron thought on in my prayers,—
Lear. The bow is bent and drawn; make from the shaft.
Kent. Let it fall rather, though the fork invade
The region of my heart: be Kent unmannerly
When Lear is mad. What wouldst thou do, old man?
Thinkst thou that duty shall have dread to speak,
When power to flattery bows? To plainness honour’s bound,
When majesty falls to folly. Reserve thy state;
And, in thy best consideration, check
This hideous rashness. Answer my life my judgement,
Thy youngest daughter does not love thee least;
Nor are those empty-hearted whose low sounds
Reverb no hollowness.
Lear. Kent, on thy life, no more.
Kent. My life I never held but as a pawn
To wage against thy enemies, ne’er fear to lose it.
Thy safety being motive.
Lear. Out of my sight
Kent. See better, Lear; and let me still remain
The true blank of thine eye.
Lear. Now, by Apollo,—
Kent. Now, by Apollo, king,
Thou swear’st thy gods in vain.
Lear. O, vassal! miscreant! [Laying his hand on his sword.]
Alb. & Corn. Dear sir, forbear.
Kent. Kill thy physician, and thy fee bestow
Upon the foul disease. Revoke thy gift;
Or, whilst I can vent clamour from my throat,
I’ll tell thee thou dost evil.
Lear. Hear me, recreant!
On thine allegiance, hear me!
That thou hast sought to make us break our vows,
Which we durst never yet, and with strain’d pride
To come betwixt our sentences and our power,
Which nor our nature nor our place can bear,
Our potency made good, take thy reward.
Five days we do allot thee, for provision
To shield thee from disasters of the world;
And on the sixth to turn thy hated back
Upon our kingdom. If, on the tenth day following,
Thy banish’d trunk be found in our dominions,
The moment is thy death. Away! By Jupiter,
This shall not be revok’d.
Kent. Fare thee well, king! Sith thus thou wilt appear,
Freedom lives hence, and banishment is here.
[To CORDELIA.] The gods to their dear shelter take thee, maid,
That justly think’st, and hast most rightly said!
[To REGAN and GONERIL.] And your large speeches may your deeds approve,
That good effects may spring from words of love.
Thus Kent, O princes, bids you all adieu;
He’ll shape his old course in a country new. Exit.
Glou. Here’s France and Burgundy, my noble lord.
Lear. My Lord of Burgundy,
We first address toward you, who with this king
Hath rivall’d for our daughter. What, in the least,
Will you require in present dower with her,
Or cease your quest of love?
Bur. Most royal Majesty,
I crave no more than what your Highness offer’d,
Nor will you tender less.
Lear. Right noble Burgundy,
When she was dear to us, we did hold her so;
But now her price is fallen. Sir, there she stands:
If aught within that little-seeming substance,
Or all of it, with our displeasure piec’d,
And nothing more, may fitly like your Grace,
She’s there, and she is yours.
Bur. I know no answer.
Lear. Will you, with those infirmities she owes,
Unfriended, new-adopted to our hate,
Dower’d with our curse, and stranger’d with our oath,
Take her, or leave her?
Bur. Pardon me, royal sir;
Election makes not up in such conditions.
Lear. Then leave her, sir; for, by the power that made me,
I tell you all her wealth. [To FRANCE.] For you, great king,
I would not from your love make such a stray,
To match you where I hate; therefore beseech you
To avert your liking a more worthier way
Than on a wretch whom Nature is asham’d
Almost to acknowledge hers.
France. This is most strange,
That she, whom even but now was your best object,
The argument of your praise, balm of your age,
The best, the dearest, should in this trice of time
Commit a thing so monstrous, to dismantle
So many folds of favour. Sure, her offence
Must be of such unnatural degree,
That monsters it, or your fore-vouch’d affection
Fallen into taint; which to believe of her,
Must be a faith that reason without miracle
Should never plant in me.
Cor. I yet beseech your Majesty,—
If for I want that glib and oily art,
To speak and purpose not; since what I well intend,
I’ll do ’t before I speak,—that you make known
It is no vicious blot, murder, or foulness,
No unchaste action, or dishonoured step,
That hath depriv’d me of your grace and favour;
But even for want of that for which I am richer,
A still-soliciting eye, and such a tongue
That I am glad I have not, though not to have it
Hath lost me in your liking.
Lear. Better thou
Hadst not been born than not to have pleas’d me better.
France. Is it but this,—a tardiness in nature
Which often leaves the history unspoke
That it intends to do? My Lord of Burgundy,
What say you to the lady? Love’s not love
When it is mingled with regards that stand
Aloof from the entire point. Will you have her?
She is herself a dowry.
Bur. Royal king,
Give but that portion which yourself propos’d,
And here I take Cordelia by the hand,
Duchess of Burgundy.
Lear. Nothing. I have sworn; I am firm.
Bur. I am sorry, then, you have so lost a father
That you must lose a husband.
Cor. Peace be with Burgundy!
Since that respect and fortunes are his love,
I shall not be his wife.
France. Fairest Cordelia, that art most rich being poor,
Most choice forsaken, and most lov’d despis’d!
Thee and thy virtues here I seize upon,
Be it lawful I take up what’s cast away.
Gods, gods! ’tis strange that from their cold’st neglect
My love should kindle to inflam’d respect.
Thy dowerless daughter, king, thrown to my chance,
Is queen of us, of ours, and our fair France.
Not all the dukes of waterish Burgundy
Can buy this unpriz’d precious maid of me.
Bid them farewell, Cordelia, though unkind;
Thou losest here, a better where to find.
Lear. Thou hast her, France. Let her be thine; for we
Have no such daughter, nor shall ever see
That face of hers again.—[To COR.] Therefore be gone
Without our grace, our love, our benison.—
Come, noble Burgundy. Flourish. Exeunt [all but FRANCE, GONERIL, REGAN, and CORDELIA].
France. Bid farewell to your sisters.
Cor. The jewels of our father, with wash’d eyes
Cordelia leaves you.  Love well our father,
To your professed bosoms I commit him;
But yet, alas, stood I within his grace,
I would prefer him to a better place.
So, farewell to you both.
Reg. Prescribe not us our duty.
Gon. Let your study
Be to content your lord, who hath receiv’d you
At fortune’s alms. You have obedience scanted,
And well are worth the want that you have wanted.
Cor. Time shall unfold what plighted cunning hides;
Who covers faults, at last shame them derides.
Well may you prosper!
France. Come, my fair Cordelia. Exeunt [FRANCE and CORDELIA].
Gon. Sister, it is not little I have to say of what most nearly appertains to us both. I think our father will hence to-night.
Reg. That’s most certain, and with you; next month with us.
Gon. You see how full of changes his age is; the observation we have made of it hath not been little. He always lov’d our sister most; and with what poor judgement he hath now cast her off appears too grossly.
Reg. ’Tis the infirmity of his age; yet he hath ever but slenderly known himself.
Gon. The best and soundest of his time hath been but rash; then must we look from his age to receive not alone the imperfections of long-engraffed condition, but therewithal the unruly waywardness that infirm and choleric years bring with them.
Reg. Such unconstant starts are we like to have from him as this of Kent’s banishment.
Gon. There is further compliment of leave-taking between France and him.  We shall further think of it.
Gon. We must do something, and i’ the heat. [Exeunt.]


When asked why they do it, one Frostbiter responded,
Frostbiting is intense, and it brings out the most competitive racers
Frostbite sailing is winter dinghy sailboat racing. It occurs from November to May in the Northeast US.
When asked why they do it, one Frostbiter responded,
Frostbiting is intense, and it brings out the most competitive racers
The typical Frostbiting year has three seasons:
| Month | Season | ||
|---|---|---|---|
| November | Fall | ||
| December | Winter | ||
| January | |||
| Februrary | |||
| March | Spring | ||
| April | |||
| May |


Large object loading
Large objects specific properties Lob and Xml specially used to lazy access to potentially big sized data stored in database.
When data object accessed using XData, large objects data not queried, but replaced with null values to create full structure of object.
To get or set value of Lob or Xml Lob.Value and Xml.Document properties are used. Size of Lob can be checked using GetSize method.
To simplify value assigning overrided operation += can be used as described in example below:
obj.Source += new XDocument(new XElement("invoice", new XAttribute("number", number), new XAttribute("state", z.DocStateCode)));
obj.Scan += Encoding.UTF8.GetBytes(z.Source.Document.ToString());
To modify value of large objects in LINQ styled sequence of command helper methods Modify(Xml, Action<XDocument>) and Modify(Lob, Action<Byte[]>) can be used like in example below:
invoice.Modify(
z => z.DocState += dataScope.GetDictionaryValue<DocState>(x => x.Code == newStateCode),
z => z.Source.Modify(doc => doc.Element("invoice").Attribute("state").Value = newStateCode))
.Submit();
Warning
When object is serialized large objects properties are serialized with null values by default! When actual value of large object is required it must to be requested separately. To fill object large properties before serialization can be used one of LoadLob or LoadLobAsync helper method overloads.


public class StackUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.concurrent.Executor |
BLOCKING_EXECUTOR
Use
getBlockingWorkExecutor() instead |
static int |
blockingWorkerThreadPoolCoreSize |
static long |
blockingWorkerThreadPoolTimeout |
static UnsignedInteger |
CLIENT_TOKEN_LIFETIME_REQUEST
Requested token lifetime
|
static int |
CORES |
static java.util.concurrent.Executor |
NON_BLOCKING_EXECUTOR
Use
getNonBlockingWorkExecutor() instead |
static java.util.Random |
RANDOM |
static AsyncSelector |
SELECTOR
Use #getSelector() instead.
|
static UnsignedInteger |
SERVER_GIVEN_TOKEN_LIFETIME
Maximum lifetime server is willing to offer
|
static int |
TCP_PROTOCOL_VERSION |
| Constructor and Description |
|---|
StackUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
barrierWait(AsyncResult<?>[] requests,
long timeout)
Wait for a group to requests to go into final state
|
static int |
cores() |
static java.util.concurrent.Executor |
createBlockingWorkExecutor(java.lang.String name,
int maxThreadPoolSize)
Get Executor for long term and potentially blocking operations.
|
static int |
getBlockingWorkerThreadPoolCoreSize() |
static long |
getBlockingWorkerThreadPoolTimeout() |
static java.util.concurrent.Executor |
getBlockingWorkExecutor()
Get Executor for long term and potentially blocking operations.
|
static IEncodeableSerializer |
getDefaultSerializer()
Get default encodeable serializer
|
static java.util.concurrent.Executor |
getNonBlockingWorkExecutor()
Get Executor for non-blocking operations.
|
static AsyncSelector |
getSelector() |
static java.lang.Thread.UncaughtExceptionHandler |
getUncaughtExceptionHandler()
The handler that is called, if any of the worker threads encounter an exception that is not handled.
|
static void |
logStatus() |
static java.util.concurrent.ThreadFactory |
newNamedThreadFactory(java.lang.String name) |
static void |
setBlockingWorkerThreadPoolTimeout(long blockingWorkerThreadPoolTimeout)
Define the timeout (in seconds) of the thread pool for BlockingWorkerExecutor.
|
static void |
setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtexceptionhandler)
Define the handler that is called, if any of the worker threads encounter an exception that is not handled.
|
static void |
shutdown()
Perform a "context shutdown" to clean up the Stack resources.
|
static ServiceResultException |
toServiceResultException(java.lang.Exception e) |
public static int blockingWorkerThreadPoolCoreSize
public static long blockingWorkerThreadPoolTimeout
public static final int CORES
public static java.util.concurrent.Executor NON_BLOCKING_EXECUTOR
getNonBlockingWorkExecutor()
insteadpublic static java.util.concurrent.Executor BLOCKING_EXECUTOR
getBlockingWorkExecutor()
insteadpublic static AsyncSelector SELECTOR
public static java.util.Random RANDOM
public static final UnsignedInteger CLIENT_TOKEN_LIFETIME_REQUEST
public static final UnsignedInteger SERVER_GIVEN_TOKEN_LIFETIME
public static final int TCP_PROTOCOL_VERSION
public static void logStatus()
public static long getBlockingWorkerThreadPoolTimeout()
public static void setBlockingWorkerThreadPoolTimeout(long blockingWorkerThreadPoolTimeout)
Default: 3
defaultMaxBlockingWorkerPoolSize
- public static int getBlockingWorkerThreadPoolCoreSize()
public static IEncodeableSerializer getDefaultSerializer()
public static java.lang.Thread.UncaughtExceptionHandler getUncaughtExceptionHandler()
public static void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtexceptionhandler)
The default handler will just log the exception as an Error to the log4j log.
Set the handler to provide custom behavior in your application.
The handler is set when new worker threads are started and setting the value will not affect already running threads.
uncaughtexceptionhandler
- the uncaughtexceptionhandler to setpublic static java.util.concurrent.Executor getNonBlockingWorkExecutor()
public static java.util.concurrent.Executor getBlockingWorkExecutor()
Calls getBlockingWorkExecutor(getDefaultMaxBlockingWorkerThreadPoolSize())
public static java.util.concurrent.Executor createBlockingWorkExecutor(java.lang.String name, int maxThreadPoolSize)
maxThreadPoolSize
- max number of threads to create in the thread poolpublic static ServiceResultException toServiceResultException(java.lang.Exception e)
public static int cores()
public static boolean barrierWait(AsyncResult<?>[] requests, long timeout) throws java.lang.InterruptedException
requests
- a group of requeststimeout
- timeout in secondsjava.lang.InterruptedException
public static java.util.concurrent.ThreadFactory newNamedThreadFactory(java.lang.String name)
public static void shutdown()
Shuts down BLOCKING_EXECUTOR
and NON_BLOCKING_EXECUTOR
, closes SELECTOR
and cancels TimerUtil.getTimer()
.
public static AsyncSelector getSelector()


- main(String[]) - Static method in class desktop.DesktopLauncher
-
- MainGame - Class in game
-
Main game logic and drawing, implements Screen
.
- MainGame(BlueSky) - Constructor for class game.MainGame
-
Creates the game Screen
.
- MainGame.State - Enum in game
-
- MainMenu - Class in game.MenuScreens
-
Implements Screen
- MainMenu(BlueSky) - Constructor for class game.MenuScreens.MainMenu
-
Instantiation method, when it is called all assets are allocated in memory.
- MOVEMENT_SPEED - Static variable in class game.Player
-
- movementSpeed - Variable in class game.FireBall
-
- movePlayerDown(float) - Method in class game.Player
-
Decreases player y coordinates.
- movePlayerLeft(float) - Method in class game.Player
-
Decreases player x coordinates.
- movePlayerRight(float) - Method in class game.Player
-
Increases player x coordinates.
- movePlayerUp(float) - Method in class game.Player
-
Increases player y coordinates.
- myGame - Variable in class game.MenuScreens.GameOverMenu
-
- myGame - Variable in class game.MenuScreens.MainMenu
-
- myLog - Static variable in class game.BlueSky
-
- myLog - Static variable in class game.MainGame
-
- myLog - Static variable in class game.MenuScreens.GameOverMenu
-
- myLog - Static variable in class game.MenuScreens.MainMenu
-
- myLog - Static variable in class game.MenuScreens.PauseMenu
-


Contact
Wiki
Contact US!
Email
Job Description
Send
Copyright © Nebula Cyber Solutions LLC 2019
Some images used are Creative Commons


Classes are defined as a blueprint that encapsulates data and its related operations under a single name.
In this article we will see the scripts related to the following topic.
1) Inheritance
2) static method
3) class method
4) instance variable
5) class variable
Let's move through the topics 1-by-1 with examples.
""" created_at : 13 Feb 2017. updated_at : 13 Feb 2017. aim of script : To understand the concept of classes in python. coded by : Rishikesh Agrawani. Python version : 2.7.12 """#Defining a class
class Car: def __init__(self): #This is the constructor of class Car self.name = "Maruti" #Adding name attribute to class instance self.color = "Red" #Adding color attribute to class instance self.price = 1000000 #Adding price attribute to class instance def show_details(self): #This method prints the value of attributes of invoking object print "Name : ",self.name print "Color : ",self.color print "Price : ",self.price
Inheritance is defined a mechanism of deriving a new class from the existing one.
In the following example, ThreeNums & TwoNums are classes & ThreeNums is inheriting TwoNums class.
#Inheritance
"""class TwoNums""" class TwoNums: def __init__(self,a,b): #TwoNums class constructor self.num1 = a self.num2 = b def add_two_nums(self): #It adds the value of attributes num1 and num2 then returns the sum return self.num1 + self.num2
"""class ThreeNums""" class ThreeNums(TwoNums): def __init__(self,a,b,c): #ThreeNums class counstructor TwoNums.__init__(self,a,b) #Calling parent's constructor to instantiate it self.num3 = c def add_three_nums(self): return (self.add_two_nums()+self.num3) #It returns the sum of attributes num1, num2 and num3 then returns the sum obj = ThreeNums(10,30,60) print obj.add_three_nums() #100
static method is defined as a method which neither takes an instance nor takes class as its first argument.
In the following example, I've defined sum() as static method.
<#static method
class A: def __init__(self): #constructor self.a = 10 self.b = 11 @staticmethod def sum(obj): #sum() is an static method return obj.a + obj.b print A.sum(A()) #21 instance = A() print instance.sum(instance) #21
class method is defined as a method which exactly takes class as its first argument.
In the following example, I've defined sum() as class method.
#class method
class A: def __init__(self): #constructor self.a = 10 self.b = 11 @classmethod def sum(cls): #sum() is a class method obj = cls() #Instantiation print "cls => ",cls #cls => __main__.A return obj.a + obj.b print A.sum() #21
An instance variable is defined as a variable that is created by the constructor of class.
In the following example, instance and obj are 2 instance variables.
#instance variable
class Numbers: def __init__(self, num1, num2): self.a = num1 self.b = num2 def sum(self): return self.a + self.b obj = Numbers(10, 12) print obj.sum() #22 instance = Numbers(23,77) print instance.sum() #100
An class variable is defined as a variable that is defined outside the method(s) of class. It is shared among all the instances of class.
In the following example, school is a class variable.
#class variable
class Student: school = "Govt. Model hr. sec. school, Pharasgaon(CG)" #school is a class variable def __init__(self, name, rollno, group): self.name = name self.rollno = rollno self.group = group def get_details(self): print "Name : ",self.name print "Roll No : ",self.rollno print "Group : ",self.group print "School : ",self.school student1 = Student("Rajesh Pather", 24, "Mathematics") #student1 is an instance variable student1.get_details() student2 = Student("Baldev Netam",2,"Biology") #student2 is an instance variable student2.get_details()


Poyrazkoy harbour is on the eastern shore of the Bosphorus at its northern entrance. It may be possible to find a berth on the quay. Weekends are particularly busy.
If necessary, anchor off. It provides an attractive stop out of the swell in the Black Sea.
There is good fresh fish available, as well as restaurants and cafes here.


Car Products
CATEGORIES
About Car Products
Contact Us
About Car Shop
Need Updates On Our New Product?
Subscribe!
VROOOOOOOOOOOOOOOOOOOOOM!


The Ministry of Energy, Mines, and Petroleum Resources (EMPR)
The Ministry of Energy, Mines and Petroleum Resources seeks to achieve voluntary compliance with applicable requirements wherever possible. This is generally achieved through the issuance of orders to remedy non-compliance. Where voluntary compliance cannot be achieved or where the non-compliance presents more significant risks, the Ministry may pursue the imposition of an administrative monetary penalty (AMP) or an offence prosecution.
The AMP program allows the Ministry to impose a financial penalty on any individual or corporation that contravenes prescribed provisions of the Mines Act, the regulations and/or the Health, Safety and Reclamation Code. AMPs provide an additional compliance and enforcement tool that is efficient, cost-effective and flexible, and can be imposed without court involvement. AMPs were introduced under the Mines Act in 2017.
Where a person contravenes a provision of the Mines Act, the regulations, the Health, Safety and Reclamation Code or an order, and where the evidence is supportive, charges may be recommended for approval by Crown Counsel. A person convicted of an offence under the Mines Act is liable to a fine of not more than $1,000,000 or to imprisonment for not more than three years or both.


Barsa Resorts Sundarban
Barsa Resort is a socially and environmentally responsible nice resort located on a river in
southern Bangladesh just few distances from the famous Sundarban mangrove forest. Barsa Resort
started their journey with a view to provide fully serviced tour packages for local and foreign
tourists promoting the nature, people, culture and heritage of Bangladesh more presentably.
It has got worldwide connection with sophisticated state of the art network and earned a good
reputation in handling both inbound & outbound tourists with all satisfaction & trust.
It’s door is open to provide an unparalleled level of customer satisfaction through flexible,
timely, efficient and pleasant service for you.
Barsa Resorts has a team of professionals who are in this tourism trade from last many years.
They all are very Enthusiastic, Energetic and willing to give a different vision of travel to all our
tourists to experience the best and go for the best. It’sphilosophy is based on a simple concept to deliver
the highest level of customer services with the best possible price.
Royal Sundarban
Royal Sunderban Wild Resort in Jharkhali Island in the best location closest to
the forest core area to spend an ideal tine amidst nature for a couple of days.
It has cottages for accommodation with the most modern amenities with 35 guests.
The balconies in the cottage allow a clear view of the water body and the garden.
The Royal Sunderban Wild Resort is an unique destination just beside a large sweet
water lake which is the home for migratory birds during winter months.
Tourists can reach Sunderbans on fixed departure dates or any day as per the choice of tourists.
The Sunderbans support one of the largest populations of Royal Bengal Tiger.
These man-eaters who have often been the harbingers of death in these parts also at
the same time give the place its fundamental character of existence. However recent years have witnessed
sharp decline in their numbers. In August 2004 there were in total approximately 256 individuals in Sunderban
which in the current year (2013) have been estimated to be only 103. The predominant reasons behind this drastic
downfall are poachers and an acute scarcity of food. However recently another significant reason behind this decline
has been brought to notice by the research conducted by scientists at the Cardiff University, UK. According to them
the absence of enough genetic variation among tigers is the real culprit.
Sundarban Gateway Resort
Sundarban Gateway Resort in Sunderban is a perfect vacation getaway.
t is located located in Gulki village besides Pakahralaya and Gulki-P.O Gosaba.
Chill, relax and have a fun-filled time at this resort.
It offers you a pleasant stay along with facilities like restaurant, breakfast, parking, laundry,
backup generator and medical help. Experience the wildlife in Sunderban and make your trip more adventurous.
The rooms offer you all the comfort and luxury. Unwind in the arms of nature and have an enjoyable trip.
SUNDARBAN RESORT
A distinctive art deco building with large palatial rooms and plush antique furnishings
situated amidst lush green surroundings reminiscent of the style & splendor of the bygone
royal heritage of the Maharajas.A meditation hotel, ideally located adjacent to the Osho
Commune International.Multiplexes like Gold Cinema, PVR are close to Sunderban Resort & Spa with
Fast Food Chains at a walking distance.


posted in management 29 Mar 2022
posted in musings 04 Feb 2022
posted in technology musings 29 Jan 2022
posted in technology 22 Jan 2022
posted in musings reflections 07 Nov 2021
posted in endurance reflections outdoors 03 May 2021
posted in reflections 28 Feb 2021
posted in musings 27 Jun 2020
posted in reflections 14 May 2020
posted in musings 07 Apr 2020
posted in reading 03 Nov 2019


Assume that for some list implementation, a pointer requires P bytes and a data object requires D bytes. Type a fraction (like "1/2") to show how full the array should be for the break even point, that is, the point beyond which the array-based list implementation needs less space than the linked list implementation. Give your fraction in lowest terms.
ANS
The overhead is P and the total space needed is SUM.
As the array fills up, its overhead decreases.
The pointer space (P bytes) is overhead.
The bigger the overhead fraction, the less the array needs to be better. The bigger the data field, the more the array needs to be better.
The break-even point is at D/SUM.
If you have values like 4/8, reduce to 1/2.


property OnPixelCombine: TPixelCombineEvent;
type TPixelCombineEvent = procedure(F: TColor32; var B: TColor32; M: TColor32) of object;
This event is called when the bitmap is drawn in dmCustom draw mode. Use this event to customize handling of colors. Note, however, that this event is called for every pixel, so keeping the event handler small and fast is in your own interest.


An introduction to the `mex` file and useful implementations
I use mostly Matlab to test my algorithms, it’s super easy to implement and fast enough for matrix computation. However, for some computationally heavy tasks that is hard to implement as matrix computation, I would normally turn to C++ for its efficiency. Thus I need an additional mex
file so that my Matlab code can use the C++ code. To do so, most of the job required is to convert matlab data into C++ data, and I create some methods just for this purpose so that I don’t need to do this all over again next time. So here it is.
Overview
Here are a list of stuffs to know about mex fils
- gateway function:
mexfunction
; - Basic data type:
mxArray
- scope
- create and destroy
- ordering
- access the data
Gateway function
Just like every C/C++ program has a main()
function, Matlab uses a gateway routine called mexFunction
. Here is what it looks like
void mexFunction(int nlhs, mxArray *plhs[],
int nrhs, mxArray *prhs[])
{
// your code here
}
| Parameter | Description |
|---|---|
| nlhs | Number of output (left-side) arguments, or the size of the plhs array. |
| plhs | Array of output arguments. |
| nrhs | Number of input (right-side) arguments, or the size of the prhs array. |
| prhs | aArray of input arguments. |
All about mxArray
This section is an excerpt of the MATLAB Data from Mathworks.
The Matlab works with one single object type: the Matlab array. All Matlab variables, including scalars, vectors, matrices, character arrays, cell arrays, structures, and objects, are stored in Matlab array. In C/C++, this Matlab array is declared to be of type mxArray
. This mxArray
structure contains the following information
- Its type
- Its dimension
- The data associated with this array
- If numeric, whether the variable is real or complex
- If structure or object, the number of fileds and field names
- If sparse, its indices and nonzero maximum elements
order of mxArray
The Matlab array follows the column-major order similar to Fortran while the C/C++ array follows row-major order.
create and destroy of mxArray
The mexCreate*
function can create an mxArray
while mxCalloc
can allocate dynamic memory for array. Some useful ones are: mxCreateDoubleMatrix
, mxCreateNumericMatrix
To deallocate memory, use either mxDestroyArray
or mxFree
For more information, please go to Create or Delete Array.
// create mxArray
double ** createMatrix(IN int rows,
IN int cols)
{
int i;
double **matrix;
if(((matrix = (double **) malloc(sizeof(double *)*rows)) == NULL) ||
((matrix[0] = (double *) malloc(sizeof(double)*rows*cols)) == NULL))
return NULL;
for(i=1; i<rows; i++)
matrix[i] = matrix[0] + i*cols;
memset(matrix[0], 0, sizeof(double)*rows*cols);
return matrix;
}
int ** createIntMatrix(IN int rows,
IN int cols)
{
int i;
int **matrix;
if(((matrix = (int **) malloc(sizeof(int *)*rows)) == NULL) ||
((matrix[0] = (int *) malloc(sizeof(int)*rows*cols)) == NULL))
return NULL;
for(i=1; i<rows; i++)
matrix[i] = matrix[0] + i*cols;
memset(matrix[0], 0, sizeof(int)*rows*cols);
return matrix;
}
// free mxArray
void freeMatrix(IN double **matrix)
{
free(*matrix);
free(matrix);
}
void freeIntMatrix(IN int **matrix)
{
free(*matrix);
free(matrix);
}
scope of mxArray
- The
mxArray
passed to amex
file through theplhs
input parameter exists outside the scope of themex
file, so is themex
created for an output argument. Do not free memory of those variables. - The
mex
file should destroy temporary arrays and free dynamically allocated memory.
access data of mxArray
The mxGet*
routines get references to the data in an mxArray
. Each function provides access to specific information in the mxArray
. Some useful functions are mxGetPr
(for type double), mxGetData
(for type other than double), mxGetM
, mxGetN
, and mxGetString
. Many of these functions have the corresponding mxSet*
routines that allows to modify values in the array.
For more information, please go to Fill mxArray.
#define IN
#define OUT
double** getMxArray(IN const mxArray *mxArr,
OUT int *rows,
OUT int *cols)
{
mwSize ndim;
double *arrDataPr, **matrix;
if((ndim = mxGetNumberofDimensions(mxArr)) != 2)
{
printf("input matrix has %d dimension, not 2\n", ndim);
return NULL;
}
*rows = mxGetM(mxArr);
*cols = mxGetN(mxArr);
if(((matrix = (double**)malloc(sizeof(double*) * (*rows))) == NULL) ||
((matrix[0] = (double*)malloc(sizeof(double) * (*rows) * (*cols))) == NULL))
{
return NULL;
}
for (i = 0; i < (*rows); ++i)
{
maxtrix[i] = matrix[0] + i * (*cols);
}
arrDataPr = mxGetPr(mxArr);
for (j = 0; j < (*cols); ++j)
for (i = 0; i < (*rows); ++i)
maxtrix[i][j] = *(arrDataPr++);
return matrix;
}
mxArray* putMxArray(double *matrix, int rows, int cols)
{
mxArray *mxArr;
mxArr = mxCreateDoubleMatrix(rows, cols, mxREAL);
double *ptr;
ptr = mxGetPr(mxArr);
for(mwSize j=0; j<cols; j++)
for(mwSize i=0; i<rows; i++)
*(ptr ++) = matrix[i*cols + j];
return mxArr;
}


Sutorimu
Home
Anime List
Movie
(current)
Genre
Request
Movie
Recomended
N/A
Josee to Tora to Sakana-tachi
Genre : Action, Sci-Fi, Supernatural, Magic, Romance, School


Ayyyy, I met a deadline!
If you don't remember (or didn't read the last blog post), I promised a new Discord server to put all my projects in (including this site!) And, well, it's finally available! You can get to it by clicking on this sentence.
I'm sure just the words "New Discord Server" already stimulates your senses and makes you want to join, but in case you don't, here's some random blurbs on why you should join:
This includes stuff like mutat.io and any upcoming stuff!
With the power of @everyone role pings, you can get up-to-date news on projects!
There's a lot of stuff that couldn't fit in the 1 paragraph that I needed all the info to be in on this site, but that isn't the case for Discord!
Socialization might be hard, but hey, at least you don't have to distance yourself like in Real-Life™!
...
...Okay, I'm done telemarketing. I should become an advertiser some day... But anyways.
If you want to check the Discord Server, here's the link again. Even if you aren't interested, you should at least check it out. I'd rather not get lonely in that server :p
That's all I have to say for now. All the projects mentioned before have all in some way, shape or form has had work started. So if you're hyped, join the server, and stayyy tuneeddddd...
~ggtylerr


[gecode-users] Dynamic creation of IntVarArgs
Max
chaosangel at gmx.de
Tue Dec 2 12:51:42 CET 2008
Hello everybody,
i wanted to create an IntVarArgs array for using linear constraints.
I need this array in an recursive function where the size is calculated
at the end of the recursion(recursion size == array size).
Now i found out that a can not dynamically create an IntVarArgs or an
IntArgs.
This, seems reasonable, because i would have to destroy it somewhere,
and i don't know if gecode copies the reference it gets in the linear
call(i don't think so and it would be better not to do so).
BUT:
Why can i not create an IntVarArgs array without size and initializing
it with a size at a later time.
Without that, i would have to recurse my tree two times, one time for
evaluating the size of the array, and one time to fill it. This is bad.
Do i have overseen something ? Why is this feature not supported.
Any ideas how to solve my problem?
Thanks in advance.
Max
More information about the gecode-users
mailing list