text:
Iran General NewsIran's Ahmadinejad says Syria crisis may engulf region
Iran's Ahmadinejad says Syria crisis may engulf region
Reuters: Iran's President Mahmoud Ahmadinejad on Tuesday warned that hostilities in Syria could engulf the region and accused some Syrians of trying to use their country's conflict to settle scores with Tehran. ABU DHABI (Reuters) – Iran's President Mahmoud Ahmadinejad on Tuesday warned that hostilities in Syria could engulf the region and accused some Syrians of trying to use their country's conflict to settle scores with Tehran.
In comments to Al Jazeera television, Ahmadinejad said that a national dialogue and new elections – rather than war – were the only way to solve the Syrian crisis, saying the Syrian people should choose their own path.
"There is another way to find a solution, it is national, mutual understanding in order for there to be elections in the future," he said.
The interview was translated from Persian into Arabic by Al Jazeera. He made similar remarks at a news conference in Tehran.
"We don't say what they should do. We help them sit down and reach a mutual understanding … We don't say who should go and who should stay, this would be interfering in countries' affairs. But we say it is people's right to choose," he told the news conference.
Every world power involved in the Syrian crisis "had (made) its own mistakes," he said, warning that the Syrian conflict would spread to other countries in the region if it was left unsolved.
"Tomorrow, the atmosphere in Jordan may be like what Syria is experiencing. Thus, we must search for a practical and good solution for all the people's of the area, otherwise catastrophes will fall upon us all."
Iran is a staunch ally of Syrian President Bashar al-Assad, who has been battling an uprising against his rule. Opposition activists say 30,000 people have been killed in the 18-month-old revolt, which has grown into a full-scale civil war.
Ahmadinejad suggested the Syrian crisis was being used to try to undermine Iran.
"All the Syrian people are respectable, but some want to settle accounts with Iran," he said.
Iran has been hit by international sanctions over its disputed nuclear program, which the West believes is aimed at producing nuclear weapons, a charge Tehran denies.
Tehran is also at odds with Gulf Arab states that are backing Syrian rebels seeking to topple Assad and who accuse Tehran of fomenting unrest among Shi'ite Muslim communities in their countries.
Washington and its Gulf Arab allies resisted attempts by former U.N. and Arab League peace envoy Kofi Annan to involve Iran in diplomatic efforts to resolve the Syria crisis, saying Tehran was part of the problem.
Ahmadinejad said he feared that calls for military intervention in Syria were growing.
"I have opposed war, but those who want things to be settled through dialogue are a minority and perhaps the majority are in favor of going ahead in the context of war," he said.
Iran had long enjoyed good relations with Syria, he added, conceding that Iran may have given "advice" to Damascus in the past. But he appeared to skirt the question of whether Tehran supplies arms to Syria.
"Let's assume that we supplied the Syrian side with weapons, would the problems be resolved? Is the regime going to sit there forever?" he said.
(Reporting by Raissa Kasolowsky in Abu Dhabi and Ahmed Tolba in Cairo; Additional reporting by Zahra Hosseinian in Zurich; Editing by Sami Aboudi and Andrew Osborn)
Previous articleMuffling the drums of war with Iran
Next articleIran rebukes 'enemy' on falling rial
Iran General News June 1, 2018
Funeral of Iconic Iranian Actor Sparks Fresh Anti-Government Protests
Iran Focus London, 1 Jun - The funeral of...
Iran moved billions via U.S. banks
New York Times: Iranian banks illegally shifted billions of...

redpajama_set_name: RedPajamaCommonCrawl


According to the space abundant wisdom industry market investigation and study core understood: The color lead is crayon's abbreviation. The color lead is the tintage tool which one kind very easy to grasp, draws the effect as well as the appearance are similar to the pencil.
The green pencil take an environmental protection terminology, has the same meaning to a certain extent with the organic foods, namely meant safety, environmental protection, non-toxic.
The safety pencil's concept may have generalized and division the narrow, the generalized safety pencil are refer to the long-term normal use not to be able to have the jeopardy or the adverse effect pencil to the body, but the narrow safety pencil may from the structure safety, raw material safety and so on different angle carry on the segmentation.


text:
Q: PowerShell Preemptive Authentication I am kind of stuck here, I am trying to make an http call with credentials and client token from PowerShell uing "GET" to an in-house web application (I did not create). I keep getting error 500 from the server.
This application requires Preemptive authentication. The first time I got this to work was in ReadyAPI when I selected the "Authenticate Pre-emptively" radio, the request worked.
This is the definition according to ReadyAPI that the radio button does

Pre-emptive auth – Specifies if ReadyAPI will wait until an authorization challenge is received to send the credentials. The parameter has the following options:
Use global preference – Use the settings defined in the HTTP Settings global preferences.
Authenticate pre-emptively – For this request only. Do not wait until an authorization challenge is received to send the credentials.

I have seen that in C# there is a preemptive auth setting however I haven't found any such equivalent for PowerShell.
Has anyone ever run into this issue before? Is there a way powershell can issue a pre-emptive authentication?
This is what I have, but this is just basic setup...
$base64AuthInfo =
[Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f
$user, $pass)))
$headers = New-Object "System.Collections.Generic.Dictionary[[String], String]]"
$headers = @{}
$headers.Add('Authorization',('Basic {0}' -f $base64AuthInfo))
$headers.Add('X-IBM-Client-ID', $clientId )

$uri = "https://myURI/development/authorization/token"

$invoke = Invoke-RestMethod -Headers $headers -Method Post -Uri $uri

A: Through shear luck... this fixed the pre-emptive authentication
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

redpajama_set_name: RedPajamaStackExchange


text:
import os
import sys
import time
import socket

from . import ircutils, registry, utils
from .version import version

###
# *** The following variables are affected by command-line options.  They are
#     not registry variables for a specific reason.  Do *not* change these to
#     registry variables without first consulting people smarter than yourself.
###

###
# daemonized: This determines whether or not the bot has been daemonized
#             (i.e., set to run in the background).  Obviously, this defaults
#             to False.  A command-line option for obvious reasons.
###
daemonized = False

###
# allowDefaultOwner: True if supybot.capabilities is allowed not to include
#                    '-owner' -- that is, if all users should be automatically
#                    recognized as owners.  That would suck, hence we require a
#                    command-line option to allow this stupidity.
###
allowDefaultOwner = False

###
# Here we replace values in other modules as appropriate.
###
utils.web.defaultHeaders['User-agent'] = \
                         'Mozilla/5.0 (Compatible; Supybot %s)' % version

###
# The standard registry.
###
supybot = registry.Group()
supybot.setName('supybot')

def registerGroup(Group, name, group=None, **kwargs):
    if kwargs:
        group = registry.Group(**kwargs)
    return Group.register(name, group)

def registerGlobalValue(group, name, value):
    value.channelValue = False
    return group.register(name, value)

def registerChannelValue(group, name, value):
    value._supplyDefault = True
    value.channelValue = True
    g = group.register(name, value)
    gname = g._name.lower()
    for name in registry._cache.iterkeys():
        if name.lower().startswith(gname) and len(gname) < len(name):
            name = name[len(gname)+1:] # +1 for .
            parts = registry.split(name)
            if len(parts) == 1 and parts[0] and ircutils.isChannel(parts[0]):
                # This gets the channel values so they always persist.
                g.get(parts[0])()

def registerPlugin(name, currentValue=None, public=True):
    group = registerGlobalValue(supybot.plugins, name,
        registry.Boolean(False, """Determines whether this plugin is loaded by
        default.""", showDefault=False))
    supybot.plugins().add(name)
    registerGlobalValue(group, 'public',
        registry.Boolean(public, """Determines whether this plugin is
        publicly visible."""))
    if currentValue is not None:
        supybot.plugins.get(name).setValue(currentValue)
    registerGroup(users.plugins, name)
    return group

def get(group, channel=None):
    if group.channelValue and \
       channel is not None and ircutils.isChannel(channel):
        return group.get(channel)()
    else:
        return group()

###
# The user info registry.
###
users = registry.Group()
users.setName('users')
registerGroup(users, 'plugins', orderAlphabetically=True)

def registerUserValue(group, name, value):
    assert group._name.startswith('users')
    value._supplyDefault = True
    group.register(name, value)

class ValidNick(registry.String):
    """Value must be a valid IRC nick."""
    def setValue(self, v):
        if not ircutils.isNick(v):
            self.error()
        else:
            registry.String.setValue(self, v)

class ValidNicks(registry.SpaceSeparatedListOf):
    Value = ValidNick

class ValidNickAllowingPercentS(ValidNick):
    """Value must be a valid IRC nick, with the possible exception of a %s
    in it."""
    def setValue(self, v):
        # If this works, it's a valid nick, aside from the %s.
        try:
            ValidNick.setValue(self, v.replace('%s', ''))
            # It's valid aside from the %s, we'll let it through.
            registry.String.setValue(self, v)
        except registry.InvalidRegistryValue:
            self.error()

class ValidNicksAllowingPercentS(ValidNicks):
    Value = ValidNickAllowingPercentS

class ValidChannel(registry.String):
    """Value must be a valid IRC channel name."""
    def setValue(self, v):
        self.channel = v
        if ',' in v:
            # To prevent stupid users from: a) trying to add a channel key
            # with a comma in it, b) trying to add channels separated by
            # commas instead of spaces
            try:
                (channel, _) = v.split(',')
            except ValueError:
                self.error()
        else:
            channel = v
        if not ircutils.isChannel(channel):
            self.error()
        else:
            registry.String.setValue(self, v)

    def error(self):
        try:
            super(ValidChannel, self).error()
        except registry.InvalidRegistryValue, e:
            e.channel = self.channel
            raise e

class ValidHostmask(registry.String):
    """Value must be a valid user hostmask."""
    def setValue(self, v):
        if not ircutils.isUserHostmask(v):
            self.error()
        super(ValidHostmask, self).setValue(v)

registerGlobalValue(supybot, 'nick',
   ValidNick('supybot', """Determines the bot's default nick."""))

registerGlobalValue(supybot.nick, 'alternates',
   ValidNicksAllowingPercentS(['%s`', '%s_'], """Determines what alternative
   nicks will be used if the primary nick (supybot.nick) isn't available.  A
   %s in this nick is replaced by the value of supybot.nick when used. If no
   alternates are given, or if all are used, the supybot.nick will be perturbed
   appropriately until an unused nick is found."""))

registerGlobalValue(supybot, 'ident',
    ValidNick('supybot', """Determines the bot's ident string, if the server
    doesn't provide one by default."""))

class VersionIfEmpty(registry.String):
    def __call__(self):
        ret = registry.String.__call__(self)
        if not ret:
            ret = 'Supybot %s' % version
        return ret

registerGlobalValue(supybot, 'user',
    VersionIfEmpty('', """Determines the user the bot sends to the server.
    A standard user using the current version of the bot will be generated if
    this is left empty."""))

class Networks(registry.SpaceSeparatedSetOfStrings):
    List = ircutils.IrcSet

registerGlobalValue(supybot, 'networks',
    Networks([], """Determines what networks the bot will connect to.""",
             orderAlphabetically=True))

class Servers(registry.SpaceSeparatedListOfStrings):
    def normalize(self, s):
        if ':' not in s:
            s += ':6667'
        return s

    def convert(self, s):
        s = self.normalize(s)
        (server, port) = s.rsplit(':', 1)
        port = int(port)
        return (server, port)

    def __call__(self):
        L = registry.SpaceSeparatedListOfStrings.__call__(self)
        return map(self.convert, L)

    def __str__(self):
        return ' '.join(registry.SpaceSeparatedListOfStrings.__call__(self))

    def append(self, s):
        L = registry.SpaceSeparatedListOfStrings.__call__(self)
        L.append(s)

class SpaceSeparatedSetOfChannels(registry.SpaceSeparatedListOf):
    sorted = True
    List = ircutils.IrcSet
    Value = ValidChannel
    def join(self, channel):
        from . import ircmsgs # Don't put this globally!  It's recursive.
        key = self.key.get(channel)()
        if key:
            return ircmsgs.join(channel, key)
        else:
            return ircmsgs.join(channel)

def registerNetwork(name, password='', ssl=False):
    network = registerGroup(supybot.networks, name)
    registerGlobalValue(network, 'password', registry.String(password,
        """Determines what password will be used on %s.  Yes, we know that
        technically passwords are server-specific and not network-specific,
        but this is the best we can do right now.""" % name, private=True))
    registryServers = registerGlobalValue(network, 'servers', Servers([],
        """Space-separated list of servers the bot will connect to for %s.
        Each will be tried in order, wrapping back to the first when the cycle
        is completed.""" % name))
    registerGlobalValue(network, 'channels', SpaceSeparatedSetOfChannels([],
        """Space-separated list of channels the bot will join only on %s."""
        % name, private=True))
    registerGlobalValue(network, 'ssl', registry.Boolean(ssl,
        """Determines whether the bot will attempt to connect with SSL sockets
        to %s.""" % name))
    registerChannelValue(network.channels, 'key', registry.String('',
        """Determines what key (if any) will be used to join the channel.""", private=True))
    return network

# Let's fill our networks.
for (name, s) in registry._cache.iteritems():
    if name.startswith('supybot.networks.'):
        parts = name.split('.')
        name = parts[2]
        if name != 'default':
            registerNetwork(name)

###
# Reply/error tweaking.
###
registerGroup(supybot, 'reply')

registerGroup(supybot.reply, 'format')
registerChannelValue(supybot.reply.format, 'time',
    registry.String('%I:%M %p, %B %d, %Y', """Determines how timestamps printed
    for human reading should be formatted. Refer to the Python documentation
    for the time module to see valid formatting characters for time
    formats."""))
def timestamp(t):
    if t is None:
        t = time.time()
    t = time.localtime(t)
    format = get(supybot.reply.format.time, dynamic.channel)
    return time.strftime(format, t)
utils.str.timestamp = timestamp

registerGroup(supybot.reply.format.time, 'elapsed')
registerChannelValue(supybot.reply.format.time.elapsed, 'short',
    registry.Boolean(False, """Determines whether elapsed times will be given
    as "1 day, 2 hours, 3 minutes, and 15 seconds" or as "1d 2h 3m 15s"."""))

originalTimeElapsed = utils.timeElapsed
def timeElapsed(*args, **kwargs):
    kwargs['short'] = supybot.reply.format.time.elapsed.short()
    return originalTimeElapsed(*args, **kwargs)
utils.timeElapsed = timeElapsed

registerGlobalValue(supybot.reply, 'maximumLength',
    registry.Integer(512*256, """Determines the absolute maximum length of the
    bot's reply -- no reply will be passed through the bot with a length
    greater than this."""))

registerChannelValue(supybot.reply, 'mores',
    registry.Boolean(True, """Determines whether the bot will break up long
    messages into chunks and allow users to use  the 'more' command to get the
    remaining chunks."""))

registerChannelValue(supybot.reply.mores, 'maximum',
    registry.PositiveInteger(50, """Determines what the maximum number of
    chunks (for use with the 'more' command) will be."""))

registerChannelValue(supybot.reply.mores, 'length',
    registry.NonNegativeInteger(0, """Determines how long individual chunks
    will be.  If set to 0, uses our super-tweaked,
    get-the-most-out-of-an-individual-message default."""))

registerChannelValue(supybot.reply.mores, 'instant',
    registry.PositiveInteger(1, """Determines how many mores will be sent
    instantly (i.e., without the use of the more command, immediately when
    they are formed).  Defaults to 1, which means that a more command will be
    required for all but the first chunk."""))

registerGlobalValue(supybot.reply, 'oneToOne',
    registry.Boolean(True, """Determines whether the bot will send
    multi-message replies in a single message or in multiple messages.  For
    safety purposes (so the bot is less likely to flood) it will normally send
    everything in a single message, using mores if necessary."""))

registerChannelValue(supybot.reply, 'whenNotCommand',
    registry.Boolean(True, """Determines whether the bot will reply with an
    error message when it is addressed but not given a valid command.  If this
    value is False, the bot will remain silent, as long as no other plugins
    override the normal behavior."""))

registerGroup(supybot.reply, 'error')
registerGlobalValue(supybot.reply.error, 'detailed',
    registry.Boolean(False, """Determines whether error messages that result
    from bugs in the bot will show a detailed error message (the uncaught
    exception) or a generic error message."""))
registerChannelValue(supybot.reply.error, 'inPrivate',
    registry.Boolean(False, """Determines whether the bot will send error
    messages to users in private.  You might want to do this in order to keep
    channel traffic to minimum.  This can be used in combination with
    supybot.reply.error.withNotice."""))
registerChannelValue(supybot.reply.error, 'withNotice',
    registry.Boolean(False, """Determines whether the bot will send error
    messages to users via NOTICE instead of PRIVMSG.  You might want to do this
    so users can ignore NOTICEs from the bot and not have to see error
    messages; or you might want to use it in combination with
    supybot.reply.errorInPrivate so private errors don't open a query window
    in most IRC clients."""))
registerChannelValue(supybot.reply.error, 'noCapability',
    registry.Boolean(False, """Determines whether the bot will send an error
    message to users who attempt to call a command for which they do not have
    the necessary capability.  You may wish to make this True if you don't want
    users to understand the underlying security system preventing them from
    running certain commands."""))

registerChannelValue(supybot.reply, 'inPrivate',
    registry.Boolean(False, """Determines whether the bot will reply privately
    when replying in a channel, rather than replying to the whole channel."""))

registerChannelValue(supybot.reply, 'withNotice',
    registry.Boolean(False, """Determines whether the bot will reply with a
    notice when replying in a channel, rather than replying with a privmsg as
    normal."""))

# XXX: User value.
registerGlobalValue(supybot.reply, 'withNoticeWhenPrivate',
    registry.Boolean(False, """Determines whether the bot will reply with a
    notice when it is sending a private message, in order not to open a /query
    window in clients.  This can be overridden by individual users via the user
    configuration variable reply.withNoticeWhenPrivate."""))

registerChannelValue(supybot.reply, 'withNickPrefix',
    registry.Boolean(True, """Determines whether the bot will always prefix the
    user's nick to its reply to that user's command."""))

registerChannelValue(supybot.reply, 'whenNotAddressed',
    registry.Boolean(False, """Determines whether the bot should attempt to
    reply to all messages even if they don't address it (either via its nick
    or a prefix character).  If you set this to True, you almost certainly want
    to set supybot.reply.whenNotCommand to False."""))

registerChannelValue(supybot.reply, 'requireChannelCommandsToBeSentInChannel',
    registry.Boolean(False, """Determines whether the bot will allow you to
    send channel-related commands outside of that channel.  Sometimes people
    find it confusing if a channel-related command (like Filter.outfilter)
    changes the behavior of the channel but was sent outside the channel
    itself."""))

registerGlobalValue(supybot, 'followIdentificationThroughNickChanges',
    registry.Boolean(False, """Determines whether the bot will unidentify
    someone when that person changes his or her nick.  Setting this to True
    will cause the bot to track such changes.  It defaults to False for a
    little greater security."""))

registerGlobalValue(supybot, 'alwaysJoinOnInvite',
    registry.Boolean(False, """Determines whether the bot will always join a
    channel when it's invited.  If this value is False, the bot will only join
    a channel if the user inviting it has the 'admin' capability (or if it's
    explicitly told to join the channel using the Admin.join command)"""))

registerChannelValue(supybot.reply, 'showSimpleSyntax',
    registry.Boolean(False, """Supybot normally replies with the full help
    whenever a user misuses a command.  If this value is set to True, the bot
    will only reply with the syntax of the command (the first line of the
    help) rather than the full help."""))

class ValidPrefixChars(registry.String):
    """Value must contain only ~!@#$%^&*()_-+=[{}]\\|'\";:,<.>/?"""
    def setValue(self, v):
        if v.translate(utils.str.chars, '`~!@#$%^&*()_-+=[{}]\\|\'";:,<.>/?'):
            self.error()
        registry.String.setValue(self, v)

registerGroup(supybot.reply, 'whenAddressedBy')
registerChannelValue(supybot.reply.whenAddressedBy, 'chars',
    ValidPrefixChars('', """Determines what prefix characters the bot will
    reply to.  A prefix character is a single character that the bot will use
    to determine what messages are addressed to it; when there are no prefix
    characters set, it just uses its nick.  Each character in this string is
    interpreted individually; you can have multiple prefix chars
    simultaneously, and if any one of them is used as a prefix the bot will
    assume it is being addressed."""))

registerChannelValue(supybot.reply.whenAddressedBy, 'strings',
    registry.SpaceSeparatedSetOfStrings([], """Determines what strings the bot
    will reply to when they are at the beginning of the message.  Whereas
    prefix.chars can only be one character (although there can be many of
    them), this variable is a space-separated list of strings, so you can
    set something like '@@ ??' and the bot will reply when a message is
    prefixed by either @@ or ??."""))
registerChannelValue(supybot.reply.whenAddressedBy, 'nick',
    registry.Boolean(True, """Determines whether the bot will reply when people
    address it by its nick, rather than with a prefix character."""))
registerChannelValue(supybot.reply.whenAddressedBy.nick, 'atEnd',
    registry.Boolean(False, """Determines whether the bot will reply when
    people address it by its nick at the end of the message, rather than at
    the beginning."""))
registerChannelValue(supybot.reply.whenAddressedBy, 'nicks',
    registry.SpaceSeparatedSetOfStrings([], """Determines what extra nicks the
    bot will always respond to when addressed by, even if its current nick is
    something else."""))

###
# Replies
###
registerGroup(supybot, 'replies')

registerChannelValue(supybot.replies, 'success',
    registry.NormalizedString("""The operation succeeded.""", """Determines
    what message the bot replies with when a command succeeded.  If this
    configuration variable is empty, no success message will be sent."""))

registerChannelValue(supybot.replies, 'error',
    registry.NormalizedString("""An error has occurred and has been logged.
    Please contact this bot's administrator for more information.""", """
    Determines what error message the bot gives when it wants to be
    ambiguous."""))

registerChannelValue(supybot.replies, 'incorrectAuthentication',
    registry.NormalizedString("""Your hostmask doesn't match or your password
    is wrong.""", """Determines what message the bot replies with when someone
    tries to use a command that requires being identified or having a password
    and neither credential is correct."""))

# XXX: This should eventually check that there's one and only one %s here.
registerChannelValue(supybot.replies, 'noUser',
    registry.NormalizedString("""I can't find %s in my user
    database.  If you didn't give a user name, then I might not know what your
    user is, and you'll need to identify before this command might work.""",
    """Determines what error message the bot replies with when someone tries
    to accessing some information on a user the bot doesn't know about."""))

registerChannelValue(supybot.replies, 'notRegistered',
    registry.NormalizedString("""You must be registered to use this command.
    If you are already registered, you must either identify (using the identify
    command) or add a hostmask matching your current hostmask (using the
    "hostmask add" command).""", """Determines what error message the bot
    replies with when someone tries to do something that requires them to be
    registered but they're not currently recognized."""))

registerChannelValue(supybot.replies, 'noCapability',
    registry.NormalizedString("""You don't have the %s capability.  If you
    think that you should have this capability, be sure that you are identified
    before trying again.  The 'whoami' command can tell you if you're
    identified.""", """Determines what error message is given when the bot is
    telling someone they aren't cool enough to use the command they tried to
    use."""))

registerChannelValue(supybot.replies, 'genericNoCapability',
    registry.NormalizedString("""You're missing some capability you need.
    This could be because you actually possess the anti-capability for the
    capability that's required of you, or because the channel provides that
    anti-capability by default, or because the global capabilities include
    that anti-capability.  Or, it could be because the channel or
    supybot.capabilities.default is set to False, meaning that no commands are
    allowed unless explicitly in your capabilities.  Either way, you can't do
    what you want to do.""",
    """Determines what generic error message is given when the bot is telling
    someone that they aren't cool enough to use the command they tried to use,
    and the author of the code calling errorNoCapability didn't provide an
    explicit capability for whatever reason."""))

registerChannelValue(supybot.replies, 'requiresPrivacy',
    registry.NormalizedString("""That operation cannot be done in a
    channel.""", """Determines what error messages the bot sends to people who
    try to do things in a channel that really should be done in private."""))

registerChannelValue(supybot.replies, 'possibleBug',
    registry.NormalizedString("""This may be a bug.  If you think it is, please
    file a bug report at
    <http://sourceforge.net/tracker/?func=add&group_id=58965&atid=489447>.""",
    """Determines what message the bot sends when it thinks you've encountered
    a bug that the developers don't know about."""))
###
# End supybot.replies.
###

registerGlobalValue(supybot, 'snarfThrottle',
    registry.Float(10.0, """A floating point number of seconds to throttle
    snarfed URLs, in order to prevent loops between two bots snarfing the same
    URLs and having the snarfed URL in the output of the snarf message."""))

registerGlobalValue(supybot, 'upkeepInterval',
    registry.PositiveInteger(3600, """Determines the number of seconds between
    running the upkeep function that flushes (commits) open databases, collects
    garbage, and records some useful statistics at the debugging level."""))

registerGlobalValue(supybot, 'flush',
    registry.Boolean(True, """Determines whether the bot will periodically
    flush data and configuration files to disk.  Generally, the only time
    you'll want to set this to False is when you want to modify those
    configuration files by hand and don't want the bot to flush its current
    version over your modifications.  Do note that if you change this to False
    inside the bot, your changes won't be flushed.  To make this change
    permanent, you must edit the registry yourself."""))

###
# supybot.commands.  For stuff relating to commands.
###
registerGroup(supybot, 'commands')

class ValidQuotes(registry.Value):
    """Value must consist solely of \", ', and ` characters."""
    def setValue(self, v):
        if [c for c in v if c not in '"`\'']:
            self.error()
        super(ValidQuotes, self).setValue(v)

    def __str__(self):
        return str(self.value)

registerChannelValue(supybot.commands, 'quotes',
    ValidQuotes('"', """Determines what characters are valid for quoting
    arguments to commands in order to prevent them from being tokenized.
    """))
# This is a GlobalValue because bot owners should be able to say, "There will
# be no nesting at all on this bot."  Individual channels can just set their
# brackets to the empty string.
registerGlobalValue(supybot.commands, 'nested',
    registry.Boolean(True, """Determines whether the bot will allow nested
    commands, which rule.  You definitely should keep this on."""))
registerGlobalValue(supybot.commands.nested, 'maximum',
    registry.PositiveInteger(10, """Determines what the maximum number of
    nested commands will be; users will receive an error if they attempt
    commands more nested than this."""))

class ValidBrackets(registry.OnlySomeStrings):
    validStrings = ('', '[]', '<>', '{}', '()')

registerChannelValue(supybot.commands.nested, 'brackets',
    ValidBrackets('[]', """Supybot allows you to specify what brackets are used
    for your nested commands.  Valid sets of brackets include [], <>, and {}
    ().  [] has strong historical motivation, as well as being the brackets
    that don't require shift.  <> or () might be slightly superior because they
    cannot occur in a nick.  If this string is empty, nested commands will
    not be allowed in this channel."""))
registerChannelValue(supybot.commands.nested, 'pipeSyntax',
    registry.Boolean(False, """Supybot allows nested commands. Enabling this
    option will allow nested commands with a syntax similar to UNIX pipes, for
    example: 'bot: foo | bar'."""))

registerGroup(supybot.commands, 'defaultPlugins',
    orderAlphabetically=True, help="""Determines what commands have default
    plugins set, and which plugins are set to be the default for each of those
    commands.""")
registerGlobalValue(supybot.commands.defaultPlugins, 'importantPlugins',
    registry.SpaceSeparatedSetOfStrings(
        ['Admin', 'Channel', 'Config', 'Misc', 'Owner', 'Plugin', 'User'],
        """Determines what plugins automatically get precedence over all other
        plugins when selecting a default plugin for a command.  By default,
        this includes the standard loaded plugins.  You probably shouldn't
        change this if you don't know what you're doing; if you do know what
        you're doing, then also know that this set is case-sensitive."""))

# supybot.commands.disabled moved to callbacks for canonicalName.

###
# supybot.abuse.  For stuff relating to abuse of the bot.
###
registerGroup(supybot, 'abuse')
registerGroup(supybot.abuse, 'flood')
registerGlobalValue(supybot.abuse.flood, 'command',
    registry.Boolean(True, """Determines whether the bot will defend itself
    against command-flooding."""))
registerGlobalValue(supybot.abuse.flood.command, 'maximum',
    registry.PositiveInteger(12, """Determines how many commands users are
    allowed per minute.  If a user sends more than this many commands in any
    60 second period, he or she will be ignored for
    supybot.abuse.flood.command.punishment seconds."""))
registerGlobalValue(supybot.abuse.flood.command, 'punishment',
    registry.PositiveInteger(300, """Determines how many seconds the bot
    will ignore users who flood it with commands."""))

registerGlobalValue(supybot.abuse.flood.command, 'invalid',
    registry.Boolean(True, """Determines whether the bot will defend itself
    against invalid command-flooding."""))
registerGlobalValue(supybot.abuse.flood.command.invalid, 'maximum',
    registry.PositiveInteger(5, """Determines how many invalid commands users
    are allowed per minute.  If a user sends more than this many invalid
    commands in any 60 second period, he or she will be ignored for
    supybot.abuse.flood.command.invalid.punishment seconds.  Typically, this
    value is lower than supybot.abuse.flood.command.maximum, since it's far
    less likely (and far more annoying) for users to flood with invalid
    commands than for them to flood with valid commands."""))
registerGlobalValue(supybot.abuse.flood.command.invalid, 'punishment',
    registry.PositiveInteger(600, """Determines how many seconds the bot
    will ignore users who flood it with invalid commands.  Typically, this
    value is higher than supybot.abuse.flood.command.punishment, since it's far
    less likely (and far more annoying) for users to flood witih invalid
    commands than for them to flood with valid commands."""))
registerGlobalValue(supybot.abuse.flood.command.invalid, 'notify',
    registry.Boolean(True, """Determines whether the bot will notify people that they're
    being ignored for invalid command flooding."""))

###
# supybot.drivers.  For stuff relating to Supybot's drivers (duh!)
###
registerGroup(supybot, 'drivers')
registerGlobalValue(supybot.drivers, 'poll',
    registry.PositiveFloat(1.0, """Determines the default length of time a
    driver should block waiting for input."""))

class ValidDriverModule(registry.OnlySomeStrings):
    validStrings = ('default', 'Socket', 'Twisted')

registerGlobalValue(supybot.drivers, 'module',
    ValidDriverModule('default', """Determines what driver module the bot will
    use.  Socket, a simple driver based on timeout sockets, is used by default
    because it's simple and stable.  Twisted is very stable and simple, and if
    you've got Twisted installed, is probably your best bet."""))

registerGlobalValue(supybot.drivers, 'maxReconnectWait',
    registry.PositiveFloat(300.0, """Determines the maximum time the bot will
    wait before attempting to reconnect to an IRC server.  The bot may, of
    course, reconnect earlier if possible."""))

###
# supybot.directories, for stuff relating to directories.
###

# XXX This shouldn't make directories willy-nilly.  As it is now, if it's
#     configured, it'll still make the default directories, I think.
class Directory(registry.String):
    def __call__(self):
        # ??? Should we perhaps always return an absolute path here?
        v = super(Directory, self).__call__()
        if not os.path.exists(v):
            os.mkdir(v)
        return v

    def dirize(self, filename):
        myself = self()
        if os.path.isabs(filename):
            filename = os.path.abspath(filename)
            selfAbs = os.path.abspath(myself)
            commonPrefix = os.path.commonprefix([selfAbs, filename])
            filename = filename[len(commonPrefix):]
        elif not os.path.isabs(myself):
            if filename.startswith(myself):
                filename = filename[len(myself):]
        filename = filename.lstrip(os.path.sep) # Stupid os.path.join!
        return os.path.join(myself, filename)

class DataFilename(registry.String):
    def __call__(self):
        v = super(DataFilename, self).__call__()
        dataDir = supybot.directories.data()
        if not v.startswith(dataDir):
            v = os.path.basename(v)
            v = os.path.join(dataDir, v)
        self.setValue(v)
        return v

class DataFilenameDirectory(DataFilename, Directory):
    def __call__(self):
        v = DataFilename.__call__(self)
        v = Directory.__call__(self)
        return v

registerGroup(supybot, 'directories')
registerGlobalValue(supybot.directories, 'conf',
    Directory('conf', """Determines what directory configuration data is
    put into."""))
registerGlobalValue(supybot.directories, 'data',
    Directory('data', """Determines what directory data is put into."""))
registerGlobalValue(supybot.directories, 'backup',
    Directory('backup', """Determines what directory backup data is put
    into."""))
registerGlobalValue(supybot.directories.data, 'tmp',
    DataFilenameDirectory('tmp', """Determines what directory temporary files
    are put into."""))

utils.file.AtomicFile.default.tmpDir = supybot.directories.data.tmp
utils.file.AtomicFile.default.backupDir = supybot.directories.backup

registerGlobalValue(supybot.directories, 'plugins',
    registry.CommaSeparatedListOfStrings([], """Determines what directories the
    bot will look for plugins in.  Accepts a comma-separated list of strings.
    This means that to add another directory, you can nest the former value and
    add a new one.  E.g. you can say: bot: 'config supybot.directories.plugins
    [config supybot.directories.plugins], newPluginDirectory'."""))

registerGlobalValue(supybot, 'plugins',
    registry.SpaceSeparatedSetOfStrings([], """Determines what plugins will
    be loaded.""", orderAlphabetically=True))
registerGlobalValue(supybot.plugins, 'alwaysLoadImportant',
    registry.Boolean(True, """Determines whether the bot will always load
    important plugins (Admin, Channel, Config, Misc, Owner, and User)
    regardless of what their configured state is.  Generally, if these plugins
    are configured not to load, you didn't do it on purpose, and you still
    want them to load.  Users who don't want to load these plugins are smart
    enough to change the value of this variable appropriately :)"""))

###
# supybot.databases.  For stuff relating to Supybot's databases (duh!)
###
class Databases(registry.SpaceSeparatedListOfStrings):
    def __call__(self):
        v = super(Databases, self).__call__()
        if not v:
            v = ['anydbm', 'cdb', 'flat', 'pickle']
            if 'sqlite' in sys.modules:
                v.insert(0, 'sqlite')
        return v

    def serialize(self):
        return ' '.join(self.value)

registerGlobalValue(supybot, 'databases',
    Databases([], """Determines what databases are available for use. If this
    value is not configured (that is, if its value is empty) then sane defaults
    will be provided."""))

registerGroup(supybot.databases, 'users')
registerGlobalValue(supybot.databases.users, 'filename',
    registry.String('users.conf', """Determines what filename will be used for
    the users database.  This file will go into the directory specified by the
    supybot.directories.conf variable."""))
registerGlobalValue(supybot.databases.users, 'timeoutIdentification',
    registry.Integer(0, """Determines how long it takes identification to time
    out.  If the value is less than or equal to zero, identification never
    times out."""))
registerGlobalValue(supybot.databases.users, 'allowUnregistration',
    registry.Boolean(False, """Determines whether the bot will allow users to
    unregister their users.  This can wreak havoc with already-existing
    databases, so by default we don't allow it.  Enable this at your own risk.
    (Do also note that this does not prevent the owner of the bot from using
    the unregister command.)
    """))

registerGroup(supybot.databases, 'ignores')
registerGlobalValue(supybot.databases.ignores, 'filename',
    registry.String('ignores.conf', """Determines what filename will be used
    for the ignores database.  This file will go into the directory specified
    by the supybot.directories.conf variable."""))

registerGroup(supybot.databases, 'channels')
registerGlobalValue(supybot.databases.channels, 'filename',
    registry.String('channels.conf', """Determines what filename will be used
    for the channels database.  This file will go into the directory specified
    by the supybot.directories.conf variable."""))

# TODO This will need to do more in the future (such as making sure link.allow
# will let the link occur), but for now let's just leave it as this.
class ChannelSpecific(registry.Boolean):
    def getChannelLink(self, channel):
        channelSpecific = supybot.databases.plugins.channelSpecific
        channels = [channel]
        def hasLinkChannel(channel):
            if not get(channelSpecific, channel):
                lchannel = get(channelSpecific.link, channel)
                if not get(channelSpecific.link.allow, lchannel):
                    return False
                return channel != lchannel
            return False
        lchannel = channel
        while hasLinkChannel(lchannel):
            lchannel = get(channelSpecific.link, lchannel)
            if lchannel not in channels:
                channels.append(lchannel)
            else:
                # Found a cyclic link.  We'll just use the current channel
                lchannel = channel
                break
        return lchannel

registerGroup(supybot.databases, 'plugins')
registerChannelValue(supybot.databases.plugins, 'channelSpecific',
    ChannelSpecific(True, """Determines whether database-based plugins that
    can be channel-specific will be so.  This can be overridden by individual
    channels.  Do note that the bot needs to be restarted immediately after
    changing this variable or your db plugins may not work for your channel;
    also note that you may wish to set
    supybot.databases.plugins.channelSpecific.link appropriately if you wish
    to share a certain channel's databases globally."""))
registerChannelValue(supybot.databases.plugins.channelSpecific, 'link',
    ValidChannel('#', """Determines what channel global (non-channel-specific)
    databases will be considered a part of.  This is helpful if you've been
    running channel-specific for awhile and want to turn the databases for
    your primary channel into global databases.  If
    supybot.databases.plugins.channelSpecific.link.allow prevents linking, the
    current channel will be used.  Do note that the bot needs to be restarted
    immediately after changing this variable or your db plugins may not work
    for your channel."""))
registerChannelValue(supybot.databases.plugins.channelSpecific.link, 'allow',
    registry.Boolean(True, """Determines whether another channel's global
    (non-channel-specific) databases will be allowed to link to this channel's
    databases.  Do note that the bot needs to be restarted immediately after
    changing this variable or your db plugins may not work for your channel.
    """))

class CDB(registry.Boolean):
    def connect(self, filename):
        from . import cdb
        basename = os.path.basename(filename)
        journalName = supybot.directories.data.tmp.dirize(basename+'.journal')
        return cdb.open(filename, 'c',
                        journalName=journalName,
                        maxmods=self.maximumModifications())

registerGroup(supybot.databases, 'types')
registerGlobalValue(supybot.databases.types, 'cdb', CDB(True, """Determines
    whether CDB databases will be allowed as a database implementation."""))
registerGlobalValue(supybot.databases.types.cdb, 'maximumModifications',
    registry.Probability(0.5, """Determines how often CDB databases will have
    their modifications flushed to disk.  When the number of modified records
    is greater than this fraction of the total number of records, the database
    will be entirely flushed to disk."""))

# XXX Configuration variables for dbi, sqlite, flat, mysql, etc.

###
# Protocol information.
###
originalIsNick = ircutils.isNick
def isNick(s, strictRfc=None, **kw):
    if strictRfc is None:
        strictRfc = supybot.protocols.irc.strictRfc()
    return originalIsNick(s, strictRfc=strictRfc, **kw)
ircutils.isNick = isNick

###
# supybot.protocols
###
registerGroup(supybot, 'protocols')

###
# supybot.protocols.irc
###
registerGroup(supybot.protocols, 'irc')

class Banmask(registry.SpaceSeparatedSetOfStrings):
    validStrings = ('exact', 'nick', 'user', 'host')
    def __init__(self, *args, **kwargs):
        assert self.validStrings, 'There must be some valid strings.  ' \
                                  'This is a bug.'
        self.__parent = super(Banmask, self)
        self.__parent.__init__(*args, **kwargs)
        self.__doc__ = format('Valid values include %L.',
                              map(repr, self.validStrings))

    def help(self):
        strings = [s for s in self.validStrings if s]
        return format('%s  Valid strings: %L.', self._help, strings)

    def normalize(self, s):
        lowered = s.lower()
        L = list(map(str.lower, self.validStrings))
        try:
            i = L.index(lowered)
        except ValueError:
            return s # This is handled in setValue.
        return self.validStrings[i]

    def setValue(self, v):
        v = map(self.normalize, v)
        for s in v:
            if s not in self.validStrings:
                self.error()
        self.__parent.setValue(self.List(v))

    def makeBanmask(self, hostmask, options=None):
        """Create a banmask from the given hostmask.  If a style of banmask
        isn't specified via options, the value of
        conf.supybot.protocols.irc.banmask is used.

        options - A list specifying which parts of the hostmask should
        explicitly be matched: nick, user, host.  If 'exact' is given, then
        only the exact hostmask will be used."""
        channel = dynamic.channel
        assert channel is None or ircutils.isChannel(channel)
        (nick, user, host) = ircutils.splitHostmask(hostmask)
        bnick = '*'
        buser = '*'
        bhost = '*'
        if not options:
            options = get(supybot.protocols.irc.banmask, channel)
        for option in options:
            if option == 'nick':
                bnick = nick
            elif option == 'user':
                buser = user
            elif option == 'host':
                bhost = host
            elif option == 'exact':
                return hostmask
        if (bnick, buser, bhost) == ('*', '*', '*') and \
                ircutils.isUserHostmask(hostmask):
            return hostmask
        return ircutils.joinHostmask(bnick, buser, bhost)

registerChannelValue(supybot.protocols.irc, 'banmask',
    Banmask(['user', 'host'], """Determines what will be used as the
    default banmask style."""))

registerGlobalValue(supybot.protocols.irc, 'strictRfc',
    registry.Boolean(True, """Determines whether the bot will strictly follow
    the RFC; currently this only affects what strings are considered to be
    nicks. If you're using a server or a network that requires you to message
    a nick such as services@this.network.server then you you should set this to
    False."""))

registerGlobalValue(supybot.protocols.irc, 'umodes',
    registry.String('', """Determines what user modes the bot will request from
    the server when it first connects.  Many people might choose +i; some
    networks allow +x, which indicates to the auth services on those networks
    that you should be given a fake host."""))

registerGlobalValue(supybot.protocols.irc, 'vhost',
    registry.String('', """Determines what vhost the bot will bind to before
    connecting to the IRC server."""))

registerGlobalValue(supybot.protocols.irc, 'maxHistoryLength',
    registry.Integer(1000, """Determines how many old messages the bot will
    keep around in its history.  Changing this variable will not take effect
    until the bot is restarted."""))

registerGlobalValue(supybot.protocols.irc, 'throttleTime',
    registry.Float(1.0, """A floating point number of seconds to throttle
    queued messages -- that is, messages will not be sent faster than once per
    throttleTime seconds."""))

registerGlobalValue(supybot.protocols.irc, 'ping',
    registry.Boolean(True, """Determines whether the bot will send PINGs to the
    server it's connected to in order to keep the connection alive and discover
    earlier when it breaks.  Really, this option only exists for debugging
    purposes: you always should make it True unless you're testing some strange
    server issues."""))

registerGlobalValue(supybot.protocols.irc.ping, 'interval',
    registry.Integer(120, """Determines the number of seconds between sending
    pings to the server, if pings are being sent to the server."""))

registerGroup(supybot.protocols.irc, 'queuing')
registerGlobalValue(supybot.protocols.irc.queuing, 'duplicates',
    registry.Boolean(False, """Determines whether the bot will refuse duplicate
    messages to be queued for delivery to the server.  This is a safety
    mechanism put in place to prevent plugins from sending the same message
    multiple times; most of the time it doesn't matter, unless you're doing
    certain kinds of plugin hacking."""))

registerGroup(supybot.protocols.irc.queuing, 'rateLimit')
registerGlobalValue(supybot.protocols.irc.queuing.rateLimit, 'join',
    registry.Float(0, """Determines how many seconds must elapse between JOINs
    sent to the server."""))

###
# supybot.protocols.http
###
registerGroup(supybot.protocols, 'http')
registerGlobalValue(supybot.protocols.http, 'peekSize',
    registry.PositiveInteger(4096, """Determines how many bytes the bot will
    'peek' at when looking through a URL for a doctype or title or something
    similar.  It'll give up after it reads this many bytes, even if it hasn't
    found what it was looking for."""))

registerGlobalValue(supybot.protocols.http, 'proxy',
    registry.String('', """Determines what proxy all HTTP requests should go
    through.  The value should be of the form 'host:port'."""))
utils.web.proxy = supybot.protocols.http.proxy

###
# Especially boring stuff.
###
registerGlobalValue(supybot, 'defaultIgnore',
    registry.Boolean(False, """Determines whether the bot will ignore
    unregistered users by default.  Of course, that'll make it particularly
    hard for those users to register or identify with the bot, but that's your
    problem to solve."""))

class IP(registry.String):
    """Value must be a valid IP."""
    def setValue(self, v):
        if v and not utils.net.isIP(v):
            self.error()
        else:
            registry.String.setValue(self, v)

registerGlobalValue(supybot, 'externalIP',
   IP('', """A string that is the external IP of the bot.  If this is the empty
   string, the bot will attempt to find out its IP dynamically (though
   sometimes that doesn't work, hence this variable)."""))

class SocketTimeout(registry.PositiveInteger):
    """Value must be an integer greater than supybot.drivers.poll and must be
    greater than or equal to 1."""
    def setValue(self, v):
        if v < supybot.drivers.poll() or v < 1:
            self.error()
        registry.PositiveInteger.setValue(self, v)
        socket.setdefaulttimeout(self.value)

registerGlobalValue(supybot, 'defaultSocketTimeout',
    SocketTimeout(10, """Determines what the default timeout for socket objects
    will be.  This means that *all* sockets will timeout when this many seconds
    has gone by (unless otherwise modified by the author of the code that uses
    the sockets)."""))

registerGlobalValue(supybot, 'pidFile',
    registry.String('', """Determines what file the bot should write its PID
    (Process ID) to, so you can kill it more easily.  If it's left unset (as is
    the default) then no PID file will be written.  A restart is required for
    changes to this variable to take effect."""))

###
# Debugging options.
###
registerGroup(supybot, 'debug')
registerGlobalValue(supybot.debug, 'threadAllCommands',
    registry.Boolean(False, """Determines whether the bot will automatically
    thread all commands."""))
registerGlobalValue(supybot.debug, 'flushVeryOften',
    registry.Boolean(False, """Determines whether the bot will automatically
    flush all flushers *very* often.  Useful for debugging when you don't know
    what's breaking or when, but think that it might be logged."""))

# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:

redpajama_set_name: RedPajamaGithub


text:
package thu.instcloud.app.se.storm.estimator;

import backtype.storm.task.OutputCollector;
import backtype.storm.task.TopologyContext;
import backtype.storm.topology.OutputFieldsDeclarer;
import backtype.storm.tuple.Fields;
import backtype.storm.tuple.Tuple;
import backtype.storm.tuple.Values;
import backtype.storm.utils.Utils;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.Pipeline;
import redis.clients.jedis.Response;
import thu.instcloud.app.se.storm.common.JedisRichBolt;
import thu.instcloud.app.se.storm.common.StormUtils;

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

import static thu.instcloud.app.se.storm.common.StormUtils.mkKey;

/**
 * Created by hjh on 16-1-8.
 * should be unique
 */
public class CheckAfterBadRecogRBolt extends JedisRichBolt {
    double paraEst;

    public CheckAfterBadRecogRBolt(String redisIp, String pass) {
        super(redisIp, pass);
    }

    @Override
    public void declareOutputFields(OutputFieldsDeclarer outputFieldsDeclarer) {
        outputFieldsDeclarer.declareStream(StormUtils.STORM.STREAM.STREAM_OUTPUT, new Fields(
                StormUtils.STORM.FIELDS.CASE_ID,
                StormUtils.STORM.FIELDS.EST_CONVERGED
        ));
        outputFieldsDeclarer.declareStream(StormUtils.STORM.STREAM.STREAM_ESTIMATE, new Fields(
                StormUtils.STORM.FIELDS.CASE_ID,
                StormUtils.STORM.FIELDS.ZONE_ID_LIST
        ));
    }

    @Override
    public void prepare(Map map, TopologyContext topologyContext, OutputCollector outputCollector) {
        super.prepare(map, topologyContext, outputCollector);
        paraEst = topologyContext.getComponentTasks(StormUtils.STORM.COMPONENT.COMP_EST_ESTONCE).size() * StormUtils.STORM.factor;
    }

    @Override
    public void execute(Tuple tuple) {
        String caesid = tuple.getStringByField(StormUtils.STORM.FIELDS.CASE_ID);
        checkCondition(caesid);
        collector.ack(tuple);

    }

    private void checkCondition(String caseid) {
        try (Jedis jedis = jedisPool.getResource()) {
            auth(jedis);
            Pipeline p = jedis.pipelined();

            Response<String> nbadRecog = p.get(mkKey(caseid, StormUtils.REDIS.KEYS.STATE_BADRECOG_ZONES));
            Response<String> nz = p.get(mkKey(caseid, StormUtils.REDIS.KEYS.ZONES, StormUtils.REDIS.KEYS.NUM_OF_ZONES));
            Response<String> currBadItResp = p.get(mkKey(caseid, "1", StormUtils.REDIS.KEYS.STATE, StormUtils.REDIS.KEYS.STATE_IBADREG));
            Response<String> maxBadItResp = p.hget(mkKey(caseid, StormUtils.REDIS.KEYS.OPTIONS_EST), StormUtils.OPTIONS.KEYS.OPT_MAX_BAD_REG_IT);
            Response<Long> nConver = p.bitcount(mkKey(caseid, StormUtils.REDIS.KEYS.STATE_CONVERGED));
            p.sync();

//        debug
            System.out.println("currIbad: " + currBadItResp.get());

            long nzLong = Long.parseLong(nz.get());
//        all zones have checked bad data
            if (nzLong == Long.parseLong(nbadRecog.get())) {
//            reset checked zone number, sync later
                p.set(mkKey(caseid, StormUtils.REDIS.KEYS.STATE_BADRECOG_ZONES), "1");
//                all converged
                if (nConver.get() == nzLong) {
                    resetState(caseid, p, true);
                } else if (Long.parseLong(currBadItResp.get()) >= Long.parseLong(maxBadItResp.get())) {
                    resetState(caseid, p, false);
                } else {
//                further estimation
                    p.del(mkKey(caseid, StormUtils.REDIS.KEYS.STATE_CONVERGED));
                    p.setbit(mkKey(caseid, StormUtils.REDIS.KEYS.STATE_CONVERGED), 0, true);

                    p.set(mkKey(caseid, "1", StormUtils.REDIS.KEYS.STATE, StormUtils.REDIS.KEYS.STATE_IT), "0");
                    p.sync();

//                    redispatch zone for further estimation
                    int nzForEachEst = (int) Math.ceil((double) nzLong / paraEst);
                    List<String> zoneids = new ArrayList<>();
                    for (int i = 1; i < nzLong; i++) {
                        zoneids.add(i + "");
                        if ((i % nzForEachEst) == 0) {
                            collector.emit(StormUtils.STORM.STREAM.STREAM_ESTIMATE,
                                    new Values(caseid, Utils.serialize(zoneids)));
                            zoneids.clear();
                        }
                    }
                    if (zoneids.size() > 0) {
                        collector.emit(StormUtils.STORM.STREAM.STREAM_ESTIMATE,
                                new Values(caseid, Utils.serialize(zoneids)));
                    }
                }
            }
        }
    }

    private void resetState(String caseid, Pipeline p, boolean converged) {
        String converKey = mkKey(caseid, StormUtils.REDIS.KEYS.STATE_CONVERGED);
//                reset converge states
        p.del(converKey);
        p.setbit(converKey, 0, true);
//                finished estimation
        p.setbit(mkKey(caseid, StormUtils.REDIS.KEYS.ESTIMATING_BIT), 0, false);
        p.sync();

//              not converged and reached max bad it number that means estimation failed
        collector.emit(StormUtils.STORM.STREAM.STREAM_OUTPUT, new Values(caseid, converged));
    }
}


Rawmill - WikipediaA rawmill is the equipment used to grind raw materials into "rawmix" during the manufacture of cement. Rawmix is then fed to a cement kiln, which transforms it into clinker, which is then ground to make cement in the cement mill. The rawmilling stage of the process effectively defines the chemistry (and therefore physical.operation of raw mill,ATOX™ raw mill - FLrequirements. Our continuous development of the mill over the years has resulted in today's ATOX raw mill – a compact mill featuring a unique design that delivers superior reliability and performance. Working principle. The ATOX raw mill uses pressure and shear generated between the rollers and the rotating table to crush.
May 15, 2013 . Vertical raw millK.P.PRADEEP KUMARSr G M OperationKarikkali WorksChettinad Cements Ltd. . Common aspects of operation with regard to the grinding processand generally exhibits the following characteristics.Compression is the main mechanism of size reduction , although someelements of attrition.
Abstract—The stability of vertical mill raw meal grinding process affect the yield and quality of cement clinker. Due to the nonlinear of grinding process, random variation of working conditions, and large lag of the offline index test, it is difficult to establish an accurate mathematics model, thus cannot collect the optimizing.
Sugarcane mill - Wikipedia. A sugar cane mill can refer to a factory that processes sugar cane to produce raw or white sugar. It can also mean the piece of equipment that crushes the sticks of . Processing Factory automation History Notes and references.
In China, installation of a vertical mill for raw material grinding in a plant with with 5000t/d production is reported to require an investment of around 50 million RMB, and has operating and maintenance expenses of approximately 17 million RMB /year. When working with raw material with medium grindability, a saving of.
what is the size and function of cement mill. Cement mill - Wikipedia, The breakage rate function of cement raw mix was affected by particle size. function among cement factory workers. Get Price. function of crasher in cement mill. raw mill function in cement factory. raw mill function in cement factory - Molino Raymond,raw.
Since 2014 the (4+4)-roller cement mills have completed the cement mill product range. The Loesche MILL LM. 70.4+4 CS (❰ Fig. 2) has been sold to a cement producer in. Nigeria and will be put into operation in 2016. Today Loesche raw mills as well as the cement mills are available with the COPE (Compact Planetary.
over-grinding by avoiding product going back to the ball mill. Introduced initially for cement grinding operations, these improved separators have also found application in raw material grinding ball mills and also the vertical roller mills. Recently developed HES have precise degrees of classification and generate a product.
The crushed line is ground into raw meal. Additives such as clay, sand or iron ore result in the desired chemical composition. The MULTIDOS® H weighfeeders and MULTIDOS® VPD apron feeders feed the various materials into the raw mill accurately and reliably. The raw meal is then homogenised in the blending.
housing; the two roller units remaining in the mill then continue the grinding process. The new mill system from Krupp Polysius thus fulfils the prerequisites for »online operation« in the cement factory with a practically uninterrupted flow of material from the mill to the kiln. High raw material grinding plant availability has two.
The raw meal is mixed in the silos which have a total capacity of 11000 tonnes. The raw meal is mixed thoroughly to ensure a uniform feed to the kiln for the smooth operation of the kiln and production of a good quality clinker. :: Dust infiltration. The dust laden exhaust gases from cooler, kiln, preheaters and the raw milling.
be the preferred option for optimum energy efficiency in raw mills. Retrofits to replace low-efficiency fans with fans of higher operating efficiency, and the installation of appropriate speed control devices, are generally paid back by resulting energy savings. ENERGY PERFORMANCE. Electrical energy consumption can be.
Materials processing, the series of operations that transforms industrial materials from a raw-material state into finished parts or products. . There are four basic noncutting removal processes: (1) in chemical milling the metal is removed by the etching reaction of chemical solutions on the metal; although usually applied to.
It is a testimony to the secrecy maintained by RAW (Research and Analysis Wing) that there is so less concrete information available on the web about its operations. Sadly, this often portrays a sorry picture of RAW in the public domain. 10. Amalg.
Vibration Troubleshooting Ensures Reliable Raw Mill Fan's Operation. Industry: Raw material extraction and processing. Customer. The customer is a leading cement manufacturer in Saudi Arabia and the. Gulf Region that always strives to expand its product diversity. To enter the Jordanian market he made a big.


Have your childhood photos been damaged from wear and tear? Things like water, dust or poor care can cause your pictures to lose their original color and luster. Luckily, Hamilton Studio can restore pictures to a healthier state so that you can enjoy them for years to come.
Whether your picture is torn, faded, stained or water-damaged, our experienced photographers in Angleton, TX are equipped to restore old photos in almost any condition. As one of the only photography studios in Angleton, TX with the skill and equipment to restore pictures, you can rely on us to bring your pictures back to life.
Visit Hamilton Studio today to restore old photos in Angleton, TX.
The thought of losing a photo that reminds you of a loved one or special moment can be heartbreaking. As time goes by, picture quality will diminish due to a variety of different factors, but that doesn't mean that your picture is lost forever. You can still keep the memories alive by hiring an experienced photographer in Angleton, TX who can restore pictures.
Contact us today at 979-849-4341 to restore your pictures to a more vibrant condition.


Founder and President of Management and Associates, Dominick Scannavino, CMCA, is a graduate of St. John's University in New York. He and his team have a plethora of property management experience, having maintained more than 25,000 estates internationally. During his 40 years building Management and Associates, Scannavino has assembled a team of experts who are educated, licensed and experienced in the services they provide.
Scannavino is originally from Brooklyn, New York, and spent the majority of his adolescence at the Carson Long Military Academy in New Bloomfield, Pennsylvania. He served as a Green Beret in the Special Forces for the United States Army before founding Management and Associates in 1985. Scannavino is the current President of the Pasco County Council of Neighborhood Associations (CONA), a delegate of the Suncoast Chapter of the Community Associations Institute (CAI), a member of Chief Executive Officers of Management Companies (CEOMC) and a certified instructor.
Jaime L. Soderland, Vice President of Management and Associates, received her M.B.A. in Business from Saint Leo University in Florida. She has nearly 20 years of experience in property management and paralegal services, and fulfills portfolio management duties at Management and Associates. She is also an active member of the community, as past President of the Suncoast Chapter of the Community Associations Institute and a member of the Pasco County Construction Board. Soderland demonstrates a commitment to her professional development, having received designations such as the National Board of Certification for Community Association Managers, Certified Manager of Community Associations and Association Management Specialist. She has received her Professional Community Association Manager Designation (PCAM), which is the highest in the industry.
Originally from Dayton Ohio, Service Coordinator Rick Limbert relocated to Florida in 2000 and joined the Management and Associates team in 2005. He has 30 years of experience in IT and IT management, and is a Licensed Community Association Manager.
As Controller Helen oversees all of the financial reporting and accounting for Management & Associates' HOA & Condo Associations. Helen attended University of South Florida and has over 15 years of financial experience in the property management field. For several years prior she owned a financial consulting business with an emphasis on construction accounting and human behavior studies, earning her CPC (Certified Professional Consultant) designation. As a fourth generation Tampa native, her primary interests are in the community and she is a sustainer/capital contributor to The Tampa Bay History Museum. Volunteer activities include The Boys & Girls Club of Tampa Bay, The Centre for Women and Tampa Bay History Museum.
Become a valued employee of Management and Associates. Licensed Community Association Managers are invited to learn more here.


text:
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;

namespace EasyWebControls
{
    [AttributeUsage(AttributeTargets.Property)]
    public sealed class TextBoxAttribute : ControlAttributeBase
    {
        public override string ControlTypeName
        {
            get
            {
                return new System.Web.UI.WebControls.TextBox().GetType().AssemblyQualifiedName;
            }
        }
        public TextBoxMode TextMode;
        //public string style="text-align:left;";
        public override string BindingProperty { get { return "Text"; } }
        public string Text;
        public int MaxLength;
        public string CssClass = string.Empty;
    }
}


text:
Max King Cap
Max King Cap, former firefighter and advertising copywriter, is an artist whose work in various media has been seen in numerous galleries and museums in the US and Europe. He is also an educator who has taught most recently at Pitzer College. After earning his MFA from the University of Chicago he taught in the architecture department of the Illinois Institute of Technology and was an artist-in-residence at the Kunst Akademie Karlsruhe in Germany. His work, in the vein of Sue Coe and Leon Golub, addresses oppression of all kinds and governmental excesses in particular. He is currently a doctoral candidate at the University of Southern California.
God's Punk
God's Punk is a video and performance project. The work uses the relationship between the formal garden and the forest as a metaphor for the sacred and profane and is constructed as an operetta. Technically low-fi, God's Punk follows a central character who attempts to emulate the divine example and fails by misunderstanding the nature of allegory.
Installation, Opera
[email protected]-capital.org


Following in the footsteps of her sophisticated older sister, See by Chloé is a brand that exudes graceful femininity. Born in 2001 from the iconic Parisian house of Chloé, this dreamy sub-label reinvents the classics, fusing timeless designs with modern details. Think romantic detailing, feminine cuts, and a palette of pastels.
Created for those with a maturing sophisticated style, See by Chloé epitomises the chic, nonchalant style of the French. Dreamy dresses are designed in plisse pleats, chiffons and crepes, all cutting a delicate form that you can contrast with a leather jacket and a pair of biker boots. Beautiful investment pieces of knitwear provide warmth and style in the winter. Layer a knitted jumper over a collared shirt and pair with pleated trousers for a stylish take on smart casual, and finish the look with block heels to take it from daytime to evening. Jerseys are the brand's dose of sports-luxe for this season, but with a feminine slant, such as lace and broderie Anglaise panelling - perfect to wear over a summer dress.
See by Chloé continues its soft palette into its accessories collection, with muted tones that'll give your wardrobe an understated and effortless finish. Ochre and burgundy ankle boots can be teamed with drainpipe jeans in the winter, while the brand's minimal metallic sandals are perfect with a-line skirts and chiffon shirts in the spring/summer. Get your designer handbag fix with See by Chloé's girly cross body bags. Satchel details give them a normcore feel when worn with straight leg trousers and a shirt, but your look will still exude glamour thanks to sumptuous leathers and gold hardware. Wear yours with a cocktail dress for a special occasion, and complete the look with some rose gold jewellery to continue the feminine theme.


Geoff Palmer is the CEO and founder of Clean Machine. It's an all-natural, plant-based fitness equipment company. What equipment? Powders and pills. The best. Built for Vegans in high endurance training.
Producing The First Completely Vegan Bodybuilding Show In The World, Ever.
Clean Machine currently sells in over a thousand locations across the country. The products sell very well on Amazon. Social media and direct online marketing are the best channels that lead to sales. Since the products are plant-based, they have a really strong following with vegan and vegetarians. In particular, it is Geoff Palmer himself, as a 55 year old man, that is the best person to reach customers like him. A lot of people find inspiration that at 55, he can be a natural bodybuilding and natural physique champion. He is a celebrity and champion that has gained a fan base that will help him promote Clean Machine.
The show Clean Machine doing in Florida on December 1, 2018, is going to be 100%, nothing but Vegans and that must be Vegan for at least one year or longer. So, it will be the first of its kind ever done on the planet. Geoff Palmer is very excited.
Vegan Bodybuilding Show will be at the Fort Lauderdale VegFest. We are combining one of the most successful VegFests in the state of Florida with Live Expos we do for Clean Machine. We've partnered together with the Naturally Fit Federation in Austin, Texas. They are doing the show at the Fort Lauderdale VegFest. So, Naturally Fit, Clean Machine, and VegFest are teaming up together to make this show happen.
This event is designed to get people exposed to a new ways of eating. We want them to try some foods that they never had and learn about nutrition and supplementation. They can make these dietary changes correctly. Therefore, we want to show off our athletes to show, "Hey, look, this is what's possible on a plant-based diet." Our athletes include Korin Sutton, three-time pro-time bodybuilder. Korin won the bodybuilding competition last year while a Vegan. Natalie Matthews is a six-year vegan and Chef. Chad Byers is a champion in physique and a fitness model. He is a seven-year vegan.
Geoff Palmer lost both of his parents when they were younger then he is at 55 years of age. Both his parents were college professors. His mother in psychiatry and his father in english literature. His intention is to resist following the path that his parents took. Geoff has none of those issues that plagued his family. He takes no medications whatsoever. He has not seen a doctor in 20 years. Specifically, it was a point of pride that Geoff Palmer doesn't carry any insurance. His opinion is that there is no reason to carry insurance if you are choosing what to put in your mouth. As a result, he has made the choice to not pay out to pharmaceuticals, hospitals, doctors, and insurance companies. Spend that money on good food instead.
Geoff Palmer will reap the rewards with his health and longevity. With a wife that he wants to be with because he loves her to pieces. He will outlive us all.


Why is Jazzercise not included in your senior fitness programs?
Home » IDEA Answers » Why is Jazzercise not included in your senior fitness programs?
Why is Jazzercise not considered in your senior programs? They have trained/certified instructors and offer "low-impact" options in each class? Curves is merely machines and boring. Jazzercise offers aerobics, weight training and stretching. Please consider Jazzercise as an option for prevention fitness for us seniors!
am I correct in assuming that you are not a fitnes professional but an eager participant in group fitness?
If that is so, then you may need to take this question to the management of the club to which you belong. There are some clubs in the US that offer 'Jazzercise Lite' and target this format for seniors. Whether an individual club offers such classes may also depend on instructor availability, and, I believe, a club nees to be licensed to have those classes at their facility.
Hi Julie. I agree with Karin that program offering decisions are often made by club management and could be based on something as 'simple' as their not having an instructor that can teach a certain type of class. Ask the Fitness Director at your club to see what they say.
Balance Class for Seniors - Your Thoughts?


text:
Cambodia's Economic Recovery Hinges on Addressing Inequality and Diversification
Covid19, News
Developing an effective social safety net, widening the economic base and making a concerted effort to formalize the businesses of the nation's poorest are all crucial to a post-pandemic recovery.
PHNOM PENH–Cambodia's ability to survive the economic fallout of the Coronavirus Disease 2019 (COVID-19) pandemic will be determined by how rapidly it can come to the assistance of its poorest and most vulnerable citizens, experts have advised. COVID-19 has claimed no live in Cambodia, but it has highlighted glaring vulnerabilities in the structures that have helped to bring about a 7 percent average annual growth in the economy for almost a decade. This year, Cambodia faces its worst economic performance since 1994.
By the government's own estimations, the economy is set to shrink by 1.9 percent in 2020 as the impact of the pandemic sets in. This alone would be far worse than the 2009 financial crash, where Cambodia's GDP hovered around 0 percent growth, but never dipped into negative figures. However, the government's estimations seem wildly optimistic when contrasted against those projected by the Asian Development Bank (ADB), which are suggesting that Cambodia's economy will contract by 5.5 percent this year. Similarly, the ADB warns that some 390,000 jobs could be lost in Cambodia as a direct result of the pandemic.
While the Labor Ministry's spokesperson Heng Sour confirmed that the government has not yet produced an accurate picture regarding unemployment, he said he expects the National Institute of Statistics to have an analysis completed by next September.
What is apparent is that roughly 150,000 garment workers employed across some 400 factories have been suspended to varying degrees, more than 100,000 Cambodians working in the tourism sector have lost their jobs after tourism figures for April 2020 plummeted by more than 99 percent compared with last year and key export markets in the United States and the European Union continue to be ravaged by the COVID-19 pandemic.
The great unknown, however, remains how badly the pandemic will affect Cambodia's widespread informal economy. In May 2020 the International Labour Organization (ILO) warned that more than 1.6 billion people working in the informal sector worldwide will be significantly affected by the pandemic, adding that many of them fear starvation more than COVID-19.
Cambodian workers exit their factory as they take a lunch break in Phnom Penh on March 2, 2020.
Chea Layhy of the Ministry of Industry noted that small to medium enterprises (SMEs) make up 99 percent of all Cambodia's businesses, but alarmingly best estimates suggest between 90 and 95 percent of them are unregistered. This renders the task of assessing the economic impact on a large part of Cambodian society all the more difficult.
Although as of July 25, Cambodia has only recorded 225 cases of the coronavirus and so far no one is reported as having died from COVID-19, while the handling of the pandemic has—from a health perspective—been successful for the most part, the road to economic recovery is fraught with internal and external challenges.
Diversify the Economy and Climb the Value Chain
"Cambodia is a little bit shell-shocked," explained Sunniya Durrani-Jamal, country director of the ADB in Cambodia. "Like a number of economies, it's a very open economy, it's very dependent on exports…but that is not to say we don't see the economy coming back up."
Having launched a $250 million loan program for Cambodia on July 8, Durrani-Jamal noted that the ADB is not just providing financing, but also technical assistance and advisory services. She has identified several key areas for improvement, chiefly diversification, greater support for small-and-medium-enterprises (SMEs) and a stronger social safety net.
"I think it's very important to get the SMEs and the farms back on track," she said. "We're working on a guaranteed scheme with the government, which can supplement the money they put in."
This new scheme is designed to offer more confidence to Cambodia's finance sector in issuing bank loans, particularly to new businesses but, as Durrani-Jamal notes, it's the type of businesses that needs to change.
"We have been advising on [diversification] for a long time, most recently in our October 2019 country partnership report, competitiveness and diversification, a better focus on inclusion, making sure people have access to the right skills as well as access to health—those fundamentals remain," she explained.
Sunniya Durrani-Jamal, country director of the ADB in Cambodia, speaks to journalists during a conference in April 2019. (Photo: Phoung Vantha)
"But the economy can't go from A to Z in a short time," she said, adding that Cambodia has a better chance of success by climbing the value chain within existing industries.
"For garments, rather than producing just simple items of clothing, Cambodia should move towards more sophisticated products and capture more of that market," noted Durrani-Jamal. "That is a key issue—the garments available in Sri Lanka are very different to the ones you can get in Bangladesh."
Tourism is another sector that needs greater diversification according to Durrani-Jamal. She noted that Indonesia had successfully developed Bali as a destination that—while not without its troubles—has become the bedrock of Indonesia's tourism sector.
"Why can't Cambodia develop some kind of unique city or destination beyond Angkor Wat? They need something that resonates with people when they think of Cambodia," she said, pointing to the level of private sector investments in Bali, along with the international coverage it receives in terms of branding.
This, she mused, is something that Cambodia should consider, but added that the development of new destinations and higher value tourism products is part of the ADB's work with Cambodia.
Durrani-Jamal went on to say that Cambodia's foreign direct investment (FDI) needs to be diversified—rather in terms of usage more than origins. With China providing 43 percent of the $3.6 billion of FDI Cambodia attracted last year, there is certainly room for more players to invest in the country's economy, but of particular concern to Durrani-Jamal is the purpose of this FDI.
"The fact that most FDI is going into construction and real estate is a cause for concern," she said. "We would like to see more manufacturing, more investment in tourism—again diversification is important here too—likewise, a diversification of investors which would indicate a broader confidence in the economy."
Cambodian Investments in Cambodian Products
Senior researcher at the Asian Vision Institute—a Cambodia-based think-tank—Chheng Kimlong said that the recent closure of borders and restrictions on travel due to the COVID-19 pandemic has seen an uptick in domestic investments.
"We've seen more investment from local investors who have been purchasing technology from China and Japan over the last few months," he said, arguing that a reduced flow of goods from neighboring Thailand and Vietnam has led to more local innovation.
"There's been an increased interest in food processing," Kimlong explained. "So the local economy will depend much more on local products in the future, but they will not replace Cambodia's dependency on imports—our productivity is still very low. We need more high-efficiency machinery and tools, more skills."
This, he suggested, could help to displace some of the imported goods that Cambodia is still dependent on. Cambodia is still importing between 200 and 400 metric tons of fruit and vegetables every single day, with Vietnam providing roughly 60 percent of this volume. Meanwhile the Cambodian Livestock Association announced on May 28 that Cambodia is still spending in excess of $1 billion on imported meats and vegetables, citing the lack of a sophisticated infrastructure to support a stronger domestic industry.
"If we talk about diversification as a whole, it's growing at a very slow pace," conceded Kimlong. "Maybe for one or two reasons—domestic investors are not interested in the diversification of the economy, or they are interested but lack the capital and the connections to export markets that would be needed."
While Kimlong praised the recent efforts of the government to diversify export markets that Cambodian products are bound for, he warned new free trade agreements with existing partners still leave the economy vulnerable to global crises.
"Domestic entrepreneurship and entrepreneurial capacity of local SMEs will remain the major foundation for the economic recovery and the country's prospects for growth," he said, adding that more needs to be done to protect Cambodia's economy from external shocks. One means of doing this, he explained, is to loosen the bureaucratic ties that bind.
Social Inclusion and Access to Success
"The government needs to provide more favorable conditions for entrepreneurs, for investors—both domestic and international," he stressed. "They need to cut through the red tape, the bureaucracy and anything that holds up the investment process—it needs to be faster, cheaper and more efficient."
The 2019 Global Competitiveness Report published by the World Economic Forum ranked Cambodia as 106th out of 141 countries analyzed, citing weak institutional governance, low levels of skills development and innovation capacity as glaring flaws in the Cambodian economy.
"Led by Singapore, the East Asia and the Pacific region is the most competitive in the world, followed by Europe and North America," the report reads. "Hong Kong SAR (3rd) and Japan (6th) also feature in the top 10. Viet Nam (67th) is the country whose score improves the most globally. But the region is also home to economies with significant competitiveness deficits, such as Cambodia (106th) and Lao PDR (113th)."
The report found that on average it takes 99 days to open a business in Cambodia, underscoring Kimlong's concern over the level of bureaucratic barriers to entry.
"The ability of SMEs to grow and to prosper will be the impetus for economic growth in Cambodia," stated Kimlong. "Secondly, a solid SME foundation would help protect Cambodia from further external shocks; recessions, pandemics, global or regional crises etc., but a strong foundation of entrepreneurship in SMEs could counteract all of those."
On this point, Durrani-Jamal at the ADB agreed, pointing to the need to simplify the process of formalizing a business in Cambodia and the socio-economic benefits that stood to be gained from doing so.
"To be eligible for any government scheme that will support businesses [during the COVID-19 pandemic] they need to be registered, so we're trying to get these businesses registered, but it means creating structures for them to be able to do it affordably," said Durrani-Jamal, who added that the majority of SMEs in Cambodia are women-led.
The ILO found that 65 percent of all businesses in Cambodia are run by women, but that they are less profitable, smaller and more likely to be informal businesses than those run by men. By contrast, some 57 percent of Cambodian women are working in what is considered "vulnerable" employment—just 40 percent of men face the same risks, according to the ILO.
"Vulnerability in Cambodia is reinforced structurally by the narrow base of the economy, which remains dependent on the garment export sector, tourism, rice and construction, with export markets falling within a narrow range," the ILO's Decent Work 2019-2023 report reads, adding that a failure to diversify industrial production has created a low-wage, low-productivity growth model that is extremely vulnerable to shocks.
Poverty in a Pandemic
The shock has arrived in the form of the COVID-19 pandemic and, despite prior warnings on the need to address economic issues, Cambodia has been woefully underprepared for the fallout of such an unprecedented crisis.
"Over time things will formalize," said Durrani-Jamal, who remains optimistic about Cambodia's economic resilience. "We're working on a project with women-led SMEs. It's just in the concept stage at the moment, but it'll involve a lot of impact funds and so far it's given us some good insights into the issues women in business face.
"Right now though, unemployment is the problem and so we're aiming to help keep them afloat," she said, adding that short-term solutions to Cambodia's economic collapse are crucial.
A woman rides her bicycle past graffiti along a street in Phnom Penh on July 2, 2020. (Photo: AFP)
Kimlong highlights the difficulties of creating policies to help businesses that exist outside of the formal environment.
"In regard to government intervention, vulnerable people, SMEs, even major SMEs and businesses that are on the brink of bankruptcy or have already shut down: These are the people the government should be helping," he said. "But it's a very difficult task for the government to identify the right people. Sometimes, the private sector tries to take advantage of these interventions, so it's very challenging for the government."
This, Kimlong said, is why the government has been reluctant to make an announcement on how to help the informal sector—the lack of formal documents renders them ineligible for government support, yet the same governmental bureaucracy keeps them from accessing the formal documents needed.
Slipping Through the Safety Net
The outgoing United Nations Special Rapporteur on extreme poverty and human rights, Philip Alston lamented the illusion of progress in the fight to eradicate poverty in his final report, submitted this year on July 2. His report lashes out at the "triumphalist" narrative that extreme poverty is being eradicated globally, arguing that the World Bank's measurements of poverty have been misappropriated and that the past three decades has seen little progress, with millions of people globally still facing few opportunities, countless indignities, unnecessary hunger and preventable death.
"COVID-19 is projected to push more than 70 million additional people into extreme poverty, and hundreds of millions more into unemployment and poverty," Alston said in his last report. "More than 250 million people are at risk of acute hunger. Poor people and marginalized communities have been the hardest hit in almost every country, both in terms of vulnerability to the virus and its economic consequences."
Alston railed against the failure of nations around the world to develop social safety net that could have prevented so many people from falling through the cracks in society. In Cambodia however, such a net is almost non-existent.
A Cambodian scavenger pulls her cart loaded with the recyclable materials pass the Independence monument in Phnom Penh on October 17, 2019.
"The first priority policy for Cambodia is to ensure the well-being and social protection of the most vulnerable working class and poor communities throughout the country," said Khun Tharo, program coordinator for the labor rights advocacy group CENTRAL.
There is a clear need for more government action given the severity of the COVID-19 economic fallout in Cambodia, he said, adding that there should be free access to healthcare and a stronger, more effective cash-transfer program.
"Interventional policies must support the mechanisms that strengthen the social protection policy and expand its coverage to workers in the informal economy, as well as those in need of emergency aid assistance and the most vulnerable communities," Tharo said. "The government has been… very slow to address these issues since the beginning of the outbreak."
Cambodia's government has rolled out a range of financial relief programs over the past few months, but all rely on the IDPoor program, an initiative that depends on the integrity and accountability of village chiefs, who are often closely aligned with the ruling Cambodian People's Party—prompting Prime Minister Hun Sen to warn them against abusing the system.
Despite support from the governments of Germany and Australia, along with the United Nations Development Programme, just 562,686 families have so far been identified as needing financial support from the government.
"That is just a small portion of the people who should be supported, also the amount, $25 million per month: It's not much to support the number of people who need it, but it still helps," said Kimlong of the Asian Vision Institute.
While he praised the government's short-term solution, he warned that cash-transfers alone will not be enough. "The best way to help the people is to provide them with opportunities; opportunities for employment, for better skills, so that they won't be laid off, so they can get better jobs and can avoid falling back into the trap of poverty," Kimlong said.
An Investment in People is an Investment in the Future
While IDPoor remains one of the few safety nets available for Cambodia's poorest, the security it offers is minimal. Families who are successfully identified by their village chiefs and receive an IDPoor card can expect to see between $4 and $30 per month in support from the government and Hun Sen has previously stated that the program may only run for two months.
"It's absolutely fundamental to get a safety net," said Durrani-Jamal of the Asian Development Bank. "The best way to do that is to create an environment that allows them to get jobs—that's best for people and the economy. Private sector development is very important, but when you have a situation where people are temporarily out of jobs, then you need systems that allow them to get income support: That's why you need companies and employers paying into a social protection system."
While noting the imperfections of the IDPoor program, Durrani-Jamal sees it as the building blocks to form the foundations of a much more robust pro-poor safety net.
Students walk on the grounds of a primary school as the government announced the closure of education institutions over the outbreak of the COVID-19 coronavirus in Phnom Penh on March 14, 2020.
But, she said, it's still early days for Cambodia. "Obviously, the government has previously, because of growth, never felt they needed a system like this. But COVID-19 has shown a spotlight on this issue," she explained, added that something affordable for the country was needed.
Durrani-Jamal went on to say that perception is key and that people—businesses in particular—need to stop viewing social protection as a handout.
"This is an investment in your most valuable resources: people," she said, "It's not a handout, it's something that people can contribute to in good times, like an insurance policy. So when you need help in the bad times, you can get it."
However, Durrani-Jamal added, the current strains on Cambodia's economy may make this impossible for some time. "At the moment, the whole economy is struggling," she said. "So we have to do cash-transfer programs for now. But beyond that, we need to look at how to help people get back on their feet and stand up on their own: It's investing in the future."
Source: Cambodianess
Cambodia's laid-off workers still have farming in their blood
As EBA cuts near, groups appeal for respect of human rights