PEETZ, Colo. — Two rural Colorado teams set a new state record for most points scored in a high school football game Saturday.
The Peetz Bulldogs defeated the Briggsdale Falcons 101-85. According to CHSAA Now, the 186 combined points are the most ever scored by two high school teams in Colorado.
Briggsdale and Peetz are both in northeast Colorado, but they are about 90 minutes away from one another by car.
The previous state record was held by two other Eastern Plains teams: Hugo and Vona. In 1930, Hugo walloped Vona 176-6, according to CHSAA.


Galaxy S9 and S9 Plus supercharge cameras to take on iPhone X Samsung's new super phones get variable aperture cameras and fix their fingerprint reader flaw for 2018. But they keep a familiar look and feel.
The Galaxy S9 takes the all-screen design to new heights.
A bold new camera, a state-of-the-art processor with an Android Oreo operating system and a fix to the Galaxy line's biggest design misstep -- all in a body that looks strikingly similar to last year's model.
That, in a nutshell, is the Samsung Galaxy S9 (5.8-inch screen) and its larger step-up model, the Galaxy S9 Plus (6.2-inch screen).
You can preorder them March 2 at prices starting from $720 in the US for the standard S9 and $870 for the S9 Plus, depending on your carrier.
The phones are unquestionably beautiful, but what do we get with these slightly curved, all-screen specimens?
The second improvement is more of a fix. Samsung moved the fingerprint reader from the side of the rear camera to the center of the phone's back, fixing what was without a doubt the Galaxy S8's most maddening design flaw. Last year's model made you stretch your finger awkwardly to hit the fingerprint target. No more.
I loved the wild card bursts of color in coral blue and lilac purple on the phone's body, which jolt the Galaxy line from its monochromatic stupor. (Yes, you can still get the S9s in sedate black or gray.) And the two phones keep tried-and-true high-end phone features such as waterproofing (rated IP68), wireless charging and support for external microSD storage.
So, yeah: All the good stuff you'd expect is here, which is why I walked away from my Galaxy S9 hands-on time feeling great about these two phones. That said, I felt that Samsung fell flat when it came to countering the two big features of its archrival, the iPhone X ($1,099.99 at Best Buy). The Galaxy S9's Intelligent Scan unlock option doesn't measure up to Apple's Face ID, and Samsung's AR Emoji feature lacks the charm and verve of iPhone's animojis -- they came off as eerie and unfinished. More on that below.
This rivalry with iPhone features is important because Samsung's marquee handsets stand in direct competition to the iPhone X, 8 and 8 Plus. In a landscape where premium phones are more similar than they are different, Samsung has struggled to capture the same cultural zeitgeist as the iPhone, or introduce headline-grabbing innovations like Apple's Face ID and gestural navigation. That nifty in-screen fingerprint reader would've been just the ticket, but it's MIA here.
Will the Galaxy S9 and S9 Plus stand up to the iPhone X, Google Pixel 2 ($639.99 at Amazon Marketplace) and others? Are they worth an upgrade from the Galaxy S8 and older phones? Keep reading for price, preorder and sale dates, and all the details.
Preorders begin March 2 and the phones go on sale March 16, for more than last year's S8 and S8 Plus -- that's the dual-aperture camera tech talking. Carriers and retailers will announce local prices.
For example, we know that the S9 goes for between $720 and $800 in the US, with the S9 Plus ringing in for between $840 and $930.
The S9 and S9 Plus cost a little more than last year's models.
In the UK, you're looking at £739 for the S9 and £869 for the S9 Plus from Samsung's website. In Australia the S9 starts at AU$1,199, with the S9 Plus starting at AU$1,349.
One thing you should know is that Samsung wants to drum up upgrades by launching a global program called Trade Up and Save. Basically, the company will give you credit for turning in your old phone and buying a new Galaxy. In the US, you can earn up to $350, but it will vary by country.
Samsung's program is separate than trade-in programs from your carrier and other big box stores and websites.
The Galaxy S9 and S9 Plus will sell in lilac purple, coral blue, midnight black and titanium gray, but not every country will get every color. For example, the phones won't sell in gray in the US, at least not at launch.
Apart from their size, the biggest difference between the S9 and S9 Plus is the presence of a second lens on the back of the Plus.
This second lens, a telephoto, is dedicated to creating those depth-of-field portrait shots that blur the background to make people and objects pop. This is Samsung's second phone to catch the trend, after last August's Galaxy Note 8 ($900.00 at Amazon.com).
The Galaxy S9 borrows heavily from core S8 features and design, often making fractional adjustments or generational improvements rather than enormous overhauls. That's not bad per se, especially when the S8 was so good overall.
The Galaxy S9, left, moves the fingerprint reader below the camera -- much better than the placement on the Note 8, right, and S8.
For example, the battery capacities remain the same as last year's models, but the new Snapdragon 845 chipset promises to eke out a little more battery life by being more efficient overall. Also, while the camera megapixels hold steady at 12 for the rear and 8-megapixels for the front, respectively, additional features and underlying improvements claim to boost photo quality.
While the Galaxy S9's camera megapixels hold steady, the camera itself is bundled with new features. The coolest is the mechanical aperture that automatically switches between two aperture settings -- F2.4 for daylight and F1.5 for low light -- to give you better low light shots.
The S9 and S9 Plus want to up the game on low light photos.
This part bears repeating: The aperture is mechanical, you can watch it physically move from one setting to another, a change you can see with your naked eye. This feature, previously only seen in DSLR cameras, kicks in automatically, but you can also manually select an aperture in the pro camera settings. We're all excited to see how this plays out against the iPhone X and the Google Pixel 2, our current low-light champ.
The rear cameras continue to support OIS, or optical image stabilization, which helps reduce blur and shake in photos and videos.
Two cameras helps achieve the depth of field needed for portrait shots, but background blur can also occur through a single lens and software, like on the Pixel 2 phones. As with the iPhone X, the Galaxy S9 phones introduce a portrait mode for the front-facing camera. You find it in the camera settings.
The new "selfie focus" mode blurs your background to emphasize your face.
The videographer for my friend's wedding once said "slow motion is emotion". The adage stuck with me, and it's what makes the Galaxy S9's use of super slow-motion video work.
The Galaxy S8's slow-mo video topped out at 720 fps (frames per second) in HD quality, but the S9 shoots at a peak of 960 fps, which really stretches out those frames. So 0.2 recorded seconds becomes 6 seconds of playback.
Note that the entire video won't run in slow motion. It'll start and end at the usual 30 fps, with the extraaa-slowww footage in between. You can set this yourself manually or let the program pick for you.
Once your (MP4) video is set in stone, the S9 will also create an animated GIF that you can share over any messaging app. You can loop it, reverse the order of the action and set the slow-motion GIF as your wallpaper.
Sony's Xperia XZ Premium pioneered this level of slow-mo back in 2017.
A new tool inside the camera says it'll calorie-count your food.
Bixby Vision is a tool that lives inside the camera app. You can tap the eye icon to bring it up. It handles translations, shopping and other tools through optical image recognition.
Samsung adds a calorie calculator in Bixby Vision (yes, you go through the motions to take a photo of your meal, and it estimates the calorie count), as well as a makeup app that superimposes new makeup colors and looks over your face. Sephora and Cover Girl are the first partners.
Some additional work under the hood means that photos should have up to 30 percent less image noise, meaning they'll look clearer when you blow them up or zoom in tight. This is because the camera has its own memory, called DRAM, which works four times faster to select the best images from multiple shots. DRAM is also what helps make super slow-motion video possible.
The iPhone X hooked phone owners on the idea of turning their faces into animated emojis of bunnies, robots and, yes, poop.
This is me, apparently, thinking really hard about AR Emoji.
Samsung's response is AR Emoji, a feature that scans your unsmiling face to set up a library of 18 stickers you can use to express yourself in messaging apps or any platform that works with the animated GIF format. It's a bit like Bitmoji and lets you customize your avatar's hair and clothes.
You can also record a video message of yourself, either as a human avatar or as a nonhuman, so you could be a rabbit or a Disney character. You swipe from the camera interface to get started, but Samsung also plans to open the feature up to third-party apps. The emoji saves as an MP4 video file.
So far, six CNET editors have tried it out, and the experience was definitely subpar. AR Emoji need to be much more nuanced to feel like "you," and they need to track your smile. The avatars didn't match our skin and hair tones, and were unable to naturally smile when we did. Creepy.
Samsung adapted the iPhone X's face unlock tool and animated emoji messages, and stumbled both times.
Samsung's answer to Face ID doesn't map your face with tens of thousands of infrared dots like the iPhone X does. It combines two previous Galaxy S8 unlock mechanisms into one: iris scanning, which is secure, and face unlock, which isn't.
The idea is that the S9 tries to unlock the phone with your eyes first. If that fails, because you're wearing the wrong kind of sunglasses or the scene is too dark, Intelligent Scan will immediately fall back to face unlock, which will be fast and convenient.
Your fingerprint and iris are still the most secure ways to unlock your phone.
The problem is that face unlock isn't secure, which means that you can't count on Intelligent Scan to be secure all the time, or keep other faces from unlocking your phone.
I just don't get the point of promoting insecure access. You're better off sticking with the fingerprint reader and iris scanner.
DeX is Samsung's platform for turning a Galaxy phone into a desktop experience. You dock the phone and see the contents on a larger screen.
It's mostly aimed at business cases, as in banks and hotels that could benefit from showing customers the same canned presentations on a smaller device and on a larger screen. Imagine a timeshare presentation, for example, or some mortgage options.
The DeX Pad, the newest iteration, one-ups last year's DeX dock ($122.59 at Amazon.com) by laying the phone flat. You still plug it in through a USB-C jack, but the new arrangement exposes the phone's headset jack so that's accessible if you're gaming.
The new DeX Pad design also lets you use the screen as a touchpad and digital keyboard, instead of a mouse and physical keyboard. You can adjust the resolution and sensitivity. The DeX Pad is also compatible with the Galaxy S8, S8 Plus and Note 8.
My hands-on time with the Galaxy S9 and S9 Plus was long enough to get a sense of the new features, but not long enough to thoroughly test either device. I don't have a final opinion on the S9, but I do have some general suggestions.
You'll see the most speed, design and camera improvements if you're upgrading from a 2016 phone or earlier -- especially if you're dying to taking portrait photos. In that case, the larger S9 Plus is your best bet. If you can live without portrait pics, the S9 is a smaller device that will also save you a little cash over the Plus model.
If you're not in dire need of a new phone the moment the S9s become available, wait for my full review to see which cons you can live with and which pros you can't live without.
It's not looking like the S9 phones will cut it. Samsung's AR Emoji and Intelligent Scan clearly need work. But if neither of those features do it for you, no matter. They amount to tiny additions that will be easy to ignore and shouldn't make much difference in day-to-day use.
Galaxy S9 Plus: Why bigger is better this year.
Samsung's king of phones is excellent, but you'll pay a pretty penny for stylus privileges.
LG just gave Samsung a run for the money.
The Pixel 2's superb camera makes it worth a look.


I am today announcing the Government's decision on pay for the senior civil service, senior military and police and crime commissioners.
The Government received the Senior Salary Review Body's (SSRB) report on 2018 pay for the senior civil service, senior military and police and crime commissioners on 4 July 2018.
The Government is committed to world class public services and ensuring that public sector workers are fairly paid for the vitally important work they do. We ended the 1 per cent pay policy in September 2017 because we recognised more flexibility is now required to deliver world class public services - with higher awards in return for improvements to public sector productivity.
It is vital that we consider all pay awards in light of wider pressures on public spending. Public sector pay needs to be fair both for public sector workers and the taxpayer. In reaching a final decision on all 2018/19 public sector pay awards, we have balanced a need to recognise the value and dedication of our hard-working public servants with ensuring that our public services remain affordable in the long term, to contribute to our objective of reducing public sector debt. We have also sought to ensure that pay awards are fair and consistent across public sector workforces, reflect existing pay and benefit packages, as well as recruitment and retention levels.
The Government values the independent expertise and insight of the SSRB and takes on board the valuable advice, principles outlined, and constructive challenge to the Government's recommendations outlined in the report. Within the current context there remains a need to take into account affordability when making decisions on senior pay, as well as fairness in the approach for senior and junior grades.
The Government's evidence to the SSRB in December 2017 set out a vision for a future SCS Pay framework which - in line with the Civil Service Workforce Plan - will help us attract, retain and develop the very best senior talent for government.
This new pay system will aid us in achieving our vision for a future SCS which is more diverse, experienced and professionalised, with a better mix of specialist and generalist leaders.
We are pleased that the SSRB welcome the direction of travel laid out in our vision for the future SCS and look forward to engaging with SSRB to further articulate our strategic plan to reach this vision.
move to a set of consistent pay ranges by professional grouping over time.
provide greater reward for high performers and those who develop capability by remaining in role.
explore options for reforming the SCS performance management system.
Taken together, this will start tackling some of the biggest issues identified with the current pay system as well as ensuring that the Civil Service is able to attract and retain key, scarce skills from the external market and balancing incentives in the current system.
The Government values the independent expertise and insight of the SSRB and takes on board the valuable advice, principles outlined, and constructive challenge to the Government's recommendations outlined in the report.
Within the current context there remains a need to take into account affordability when making decisions on senior pay, as well as fairness in the approach for senior and junior grades.
all SCS members should receive a 1 per cent consolidated basic pay increase.
0.25 per cent of the paybill should be used to increase the pay band minima for all pay bands to £68,000, £90,500, and £111,500 respectively.
the pay range maxima are reduced for new recruits and those currently paid below the new maxima, to £102,000, £136,000, and £167,500 respectively.
The Cabinet Office should provide evidence to demonstrate the application of the award to specific target groups of staff.
the introduction of a corporate recognition scheme with awards of around £1,000.
The Government accepts the recommendation to increase the minima for all pay bands to the figures suggested by SSRB. The Government also agrees that the 1 per cent pay award should be applied after any increases from the raising of the minima.
The Government agrees in principle to the recommendation to reduce the maxima for SCS in non-market facing or niche roles . This will not be achievable for this year's pay round as further consultation is needed to understand the makeup and workability of professional groupings before pay ranges are set.
The Government accepts the recommendation to set aside further money to address pay anomalies, and agrees to provide clear criteria for use. However to put aside the 1.25 per cent suggested would move significantly away from coherence between the approach for SCS and delegated grades and risks affordability issues. Efficiencies found from controlling movement around the system will be put aside to cover anomalies and increases to the minima, and we anticipate this to be 0.25 per cent rather than the 1.25 per cent SSRB proposed.
The Government accepts the recommendation to monitor the use of the aforementioned pay anomalies money, as well as the recommendation to extend in year non-consolidated performance related awards to 20 per cent of the eligible population and introduce a new recognition scheme for corporate contribution.
providing a clear articulation of the desired application of the SCS pay system, be that centralised management of the workforce, delegation to departments or a specified balance between the two.
review the SCS performance management system as a priority.
outlining clear guidance and principles to ensure the workability and fair application for the movement to pay ranges based on professional groupings.
exploring options for a credible capability based salary progression model.
providing a clear proposal on the future of the SCS 1A grade.
The Government would like to work proactively with SSRB to help develop our proposals further and invites the review body to contribute towards the further review of the Senior Civil Service pay framework including the commitments made above.
The Government has accepted the spirit of the recommendation of a 2.5 per cent increase to senior military salaries with effect from 1 April 2018 with a 2 per cent increase to pay and a 0.5 per cent non-consolidated one-off payment. This decision is made to be consistent with the main Armed Forces' pay award and in consideration of long term affordability. The Government has also accepted the recommendation that there is no change to the current pay differentials for senior medical and dental officers.
The Government has accepted in part the SSRB's recommendation to increase the bottom four PCC salary bands. With effect from 1 May 2018, these pay bands will be increased by 2 per cent. PCCs taking on responsibility for the governance of fire and rescue services will also receive an additional consolidated allowance of £3,000.
The Government has accepted the SSRB's recommendation that PCC pay should be reviewed again in 2020/21 to enable a full assessment of the role, particularly in light of the additional responsibilities for fire and rescue services; thereafter, full reviews should be conducted on a four-yearly basis. However, future reviews should be aligned to the PCC electoral cycle. A further review should therefore take place to set PCC pay ahead of the 2024 elections.
The SSRB also recommended that from May 2019, PCC salaries should be increased by 2 per cent in line with the pay award for local authority staff and that this link should continue annually until the next formal review of PCC pay. The Government has not accepted this recommendation. The role of PCCs continues to evolve and the Government is of the view that automatic pay increases are not appropriate while change is ongoing. The Government also seeks to avoid creating a disparity between PCCs and police officers whose pay increases are not automatic.
The SSRB recommended that a review of the pay structures for PCCs should be conducted in advance of the next formal review of PCC pay. The Government has not accepted this recommendation. PCC pay structures are currently aligned to those of chief police officers, and their pay is under review as part of sector-led reforms to deliver a new pay and reward framework. PCC pay structures will be reviewed following the completion of the on-going review of chief officer pay.
The SSRB recommended that PCCs who lose their seat at election should be entitled to a loss of office payment. The Government will further consider the issue.


text:
Q: event listener show/hide div that's populated from a loop I have a forEach looping through a DB to print out the comments on a photo. each comment has an edit form with an edit and delete button. When the edit button is pressed it adds a class ".show" to the ".editForm".
The problem is that this only works for the first comment when the edit button is clicked...it wont add the class .show to any other div(form) except the first instance.
Im trying to do this > when I click the edit button, show the form below the comments to be able to edit it.
CSS
.editForm {
    display: none;
}
.editForm.show{
    display: block;
}

JS
document.querySelector(".editButton").addEventListener("click", function(){
    document.querySelector(".editForm").classList.toggle("show");
});

See picture here:

You can see that it worked for the first one. but for the second one if I look in the console, the button does nothing and is not adding the class...

Also, do i need to learn AJAX to be able to edit the comment "in place" ?? rather than opening a form > populating content > changing it > post route

A: querySelector() only returns the first matching element. You need to use querySelectorAll() to get all of them. It returns a NodeList, so you'll need to loop over it to process all of them. Then you'll need to use DOM traversal to find the related .editForm element.
My code below assums the editButton and editForm elements are both children in the same DIV. You might need to tweek it based on your actual HTML.
Array.from(document.querySelectorAll(".editButton")).forEach(button => button.addEventListener("click", function(){
    this.parentNode.querySelector(".editForm").classList.toggle("show");
    })
);

If you decide to use jQuery, the equivalent is:
$(".editButton").click(function() {
    $(this).closest("div").find(".editForm").toggleClass("show");
});

A: When you use a CSS class, javascript will usually only hit the first instance of that class, and then break on the rest. What you will probably need to do instead is to create unique ids for the html elements (you can add the style="display:none;" directly to the html element to avoid having to worry about the CSS file covering all possible ids), and then in JS as well. For example, if you were using PHP you could do something like this:
<?php foreach($db_row as $item): ?>
document.querySelector("#editButton-<?php echo $item['id'] ?>").addEventListener("click", function(){
    document.querySelector("#editForm-<?php echo $item['id'] ?>").classList.toggle("show");
});
<?php endforeach; ?>

redpajama_set_name: RedPajamaStackExchange


text:
Child Porn Investigation from Mass. Leads to Charges in Mississippi
A child pornography investigation that began in Massachusetts has led to federal charges in Mississippi against a Georgia man accused of having sex with a girl who was 3 or 4 years old, according to a complaint filed Monday.
The complaint filed in U.S. District Court in Jackson, Miss., charges Marco Laquin Rogers, 26, of Atlanta, with sexual exploitation of a child.
The complaint says a child pornography investigation and the Sept. 6 arrest of another man, Jeremy Atral Hodges, 25, of Cambridge, Mass., led authorities to Rogers.
The criminal complaint in Rogers' case says that Hodges and Rogers both had sex with the child at a Jackson hotel on May 25, but the complaint charges only Rogers with a crime. A video of the assault shows the girl crying out in pain, according to an affidavit that accompanies the complaint.
Court records said both Hodges and Rogers are originally from Mississippi, but have been living in other states.
Hodges faces a pornography possession charge in Massachusetts. Stephanie Guyotte, a spokeswoman for the Middlesex County district attorney's office in Massachusetts, said Hodges was arraigned Sept. 7 and released to home confinement on a $1,000 bond. He's required to wear a GPS tracking device and can't have contact with children or use a computer, she said.
An affidavit in the complaint against Rogers, written by a Homeland Security Investigations agent, said the investigation began after Hodges asked another man in Massachusetts if he liked young girls and showed him explicit images of children on his cellphone.
Hodges told the man that he knows someone who had "hooked him up with a couple of young girls," the affidavit said. The man kicked Hodges out of his house and called police, according to court records.
The complaint says Rogers was listed under the name "Black Perv" in Hodges' phone. Hodges allegedly told authorities that Rogers had access to a 3-year-old girl he uses for "sexual acts." The complaint also said Rogers travels with the child between Atlanta, Jackson and Memphis, Tenn., but didn't say why.
The complaint said authorities served Rogers with a court order on Sept. 28 compelling him to allow agents to photograph scars on his stomach and right leg to match them to scars on one of the men in the video.
The affidavit said Rogers works at a hospital in Atlanta, but didn't say which one or what kind of job he does.

redpajama_set_name: RedPajamaCommonCrawl


Live streaming has started to really take off in the last few years. It has become easier to start live streaming, and it has a huge potential to grow its market share for the video consumption market.
The most popular live streaming platforms are Facebook Live, the Periscope mobile app by Twitter, Twitch TV (owned by Amazon), YouTube Live by Google and LiveStream LLC. Facebook Live has so much more potential for businesses compared to the other live streaming platforms. Most businesses already have a business page built up on Facebook. Those Facebook pages will already have access to the businesses' built-in audiences they have been building over time. Furthermore, their pages will have all of their business, products, services, website and social media information on it for quick and easy access to live stream viewers. In comparison, Twitch TV only allow video gaming, live music performances and artists creating traditional and digital art. So right now Twitch TV is off limits to businesses, but Twitch TV's traffic rivals that of Youtube and Facebook – so it is a great platform to experiment with if it ever decides to open up to businesses in the future).
There are many benefits that businesses can take advantage of while live streaming. Some great things to live stream are new product demonstrations, holding a live Q&A session, responding to comments from your blog or giving a behind-the-scenes look at your business.
One of the most important benefits to live streaming is the live interaction with your audience. This is how live streaming can be more advantageous than just watching a prerecorded video on YouTube. Additionally, a potential or current customer may ask you a question during your live stream, and you can immediately respond to their question in the middle of your live stream. Or somebody may chime in with a suggestion or additional information related to your industry which you can acknowledge in the middle of your Facebook Live stream. Consequently, somebody may raise an objection or problem that they have with a product, but you can respond immediately to this and alleviate this concern.
Using these interaction techniques will turn your viewers into active participants of your live stream instead of being a passive observer. And live interaction with your audience is one of the most important ways to make your live stream engaging and compelling to view. Live streaming is a really good strategy to build rapport with your target audience and set you apart from your competitor who is not live streaming.
The last tip is about how to build a large audience using Facebook Live. Facebook is in the process of rolling out scheduled live broadcasts. This will give your interested followers and subscribers information on when your next live stream is will help you to stream to a larger audience. It also will open up a pre-live lobby, where they can gather before the broadcast begins. Just look at HBO's Game of Thrones or Westworld with its schedule set in stone that helps them to attract a large audience. Both of those shows premieres its newest episode every Sunday night around 7:00 p.m. or 8:00 p.m. depending on which timezone you live in.
Live streaming on Facebook Live will give you branding and marketing opportunities what you cannot use with mobile apps like Periscope. There are many 3rd party live streaming software that will let you make a live streaming video with graphical and text overlays that rivals the live videos that are broadcast by CNN, ESPN, ABC, NBC, CBS and Fox.
OBS is a free and open source streaming software with many plugins written for it. The software's author and the OBS community offer support for OBS on the web. Some disadvantages to OBS is that there is no virtual webcam option (and OBS has stated that it will not be adding this feature to the software). On the upside, many professional and recreational video gaming streamers on Twitch TV use OBS daily with only minor hiccups.
XSplit is a low-cost streaming software with a monthly subscription. Xsplit does support a virtual webcam that OBS lacks. Furthermore, XSplit supports streaming to multiple platforms at once, so a business can stream to Facebook Live and YouTube Live at the same time to maximize its reach. Since it is not free, its market share is smaller. Remember the popular saying that "you get what you pay for" so there are benefits for businesses going with XSplit over OBS.
Vmix is another streaming software that can ranges from free for a very limited version of the software, and then from $60 to $1200 depending on the features needed. Vmix does support virtual webcams and live streaming to multiple platforms at once. Vmix is used more for businesses who record and live stream on Youtube Live, and churches who live stream on their own website. It has some features that XSplit doesn't have like instant replay. But instant replay is limited to video cameras only so any desktop software or overlays can't be seen in the replay.
Wirecast is an expensive stream software that costs $495 or $995 depending on if you need its Studio or Pro version. Wirecast supports virtual webcams, instant replays and streaming to multiple platforms at once like its competition does. Wirecast is another streaming application used by businesses and churches, but its software quality and tech support is rated below that of Vmix, its main competitor.
Setting up 3rd party software to Facebook is fairly easy. The software will remember your settings once you set up your webcams, microphones, overlays, video sources, audio sources, special effects and text as scenes. This is really advantageous so that the next time you stream, you can go live with minimal setup time.
First, for Facebook, you will need some information from your account to connect 3rd party streaming software to it.
Go to "Publishing Tools" located on the menu at the top.
Select "Videos" from the menu on the left.
Select "+Live" from the menu at the top.
Select "Preview" and you can fill out the information on this page if you like.
Go to "Stream" from the menu on the left.
Select "Streaming Services" from the "Streaming Type" pull-down menu.
Select "Facebook Live" from the "Service" pull-down menu.
Set up your "Scenes" and "Sources" if you haven't done so already.
When you click on the "Start Streaming" button you will be live on Facebook.
Go to the "Outputs" pull-down menu.
Go to the "Set Up a New Output" slide out menu.
Click on and install the "Facebook Live" plugin.
Select "Authorize" from the "Facebook Live Properties" screen.
You can fill out the information on the "Facebook Live Properties" screen as you like.
When you click on "Facebook Live" from the "Broadcast" pull down menu you will be live on Facebook.
Facebook Live does not support 1080p resolution and 60fps (frames per second) for its live streams. Here are what settings to use in OBS, Xsplit, Vmix, and Wirecast to ensure that your stream has excellent video quality during your stream.
Bitrate: Set higher for a better video stream quality. But a higher bitrate can also cause mobile devices and slower, less powerful computers to buffer a lot. Good video quality with very little buffering is a good compromise. It is recommended that you set your bitrate to half of your upload speed. Bitrates of 2000, 2500, and 3000 should work for most PCs that you are streaming from. 4000 is the maximum bitrate for Facebook Live.


Commission Directive 96/5/EC of 16 February 1996 on processed cereal-based foods and baby foods for infants and young children (2) has been substantially amended several times (3). In the interests of clarity and rationality the said Directive should be codified.
Processed cereal-based foods and baby foods for infants and young children are used as part of a diversified diet and do not constitute the sole source of nourishment of infants and young children.
There is a great variety of the products in question reflecting the widely varied diet of infants being weaned and young children owing to social and cultural circumstances existing in the Community.
The essential composition of the products in question must be appropriate for the nutritional requirements of infants and young children in good health as established by generally accepted scientific data, account being taken of the abovementioned factors.
The essential nutritional requirements for the composition of the two broad categories of these products, namely processed cereal-based foods and baby foods, should be laid down.
Although, because of the nature of such products, a number of mandatory requirements and other restrictions as to the level of vitamins, minerals and other nutrients should be imposed, it should be allowed that such nutrients are added voluntarily by manufacturers, provided that they use exclusively certain substances to be specified by this Directive.
The use of the products to which such nutrients have been voluntarily added at levels currently observed in the Community do not appear to result in excessive intakes of those nutrients by infants and young children. Attention should be paid to any future developments of the situation, and if necessary, appropriate measures should be taken.
Different rules on the maximum levels of pesticide residues in processed cereal-based foods and baby foods cause trade barriers between certain Member States.
Maximum levels for pesticide residues stipulated in Council Directive 76/895/EEC of 23 November 1976 relating to the fixing of maximum levels for pesticide residues in and on fruit and vegetables (4), in Council Directive 86/362/EEC of 24 July 1986 on the fixing of maximum levels for pesticide residues in and on cereals (5), in Council Directive 86/363/EEC of 24 July 1986 on the fixing of maximum levels for pesticide residues in and on foodstuffs of animal origin (6), and in Council Directive 90/642/EEC of 27 November 1990 on the fixing of maximum levels for pesticide residues in and on certain products of plant origin, including fruit and vegetables (7), are without prejudice to specific provisions applicable to processed cereal-based foods and baby foods.
Taking into account the Community's international obligations, in cases where the relevant scientific evidence is insufficient, the precautionary principle allows the Community to provisionally adopt measures on the basis of available pertinent information, pending an additional assessment of risk and a review of the measure within a reasonable period of time.
On the basis of the two opinions given by the Scientific Committee for Food on 19 September 1997 and 4 June 1998 there are at present doubts as to the adequacy of existing acceptable daily intake values (ADI) of pesticides and pesticide residues for the protection of the health of infants and young children. Therefore, as far as foodstuffs for particular nutritional uses intended for infants and young children are concerned, it is appropriate to adopt a very low common limit for all pesticides pending case-by-case scientific screening and evaluation of substances. This very low common limit should be fixed at 0,01 mg/kg which normally is in practice the minimum detectable level.
Severe limitations on pesticide residues should be required. With careful selection of raw materials, and given that processed cereal-based foods and baby foods undergo extensive processing during their manufacture, it is feasible to produce products containing very low levels of pesticide residues. However, in the case of a small number of pesticides or metabolites of pesticides even a maximum residue level of 0,01 mg/kg might, under worst-case intake conditions, allow infants and young children to exceed the ADI. This is the case for pesticides or metabolites of pesticides with an ADI lower than 0,0005 mg/kg body weight.
This Directive establishes the principle of the prohibition of the use of these pesticides in the production of agricultural products intended for processed cereal-based foods and baby foods. However, this prohibition does not necessarily guarantee that products are free from such pesticides, since some pesticides contaminate the environment and their residues may be found in the products concerned.
The health of infants and young children can be better protected by applying additional requirements which can be enforced by analysis regardless of a product's origin.
Most of the pesticides which have ADI values lower than 0,0005 mg/kg body weight are already prohibited in the Community. The prohibited pesticides should not be detectable in processed cereal-based foods and baby foods by state of the art analytical methods. However, some pesticides degrade slowly and still contaminate the environment. They might be present in processed cereal-based foods and baby foods even if they have not been used. For the purposes of control, a harmonised approach should be followed.
Pending Commission Decisions on whether they satisfy the safety requirements of Article 5 of Council Directive 91/414/EEC of 15 July 1991 concerning the placing of plant protection products on the market (8), the continued use of authorised pesticides should be permitted as long as their residues comply with the maximum residue levels established in this Directive. The latter should be set at levels ensuring that their respective ADI values are not exceeded by infants and young children under worst-case intake conditions.
The use of novel food ingredients should be dealt with horizontally for all foodstuffs in a separate measure.
This Directive reflects current knowledge about the products concerned. Any amendment, to allow for innovation based on scientific and technical progress, should be decided by the procedure referred to in Article 13(2) of Directive 89/398/EEC.
In view of the persons for whom the products are intended, the necessary microbiological criteria and maximum levels for contaminants should be laid down.
Pursuant to Article 7(1) of Directive 89/398/EEC, the products covered by this Directive are subject to the general rules laid down by Directive 2000/13/EC of the European Parliament and of the Council of 20 March 2000 on the approximation of the laws of the Member States relating to the labelling, presentation and advertising of foodstuffs (9).
In this Directive the additions and exceptions to those general rules should be adopted and expanded upon, where appropriate.
In particular, the nature and destination of the products covered by this Directive require nutritional labelling showing the energy value and principal nutrients they contain. On the other hand, the method of use should be specified in accordance with point 9 of Article 3(1) and Article 11 of Directive 2000/13/EC, in order to prevent inappropriate uses liable to harm the health of infants.
Whilst claims not specifically prohibited may generally be made for the products in question in conformity with the rules applicable for all foodstuffs, such claims should, where appropriate, take into account the compositional criteria specified in this Directive.
On the provisions liable to affect public health, the consultation in accordance with Article 4 of Directive 89/398/EEC has taken place.
The measures provided for in this Directive are in accordance with the opinion of the Standing Committee on the Food Chain and Animal Health.
1. This Directive is a 'specific Directive' within the meaning of Article 4(1) of Directive 89/398/EEC.
'baby foods' other than processed cereal-based foods.
3. This Directive does not apply to milks intended for young children.
'pesticide residue' means the residue in processed cereal-based foods and baby foods of a plant protection product, as defined in point 1 of Article 2 of Directive 91/414/EEC, including its metabolites and products resulting from its degradation or reaction.
Member States shall ensure that the products referred to in Article 1(2) are marketed within the Community only if they conform to the rules laid down in this Directive.
Processed cereal-based foods and baby foods shall be manufactured from ingredients whose suitability for particular nutritional use by infants and young children has been established by generally accepted scientific data.
1. Processed cereal-based foods shall comply with the compositional criteria specified in Annex I.
2. Baby foods which are described in Annex II shall comply with the compositional criteria specified therein.
Only the nutritional substances listed in Annex IV may be added in the manufacture of processed cereal-based foods and baby foods.
The purity criteria for those substances shall be laid down at a later stage.
1. Processed cereal-based foods and baby foods shall not contain any substance in such quantity as to endanger the health of infants and young children. Necessary maximum levels for substances other than those referred to in paragraphs 2 and 3 shall be established.
2. Processed cereal-based foods and baby foods shall not contain residues of individual pesticides at levels exceeding 0,01 mg/kg, except for those substances for which specific levels have been set in Annex VI, in which case these specific levels shall apply.
Analytical methods for determining the levels of pesticide residues shall be generally acceptable standardised methods.
3. The pesticides listed in Annex VII shall not be used in agricultural products intended for the production of processed cereal-based foods and baby foods.
pesticides listed in Table 2 of Annex VII are considered not to have been used if their residues do not exceed a level of 0,003 mg/kg. This level shall be kept under regular review in the light of data on environmental contamination.
4. The levels referred to in paragraphs 2 and 3 shall apply to the products as proposed ready for consumption or as reconstituted according to the instructions of the manufacturers.
5. For pesticides listed in Annex VI, where a decision concerning the non-inclusion of an active substance in Annex I to Directive 91/414/EEC is taken, Annex VI and Annex VII to this Directive shall be amended accordingly.
6. Microbiological criteria shall be established as necessary.
instructions for appropriate preparation, when necessary, and a statement as to the importance of following those instructions.
in addition to numerical information, information on vitamins and minerals shown in Annex V, expressed as a percentage of the reference values given therein, per 100 g or 100 ml of the product as sold, and where appropriate, per specified quantity of the product as proposed for consumption, provided that the quantities present are at least equal to 15 % of the reference values.
Directive 96/5/EC, as amended by the Directives listed in Annex VIII, Part A, is repealed, without prejudice to the obligations of the Member States relating to the time-limits for transposition into national law of the Directives set out in Annex VIII, Part B.
References to the repealed Directive shall be construed as references to this Directive and shall be read in accordance with the correlation table in Annex IX.
Done at Brussels, 5 December 2006.
(1) OJ L 186, 30.6.1989, p. 27. Directive as last amended by Regulation (EC) No 1882/2003 of the European Parliament and of the Council (OJ L 284, 31.10.2003, p. 1).
(2) OJ L 49, 28.2.1996, p. 17. Directive as last amended by Directive 2003/13/EC (OJ L 41, 14.2.2003, p. 33).
(3) See Annex VIII, Part A.
(4) OJ L 340, 9.12.1976, p. 26. This Directive is repealed by Regulation (EC) No 396/2005 of the European Parliament and of the Council (OJ L 70, 16.3.2005, p. 1).
(5) OJ L 221, 7.8.1986, p. 37. This Directive is repealed by Regulation (EC) No 396/2005.
(6) OJ L 221, 7.8.1986, p. 43. This Directive is repealed by Regulation (EC) No 396/2005.
(7) OJ L 350, 14.12.1990, p. 71. This Directive is repealed by Regulation (EC) No 396/2005.
(8) OJ L 230, 19.8.1991, p. 1. Directive as last amended by Regulation (EC) No 396/2005.
(9) OJ L 109, 6.5.2000, p. 29. Directive as last amended by Directive 2003/89/EC (OJ L 308, 25.11.2003, p. 15).
The requirements concerning nutrients refer to the products ready for use marketed as such or reconstituted as instructed by the manufacturer.
Processed cereal-based foods are prepared primarily from one or more milled cereals and/or starchy root products.
The amount of cereal and/or starchy root shall not be less than 25 % of the final mixture on a dry weight for weight basis.
For products mentioned in Article 1(2)(a)(ii) and (iv), the protein content shall not exceed 1,3 g/100 kJ (5,5 g/100 kcal).
For products mentioned in Article 1(2)(a)(ii), the added protein shall not be less than 0,48 g/100 kJ (2 g/100 kcal).
For biscuits mentioned in Article 1(2)(a)(iv), made with the addition of a high protein food, and presented as such, the added protein shall not be less than 0,36 g/100 kJ (1,5 g/100 kcal).
The chemical index of the added protein shall be equal to at least 80 % of that of the reference protein (casein as defined in Annex III), or the protein efficiency ratio (PER) of the protein in the mixture shall be equal to at least 70 % of that of the reference protein. In all cases, the addition of amino acids shall be permitted solely for the purpose of improving the nutritional value of the protein mixture, and only in the proportions necessary for that purpose.
the amount of added fructose shall not exceed 0,9 g/100 kJ (3,75 g/100 kcal).
the amount of added fructose shall not exceed 0,6 g/100 kJ (2,5 g/100 kcal).
For products mentioned in Article 1(2)(a)(i) and (iv), the lipid content shall not exceed 0,8 g/100 kJ (3,3 g/100 kcal).
the amount of linoleic acid (in the form of glycerides = linoleates) shall not be less than 70 mg/100 kJ (300 mg/100 kcal) and shall not exceed 285 mg/100 kJ (1 200 mg/100 kcal).
the sodium content of processed cereal-based foods shall not exceed 25 mg/100 kJ (100 mg/100 kcal).
For products mentioned in Article 1(2)(a)(ii), the amount of calcium shall not be less than 20 mg/100 kJ (80 mg/100 kcal).
For products mentioned in Article 1(2)(a)(iv), manufactured with the addition of milk (milk biscuits) and presented as such, the amount of calcium shall not be less than 12 mg/100 kJ (50 mg/100 kcal).
For processed cereal-based foods, the amount of thiamin shall not be less than 25 μg/100 kJ (100 μg/100 kcal).
These limits shall also be applicable if vitamins A and D are added to other processed cereal-based foods.
The requirements concerning nutrients refer to the products ready for use, marketed as such or reconstituted as instructed by the manufacturer, except for potassium and calcium for which the requirements refer to the product as sold.
(1) RE = all trans retinol equivalents.
(2) In the form of cholecalciferol, of which 10 μg = 400 i.u. of vitamin D.
(3) α-TE = d-α-tocopherol equivalent.
(4) Limit applicable to products fortified with iron.
(5) NE = Niacin equivalents = mg nicotinic acid + mg tryptophan/60.
(6) Limit applicable to products mentioned in Article 1(2)(a)(i) and (ii).
(7) Limit applicable to products mentioned in Article 1(2)(a)(iv).
The requirements concerning nutrients refer to the products ready for use, marketed as such or reconstituted as instructed by the manufacturer.
the total protein from the named sources shall not be less than 1,7 g/100 kJ (7 g/100 kcal).
the protein from the named sources shall not be less than 1 g/100 kJ (4 g/100 kcal).
the total protein in the product from all sources shall not be less than 0,7 g/100 kJ (3 g/100 kcal).
If the product is designated on the label as a meal, but does not mention meat, poultry, fish, offal or other traditional source of protein in the name of the product, the total protein in the product from all sources shall not be less than 0,7 g/100 kJ (3 g/100 kcal).
Sauces presented as an accompaniment to a meal shall be exempt from the requirements of points 1.1 to 1.5 inclusive.
Sweet dishes that mention dairy products as the first or only ingredient in the name shall contain not less than 2,2 g dairy protein/100 kcal. All other sweet dishes shall be exempt from the requirements in 1.1 to 1.5.
The addition of amino acids shall be permitted solely for the purpose of improving the nutritional value of the protein present, and only in the proportions necessary for that purpose.
5 g/100 g for other non-milk-based drinks.
If meat or cheese are the only ingredients or are mentioned first in the name of a product, the total fat in the product from all sources shall not exceed 1,4 g/100 kJ (6 g/100 kcal).
For all other products, the total fat in the product from all sources shall not exceed 1,1 g/100 kJ (4,5 g/100 kcal).
The final sodium content in the product shall be either not more than 48 mg/100 kJ (200 mg/100 kcal) or not more than 200 mg per 100 g. However if cheese is the only ingredient mentioned in the name of the product, the final sodium content in the product shall not be more than 70 mg/100 kJ (300 mg/100 kcal).
Sodium salts may not be added to products based on fruit, nor to desserts, puddings except for technological purposes.
In a fruit juice, nectar, or vegetable juice the final content of vitamin C in the product shall be either not less than 6 mg/100 kJ (25 mg/100 kcal) or not less than 25 mg per 100 g.
In vegetable juices, the final content of vitamin A in the product shall be not less than 25 μg RE/100 kJ (100 μg RE/100 kcal).
Vitamin A shall not be added to other baby foods.
Vitamin D shall not be added to baby foods.
(1) In accordance with the provisions of point 5.
(2) Limit applicable to products fortified with iron.
(3) Limit applicable to fruit-based dishes, fruit juices, nectars and vegetable juices.


text:
Comprehending the disaster's impact
Osamu Motojima, ITER Director-General
It has now been ten weeks since one of the four most severe earthquakes registered in the Earth's history hit the east coast of Japan. Our hearts are with the people who lost their homes and their belongings or—worse—their relatives and friends. While the country is getting back on its feet and dealing as best as possible with the devastation, at the ITER Organization we are trying to grasp the impact that the earthquake will have on the project's schedule.
Early May, Deputy Director-General Remmelt Haange led a fact-finding delegation to Japan to better understand and validate the damages done to the facilities that conduct important tests for ITER and also to visit a company that is likely to manufacture ITER components on behalf of the Japanese Domestic Agency. At the Domestic Agency located in Naka, the shockwave was registered with a force of 950 gal (cm/s2). Some of the buildings' structures were damaged—in certain cases severely. Access of personnel to the superconductor research facility and the neutral beam test building, for example, has been prohibited in order to avoid further disaster resulting from frequent aftershocks. For this reason, the status of the test facilities inside the buildings could not be verified.
These facts—together with the report given to us by our Japanese colleagues during the recent meeting of the Management Advisory Committee (MAC)—stipulate some urgent and drastic decision-making in order to avoid unacceptable delays to the project's schedule. I have therefore proposed to MAC to set up a Special Task Group made up of representatives from the ITER Organization and the seven Domestic Agencies, under my leadership, to develop a strategic plan for a new resource-loaded schedule which we plan to deliver in time for the ITER Council meeting in November this year. This proposal shall minimize schedule delays originating from the natural disaster in Japan, while respecting the capped construction costs of ITER. This may mean that we have to address selective deferral, where appropriate, and perhaps even de-scoping. But it is yet too early to speculate ... we will have to wait for the facts and findings to be elaborated by the Special Task Group.


text:
Q: c# BouncyCastle Exception: pad block corrupted I've been using the code that was posted here to encrypt and decrypt, written by @nerdybeardo. However, I'm getting the error "pad block corrupted" when trying to decrypt.
The Encryptor class looks like this, which implements encrypt then MAC:
/// <summary>
/// Encrypt/decrypt + HMAC using BouncyCastle (C# Java port)
/// </summary>
/// <typeparam name="TBlockCipher">The type of the block cipher.</typeparam>
/// <typeparam name="TDigest">The type of the digest.</typeparam>
/// <see cref="https://stackoverflow.com/a/13511671/119624"/>
public sealed class Encryptor<TBlockCipher, TDigest>
    where TBlockCipher : IBlockCipher, new()
    where TDigest : IDigest, new()
{
    private readonly Encoding encoding;

    private readonly byte[] key;

    private IBlockCipher blockCipher;

    private BufferedBlockCipher cipher;

    private HMac mac;

    /// <summary>
    /// Initializes a new instance of the <see cref="Encryptor{TBlockCipher, TDigest}"/> class.
    /// </summary>
    /// <param name="encoding">The encoding.</param>
    /// <param name="key">The key.</param>
    /// <param name="macKey">The mac key.</param>
    public Encryptor(Encoding encoding, byte[] key, byte[] macKey)
    {
        this.encoding = encoding;
        this.key = key;
        this.Init(key, macKey, new Pkcs7Padding());
    }

    /// <summary>
    /// Initializes a new instance of the <see cref="Encryptor{TBlockCipher, TDigest}"/> class.
    /// </summary>
    /// <param name="encoding">The encoding.</param>
    /// <param name="key">The key.</param>
    /// <param name="macKey">The mac key.</param>
    /// <param name="padding">The padding.</param>
    public Encryptor(Encoding encoding, byte[] key, byte[] macKey, IBlockCipherPadding padding)
    {
        this.encoding = encoding;
        this.key = key;
        this.Init(key, macKey, padding);
    }

    /// <summary>
    /// Encrypts the specified plain.
    /// </summary>
    /// <param name="plain">The plain.</param>
    /// <returns></returns>
    public string Encrypt(string plain)
    {
        return Convert.ToBase64String(EncryptBytes(plain));
    }

    /// <summary>
    /// Encrypts the bytes.
    /// </summary>
    /// <param name="plain">The plain.</param>
    /// <returns></returns>
    public byte[] EncryptBytes(string plain)
    {
        byte[] input = this.encoding.GetBytes(plain);

        var iv = this.GenerateInitializationVector();

        var cipher = this.BouncyCastleCrypto(true, input, new ParametersWithIV(new KeyParameter(key), iv));
        byte[] message = CombineArrays(iv, cipher);

        this.mac.Reset();
        this.mac.BlockUpdate(message, 0, message.Length);
        var digest = new byte[this.mac.GetUnderlyingDigest().GetDigestSize()];
        this.mac.DoFinal(digest, 0);

        var result = CombineArrays(digest, message);
        return result;
    }

    /// <summary>
    /// Decrypts the bytes.
    /// </summary>
    /// <param name="bytes">The bytes.</param>
    /// <returns></returns>
    /// <exception cref="CryptoException"></exception>
    public byte[] DecryptBytes(byte[] bytes)
    {
        // split the digest into component parts
        var digest = new byte[this.mac.GetUnderlyingDigest().GetDigestSize()];
        var message = new byte[bytes.Length - digest.Length];
        var iv = new byte[this.blockCipher.GetBlockSize()];
        var cipher = new byte[message.Length - iv.Length];

        Buffer.BlockCopy(bytes, 0, digest, 0, digest.Length);
        Buffer.BlockCopy(bytes, digest.Length, message, 0, message.Length);
        if (!IsValidHMac(digest, message))
        {
            throw new CryptoException();
        }

        Buffer.BlockCopy(message, 0, iv, 0, iv.Length);
        Buffer.BlockCopy(message, iv.Length, cipher, 0, cipher.Length);

        byte[] result = this.BouncyCastleCrypto(false, cipher, new ParametersWithIV(new KeyParameter(key), iv));
        return result;
    }

    /// <summary>
    /// Decrypts the specified bytes.
    /// </summary>
    /// <param name="bytes">The bytes.</param>
    /// <returns></returns>
    public string Decrypt(byte[] bytes)
    {
        return this.encoding.GetString(DecryptBytes(bytes));
    }

    /// <summary>
    /// Decrypts the specified cipher.
    /// </summary>
    /// <param name="cipher">The cipher.</param>
    /// <returns></returns>
    public string Decrypt(string cipher)
    {
        return this.Decrypt(Convert.FromBase64String(cipher));
    }

    /// <summary>
    /// Combines the arrays.
    /// </summary>
    /// <param name="source1">The source1.</param>
    /// <param name="source2">The source2.</param>
    /// <returns></returns>
    private static byte[] CombineArrays(byte[] source1, byte[] source2)
    {
        var result = new byte[source1.Length + source2.Length];
        Buffer.BlockCopy(source1, 0, result, 0, source1.Length);
        Buffer.BlockCopy(source2, 0, result, source1.Length, source2.Length);

        return result;
    }

    /// <summary>
    /// Ares the equal.
    /// </summary>
    /// <param name="digest">The digest.</param>
    /// <param name="computed">The computed.</param>
    /// <returns></returns>
    private static bool AreEqual(byte[] digest, byte[] computed)
    {
        if (digest.Length != computed.Length)
        {
            return false;
        }

        var result = 0;
        for (var i = 0; i < digest.Length; i++)
        {
            result |= digest[i] ^ computed[i];
        }

        return result == 0;
    }

    /// <summary>
    /// Initializes the specified key.
    /// </summary>
    /// <param name="key">The key.</param>
    /// <param name="macKey">The mac key.</param>
    /// <param name="padding">The padding.</param>
    private void Init(byte[] key, byte[] macKey, IBlockCipherPadding padding)
    {
        this.blockCipher = new CbcBlockCipher(new TBlockCipher());
        this.cipher = new PaddedBufferedBlockCipher(this.blockCipher, padding);
        this.mac = new HMac(new TDigest());
        this.mac.Init(new KeyParameter(macKey));
    }

    /// <summary>
    /// Determines whether [is valid h mac] [the specified digest].
    /// </summary>
    /// <param name="digest">The digest.</param>
    /// <param name="message">The message.</param>
    /// <returns></returns>
    private bool IsValidHMac(byte[] digest, byte[] message)
    {
        this.mac.Reset();
        this.mac.BlockUpdate(message, 0, message.Length);
        var computed = new byte[this.mac.GetUnderlyingDigest().GetDigestSize()];
        this.mac.DoFinal(computed, 0);

        return AreEqual(digest, computed);
    }

    /// <summary>
    /// Bouncy Castle Cryptography.
    /// </summary>
    /// <param name="forEncrypt">if set to <c>true</c> [for encrypt].</param>
    /// <param name="input">The input.</param>
    /// <param name="parameters">The parameters.</param>
    /// <returns></returns>
    private byte[] BouncyCastleCrypto(bool forEncrypt, byte[] input, ICipherParameters parameters)
    {
        try
        {
            cipher.Init(forEncrypt, parameters);

            return this.cipher.DoFinal(input);
        }
        catch (CryptoException)
        {
            throw;
        }
    }

    /// <summary>
    /// Generates the initialization vector.
    /// </summary>
    /// <returns></returns>
    private byte[] GenerateInitializationVector()
    {
        using (var provider = new RNGCryptoServiceProvider())
        {
            // 1st block
            var result = new byte[this.blockCipher.GetBlockSize()];
            provider.GetBytes(result);

            return result;
        }
    }
}

I have a simple wrapper for the AES engine. It looks like this:
public class AesSha256Encryptor
{
    private readonly Encryptor<AesEngine, Sha256Digest> provider;

    /// <summary>
    /// Initializes a new instance of the <see cref="AesSha256Encryptor"/> class.
    /// </summary>
    /// <param name="key">The key.</param>
    /// <param name="hmacKey">The HMAC key.</param>
    public AesSha256Encryptor(byte[] key, byte[] hmacKey)
    {
        provider = new Encryptor<AesEngine, Sha256Digest>(Encoding.UTF8, key, hmacKey);
    }

    /// <summary>
    /// Encrypts the specified plain.
    /// </summary>
    /// <param name="plain">The plain.</param>
    /// <returns></returns>
    public string Encrypt(string plain)
    {
        return provider.Encrypt(plain);
    }

    /// <summary>
    /// Decrypts the specified cipher.
    /// </summary>
    /// <param name="cipher">The cipher.</param>
    /// <returns></returns>
    public string Decrypt(string cipher)
    {
        return provider.Decrypt(cipher);
    }
}

I wanted to be able to have a different salt per database row, so I have a key manager that works like this:
public static class EncryptionKeyManager
{
    /// <summary>
    /// The salt length limit
    /// </summary>
    private const int SaltLengthLimit = 32;

    /// <summary>
    /// Gets the key record.
    /// </summary>
    /// <returns></returns>
    public static KeyRecord GetKeyRecord()
    {
        // get the shared passphrasefrom appsettings
        var sharedPassphrase = GetSharedPassphrase();

        // get the client passphrase from config db to sign
        var clientPassphrase = GetClientPassphrase();

        // generate secure random salt
        var salt = GetSalt();

        // get both the encryption key and hmac key
        // these will be used for Encrypt-then-Mac
        var key = GetKeyFromPassphrase(sharedPassphrase, salt);
        var hmacKey = GetKeyFromPassphrase(clientPassphrase, salt);

        return new KeyRecord
        {
            SharedKey = key,
            HmacKey = hmacKey,
            Salt = salt
        };
    }

    /// <summary>
    /// Gets the client salt.
    /// </summary>
    /// <returns></returns>
    private static string GetClientPassphrase()
    {
        var settingsService = ServiceLocator.Current.GetInstance<ISettingService>();
        return settingsService.GetSetting(ConstantConfigSettings.EncryptionSettings.ClientPassphrase, defaultValue: "<removed>");
    }

    /// <summary>
    /// Gets the shared passphrase.
    /// </summary>
    /// <returns></returns>
    private static string GetSharedPassphrase()
    {
        return ConfigurationManager.AppSettings[ConstantConfigSettings.EncryptionSettings.SharedPassphrase] ?? "<removed>";
    }

    /// <summary>
    /// Gets the key from passphrase.
    /// </summary>
    /// <param name="passphrase">The passphrase.</param>
    /// <param name="salt">The salt.</param>
    /// <returns></returns>
    private static byte[] GetKeyFromPassphrase(string passphrase, string salt)
    {
        var saltArray = Encoding.UTF8.GetBytes(salt);
        var rfcKey = new Rfc2898DeriveBytes(passphrase, saltArray, 10000);

        return rfcKey.GetBytes(32); // for a 256-bit key (32*8=128)
    }

    /// <summary>
    /// Gets the salt from a secure random generator..
    /// </summary>
    /// <param name="maximumSaltLength">Maximum length of the salt.</param>
    /// <returns></returns>
    private static string GetSalt(int maximumSaltLength = SaltLengthLimit)
    {
        var salt = new byte[maximumSaltLength];
        using (var random = new RNGCryptoServiceProvider())
        {
            random.GetNonZeroBytes(salt);
        }

        return Convert.ToBase64String(salt);
    }
}

It all gets used like this to encrypt:
// get key and salt from
var keyRecord = EncryptionKeyManager.GetKeyRecord();
var aesSha256Encryptor = new AesSha256Encryptor(keyRecord.SharedKey, keyRecord.HmacKey);

// now encrypt and store, include salt
entity.AccountNumber = aesSha256Encryptor.Encrypt(accountNumber);
entity.SortCode = aesSha256Encryptor.Encrypt(sortCode);
entity.Salt = keyRecord.Salt;

When I want to decrypt, I do the following:
public static class KeyManager
{
    /// <summary>
    /// Gets the key from passphrase.
    /// </summary>
    /// <param name="passphrase">The passphrase.</param>
    /// <param name="salt">The salt.</param>
    /// <returns>A byte array.</returns>
    public static byte[] GetKeyFromPassphrase(string passphrase, string salt)
    {
        var saltArray = Encoding.UTF8.GetBytes(salt);
        var rfcKey = new Rfc2898DeriveBytes(passphrase, saltArray, 10000);

        return rfcKey.GetBytes(32); // for a 256-bit key (32*8=128)
    }
}

var passphraseKey = KeyManager.GetKeyFromPassphrase(this.Passphrase, this.Salt);
var hmacKey = KeyManager.GetKeyFromPassphrase(this.ClientPassphrase, this.Salt);

var aesSha256Encryptor = new AesSha256Encryptor(passphraseKey, hmacKey);
var plaintext = aesSha256Encryptor.Decrypt(this.CipherText);

This is for a SAAS application. My basic idea was to have a passphrase that is core to the SAAS application that is used to encrypt/decrypt, but also have a specific client passphrase that is used to MAC. The reason for this was to spread the keys between endpoints (one in a database and one in a config setting). The salt gets saved to the database so that it can be used to decrypt using the same salt.
Can anyone see what I am doing wrong? Why am I getting the pad block error?
FYI: The passphrases are of the XKCD variety "horse-battery-stapler-correct" style, so they have hyphens in. I'm not sure if that is a red herring though.
I'm also not sure if the unique salt per row is required, or whether I could just hard code the salt? Is that overkill?
Update
For anyone who finds this, the error was simply that the passphrase that I thought was being used was incorrect. The padding error was the result.

A: It is not clear what code exactly causes your problem (I mean there is no minimal example I could just run and see what is wrong), but I built an example which decrypts correctly without errors, based on your code, so you can look at it and probably spot your error.
I made EncryptionKeyManager.GetSharedPassphrase() public, and it returns fixed string  horse-battery-stapler-correct. I made EncryptionKeyManager.GetClientPassphrase() also public and it returns fixed horse-battery.
class Program {
    static void Main(string[] args) {
        // get key and salt from
        var keyRecord = EncryptionKeyManager.GetKeyRecord();
        var aesSha256Encryptor = new AesSha256Encryptor(keyRecord.SharedKey, keyRecord.HmacKey);
        string targetData = "4343423343";

        var encrypted =  aesSha256Encryptor.Encrypt(targetData);
        var salt = keyRecord.Salt;
        var decrypted = Decrypt(encrypted, salt);
        Debug.Assert(targetData == decrypted);
        Console.WriteLine(decrypted);
        Console.ReadKey();

    }

    private static string Decrypt(string data, string salt) {
        var passphraseKey = KeyManager.GetKeyFromPassphrase(EncryptionKeyManager.GetSharedPassphrase(), salt);
        var hmacKey = KeyManager.GetKeyFromPassphrase(EncryptionKeyManager.GetClientPassphrase(), salt);
        var aesSha256Encryptor = new AesSha256Encryptor(passphraseKey, hmacKey);
        var plaintext = aesSha256Encryptor.Decrypt(data);
        return plaintext;
    }
}

A: It's a bit disconcerting that you are getting a padding error, that means the mac validated or wasn't checked before decryption. I guess since you are using two different passphrases if you mac passphrase is correct and your encryption is off that could make sense.
The concern with padding errors being leaked are for chosen ciphertext attacks, so just scanning the overly complex class you borrowed it looks like the mac should be checked, however, I'd at least double check if you put in the incorrect mac passphrase that it won't give you a padding error, because if it does that means there is an issue with that class you are using.
Salt per row is the minimum if you are using passphrases, and not overkill. I prefer salt per encryption as you can see in my example.
The other thing you mentioned was spreading the keys by putting one in the  database and one in the config. Splitting the storage of the encryption key from the mac key, is not a good way to do this if that is your the goal, but I'm a bit unclear to your goal.  If your app was compromised in the database with an sql injection lets say, only the encryption key is needed to decrypt, the mac is there to just validate that the ciphertext hasn't been tampered with. It's much better to encrypt your ciphertext with decrypted keys stored in the database that were decrypted with keys stored in the config, if you just merely want to spread the key storage a little more.


text:
Q: What is wrong with an inner class not using an outer class in Java? I'm using a static analyzer in Eclipse to examine my code.  One class, foo, has an inner class, bar.  I am getting the following error:
JAVA0043 Inner class 'bar' does not use outer class 'foo'

Why is this an error?  As long as the outer class uses the inner class isn't that sufficient to make this information hiding useful and correct?
The inner class is not static.

A: If it's not making any reference to the outer class, it might as well be a full-on, regular class.  Since it isn't dependent on the outer class, it can stand on its own.  I suspect that's the reason for the "error".

A: If the inner class can only ever be used by the outer class, yet the inner class needs no reference to the outer class, then you can make it private static.
If the inner class is known to someone other than the outer class, then it might as well be a top-level class in its own right.

A: A non-static inner class has an implicit reference to an instance of its outer class. This hidden reference can delay (or even prevent) garbage collection on the outer class and create serialization issues. So you should only use non-static inner classes when you need them. It is easy to forget to declare the class static, so the code analysis warns you when it isn't needed.

A: Looks like an Enerjy Error:
// Incorrect
class Log {
  // Position never uses the enclosing Log instance,
  // so it should be static
  class Position {
    private int line;
    private int column;
    Position(int line, int column) {
      this.line = line;
      this.column = column;
    }
  }
}

A nested class that does not use any instance variables or methods from any of its outer classes can be declared static.
This reduces the dependency between the two classes, which enhances readability and maintenance.
// Correct
class Log {
  static class Position {
    private int line;
    private int column;
    Position(int line, int column) {
      this.line = line;
      this.column = column;
    }
  }
}

A: The whole point of the inner class is that it has access to the outer class. If you're not actually using the outer class, just make it a regular, full-blown class.


text:
Choose from our range of colors
Woodland Birds Wallpaper
Leopard Wallpaper
Exotic Kingfishers Wallpaper
Hummingbirds Wallpaper
Bethany Linz Marbling Wallpaper Collection
With traditional marbling blasting back into fashion, Bethany Linz is driving this rising trend forward with her new Marbling Wallpaper Collection. Bethany jumped at the opportunity to try something new and reintroduce herself with these latest designs.
When asked about the inspiration for the Marbling collection, Bethany told us, "I was attracted to the organic patterns and the process of creating them. Marbling is so different to my past work which is usually botanical inspired. This collection was challenging but fun trialling different techniques, I never knew what was going to turn up on the paper when I peeled it off the water and that to me was like letting go." And she's right – this new collection is unlike anything we've ever seen from Bethany, whose beautiful florals and birdlife we've come to love.
The five designs showcase a great range of marbling techniques, and feature some great colour pallettes that will work well with a variety of stylistic choices. From the complex, nebula-like detail of Marble Confetti to the Antique Stripe's callback to original processes, this new collection from Bethany Linz really captures the motion and soul of the natural world.
A design technique with endless possibilities, we wondered how Bethany came to decide on the final collection, and what techniques she used to create these incredible new artworks.
"I wanted to have a variety of scales and patterns. I wanted to steer clear of the more traditional patterns like the Peacock pattern and French Comb and have a more modern stone effect. I was wanting to create a collection that was organic and textural."
Pebbles Wallpaper
The first design from the collection, the Pebbles Wallpaper, is a perfect representation of Bethany's goals – this design was created by Bethany through flicking paint onto the surface of the water and allowing it to settle, layer on layer. "This is probably one of the most popular marbling patterns of all time," Bethany says. Also known as Stone, Turkish Spot, Agate, Stein and a multitude of other names, this technique is typically a precursor to creating more detailed marbling patterns like a French Comb or Git-Gel. Pebbles comes in five colourways, Aqua, Chocolate, Dusty Pink, Granite and Powder Green.
Shop Pebbles Wallpaper
So how did Bethany move forward from there? We asked, and this is what she had to say: "After trialling different techniques for weeks, I managed to create the design "Pebbles," but I needed an experienced marbling artist to help me create the more intricate designs that I was after. That's when I found Japanese marbling artist Izumi, who agreed to collaborate on this collection with me. This was the first time I had someone help me create the original artwork."
Rock Marbling Wallpaper
You can see signs of both artists in the next design, Rock Marbling, which was created by Izumi in a similar fashion to Pebbles but allowing the background colour to spend more time on the surface before flicking more colour onto the design to create the delicate spots. "This design to me resembles a stone pattern more than the others, I can see this looking beautiful as splashbacks in kitchens and bathrooms." Rock Marbling is available in six colourways, Blue, Charcoal, Earth, Green, Grey and Navy.
Shop Rock Marbling Wallpaper
Antique Stripe Wallpaper
Antique Stripe is a pattern of marbling that has been seen across the world since as early as the 17th Century. The design is created by using the 'feather technique,' where paint spread across a bath is drawn with tools into alternating directions, and then showering the pattern with fine dots of colour (usually white) to create depth and play into the asymmetry of the design. Antique Stripe is available in Beige, Charcoal, Forest, Garnet, Pink and Sea Spray.
Shop Antique Stripe Wallpaper
Marble Swirls WaLLPAPER
Marble Swirls is unequivocally Bethany's favourite design from the new collection. The artwork was created by Izumi, and according to Bethany, "looks like water splashing and swirling around on the wall. That's what I love about marbling, the way it captures one single moment of a moving pattern, a pattern that is ever changing as it moves along the surface of the water." Marble Swirls features stunning colours dancing across the paper, ebbing and flowing as if the design itself were made of water. It is available in six colours: Blue, Caramel, Chocolate, Navy, Orange and Pink.
Shop Marble Swirls Wallpaper
Marble Confetti WALLPAPER
Last, but not least, is Marble Confetti, which reminds us of shining stars and far off galaxies and the spectacular complexity of terrazzo. Similar to Pebbles, this design is created by way of throwing paint into the marbling bath and using specks of colour to create a pattern that is beautifully intricate. "I think it is a fun and very delicate all over pattern," says Bethany – and we couldn't agree more!
Shop Marble Confetti Wallpaper
We're thrilled to see the aftermath of Bethany stepping outside of her comfort zone for this marble wallpaper collection, and we can't wait to see the amazing interiors that are created from these unique designs.
Bethany Linz Marbling Collection
Antique Straight Wallpaper
You might also like to read
Unveiling the 2023 Collection from House of Heras
Wallpaper Trends For 2023
New Whimsical Wallpapers by Fleur Harris
Emro Wallpapers – Australian Indigenous Designs
(469) 372 5774 and chat
every weekday, 8am-5pm PST
Copyright © 2023 Milton & King


Mass deficiency describes the fact that the nuclei made up of protons and neutrons have a smaller rest mass than the sum of the rest masses of the protons and neutrons forming the nucleus. The mass difference is equal to the released binding energy. For the alpha particle with a mass of 4.00151 atomic mass units, the structure of two protons (1.00728 atomic mass units each) and two neutrons (1.00866 atomic mass units each), a mass defect of 0.03037 atomic mass units results. This corresponds to an energy (binding energy) of about 28 MeV.


text:
Which country is leading the way in oil production?
Brazilian oil producers are expected to produce more than 10 million barrels per day (bpd) of crude oil this year, according to data from the Organization of Petroleum Exporting Countries.
Brazil, with a total population of more than 9 million, is expected to overtake Saudi Arabia in the number of barrels per year it produces.
Saudi Arabia produced 7 million bpd in 2015.
In a bid to expand its output, Brazil will pump 5.5 million bp in 2016 and 5.1 million bps in 2017, according a Reuters report on Thursday.
The country's oil output is expected grow to 8.1 billion barrels a day (boe) in 2021, with Saudi Arabia expected to output 5.3 million boe and Saudi Arabia, the OPEC member, to produce 4.9 million boed.
However, there is still a long way to go for Brazil, which will need to meet domestic demand.
Brazil is forecast to import about 2.3 billion barrels of crude in 2020 and 1.9 billion barrels in 2021.
It will be the fourth-biggest importer of crude after the United States, the United Kingdom and Canada.
The country is also expected to import more than 2 billion barrels from the United Arab Emirates in 2021 and 3.3 bpd from the Netherlands.
Saudi Arabia and the United Arabs, the three largest producers in the Organization, have the largest market share.
Saudi Arabian oil production of 9.7 million bbpd last year surpassed the 9.3 mbpd of the United Stated and the 8.6 mbpm of Saudi Arabia's largest producer, BP Plc.
brazilian oil developmentbreast development oilcbd oil developmentoil sands developments


text:
Emmy nominations 2020: 'Watchmen' or 'Mrs. America'? Predictions for the top races
8:19pm, 23rd July, 2020
One thing we know for sure about this year's Emmy nominations — there's going to be more of them.
Watch a live chat with 'Die Hard' cinematographer Jan de Bont
Film critic Justin Chang welcomes 'Die Hard' cinematographer Jan de Bont to the Ultimate Summer Movie Showdown
What's on TV Friday: 'Raven About Bunk'd' on Disney Channel
What's on TV Friday, July 24: "Raven About Bunk'd" on Disney Channel
One Direction at 10: Songs to celebrate the boy band's anniversary
In honor of the band's 10th anniversary, we compiled One Direction's most memorable musical moments, starting, of course, with "What Makes You Beautiful."
Harry and Meghan sue unnamed paparazzi for photos of Archie at home
After settling in Los Angeles, the couple and their young child allege they have been harassed daily by eager photographers invading their privacy.
'New Mutants' hits virtual Comic-Con. Does that mean it's finally ready for theaters?
Director Josh Boone, star Blu Hunt and the rest of the cast talk about the long movie journey for "The New Mutants."
SAG-AFTRA ratifies film and TV contract despite opposition from Time's Up
SAG-AFTRA said its members ratified a film and TV contract even though rights group Time's Up urged members to vote against it.
HBO, Ta-Nehisi Coates team up for book adaptation special on race in America
HBO is adapting "Between the World and Me," Ta-Nehisi Coates' book and stage show about racism and white supremacy, this fall under COVID-19 safety guidelines.
Comic-Con is San Diego's hottest ticket. This year, the city is mourning its loss
For the first time in 51 years, San Diego Comic-Con goes virtual, leaving a lonely landscape in the usually raucous streets of the city's Gaslamp Quarter.
Bummed about Comic-Con 2020? Let our best photos take you back
The Los Angeles Time Photo and Video Studio has had a longstanding presence at the San Diego Comic-Con, taking portraits of Hollywood's favorite stars and casts. Scroll through our gallery to see our favorite photos from years past.


Refer official Lakeland Furniture Website to view full Terms & Conditions.
Get all your needed home and office furniture under one roof named Lakeland Furniture. It specializes in home and garden furniture. Here, you will find the best-valued bar stool, office chairs, king size beds, cabinets and storage, leather office chair, table and furniture accessories, rattan dining sets and more.
Lakeland Furniture believes in providing furniture, which is simple, effective, authentic and durable. It aims to provide quality products at an unbeatable price. Moreover, if you are planning to purchase from here, don't forget to use a Lakeland Furniture discount code at the time of placing the order to save money.
In case you are not satisfied with your order, returns team will be happy to help you. If the goods come damaged, different from what you ordered or you simply don't like it, send it back. You can return your order within 30 days of receiving the purchase. Make sure the products are unused and in resalable condition. After receiving the order back, the team will proceed your refund.
you can find an amazing collection of furniture and other home accessories at a discounted price in Lakeland Furniture clearance sale as well as offers section. So, here items are discounted for limited stocks. Hurry! Grab all the amazing pieces at a discounted price now. Moreover, you can use a suitable Lakeland Furniture discount code to add an extra discount to your order.
Don't compromise on your special purchase. Lakeland Furniture has 0% APR representative financing spread up to 12 months. So, whether you want to renovate your whole space or pick something unique, you don't need to wait till you save.
These instalment type options allow you to spread the cost of your purchases between £400 and £10,000 over 12 months. What are you waiting for? Place an order now!
Subscribe to the Lakeland Furniture newsletter and get daily updates on new Lakeland Furniture vouchers and offers, products, sale, tips on home welfare, etc. straight in your email. You can also join the Lakeland Furniture community by following it on Instagram, Twitter, Facebook, and LinkedIn.
Visit dealslands.co.uk and search for Lakeland Furniture discount codes and look for a code which will go with your order.
Copy the code and paste it in the space named enter your discount code.
Proceed by providing your delivery details. Now select your delivery and payment methods.
Lakeland Furniture offers free UK standard delivery on any order total. Moreover, standard delivery will ship to your doorstep within 5 working days. In case you want it urgently, opt for next day delivery. It cost around £14.99 additional. For more information, visit the delivery section on the website.


Hello I am , November 5th, 2018, This is my post about Entertainment Center With Glass Doors Wonderful Wooden TV Stand Console 55 Inch Media Decorating Ideas 9, on this page you can see so beautiful design about Entertainment Center With Glass Doors Wonderful Wooden TV Stand Console 55 Inch Media Decorating Ideas 9, the first picture in this post is the best picture we use about Entertainment Center With Glass Doors Wonderful Wooden TV Stand Console 55 Inch Media Decorating Ideas 9, detail on photo's above, you can see in the second paragraph.
The first picture is a picture Entertainment Center With Glass Doors Wonderful Wooden TV Stand Console 55 Inch Media Decorating Ideas 9, the image has been in named with : Entertainment Center With Glass Doors Wonderful Wooden TV Stand Console 55 Inch Media Decorating Ideas 9, This image was posted on category : Uncategorized, have resolution : 562x562 pixel. This posting entitled Entertainment Center With Glass Doors Wonderful Wooden TV Stand Console 55 Inch Media Decorating Ideas 9, and many people looking for about Entertainment Center With Glass Doors Wonderful Wooden TV Stand Console 55 Inch Media Decorating Ideas 9 from search engine.