text:
Q: How to seperate data from a file stream in c++ I just started learning c++ in college and for our first project we are asked to create a five function calculator (+, -, *, /, %) that reads input from a file, performs the arithmetic operation on it and outputs it to the screen. I am given an input file that as all the numbers like so :
/   100     10
109.5 +     1.0
25    /     2
25.5  /     2
0     /     0
8     *     8
10    -    10
ab    -    ab
100   -     1
10    *   -10
10.5  +  1000
1000  -  1.05
1000  *  1000
1000  /  1000
1000  /     0

For my code, this is the best I have been able to come up with:
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>

using namespace std;
const string file_name = "input.txt";

float calculate_number (float first_number, char symbol, float last_number);

int main () {
    ifstream input_file;
    ofstream output_file;

    // Open file to get input_file from
    input_file.open(file_name, ios::in);

    // Error checking
    if (!input_file) {
        cout << "Error: file input.txt does not exists\n";
        exit(1);
    } else {

        string data_from_file;           // Declare string to store data from file
        input_file >> data_from_file;    // Pass file content to data

        while (getline(input_file, data_from_file)) {
            istringstream ss(data_from_file);

            char symbol;
            int first_number, last_number;

            ss >> first_number >> symbol >> last_number;
            cout << first_number << symbol << last_number << endl;
        }
    }

    return 0;
}

The above code gives the following output which is a mess, but still a huge step forward:
10010
109.5
25/2
25.5
0/0
8*8
10-10
0-10
100-1
10*-10
10.5
1000-1
1000*1000
1000/1000
1000/0

My question is, is their a way to separate each number and arithmetic operator from the input stream, add them together and display the output to the screen. Thanks in advance

A: The simplest way to get the information from the input file is to extract it while iterating over the results gotten from the input file and passing it to a variable for easy reference.

#include <iostream>
#include <string>
#include <fstream>

using namespace std;
const string INPUT_FILE = "input.txt";
const string OUTPUT_FILE = "result.txt";

// Global variables

float first_number, second_number, answer;
char arithemetic_op;
ifstream input_file;     // File to get input from
ofstream output_file;    // File to put result in

// function prototype

float calculate (float first_number, char arithemetic_op, float second_number);

int main () {

    // Open file to get input_file from
    input_file.open(INPUT_FILE, ios::in);

    // Error if file does not exists
    if (!input_file) {
        cout << "Error: file `input.txt` does not exists\n";
        exit(1);
    }

    while (input_file >> first_number >> arithemetic_op >> second_number) {
        answer = calculate(first_number, arithemetic_op, second_number);

        output_file.open(OUTPUT_FILE, ios::out);
        output_file << first_number << " " << arithemetic_op << " " << second_number << " = " << answer << endl;
        output_file.close();
    }
    return 0;
}

float calculate (float first_number, char arithemetic_op, float second_number) {
    switch (arithemetic_op) {
        case '-':
            answer = first_number - second_number;
            return answer;
        case '+':
            answer = first_number + second_number;
            return answer;
        case '*':
            answer = first_number * second_number;
            return answer;
        case '/':
            answer = first_number / second_number;
            return answer;
    }
}

Cheers!

A: Your approach is basically not bad. However, you need to do a little bit more error checking. And there were also some semantic errors.
It is a very important rule that you always check there result of input/output operations.
I show you first a corrected version based on your original draft:
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <cmath>

using namespace std;
const string file_name = "r:\\input.txt";

float calculate_number(float first_number, char symbol, float last_number) {
    float result{ 0 };
    switch (symbol) {
    case '+':
        result = first_number + last_number;
        break;
    case '-':
        result = first_number - last_number;
        break;
    case '*':
        result = first_number * last_number;
        break;
    case '/':
        result = first_number / last_number;
        break;
    case '%':
        result = fmod(first_number, last_number);
        break;
    default:
        break;
    }
    return result;
}

int main() {
    ifstream input_file;
    ofstream output_file;

    // Open file to get input_file from
    input_file.open(file_name, ios::in);

    // Error checking
    if (!input_file) {
        cout << "Error: file input.txt does not exists\n";
        exit(1);
    }
    else {

        string data_from_file;           // Declare string to store data from file
        //input_file >> data_from_file;    // Pass file content to data

        while (getline(input_file, data_from_file)) {
            istringstream ss(data_from_file);

            char symbol;
            float first_number, last_number;
            // Rad data and check, if that worked
            if (ss >> first_number >> symbol >> last_number) {
                // Check for a valid symbol
                if ((symbol == '+') || (symbol == '-') || (symbol == '*') || (symbol == '/') || (symbol == '%')) {
                    cout << first_number << " " << symbol << " " << last_number << " = "
                        << calculate_number(first_number, symbol, last_number) << endl;
                }
            }
        }
    }

    return 0;
}

After learning more C++ you would use the below solution.
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <numeric>
#include <map>
#include <utility>
#include <functional>

int main() {

    // All possible operations, defined in one place
    std::map<char, std::function<double(double,double)>> operation {
        {'+', std::plus<double>()},
        {'-', std::minus<double>()},
        {'*', std::multiplies<double>()},
        {'/', std::divides<double>()},
        {'%', static_cast<double(*)(double,double)>(std::fmod) }
    };

    // The file with the source data
    const std::string fileName{ "r:\\input.txt" };

    // Open the source file and check if it could be opened
    if (std::ifstream sourceStream(fileName); sourceStream) {

        // Read all lines of the source file
        for (std::string line{}; std::getline(sourceStream, line); ) {

            // For easier processing, put the line in a std::stringstream
            std::istringstream iss(line);

            // The operands and the operator
            double lhs{ 0.0 }, rhs{ 0.0 };
            char operationSymbol{};

            // Read the parts of the line and check, if read was OK
            if (iss >> lhs >> operationSymbol >> rhs) {

                // Now check, if we have read a valid operator
                if (operation.find(operationSymbol) != operation.end()) {

                    // Show the result
                    std::cout << lhs << " " << operationSymbol << " " << rhs << " = " << operation[operationSymbol](lhs, rhs) << "\n";
                }
                else std::cerr << "\n*** Error: Invalid operator '" << operationSymbol << "'\n\n";
            }
            else std::cerr << "\n*** Error: Problem while reading line:\n'" << line << "'\n\n";
        }
    }
    else std::cerr << "\n*** Error: Source file '" << fileName << "' could not be opened\n\n";

    return 0;
}

I am sorry to say, but I would not recommend the answers from user Onyrew and Tijana, who is using even global variables. Sorry guys.

redpajama_set_name: RedPajamaStackExchange


text:
Free hugs are handed out at Place de La RÈpublique two nights after several coordinated terroristattacks killed over a hundred people in Paris, France.
Flowers and candles outside restaurant Le Carillon where five people where killed in a terror attack. Several coordinated terrorist attacks killed over a hundred people in Paris, France.
Panic breaks out as a false alarm about another shooting breaks out two nights after several coordinated terroristattacks killed over a hundred people in Paris, France.
Soldiers patrols the streets under the Eiffel tower two days after several coordinated terrorist attacks that left over a hundred people dead.
A rose tucked into a bullet hole in a window next door to La Belle Equipe, one of the restaurants targeted in the terrorist attacks in Paris that left over a hundred people dead.
A man holds a sign offering "Free Hugs" at Place de La République two nights after several coordinated terrorist attacks in Paris left over a hundred people dead.
Bullet holes in a window close to restaurant la Belle Equip where several people where killed in a terrorist shooting. Several coordinated terrorist attacks in Paris left over a hundred people dead.
A woman holds a white rose during a silent minute at Place de La République two days after several coordinated terrorist attacks in Paris, France, left over a hundred people dead.
Bullet holes in the windows of one of the restaurants at Rue de la Fontain au Roi, where five people where shot to death in a terrorist attack. Several coordinated terrorist attacks in Paris, France, left over a hundred people dead.
Bullet holes in the windows of the restaurant Le Carillon, where five people where shot to death in a terrorist attack. Several coordinated terrorist attacks in Paris, France, left over a hundred people dead.
On November 13, 2015, a group of terrorist launched a coordinated attack on Paris, France, leaving more than a hundred people dead, and causing France´s president Holland to issue a state of emergency and to call in the military to help the police watch the streets. The Parisians came together in sorrow to honor the dead and to show their combined strength. On November 15 a false alarm of another attacked caused panic throughout central Paris showing just how tense the situation is.

redpajama_set_name: RedPajamaCommonCrawl


A winning smile can be an asset in your professional and personal life. If you are self-conscious about smiling because of misalignment or crooked or protruding teeth, investing in Invisalign's innovative and effective treatment can yield significant return.
After a comprehensive consultation with Dr. Spilkia to determine if Invisalign is right for you, images and impressions of your teeth will be used to custom-tailor a treatment plan to achieve your ultimate smile. Then comfortable, BPA-free, clear plastic aligners will be designed to move your teeth gently into proper position over a period of approximately one year.
Unlike traditional braces, Invisalign clear aligners have no wires or brackets and are invisible and removable for the best oral hygiene. You may remove the trays to eat and to brush and floss your teeth. Because there are no wires to worry about, you have no dietary restrictions or fears about discoloration with Invisalign technology.
If you wish to achieve a straighter, more appealing smile, you can join the 2.5 million patients who have achieved the smiles of their dreams with Invisalign at David Spilkia Family and Cosmetic Dentistry. For nearly 30 years, Dr. Spilkia has been helping patients enjoy optimal oral health and beautiful smiles.


This little one-handed broom makes a sweeping difference in smaller spaces—like home, the car, or the office. Its low profile is armed with dense, electrostatic bristles that stay flush to the floor while attracting pet hair, dirt, and even glass into the mini dustpan. Sweep thoroughly and with fewer passes. Then snap the broom and dustpan together and stow in the closet (there's an included wall attachment), glove compartment, or desk drawer.
Dimensions: 7" x 6.5" x 1"
The little broom and dustpan is amazing! It works so well! Highly recommend this to everyone!


text:
#DropJ20 Podcast Update #5: The Path Ahead in 2018
Filed under: #DropJ20 Podcast Update, Featured, Radio/Podcast, Repression, The State, US
https://media.blubrry.com/itsgoingdown/itsgoingdown.org/wp-content/uploads/2018/01/dropj20pod5.mp3
After 6 weeks of sitting in court, side by side with our comrades, the jury finally reached a verdict in the first case of J20 protesters: a full acquittal on all 42 counts! Words cannot express the sheer elation that reverberated around the courthouse and around the world, as anyone paying close attention to this case had held their breath during the 4-day jury deliberation; but we'll borrow some from now-acquitted defendant Alexei Wood: we're utterly stoked!
After months of legal preparations, anxious nights, hearings, and a ludicrously long trial, we sat and we waited. Days that were once occupied with note taking and planning then shifted to days of waiting around, or occasionally attending hearings for others arrested in DC, like the 8 DREAMers who were recently detained and risked their own deportation to demand a clean DREAM act. We waited with our comrades who are risking so many years of their lives to fight repression and stand in solidarity with all the other defendants in this case. Before we take you on the grand tour of closing arguments we'll give you an update on the next trial block.
The second trial was originally scheduled for December 11th, but as the first dragged on much longer than expected, the second was pushed back bit by bit and is now simply scheduled for a status hearing on January 19th, 2018, with a new trial date yet to be set.
Unlike their 182 remaining codefendants, the seven defendants of the second trial face three misdemeanors each: conspiracy to riot, engaging in a riot, and one count of minor property damage.
In November, and with no explanation, Assistant US Attorney Jennifer Kerkhoff reduced the charges against only these defendants from six felonies and two misdemeanors to these three misdemeanors. Now that they only face misdemeanors, they won't be allowed a jury and the judge will decide this case on their own. It's important to remember the basic framework of the prosecution is the same as the felony trial: prosecuting a protest as conspiracy as a direct act of state repression. Stay tuned for future updates for this second trial block!
Before we move into the full reportback on closing arguments from the first trial, we want to bring things back to what's really going on in the J20 conspiracy cases. Everything that has happened between the inauguration and today is a punishment in and of itself: from the brutality inflicted during the march and the kettle, to the arrest processing, to the long and drawn-out court proceedings and enormous travel expenses, to the six-week trial, and, now, to the stress and anxiety that comes with waiting around for decisions from a jury comprised of people who likely have little knowledge of social movements, people who are instructed by a court system that clearly favors the prosecution.
Nevermind the fact that this entire carceral system exists purely to punish and control populations and those who would seek to resist. One frightening aspect of this situation is knowing that this case is really just a fraction of the violence that the State inflicts on marginalized communities every single day. The court and prison system exist primarily uphold capitalism and white supremacy.
In the face of a power structure that holds a monopoly on violence, we know that our only real weapons are our solidarity, our love for ourselves and each other, and our commitment to living a life that sees a horizon beyond this world of domination. To that end, we hold our friends close as they face the seemingly unending resources and power of the US attorney's office and DC federal court system. Although these agents of the state may seem all-powerful, we know there are cracks and holes in their power. We see those cracks and push through them like water, hoping to create enough pressure to burst them wide open. As a defendant wrote in an anonymous zine documenting their experience upon release from jail the following day:
"Outside the courthouse awaited something beautiful. an orchestra of activists embraced us, food not bombs fed us, we were comforted by legal and medical volunteers"
And they continue:
"Through benefit shows, late night venting, words of encouragement, and songs of change, we're looking forward with the knowledge and confidence that we are not alone in this struggle"
To summarize the last days of trial, closing arguments from the prosecution and all the defense attorneys concluded on Friday, December 15th. Assistant US Attorney Rizwan Quershi began the closing arguments on behalf of the government by reiterating the prosecution's assertion that while none of the current defendants on trial committed any individual criminal act, their presence at the march amounted to "aiding and abetting" an alleged riot, or as he calls it, the ominous "sea of black".
While this is concerning in and of itself, the government doubled down on it's criminalization of normal protest behavior at several points. One main argument put forth by the government is that defendants should have immediately left the march when it became evident that property damage occured, despite there being no law to support this assertion.
According to the prosecutors, the only thing anyone could have done in the less-than-30 minutes between the first broken window and the kettle t o prevent themselves from being guilty of being willfully engaged in the alleged riot would have been to leave, immediately. In this way the government makes the dangerous claim that proximity to a crime is enough to be considered guilt by association, and once defendants became aware of destruction they should have distanced themselves from the situation, although it's unclear if or when defendants were aware of property damage occurring. Ranck, the plainclothes cop that was embedded in the march testified that often times he was not able to see property damage occurring, despite actively looking for it, yet somehow defendants, many of whom are on the shorter side, were expected to be completely aware of the the entire march. Qureshi summed this up in a disgustingly ableist conclusion, pausing before saying, "Not to be crass, but none of the defendants are blind or deaf." We could go on for hours about all the ways in which that statement is disturbing, but we assume that you get it.
The government also attempted to argue that this march, where people are chanting political statements and carrying banners and signs, is not a march but a riot. In order to prove this point, the government showed footage of a different march that occurred that day which they deemed acceptable. Similarly they compared the march to other marches that happened during the same time frame but did not result in a mass arrest, as if the polices' targeting of political groups and their almost immediately expressed desire to stop this march did not play into the actions the police took that day.
Beyond these concerning attempts to define what may be considered a protest, in their closing statement the prosecution took the opportunity to repeatedly paint everyday protest activites as suspicious, criminal acts in furtherance of the conspiracy. It became evident that advertising and attending a public march constitutes a conspiracy if you're of a political pursuasion they don't like. For all the times the government said this case isn't about clothes they certainly seemed fixated on them. Repeatedly referring to the march as a "sea of black" the prosecution claimed that wearing black was being in "uniform" as if the protesters were some highly trained paramilitary group. If you coordinate to any extent your clothing, or just happen to wear the similar things, the government considered that "getting the memo," knowing the "plan" and "following instructions."
Funny how this argument isn't used against active alt-right paramilitary groups or white supremacist groups. Everyone of the neo-Nazi that marched in Charlottesville looked like they went on a group shopping trip to GAP, but their message of hate serves to uphold the foundation of the power structure in the United States. Wonder when we'll see the arrest of the black clad, often masked, uniformed cops who claimed they were 'just following orders' as they viciously brutalized people that day. It was clear, however, from before the march left Logan Circle, that this was the targeting of this march was intentional.
The government's persistent preoccupation with our fashion choices doesn't stop there; apparently incapable of understanding how winter works, assistant US attourneyQureshi claimed that carrying extra layers or taking layers of clothing on or off is indicative of guilt. Ignoring the influence of the frigid winter weather and rain that protesters were forced to stand in for hours upon hours, Qureshi pushed the idea that changing clothing is criminal. "Why did they change clothes?" he asked, "I thought they were here for a protest."He then continued: "I don't know if you all have ever been to a protest, but you try and carry as little as possible." While it's doubtful that Qureshi has ever engaged in social struggle – except perhaps struggling to make awkward jokes in the court room – it's still remarkable that someone in his position doesn't understand that after being brutally assaulted and denied medical attention, some people may want to change clothes to stop exposing themselves and others to pepperspray, which sticks to clothing.
Beyond their obsession with defining what is proper protest wear, the prosecution desperately attempted to paint this protest as something more insidious, vilifying every aspect of typical protest behavior, including common protective measures used by protesters. This culminated in Qureshi posing a series of questions that all but confirmed that he has literally never been to a protest:
"If this is first amendment activity, why are you running?"
"Why are you going to a protest and receiving jail support forms?"
"If this was a protest, why did you bring bandanas soaked in vinegar?"
Ironically, all of these questions were answered repeatedly by the footage shown in trial of the violent, aggressive, and inexcusable police behavior. Perhaps these things – running, jail support forms, and protective gear – wouldn't be necessary if the police were able to approach protests with any degree of moderation of force or controlled behavior, but there's clearly no incentive to do so when aggressive and bigoted behavior is encouraged in the police departments (see Peter Newsham and Commander Deville's statements for more details). After protestors were attacked by police, video shows people in the march screaming things like "Go! Go! Go!", "Stay together!", and "Keep tight!", communicating in an attempt to protect each other from police violence. Yet, trying to give some credit to their conspiracy charge, these reactions were treated by the government as some criminal act, claiming that these are directives that showed there was coordination within the march. "If this was a protest," Qureshi asked, "why are you following commands?"
Qureshi then proceeded to apply the government's conspiracy theory to each defendant in the case, making a snide comment about how, since Detective Pemberton was not allowed to identify people in the video as the trial defendants, Qureshi would do it for him. He was almost immediately reprimanded by the judge. "Sir," the judge said, "are you actually commenting to the jury on what I've ruled the detective couldn't say?"
After a serious scolding, he continued to attack each defendant, repeatedly referring to them as violent outside agitators that had no place protesting in the nation's capital. Qureshi stated that defendant Alexei Wood, a livestream journalist, wasn't actually there as a journalist because he knew certain protest terms like "kettle" and "black bloc," effectively making a basic knowledge of protest language suspect of incitement and conspiracy.
As a side note, we would like to issue a warning to all journalists: Don't cover anything you actually might have a basic understanding of, as you might be charged with conspiracy. Given all the footage of police brutality recorded that day, it almost seems as if the government wants to scare off those who might capture their misdeeds on camera, so they can act with full impunity.
The prosecution's villification of street medics is an especially poignant example of the way the government is using this case to criminalize dissent, as well as our ability to care for and protect each other. Despite the violence leftist communities have faced this year in places like Seattle, Chicago, and Charlottesville – and the fact that street medics were critical first responders in all those places – carrying basic first aid is somehow not considered reasonable protest equipment. Qureshi claimed that medics were "prepared for war," that the role of medics in this march was solely to provide aid to people and stitch up whoever was injured so that they could continue to destroy precious property, "provoke the police," and engage in more criminal activity. These claims erase how critical street medics have been in social movements of all sorts, ignore the many dangers faced by protesters, and push the idea that people who engage in direct action are undeserving of medical care."What do you need a medic with gauze for?" Qureshi asked obtusely "I thought this was a protest." As a side note, the Red Cross recommends that any standard, basic first-aid kit carries gauze.
While the absurdity of these charges is almost laughable, they hide a serious threat to the ability of our communities to protect themselves and each other. Given the increasing violence against protesters and leftist in particular, what does it mean for us when it is considered criminal to care for people who are hurting or in need of medical attention simply because those people were participating in a political demonstration? Of all the dangerous arguments raised by the prosecution, this one is a direct attack on the worth of our lives and our ability to survive.
Throughout Qureshi's closing argument, he tried to garner sympathy by talking about how helpless and unprepared the police were, even though there were 100 riot police at Logan Circle when the march left and even though it was a giant National Security Special Event for the inauguration of the most controversial president in recent memory. Somehow, we're expected to believe that the police were caught off guard, even though their own operating procedures contain plentiful and highly specific protocols for how to deal with all kinds of protests. The police commander who helped write those protocols was on the scene before the march even started, and claimed to have prior knowledge that this group would engage in property destruction, but chalked that up to the political leanings of the group.
Thankfully, Qureshi eventually ran out of absurd points and the defense got a turn to defend themselves. Unsuprisingly the lawyers, who are acting in the best interest of their individual clients and have little experience with political cases, leaned heavily upon the lack of physical evidence to indicate that their clients engaged in any property damage. But beyond this less than desireable argument, several much better points were made by lawyers.
Each lawyer took time to remind the jurors that they had to find each client guilty beyond a reasonable doubt in order to convict and that the burder of proof is upon the government not the defense. Many of them also spoke on the first amendment and how political speech and actions are supposed to be protected more so than general public activity, making the governments burden of proof even larger. The lawyers directly called the government out for prosecuting these cases to protect their own skin and justify their actions that day. One lawyer went so far as to say the government "edited out the first amendment" in a coniving attempt to misrepresent the majority of the march. They also refutted the governments attempts to define what protest is acceptable and what isn't; one lawyer simply stated that "not every protest will look how the Department of Justice wants it to look like."
The defense also focused heavily upon the police misconduct that day. The defense claimed that by violating their own policies and instead encircling and indiscriminately pepper spraying and hitting protesters, the cops failed to do the job they claimed they were there to do, which was facilitate the march, and instead themselves created the chaos that day. The government also seemed to expect the impossible from marchers; telling them that they must obey the police orders to move as the cops herded the march into the kettle with batons, pepper spray, and stinger grenades, in order to leave the march. Even the plainclothes cop in the march, who attempted to leave because he was scared of the police violence, was almost shoved back into the march by riot cops until he identified himself as MPD.
The defense largely focused on Deville since he was effectually the one in charge that day. Reminding the jury of how Deville considered enormous restraint to mean that "they [protesters] weren't bludgeoned," by cops and his general lack of concern with the protesters safety, defense attorneys claimed that Deville would "say anything to fit the government's narrative," in a desperate attempt to protect themselves from future lawsuits. They also noted how quickly Deville had moved to crush the march, with the defense claiming that "rather than follow these simple rules, Deville had the mindset to trap and arrest everyone he could."
The defense described the case as overtly political and repeatedly claimed that Deville was "bent on arresting anarchist, people who believe differently than he does." In order to further support this claim they discussed Edelmeyer's contract which directed him to infiltrate and report back on the "anti-establishment community" as well as Pemberton's disgusting attacks on the very real concerns held by Black Lives Matter and how he protected the Project Veritas infiltrator's identity, while ignoring their well know reputation for editing footage to discredit leftist groups. As a final point in this line of argumentation, one defense attorney pointed out that the people prosecuting this case answer to Trump and therefore have an incentive to silence those who dissent against him.
The veracity and relevance of the governments evidence was also called into question. The biased sources of evidence and unconvincing identification of defendants in government exhibits was repeated often throughout closing. Additionally, the government was accused of selectively editing and playing footage from that day in order to intentionally mischaracterize the march, a theme that was argued repeatedly by defense attorneys. One even went so far as to say that "commander deville will say anything in the government's interest even if the truth is staring him right in the face." Much of the evidence the government used was from high vantage points or aerial survelliance, which are viewpoints physically impossibile for protesters on the ground to hold–yet this footage was used to claim that protesters shoulnd have know about the property destruction and leave. The defense also gestured to the general lack of evidence the government has in the entire case, despite an intensive investigation by the government that utilized online research, social media monitoring, infiltrating planning meetings, and multiple plainclothes cops embedded in the march.
Beyond highlighting the gross police misconduct that occured, the defense also took time to defend their clients and, in some cases, their individual roles in the march. Defense attorneys were quick to point out that no laws in DC say that people have to leave a march or space when they witness a crime being committed. They also claimed it was hypocritical for the government to edit footage to protect identities of cops and Alt-Right informants, yet criminalize the rights of protesters to protect their anonymity in order to avoid undue surveillance and targeting by both the police and the Alt-Right.
In defense of journalist Alexei Wood, the defense asked what it meant for protest and freedom of information if newsworthy events can't be covered by journalists for fear of prosecution. He also noted that Alexei's press pass with a fake name may have just been an attempt to protect his identity and that press passes are not what make a journalist a journalist since the introduction of technology has radically changed the world of journalism, and regardless, MPD doesn't issue press passes. The government also showed what they considered a 'good live stream' in which the filmer provides no commmentary on the events at all, which Alexei's lawyer claimed was a violation of the first amendment. The government also tried to claim that Alexei was violent and malicious towards others, depite his own live stream showing him yelling at a man who appears to push a protester and telling him to stop hurting people and leave the area.
Britt Lawson's lawyer also defended their clients role in the march as a street medic as something that is both a normal and necessary aspect of protest, and that theyhave been ever since the Civil Rights Movement. In the first aid kit, there were sugar tablets for diabetics, tampons, bandaids, cough drops, and granola bars; none of these things are indicative of a preparedness for war or an intent to aid and abeitt others as the prosecution claimed. She also highlighted how medics were able to get someone who was having an asthma attack out of the kettle after the police intially refused them help.
The defense wrapped up by discussing how convictions in this case would hamper our ability to effect meaningful change. After acknowledging to the jury that it may have been hard for DC residents to hear about the property destruction that day, the defense attorney said, "What would be hardest for us to hear would be silence, because if these folks are found guilty, we may not hear protests anymore. We may not hear dissent when it's more important than anything," before ironically being silenced by a sustained objection by Kerkhoff. After which she continued "silence is dangerous," before again getting shut down by the judge who, after a bench conference, reminded the jury that their decision-making on the verdicts should not be guided by an intention to send a message to the community or anyone else, but only by the law as instructed by the judge.
After the defense finished Kerkhoff had one last chance to make their case to the jurors, and knowing the defense wouldn't have an opportunity to retort, she decided to throw out every lie she thought might stick in a last ditch effort to turn this trial around. She began with an audio clip that was esentially just the noise of glass breaking over and over again, yet it was unclear where this audio was taken from or whether or not it was a single audio file or mulitple audio files overlaid upon each other. Taking every opportunity to say the word "destruction" and "riot" Kerkhoff claimed that the defendants looked happy and excitied as they saw the property destruction and that "their enthusiasm was designed to help."
She claimed that all defendants were with the march for its entirety, despite that never being proven in court, and emphasized their choice to stay in the march. She claimed that even if the jurors gave the defendants the "benefit of the doubt" that they didn't know about the property destruction initially, by the time the group got to Franklin square, a seemingly arbitrary point to choose, that they had to know about the destruction at that point and should have immediately left. The only takeaway from that, seems to be that Kerkhoff admits there is doubt in this case.
Kerkhoff made more dubious claims that belied the governments assault on resistance, such that it's a "privilege and entitlement" to expect the police to follow their own rules, in this case to give a dispersal warning to protesters before arresting them. She even went so far as to suggest that protesters studied the Standard Operation Procedures to see what they could get away with when protesting. Well if that's true, the protesters were probably the only ones in DC who read them because MPD surely doesn't know their own rules.
The government revealed its utter desperation during the closing arguments. Kerkhoff used the word "riot" 27 times in a twenty-minute long rebuttal. She made every single pro-cop appeal, asking if the officers who testified were bullies, in the same breath as nonchalantly explaining the use of military grade weapons like stingballs and OC pepper spray. Then, she literally asked jurors to shut off their brains when making their decision. "The Judge is going to instruct you on 'beyond a reasonable doubt'" she said, "And you can tell that it's clearly written by a bunch of lawyers. It doesn't mean a whole lot." And in one small sentence obliterated the entire purpose of the jury system – like ya, we already know it's a joke. After that, the judge tried to save her ass by claiming "surely she didn't mean that," because reasonable doubt is the entire point of having a jury witness a trial. It appears that the government's case is so flimsily built out of solely political bias, that they can't even play by their own rules, which are structured to favor them.
For now we celebrate, this was a powerful blow to Kerkhoff's outrageous conspiracy theory. We celebrate for the love of the first 6 comrades to be free from this case of absurd state repression. But the battle isn't over as 188 defendants remain. The Office of the United States Attorney has already issued a statement saying they "look forward to the same rigorous review for each defendant." While we don't know what the US Attorney's Office plans to do next, now is the time to put enormous public pressure on them to drop the charges for all remaining defendants.
So, dear listener, we have a list of suggestions: drop hella banners! Hold rallies and demonstrations! Get more folks talking about this case! Bombard Kerkhoff's office with phone calls to drop the charges! Let this victory fuel our love and rage, because we can only win through solidarity.


GEETU BOHRA is passionate about the 3Rs of waste management – Reduce, Reuse and Recycle. Here she shares some thoughts on how we can all do much more to reduce our footprint and care for our beautiful Mother Earth.
Most of the waste that we create in our households, and which we dump outside, can be made into something else. When I heard that Sweden imports garbage and waste from other countries, it really shook me. What they do with it is amazing: they produce half of their electricity with that waste. They segregate the waste and convert most of it into other resources.
In our houses, roughly 60% of the waste is from the kitchen – vegetable peels, leftover food, and so on. Recyclable items, like polythene and plastic, make up approximately 30%, and a small amount may be hazardous, like e-waste. So just imagine how much waste we can make into resources! We start with segregation at the source.
We need to change our lifestyle. Nowadays we prefer comfort. If there is a disposable plate and a washable plate, many of us will grab the disposable plate so that we can eat and throw. We just leave it there, but we don't realize how much that small act of ours is going to impact the whole ecosystem.
We waste food that somebody else could eat. To provide for that, farmers must grow more. Because the requirement is more, more deforestation is happening to create land for farming.
These are the repercussions. Just a small act of wasting food and dumping garbage creates all these imbalances. So first we need to reduce our consumption as much as possible. How can we reduce?
Don't use plastic bags: carry your own bags whenever you go to buy something.
When you buy a shirt or other item, leave behind the packaging. If everybody does that, then the sellers cannot keep storing the packages and after some time will have to tell the manufacturers to stop.
There are many things we can do to reduce our garbage. If you come up with some ideas, please share them with us.
I have seen in my native place, a small town in a hilly region in northern India, that people take their own bags or vessels to buy things. Even for oil they use a recyclable can. In the West today, there are many stores where people take their own vessels to buy goods. To achieve this we need to transform our lifestyle and lead a life where we reduce our waste by reusing things.
Some people think so creatively and do amazing things. For example, instead of throwing away an old T-shirt or giving it to someone else, you can make a bag out of it in just two minutes! You can also involve your kids. When they do something on their own, they learn.
A five-liter water can that has been made into a beautiful birdhouse.
A flower vase made from a toilet cleaner bottle.
A hand-wash bottle and toilet cleaner bottle are made into a pencil box and pen stand.
If we teach our children, they can learn by having fun.
Depending on the quantity, our wet organic and food waste can be made into Biogas, or we can make our own manure.
Some people start their own business in recycling. If we segregate our waste, they may come and collect it and some may even pay us for certain items like wood, glass, plastic or paper.
By segregation we are doing something good for the environment, the person who has a business, and ourselves.
With one act we can do something good for so many people. So make sure that your waste reaches the right places.
We do not need to be so dangerous to the environment. We need to think, act and implement to make the future better for us and for all our friends, the many species of plants and animals on Earth. And that is in our hands, my friends, in your hands and mine. We have to work towards waste management as a team, but let's start by implementing it as individuals!
Thanks for the gentle reminder, Geetu. The 3 Rs induce the creativity, which sometimes lies dormant in some of us.
Nice article. Recycling is a bit impractical in my locality, but reuse and reduce can be practiced by anyone anywhere. It also makes us take less resources from Nature, which is our pious duty and of course saves money. Dual benefit!


Materials of the cold end are suitable for pumping oxidizing gases such as liquid oxygen (LO2) and liquid nitrous oxide (LN2O).
Discharge pressure up to 380bar.
The PD 3000 is typically used for 150, 200 or 300bar cylinder filling.
The PD 3000 is not CE marked and is not suitable for the European market.


Fiction365 is an online journal that publishes flash fiction and short stories. They publish one story for every day of the year. They also pay a small amount for every story they publish. Which is very unusual for an online journal. The stories they publish vary in length from around 100 words up to 4000….


I previously wrote about key strategic principles for legal marketers to help attract quality traffic to your firm's legal site. Today, I'll be doing a deep dive into Google's organic search features which can assist you with future enquiry & traffic generation.
By the way - I'll be giving a talk about this and more at our FREE legal workshop - read more about our workshop and register for tickets here!
What types of search features are there?
Rich snippets answer questions in a very visual, highly engaging way. No matter which device you use. Types of rich snippets include AMP articles, local businesses, and reviews.
All of which you can test for your firm - providing your content is marked up with structured data. In fact, they take up prime paid search real estate without costing you anything and they can also increase your click-through rate (CTR) by more than 30%.
What about customised site features?
By using structured data markup you can influence how the search results for your legal site are displayed in Google. Breadcrumbs offer the user a way to navigate your site's hierarchy easier. Google can actually display this information in the SERPs. Moreover, the sitelinks search box helps users find specific content on your website from within the SERPs and landing on the most relevant page matches with their search queries.
Lastly, you can markup your site name, which is the preferred name for your website in Google's results pages. This includes semantic alternative search terms users may type or speak to find your site, e.g. "ABC Legal Liverpool" or "ABC Liverpool".
This Knowledge Graph card by Slater and Gordon Lawyers features their web address, links to their social media profiles, information about the company provided by Wikipedia as well as their company logo. Structured data markup onsite helps Google classify and categorise this information.
Appearing within the Knowledge Graph does not only help increase your brand visibility but it also enables new, potential clients to find out information quickly and easily about your firm, its offices, and its services, which may ultimately lead to a more informed, better quality enquiry generation.
I'll be speaking at our free legal workshop on Thursday 23rd March in Liverpool. I'll talk to you about strategies on how to attract and convert traffic to your firm's site. Don't miss out – register for your free tickets today!
[VIDEO]: Why use Facebook to advertise your business and how does it work?


text:
Review: Wispin - Spinning The Color Wheel
Color matching and arcade action have combined to offer up a unique gameplay mechanic known as Wispin. You move Wispin around trying to run over the pests that continually pop up. You have to be the same color as the pest you're running over or you lose a life.
There are two game modes with the standard mode giving you three lives, and super intense mode only giving you one life. For each mode there are two locations with the field and canyon, and the super intense mode offers tough enemies continuously while standard gives you waves. The game includes Game Center for online high scores and achievements.
The game definitely offers up something different with color matching, and battling though the set up is similar to cartoon wars. There are three main colored pests you have to deal with, and they really move around intermixed. You'll need to switch the color of Wispin often to be able to get through all the colored pests in a particular wave. The focus of the game is to achieve combos with a meter in the top left indicating how long left to hit another pest. There are also combos of hitting consecutive colored pests which give you a speed boost. when you reach a combo of 20 overall you unlock rainbow power for some mass destruction. There are multiple power-ups at your disposal as well with bombs, arrows, and cheese all color specific to only work on particular pests. The game is very challenging, and it's quite an achievement just to make it through 10 waves as one wrong touch is a life. As you play you unlock the extra modes adding a little bit of variability, and even more challenge in the other location and super intense mode. The game has very fine graphics with retina quality cartoon artwork. It's nice seeing everything moving about, and then the squishing of pests, and the accompanying spin by Wispin. Game Center offers a little extra incentive to keep going as well as unlocking additional modes and facing different types of modes.
The game is pretty simplistic with a lot of repetition from wave to wave, and the different mode is just a harder survival. Overall the game is just survival without levels so that can only last so long. The gameplay mechanic is repetitive, as you can only run over enemies so long. The controls aren't the smoothest, but you do have a choice between tilt and joystick. The joystick doesn't work very well, and the tilt controls don't offer the most precision. The game requires very quick and smooth movements to hit certain enemies, and not others, but sadly the controls don't offer that ability. The controls can hamper your enjoyment, but the tilt controls are much better than the joystick. When you're using a power-up the controls get in the way again as it's tough to direct where you want the power-up to go like the arrows and bombs. The gameplay isn't that engaging because of repetition, and it's really just dull switching the color wheel, and moving about the screen. The main challenge is the controls rather than the gameplay.
Wispin offers up a relatively unique game mechanic, but it doesn't deliver it with fun and engaging gameplay. The game offers a lot of repetition without that much action on your part. The game looks good, but there isn't that much content, and the controls really hamper the game. Wispin isn't worth $0.99 because it's more frustrating than enjoyable with many better choices out there for that $1.
Cartoon Wars
Cartoon Wars 2: Heroes
BLUE GNC


text:
Home World Africa Vicious Attacks in Nigerian Village Kill 85 People
Vicious Attacks in Nigerian Village Kill 85 People
Mina Fabulous
Fri January 31, 2014
Boko Haram Strikes Again
The notorious Boko Haram rebels stormed the village of Kawuri in Nigeria, killing 85 people.
According to media reports, 85 people had been killed by gunmen who were dressed in military uniform, and opened fire on residents, burnt houses and mosques.
Women were also kidnapped by the rebels and 50 people were receiving treatment in hospital.
In another incident, Boko Haram rebels attacked the neighboring Adamawa state, killing 22 people during an attack on a church service.
Boko Haram wants to impose Islamic law in the African country where it has killed thousands over the past four and a half years since it launched an uprising in 2009.
Clashes between security forces and Boko Haram in Abuja left many people dead.
US condemns the vicious attacks in Nigeria
In a press statement in Washington DC, US Department Spokesperson Jen Psaki expressed condemnation of Boko Haram's vicious attacks on Sunday in Borno and Adamawa, Nigeria, that took the lives of dozens of innocent civilians.
"We support Nigerian authorities as they begin to investigate these attacks, and urge citizens to support their efforts to bring the perpetrators to justice." – Ms. Psaki
She pointed out that the United States remains committed to supporting the people of northern Nigeria in their struggle against violent extremism and to helping the Government of Nigeria as it works to counter the threat posed by Boko Haram and associated groups.
Many Lives Lost
The unspeakable violence perpetrated by the extremist group has killed too many Nigerians, particularly in September 2013, when attacks in Benisheikh resulted in the death of more than 160 people and in Yobe, where more than 50 innocent students lost their lives.
In August 2011, a suicide bomber from Boko Haram attacked the United Nations headquarters in Nigeria's capital Abuja.
Also on February 2013, Boko Haram kidnapped 7 French tourists in Cameroon. According to Ms. Greenfield, although Boko Haram has directed most of its violence and rhetoric at Nigerian targets, reports of linkages between Boko Haram and Al Qaeda in the Islamic Maghreb, or AQIM, are worrying.
Sectarian Violence Escalates in Nigeria
Earlier in 2012, spiralling violence escalated in Nigeria as Boko Haram group unleashed a series of attacks. Boko Haram is a local terrorist group professing allegiance to Al Qaeda.
Boko Haram militants attacked several churches on Christmas Day, killing dozens of worshippers. The bombings occurred in Madala, on the outskirts of Abuja, the Nigerian capital, and in the north-eastern city of Jos.
The United Nations human rights chief, Navi Pillay, urged a bold effort by Nigeria's political and religious leaders to halt the spiralling sectarian violence.
Mina Fabulous follows the news, especially what is going on in the US State Department. Mina turns State Department waffle into plain English. Mina Fabulous is the pen name of Carmen Avalino, the NewsBlaze production editor. When she isn't preparing stories for NewsBlaze writers, she writes stories, but to separate her editing and writing identities, she uses the name given by her family and friends.
Dr. Baker Travels to Ethiopia to Perform Root Canals on Hiruy Amanuel's Dogs
Charitable on $240 Monthly Paycheck
Cameroonians Say, Keep Our Election Clean
Anglophone Cameroon: Closer to Elections, Further from Peace
Vaccination Underway As Ebola Outbreak Kills 36 in Congo
Health Crisis Unfolds in Malawi as Superbugs Continue to Kill Babies
PwC Report Calls for Africa to Invest in Ports to Improve Growth
Teenager Appointed District Commissioner, Resigns The Same Day
Foreign Direct Investment in Somalia
Africa News from PR Newswire


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

<title>javax.xml.namespace (Java Platform SE 8 )</title>
<meta name="date" content="2014-12-17">
<meta name="keywords" content="javax.xml.namespace package">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 8

Prev Package

Next Package

Frames

No Frames

All Classes

compact3

Package javax.xml.namespace

XML Namespace processing.

See: Description

Interface Summary

Interface
Description

NamespaceContext

Interface for read only XML Namespace context processing.

Class Summary

Class
Description

QName

QName represents a qualified name
 as defined in the XML specifications: XML Schema Part2:
 Datatypes specification, Namespaces
 in XML, Namespaces
 in XML Errata.

Package javax.xml.namespace Description

XML Namespace processing.

The following XML standards apply:

XML Schema Part2: Datatypes specification

Namespaces in XML

Namespaces in XML Errata

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Java™ Platform
Standard Ed. 8

Prev Package

Next Package

Frames

No Frames

All Classes

 Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
 Copyright © 1993, 2015, Oracle and/or its affiliates.  All rights reserved.

redpajama_set_name: RedPajamaGithub


Alright fine. Maybe these black and gold howler monkeys are not Whitney Houston and they don't think veganism is whack but new observation had shown that these howler monkeys actually raid chicken coop (or bird nests) for eggs. Yes, for food not to paint Easter eggs.
Thought to be exclusively folivores, the black and gold howler monkeys (Alouatta caraya) feed mainly on leaves, fruits and other parts of the plants such as flowers and bark. However, the population of black and gold howler monkeys in the forest of Rio Grande do Sul, Brazil had been observed eating eggs. "Alouatta is the most studied New World primate genus in the wild and there is not a single observation of intentional ingestion of animal matter in the literature", said primatologist Dr. Julio Bicca-Marques.
In 2005 Ms Helissandra Prates, a student of Dr Bicca-Marques, observed two juvenile black and gold howler monkeys (Alouatta caraya) licking the interior of a dove's nest at Estancia Casa Branca, a 2 ha orchard forest in Alegrete. The nest contained a broken egg shell. She later found evidence of egg remains in howler monkey dung collected from the orchard floor.
Then in 2007, Ms Muhle, another of Dr Bicca-Marques's students, witnessed howler monkeys eating birds' eggs at a separate woodland site at Beco Xavier. Over an eight month period, she recorded 19 separate instances of egg predation by a group of five individuals. All these later cases involved chicken eggs, which the monkeys stole from a chicken coop. While all five monkeys were seen to enter and investigate the coop, most of the eggs were actually eaten by a single subadult male.
- Walker M. 2009. Monkeys 'reject vegetarianism'. BBC.
The evolution of egg-eating is localized in this population, leading researchers to think that it is a response to environmental conditions. There is a high density of howler monkeys living in a habitat with low food sources. Bicca-Marques et al. think that eggs act as a surrogate supplementary source of protein because of the low food diversity. The shift from folivory to omnivory reflects the flexibility of the black and gold howler monkey's diet. Watch the video of a black and gold howler monkey raiding a chicken coop.
Dr Julio Bicca-Marques and her colleagues from the Primatology Research Group published their findings in the International Journal of Primatology. The paper, "Habitat Impoverishment and Egg Predation by Alouatta caraya" is available in .pdf form through SpringerLink for free.
A quick Google search reveals that local zoos feed their black and gold howler monkeys meat and eggs such as Connecticut's Beardsley Zoo. Interesting. Coincidence?
This finding reminds me of the dietary shift and exploitation of new food sources in chimpanzees. We know that Gombe chimpanzees (Pan troglodytes schweinfurthii) prey on red colobus monkeys (Colobus badius tephrosceles) (Stanford et al., 2005) while savanna chimpanzees (Pan troglodytes verus) from Fongoli hunt lesser bushbabies (Galago senegalensis) using spear-like tool (Pruetz and Bertolani, 2007). Will we see more published paper about dietary shift and exploitation of new food sources? I guess it would have to be a trend as these primates lose more and more of their food sources and habitat. Perhaps those with a flexible diet will better adapt to their changing environment and ecology.
Sorry PETA. It seems that omnivory is in and veganism is out.
Bicca-Marques JC. Muhle CB. Prates HM. De Oliveira SG. Calegaro-Marques C. 2009.
The controversies over the hobbits or Homo floresiensis just refuse to end. It seems that the hobbits might not be a Homo after all. I guess they found the index and ring fingers of the hobbits (Sorry, inside joke. Read this post if you want).
Homo floresiensis (LB1) skull. Photo from Science Museum.
Homo floresiensis, LB1, skull (left) and human skull (right). Photo from BBC.
Anyway, Peter Brown from the University of New England who first described Homo floresiensis said that he is considering of stripping the hobbits from the genus Homo. Brown and his colleague, Tomoko Maeda, said that the Homo floresiensis lineage possibly left Africa before the evolution of the genus Homo. Their paper had been accepted and will be published in an upcoming special Homo floresiensis edition of the Journal of Human Evolution.
I can't wait for the paper to come out. In the meantime, you can read this article from The Australian.
A baby white-handed gibbon was born at Vienna's Schoenbrunn Zoo to father Robert (aged 11) and mother Sipura (aged 21) on Sept 23rd. The baby was dubbed "ET" by the Vienna media after the famous Hollywood blockbuster alien although the zoo does not have an official name for the baby yet. Isn't he adorable? I can't stop saying "awwwwww".
"ET" snuggling with his mother. Photo from Austrian Times.
Two new protected areas were designated in China and Vietnam recently to protect two of the world's most endangered primates by Fauna and Flora International (FFI). The Tonkin snub nosed monkey (Rhinopithecus avunculus), found only in Vietnam, numbers about only 200 individuals in the wild while the eastern black crested gibbon or cao vit gibbon (Nomascus nasutus), second most endangered primate in the world, numbers only just 110 individuals. Both species are listed as "critically endangered" in the International Union for Conservation of Nature (IUCN) Red List. The Tonkin snub nosed monkeys were thought to be extinct until a small population was rediscovered in the early 1980s.
Read more about the Tonkin snub nosed monkeys, cao vit gibbons and the new nature reserves from Wildlife Extra.
Male (left) and female (right) cao vit gibbons. Photo from Fauna and Flora International.
The Tonkin snub nosed monkey. Photo from Fauna and Flora International.
Can I See Your Fingers Please?
That is what University of Liverpool's Emma Nelson probably would have said if she were to meet our hominan ancestors in person. Known to hold true in anthropoids (humans, apes and monkeys), the index (second digit) to ring (fourth digit) fingers ratio or 2D:4D is an indication of how much an individual were exposed to androgen (such as testosterone) in the womb. The more androgen you are exposed to, the longer the ring fingers are (and the shorter the index fingers are compared to the index fingers).
Photo of a human's left hand. From left to right: thumb, index, middle, ring and little finger. Photo modified from Wikipedia.
Nelson et al. believe that a high ratio (longer index finger, shorter ring finger) suggests monogamy (or pair-bonded) while a low ratio (shorter index finger, longer ring finger) suggests polygamy (or non pair-bonded). Simply put, individuals with high androgen level is likely to be non pair-bonded and the telltale sign is in the index and ring fingers. Also, some controversial studies had suggested that both men and women who receive high levels of androgen in the womb are more likely to be stronger, faster, and more sexually competitive.
Nelson and her researchers recently looked at the fossils of two Neandertals and one Australopithecus afarensis with complete index and ring fingers to determine their 2D:4D. They found that Neandertals had long ring fingers, suggesting that they were polygamous just like modern day primates that live in groups. A. afarensis on the other hand, had long index fingers. Nelson is puzzled by this discovery. "These were small creatures that probably lived in groups and were being eaten by predators. How do you keep from mating with different members of the group?", she said.
Indeed it does not make sense for A. afarensis to be monogamous if they live in groups. Notice that Nelson et al. only used one A. afarensis fossil to get the 2D:4D. Perhaps it is not their fault that only one A. afarensis specimen had complete index and ring fingers but such are the dilemma of using fossil specimens to generalize a whole species.The result might just be a statistical outlier. However, I can't speculate the result or the implications but anyone that are familiar with statistical data knows that a small sample size leads to a higher sampling error. Also what would a 2D:4D = 1 (same index and ring finger length) be?
I do find both Nelson et al. and Robinson and Manning (2000) research interesting but I would like to stress that the results are mere predictors and correlations. Take it with a grain of salt. Don't go measuring 2D:4D of your future spouse, boyfriend or girlfriend and accuse them of not being monogamous or a homosexual.
Emma Nelson and her team presented their research at this year's Society for Vertebrate Paleontology meeting held in Bristol, United Kingdom. Read more about Emma Nelson's research.
Frans de Waal: A Helping Hand Or A Stab In The Back - Which Is More Human?
Dr. Frans de Waal will be having a lecture and book signing tomorrow (Thurs, Sept 24) , 7pm at The Kaye Playhouse at Hunter College. For all you Facebook users, Dr. De Waal has a Facebook fan page as well! You really should go become his "fan" on his page. Really.
A Helping Hand Or A Stab In The Back - Which Is More Human?
World-renowned primatologist Dr. Frans de Waal will discuss his ground-breaking book The Age of Empathy: Nature's Lessons for a Kinder Society.
An exploration of the origins of human morality that challenges many of our most basic assumptions, The Age of Empathy has been written by one of the world's leading primatologists, Dr. Frans de Waal, called one of the world's 100 most influential people by Time magazine and the winner of the Los Angeles Times Book Award. De Waal's newest book looks at the question of whether competitive, selfish behavior is really "instinctive" and "natural," an outgrowth of evolution and the survival of the fittest. However, using research from anthropology, psychology, neuroscience, and animal behavior, de Waal argues that humans are equally hard-wired for empathy. We are, he says, group animals - cooperative, sensitive to injustice, and mostly peace-loving - just like other primates, elephants, and dolphins. De Waal's findings have profound implications for politics, office behavior - and perhaps our very survival.
To RSVP, click here or call (212) 772-4007.
A little boy pressed his nose on the glass where a Western Lowland Gorilla is interacting with the zoo-goers. He turns around to his parents with a big smile. "Oh look, the monkey wants to kiss you", said his mother.
At the lemur exhibit, a girl asks her parents what those black and white primates were. Her dad picks her up and said, "It's a monkey, sweetie … let's go".
A pair of gibbons gracefully swings around in their exhibit. Excited, a group of kindergarteners cheered as these gibbons maneuver around its habitat with great agility. "These monkeys are so active", said the teacher.
If this sounds familiar to you then you are not alone. I spent a great deal of time near primate exhibits mainly because I love to observe their behaviors. I also enjoy watching interaction between humans and primates. However, there are times when I just can't control myself and felt compelled to walk over to these people and explain to them that the word "monkey" is not a general term for primates (politely, of course). It shocks me that most of the time people do not read the information panel at the exhibit (aren't zoo trips for educational purposes?). So when is a monkey really a monkey?
Monkey is a colloquial term for any cercopithecoids (Old World monkey) and platyrrhines (New World monkey). Monkeys are not hominoids (apes) or prosimians. One of the most distinctive characteristic that differentiate monkeys and apes is the presence of a tail in monkeys. Gibbons, siamangs, orangutans, gorilla, chimpanzees and bonobos are apes because they do not have a tail.
Gorillas do not have tails, so they are not monkeys but apes.
Differentiating monkeys and prosimians are a little tricky; all prosimians have grooming claws (toilet claws) but it is generally not visible within zoo exhibits. Prosimians include lemurs, lorises, galagos, aye-ayes and tarsiers.
A ring-tailed lemur is a prosimian. Although it has a tail, it also have grooming claws so lemurs are not monkeys.
A hamadryas baboon is technically a monkey because it has a tail but has no grooming claws.
The Barbary Macaque, Macaca sylvanus, was formerly named Barbary Ape due to the absence of a tail (to be more precise, they have a vestigial tail that looks like a stump). However, we know now that it is more closely related to macaques than to apes so its name was changed to correctly reflect what they are.
A Barbary Ape (notice the lack of tail). Flickr photo from Gerald Davison.
This brings us back to the question, "when is a monkey really a monkey'? The most straightforward answer would be "when it has a tail but doesn't have grooming claws". However, the most convenient answer usually lies in front of you … on the information panel.
Flickr photo taken by tim ellis at the Twycross Zoo, England.
The sign reads "Who are you calling a monkey?"
Algeripithecus and Azibius: Anthropoids or Strepsirhines?
The mandible of Algeripithecus. Photo from Science Daily.
The debate for the origin of anthropoid points to two locations. One hypothesis supports the notion that anthropoids originated from Africa while the other argues that anthropoids originated from Asia. The model for the African origin hypothesis rests on Algeripithecus minutus, a fossil discovered in Algeria, Africa that lived 45 million years old. Algeripithecus and Azibius are Eocene primates that lived around the same time in Africa some 50 million years ago.
Much more complete craniodental fossils of Algeripithecus and Azibius were recently excavated and reveal that they might not be anthropoids but were strepsirhines instead. New data from the fossils, according to a recently published paper by Tabuce et al. (2009), suggest that Algeripithecus and Azibius were the earliest primates to branch out of the Afro-Arabian strepsirhines clade.
According to Tabuce et al. (2009), there are anatomical evidence suggesting that Azibius were nocturnal. They also found that Algeripithecus has a long, thin and forwardly inclined lower canine alveolus, features that match the long and and flat lower canine in the tooth comb (dental comb) of crown strepsirhines. These physical characteristics suggest that both Algeripithecus and Azibius are closely related to crown strepsirhines. The researchers concluded that both Algeripithecus and Azibius were not members of the anthropoid family but instead an early representative of the crown strepsirhines. Crown strepsirhines gave rise to modern day lemurs, galagos and lorises.
Tooth comb of a ring-tailed lemur (Lemur catta). Notice the two lower canines that are long, thin and forwardly inclined. Together with four lower incisors, it makes up the tooth comb. Photo from Wikipedia.
These recently excavated fossils support the origin of crown strepsirhines from Africa. However, it also challenges the hypothesis that points to Africa as the origin of anthropoids since Algeripithecus should be classified as strepsirhines instead of anthropoids (and no longer provide evidence for the Africa origin hypothesis) according to this published paper by Tabuce et al.
Rodolphe Tabuce, Laurent Marivaux, Renaud Lebrun, Mohammed Adaci, Mustapha Bensalah, Pierre-Henri Fabre, Emmanuel Fara, Helder Gomes Rodrigues, Lionel Hautier, Jean-Jacques Jaeger, Vincent Lazzari, Fateh Mebrouk, Stéphane Peigné, Jean Sudre, Paul Tafforeau, Xavier Valentin, and Mahammed Mahboubi. Anthropoid versus strepsirhine status of the African Eocene primates Algeripithecus and Azibius: craniodental evidence. Proc R Soc B 2009 : rspb.2009.1339v1-rspb20091339.
New this year is The American Anthropological Association (AAA)'s Student Saturday , a Graduate School Fair for undergraduates and graduates to network learn how to "sell yourself", attend workshops essential to apply for graduate schools, etc.
Note that the last day to register is October 16, 2009. The AAA also prefer that you contact your department for a contact person to send in all the forms and payments although you can personally send it in yourself.
Do you plan on going? I'll be there so if you see me, say hi!
Animation of chimpanzee yawning from Emory University. Illustration from BBC News.
I'm sure we are all familiar with this scenario: Someone yawns and we would "catch" it or vice versa. This is the phenomenon of contagious yawning.
A new paper from The Proceedings of The Royal Society "Computer animations stimulate contagious yawning in chimpanzees" suggests that the phenomenon of contagious yawning and empathic response to animation occurs in chimpanzees. Computer animations of yawning chimpanzees (see illustration above) can be use to stimulate contagious yawning in chimpanzees. Previous researches have documented contagious yawning in chimpanzees through video-recorded footage.
Dr. Matthew Campbell, lead author of the paper from Emory University's Yerkes National Primate Research Center said that they would also like to learn more about behaviors that are related to empathy such as consolation (when an individual does something nice to the victim of aggression). They want to know if individuals that are good contagious yawners are also good consolers. Understanding how chimpanzees empathize and imitate animations can help us understand how we, as human beings, empathize and imitate animations as well, said Dr. Campbell.
Jane Goodall's New Book, "Hope for Animals and Their World: How Endangered Species Are Being Rescued from the Brink"
Jane Goodall's new book, Hope for Animals and Their World: How Endangered Species Are Being Rescued from the Brink.
I was at The Union Square Barnes and Nobles yesterday evening for Jane Goodall's book signing. She, along with Thane Maynard (Cincinnati Zoo director) and Gail Hudson (author of Harvest of Hope), was there to give a brief talk and sign her new book Hope for Animals and Their World: How Endangered Species Are Being Rescued from the Brink. I have yet to read the book but a chance to meet her in person (even for 1 minute) was exciting for me. I must admit that I was kinda shaking (again, with excitement) when I told her she's a great inspiration though she just looked at me slowly and smiled. She's pretty much the Whitney Houston of primatology, so she needs her diva moment. I will write more about the book once I am done with it.
I'm sure most people associate Jane Goodall with chimpanzees and primatology, but did you know that along with Dian Fossey (studied mountain gorillas) and Biruté Galdikas (studies orangutan), they are referred to as "Leakey's Angels"? Yes, Leakey as in Louis Leakey, the famous archaeologist who worked at Olduvai Gorge and discovered Oldowan tools.
A Fongoli chimp. Photo by Frans Lanting, National Geographic.
I just stumbled upon this on Twitter (Thanks to DarwinMonkey). It's a National Geographic page about the Senegalese Fongoli chimps, named after the Fongoli stream that runs through the chimpanzee's range. There are videos showing these chimps using tools fishing for termites, hunting a bushbaby and taking baths. Mary Roach's field note-like article "Almost Human" offers readers an insight to what the daily life of a chimpanzee is like (the Fongoli chimps are savanna-woodlands chimp), the concept of "ecological intelligence" and innovative tool use by the Fongoli chimps that were suppose to be unique to humans.
Read about "Almost Human" on National Geographic.
Soon Facebook and Twitter users can "friend" and "follow" Uganda's mountain gorillas (Gorilla beringei beringei) and see videos of them feeding, receive regular updates on the status of these gorillas and even updates on new births.
Lillian Nsubuga, a Wildlife Authority spokeswoman, said that this is to promote Uganda's tourism industry. Aside from Uganda, mountain gorillas can only be found in two other countries; Rwanda and The Democratic Republic of Congo.


Being supported by an advanced and professional IT team, we could offer technical support on pre-sales & after-sales service for Operated More Smoothly Pellet Mill , Feed Pellet Mill , Animal Feed MIll Pellet Mill , and will sincerely create and share success with all clients. We welcome you to contact us for more information and look forward to working with you.
"With this motto in mind, we've got develop into amongst one of the most technologically innovative, cost-efficient, and price-competitive manufacturers for Operated More Smoothly Pellet Mill , Feed Pellet Mill , Animal Feed MIll Pellet Mill , We have confident that we can provide the high quality products at resonable price good after-sales service to the customers. And we will create a bright future.


text:
Ambassador of the UAE called on the Federal Minister Senator Mohammad Ishaq Dar at Finance Division today.
Islamabad, H.E. Mr. Hamad Obaid Ibrahim Salim Al-Zaabi, Ambassador of the United Arab Emirates called on the Federal Minister for Finance & Revenue Senator Mohammad Ishaq Dar at Finance Division today.
Finance Minister Mr. Ishaq Dar and H.E. Mr. Hamad Obaid Ibrahim Salim Al-Zaabi, Ambassador of the United Arab Emirates shared the historical and long-standing ties between both countries and exchanged views on further boosting and strengthening these economic ties.
Finance Minister Senator Ishaq Dar stated that Pakistan and UAE are engaging in various areas including energy, refinery, petroleum and trade, however, still a lot of potential is unexplored. In this regard, the Finance Minister also highlighted various new avenues in which both countries can trade and invest.
The Finance Minister recalled his recent visit to the UAE and discussed the fruitful meetings held in UAE with management of Abu Dhabi Holding Company and International Holding Company. It was shared that the ADQ and IHC showed their confidence in the ongoing economic policies of the present government and shared their interest in investing in energy, agriculture, healthcare and other sectors.
The Ambassador of the United Arab Emirates highlighted that UAE is fully cognizant of the development-oriented economic policies of the country being undertaken by the present government and shared that UAE is keenly interested to augment its investment in Pakistan in new sectors of the economy.
The Finance Minister welcomed the proposal for new investment in Pakistan of UAE and assured the UAE's Ambassador of full support and cooperation by the present government.
In conclusion, the Finance Minister shared sentiments of gratitude for good will and cooperation of his Excellency and hoped to enhance the bilateral relations further in the future.


Another Ubisoft game, huh? We all know that they pretty much produce some of the best and really big triple A games out there. And the fact that they pretty much helped made South Park The Fractured But Whole is also another reason for us to be biased about it. Still, it is not our favorite because that throne belongs to Naughty Dog. But nonetheless, to each their own and in this game, there is this thing called rainbow six boosting.
Apparently, this is when you rank up with the use of the other players or something. And with the use of their Proboosting on their website. This will help you not lose your rank since it seems to be almost impossible to keep it while carrying around a whole team of your friends.
They have this thing called diamond boosters where they apparently can guarantee that you get any rank you want within a really short time. This may require buying it with real money though. And we do not know about you, but is buying the game with actual money, not enough for gamers anymore?
They have already played the game and they can still do so again and again. Why do they have to spend more money just to get an upper hand on it? does that not mean that you are not capable of doing a good job yourself on your own? Why do you have to buy things to get boosters?
Is that not called cheating in a sense? Or is this comparable to sports? Where you play badminton but you have to have the best racket to get a good swing or something? We know that there is Esports now but seriously, buying things for a game that you already bought seems a little silly to us.
Or maybe we are just getting old and we cannot understand the youth these days now. Kids are mostly playing Fortnite now and we have a hard time understanding how that is so famous. Maybe it is because of the way it is played and because of the dances that they incorporate there?
If Rainbow Six was as famous as Fortnite, would it have the dances too? Or maybe the reason why it is not as famous as Fortnite is BECAUSE it lacks the things that Fortnite has. Whatever the reason, it seems like almost all the online games out there require some kind of expenses to it that just does not limit to only buying the game itself.
You have to be paying and buying for other things that you could have as a virtual weapon as well. You will literally be paying for something that is not real. And not really there. It would have been awesome if technology has found a way to make the weapons you buy in games real and physical.
So at least we could say that it was not such a waste to have been paying for it. Because if it was possible now, we would have been buying all the weapons there so we could own our very own guns.


text:
Sant Nicolau és un nucli de població del municipi de Sabadell, al Vallès Occidental. El 2005 tenia 5.678 habitants censats. Amb aquest nom es coneix avui dia a l'antiga església de Sant Feliu d'Arraona, coneguda com a Capella de Sant Nicolau.

Referències

Barris de Sabadell

redpajama_set_name: RedPajamaWikipedia


text:
In 1985, the Scottish singer's suggestive 'Sugar Walls,' written by Prince, topped the Dance Club Songs chart and helped spawn the Parental Advisory labeling system.
"It was such a great groove, even in the demo," says Sheena Easton of her double-entendre-laden hit "Sugar Walls." The Scottish singer says she didn't "think about image" when recording the sultry drum- and keyboard-driven cut, which was written by Prince. "I was just focused on the music."
With lyrics that included
@MusicNews
With lyrics that included "come spend the night inside my sugar walls," the song, released in 1984, was a far cry from Easton's comparably innocent 1981 debut, the Billboard Hot 100 No. 1 "Morning Train (Nine to Five)." But audiences didn't mind her stylistic shift: "Sugar Walls" became her sixth top 10 Hot 100 hit and her first No. 1 on the Dance Club Songs chart on Feb. 23, 1985.
A few months later, the song drew attention for a different reason when it came under fire from the Parents Music Resource Center, a group co-founded by Tipper Gore, the wife of future Vice President Al Gore.
The PMRC charged that pop music had become "pornographic" and proposed obscenity guidelines for recordings. In the wake of congressional hearings (featuring testimony from Frank Zappa and John Denver), the RIAA agreed to a parental-advisory sticker system that continues today.
"My feelings were then, and remain now, that every parent has the right to filter the content that their children are exposed to," says Easton, a mother of two adopted children (both grown).
"If (parents) felt that 'Sugar Walls' was inappropriate for their kids to listen to, they were well within their rights to make that clear. Adults, on the other hand, are free to choose what they want. It did not offend me that some people didn't want their kids listening to 'Sugar Walls' at all. I believe the track found its intended audience."
Tags: classic
He logs his 26th total week on top, second only to Taylor Swift's 36. Drake...
Tags electronic
Category Hip-hop, Rock
Which Spice Girls Song Should Be Performed at The Royal Wedding? Vote!
After Mel B confirmed that the Spice Girls would be making an appearance at Prince...
Tags concert, relax
Calling All Spa Professionals: We Want to Hear Your Stories
Offer what people want to buy, not just what you want to sell.
Tags bass, natural
Lady Gaga's Career SalesGreta Van Fleet Lands Second Straight Mainstream Rock Songs No. 1


Hello, my name is Matthew Dennis and I'm 37 years old and currently living in United States. I am a native English speaker and teach English. I have been an online English teacher with Verbalplanet.com since January 2016. I am currently offering a discounted initial trial lesson at 50% of my normal lesson price for new students.
I am a martial artist, business owner. and world traveler. I am 37 years old and have lived and visited many places, including 3 years in South Korea, and 2 years in China. I love to meet and work with great people. In Asia I often teach ENGLISH, SCIENCE, and WRITING.
I am very healthy, and enjoy great food and exercise. I've studied MARTIAL ARTS (kung fu / karate) and MEDITATION for over 25 years. I also have over 20 years experience is the RESTAURANT and BAR industry.
I consult regularly in these areas around the world.
I am the Founder and CEO of multiple companies that operate internationally, including a publishing company that produces educational material. I am the author of POWER START, a 4-book English Language series that will release soon in English, Japanese, Spanish and Korean.
I have extensive ESL and EFL experience, that comes from my acting training, traveling, and international business.
My experience in conversation, testing, and business helps me train professionals who must interact using English- such as: business ex3cutives and employees, teachers, and flight attendants. I have special experience coaching flight attendants throughout the intense and competitive interview process that comes with that industry.
I opened a private English academy in Seoul, South Korea. This is one of the most competitive industries in the country and I understand how the industry and business works, and the needs of the students and their families.
In addition to teaching Adult and Business English at the oldest private English academy in South Korea, I taught at one of the most well-known and prestigious private elementary schools in the country as well.
I was the private English teacher for the Editor of a large newspapers in Seoul.
I also have basic Spanish speaking ability, and have worked as an English language coach for Spanish native speakers.
My language teaching is augmented by acting training, writing and storytelling ability, business endeavors, marketing, and understanding of human interaction.
My teaching approach is simple, clear, and focused on practical use of English. Personally, I want huge results from a minimal amount of effort, so I extend that mindset into my students. My goal as a teacher is to eliminate my students' need for me as soon as possible. This means I want to give my students the ability to get what they want, as fast as possible, so they no longer need me. There are specific ways that the human brain processes information and learns, and by understanding and utilizing this knowledge, we can have massive results that are often far above what is considered normal. Because I can get significant results from my students, I put all my focus on people who are serious about learning.
When speaking English, it is often more important to UNDERSTAND and FEEL the rhythm and tone of what is being said, than it is to be perfectly accurate with each word. Understanding English from a native speaker's perspective is essential to communicating effectively in English, so I also teach my students to adopt the "mentality of English". In English, we can say the same thing many different ways, and a lot of words are often being squeezed into each breath. Knowing this, I help my students develop their conceptual understanding of English, so they can understand slang and inflection, and hear when words and sentences are being dropped or blended together. This way, my students can learn to hear, feel, and use the rise and fall of natural speech patterns- which allows them to use less energy when speaking English, and have a much better understanding of language.
All of my focus while teaching is on getting practical results for my students. It's about HAVING COMMAND of the English language.
I help people become more fluent in English. I specialize in pronunciation, language flow/pattern/inflection, and advanced and near-native conversation. I often teach privately through book study and discussion groups- these are some areas where my abilities can have the most benefit for my students. Most of my students are high achievers, international business people, ESL teachers, and flight attendants. I often train students for short, intense periods of time in preparation for projects, tests, or interviews. Most of my students achieve what they are going for and move on with their goals. My long-term students are usually English instructors.


Gas networks are traditionally set to run at a high pressure to account for a 'worst case scenario' of gas use from the homes and commercial premises they supply, but this high pressure is what results in the vast leakage into the atmosphere.
A £500,000 investment from the fund, and active development from Williams Advanced Engineering allowed Utonomy to further the development of their 'Internet of Things' smart valves and actuators to be used across the gas network. With Williams' input into actuator hardware development and control system development, Utonomy's offering could go on to potentially save the equivalent of over a billion tonnes of CO2 leakage per year.


Can I use someone else's credit card for payment?
Some rental companies have blanket rules regarding this. They will only accept a credit card in the name of the renter. Others will accept it if the card holder signs a credit card authorization form. This form gives the renter permission to use their card and stipulates how much the renter is authorized to charge on it and for what services such as the rental, extras, bond/excess etc. Before you make a booking, contact us to find out if the rental company will allow you to use a credit card in the name of someone other than the renter.


text:
Q: How can we write a function `f` which returns an integer such that `f(x) == f(y)` if and only if `x` and `y` are the same? Requirements
Can we write a function f which:

*

*takes a single argument as input.

*returns an integer

*has the property that f(x) == f(y) if and only if x is exactly the same as y or x is a copy of y.

We say that "x is exactly the same as y or x is a copy of y" if at least one of the following conditions is met:

*

*id(x) == id(y) returns True

*repr(x) == repr(y) returns True

*x is y returns True

*y is x returns True

*x == copy.deepcopy(y) returns True

*y == copy.deepcopy(x) returns True
I realize that our function f will never be fool-proof, but please assume that nobody is going to define a new class with a really weird __eq__ method.
Also assume that no adversary is going to define a new class with a truly bizarre __copy__ method or some sort of pathological __deepcopy__().
One Attempt at Defining f
My feeble attempt at defining a function f is shown below:
pi = lambda k_1, k_2: (1/2)*(k_1 + k_2)(k_1 + k_2 + 1)+k_2

def f(x:object) -> int:
    """
        Based on something called "Cantor's pairing function"
        from the field of mathematics.
    """
    k_1 = hash(x)
    k_2 = hash(type(x))
    if k_1 < 0 or k_2 < 0:
        raise NotImplementedError()
    return pi(k_1, k_2)

Flaws in my solution
There are some issues:

*

*I worry that two different objects will have the same hash value. For example, maybe hash([1, 2]) == hash([2, 3]). The two lists [1, 2] and [2, 3] are different, but might have different hash values. Feel free to correct me if I am wrong.

*my solution only works when hash()returns a non-negative integer.

id(x) == id(y) versus x == y
x == y is implemented as x.__eq__(y)
Note that the id of an object is generally not the same as the id of a copy of that object. Usually, an object and a copy of the object usually reside at different memory addresses.
The following code demonstrates the difference between __eq__() and id():
x = [1, 2, 3]
y = [1, 2, 3]
print("id(x)".ljust(15), id(x))
print("id(y)".ljust(15), id(y))
print("x is x".ljust(15), x is x)
print("x is y".ljust(15), x is y)
print("x == x".ljust(15), x == x)
print("x == y".ljust(15), x == y)

We have:
id(x)           2531180442688
id(y)           2531180443264
x is x          True
x is y          False
x == x          True
x == y          True

Worry a little bit, but not too much about custom-made __repr__ or __eq__
I realize that our function f will never be fool-proof, but please assume that nobody is going to define a new class with a really weird __eq__, __hash__ method, or __eq__ method.
For example, someone could (in theory) define the following:
import random

class NoNoNo:
    def __init__(self, *args):
        self.myVal = random.randint(1, 9)
    def __eq__(self, other):
        return False
    def __repr__(self):
        return "$"

Objects instantiated from the NoNoNo class are never equal to each-other.
import copy
x = NoNoNo()
y = copy.deepcopy(x)
print("x == y?", "Yes" if x == y else "No") # prints "x == y? No"

Also, repr(x) is always the same as repr(y)
import copy
x = NoNoNo()
y = NoNoNo() # `y` IS VERY DIFFERENT FROM `x`
print("repr(x) == repr(y)?", "Yes" if repr(x) == repr(y) else "No") # prints "repr(x) == repr(y)? Yes"

A: If I have understood your question correctly, it means that the weakest condition is condition [2], and that's the condition we want to aim for when implementing the function. (I hope the condition wasn't added by mistake).
Does the following function make sense?
def f(x):
    return functools.reduce(lambda x,y: x *256 + y, repr(x).encode('latin1'))

A: I will limit myself to the case repr(x) == repr(y). This covers all except the deepcopy bases, assuming repr is deterministic. Then it essentially comes down to compressing a string down to a single integer in a unique fashion. This (well, it's inverse) is known as a universal code.
A way to do that is to take the string and convert it to bytes. Take note of the length l of the string. Check how many bits it takes to represent l. Then, output that many 1 bits followed by a 0. Then l itself encoded in binary, and finally the bytes in, say, little-endian encoding.
def encode(s):
    bytes = s.encode("utf-8")
    l = len(s)
    b = l.bit_length()
    ones = (1 << b) - 1
    lshift = l << (b + 1)
    bytesshift = (int.from_bytes(bytes, "little") << (2*b + 1))
    return ones | lshift | bytesshift

def decode(n):
    b = 0
    while n % 2:
        b += 1
        n >>= 1
    n >>= 1

    l = n & ((1 << b) - 1)
    n >>= b
    return n.to_bytes(l, "little").decode("utf-8")

A: I don't think this is feasible to implement. With arbitrary types any sort of paring function will lead to massive ints to represent everything except the most simple structures.
Ideally you would have to pair the data type and the data together to get a unique integer. The data will need to be converted into an integer unique to the set of all possible data inputs, which in practice would become very large very fast. Paired with the data types integer representation you will end up with a huge number the majority of the time.
If you want to handle negative hash values you could have a look at using a Signed Cantor Pairing Function. You would still have hash collisions however.
The best way I can see if simply concatenating the hash of the data structure with the data itself but then you may as well just keep the objects as they are. This could also lead to hash collisions between data types but unless you use tonnes of types it's unlikely. You could also use a perfect hash but you would have to define the set of allowed datatypes beforehand.


Line square baking dish, 8x8x2 inches, with aluminum foil, leaving 1 inch of foil overhanging at 2 opposite sides of pan; grease foil. Mix cornmeal and cold water in 2-quart saucepan. Stir in boiling water and salt. Cook about 5 minutes, stirring constantly, until mixture boils and thickens; reduce heat to low. Stir in onion, sage and 1/2 cup of the cheese. Cook uncovered 5 minutes, stirring occasionally; remove from heat.
Spread cornmeal mixture (polenta) in baking dish. Cover and refrigerate at least 12 hours until firm.
Heat oven to 400°. Grease jelly roll pan, 15 1/2x10 1/2x1 inch. Remove polenta from baking dish, using foil edges to lift. Cut polenta into 6 rows by 6 rows to make 36 squares. Cut each square diagonally to make 2 triangles; place in jelly roll pan. Bake uncovered about 15 minutes or until golden brown.
Cut apple into thin slices. Cut slices into fourths. Dip apple pieces into lemon juice to keep them from discoloring. Top each triangle with 1 apple piece. Sprinkle remaining 1/2 cup cheese over apple pieces. Bake about 5 minutes or until cheese is melted. Serve warm.
Use purchased polenta, and eliminate the preparation step in this recipe. Simply slice polenta, cut slices into fourths and bake as directed.
Make and chill the polenta, cut into triangles and place in jelly roll pan. Slice apple, and dip into lemon juice. Cover and refrigerate polenta and apple slices separately up to 4 hours. Assemble and bake as directed.
Arrange Cheesy Apple Polenta Bites on a colored serving plate, and garnish with fresh sage leaves and shaved fully cooked ham on the side.


Our contemporary witness exhibition includes 26 portraits of Schoah survivors from Israel and Germany and consists of vivid photographs and interviews. We communicate the survival stories not only to adults, but also with the help of our child-friendly concept to children and young people and encourage them to act against anti-Semitism and racism. You would like to bring our exhibition to your city or invite us to a lecture? Write to kontakt@heimatsucher.de.
Was für eine Ehre: am 21. April 2017 durfte ich für HEIMATSUCHER einen TEDx-Talk halten.