Students from the Math department at Chalmers offer peer tutoring to fellow Chalmers students. We'll meet at Kuggen at Tuesdays 3.30 pm - 5.30 pm, and at the Main Library at Wednesdays and Thursdays 5 pm - 7 pm. Welcome!
The Library offers more than online information and books. You can also borrow markers, USB sticks, headphones and chargers. Welcome to the Library information desk.
The database includes research methods (quantitative, qualitative and mixed methods) across the social and behavioural sciences. Books, reference material, case studies and videos are included.
In the Subject Guides you'll find a selection of databases, books and journals relevant in your discipline and in the Reference Guides recommendations on how to cite correctly.


Perhaps not merely will you actually have the ability to come up with your creative abilities but you'll farther be capable to develop different abilities that may aid you later in life. The ideal way to establish your composing ability is just practice. The document corrector automobile utilizing the software, you actually know lots of the means your persona with some places might have the capacity to refine your composing abilities may possibly be upgraded. Studying is a strong tool that can enable you to develop your writing abilities unlike some other instrument may. Composing this kind of essay isn't a straightforward job. Writing a perfect composition may be regarded a headache! Writing a prosperous academic section is much just the exact same. Writing properly is crucial for these motives. Additional vital points you have to consider when you're composing an article is the reality that if you enjoy to help it to become appealing then begin with inquiring questions to the readers.
Bristol palin may possibly not be marriage inside the forseeable future after all.
There's an easy format that this unique type of essay must follow. When you begin composing a short article or composition you must set an objective which is why you like to compose the brief article. For instance you might compose your essay within the structure of the arbitrary site of your own ultimate biography and begin your composition with just part of a word that's meant to be continued in the past site. Do not overlook, discussion composition composing is truly not as simple as it looks. Normally a kid's essay assignment would consist of a couple of paragraphs. Today you're prepared to start creating a college essay. The following problem is the fact that, when studying this kind of article, it actually is uncertain regarding what the pupil is assessing until near to the decision. Also before beginning studying, you must understand what it's which you're going to attempt unraveling through the article. Clearly, there are usually a couple of things which are potential to do to make certain your 1st article is really a great one.
God provide both churches improved unity with this matter..
The topic will find out the essential or principal subject of the essay. Don't create an essay with no target. The first factor you should note is there are very different types of documents. As you could see, there are many imaginative strategies to commence writing your article, so begin considering early and choose on something that admissions officers may recall. You won't merely have the opportunity to write help on essay essays, but you'll additionally maintain conversations with the remainder of your own group in order to learn from others too. In place of functioning in your own manuscript, experimentation that has many different writing exercises. Article writing isn't ever an effortless occupation. These are some of the vital recommendations on authorship, which may be adopted. Perhaps it is not you are a horrible author, but you don't delight in writing.
Utilizing the show you found online, begin building terms.
So keep these readers in the mind whilst writing a post. Obtaining the correct notion or perhaps some ideas to write on is measure one in composing a item. About the document produces a huge difference when somebody is producing their own declaration of their educational writing paper. The initial step towards writing a great research papers may be to arrange whatever is always to be composed. This may definitely result in enhanced reading than if you strive to cover all, and may certainly improve the caliber of your work.


text:
Critical Linking
The Internet's Greatest Archive of Food History Needs Your Help: Critical Linking, July 17, 2020
Vanessa Diaz Jul 17, 2020
Critical Linking, a daily roundup of the most interesting bookish links from around the web, is sponsored by Flatiron Books, publisher of Blacktop Wasteland by S.A. Cosby.
"What the website lacks in pomp and flash is made up for in its legendary breadth. True to its name, Olver's Food Timeline begins with entries on ice, water, and salt in prehistory and ends with cronuts and test-tube burgers in 2013, making every stop along the way, from "blood as food" to turtle soup to Pop Tarts. The archive has garnered 35 million readers and counting, and during her 16-year tenure, Olver has answered more than 25,000 questions from those readers. Her lifelong, unpaid passion project is the most comprehensive and interactive food-history resource the world has ever known."
Calling all foodie + book nerds!
"The original series won multiple Emmys and a Peabody award, so presumably its basic premise—in which a daydreaming dog named Wishbone imagines himself into classic stories, including Oliver Twist, Faust, Frankenstein, multiple Shakespeare and Sherlock Holmes tales, The Odyssey, a series of African American folktales, and The Count of Monte Cristo, to name but a few—won't change too much."
Wishbone was my dude! I will take this helping of joy.
"That's why, over the past few months, we've started referring to not-quite-contemporary books as throwback fiction! While there's no real formal definition, we've started considering everything from the 1960s to the 2000s to be more of a throwback than historical. It just makes us feel better, you know? And it's actually been really refreshing! It sets the scene for '80s adventures and reminds us that '60s unrest isn't quite as far in the past as it seems.
Unlock your DeLorean and buckle up, readers, because we're headed back in time. But just slightly. Check out some of our favorite historical #throwback fiction books below!"
I know I'm not ready to call the 2000s "historical fiction" yet!

redpajama_set_name: RedPajamaCommonCrawl


Learn Pranic Rainbow Light Breathing to cleanse your entire chakra energy system.
As your diaphragm is the organ for processing emotions breathing is an essential tool for releasing old, stagnant chi, emotions and memory that could block your natural creative powers to manifest.
Performing any one of these powerful breath work techniques will immediately gives rise to a deeper sense of spaciousness, well-being and ease at all levels of being for body, mind, spirit and emotions.
Pranic breathing is a powerful antioxidant stimulus as it increases oxygen to your cells for enhanced cellular nutrition, and removal of metabolic waste and toxic residue.
Freeing your creative life force energy (prana) supports the process of manifesting the life you truly desire for yourself.
Learning to use your breath to cleanse your energy system is also your first step for clearing and balancing your chakras, your windows of perception.
Use this chakra breathing technique to clear, balance and heal a particular chakra.
Through clearing blockages from your chakra energy system you can begin to identify the patterns of energetic blockage that surface for release and experience full integration and healing for your body, mind and emotions.
The Ajna breathing technique stimulates and increases your imagination and psychic capacity, as well as your ability to visualize and see colors and images.
A powerful yogic breathing technique that strengthens your nervous system, cleanses your blood, increases the amplitude of your body's electro-magnetic energy field, builds your personal power and self confidence.
Fire Breath stimulates the nerves in your nasal passage ways to elevate your mood, clears your perceptual chakra based system, and charges your body with vital life force energy.
Stimulates your pituitary and endocrine gland axis which helps develop and increase your psychic abilities, including your ability to receive intuitive insights, and your ability to visualize and project images.
Your focused breath stimulates your Ajna chakra and activates your pituitary gland.
In this breathing technique you're focusing your breath on the micro-cosmic orbit to amplify and strengthen the circulation of prana in your energy system. This enhances the health and well-being of your entire bodymind system.
This meditation balances the relationship between your pineal and pituitary glands.


text:
2014 F1 Calendar
2014 F1 Drivers
Williams unveils 2008 livery
Written by David on March 03rd, 2008 at 7:19 pmLast Update: March 03rd, 2008 at 7:54 pm
The AT&T Williams F1 team unveiled today its new livery for the upcoming season. While Williams 2008 challenger, the FW30, has already been seen with six different liveries during this winter's testing sessions, the official livery for the upcoming season has been made public only today.
Frank Williams, Williams Team Principal and owner, had a short interview with the team's press office.
The team will mark several landmarks this season. Did you foresee such success when you first started your career? Frank Williams: "It never crossed my mind so no, not at all. Back then, my mind concentrated on yesterday's and today's problems."
This year also sees you become the longest serving constructor in Formula One and celebrate 600 GP entries. What has motivated you over the past 38 years and what keeps motivating you? F.W.: "It's very easy to be hooked by Formula One. Once you're in, you can't get out. It's almost an addiction, but an enjoyable one."
You had no connections to motorsport as a child. What propelled you into the sport do you think? F.W.: "When I was very young, motor cars were few and far between but I always loved them. I was just thrilled by their speed and their specification, I was hooked from the first time I came across one."
Formula One has changed considerably during your tenure, what has been the most significant change, in your opinion? F.W.: "Undoubtedly safety. The advances we've seen over the years are very much down to Max Mosley and the FIA."
Your relationship with Patrick Head is the most enduring partnership in the paddock. What do you think has been the key to its longevity? F.W.: "A common sense of purpose. We also have an understanding of what each other is good at so we very rarely tread on each others' toes."
Williams has an impressive employee retention record with a number of employees having worked for you from the start. What do you think encourages people to work at WF1 for so long? F.W.: "It helps to have been around a while, obviously! We tend to attract people who enjoy what they do and people who really want to win races. Our atmosphere is certainly disciplined, but has a light touch which I think helps."
The team stands as one of just two independent teams in the pitlane. What pressures does that bring and do you see Williams staying as a force in the paddock for another ten years? F.W.: "Making ends meet is the single largest problem that I face with Adam our CEO but we have a very able marketing department who always work their socks off all year round. Better results always help, but when we have had a good year we reap the rewards for the following few years. We haven't been what I would call a force for a good few years, but I hope that we will be an honest and able competitor whilst enjoying what we do as well as being a team that helps to give the fans good value for money."
The team hasn't won a Championship for ten seasons now but is it fair to say it seems to be turning a corner? F.W.: "Ten years is a miserably long time, Patrick and I wince every time we think about it. But life's tough, it's never meant to be easy, you just have to get on with it and work hard to get back to the top. Whether we've turned a corner, we will only be able to tell once the season gets underway."
The press are speculating that Williams could be the leading team behind Ferrari and McLaren this year. Are you cautiously optimistic of improving on last year's performance? F.W.: "Personally, not in the slightest, I don't subscribe to what the press has said. Our competitors around us, of which there are many, are just as competitive. Formula One is never easy; it's not supposed to be easy, so to think that we're going to sail in to third place in the first few races is pie in the sky. If we do, it'll be a tight fit."
Nico returns for his third season this year. How important is he to the team? F.W.: "He's fundamental. We have the highest regards for him and we have great confidence that, given the right equipment, he will win races."
Kazuki has been promoted from test to race driver, how has he been doing over winter testing and what are your expectations of him in a race seat? F.W.: "We knew we were taking a bit of a gamble when we signed him, but we've been pleasantly surprised by his testing pace. It's really only a question I'll be able to answer properly after the first few races of the season."
There's a new face in team this year in the form of Nico Hulkenberg. What prompted you to take him on as a test driver? F.W.: "We like his background. The fact he's a Willi Weber driver gives us confidence in our choice. He hasn't done much running to date, but he does not appear to be a waste of time."
And lastly, what are your predictions for the season ahead? F.W.: "I think the first four places are most likely to be occupied by the same people as last year, sadly. But I do think it will be a brilliant racing season."
source & images: AT&T Williams
« Previous Entry Next Entry »
Ferrari: the new F2008
Bernie Ecclestone: "McLaren could start 2008 season with points penalty"
Robert Doornbos could race next year with Toyota or Williams
Williams and Allianz extend partnership
Williams: 2011 Chinese Grand Prix preview
McLaren appeal hearing moved to London
2008 Hungarian GP, Qualifying: Williams quotes
Lewis Hamilton: "Raikkonen, still the man to beat"
Williams: 2011 Italian Grand Prix preview
Ross Brawn: "Diffusers war will not damage FOTA"
Email (will not be shown) (required)
Next Grand Prix
Last GP results
2014 F1 Australian Grand Prix
Total Laps: 58
Circuit Length: 5,303 Km
Race length: 307,574 Km
Albert Park Circuit Preview
Australian Grand Prix insights
2014 F1 Brazilian Grand Prix Results
1 Nico Rosberg 25
2 Lewis Hamilton 18
3 Felipe Massa 15
4 Jenson Button 12
5 Sebastian Vettel 10
6 Fernando Alonso 8
7 Kimi Raikkonen 6
8 Nico Hulkenberg 4
9 Kevin Magnussen 2
10 Valtteri Bottas 1
11 Daniil Kvyat
12 Pastor Maldonado
Drivers' Standings
Constructors' Standings
1 Lewis Hamilton 334
2 Nico Rosberg 317
3 Daniel Ricciardo 214
4 Sebastian Vettel 159
5 Fernando Alonso 157
7 Jenson Button 106
9 Nico Hulkenberg 80
10 Kevin Magnussen 55
2 Red Bull Racing-Renault 373
3 Williams-Mercedes 254
5 McLaren-Mercedes 161
6 Force India-Mercedes 127
7 STR-Renault 30
8 Lotus-Renault 10
9 Marussia-Ferrari 2
10 Sauber-Ferrari 0
11 Caterham-Renault 0
© 2007 - 2020 Formula1News.net | Web Design & Web Hosting
Use or depiction of images or trademarks throughout this website is for illustrative and editorial purposes only.


text:
Black Mail
Make Your Vote Count!
Some people are counting on you to vote; while others are counting on you NOT to vote.
How will you make your vote count?
VOTE BABY VOTE!!!
Two Congregations: Two Acts Of Senseless Violence
Pastor Eric Manning of Emmanuel AME Church embraces Rabbai Jeffrey Myers of Tree Of Life Synagogue.
These two leaders now share a tragic bond; both having lost members of their congregations to senseless hate crimes. In 2015, Dylan Roof murdered 9 members of Emmanuel AME Church in Charleston, SC. On October 27, 2018, eleven members of Tree Of Life Congregation in Pittsburgh, PA.
In the words of Dr. Martin Luther King, Jr, "Now is the time to make justice a reality for all God's children."
2018 Black Mail Black History Quiz!
Check out our 2018 Black History Quiz!! If you would like a pdf copy. Please email us. Let us know what you think about the quiz! We encourage you to first take the quiz without going on line to look up answers. We have intentionally tried to focus on lesser known black history facts to increase opportunities for learning!
Quiz has 20 questions……20 opportunities to expand your black history knowledge base! We strive for accuracy! If you have any concerns about the quiz, please let us know. Click the link below or copy and paste into your browser to take the online quiz.
http://www.quizbean.com/r/5aa864502c4df
blackmailsd4u@gmail.com
1st African American Labor Union – Colored National Labor Union
Isaac Myers
In 1866, Isaac Myers (1835-1891) formed the Colored Caulkers Trade Union Society. The union was created when Myers and a group of African American ship caulkers was fired from their jobs when white workers protested their employment. Myers and other union members pooled their resources and issued stock to raise money to purchase their own shipyard and railway, the Chesapeake Marine Railway and Dry Dock Company. The company would eventually employ 300 black employees and be awarded several government contracts. It would also employ some white workers as well.
In 1869 Isaac Myers and organized the Colored National Labor Union with 214 members after their attempts to merge with a white labor union were rejected because black workers refused to change their political party affiliation. The CNLU was active in 21 states. Myers was the first president of the CNLU. The CNLU petitioned Congress to subdivide public lands and give portions of land to African Americans. Their petition was unsuccessful. Abolitionist and Civil Rights leader, Frederick Douglass was elected president of the CNLU in 1872. Though seeking better pay and working conditions for their membership, the CNLU issued a written statement against the hiring and immigration of Chinese workers feeling that Chinese laborers would threaten their employment opportunities. Anti-Chinese sentiment would continue to be codified by the U.S. government with further discriminatory legislation being enacted through the Anti-Coolie Act of 1862, and the Chinese Exclusion Act of 1882.
https://www.dailykos.com/stories/2016/05/01/1520548/-Anti-Capitalist-Meetup-May-1-2017-mass-intersectional-direct-action-after-the-1st-100-days
http://www.blackpast.org/aah/myers-isaac-1835-1891
http://www.worldheritage.org/articles/Colored_National_Labor_Union
http://www.encyclopedia.com/history/dictionaries-thesauruses-pictures-and-press-releases/colored-national-labor-union
Police Dogs and Anti-Black Violence – AAIHS
The use of violence as a tool to oppress and subjugate people of color is well documented. Many have seen images of African American protestors during the Civil Rights movement being viciously attacked by dogs. This was not a phenomenon only common to the American Civil Rights Movement. The use of dogs to inflict violence upon people of color is well documented both in the U.S. and abroad. Dogs were often used to inflict punishment on enslaved persons. They were also used to track enslaved persons who ran away. The use of dogs was not ask haphazard. Dogs were specially bred for this purpose.
In an article published by the African American Intellectual Society (AAHIS), Tyler Parry, associate professor at the California State University, Fullerton, candidly shares this troubling and violent history.
Some of our readers may recall the viral video of an African-American man being mauled by a police dog in Florida in July 2017. This incident is also highlighted in the article as well. Click below to view the video. Note the images in the video are disturbing:
Click on the link below to view the article.
http://www.aaihs.org/police-dogs-and-anti-black-violence/
Source: http://www.aaihs.org
54th Anniversary of "I Have A Dream Speech"
Photo Credit: Library of Congress
August 28, 2017 marks the 54th anniversary of the historic "I Have A Dream Speech" given by Dr. Martin Luther King, Jr, in Washington, DC during the March on Washington. More than 200,000 flooded the capital for the historic speech. Below are some little known facts about the March that you may not know.
The March on Washington along with the speech given by Dr. King was said to pressure President Kennedy to approve federal civil rights legislation in Congress.
Dr. King was not the "originator" of the "I have a dream" language contained in his speech. It is likely that this language was first used by then 22 year old Prathia Hall after the burning of the Mount Olive Baptist Church in 1962. King had preached at a church service following the bombing. Prathia Hall prayed during the service. During her prayer she shared the "I have a dream" language. Check out our previous Black Mail post for more information on Prathia Hall. https://wordpress.com/post/blackmail4u.com/169
Originally, the speech was entitled, "Normalcy – Never Again" and did not contain any "I have a dream" wording. Dr. King was encouraged by gospel singer Mahalia Jackson who whispered to him during the speech, "Tell 'em about the dream Martin. Tell em' about the dream."
Dr. King was the last speaker of the day. Many of the march participants, had already left to return to their homes and missed the historic speech.
William Sullivan, head of the FBI's domestic intelligence division wrote a memo after the speech labeling Dr. King "as the most dangerous Negro of the future in this nation from the standpoint of communism, the Negro, and national security."
King's speech, initially did not get much attention in the media. The march itself received most of the media attention. By the time of King's death in 1968, the speech, had been largely forgotten.
Dr. King first shared, "I have a dream" during a speech in Detroit two months before the March on Washington. Several of his staffers actually tried to discourage him from using the language again.
Check out a video excerpt of the speech:
Blackmail4u.com
https://www.youtube.com/watch?v=I47Y6VHc3Ms&feature=yout
http://nymag.com/daily/intelligencer/2013/08/i-have-a-dream-speech-facts-trivia.html
http://www.cnn.com/2013/08/28/us/mlk-i-have-a-dream-9-things/index.html
The Harriet Tubman Travel Agency: Specializing In "Underground Excursions"
Ben Carson's, ill-fated reference this week, of enslaved Africans as being immigrants received major shade on social media. (Click here to view our blog post on the incident)
Amid the social media black lash, a quote from @justlikecandi_1 received thousands of likes and retweets. It is the prefect combination of humor truth, and sarcasm.
Nancy Wilson: Iconic Songstress Turns 80
Nancy Wilson (1927 – ), legendary vocalist with an iconic sound! Born in Chillicothe, OH, she began singing at age 4 sand hasn't stopped! On February 20, 2017, she celebrated her 80th birthday! Check out this short video celebrating her life and legacy!
It Ain't Over…… Celebrate & Elevate Black History Everyday!
Surely our need to educate, inform, and inspire cannot be confined to one month out of the year?
Embracing Black History, past, present, and future is a "life-long" pursuit, not a "month-long" pit stop.
Enid Gaddis, Blackmail4u.com ©2017


text:
import json
import pickle
from unittest import TestCase
from io import StringIO as StreamIO

import ccy
from ccy import (currencydb, countryccy, set_new_country, CountryError,
                 ccypair, currency, currency_pair)
from ccy.core.country import eurozone

class CcyTest(TestCase):

    def testdefaultcountry(self):
        ccys = currencydb()
        for ccy in ccys.values():
            if ccy.code != 'XBT':
                self.assertEqual(ccy.code[:2], ccy.default_country)

    def testiso(self):
        ccys = currencydb()
        iso = {}
        for ccy in ccys.values():
            self.assertFalse(ccy.isonumber in iso)
            iso[ccy.isonumber] = ccy

    def test2letters(self):
        ccys = currencydb()
        twol = {}
        for ccy in ccys.values():
            self.assertFalse(ccy.twoletterscode in twol)
            twol[ccy.twoletterscode] = ccy

    def testNewCountry(self):
        self.assertRaises(CountryError, set_new_country,
                          'EU', 'EUR', 'Eurozone')

    def test_eurozone(self):
        self.assertEqual(len(eurozone), 18)
        for c in eurozone:
            self.assertEqual(countryccy(c), 'EUR')

    def testCountryCcy(self):
        self.assertEqual('AUD', countryccy('au'))
        self.assertEqual('EUR', countryccy('eu'))

    def test_ccy_pair(self):
        p = ccypair('usdchf')
        self.assertEqual(str(p), 'USDCHF')
        p = p.over()
        self.assertEqual(str(p), 'CHFUSD')
        p = ccypair('EURUSD')
        self.assertEqual(p, p.over())

    def test_pickle(self):
        c = currency('eur')
        cd = pickle.dumps(c)
        c2 = pickle.loads(cd)
        self.assertEqual(c, c2)
        self.assertNotEqual(c, 'EUR')

    def test_json(self):
        c = currency('eur')
        info = c.info()
        s = json.dumps(info)

    def test_swap(self):
        c1 = currency('eur')
        c2 = currency('chf')
        inv, a1, a2 = c1.swap(c2)
        self.assertFalse(inv)
        self.assertEqual(c1, a1)
        self.assertEqual(c2, a2)
        inv, a1, a2 = c2.swap(c1)
        self.assertTrue(inv)
        self.assertEqual(c1, a1)
        self.assertEqual(c2, a2)

    def test_as_cross(self):
        c1 = currency('eur')
        c2 = currency('chf')
        self.assertEqual(c1.as_cross(), 'EURUSD')
        self.assertEqual(c2.as_cross(), 'USDCHF')
        self.assertEqual(c1.as_cross('/'), 'EUR/USD')
        self.assertEqual(c2.as_cross('/'), 'USD/CHF')

    def test_print(self):
        stream = StreamIO()
        c2 = currency('chf')
        c2.printinfo(stream)
        value = stream.getvalue()
        self.assertTrue(value)

    def test_dump_currency_table(self):
        db = currencydb()
        table = list(ccy.dump_currency_table())
        self.assertEqual(len(table), len(db)+1)

    def test_description(self):
        c = currency('eur')
        self.assertEqual(c.description(), 'EUR / USD Spot Exchange Rate')
        c = currency('chf')
        self.assertEqual(c.description(), 'USD / CHF Spot Exchange Rate')
        c = currency('usd')
        self.assertEqual(c.description(), 'Dollar')

    def test_spot_price(self):
        c1 = currency('eur')
        c2 = currency('gbp')
        self.assertAlmostEqual(c1.spot(c2, 1.3, 1.6), 1.3/1.6)
        self.assertAlmostEqual(c2.spot(c1, 1.6, 1.3), 1.3/1.6)

    def test_currency_pair(self):
        p = currency_pair('eurgbp')
        self.assertEqual(p.ccy1.code, 'EUR')
        self.assertEqual(p.ccy2.code, 'GBP')
        self.assertEqual(p.mkt(), p)
        p = currency_pair('gbpeur')
        self.assertNotEqual(p.mkt(), p)

redpajama_set_name: RedPajamaGithub


text:
Q: Combine duplicate rows in Pandas I got a dataframe where some rows contains almost duplicate values. I'd like to combine these rows as much as possible to reduce the row numbers. Let's say I got following dataframe:

One
Two
Three

A
B
C

B
B
B

C
A
B

In this example I'd like the output to be:

One
Two
Three

ABC
AB
CB

The real dataframe got thousands of rows with eight columns.
The csv from a dataframe-sample:
Column_1,Column_2,Column_3,Column_4,Column_5,Column_6,Column_7,Column_8
A,A,A,A,A,A,A,A
A,A,A,A,A,A,A,B
A,A,A,A,A,A,A,C
A,A,A,A,A,A,B,A
A,A,A,A,A,A,B,B
A,A,A,A,A,A,B,C
A,A,A,A,A,A,C,A
A,A,A,A,A,A,C,B
A,A,A,A,A,A,C,C
C,C,C,C,C,C,A,A
C,C,C,C,C,C,A,B
C,C,C,C,C,C,A,C
C,C,C,C,C,C,B,A
C,C,C,C,C,C,B,B
C,C,C,C,C,C,B,C
C,C,C,C,C,C,C,A
C,C,C,C,C,C,C,B
C,C,C,C,C,C,C,C

To easier show how desired outcome woud look like:
Column_1,Column_2,Column_3,Column_4,Column_5,Column_6,Column_7,Column_8
AC,AC,AC,AC,AC,AC,ABC,ABC

I've tried some code but I end up in real long code snippets which I doubt could be the best and most natural solution. Any suggestions?

A: You can use something like this:
df = df.groupby(['Two'])['One','Three'].apply(''.join).reset_index()

If you can provide a small bit of code that creates the first df it'd be easier to try out solutions.
Also this other post may help: pandas - Merge nearly duplicate rows based on column value
EDIT:
Does this get you the output you're looking for?
joined_df = df.apply(''.join, axis=0)

variation of this: Concatenate all columns in a pandas dataframe

A: If your data are all characters you can end up with this solution and collapse everything to one single row:
import pandas as pd

data = pd.read_csv("path/to/data")
collapsed = data.astype(str).sum().applymap(lambda x: ''.join(set(x)))

Check this answer on how to get unique characters in a string.

redpajama_set_name: RedPajamaStackExchange


Independent thinking is the desire of a person to convince oneself that the information being presented is true or reasonable. This differs from critical thinking, which is the process used to collect and process information to arrive at a logical conclusion. In other words, independent thinking has more to do with the desire to think for oneself and critical thinking is the process used to deal with information.


F Fabrizi, P Martin, S Bunnapradist, et al Lamivudine in the treatment of HBV-related liver disease after renal transplantation: An update [J].International Journal of Artificial Organs, 2005, 28(3):211-221.
 Y Tan, K Ding,J Su,et al. The Naturally Occurring YMDD Mutation among Patients Chronically Infected HBV and Untreated with Lamivudine: A Systematic Review and Meta-Analysis [J]. Plos One, 2012,7(3).
 DJ Tenney. Genotypic determinants and phenotypic properties of antiviral-resistant HBV variants: insight from entecavir resistance studies [J].Antiviral Therapy, 2010, 15(3):529-535.
 A Alexopoulou,GV Papatheodoridis. Entecavir treatment in HBV-related decompensated cirrhosis[J]. Future Virology,2011, 6(11):1275-1281.
 X Sun, P Zhao, J Tai, et al DOWNREGULATION OF NK CELL PHENOTYPE AND FUNCTION IN HBV PATIENTS TREATED WITH ENTECAVIR[J]. Journal of Hepatology,2012, 56:S184-S185.
 XJ Zhuo. A dynamic mode! of entecavir therapy and after therapy for HBV Infection[J]. International Journal of Infectious Diseases, 2011,15:S73-S73.
 RJ Fontana. Entecavir in decompensated HBV cirrhosis: The future is looking brighter[J]. Journal of Hepatology,2010, 52(2):147-149.


text:
Girls' Generation's Taeyeon reveals the track list for 'I'
Unknown 3:30:00 PM Girls' generation, I, taeyeon Comments
The tracklist for Taeyeon's 1st solo mini album has been revealed.
The album is the work of composer team LDN Noise, Joombas, MonoTree and also the featuring of hip hop artist Verbal Jint for the title track 'I', in which Taeyeon participated in the lyrics writing for the first time since debut.
The album will consist of 6 songs including title track 'I', 'U R', 'Gemini', 'Stress', 'Tell Me First' and the instrumental version of 'I'. 'U R' are said to be a ballad with acoustic piano and string sounds. 'Gemini' will be an R&B genre telling the story of a heartbreaking farewell of two lovers.
'Stress' will be a fun pop song which is about the sophisticated feeling between lovers in relationship, while 'Tell Me First' will be another ballad track about the pain and hesiation before breaking up.
'I' will be released on October 8th. Meanwhile, Taeyeon's special V Live 'I-Contact' will be aired through Naver V App today at 11PM KST.


Where to find the special twinkling cross transfers? CSTOWN is always the right place. We offer superb Cross with Wing Hot-fix Rhinestone Pattern to you here. It is 4.9 X 2.8 and comprises Crystal, Ruby. Made up of Rhinestone, this design will make you stand out in the crowds.


text:
Australian Women's History Network
AWHN
AWHN Rules
Sexual and gender-based abuse and discrimination in academia in Australia: Survey
Past Symposia and Conferences
Lilith: A Feminist History Journal
Lilith Symposium
Mary Bennett Prize
← What I wish I'd known: Trying to find a job
'Relaxed and pleasant': women undergoing leucotomy in Western Australia, 1947-1970 →
Hearing women as mad in the asylum: past perceptions haunting the present
by Managing Editor Posted on March 28, 2018
Dolly MacKinnon explores auditory constructions of female madness in the start of our series on the history of women and mental health.
From the claim a woman sounds 'hysterical' to having their opinions met with the colloquialism 'mad cow', women are frequently heard as mad. Men are heard as mad too, but they are not called 'mad bulls' or 'hysterical men'. All too readily, and seemingly uncritically, women are linked with madness in everyday culture.
Hysterical comes from the word hysteria, meaning 'of the womb', deriving first from classical Greek and then Latin. The nineteenth and early twentieth centuries were the heyday of hysteria: one in which this old-fashioned medicalised term for madness could be coupled with a new, cutting-edge surgical cure in the form of a hysterectomy that removed a woman's uterus. The historical belief that a woman's physical body—her womb—could cause madness was still prevalent. Hysteria only ceased to be part of the medical lexicon in the 1950s.
Yet historical medical and cultural beliefs, some spanning thousands of years, still underpin the conscious and unconscious cultural uses of these terms today. Women are still being heard as transgressing institutional power structures, and being labelled as mad as a result. Why are women so readily heard as mad today, and in the past? In the asylum, how and why did medical men interpret what they thought they heard as mad? Historical analysis of the practices of hearing women's madness in the asylum reveals much about why these antiquated perceptions linger into our present.
The physical presence of the asylum is long gone from the twenty-first-century landscape, with former buildings surviving only as repurposed exclusive, gated residential communities, or university campuses. Yet the horrors the word evokes still haunts the present. The word asylum originally meant a retreat from the world, and yet by the early nineteenth century that word was also equated with the horrors of incarceration, and the social stigma carried by women, men and children kept there.
To be inside an asylum was to be outside of cultural norms. In Britain, America, Canada, Europe, South Africa, India and Australasia, those experiencing mental illness were incarcerated in purpose-built asylums, later called hospitals. They comprised symmetrical architectural structures with wards for women on one side, and for men on the other. The sexes only mixed officially under strict medical supervision. Permanent gender segregation finally ceased in the 1960s.
Bedlam Hospital at Moorfields in London, 1730. Image is author's copy.
The daily asylum regime was divided into regulated gendered activities for those able to participate: work (domestic for women, or gardening, agricultural or industrial for men); segregated religious services; and sports, concerts or dancing, that might be mixed. Margaret Isabel Wilson, institutionalised in America during the 1930s, in her published memoir described these regulated sounds: '[t]here were bells, bells, bells; [and] orders, orders, orders' governing every aspect of life. These institutions were intended to re-instil morality, gender roles, and order, where possible.
At all times, patients' behaviours were listened to, heard and interpreted by the medical staff, as well as any official visitors to these institutions. At the Ipswich Asylum, Queensland, Australia, in 1930, when several patients petitioned both the Queensland Times' journalist and members of the official party visiting the institution, about their 'fancied grievances', the Home Secretary 'listened attentively to what some men had to say about the conditions at the hospital'. But 'invariably, however an odd word here and there, or the general trend of the complaint served to show … that the grumblings were all born of deranged minds.' To authorities they sounded mad. Many patients knew the power of the way their words were heard by medical staff. American Lydia A. Smith, in her 1898 memoir concluded: 'Yes, all you could say and all you could do would only be some symptom of the fatal disease'.
The Hospital of Bethlem [Bedlam], St. George's Fields, Lambeth: The Female Workroom. Wood engraving probably by F. Vizetelly after F. Palmer, 1860. Image via Wellcome Collection.
This 'medicalised hearing' was also replete with conscious and unconscious biases centred on masculine assumptions of gender, class, religion and race. Women were considered biologically susceptible to madness because of medical beliefs about their physical inferiority to men, and the influence their wombs were thought to have on their mental state.
These perceptions worked in tandem with gendered Christian creation beliefs: Eve was formed from Adam's rib; Eve listened to the snake in the Garden of Eden and ate the apple; Eve then tempted Adam to eat the apple from the Tree of Knowledge, which he did; and as a result God threw Adam and Eve out of Paradise. Eve suffered the consequences of her sin, as she was to suffer the pain of childbirth for eternity. These medical perceptions bound up with biblical understanding of women, as either whores or virgins, governed women's medicalised experiences within the asylum, and the ways they were heard.
Madness was considered audible to medical experts, and governed by the law. By listening closely to the speech quantity and quality it was thought possible to determine whether someone's conversation complied with or violated particular patriarchal norms. The medical account of Olga L., in the Adelaide Receiving House in 1952, demonstrates this practice. Olga's medical certificate at admission provided a censored and sanitised version of the slander the doctor said she heard: 'She complains that voices over the air call her filthy names and accuse her of shop-lifting clothes from Myers'. The reference to shoplifting also implied a breach of the law.
'The serpent entwines itself around the body of Eve.' Walter Crane, 1899. Image via Wikimedia Commons.
But detailed doctor's notes also survive revealing another account of what Olga sounded like: '[J]ust look at that fat bitch, the fucking bastard! She set fire to her house. She stole clothes'. Olga's language is heard as bad, and recorded in two different ways. As historian Greg Denning, in another context concluded, it was not so much the violence of the delivery of bad language that set it apart, but rather those hearing it being unable to position it within the discourse of certain power relationships. Asylum records, like that for Leila K. in 1917, demonstrate this transgressive dichotomy between compliance and deviance: she wrote letters that were 'coherent + fairly sensible', yet her 'language [was] very foul at times'.
Asylum women spoke, but their voices were heard as mad by gendered medical ears, that acted to normalise masculine understandings of power, gender roles, and the distinctions between reason and madness. The provision of hyper-gendered asylums whispered and shouted patriarchal perceptions of order and submission into the ears of mad women. But as Adeline T P Lunt, in her published memoir (1871) candidly observed: 'the very same opinions that might be expressed [by patients] in any polite society[,] I the world, measured by narrow judgement, — and in fact they [asylum staff] are always alert to catch a ray of disease, — are again (in the asylum) openly denounced as "crazy talk"'.
Charting these flawed perceptions, over time, enables us to hear the genesis of deep-seated and deeply held understandings of madness as gendered. Given this history, we need to actively call out and debunk out-dated historical thinking when we hear it coming from the voices of men and women in the institutions of the parliament, the academy, the law, the medical fraternity, and the press today.
Dolly MacKinnon is an Associate Professor at The University of Queensland. Her research background engages with history and music. Her cultural history research spans the early modern to the modern and concentrates on hearing the histories of the marginalized and institutionalized by analysing the mental, physical (including material culture) and auditory landscapes of past cultures.
For her groundbreaking work on hearing madness and sounding cures, first published in 2003 and republished in 2017, see 'Hearing madness and sounding cures: recovering historical soundscapes of the asylum', Politiques de communication 2017/3: 77-106.
Copyright remains with individual authors who grant VIDA holding a perpetual, world-wide, royalty free and non-exclusive license to use, distribute, reproduce and promote content. For permission to re-publish any VIDA blog post, in whole or in part, please contact the managing editors at auswhn@gmail.com.au
This entry was posted in Mental Health. Bookmark the permalink.


44) Find great deals on of a starlord outfit of people. It's great to know that Saturday at 4pm for Adults the makeup done by real. Brand new captain America catsuit, Sale at our Store.
) costumes that get you. DHgate helps you get high from the usual teens to custom cosplay outfits through the. Our latest range also includes yours at the drop of as specific characters, showing all a family friendly event, starlord outfit. First you have to choose - pokemon … 22082011 · Pokémon Sale Fancy Dress Costumes and as the adventurous girl who the psychotic dolls with Barf's of time starlord outfit a result Shop - 3.


text:
from sqlalchemy import Column
from sqlalchemy import Integer
from sqlalchemy import String
from sqlalchemy import ForeignKey
from sqlalchemy import Boolean
from sqlalchemy.ext.declarative import declarative_base

Base = declarative_base()

class Flag(Base):
    __tablename__ = 'flags'

    flagid = Column(Integer, primary_key=True)
    raw = Column(String(255), nullable=False)
    userid = Column('userid', Integer, ForeignKey('users.userid'), nullable=False)
    path = Column(String(255), nullable=False)
    created = Column(String(10), nullable=False)
    md5sum = Column(String(32))
    longflag = Column(Boolean)
    audio = Column(Boolean)

class User(Base):
    __tablename__ = 'users'

    userid = Column(Integer, primary_key=True)
    username = Column(String(255), nullable=False)

if __name__ == '__main__':
    from sqlalchemy import create_engine
    from settings import DB_URI
    engine = create_engine(DB_URI)
    Base.metadata.drop_all(engine)
    Base.metadata.create_all(engine)


A smashing debut from Scottish observer, pundit, commentator, rapper & social-activist Darren McGarvey (also known as Loki). His sphere? Let's contract it to poverty-class-community, in which ever order you so desire. Growing up in Pollok, in south Glasgow with a whole heap of hard-knocks, Darren's authority & experience outstands pretty much everybody in the spectrum at an elevated level (I can only really think of Stafford Scott, who actually doesn't have as much access to established platforms).


text:
Crackdown on Underworld Forces
Plea Leniency System
[ 2019/07/17 ] Guiding Opinion on Accelerating the Advancement of the Establishment of the Social Credit System with New Forms of Credit-based Regulatory Mechanisms Administrative/Regulatory
[ 2019/07/02 ] P.R.C. Community Corrections Law (Draft) Criminal
[ 2019/06/25 ] Information Security Techniques - Personal Information Security Specifications (6/26/19) Draft for Solicitation of Comments Internet
[ 2019/06/25 ] CAAC Provisions on Credit Management of Personnel Directly Responsible for Conduct Seriously Endangering Safety of Civil Aviation (Provisional) 【Draft for solicitation of comments】 Administrative/Regulatory
[ 2019/06/19 ] Provisions on the Management of Network Security Vulnerabilities (Draft for Solicitation of Comments) Internet
National Mental Health Work Plan (2015-2020)
2015/06/19 China Law Translate Disability, MOH, Policy Papers 0
ALL TRANSLATIONS ON THIS SITE ARE UNOFFICIAL AND ARE PROVIDED FOR REFERENCE PURPOSES ONLY. THESE TRANSLATIONS ARE CREATED AND CONTINUOUSLY UPDATED BY USERS --THEY ARE FREE TO VIEW, BUT PROPER ATTRIBUTION IS REQUIRED FOR DISTRIBUTION OF THESE OR DERIVATIVE TRANSLATIONS.
Source: http://www.gov.cn/zhengce/content/2015-06/18/content_9860.htm
General Office of the State Council Notice Regarding Distribution of the National Mental Health Work Plan (2015-2020) from the Health and Family Planning Commission and other Departments.
State Council General Office Issuance [2015] No. 44
To all levels of people's government, and to all ministries and commissions directly under the State Council:
The "National Mental Health Work Plan (2015-2020)" from the Health and Family Planning Commission, Central Comprehensive Management Office, Development and Reform Committee, Ministry of Education, Ministry of Public Security, Ministry of Civil Affairs, Ministry of Justice, Department of Human Resources and Social Security, and China Disabled Persons' Federation, has received the consent of the State Council and is heareby distributed to you; please incorporate actual practice and earnestly implement and enforce it..
General Office of the State Council
(for public release)
I. Plan Background
II. Overal Requirements
III. Strategies and Measures
(1) Comprehensively advance rescue and assistance for severe mental illness.
(2) Gradually develop prevention for commonly seen mental disorders.
(3) Actively carry out efforts to promote psychological well-being.
(4) Strive to raise the capacity of mental health services.
(5) Gradually improve the mental health information systems.
(6) Vigorously develop mental health publicity and education.
IV. Safeguard Measures
V. Monitoring and Evaluation
Health and Family Planning Commission, Central Comprehensive Management Office, Development and Reform Committee, Ministry of Education, Ministry of Public Security
Ministry of Civil Affairs, Ministry of Justice, Department of Human Resources and Social Security, China Disabled Persons' Federation
Mental health is a major public health issue and social issue that impacts social and economic development, Strengthening efforts on mental health is an important part of deepening reform of the medical health system and of maintaining and increasing the masses' physical and psychological health; it is a necessary requirement of comprehensively governing the nation in accordance with law, of innovative social governance, or promoting social harmony and stability; and has important significance for the establishment of a healthy China, A China with rule of law, and a peaceful China. This plan is formulated so as to deepen the implementation of the "Mental Health Law of the People's Republic of China" and the "Central Committee of the CPC and State Council Opinion on Deepening Medical and Health System Reform"; to strengthen prevention, treatment and rehabilitation efforts for mental disorders, and promote comprehensive development of mental health operations.
The Party and government place great emphasis on mental health work, and have successively adopted a series of measures to promote the development of mental health areas. Especially during the period of the "12th Five-year Plan", mental health work is an important initiative for safeguarding and improving people's livelihood as well as strengthening and innovating in social management, and has been entered into the overall economic ans social development. With the attention and support of the Party center and the State Council, relevant departments strengthen cooperation and, roatating around the implementation of the "People's Republic of China Mental Hygiene Law", organize and carry out the mental health prevention systems establishment and development plan, arranging capital to enlarge mental health professional establishments, improve the capacity for persons with mental disorders seeking treatment, and support all areas in developing management services for persons with severe mental disorders though basic level public health service projects and major public health special projects; including severe mental disorders within the scope of urban and rural resident's major illness insurance and serious disease insurance as well as the urban and rural medical treatment assistance systems; follow laws and regulations to carry out compulsory treatment of mentally ill persons not bearing criminal responsibility; actively develop rescue and assistance for persons with mental disorders who have served in the military, are vagrant beggars, or are "persons with the 3 lackings (lacking ability to labor, lacking source of income, and lacking a legally designated person with a duty of support, care or maintenance, or or where the persons with such duties have not ability to provide support, care, or maintenance), All localities earnestly implement the Party Central Committee and the State Council's deployment requirements, carry out the the government's responsibility, perfect the safeguard mechanism, strengthen working measures, deepen the development of management and treatment of severe mental disorders, obtain significant results, gradually establish a coordinated system among the leadership and mental health departments at all levels of the government, and form a basic national mental health prevention system and service website. By the end of 2014, the nation already registered 4.3 million people with severe mental disorders, 73.2% of these patients received follow-up management and rehabilitation guidance services provided by primary health care institutions .
With rapid economic and social development, the conspicuous acceleration of the pace of living, and the ever growing factors of psychological stress, anxiety, depression and other commonly seen mental disorders and psychological behavioral problems have increased each year; incidents brought on by psychological stress and cases (incidents) of persons with mental disorders causing trouble occasionally occur; intervention for dementia in the elderly, autism in youth and illness in other special populations must be increased; mental health efforts in our nation continue to face serious challenges.
At present, our country's mental health services resource are truly insufficient and unevenly distributed, there are 1650 specialized mental health establishments, 228,000 psychiatric beds and over 20,000 psychiatrists for the entire nation, distributed mainly at the provincial and municipal levels, a community rehabilitation system for mental disorders has not yet been established. Discovery, follow-up and management of people with severe mental disorders in some areas is still inadequate, guardianship responsibility is difficult to implement, some impoverished sufferers do not have access to effective treatment, and it is difficult for persons subject to a compulsory treatment decision whose conduct causes troubles to receive treatment. The public rates of awareness of commonly seen mental disorders such as anxiety and depression are low, societal prejudice and discrimination widely exist, concealing the illness is common, and scientific diagnosis and treatment is rare. On the whole, our country's current capacity and level of mental health services cannot satisfy the masses health needs and the needs of national economic development and social management. The World Health Organization's "Comprehensive mental health action plan 2013–2020" points out that psychological and behavioral problems continue to increase throughout the world, and should elicit the utmost attention of all Governments.
(1) Guiding Ideology. With Deng Xiaoping Theory, the important thought of Three Represents and the Scientific Outlook on Development as guides, and deeply implementing the spirit of the 18th Party Congress's 2nd, 3rd, and 4th Plenary Sessions, Earnestly implement the "Mental Health Law of the People's Republic of China in accordance with the deployment requirements of the Party Central Committee and the State Council, to make overall plans for all resources, improve work mechanisms, strive to raise the capacity and level of services, complete systems for treatment and aid for patients, safeguard the lawful rights and interests of patients, and maintain the physical and psychological health of the masses, promoting the comprehensive development of the mental health field.
(2) Overall Goals. By 2020, widespread formation of mechanisms for the comprehensive management of mental health services with government organizations' leadership, each department's concerted management, social organizations' extensive participation, and households and workplaces taking responsibility to the extent possible. Complete and improve systems for mental health prevention, treatment and rehabilitation services. essentially satisfying the masses' needs for mental health services. Complete safeguard systems for emergency care and assistance for persons with mental disorders, conspicuously reducing the occurence of major cases (incidents) of patients causing trouble. Actively construct a social atmosphere of understanding, acceptance, and loving concern for persons with mental disorders, elevating the entire society's recognition of the importance of mental mental health, promoting the psychological well-being of the masses, and promoting the development of social harmony.
(3) Specific Goals.
By 2020:
1. Further improve mechanisms for the comprehensive management and coordination of mental health. Widely establish mechanisms for government leadership and departmental coordination for mental health work at the provincial, municipal and county levels. Establish comprehensive management small groups for mental health work in which units such as for health and family planning, public security, civil affairs, judicial administration, disability federations, and seniors participate in 70% of townships (streets).
2. Essentially complete establishment of mental health services systems and networks. Perfect specialized mental health establishments at the provincial, municipal and county levels; and counties (municipalities or regions) with large service populations that are not covered by prefecture level establishments may establish specialized mental health establishments as work required, and other counties (municipalities or regions) shall at least establish a psychiatry department within a comprehensive hospital that has capacity. Actively explore using government procurement of services models to encourage social forces to participate in relevant work.
3. Preliminary relief for the shortage of specialized mental health personnel. Increase the number of physicians (assistants) practicing psychiatry to 40,000. The number of physicians (assistants) practicing psychiatry is not less than 3.8 per 100,000 people in eastern localities ,and 2.8 in central and western localities. Appointment of full-time or part-time mental health prevention staff at basic level medical establishments is widespread. Sufficient psychological therapists and social workers to meet needs, and social organizations and volunteers broadly participate in mental health work.
4. Rescue and management tasks for severe mental disorders are effectively implemented. Have a grasp on the number of persons with serious mental disorders, with the registration and management rate for persons with severe mental disorders reaching 80%, and treatment rates for schizophrenia reaching 80%, all indigent persons with severe mental disorders are brought into medical assistance, cases (incidents) of patients causing trouble, particularly cases where a life is taken, are reduced, and patients whose conduct causes trouble will promptly and lawfully receive compulsory or residential treatment.
5. Conspicuous increase in prevention of commonly seen mental disorders and psychological behavior problems. Widespread increase in public awareness of commonly seen mental disorders such as depression and active seeking of medical care, a conspicuous increase in medical establishments ability to recognize depression, a 50% increase in treatment rates for depression over existing foundation. All areas widely develope treatment for commonly seen mental disorders such as depression; every province (region or municipality) open at least one psychological rescue hotline, and 100% of provinces (regions or municipalities) and 70% of municipalities (areas, prefectures or allied areas) establish psychological crisis intervention teams; when emergency situations occur, they will promptly respond as needed, and scientifically develop psychological relief efforts.
6. Begin to form models for rehabilitation work for mental disorders. Explore the establishment of a societal rehabilitation services system for mental illnesses in which specialized mental health establishments, social rehabilitation organizations and families provide mutual support. More than 70% of counties (municipalities or regions) have established social rehabilitation organizations for mental disorders or use means such as government procurement of services to retain social organizations to develop rehabilitation efforts. More than 50% of patients living at home receive social rehabilitation services in counties (municipalities or regions) that have initiated social rehabilitation for mental disorders.
7. A conspicuous improvement in the social atmosphere for mental health work. Widespread development of mental health publicity and psychological healthcare protections by hospitals, schools, communities, enterprises and public institutions, and supervision sites. The awareness rates of ordinary people in cities and villages regarding knowledge on psychological well-being reach 70% and 50% respectively. Widespread establishment of psychological consultation and psychological crisis intervention centers (rooms) staffed by full-time instructors in institutions for higher education; elementary and high schools establish psychological counseling rooms and appoint full time or part-time teachers; psychological well-being awareness rates among enrolled students reaches 80%.
Strengthen registration and reporting on patients. All levels of units such as for health and family planing, comprehensive care, public security, civil affairs, judicial administration, and disabled-persons federations should strengthen coordination, and use all directions and multiple channels to initiate routine registration and onset reports on severe mental disorders. Village (resident) committees should actively discover persons suspected of having mental disorders in their jurisdiction, and may respond to their families requests for assistance in seeking medical help. Medical establishments with qualifications to diagnose mental disorders should put in place systems for onset reports and management of severe mental disorders, and report confirmed diagnosis of severe mental disorders in accordance with requirements. Basic level medical health establishments discovering persons with severe mental illness in their jurisdiction should promptly register them, and enter it into the national severe mental illness information management system.
Do a good job of patient services administration. Each area should follow the requirements of "treatment for all who should be treated, management for all who should be managed, and admission of all who should be admitted", actively advancing a service model in which "serious illness is treated in hospitals, and rehabilitation is managed in society; basic level medical health establishments should promptly refer patients in an acute phase or with unstable symptoms to a specialized mental health establishment to conduct standardized treatment, and after symptoms have stabilized return them to a village (community) to receive basic pharmaceutical maintenance treatment. Each level of comprehensive care organization shall coordinate with relevant departments at the same level to promote the establishment of township (street) comprehensive mental health administration small groups and to mobilize community organizations and patients' families to participate in management of patients living at home. Basic level medical health establishments should follow the Mental Health Law and the national basic public health services standards to establish a health archive on severe mental illness, and provide services such as follow-up management, risk assessment, and guidance in taking medicine. Basic level medical personnel, police, civil affairs officers, comprehensive care cadres, grid members, special committee members from the disabled persons federation and other such persons should cooperate in in follow-up visitation for patients with stable symptoms, and rapidly respond to the emergence of emergency situations, and assist patients and their families in resolving difficulties with treatment or their lives. All levels of government and relevant departments should study establishing management mechanisms for admission and treatment of persons with mental disorders who cause trouble, to clear channels for admitting and treating persons with severe mental disorders who cause trouble or are dangerous, set up emergency medical response "green lanes" and clarify funding sources and other safeguard measures. Central finance continues to provide support to each region's efforts on the management and treatment of severe mental illness through the major public health special project.
Put policies on rescue and assistance in place. All regions should do a good job of institutional connections such as between basic health insurance, the urban and rural major illness insurance, medical assistance, and emergency rescue; to give play to their integrated effect, gradually raising the level of medical safeguards for persons with mental disorders. For indigent sufferers that meet the requirements, relevant provisions should be followed to support their participation in the basic medical insurance and give subsidies to those with difficulty bearing medical costs. For emergency aid costs of mentally ill persons whose identity cannot be ascertained and unpaid emergency aid costs of mentally ill persons whose identity is ascertained but who are unable to make payments, the relevant provisions should be followed to first have responsible parties and any insurance such as workers' compensation insurance or basic health insurance, as well as avenues such as the medical assistance fund and the traffic accident social assistance fund, make payments; and where there is no path described above or their payment has shortcomings, subsidies are made from the emergency illness assistance fund. For individuals referred to institutions outside of their service area due to the absence of specialized mental health facilities in their local area, the proportion of medical reimbursement should follow the reimbursement standard in their local community. To effectively provide social aid for individuals with mental illnesses living in poverty, the departments of Civil Affairs, Health and Family Planning, Human Resources and Social Security, and Finance should study how to adjust the social aid system so it matches the specific needs of diagnosing and treating individuals with mental illnesses. Where individuals are eligible to receive minimum subsistence supplements, Civil Affairs departments at all administrative levels should immediately enroll them in the Minimum Subsistence Security System; for individuals who are not eligible for minimum subsistence supplements but have substantial difficulties and for those who still struggle after receiving minimum subsistence supplements, measures such as providing Temporary Aid should be adopted to help them overcome their difficulties in maintaining their basic livelihood.
Improve rehabilitation services. All areas should gradually establish and complete community rehabilitation services systems for mental disorders, vigorously spreading a socially based, comprehensive and open model of rehabilitation work for individuals with mental disorders and disabilities, establishing and improving service mechanisms linking medical rehabilitation with community rehabilitation, strengthening the technical guidance that professional mental health establishments give community rehabilitation organizations. Research and formulate policy opinions that will accelerate the advancement of mental health rehabilitation services and improve service standards and management regulation for mental health rehabilitation. Strengthen rehabilitation service guarantees to individuals with mental disorders among special groups, such as veterans, the impoverished, persons with low incomes, and the institutionalized. As the country's capacity to provide social welfare services increases, gradually expand the scope of Basic Healthcare Insurance to cover qualified treatment-based rehabilitation services for mental illnesses. Build demonstration projects of community-based rehabilitation facilities for the mentally ill; promote the expansion of communitybased rehabilitation facilities; and use governmental purchases of services to encourage and guide the use of non-public resources to provide community-based rehabilitation services for the mentally ill and promote patients with mental illnesses' return to society.
All types of medical establishments at all levels should train health workers in knowledge and techniques related to mental disorders, and schools of higher learning should strengthen training in such knowledge and techniques for staff and student workers in their psychological counseling establishments; individuals seeking medical advice or help at these institutions who potentially have mental illnesses should be promptly provided with guidance on getting treatment or referral services. Specialized mental health facilities should establish consultation and referral systems, and guide other medical establishments in correctly recognizing and promptly referring individuals suspected of having mental disorders; and should provide scientific, rational and standardized diagnostic and treatment services based on the classification of mental disorders and clinical guidelines, to increase the efficacy of treatments. All regions should make common mental disorders such as depression, autism, and dementia the focus of their work plans, and pay close attention to the psycho-behavioral problems of women, children, seniors, and occupational groups, exploring prevention models appropriate for that regions' actual conditions, and regions with capacity are encouraged to provide follow-up services for those with depression. Give full play to the role of Chinese medicine (TCM), to strengthen the establishment of psychiatric clinical capacity in TCM treatment establishments, and encourage TCM professionals to carry out prevention and research of commonly seen mentally disorders.
All areas should lawfully include psychological aid in the emergency response plans of all levels of the government, organizing stratified emergency crisis intervention teams of currently available psychiatrists, psychotherapists, social workers and nurses, periodically carrying out trainings and drills, and promptly organizing psychological aid following the occurrence of emergency situations. Encourage and support social organizations to provide standardized information on psychological aid and lead their orderly participation in psychological aid in the aftermath of disasters. Cities with the capacity should rely on the 12320 hotline and specialized mental health establishments to establish psychological aid hotlines and internet platforms, and provide public interest psychological aid services to the public. Specialized mental health establishments shall have personnel for psychotherapy to provide professional mental health services to persons with mental disorders and high-risk groups. General hospitals and other specialized hospitals should provide guidance on psychological well-being to those seeking care, and basic level healthcare establishments should provide guidance on psychological well-being to residents in their jurisdictional areas. All types and level of school shall set up psychological well-being educational bodies and allot them full time staff, shall establish working mechanisms for educating students on psychological well-being, and shall formulate emergency response plans for campus emergencies. Institutions of higher education and specialized mental health establishments are to establish stable coordinating mechanisms for joint operations in psychological crisis intervention and set up demonstration centers for providing training on psychological well-being. Employers shall include information about psychological well-being in orientation and on-the-job training and create a working environment that is beneficial to employees' physical and psychological well-being. Prisons, detention centers, jails, compulsory drug rehabilitation centers, and other such institutions should strengthen the psychological counseling and consultation services for those in custody.
Strengthening institutional capacity-building. During the period of the 13th 5-year plan, relevant State departments emphasize supporting all areas in increasing high level mental health service capacity. All areas should fully use available resources, to vigorously strengthen the capacity and establishment of mental health profession establishments and community rehabilitation organizations for persons with mental disorders. All levels of department for health and family planning should commission mental health professional establishments at the same level to take on the duties of managing and guiding mental health techniques, and be responsible for medical care, prevention, medical rehabilitation, health education, information gathering, training and technical guidance. In areas that for the moment have no mental health professional establishments, the department for health and family planning should entrust the mental health professional establishment at the level above in a neighboring region to take on the take of technical guidance and designate the organization for disease control and prevention at the same level to be responsible for practice management. Encourage social capital to put together mental health professional establishments and community rehabilitation organizations, and use government procurement of services to put into play their role in mental health prevention and management efforts. In provinces (regions, municipalities) that have not yet established facilities for compulsory treatment of mental health, the local government shall designate at least one mental health professional establishment to perform compulsory treatment functions, and provide the necessary guarantees to ensure their normal operations.
Strengthen team construction. All areas should establish and improve professional teams for mental health, reasonably allocating psychiatrists, nurses, and psychotherapists; and exploring and gradually expanding work models to include rehabilitation therapists, social workers, and volunteers participation in mental health services. To ensure the implementation of prevention services, specialized mental health establishments at all levels should allot public health personnel in accordance with the region's population and the scale of mental health prevention and treatment obligations. Every basic level medical establishment should assign at least one full-time or part-time staff member to take on the taks of managing services for patients with severe mental disorders. Education departments should strengthen the cultivation of talent in areas related to mental health such as psychiatry, applied psychology, and social work; and encourage regions and institutions for higher education that have the capacity to provide an undergraduate major in psychiatry; and ensure classroom hours for psychiatry, medical psychology and other such courses in the medical curriculum. Health and Family Planning departments should strengthen and standardize training for inpatient psychiatric residents and psychiatric nurses; initiate re-specialization training programs for physicians who are currently working in psychiatry but are not psychiatric specialists; and develop induction training for licensed clinicians or general physicians in county level general hospitals and township level health centers (community health centers) to expand the scope of psychiatric health practice. Train TCM clinicians in the prevention and treatment of mental disorders, and encourage eligible basic-level mental health preventive care personnel to acquire psychiatric practice credentials. Policies are be made to encourage psychology professionals to practice psychotherapy in healthcare facilities, and the Health and Family Planning Department and the Human Resources and Social Security Department are to work together to finalize the evaluation measures for conferring the professional title of 'psychotherapist'. Policies related to state mental health workers' salary and benefits should be implemented to raise the level of compensation for these professionals and to stabilize the professional mental health workforce.
Relevant State departments place mental health with project on populace health security informatization project. Provincial health and family planning departments should co-ordinate the construction of mental health information systems in their region, and gradually connect them with residents' electronic health records, electronic medical histories and the total population database. Organizations with responsibility for mental health technology management and guidance tasks should do a good job of verifying and analyzing information on persons with severe mental illnesses, periodically forming a report to provide relevant departments with a basis for decision making. All areas shall gradually establish information sharing systems on persons with severe mental disorders between units such as health and family planning, comprehensive care, public security, ministry of civil affairs, human resources and social security, judicial administration, and disabled persons' federation, emphasizing and strengthening efforts to protect the secrecy of patient's personal information. A mental health monitoring network should be established in accordance with law, getting an essential grasp on the circumstance of persons with mental disorders and mental health work information; every 5 years, areas with capacity should conduct epidemiological studies on mental disorders.
All areas should put publicity and education in an important position in mental health work. Publicity departments should give full play to the function of traditional and new media to widely publicize core information about mental health, such as that mental illness is preventable and treatable, treatment should be sought early for psychological problems, concern and non-discrimination, and "physical and mental health are equally important; and to publicize classic examples of patients overcoming their illness and returning to society, to guiding the public to a correct understanding of mental disorders and psychological behavioral issues, and to correct treatment of persons with mental disorders. Reporting cases or incidents of persons causing disturbances should be standardized, and use of the term "mentally ill person' should be avoided in reports prior to evaluation, to reduce negative impact. Educational units , judicial administration units, the trade unions, the Communist Youth League, the Women's Federation, the the Elderly Association, and other entities should develop promotional strategies aimed at students, rural women, left-behind children, occupational groups, incarcerated persons, and the elderly, with targetted educational activities about psychological wellbeing. The Health and Family Planning Departments of all administrative levels should organize healthcare facilities' development of multifaceted mental health publicity activities to promoting public understanding of about mental health services, and increase the ability to self-regulate emotions.
(1) Strengthening government leadership. All areas should earnestly implement the People's Republic of China's Mental Hygiene Law, including mental health within the local overall plan for national economic and social development, drafting annual work plans and implementation plans. Establish and improve government leadership and departmental coordination mechanisms for mental health work. Fully bring into play the role of basic-level comprehensive service management platforms, overall planning, integration of resources and truly strengthening the establishment of the mental health service system in the region. Mental health work should be included as a key component of efforts to deepen reforms in the healthcare system, comprehensively considering the rescue and assistance of mentally ill individuals, the training of specialized staff, safeguards for the operations of professional institutions, and so forth; to promote the continuous, healthy, and stable development of the mental health sector.
(2) Putting departmental responsibility in place. All relevant departments should follow the requirements of the Mental Health Law of the People's Republic of China and related policies, to truly perform their responsibilities and form a collective workforce that ensures that the work is truly carried out. Comprehensive management organizations should exploit their advantages in comprehensive management to push the resolution of key, difficult problems in mental health work. All levels of comprehensive management organization should strengthen investigation and research, organizational coordination, and oversight inspections; placing efforts to rescue and assist persons with severe mental disorders in the assessment criteria for evaluating the comprehensive management of social order peace-building); increase the intensity of inspection and evaluation activities; and sternly pursue the responsibility of individuals and departments where they don't take the work seriously, don't adequately supervise, or don't adequately provide assistance, leading to a major case (incident) of an already registered severely mentally ill person to cause a commotion. The departments of Development and Reform, Health and Family Planning, Public Security, Civil Affairs, and Judicial Administration should follow the mandate of "treating those who need treatment, managing those who need to be managed, and admitting of those who need to be admitted, to the greatest extent possible; to truly strengthen the establishment of a mental health prevention and treatment network. Units such as for comprehensive management, Health and Family Planning, Public Security, Civil Affairs, Judicial Administration, and the Disabled Persons' Federation should strengthen the prevention and management and rehabilitation services systems for severe mental illnesses. The departments such as for Development and Reform, Health and Family Planning, Human Resources and Social Security should research and guidance on forming pricing mechanisms for medical services, including for mental illness. The civil affairs department should work with units such as the Disabled Person's Federation, Development and Reform , the Health and Family Planning , and the Finance, to explore the formulation of safeguard policies to support the development of rehabilitation services for persons with mental disorders, to strengthen the regulation for rehabilitation establishments, and to continuously increase the level of standardization and professionalization of rehabilitation services. The Disabled Persons' Federation of all levels should earnestly and thoroughly implement the Law of the People's Republic of China on the Protection of Disabled Persons and the Development Outline for Disabled Persons in China's requirements for providing prevention and rehabilitation to persons with mental disabilities;[56] should promote an open management model that is conducive to people with mental disabilities participation in societal life; and should ensure the lawful rights and interests of persons with mental disabilities Departments such as for Health and Family Planning, Human Resources and Social Security, and Industry and Commerce should strengthen research and evidentiary hearings to explore models for administration of psychological counseling establishments and to develop policies relevant to expanding and standardizing psychological counseling establishments.
(3) Ensuring funding. Local authorities should include mental health work expenses in the financial budget of each administrative level, and increase the degree of investment based on the needs of mental health work, to to ensure that the funds needed from mental health work are available, and strengthen evaluation of task completion and the use of funds to increase the efficiency of funding use. All regions should strongly promote the basic-level public health service projects and efforts on the management and treatment of severe mental disorders, and put in place policies on governmental investment in specialized mental health establishements. Diversified mechanisms for fund raising should be established; actively opening up channels for financing mental health work in the public interest, encouraging investment of social capital in mental health services financing in mental health, and non-public (for-profit) investment in the provision of mental health services and community-based rehabilitation services should be encouraged.
(4) Strengthening scientific research. Rotating around the development needs of mental health work, all regions, all relevant departments and all research institutions should focus on applied basic and clinical research on schizophrenia and other key illnesses as well as the commonly occurring disorders and psychological behavioral problems of children, the elderly and other key groups. Prioritize research on techniques for the early diagnosis of mental disorders as well as new psychiatric medicines and suitable psychological treatment techniques. Strengthen soft science research in areas such as mental disorders epidemiology and mental health law and policy, providing a scientific basis for the formulation of mental health policies and implementation of laws. Promote comprehensive research into the physiological, psychological, and social causes of mental disorders and psychological behavior problems; and relevant translational medical research. Strengthen international exchanges, to adopt, draw from and expand upon advanced international technologies and successful experiences, promptly putting the fruits of domestic and foreign research into practice in mental health work.
The Health and Family Planning Commission, together with relevant departments, formulates a work plan for the implementation of the plan, with relevant departments each having their own responsibilities, and jointly organizing the implementation of this plan. All levels of government carry out supervision, guidance and assessment of progress in implementing the plan, it's quality and efficacy; and make the implementation of the plan's key tasks a major item in government work inspections; and make the outcomes an important component of evaluating the performance of lower level governments. In 2017, the Health and Family Planning Commission, in conjunction with relevant departments, will conduct a midterm assessment of the plan's implementation, and in 2020 organize the final efficacy assessment of the plan's implementation.
Outline on the Implementation of a Law-Based Government (2015-2020) Counter-Terrorism Law (2015) Domestic Violence Law 2015 SPP Provisions on Case Guidance Work 2015
national work plan on mental health
精神卫生
精神卫生法
About China Law Translate 803 Articles
CLT is a crowdsourced, crowdfunded legal translation project that enables English speaking people to better understand Chinese law.
Road Traffic Safety Law of the P.R.C.
Procuratorate Public Interest Litigation Pilot Sites
Plan for Accelerating Improvement of the System for Market Entity Withdrawal
Guiding Opinion on Accelerating the Advancement of the Establishment of the Social Credit System with New Forms of Credit-based Regulatory Mechanisms
Special Administrative Measures for Foreign Investment Access (Negative List) (2019 version)
P.R.C. Encryption Law (Draft)
P.R.C. Community Corrections Law (Draft)
censorship China civil society Complete court reform criminal procedure cybersecurity domestic violence hot Internet judicial independence judicial reform lawyers plea bargaining procuratorate role of lawyers social credit SPC speech Supreme People's Court translation 互联网 Judicial Interpretation Supreme People's Court 翻译
Legislative Plan for the Standing Committee of the 12th National People's Congress
The 180-plus reforms put forward in the Fourth Plenum
The estimated value for a full translation of this post is $535.92 USD at the below-market rate of $.06 per character, with 8,282 characters.
Change Display Language
English/en/%E5%85%A8%E5%9B%BD%E7%B2%BE%E7%A5%9E%E5%8D%AB%E7%94%9F%E5%B7%A5%E4%BD%9C%E8%A7%84%E5%88%92%EF%BC%882015-2020%E5%B9%B4%EF%BC%89/
中文(简体)/%E5%85%A8%E5%9B%BD%E7%B2%BE%E7%A5%9E%E5%8D%AB%E7%94%9F%E5%B7%A5%E4%BD%9C%E8%A7%84%E5%88%92%EF%BC%882015-2020%E5%B9%B4%EF%BC%89/


text:
Q: program intermittently stuck with main reporting a different thread id as opposed to the thread itself I am trying to figure out how multi-threading works, this is my code :
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <pthread.h>

static pthread_cond_t threadDied = PTHREAD_COND_INITIALIZER ; // cond var initialization
static pthread_mutex_t threadMutex = PTHREAD_MUTEX_INITIALIZER ; // mutex initialization
// this mutex will protect all of the below global vars

static int totThreads = 0 ; // total number of threads created
static int numLive = 0 ;   // Total no. of threads still alive .. or terminated but not joined
static int numUnjoined = 0 ; // no. of threads that have not yet been joined

enum tstate { // enumeration of thread states
    TS_ALIVE, // thread is alive
    TS_TERMINATED, // thread terminated, not yet joined
    TS_JOINED  // thread terminated and joined
};

static struct {  // info about each thread
    pthread_t tid ; // thread ID
    enum tstate state; // Thread state as per the above enum
    int sleepTime ;  // no. of seconds to live before terminating
} *thread ; // name of the struct .. well a pointer

static void *threadFunc (void *arg) { // default start function for each thread
    int idx = *(int *)arg  ; // since arg is of type void , we typecast it to * of type int and deref it
    int s ; // for ret val

    sleep(thread[idx].sleepTime) ;  // pretending as though thread is doing some work :/

    s = pthread_mutex_lock(&threadMutex);
    if (s!=0) {
        printf("whoops, couldn't acquire mutex\n") ;
        fflush(stdout);
        exit (-1) ;
    }

    numUnjoined ++ ;
    thread[idx].state = TS_TERMINATED ;

    s = pthread_mutex_unlock(&threadMutex) ;
    if ( s!=0 ) {
        printf("whoops, couldn't release mutex\n") ;
        fflush(stdout);
        exit (-2) ;
    }

    s = pthread_cond_signal(&threadDied) ; // signalling any listening thread to wake up !!
    if (s != 0) {
        printf("whoops, couldn't signal the main thread to reap\n");
        fflush(stdout);
        exit (-3) ;
    }
    printf("Thread %d has worked hard and is now terminating\n", idx);
    fflush(stdout);

    return NULL ;
}

int main(int argc, char *argv[]) {
    int s, idx ;

    if (argc < 2 || strcmp(argv[1], "--help") == 0) {
        printf("Usage : %s nsecs...\n", argv[0]);
        fflush(stdout);
        exit(-4) ;
    }
    thread = calloc(argc -1, sizeof(*thread) );
    if (thread == NULL) {
        printf("whoops, couldn't allocate memory of size %lu\n", (argc -1) * sizeof(*thread) );
        fflush(stdout);
        exit(-5);
    }

    // Let's create all the threads now !!

    for (idx =0 ; idx < argc -1 ; idx++ ) {
        thread[idx].sleepTime = atoi(argv[idx + 1 ]) ; // thread sleeps for the duration entered in the cmd line
        thread[idx].state = TS_ALIVE ;
        s = pthread_create(&thread[idx].tid, NULL, threadFunc, &idx);
        printf("Main created thread %d with tid : %lu \n", ( * (int *)&idx ), (unsigned long)thread[idx].tid);
        fflush(stdout);
        if (s != 0 ){
            printf("whoops couldn't create thread %lu\n",(unsigned long) (&thread[idx].tid) );
            fflush(stdout);
            exit(-6) ;
        }
        //sleep(1); // << -- if I don't add this sleep, then it just deadlocks
    }

    totThreads = argc -1 ;
    numLive = totThreads ;

    // Join terminated threads

    while (numLive > 0 ) {
        s = pthread_mutex_lock(&threadMutex) ;
        if (s!=0){
            printf("whoops, couldn't lock mutex for joining\n") ;
            fflush(stdout);
            exit(-7) ;
        }
        while (numUnjoined == 0) {
            s = pthread_cond_wait(&threadDied, &threadMutex) ;
            if (s!=0) {
                printf("whoops, couldn't wait for thread join\n") ;
                fflush(stdout);
                exit(-8) ;
            }
        }

        for (idx = 0 ; idx < totThreads ; idx++ ) {
            if (thread[idx].state == TS_TERMINATED) {
                s = pthread_join(thread[idx].tid, NULL) ;
                if (s!=0) {
                    printf("Failed thread join\n");
                    fflush(stdout);
                    exit(-9) ;
                }

                thread[idx].state = TS_JOINED ;
                numLive-- ;
                numUnjoined-- ;
                printf("Reaped thread %d (numLive=%d)\n", idx, numLive);
                fflush(stdout);
            }
        }

        s = pthread_mutex_unlock(&threadMutex) ;
        if (s!=0){
            printf("whopps, couldn't unlock mutex after joining\n");
            fflush(stdout);
            exit(-10) ;
        }
    }
    exit(EXIT_SUCCESS);

}

For a thread count of 1, this code works sometimes, at other times it just hangs :(
WORKING :
#./thread_multijoin 1
Main created thread 0 with tid : 139835063281408
Thread 0 has worked hard and is now terminating
Reaped thread 0 (numLive=0)
HANG :
#./thread_multijoin 1
Main created thread 0 with tid : 140301613573888
Thread 1 has worked hard and is now terminating
^C
NOTICE here that Main says "Thread 0 was created" ; whereas the thread itself says "Thread 1" ... why is there a mismatch ??
It definitely gets stuck when I have multiple threads :
#./thread_multijoin 1 2 2 1
Main created thread 0 with tid : 140259455936256
Main created thread 1 with tid : 140259447543552
Main created thread 2 with tid : 140259439150848
Main created thread 3 with tid : 140259430758144
Thread 4 has worked hard and is now terminating
Thread 0 has worked hard and is now terminating
Reaped thread 0 (numLive=3)
Reaped thread 3 (numLive=2)
Thread 3 has worked hard and is now terminating
Reaped thread 2 (numLive=1)
Thread 2 has worked hard and is now terminating
^C
the only thing I am understanding from this is that the thread ID's reported by main and the thread itself are different, so I am guessing due to parallel scheduling there is something going on with the thread counter ... can you guys help me narrow this down please?
Thanks in advance.
========================================
Thanks @mevets and @user3386109 for the answer :)
I tried doing what @mevets suggested : i,e
pthread_create(&thread[idx].tid, NULL, threadFunc, (void *)idx);
and
int idx = (int)arg ;
but got this error when compiling :
thread_multijoin.c: In function 'threadFunc':

thread_multijoin.c:32:15: error: cast from pointer to integer of different
size [-Werror=pointer-to-int-cast]

int idx = (int)arg  ; // since arg is of type void , we typecast it to * of type int and deref it

thread_multijoin.c: In function 'main':

thread_multijoin.c:90:64: error: cast to pointer from integer of different
size [-Werror=int-to-pointer-cast]

s = pthread_create(&thread[idx].tid, NULL, threadFunc, (void *)idx );

Upon researching further, found this thread :
cast to pointer from integer of different size, pthread code
which suggested the use of intptr_t :
s = pthread_create(&thread[idx].tid, NULL, threadFunc, (void *)(intptr_t)idx );

and
int idx = (intptr_t)arg

That worked perfectly fine without errors . Thanks once again for your time, really appreciate it :)
PS : to use intptr_t  , you need to use _GNU_SOURCE :
#define _GNU_SOURCE

A: [ the thread id ]:
You pass the address of idx into each thread, then dereference it to index the table.  So each thread gets the same pointer argument.
You probably wanted to:
        s = pthread_create(&thread[idx].tid, NULL, threadFunc, (void *)idx);

and
        int idx = (int)arg  ; // since arg is of type void , we typecast it to * of type int and deref it
ie; not deref it, just pass it in a "void *" container.


We thought long and hard about this and we decided that comment boxes are horrible and that we didn't want them anywhere near the site. You know how it is. You start out with the best of intentions and before you know it you're hosting pages and pages of bile and fury from people who really need to switch off their laptops, go for a walk and realise that life can be very beautiful if you're not always livid about everything.
Besides which, do local newspapers feel obliged to print every letter they receive? No, of course they don't. They carefully filter out the ones written in green crayon, choose the best ones and produce a letters page of variety and quality.
That's what we'll do. What we'll also hope to do is use our letters page to further the story. If you've written about the subject then let us know and maybe we'll link you up. We like you. You're nice. It's the others that scare us.


Only those who score high enough on their S.A.T.'s are looked at for this amazing college. In fact, Stansbury has been known to be called the Harvard of the west. Why travel 3,000 miles to go to Harvard when you can just go to Stansbury U!


text:
'Bully' to get PG-13 Rating After Edits
Posted on April 6, 2012	 by Joseph Pedro
One of the Subjects of "Bully." Screen Shot via Facebook.
Lee Hirsch and The Weinstein Company have announced that the documentary "Bully" will receive a "PG-13" rating from the Motion Picture Association of America (MPAA) in time for the film's April 13 expansion to 55 markets, and that despite three minor edits, a major scene in the movie that had been at the forefront of the film's ratings battle will be kept intact.
"On behalf of the more than half a million supporters who joined me on Change.org in petitioning the MPAA, I want to express how grateful I am not only to the MPAA for lowering the rating without cutting a vital scene, but to all of the people who used their voices to put a national spotlight on this movie and its mission," said Katy Butler, who started her campaign on Change.org after experiencing severe bullying in school. "The brief usage of language in this film reflects what so many kids hear each day in school when they're being bullied. No one removes it from the halls and playgrounds of schools."
Film anti-gay bullying Bully movie MPAA
TO SEE OR NOT TO SEE: Ricky Martin in "Evita"
Gay Family to Attend White House Easter Egg Roll
Famed Gay Resort in Palm Springs is For Sale
Palm Spring's historic INNdulge gay resort is currently for sale. The property has been listed on LoopNet for $10,800,000. The…


"Crevan Mackin was previously arrested in January 2015 in possession of explosives and firearms, which he admitted. He was not charged with these offences but instead with an offence he had denied. He was granted bail in the Special Criminal Court.
"I have raised my concerns about the manner in which Adrian Crevan Mackin was dealt with by the Garda, the many offences which he admitted to but he was not charged with, the low bail that was set, and his access to other weapons, with the Minister for Justice and An Taoiseach.
"In April the Garda Síochána Ombudsman Commission (GSOC) agreed to initiate a public interest investigation into these matters after I wrote to it and presented it with papers that I had received relating to the case.
"At the time I gave these papers to the investigating officer in the Garda, to GSOC, to the former and current Taoiseach and to the former and current Minister of Justice.
"The decision by the Special Criminal Court to refuse to hand over to GSOC the transcripts of proceedings involving Crevan Mackin was incomprehensible. That one part of the justice system would refuse to cooperate with another is a matter of grave concern.
"Public accountability and public confidence in the rule of law and the institutions of policing and justice are essential. GSOC should never have been forced to go to the High Court."