text:
Q: How to list all suggestions and filtered suggestions based on user input using reactjs? i want to show all available usernames when user types @ in input field and filtered usernames when user enters anything after @ character.
I have implemented like below,
class UserMention extends React.purecomponent {
    constructor(props) {
        super(props);
        this.state = {
            text: '',
            user_mention: false,
        };
        this.user='';
     }

     user_list = [
         {name: 'John smith'},
         {name: 'Jenna surname2'},
         {name: 'Tuija rajala'},
     ];

     get_user = s => s.includes('@') && s.substr(s.lastIndexOf('@') +
     1).split(' ')[0];

     handle_input_change = (event) => {
         let user_mention;
         this.user = this.get_user(event.target.value);

         if (event.target.value.endsWith('@')) {
             user_mention = true;
         } else {
            user_mention = false;
         }

         this.setState({
             user_mention: user_mention,
             [event.target.name]: event.target.value,
         });
      };

      get_text_with_user_mention = (text, selected_user) => {
          let user_name = selected_user;
          let text_without_user_mention;
          text_without_user_mention = text.slice(0,
          text.lastIndexOf('@'));
          return text_without_user_mention + user_name;
      };

      handle_select_value = (selected_user) => {
          let text;
          text = this.get_text_with_user_mention(this.state.text,
          selected_user);
          this.setState({
              text: text,
              user_mention: false,
          });
          this.user = false;
      };

      render = () => {
          let suggested_values = [];
          if (this.state.user_mention) {
              suggested_values = this.user_list
                 .map((o) => { return {user_name: o.user_name};});
          }
          if (this.user) {
              suggested_values = this.user_list
                  .filter(user => user.user_name.indexOf(this.user) !==
                  -1)
                  .map((o) => {return {user_name: o.user_name};});
       }
       return (
            <input
                required
                name="text"
                value={this.state.text}
                onChange={this.handle_input_change}
                type="text"/>
            {this.state.user_mention &&
                <SelectInput
                    on_change={this.handle_select_value}
                    values={suggested_values}/>}
            {this.user &&
                <SelectInput
                    on_change={this.handle_select_value}
                    values={suggested_values}/>}
        );
    };
}

As you see from above code, i am modifying suggested_values based on this.user and this.state.user_mention state.  Can someone help me refactor or modify this  a bit more nicer. thanks.

A: This is another approach using React hooks, instead of classes. If you've never worked with hooks, give it a try. You will enjoy it. It's much simpler in my opinion.

I also added a username property. It's much better if you work with a string that doesn't allow spaces when you're tagging someone. You can also display the full name with spaces along with the username, if you wish.
Ex:
John Smith (@johnsmith)

function App() {

  const inputRef = React.useRef(null);
  const [inputValue, setInputValue] = React.useState('');
  const [userList,setUserList] = React.useState([
    {name: 'John smith', username:'johnsmith'},
    {name: 'Jenna surname2', username:'jennasurname2'},
    {name: 'Tuija rajala', username:'tuijarajala'}
   ]
  );
  const [showSuggestions,setShowSuggestions] = React.useState(false);

  const [suggestionList,setSuggestionList] = React.useState(
    ['johnsmith','jennasurname2','tuijarajala']
  );

  function onChange(event) {
    const regexp = /@[a-zA-Z0-9]*$/;
    if (regexp.test(event.target.value)) {
      setShowSuggestions(true);
    }
    else {
      setShowSuggestions(false);
    }
    setInputValue(event.target.value);
  }

  function focusInput() {
    inputRef.current.focus();
  }

  return(
    <React.Fragment>
      <input ref={inputRef} type='text' value={inputValue} onChange={onChange}/>
      {showSuggestions &&
        <Suggestions
          inputValue={inputValue}
          suggestionList={suggestionList}
          applyMention={onChange}
          focusInput={focusInput}
        />
      }
    </React.Fragment>
  );
}

function Suggestions(props) {

  function selectSuggestion(username) {
    const regexp = /@[a-zA-Z0-9]*$/;
    const newValue = props.inputValue.replace(regexp,username + ' ');
    props.applyMention({target: {value: newValue}}); // THIS MIMICS AN ONCHANGE EVENT
    props.focusInput();
  }

  const suggestionItems = props.suggestionList.map((item) =>

selectSuggestion('@' + item)}>@{item}

  );

  return(

      {suggestionItems}

  );
}

ReactDOM.render(<App/>, document.getElementById('root'));
.container {
  border: 1px solid silver;
  width: 150px;
}

.item {
  cursor: pointer;
}

.item:hover {
  color: blue;
}

input {
  width: 300px;
}

A: You can simplify your code by doing something like this.
See sandbox: https://codesandbox.io/s/react-example-kgm2h
import ReactDOM from "react-dom";
import React from "react";
class UserMention extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      text: "",
      user_list: [
        { name: "John smith" },
        { name: "Jenna surname2" },
        { name: "Tuija rajala" }
      ],
      suggestions: []
    };
  }

  handleOnChange = e => {
    const { value } = e.target;
    const { user_list } = this.state;
    //show all user suggestions
    if (value.includes("@") && value.indexOf("@") === value.length - 1) {
      this.setState({
        text: value,
        suggestions: [...this.state.user_list]
      });
      //show matching user suggesstions
    } else if (value.includes("@") && value.length > 1) {
      const stringAfterAt = value.slice(value.indexOf("@") + 1).toLowerCase();
      const newSuggestions = user_list.filter(user => {
        return user.name.toLowerCase().includes(stringAfterAt);
      });
      this.setState({
        text: value,
        suggestions: newSuggestions
      });
      //display no users if they do not use the @ symbol
    } else {
      this.setState({
        text: value,
        suggestions: []
      });
    }
  };

  createSuggestionsList = () => {
    const { suggestions } = this.state;
    return suggestions.map(user => {
      return
{user.name}
;
    });
  };

  render = () => {
    return (

        <input
          required
          name="text"
          value={this.state.text}
          onChange={this.handleOnChange}
          type="text"
        />
        {this.createSuggestionsList()}
        {/* <SelectInput value={this.state.suggestions}/> */}

    );
  };
}

ReactDOM.render(<UserMention />, document.getElementById("root"));

I'm not entirely sure how you want to render the suggested users, but you can always just pass down this.state.suggestions as a prop to the SelectInput component.
Main takeaway is to use an additional array in our state for suggestions and update it as the user types into the input. We call {this.createSuggestionsList()} inside render to dynamically create the markup for each suggested user. Or as mentioned above, just pass down the suggestions as a prop.


A low-calorie, low-carb, and super healthy grilled chicken salad recipe that you can incorporate in many healthy diets, including Mediterranean or Clean Eating.
Today I am going to show you how to make a grilled chicken salad that fits perfectly in many weight-loss diets because it is low-calorie and low-carb, but at the same time offers plenty of proteins to feed our muscles.
Some of the most popular diets that include this healthy grilled chicken salad recipe are Mediterranean and Clean Eating.
I know, you've had enough dull chicken breast to last you a lifetime. And that's the issue with many weight-loss foods. They are bland!
There's no way to put it nicely, it is what it is.
And when you have it for weeks, sometimes months in a row, you even forget that tasty food can actually exist.
Luckily, this is not the case.
Today I will show you how to make a grilled chicken salad that's not just healthy, but also full of taste and flavor.
Yesss, that can actually be real!
And the best thing? It's incredibly easy.
The base of this salad is a normal Greek salad with spinach, which even a kid can make, right?
So we need to focus more on the chicken because that can ruin the whole dish if cooked the wrong way.
But don't worry, I've made a long list of tips and tricks to help you make the best grilled chicken salad recipe ever.
1. How to cook the chicken fast and evenly.
First, you need to pick the right piece of meat.
Keep in mind that large cuts take longer to cook so if you want to make a healthy grilled chicken salad in just 30 minutes, it's best to pick small pieces of boneless, skinless chicken breast.
The pieces should be thin and similar sized to cook evenly. If they are thick you'll have to pound them to make them thinner.
If they are too large you can cut them into smaller pieces.
This will decrease the cooking time considerably and will get the chicken cooked evenly.
Picking skinless chicken cuts will not only decrease the prep time, but it will also help you lose weight because the skin contains fat.
Hence, this is the best choice if you're on a diet.
One piece of advice that I keep repeating throughout my recipes is that you should bring the chicken to room temperature before cooking.
Otherwise, it will dry out on the outside quicker than it cooks on the inside.
I am sure we all know how dry, crusty chicken breast tastes like, right?
So after taking it out of the fridge, let it sit on the counter for about 30 minutes before cooking.
You could use this as an opportunity to marinate it and I am going to explain to you how in the next step.
2. How to make grilled chicken salad tasty.
If you've been reading my blog for a while, you know that I always like to marinate all meats before cooking.
This step is very important because it makes it flavorful, tender and juicy.
Otherwise… well, we all know how dull grilled chicken breast can be, don't we?
And not just dull, but dry and even choky.
If you don't have the time to marinate it, just rub it well with your favorite spice mix and some olive oil before cooking.
But if you've got the time (and it doesn't take long at all) you can marinate it in the fridge for at least an hour.
And for best result, leave it overnight. The meat will literally soak up all flavors and it will get tender.
It's worth noting that homemade marinade is better than store-bought. That's because store-bought contains lots of sugar and salt, so you have to read carefully the ingredient list if going for it.
Now that you know how to cook the meat and make it tasty, I am going to tell you how to make grilled chicken salad without an outside grill.
3. How to make grilled chicken salad without an outside grill.
or charcoal grill. But how do you cook it indoors, without burning up the kitchen?
. Sure, you could also fry it in a pan, but the recipe would be slightly different so we'll leave that for some other time.
And one of the most important steps of this recipe is that you need to pre-heat the grill before cooking.
So after marinating and bringing the chicken to room temperature, this is what you must do if you want to make the best grilled chicken salad recipe.
Then you should rub some oil on it to keep the meat from sticking.
And how can we tell when the chicken is done?
Cut into the thickest part and if the juices run clear and it's no longer pink on the inside, that means it's done.
into the thickest part and it should read 165F/75C. If the meat has bones make sure you don't hit them as it can show a false temperature.
I've told you everything about the grilled chicken but what about the salad? After all, it is a salad recipe, isn't it?
4. Which salad and dressing to serve with grilled chicken.
For this recipe, I mixed a simple Greek salad with spinach and grilled chicken and the combo was super delish. But you can change that with your favorite veggie salad as most of them go perfectly with the other two ingredients.
I topped everything with a delicious Greek dressing that is suitable for any salad. And you can make a large batch and refrigerate it in a lidded jar, or bottle, for up to 5 days.
That will come handy especially if you do meal planning, but make you sure you add the dressing to your food only before serving.
Use thin, similar-sized, boneless and skinless chicken cuts to get it cooked evenly and fast.
Let the meat sit on the counter for about 30 minutes before cooking to bring it to room temperature.
Marinate the chicken in the fridge for at least an hour (overnight for best results).
into the thickest part and it should show 165F/75C. If you don't have a thermometer, cut into the thickest part and the juices should run clear and the meat should no longer be pink on the inside if it's done.
Pair the grilled chicken with your favorite salad, if the Greek one is not your fancy.
Now that you've armed yourselves with all these tips you will surely make the best grilled chicken salad ever.
After you make it, post it on Instagram with @theblondelish as I am so curious to see how foodies make my recipes.
And if you like this grilled chicken salad recipe video and want to see more like it, please Subscribe to my Youtube Channel.
Now let's wrap things up and fire up the grills, shall we?
This healthy grilled chicken salad recipe is low-calorie, low-carb and you can incorporate it into many healthy diets like Mediterranean or Clean Eating. Plus, you can make it in just 30 minutes.
In a small bowl, whisk all dressing ingredients together. Then pour the dressing into a jar or bottle and refrigerate until ready to use.
Place the chicken on a plate and season with sea salt, freshly ground black pepper and oregano. Rub well to coat on both sides.
Heat a grill pan or an outdoor grill on medium-high heat and grease it with a bit of olive oil. Cook the chicken for 5-7 minutes on each side or until cooked through and no longer pink on the inside. (If using a meat thermometer, the internal temperature has to reach 75C/165F).
Once the chicken is cooked, remove it from the grill and let it rest for 5 minutes before slicing.
In a large bowl or platter, add baby spinach, tomatoes, cucumbers, onions, and olives.
Place the sliced chicken over the veggies and top with crumbled feta cheese.
Pour the dressing over and gently toss to coat.
! Please read the Tips & Tricks in the article before making this healthy grilled chicken salad recipe!


Originally from Australia, Michael Churven came to America as part of the Australian wave in the early '00s and is thrilled to be a Main Company member at The Groundlings Theatre. His television credits include MODERN FAMILY and Tru TV's YOU CAN DO BETTER. He has appeared on Australian television in the series BUTTERFLY ISLAND and THE NEW ADVENTURES OF SKIPPY. Theatre credits include the Australian national tour of THE KING AND I and Open Fist Theater's production of DELEARIOUS.


text:
Our expedition parka
High Latitudes Loyalty Program
Expedition team
Poseidon Expeditions - your polar cruise operator
All destinations Antarctica Falklands, South Georgia & Antarctic Islands Antarctic Peninsula Antarctic Peninsula Antarctic Circle Falklands, South Georgia & Antarctica Falklands, South Georgia & Antarctica Arctic British Isles Crossing the Arctic Circle, Jan Mayen & Spitsbergen West Spitsbergen West Spitsbergen & Polar Ice Edge Svalbard & Polar Ice Edge Franz Josef Land Archipelago Spitsbergen, Greenland & Iceland East Greenland North Pole North Pole
ALL DATES 2020 January 2020 February 2020 May 2020 June 2020 July 2020 August 2020 September 2020 October 2020 November 2020 December 2020 2021 January 2021 February 2021 May 2021 June 2021 July 2021 August 2021 September 2021 October 2021 November 2021 December 2021 2022 January 2022 February 2022
Live broadcast: Antarctic Cruise (13.02-24.02.2015). Day 3
Today, as we crossed the Drake Passage, we heard various presentations about the flora, fauna and geology of the Antarctic region, provided in an interesting, engaging way by the ship's expedition team. For example, right after breakfast, we learned about the birds of Antarctica. The naturalist Marty is what I would call a typical science guy, crazy and passionate about birdlife. He is in love with these creatures and I am sure, if he could, he would stay in Antarctica forever with his darling birds. His enthusiasm was contagious, and had us really looking forward to our landings at the Peninsula.
The second presentation was about the marine life of Antarctica. The passengers were especially fascinated by the photo of a whale's heart, which weighs around 500 kg. After lunch, we enjoyed an equally informative presentation about the While Continent's unique geology.
It's nice to see the passengers and lecturers interacting, joking and engaging in the subject. Occasionally a few of the passengers would make jokes that were effectively parried by the presenter – sometimes it was the other way around. This made for a friendly and family atmosphere. Tomorrow a new day awaits us with our first landing, finally meeting some penguins, seals and opportunities to learn more from our team of guides and experts.
Latest news, tips and deals
© 1999-2020 Poseidon Expeditions. Privacy Policy

redpajama_set_name: RedPajamaCommonCrawl


Janiva Magness knows what it�s like to be a survivor.
Much like the world-weary, vagabond bluesmen who blazed trails before her, her biography reads like lyrics to a hard-luck ballad. By 17, Magness had lost both parents to suicide and had given birth to a daughter of her own. It was after she covertly entered a club to hear blues hero Otis Rush that she found purpose � providing beautiful music to those in good and bad times. She honed a blues- and R&B-influenced sound and has become a very successful artist.
Whether Magness� back story figured into the equation, she seems perfect to kick off an important benefit concert Wednesday at Mojo�s. The evening is dedicated to local woman Joyce Harkins, who was diagnosed with an abdominal aortic aneurysm last year, a condition that already has required a major procedure and likely will entail other surgeries. Loved ones have diligently responded, organizing several events to help defray bills and basic needs.
Magness� latest, �The Devil is an Angel Too,� showcases the immense talent that earned her four nominations at next month�s 2011 Blues Music Awards. She is a past winner in the B.B. King Entertainer of the Year and Contemporary Blues Female Artist of the Year categories. A brilliant reading of original numbers and tunes popularized by Julie Miller, Graham Parker, Nick Lowe, Nina Simone and Gladys Knight, the record sets her remarkable pipes against growling guitars, shimmering Wurlitzers, rumbling baritone saxes, gospel organs and downy beds of strings.
Her voice, full of aching and attitude, grit and grace, delivers come-ons and confessions with equal conviction. Magness makes room for songs that exist like little flowers blooming between cracks in the sidewalk. At times, she sings of pressing on, �walking in the sun� and spirits that are �hard to kill.� It�s clear she sees her art form as a means of passing along the strength and joy she has found.
Wednesday won�t mark the first time Magness has trekked to Columbia for a good cause. Almost two years ago exactly, she played shows here in support of MO Blues and Rainbow House. In a Q-and-A with former Tribune reporter Jonathan Braden, she talked of moving past her own hurts by helping others do the same.
Magness sings, �Your love�s the only thing that�s gonna save me� on a song from her latest. That sentiment, no doubt reverberating quietly in the souls of Harkins� loved ones, seems a fitting theme for the evening. Magness takes the stage at 6:45 p.m., with local legends The Bel Airs playing at 8:45. Doors open at 6 p.m., and tickets are $10. Visit www.mojoscolumbia.com or www.davoice.org for details on the show.
As mentioned in Thursday�s Go!, another significant benefit takes places Wednesday as pop-rock quintet Sister Hazel, best known for �90s radio hits �All For You� and �Happy,� plays The Blue Note as part of Rock-a-Thon 2011, an event hosted by the University of Missouri chapter of Alpha Epsilon Pi. Since 1969, the fraternity has raised money for the American Cancer Society, and this year�s effort will be focused on battling leukemia. Chicago funk band Lubriphonic kicks off the show, with doors opening at 8 p.m. Tickets are $20. Visit www.thebluenote.com for details.
To the Heart of Missouri Chorus, a member group of Sweet Adelines International, few sounds are sweeter than perfectly executed barbershop-style harmony. One of those sounds had to be hearing its name called from the stage of a regional singing competition earlier this month. The 21-voice ensemble attended the Midwest Gateway Region 5 Competition and Convention in Springfield, Ill., bringing home several awards, including a first-place Small Chorus Medal, the Most Improved Chorus Award, Showmanship Award and overall fifth-place medal.
�It�s one thing to come in first among the small choruses, but it�s another thing to score higher than choruses in the mid- or large-size categories,� director Marj Friedmeyer said in a news release. �A small chorus like ours has to perform with an extremely high degree of professionalism to beat out choruses with two or three times as many members.� Should the group�s score remain in the top five among small choruses after other regional competitions end, Friedmeyer said the group would perform at an international competition in Colorado next year. For more, visit www.heartofmissourichorus.org.
If everything truly is bigger in Texas, local printmaker Timothy Swenson must be experiencing a 10-gallon sense of achievement at seeing one of his works placed in a wide-ranging Lone Star State exhibition. In its 17th year, the Texas National exhibition is hosted by the Stephen F. Austin State University School of Art in Nacogdoches. Swenson�s monotype with hand embellishment, �Shrine to Rituals Unperformed,� was one of 111 pieces, by 98 artists from 29 states, to be selected by internationally known artist James Drake.
Swenson, a St. Louis native, holds degrees from Webster University and the University of Iowa. He has lived in Columbia since 1996 and works as a graphic designer and illustrator for Corporate Identi-T�s and Universi-T�s. In his fine art, Swenson has specialized in using nontoxic and low-toxic materials such as water-based etching inks, acrylic-resist etching, low-toxicity solutions and soap-and-water cleanup. He also has eight prints in a show at the Foundry Art Centre in St. Charles through Friday. The Texas National show runs through May 21. For more information on the exhibition, visit www.art.sfasu.edu. For a closer look at Swenson�s work, see swensonartstudio.com.


Budapest, Hungary has often been compared to the likes of Prague and Vienna, but I'll let you in on a little secret, Budapest shines brighter than both of those. A trip to Hungary means a trip to one of the many thermal hot springs that date back hundreds of years and a chance to take in some pretty amazing culture like Statue Park for example, where all the communist era statues have been collected. Little restaurants and bistros sit on almost every corner if you;re looking for a satisfying Hungarian meal and while Hungary is a part of the EU, the dollar still goes far.
Translation; inexpensive. In fact, Budapest has all the qualities that make up the perfect European holiday.
One of the main draws of Budapest are the thermal baths; people have been visiting Budapest to take the waters since the 1500s. While there are many spas in the city, I love the older ones – that old world charm and all.
Gellert Spa is one of the best spas in Budapest, located in an Art Nouveau building mellowed by age since it's been around since 1918. With an open air wave pool and thermal pools of varying temperatures you can also get a medicinal massage if you want it. But don't expect a lot of pampering – this is a European spa and that means no warm and fuzzy moments. Take a look inside the building anyway, even if you don't have time for a stay, and notice the Art Nouveau furniture, colorful mosaics, marble towers, stained-glass windows and statues. The entrance fee begins at $14. Call ahead for a reservation.
Rudas is located near Gellért Hill and the Danube's Elizabeth Bridge and goes out all out with hot steam, a sauna that is divided into smaller pools that get hotter as you go. If you're tired after the experience spend some time in the relaxation room. The entrance fee here is about $15 depending on the exchange rate.
Castle quarter on Castle Hill is a UNESCO World Heritage site and is a must stop for history buffs. It was settled in the 13th century after a Tartar invasion and has somehow survived it all. It has three churches, six museums and a number of historical buildings, streets and squares for visitors to enjoy.
St. Stephen's Basilica is a veritable fortress and is the largest church in Budapest. Construction began on the church in 1851 and was not complete until 1905. It is a neo-classical building holding the greatest reliquary of the people of Hungary and including a mummified arm and Holy Right of King St. Stephen. There are also some great artwork finds inside the church like the painting by Gyula Benczur of St. Stephen dedicating the country to the Virgin Mary and statues by world-renowned Alajos Stróbl.
Even with all the amazing history that makes up this city, one of the most moving places you will find yourself will be Heroes Square at the entrance to City Park. From Andrassy Boulevard you can't miss the high columns in the center of the Millennium memorial with a statue of the Archangel Gabriel holding the Hungarian Holy Crown and the double cross built in the 1800s to commemorate the 1000th anniversary of the when the Hungarians arrived in the Carpathian Basis. This is one of the most visited sites in Budapest so it's crowded, so be prepared.
For those interested in Hungary's communist era there is Memento or Statue Park . In this park the statues from the communist era have been collected after they were torn down following the political changes in the country in 1989 and 1990. You can see Lenin's statue, the statue of Marx and Engels (which was once located in front of the headquarters of the communist party), and the Red Army's statues that once stood as monuments of supposed heroic military duty.
Zara Boutique Hotel is a perfect find because it sits right in the city center and is only 50 yards from the River Danube and just steps away from the famous Vaci Street with shopping, restaurants and also nearby public transportation. It also houses the restaurant Araz, a big deal these days with its Hungarian and French cuisine and one heck of a modern kitchen with chef Aron Barka at the helm.
Kempinski Hotel Corvinus caters more to the business travelers and is a prime location with a first-rate spa. The hotel is located near just about everything in the heart of Budapest.
Menza is a Budapest fave done up in cafeteria style, but the food is pure Hungarian and there is nothing cafeteria about that. Think retro with orange, green and brown décor looking like the soviet canteens from the 70s and 80s. Order the local faves such as soup or try the steak wrapped in bacon with eggs.
Dio this is another Hungarian favorite where you can find local goulash and choice meat selections. Known as the place where Hungarian folk art motifs are unified in harmony with the fashionable features of modern, locals visit at lunch and tourists for dinner. It's right in the heart of the city near Sas Street.
The author's trip to Budapest was sponsored by the Hungarian National Tourist Office. The opinions expressed here are her own and Budapest is a city she adores.


text:
package com.amazonaws.services.config.model.transform;

import static com.amazonaws.util.StringUtils.UTF8;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.util.Map;
import java.util.List;

import com.amazonaws.AmazonClientException;
import com.amazonaws.services.config.model.*;
import com.amazonaws.transform.Marshaller;
import com.amazonaws.util.BinaryUtils;
import com.amazonaws.util.StringUtils;
import com.amazonaws.util.IdempotentUtils;
import com.amazonaws.util.StringInputStream;
import com.amazonaws.util.json.*;

/**
 * RecordingGroupMarshaller
 */
public class RecordingGroupJsonMarshaller {

    /**
     * Marshall the given parameter object, and output to a SdkJsonGenerator
     */
    public void marshall(RecordingGroup recordingGroup,
            SdkJsonGenerator jsonGenerator) {
        if (recordingGroup == null) {
            throw new AmazonClientException(
                    "Invalid argument passed to marshall(...)");
        }

        try {
            jsonGenerator.writeStartObject();

            if (recordingGroup.getAllSupported() != null) {
                jsonGenerator.writeFieldName("allSupported").writeValue(
                        recordingGroup.getAllSupported());
            }
            if (recordingGroup.getIncludeGlobalResourceTypes() != null) {
                jsonGenerator.writeFieldName("includeGlobalResourceTypes")
                        .writeValue(
                                recordingGroup.getIncludeGlobalResourceTypes());
            }

            com.amazonaws.internal.SdkInternalList<String> resourceTypesList = (com.amazonaws.internal.SdkInternalList<String>) recordingGroup
                    .getResourceTypes();
            if (!resourceTypesList.isEmpty()
                    || !resourceTypesList.isAutoConstruct()) {
                jsonGenerator.writeFieldName("resourceTypes");
                jsonGenerator.writeStartArray();
                for (String resourceTypesListValue : resourceTypesList) {
                    if (resourceTypesListValue != null) {
                        jsonGenerator.writeValue(resourceTypesListValue);
                    }
                }
                jsonGenerator.writeEndArray();
            }

            jsonGenerator.writeEndObject();
        } catch (Throwable t) {
            throw new AmazonClientException(
                    "Unable to marshall request to JSON: " + t.getMessage(), t);
        }
    }

    private static RecordingGroupJsonMarshaller instance;

    public static RecordingGroupJsonMarshaller getInstance() {
        if (instance == null)
            instance = new RecordingGroupJsonMarshaller();
        return instance;
    }

}

redpajama_set_name: RedPajamaGithub


text:
<!doctype html>

Favicon Status

    Example of script to dynamically set favicon.

    <button onclick="setTabStatusIcon('not-started')">Not Started</button>
    <button onclick="setTabStatusIcon('in-progress')">In Progress</button>
    <button onclick="setTabStatusIcon('fail')">Fail</button>
    <button onclick="setTabStatusIcon('pass')">Pass</button>


text:
//CakeJS.TestSuite.Fixture.FixtureManager

//Utilities
import isEmpty from '../../Utilities/isEmpty';
import {Inflector} from '../../Utilities/Inflector';

// Datasource
import {ConnectionManager} from '../../Datasource/ConnectionManager';

//Singelton instances
import {ClassLoader} from '../../Core/ClassLoader'

// Exception
import {NotImplementedException} from '../../Exception/NotImplementedException';
import {UnexpectedValueException} from '../../Exception/UnexpectedValueException';
import {Exception} from '../../Core/Exception/Exception';

export class FixtureManager
{
	_initialized = false;
	_fixtureMap = {};
	_loaded = {};

	_initDb()
	{
		if (this._initialized === true) {
			return;
		}

		this._aliasConnections();
		this._initialized = true;
	}

	_aliasConnections()
	{
		let connections = ConnectionManager.configured();
		if(connections.length === 0){
			return;
		}
		ConnectionManager.alias('test', 'default');
		let map = {};
		for (let connection of connections) {
			if (connection === 'test' || connection === 'default') {
				continue;
			}

			if (connection in map) {
				continue;
			}

			if (connection.indexOf('test_') === 0) {
				map[connection] = connection.substr(5);
			} else {
				map['test_' + connection] = connection;
			}
		}

		for (let alias in map) {
			let connection = map[alias];
			ConnectionManager.alias(alias, connection);
		}
	}

	/**
	 * Replacement function for TestCase constructor because of how
	 * javascript and PHP differs when it comes to initialization.
	 *
	 * This method will be called upon loading tests.
	 *
	 * @param {TestFixture} fixture The TestFixture to initialize.
	 *
	 * @return {void}
	 */
	initFixture(test)
	{
			test.construct();
			test.init();
	}

	async load(test)
	{
		if (!('fixtures' in test)) {
			return;
		}

		let fixtures = test.fixtures;
		if (fixtures.length === 0 || ('autoFixtures' in test && test.autoFixtures === false)) {
			return;
		}

		let createTables = async (db, fixtures) => {
			let schemaCollection = db.schemaCollection();
			let tables = schemaCollection.listTables();
			for (let f in fixtures) {
				let fixture = fixtures[f];
				if (fixture.created.indexOf(db.configName()) === -1) {
					await this._setupTable(fixture, db, tables, test.dropTables);
				} else {
					fixture.truncate(db);
				}
			}
		}

		await this._runOperation(fixtures, createTables);

		let insert = async (db, fixtures) => {
			for (let f in fixtures) {
				let fixture = fixtures[f];
				await fixture.insert(db);
			}
		}

		await this._runOperation(fixtures, insert);
	}

	async _runOperation(fixtures, operation)
	{
		if (typeof operation !== 'function') {
			throw new InvalidParameterException();
		}

		let dbs = this._fixtureConnections(fixtures);
		for (let connection in dbs) {
			let fixtures = dbs[connection];
			let db = ConnectionManager.get(connection, false);
			await operation(db, fixtures);
		}
	}

	_fixtureConnections(fixtures)
	{
		let dbs = {};

		for (let i = 0; i < fixtures.length; i++) {
			let f = fixtures[i];
			if (f in this._loaded) {
				let fixture = this._loaded[f];
				if(!(fixture.connection in dbs)){
					dbs[fixture.connection] = {};
				}
				dbs[fixture.connection][f] = fixture;
			}
		}
		return dbs;
	}

	fixturize(test)
	{
		this._initDb();
		if (!('fixtures' in test)) {
			return;
		}

		if (typeof test.fixtures === 'string') {
			test.fixtures = test.trim().split(',');
		}

		if(test.fixtures.length === 0){
			return;
		}

		this._loadFixtures(test);
	}

	_loadFixtures(test)
	{
		if (!('fixtures' in test)) {
			return;
		}

		if (typeof test.fixtures === 'string') {
			test.fixtures = test.trim().split(',');
		}

		if(test.fixtures.length === 0){
			return;
		}

		for (let fixture of test.fixtures) {
			if (fixture in this._loaded) {
				continue;
			}

			let explode = fixture.split('.', 2);
			let type = explode[0];
			let pathName = explode[1];
			let path = pathName.split('/');
			let name = explode.pop();
			let additionalPath = '';
			for (let i = 0; i < path; i++) {
				additionalPath += path + '\\';
			}

			let baseNamespace = '';
			if (type === 'app') {
				baseNamespace = TESTS;
			}

			name = Inflector.camelize(name.replace('\\', ''));
			let nameSegments = [
				baseNamespace,
				'Fixture',
				additionalPath
			];

			let classPath = '';
			for (let i = 0; i < nameSegments.length; i++) {
				classPath += nameSegments[i] + DS;
			}

			let className = name + 'Fixture';
			if (ClassLoader.classExists(className, classPath)) {
				let fixtureClass = ClassLoader.loadClass(name + 'Fixture', classPath);

				this._loaded[fixture] = new fixtureClass();
				this.initFixture(this._loaded[fixture]);
				this._fixtureMap[name] = this._loaded[fixture];
			} else {
				let msg = global.sprintf(
					'Referenced fixture class "%s" not found. Fixture "%s" was referenced in test case "%s".',
					className,
					fixture,
					test.constructor.name
				);
				throw new UnexpectedValueException(msg);
			}
		}
	}

	loaded()
	{
		return this._loaded;
	}

	async loadSingle(name, db = null, dropTables = true)
	{
		if (name in this._fixtureMap) {
			let fixture = this._fixtureMap[name];
			if (db === null) {
				db = ConnectionManager.get(fixture.connection);
			}
			if (fixture.created.indexOf(db.configName()) === -1) {
				let sources = db.schemaCollection().listTables();
				await this._setupTable(fixture, db, sources, dropTables);
			}

			if (dropTables === false) {
				fixture.truncate(db);
			}
			await fixture.insert(db);
		} else {
			throw new UnexpectedValueException(global.sprintf('Referenced fixture class %s not found', name));
		}
	}

	async _setupTable(fixture, db, sources, drop)
	{
		if (fixture.created.length > 0 && fixture.created.indexOf(db.configName()) !== -1) {
			return;
		}
		let table = fixture.table;
		let exists = (table in sources);
		if (drop && exists) {
			await fixture.drop(db);
			await fixture.create(db);
		} else if (!exists) {
			await fixture.create(db);
		} else {
			fixture.created.push(db.configName());
			await fixture.truncate(db);
		}
	}

	async shutdown()
	{
		let shutdownFunction = async (db, fixtures) => {
			let connection = db.configName();
			await Object.forEach(fixtures, async (fixture) => {
				if (!isEmpty(fixture.created) && fixture.created.indexOf(connection) !== -1) {
					await fixture.drop(db);
				}
			});
		};

		await this._runOperation(Object.keys(this._loaded), shutdownFunction);
	}
}


text:
package com.palantir.cassandra.multinode;

import com.google.common.collect.ImmutableList;
import com.palantir.atlasdb.containers.ThreeNodeCassandraCluster;
import java.util.Arrays;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;

@RunWith(Suite.class)
@Suite.SuiteClasses({
    LessThanQuorumNodeAvailabilityTest.class,
    TwoNodesDownGetTest.class,
    TwoNodesDownMetadataTest.class,
    TwoNodesDownPutTest.class,
    TwoNodesDownTableManipulationTest.class
})
public final class TwoNodesDownTestSuite extends NodesDownTestSetup {

    @BeforeClass
    public static void setup() throws Exception {
        NodesDownTestSetup.initializeKvsAndDegradeCluster(
                Arrays.asList(TwoNodesDownTestSuite.class
                        .getAnnotation(Suite.SuiteClasses.class)
                        .value()),
                ImmutableList.of(
                        ThreeNodeCassandraCluster.FIRST_CASSANDRA_CONTAINER_NAME,
                        ThreeNodeCassandraCluster.THIRD_CASSANDRA_CONTAINER_NAME));
    }
}


§ Tool Box Cake: For the Dad who is a handyman, this delicious ice cream cake features decorative chocolate tools and blue icing and can be personalized with a special Father's Day message.
§ Ice Cream Float Cake: This classic roll cake is transformed into a tasty ice cream cake float topped with scoops of ice cream, whipped cream and a cherry.
§ Cap & Diploma Cake: This sheet cake features a cap and diploma highlighted with rose buds, chocolate drizzle and a fudge border and can be customized with any school's colors.
Named the top ice cream and frozen dessert franchise in the United States by Entrepreneur magazine's 35th annual Franchise 500® ranking, Baskin-Robbins is the world's largest chain of ice cream specialty shops. Baskin-Robbins creates and markets innovative, premium hard scoop ice cream and soft serve, custom ice cream cakes and a full range of beverages, providing quality and value to consumers at 7,300 retail shops in nearly 50 countries. Baskin-Robbins was founded in 1945 by two ice cream enthusiasts whose passion led to the creation of more than 1,000 ice cream flavors and a wide variety of delicious treats. In 2013, more than 13 million ice cream cakes were sold in Baskin-Robbins shops worldwide. Headquartered in Canton, Mass., Baskin-Robbins is part of the Dunkin' Brands Group, Inc. (Nasdaq: DNKN) family of companies. For further information, visit www.BaskinRobbins.com.


Check-outs are seemingly becoming a part of the tenancy process which is neglected by large numbers of landlords and tenants.
During a check-out, a landlord or the agent that represents them records the condition of the rental property and compares this to the condition that was recorded at check in.
The purpose of the process is to allow both sides of the rental transaction to discuss the property's condition and resolve any issues efficiently and fairly, aiming to reduce the chances of a formal dispute.
Last month one of the three Government-approved tenancy deposit protection schemes, the Deposit Protection Service (DPS), published a report with some very interesting and quite worrying statistics.
The DPS surveyed over 8,000 tenants and found that 48% had not attended their check-out.
What's more, 46% of those didn't attend said they had either not been invited or were not informed of the date or time by their landlord or letting agent.
It would seem that landlords need to do more to give their tenant the opportunity to attend check-out and that some tenants need to try harder to attend the event when given the chance.
"Checkouts are one of the most important stages of any tenancy. It's vital that landlords enable tenants to attend – and that tenants go along when invited," says Julian Foster, Managing Director of the DPS.
Why are check-outs so important?
Put simply, a successful check-out can help reduce the chance of a deposit dispute. It provides a landlord with a clear and more impartial means of documenting the state of the property between the beginning and the end of a tenancy.
A check-out is the tenant's opportunity to put their case across and physically show or explain the detail behind any damage or dilapidations incurred during the tenancy.
What's more, it's a situation where face-to-face communication really comes into its own. If a landlord and their tenant are both in the property at the same time they can discuss and negotiate any issues which will significantly help to reduce the likelihood of a formal dispute – which can of course be costly, stressful and time-consuming.
As we move into one of the busiest periods of rental activity with students returning to university and many families looking to relocate before Christmas and New Year, now is the time for landlords to recognise the importance of the check-in/check-out process and encourage their tenants to attend where possible.


RALPH G. RATCLIFF, M.D.; MELVYN D. WOLF, M.D.
This communication reports the occurrence of avascular necrosis of the femoral head in 2 patients with sickle cell trait (AS hemoglobin). Although this is known to occur in both sickle cell anemia (SS hemoglobin) (1) and in some of its genetic variants (2), we are unaware of any reports of avascular necrosis of the femoral head in association with pure sickle cell trait.
Standard hematologic techniques were utilized for complete blood counts (3). Sickle cell tests were performed using 2% sodium metabisulfite (3).
Fetal hemoglobin content was determined by the method of Singer, Chernoff, and Singer (4).
Published: Ann Intern Med. 1962;57(2_Part_1):299-304.


text:
Pair Pocket-Dials 911 During Drug Deal
Dispatcher Overhears Deal About Drugs
Two people were arrested in Palm Bay and accused of dealing drugs when they accidentally dialed 911 from their cellphone.Janelle Litton, 25, and Joshua Justice, 20, were overheard by 911 dispatchers discussing drugs when Litton's phone pocket-dialed authorities. Click Like For Central Florida News Updates:"Don't do all of it. I'm not saying you can't do some of it, but don't do all of it," Justice was allegedly overheard saying on the 911 call. "You owe me 200.""How about a hundred? An extra hundred on the last deal," Litton allegedly said on the 911 recording.Deputies said when the 911 center receives a call that no one answers, they have to listen to what is going on in the background.An informant called police at the same time and said they were witnessing a drug deal at a Waffle House on Malabar Road. Police used the witness description and the 911 connection to trace the car, which was Litton's vehicle.Officers said that within 16 minutes they spotted Litton's car on Underhill Road."Uh oh. Oh my God, it's a cop," Litton was accused of saying on the 911 call. "Put this thing up."Authorities said they knew they had the evidence when they pulled Litton over."It clearly shows that some sort of drug transaction was going on and attempts to get rid of drug evidence," said Palm Bay Police spokeswoman Yvonne Martinez.Officers said found drugs in the car and then told Litton about her pocket-dial."Your phone's on," said the officer."My phone's on? I don't have a cellphone working right now," Litton allegedly told officers on the 911 call."The 911 always works, miss," said the officer.Litton is charged with driving under the influence of drugs. Justice is charged with possession of cocaine and drug paraphernalia. .mostpoplink a:link, a:active, a:visited {text-decoration: none} .mostpoplink A:hover {text-decoration: underline;} Most Popular Stories On WESH.com
PALM BAY, Fla. —
Two people were arrested in Palm Bay and accused of dealing drugs when they accidentally dialed 911 from their cellphone.
Janelle Litton, 25, and Joshua Justice, 20, were overheard by 911 dispatchers discussing drugs when Litton's phone pocket-dialed authorities.
Click Like For Central Florida News Updates:
"Don't do all of it. I'm not saying you can't do some of it, but don't do all of it," Justice was allegedly overheard saying on the 911 call. "You owe me 200."
"How about a hundred? An extra hundred on the last deal," Litton allegedly said on the 911 recording.
Deputies said when the 911 center receives a call that no one answers, they have to listen to what is going on in the background.
An informant called police at the same time and said they were witnessing a drug deal at a Waffle House on Malabar Road. Police used the witness description and the 911 connection to trace the car, which was Litton's vehicle.
Officers said that within 16 minutes they spotted Litton's car on Underhill Road.
"Uh oh. Oh my God, it's a cop," Litton was accused of saying on the 911 call. "Put this thing up."
Authorities said they knew they had the evidence when they pulled Litton over.
"It clearly shows that some sort of drug transaction was going on and attempts to get rid of drug evidence," said Palm Bay Police spokeswoman Yvonne Martinez.
Officers said found drugs in the car and then told Litton about her pocket-dial.
"Your phone's on," said the officer.
"My phone's on? I don't have a cellphone working right now," Litton allegedly told officers on the 911 call.
"The 911 always works, miss," said the officer.
Litton is charged with driving under the influence of drugs. Justice is charged with possession of cocaine and drug paraphernalia.
.mostpoplink a:link, a:active, a:visited {text-decoration: none} .mostpoplink A:hover {text-decoration: underline;}
Most Popular Stories On WESH.com


With increased customer sophistication and on-the-go lifestyle, R&C companies have to adapt to a fast-developing digital world. Using digital options and social media allows producers and advertisers to engage directly with customers, which changes the rules of the game. Our team can help you manage the new market shifts to your best advantage.