text:
Q: Take Input Type File (HTML) to JavaScript and Send an Email Using PHPmailer i'm using PHPMailer, JavaScript and PHP, through my code i send the email to specific user, next step is attach a file with the email.
But i have two questions about that:

*

*first one is related with the following code:

HTML part:
<input type="file" name="myFile" id="myFile" required/>

I'm using this one to attach the file, part of the email
JavaScript part, my function to send email (so far i can send an email with test data)
function SendMail(){
    var cod="1234"; var subject="hello my friend";
    $.get("SendMail.php?cod="+cod+"&subject="+subject+""); // (1)
}

In (1) how can i send the input file attached to my php file?
Like,
    $.get("SendMail.php?cod="+cod+"&subject="+subject+"&mail="FileRelatedWithInputID);

*When i got successfully the file in PHP, how have i to format it to attach it to the email using PHPMailer?

That's it, my two questions about this issue, i appreciate your answers and suggestions.
Thank you for your time and attention.
Edited:
My PHP file:
require '../PHPMailer_5.2.4/PHPMailerAutoload.php';
$server = "localhost";
$user = "root";
$pass = "pass";
$bd = "BD";
$strHTML1=$_GET["cod"];
$strHTML2=$_GET["subject"];

 // HOW DO I _GET THE FILE FROM JS AND FORMAT FILE PROPERLY TO THE MAIL?

$strHTML3= $strHTML1.$strHTML2;

$mail="mail@gmail.com";

session_start();

$conexion = mysqli_connect($server, $user, $pass,$bd)
or die("ERROR");

 $mail = new PHPMailer();
 $mail->isSMTP();
 $mail->CharSet = "UTF-8";
 $mail->SMTPDebug = 2;
 $mail->Mailer = "smtp";
 $mail->WordWrap = 50;
 $mail->PluginDir = "../tickets/PHPMailer_5.2.4/";
 $mail->Debugoutput = 'html';
 $mail->Host = 'smtp.gmail.com';
 $mail->Port = 465;
 $mail->SMTPSecure = 'ssl';
 $mail->SMTPAuth = true;
 $mail->Username = "mail@site.com.en";
 $mail->Password = "12345";
 $mail->SMTPSecure = 'ssl';
 $headers = "MIME-Version: 1.0\r\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
 $headers .= "From:Home\r\n";
 $mail->AddAddress($mail, "test");
 $mail->isHTML(true);
 $mail->Subject = $strHTML2;
 $mail->Body    =$strHTML3;

 if(!$mail->send()) {
     echo 'Message could not be sent.';
     echo 'Mailer Error: ' . $mail->ErrorInfo.'  ';
     exit;
   }
 $close = mysqli_close($conexion)
 or die("ERROR");

A: You are try to send file using get method. Get method not support multipart. For upload file you should use post method and form should have multipart/form-data. Your form should be like as
<form method="post" action="" enctype="multipart/form-data" id="sendMailForm">
<input type="hidden" name="code" id="code" value="1234"/>
<input type="hidden" name="subject" id="subject" value="Hello My Friends"/>
<input type="submit" value="Send Mail" />

Call SendMail function in form submit.
$("#sendMailForm").submit(function(evt){
   evt.preventDefault();
   var formData = new FormData($(this)[0]);
   SendMail(formData);
   return false;
 });

function SendMail(formData){
    $.ajax({
     url: 'SendMail.php',
     type: 'POST',
     data: formData,
     async: false,
     cache: false,
     contentType: false,
     enctype: 'multipart/form-data',
     processData: false,
     success: function (response) {
       alert(response);
     }
   });
}

Update your send mail code at server side for attach file and get data in post method instead of get method.
require '../PHPMailer_5.2.4/PHPMailerAutoload.php';
$server = "localhost";
$user = "root";
$pass = "pass";
$bd = "BD";
$strHTML1=$_POST["cod"];
$strHTML2=$_POST["subject"];

$strHTML3= $strHTML1.$strHTML2;

$mail="mail@gmail.com";

session_start();

$conexion = mysqli_connect($server, $user, $pass,$bd)
or die("ERROR");

 $mail = new PHPMailer();
 $mail->isSMTP();
 $mail->CharSet = "UTF-8";
 $mail->SMTPDebug = 2;
 $mail->Mailer = "smtp";
 $mail->WordWrap = 50;
 $mail->PluginDir = "../tickets/PHPMailer_5.2.4/";
 $mail->Debugoutput = 'html';
 $mail->Host = 'smtp.gmail.com';
 $mail->Port = 465;
 $mail->SMTPSecure = 'ssl';
 $mail->SMTPAuth = true;
 $mail->Username = "mail@site.com.en";
 $mail->Password = "12345";
 $mail->SMTPSecure = 'ssl';
 $headers = "MIME-Version: 1.0\r\n";
 $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
 $headers .= "From:Home\r\n";
 $mail->AddAddress($mail, "test");
 $mail->isHTML(true);
 $mail->Subject = $strHTML2;
 $mail->Body    =$strHTML3;

 //Attach file in sendmail -

if (isset($_FILES['myFile']) &&
    $_FILES['myFile']['error'] == UPLOAD_ERR_OK) {
    $mail->AddAttachment($_FILES['myFile']['tmp_name'],
    $_FILES['uploaded_file']['name']);
}

 if(!$mail->send()) {
     echo 'Message could not be sent.';
     echo 'Mailer Error: ' . $mail->ErrorInfo.'  ';
     exit;
   }
 $close = mysqli_close($conexion)
 or die("ERROR");


Our guitar straps have gone INTERNATIONAL!! Just recently, they were reviewed by Guitar Wink, where he described their innovative function and the ease with which they can help the player to change the height of the instument effortlessly!!
Just so you remember, these straps are featured TODAY on Etsy, so if you have a minute, we'd love it if you could go and heart our guitar straps, tell you friends, or order one.
height of the instrument up AND down during a musical performance. Sometimes a certain section demands more technical work and we would like the instrument to be higher on the body while other times we like the instruments to rest lower and more relaxed. The guitar straps Wallpusher has designed function QUICKLY and EASILY to allow a player to raise or lower the instrument almost instantaneously.
They're so basic and easy to use!!
So how do we make them?
Depending on the type, we make sewn, riveted and chain mail models, the construction could take anywhere fr om 8 hours to 24. The sewn straps are made on our refurbished Singer 3115. A leather sewer from the 1800s, we refinished it with gold leaf and tractor paint and now it is used by several interns and employees to create the straps.
Of course the first step is to choose the leather, which is tricky because it has to be stretchy, but not so much that it'll fall off the guitar, and tight, but soft enough to be comfortable. Once the leather is chosen at the local store, or reclaimed from recycled goods, it is cut with dies made custom out of cast iron to make the shapes necessary for the strap.
Determining the perfect functional components of the strap took years, but now that we have the size of the rings, the type of material, and other factors under our belts, we have to sew!
Rivets are best hammered together on an anvil, and the chainmail is made by hand from recycled metal.
AMAZING SALE: 50% off our Guitar Straps!!
Previously $80, the straps are now only $33 through March 14th!
* Our guitar straps offer easy one-handed adjustments in seconds!
* Classic look comes in black, red, yellow, and green to suit your personal style.
This guitar strap is so simple, so basic – yet so perfect. The price is perfect too. This guitar strap is like no other in that it is adjustable and can be altered during play. Musicians everywhere love the ability to effortlessly adjust the guitar or bass higher to solo and then drop down easily on stage. Light, beautiful, easy to clean, easy to store, not big and bulky.
Sometime you just have to get back to the basics. Sometimes, it's the simplest design that works the best. Sometimes, all those fancy, addition al features offered are just not worth it.
Each strap comes with a tag stating the number in the series, date of creation, and my signature. As always, being a handmade strap each one is unique, and the color and cut may vary slightly.
If you have any questions about how to make guitar straps, or would like to order one, please contact us at info@wallpusher.com or contact us via our Etsy Shop. We're happy to create custom or wholesale staps, just let us know what you're interested in!
Our guitar straps offer ONE handed adjustments in SECONDS. This guitar strap is so simple, so b asic – yet so perfect. The price is perfect too. NOW through March 14th these beauties are on sale for only $33.oo! We have a limited number of these handmade leather straps in green, yellow, red, black and brown– find them on Etsy but hurry, they are going fast!
The guitar straps by Wallpusher have been designed to solve a single problem inherent in every other strap they've used: the ability to vary the height of the instrument up AND down during a musical performance. Sometimes a certain section demands more technical work and we would like the instrument to be higher on the body while other times we like the instruments to rest lower and more relaxed.
The guitar straps Wallpusher has designed function QUICKLY and EASILY to allow a player to raise or lower the instrument almost instantaneously.
As you can see, Wallpusher has developed this unique strap to work as a pulley system. These straps are hand made, and cannot be duplicated because the type of leather that will grab or slip according to the player's needs is carefully chosen by hand.
This guitar strap is so simple, so basic – yet so perfect. The price is perfect too. NOW through March 14th these beauties are on sale for only $33.oo! This guitar strap is like no other in that it is adjustable and can be altered during play. Musicians everywhere love the ability to effortlessly adjust the guitar or bass higher to solo and then drop down easily on stage. Light, beautiful, easy to clean, easy to store, not big and bulky.
Sometime you just have to get back to the basics. Sometimes, it's the simplest design that works the best. Sometimes, all those fancy, additional features offered are just not worth it.
Please visit the guitar strap page for more views. If you're interested in other products such as furniture, kitchen tools, and other solutions, visit our product page for more views.
info@wallpusher.com and we'll do anything we can to help.


text:
package org.apache.activemq.transport.amqp;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

import java.net.URI;

import javax.jms.BytesMessage;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.Session;
import javax.jms.TextMessage;

import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.TransportConnector;
import org.junit.After;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class AmqpTransformerTest {

    private static final Logger LOG = LoggerFactory.getLogger(AmqpTransformerTest.class);

    private static final String AMQP_URL = "amqp://0.0.0.0:0%s";
    private BrokerService brokerService;
    private URI amqpConnectionURI;
    private URI openwireConnectionURI;
    private static final String TEST_QUEUE = "txqueue";

    @Test(timeout = 30 * 1000)
    public void testNativeTransformation() throws Exception {

        // default is native
        startBrokerWithAmqpTransport(String.format(AMQP_URL, "?transport.transformer=native"));

        // send "text message" with AMQP JMS API
        Connection amqpConnection = JMSClientContext.INSTANCE.createConnection(amqpConnectionURI);
        amqpConnection.start();

        Session amqpSession = amqpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = amqpSession.createQueue(TEST_QUEUE);
        MessageProducer p = amqpSession.createProducer(queue);
        p.setPriority(7);

        TextMessage amqpMessage = amqpSession.createTextMessage();
        amqpMessage.setText("hello");
        p.send(amqpMessage);

        p.close();
        amqpSession.close();
        amqpConnection.close();

        // receive with openwire JMS
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(openwireConnectionURI);
        Connection openwireConn = factory.createConnection();
        openwireConn.start();
        Session session = openwireConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue jmsDest = session.createQueue(TEST_QUEUE);

        MessageConsumer c = session.createConsumer(jmsDest);

        Message message = c.receive(1000);

        assertTrue(message instanceof BytesMessage);
        Boolean nativeTransformationUsed = message.getBooleanProperty("JMS_AMQP_NATIVE");
        assertTrue("Didn't use the correct transformation, expected NATIVE", nativeTransformationUsed);
        assertEquals(DeliveryMode.PERSISTENT, message.getJMSDeliveryMode());
        assertEquals(7, message.getJMSPriority());

        c.close();
        session.close();
        openwireConn.close();
    }

    @Test(timeout = 30000)
    public void testRawTransformation() throws Exception {

        // default is native
        startBrokerWithAmqpTransport(String.format(AMQP_URL, "?transport.transformer=raw"));

        // send "text message" with AMQP JMS API
        Connection amqpConnection = JMSClientContext.INSTANCE.createConnection(amqpConnectionURI);
        amqpConnection.start();

        Session amqpSession = amqpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = amqpSession.createQueue(TEST_QUEUE);
        MessageProducer p = amqpSession.createProducer(queue);
        p.setPriority(7);

        TextMessage amqpMessage = amqpSession.createTextMessage();
        amqpMessage.setText("hello");
        p.send(amqpMessage);

        p.close();
        amqpSession.close();
        amqpConnection.close();

        // receive with openwire JMS
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(openwireConnectionURI);
        Connection openwireConn = factory.createConnection();
        openwireConn.start();
        Session session = openwireConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue jmsDest = session.createQueue(TEST_QUEUE);

        MessageConsumer c = session.createConsumer(jmsDest);

        Message message = c.receive(2000);

        assertNotNull("Should have received a message", message);
        LOG.info("Recieved message: {}", message);
        assertTrue(message instanceof BytesMessage);
        Boolean nativeTransformationUsed = message.getBooleanProperty("JMS_AMQP_NATIVE");
        assertTrue("Didn't use the correct transformation, expected NATIVE", nativeTransformationUsed);
        assertEquals(DeliveryMode.PERSISTENT, message.getJMSDeliveryMode());

        // should not equal 7 (should equal the default) because "raw" does not map headers
        assertEquals(4, message.getJMSPriority());

        c.close();
        session.close();
        openwireConn.close();
    }

    @Test(timeout = 30 * 1000)
    public void testJmsTransformation() throws Exception {

        // default is native
        startBrokerWithAmqpTransport(String.format(AMQP_URL, "?transport.transformer=jms"));

        // send "text message" with AMQP JMS API
        Connection amqpConnection = JMSClientContext.INSTANCE.createConnection(amqpConnectionURI);
        amqpConnection.start();

        Session amqpSession = amqpConnection.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue queue = amqpSession.createQueue(TEST_QUEUE);
        MessageProducer p = amqpSession.createProducer(queue);

        TextMessage amqpMessage = amqpSession.createTextMessage();
        amqpMessage.setText("hello");
        p.send(amqpMessage);

        p.close();
        amqpSession.close();
        amqpConnection.close();

        // receive with openwire JMS
        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(openwireConnectionURI);
        Connection openwireConn = factory.createConnection();
        openwireConn.start();
        Session session = openwireConn.createSession(false, Session.AUTO_ACKNOWLEDGE);
        Queue jmsDest = session.createQueue(TEST_QUEUE);

        MessageConsumer c = session.createConsumer(jmsDest);

        Message message = c.receive(1000);

        assertTrue(message instanceof TextMessage);
        Boolean nativeTransformationUsed = message.getBooleanProperty("JMS_AMQP_NATIVE");
        assertFalse("Didn't use the correct transformation, expected NOT to be NATIVE", nativeTransformationUsed);
        assertEquals(DeliveryMode.PERSISTENT, message.getJMSDeliveryMode());

        c.close();
        session.close();
        openwireConn.close();
    }

    public void startBrokerWithAmqpTransport(String amqpUrl) throws Exception {
        brokerService = new BrokerService();
        brokerService.setPersistent(false);
        brokerService.setAdvisorySupport(false);
        brokerService.setUseJmx(false);
        brokerService.setDeleteAllMessagesOnStartup(true);

        TransportConnector connector = brokerService.addConnector(amqpUrl);
        amqpConnectionURI = connector.getPublishableConnectURI();
        connector = brokerService.addConnector("tcp://0.0.0.0:0");
        openwireConnectionURI = connector.getPublishableConnectURI();

        brokerService.start();
        brokerService.waitUntilStarted();
    }

    @After
    public void stopBroker() throws Exception {
        if (brokerService != null) {
            brokerService.stop();
            brokerService = null;
        }
    }
}

redpajama_set_name: RedPajamaGithub


2FOUR is a hip-hop artist based in Nashville, Tennessee. His sound blurs the lines between classic hip-hop influences and modern R&B tone, inspired by artists like Chris Brown, Kanye West or Drake, only to name a few. Recently, 2FOUR announced the release of a killer brand new track titled "We Up." The lyrical flow of his tracks is energetic and spontaneous, an obvious sign that this rapper is actually genuinely connecting with his flow, in a much deeper way. One of the most amazing things about this release is its astonishing consistency. From the bass tones down to the adlibs and the vocal delivery, everything is spot-on. "We Up" is just as upfront and unique as the title of this track might imply, and 2FOUR really hit the mark with this one. This is a song that sounds modern, yet warm and punchy.
In the mid 2000s, award-winning product developer and American entrepreneur, Garrett Green, became inspired by the success of French–luxury vodka brand, Grey Goose Vodka after selling to Bacardi Ltd for $2 billion a few years earlier, and began pondering why the market didn't have an iconic American–luxury vodka brand equivalent. Using his product development experience, and tenacious entrepreneurial spirit, he decided to pursue the rare opportunity of entering the 70+ billion a year distilled spirits market to create just that. In 2012, ONE ROQ was born.
In 2016, ONE ROQ abandoned the industry mold, transformed its brand philosophy and redeveloped its business model with the introduction of ONE ROQ Vodka Club (ORVC) – a category-pioneering lifestyle platform offering consumers the authentic luxury experience of brand ownership, and the genuine lifestyle privileges that come with it.


text:
Q: Apple Sign In with Flutter and Auth0 I have a flutter app and use this package to implement Apple Sign In feature: https://pub.dev/packages/sign_in_with_apple
I get the authorization data from the Apple like below:
userIdentifier = "0XXXX7.6bb65XXXXXXXXXXXXXXXX36.1XXX2"
givenName = "test"
familyName = "signing"
email = "testemail@company.com"
authorizationCode = "c372xxxxxxxa526eexxxxxx1111e.0.rwsex.SwXxxXXXdDj_XxxXXXxxX"
identityToken = "eyJraXxxuxjxxxXxxxXx.eyJXxxxxtXxxxxxxhlYXxxXXxXxXXXXX"
state = null

Then I tries to send the authorizationCode as described here in Step 3: https://auth0.com/docs/connections/nativesocial/apple
And I get the 403 Forbidded {"error":"invalid_grant","error_description":"Invalid authorization code"}
I have configured the settings in the Auth0 dashobard in Social and Applications section.
The login process works well in the web environment but I can not do it in the Flutter.
Could anyone help me with what should I do with the authorizationCode to perform successful login and get Access Token and ID Token from Auth0 in the native app?

A: Rather a late answer, but I've found following the documentation for the /oauth/token end-point titled "Token Exchange for Native Social" works for me.
Specifically sending that end-point a POST, eg. with this in Dart code:
    final appleAuthorizationCode = '???????????????????????';
    const url = 'https://$AUTH0_DOMAIN/oauth/token';
    final uri = Uri.parse(url);
    final result = await http.post(
      uri,
      headers: {
        "Content-Type": "application/x-www-form-urlencoded",
      },
      body: {
        "client_id": AUTH0_CLIENT_ID,
        "grant_type": 'urn:ietf:params:oauth:grant-type:token-exchange',
        "subject_token": appleAuthorizationCode,
        "subject_token_type": 'http://auth0.com/oauth/token-type/apple-authz-code',
        "scope": 'openid profile offline_access',
      },
      encoding: Encoding.getByName('utf-8'),
    );
    print('AUTH0 result: $result');

works for me.

redpajama_set_name: RedPajamaStackExchange


text:
Cameron Announces 3 AVATAR Sequels, Nation Says "Oh Yeah, I Forgot About That Movie"
The biggest movie of all time to become a quadrilogy.
By Devin Faraci Aug. 01, 2013
Do you remember where you were when Avatar changed everything? When it hit the pop culture so hard that kids today are playing nothing but Na'vi on the playground, when it made Jake Sully an iconic character, when it launched a wave of people naming their children Neytiri? You can really look at the pop culture landscape as before Avatar and after Avatar.
The world has been breathelessly awaiting the further adventures of those cat people who sort of sexually abuse dragons, and now James Cameron, the mastermind behind transferring Yes album covers to the screen, has announced we aren't just getting a sequel. We aren't just getting a trilogy. We're getting a fucking Avatar quadrilogy. Four movies total, with the first once again changing the game in 2016. And the talent he's secured to write these films! He's got Josh Friedman, who wrote The Black Dahlia. He got Shane Salerno, who wrote Aliens vs Predator: Requiem. And he got the team of Amanda Silver and Rick Jaffa, who wrote RIse of the Planet of the Apes, which was actually good. So one movie out of three has a chance!
Says Cameron:
"Building upon the world we created with Avatar has been a rare and incredibly rewarding experience. In writing the new films, I've come to realize that Avatar's world, story and characters have become even richer than I anticipated, and it became apparent that two films would not be enough to capture everything I wanted to put on screen. And to help me continue to expand this universe, I'm pleased to bring aboard Amanda, Rick, Shane and Josh — all writers I've long admired – to join me in completing the films screenplays."
The three films will shoot back to back, and they'll be released once a year, ensuring three years of absolute cinematic nirvana. The nation waits, quivering with anticipation to return to the world of Pandora, a world that has become as real and dear to us as our own.
Jemaine Clement Just Joined The AVATAR Sequels
Michelle Yeoh Joins The AVATAR Family
So It Looks Like Vin Diesel Will Be In Those AVATAR Sequels
amanda silver
rick jaffa
shane salerno
In which the Hiphopopotamus heads to Pandora.
By Evan Saathoff, Apr 15, 2019
And that's pretty much all we know.
And sort of weird. It looks like he will continue to be sort of weird.

redpajama_set_name: RedPajamaCommonCrawl


text:
The 43:29 mark of Futbol Club Cincinnati's Sept. 26 road match against the Richmond Kickers is a moment that will live long in the memories of Cincinnati's fans, as well as that of Emmanuel Ledesma.
Left to roam freely outside the top lefthand corner of Richmond's penalty area, Ledesma had time and space to make any number of calculated decisions.
His calculations led him to startlingly uncork a knuckling shot from distance that hit the side netting inside Richmond's goal. The strike put FC Cincinnati ahead comfortably at 3-1 just before halftime in a match that would clinch its United Soccer League regular-season championship.
To even attempt a shot at that moment, with FC Cincinnati controlling possession and certainly capable of scoring by easier means, and in a match of that significance, was audacious.
It was emblematic of Ledesma's 2018 season at FC Cincinnati.
"If you don't try, you never know," Ledesma said weeks later with a wink during an exclusive interview with The Enquirer. "It's the same thing when I shot from the other side against Richmond at Nippert. I believe in myself."
The goal left players on both teams stunned. Just watch the reactions that followed the goal.
Whether he was whipping in crosses and "Olimpico" corner kicks, picking apart opposing defenses, or rifling in wonder goals, Ledesma's chapter within the broader story of FC Cincinnati's 2018 season is riddled with dozens of moments like the one he produced at Richmond Sept. 26.
The sum total of it all? Ledesma's had one of the best individual seasons in FC Cincinnati's young history, and that has him at the forefront of the league's Most Valuable Player conversation, as well as the club's plans for Major League Soccer.
Soccer talent diffused widely across the U.S. when the North American Soccer League, where Ledesma played for the New York Cosmos, fell on hard times last year. FC Cincinnati swooped in to nab Ledesma, among other celebrated talents from the NASL.
The actual groundwork to bring Ledesma to Cincinnati was laid at English Championship side Middlesbrough F.C. several years earlier, though.
There, Ledesma's career intersected with second-year FC Cincinnati right back Justin Hoyte.
At Middlesbrough, Ledesma and Hoyte made a connection on and off the field that would prove crucial to them reuniting in Cincinnati for 2018.
"I've known Manu for a long time and he played in front of me at Middlesbrough just as he does now," Hoyte said.
This past offseason, when FC Cincinnati head coach Alan Koch was doing his homework on Ledesma, he leaned on Hoyte for an assessment prior to inking Ledesma.
"When we were thinking of signing Manu last year, the first person I spoke to was Justin Hoyte," Koch told The Enquirer. "Justin said he enjoyed playing with him at Middlesbrough, said they had a good connection.
"Justin was right."
"Right" might be an understatement.
Ledesma is a key cog in an already deep and gifted FC Cincinnati side, and his statistics have resonated far beyond the Queen City.
The 16 goals Ledesma's scored tied FC Cincinnati's single-season club record.
His 15 assists are a USL single-season-record.
The gaudy numbers have planted Ledesma at the forefront of the league's MVP race, although Ledesma said he doesn't see it that way.
"If I say that, I am arrogant," Ledesma said. "I say I already won the MVP because I got to touch the (regular-season championship) trophy and my family got to touch it... About the MVP, I am already winning it because of these fans. We make them happy, and this is the most important thing for me."
Ledesma's stats also made him one of the club's priorities for 2019 as a Friday report stated Ledesma was returning to FC Cincinnati for the 2019 season.
As for the MVP race, others see it differently.
Asked if Ledesma was the USL's MVP, Hoyte said, "I think he has to be."
"What he's done this season is something that's hardly ever been done in this league," Hoyte added. "I mean, what he brings to the team not just attacking-wise, but defensively as well. Just a great person on and off the field.
"I'm not surprised at all with what he's accomplished this season. His ability with his left foot is amazing. You can see it in games and even in training and his left foot's just fantastic. Playing with him is just a joy. I can give him the ball whenever and he makes the decisions for me, same as at Middlesbrough."
Koch has repeatedly stopped short of saying Ledesma is the league's MVP, but that's not surprising for a coach that has always emphasized team accomplishments over individual accolades.
And it's not like Koch hasn't heaped acclaim on Ledesma. Quite the opposite, and what Koch has said is some of the warmest praise he's given any player to wear the orange and blue.
"Manu has had an excellent season and I am excited to see how he finishes it," Koch told The Enquirer. "We have some special players and characters on our team and Manu is one of the shining lights"
How Ledesma did it
On Thursday, Ledesma was awarded USL Player of the Month for September. Long after practice ended and word of the forthcoming honor leaked out, he conceded that 2018 was easily the best year of his playing career.
By his own admission, though, his career prior to arriving in Cincinnati was up and down and included stops at more than a dozen clubs.
At Middlesbrough and other stops along the way, Ledesma was distracted.
His mental space was occupied with things like the vague reference he made during his Enquirer interview to trouble with the English press, as well as long periods being separated from his family early in the life of his eldest son, Benjamin.
Frequent loan deals. Infrequent minutes. The obstacles often cascaded in the wrong direction for Ledesma.
That's changed in Cincinnati. Here, for the first time, his mind has been freed of the aforementioned impediments to his performances.
For Ledesma, steady confidence comes from having a happy family by his side, and he's finally achieved that in Cincinnati.
"You can have the best talent, be the best player in the world, but if your mind is in trouble, it's so difficult," Ledesma said. "I told Alan (Koch) at the beginning, if my family is happy, I can do whatever you want. So, the club takes care of my family every single time. Alan's always asking about my kids and wife and that makes me feel good. I can do anything because I know I have support from the club for my family."
Playing with a clear head for perhaps the first time in his career, Ledesma sets the tone for dedication in training sessions with FC Cincinnati.
He is routinely the last player off the training field, sometimes hitting balls for up to an hour after other players have showered and camped themselves in the player lounge at Nippert Stadium.
"This is why I stay sometimes to hit 20 or 40 shots – to have perfection on the ball," Ledesma said. "Never get relaxed. I remember the (Sept. 1) game at home against Pittsburgh. We were losing 1-0 and one of the Pittsburgh players say to me, 'you are the best player in the league. Why are you so mad? Sometimes you have to be relaxed. And I said, 'you know what, you never can get relaxed in this game.' Then - boom! - 1-1 and 2-1.
"After the game, I say to him, 'see? If you get relaxed, you lose.'"


A few days ago here on Futurisms, commenter Kurt9 made an interesting point: "The idea that our cutting-edge science, particularly radical life extension, is incompatible with current social regimes comes from you guys, not from us transhumanists." In one sense his statement is not true at all; plainly, for all he might disagree with their vision of the future, there are transhumanists (and no few of them) who are talking about global changes that would render current society and politics as obsolete as the human beings that constitute them. If, as many transhumanists believe, we are Singularity-bound, it is no stretch to conclude that current society and politics would disappear — after all, do human beings today organize our lives like our lemur-like ancestors? Yet some advocates of hyperintelligence would say that the gap between humanity and posthumanity will be even greater than that one.
Still, Kurt9's point is true in the sense that it reminds us that relatively few transhumanists have bothered to think very deeply about the political consequences of the changes they advocate. They may, as per the above, lay out the premises, but indeed leave their critics to draw the conclusions. Nick Bostrom says a few soothing words in the "Transhumanist FAQ," and James Hughes makes some very near-term policy recommendations in Citizen Cyborg. There are some ongoing discussions of the rights of sentient beings, and Simon Young takes a stab at a "neuropolitics," but barely achieves a flesh wound. I'd welcome being shown otherwise — please feel free to make suggestions in the comments — but so far as I can tell, transhumanism awaits its John Locke, its James Madison, its Herbert Croly, or even its E. J. Dionne.
I don't think that is an accident. First, it would be perfectly consistent for the kind of transhumanist that Kurt9 disagrees with to think it the height of folly and presumption for us to think we could imagine a good or even adequate organization for a world that mere humans will find increasingly hard to understand. Second, it is consistent with the rather superficial libertarianism which guides so much of transhumanism, a quasi-political theory that leads to the now fashionable contempt for mere politics. Third, it is consistent with the moralism of transhumanism, which amounts to "if you will it, it is no dream." Thinking too hard about all the ramifications of one's dreams is not necessarily going to make it easier to follow them. Fourth, this apolitical tendency is consistent with one of the most powerful arguments transhumanists can make against at least some of their critics. If their goals appear utopian, they can point out how many things once thought difficult or impossible to do are now commonplace. To look at all the tradeoffs, compromises, side effects, and unintended consequences of these success stories — which is to say, to look at them politically — would weaken the appeal of this argument. Finally, even if not all transhumanists believe that the future they desire is, strictly speaking, inevitable, a great many seem to feel that history is on their side. Theirs is not a revolution that needs to be made politically, it just needs to be born.
But sooner or later, transhumanists will have to face up to politics. The tensions within their own movement suggested by the likes of Kurt9 will require it, not to speak of external critics. As the followers of Marx found out, you can only hide behind the direction of history for so long; sooner or later somebody has to start thinking about who is going to take out the trash.
But have you considered that it is people like you who continue to write these articles that gives (the transhumanists that Kurt9 disagrees with) the firepower they need? So.. stop it already :-).
I knew you were going to makes these points and, believe it or not, I agree with them. The difference between you and me is that you place credibility with the whole AI/uploading scenario and I do not. Hence, my disregard for its relevance to political discussion.
Here's a link to a slide show describing what we really can expect in the next 20 years.
SENS-style radical life extension is probable as is some form of fusion power (yes, there are enough start-ups working on fusion now that is is likely that one of them will be successful). Even without the fusion, we still have Thorium-based fission power as well as fusion/fission hybrid power.
You will note that the projected nanotech is fairly conservative and is along the lines that Richard Jones postulates. The semiconductor/IT projections are also similarly conservative as well.
The main effect of all of these developments (including the radical life extension) is to increase economic growth rates, especially for China and the developing world. What's not to like about this scenario?
I think both sides to this debate under-estimate peoples' ability to select whatever options are appropriate to them. Despite me being a self-described transhumanist and very passionate about radical life extension, I have actually been a late-adopter of most electronic/entertainment technology. I first got on the internet later than most other people. I got my first cell phone much later than most others (and found it irritating the first two years I had it). I bought my first MP3 player only two years ago and I have yet to get into this internet social networking stuff (Myspace, Facebook, etc.). We bought a big screen telly 5 years ago because my wife wanted it (I initially did not want it, thought it was too expensive, waste of money).
I think the people most into radical life extension are not the technogeeks, but those of us who are very extroverted, who like to look good and go out a lot and especially like to travel and do things.
Do realize for every transhumanist, there is at least ten (and probably a hundred) of us who are into radical life extension, and we are not all technogeeks, either.
One of us might even sit next to you on your next flight, and you won't even know it.
I'm not sure that kurt9 is quite right that the issue between us is how much credibility we place in uploading scenarios and the more extreme visions of posthuman transformation.
Even if I thought such things were absolutely impossible, it would still (indeed, all the more) be thought-provoking that otherwise intelligent and rational-seeming people were advocates for such a future, and attempting to make it normative in the present. Furthermore, there is no law that says people have to organize and advocate only on behalf of possible goals, or that only such goals are politically relevant. While one conclusion we might draw from the twentieth century is that sooner or later reality will bite back when one pursues impossible goals, another would be that a tremendous amount of damage will be done in the process. Hence there remains reason to look critically at transhumanism whether or not everything advocated proves to be possible.
I don't know if transhumanism is quite so much on the march as its more fervent advocates claim, but if for the moment it can get coverage in GQ, then what more could it ask? So without assuming that there is a transhumanist under every bed, it would not surprise me to find one next to me on an airplane. In fact, the last guy I sat next to was reading science fiction! Hmmmmm.
All of this is certainly true. But consider those "impossible goal" movements of the 20th century involved a considerable amount of coercion (Hitler's death camps, Stalin's galugs, as extreme examples). Even the most radical transhumanist does not advocate this kind of coercion. Indeed, the transhumanists I know personally tend to be libertarian-oriented.
Yes, the more far out versions involve stuff like converting the Earth's mass into nanocomputers or whatever else they call it. However, I think Jupiter and the other outer planets and moons offer far greater mass and resources for these kind of mad schemes. They can leave the Earth (and moon) alone. In any case, I do not put much stock in these ideas.
Yeah, we got coverage in GQ. But that's a long time ago (around '94). I'm surprised anyone would mention that now. I was living in Japan at the time. I remember seeing the GQ issue at Kinokuniya.
BTW, Aubrey de Grey was on CNN in December along with Sanjay Gupta. I didn't see the segment (I was in Costa Rica), but I heard it was quite good.
I believe the GQ reference was to the January 2010 issue, which features an article called "Are You Ready for the Singularity?" by Dan Halpern.
This politics concern based on, so far as I can see, some idea that things break down or go through a phase change with greater levels of difference in capabilities, is pretty nonsensical. We already live in a world in which some people are millions of times more economically productive than other people, and in which the dominant culture has gone through a couple of phase changes in preferred governance models over the past few centuries.
The human-engineered megadeaths happened, you'll note, when people started in earnest down the path of (a) imposing equality and (b) trying to centralize the organization of society.
No, I haven't seen the January 2010 issue of GQ. I'll check it out. I wouldn't be surprised though, because GQ ran an article about the extropians back in '94 or so (the one I referred to previously). It was actually quite good.
1) So far, we have transhumanism only in theory. In theory, Marx was a great liberator, seeking to free humanity from the tyranny of the state and the division of labor, in the name of omnicompetent human choice and a new way of being human. Sound vaguely familiar? Marxism took its destructive course due to various internal theoretical tensions and contingent circumstances whose very significance Marxists denied because they thought they understood the direction of history (sound familiar again?). A serious transhumanist politics would want to show why it would be immune from the same kind of toxic transformation.
2) The disparity in economic productivity between one person on earth and another is irrelevant to my argument, unless Reason is interested in making the case that those who are less productive are less human than those who are more productive. I'd be interested in seeing that argument.
3) Finally, I would, by Seldon, be so bold as to suggest that the use of concepts from physics (such as "phase change") as metaphors for politics is not the hallmark of a serious understanding of politics.
The only sense in which "some people are millions of times more economically productive than other people" is that some people are not economically productive at all, including quite a large fraction of the people who enjoy wealth and incomes millions of times greater than those of other people.
Obviously, the fact that Reason was alluding to is that some people are millions of times more rich and powerful than others in this world. One of the great fears about technology is that it may amplify such inequality. There is plenty of evidence to support this concern, as well as some to counter it.
Also, I must disagree that there is anything unserious about trying to understand politics at least partly in terms of physics analogies and concepts such as phase changes.
...For example, physicists have shown that the distribution of incomes in mature market economies can be reproduced by a purely statistical model treating money as a conserved, randomly-exchanged quantity anlogous to energy in thermodynamics, without any reference to presumed differences in people's economic productivity. If you think there is something unserious about this, check out the papers at http://www.physics.umd.edu/~yakovenk/econophysics/. The fit to the data is pretty good; show me a theory in classical macroeconomics which makes a better quantitative prediction.
I should correct myself, though. A good fraction of the world's poor still live on a dollar a day, but very few people make a million dollars a day. A better range of numbers for comparing people's incomes is "thousands".
Still, if anyone suggests that any human being is a thousand or even ten times more economically productive than someone who works a full day driving a bus, teaching school, growing or serving food, keeping airplanes from colliding, etc., well, that just makes me angry.
I saw the GQ article in my local Borders. Its the standard AI/singularity tripe that is becoming more common in the print media these days. I remain a skeptic on the plausibility of AI (and of uploading). I guess I will not believe in it until someone actually makes an AI that comes over and knocks on my door.


text:
Q: Zigzag Movement of an object in Pygame I want the aliens to move in a zigzag pattern.
Currently they are moving straight down.
The game is currently set sideways.
This is the Alien class
class Alien(Sprite):

    def __init__(self,ss_game):
        super().__init__()

        self.screen = ss_game.screen
        self.settings = ss_game.settings
        self.screen_rect = ss_game.screen.get_rect()

        self.image = pygame.image.load('images/alien_2.bmp')
        self.rect = self.image.get_rect()

        self.rect.x = self.rect.height
        self.rect.y = self.rect.width

        self.x = float(self.rect.x)
        self.y = float(self.rect.y)

    def _check_edges(self):

        screen_rect = self.screen.get_rect()
        if self.rect.top >= screen_rect.top or self.rect.bottom <= self.screen_rect.bottom:
            return True

    def update(self):
        self.rect.x += (self.settings.alien_speed * self.settings.fleet_direction)

These are a few more lines of code which decide/create an amount of aliens and there movement.
    def _create_fleet(self):

        alien = Alien(self)
        alien_width, alien_height = alien.rect.size
        ship_width, ship_height = self.ship.rect.size
        space_y = self.settings.screen_height +(alien_height) - ship_height
        number_y = space_y // (2*alien_height)
        space_x = self.settings.screen_width + (alien_width) - 5 * ship_width
        rows = space_x // (2*alien_height)
        for row in range(rows):
            for number in range(number_y):
                self._create_aliens(number, row)

    def _create_aliens(self,number,row):

        alien = Alien(self)
        alien_width,alien_height = alien.rect.size
        alien.x = alien_width + (1.5*alien_width) * row
        alien.rect.x = alien.x
        alien.rect.y = alien_width + (2*alien_width) * number
        self.aliens.add(alien)

    def update_aliens(self):

        self.aliens.update()
        self._check_fleet_edges()

    def _check_fleet_edges(self):
        for alien in self.aliens.sprites():
            if alien._check_edges():
                self._change_fleet_direction()
                break

    def _change_fleet_direction(self):
        for alien in self.aliens.sprites():
            alien.rect.x += self.settings.fleet_drop_speed
        self.settings.fleet_direction *= -1

This a picture of the current game, there is space on the right of alien and on the left of aliens

The code may be little messy due to changes/experiments,
If there is something that doesn't make sense you can ask me.
Currently the aliens move in a linear motion, and are fast(side note).
I want the aliens to move in a zigzag motion.

A: You can make them move along a sin wave. In you case it would probably look this this:
class Alien(Sprite):
    def __init__(self,ss_game):
        #...
        self.frequency = 2
        self.ySpeed = 0.01
        self.overallY = self.rect.y
        self.amplitude = 30

 def update(self):
        t = pygame.time.get_ticks() * self.ySpeed % 500
        self.rect.x += (self.settings.alien_speed * self.settings.fleet_direction * self.frequency)
        self.rect.y = (self.amplitude * math.sin(t)) + self.overallY

Here is a self-contained example.
import pygame
import math

ySpeed = 0.01
xVel = 0.1
x = 0
y = 250

amplitude = 20
frequency = 2

window = pygame.display.set_mode((600, 600))
pygame.init()

while True:

    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            pygame.quit()

    #stuff to do with x direction
    x += xVel * frequency
    if (x < 0 or x > 600 - 30):
         xVel *= -1

    #generate the zigzag y
    t = pygame.time.get_ticks() * ySpeed % 500
    zigzagY = (amplitude * math.sin( t )) + y

    #draw
    window.fill((0, 0, 0))
    pygame.draw.rect(window, (255, 255, 255), (x, zigzagY, 30, 30))
    pygame.display.flip()

Your entire updated code:
import pygame
import math
from pygame.locals import *

class Settings:
    def __init__(self):

        self.screen_width = 1200
        self.screen_height = 800
        self.bg_color = (230, 230, 230)
        self.ship_speed = 1.5

        self.bullet_speed = 1.5
        self.bullet_width = 15
        self.bullet_height = 3
        self.bullet_color = (60, 60, 60)
        self.bullet_allowed = 3

        self.alien_speed = 1
        self.fleet_drop_speed = 10
        self.fleet_direction = 1

class Ship:
    def __init__(self, ai_game):
        self.screen = ai_game.screen

        self.settings = ai_game.settings

        self.screen_rect = ai_game.screen.get_rect()

        self.image = pygame.image.load('images/ship_2.bmp')
        self.rect = self.image.get_rect()

        self.rect.midright = self.screen_rect.midright

        self.y = float(self.rect.y)

        self.moving_up = False
        self.moving_down = False

    def update(self):
        if self.moving_down and self.y < 750:
            self.y += self.settings.ship_speed
        if self.moving_up and self.y > 0:
            self.y -= self.settings.ship_speed
        self.rect.y = self.y

    def blitme(self):
        self.screen.blit(self.image, self.rect)

class Bullet(pygame.sprite.Sprite):
    def __init__(self,ai_game):
        super().__init__()

        self.screen = ai_game.screen
        self.settings = ai_game.settings
        self.color = self.settings.bullet_color

        self.rect = pygame.Rect(0,0, self.settings.bullet_width, self.settings.bullet_height)
        self.rect.midright = ai_game.ship.rect.midright
        self.x = float(self.rect.x)

    def update(self):
        self.x -= self.settings.bullet_speed
        self.rect.x = self.x

    def draw_bullet(self):
        pygame.draw.rect(self.screen, self.color, self.rect)

class Alien(pygame.sprite.Sprite):
    def __init__(self, ai_game):
        super().__init__()
        self.screen = ai_game.screen
        self.settings = ai_game.settings

        self.image = pygame.image.load('images/alien_2.bmp')
        self.rect = self.image.get_rect()

        # Start each new alien near the top left of the screen.
        self.rect.y = self.rect.width
        self.rect.x = self.rect.height

        # Store the alien's exact horizontal position.
        self.y = float(self.rect.y)

        self.frequency = 1
        self.ySpeed = 0.09
        self.overallY = self.rect.y
        self.amplitude = 4

    def check_edges(self):
        screen_rect = self.screen.get_rect()
        if self.rect.top <= screen_rect.top or self.rect.bottom >= 800:
            return True

    def update(self):
        self.rect.x += (self.settings.alien_speed * self.settings.fleet_direction * self.frequency)

        #you can either comment out the one bellow and use the next two lines
        #or you can leave it as it is.
        #You might also want to change the frequency, ySpeed, amplitude and
        #self.settings.alien_speed values to get it to zigzag exactly how you
        #want it.

        self.rect.y = self.overallY + (self.amplitude * math.sin(self.ySpeed * self.rect.x))

##        t = pygame.time.get_ticks() * self.ySpeed % 500
##        self.rect.y = (self.amplitude * math.sin(t)) + self.overallY

class SideShooter:

    def __init__(self):
        pygame.init()
        self.settings = Settings()

        self.screen = pygame.display.set_mode((self.settings.screen_width,self.settings.screen_height))
        pygame.display.set_caption("Alien Invasion")

        self.ship = Ship(self)
        self.bullets = pygame.sprite.Group()
        self.aliens = pygame.sprite.Group()

        self._create_fleet()

    def run_game(self):
        """Start the main loop for the game."""
        while True:
            self._check_events()
            self.ship.update()
            self._update_bullets()
            self._update_aliens()
            self._update_screen()

    def _check_events(self):
        """Respond to keypresses and mouse events."""
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                sys.exit()
            elif event.type == pygame.KEYDOWN:
                self._check_keydown_events(event)
            elif event.type == pygame.KEYUP:
                self._check_keyup_events(event)

    def _check_keydown_events(self, event):
        """Respond to keypresses."""
        if event.key == pygame.K_UP:
            self.ship.moving_up = True
        elif event.key == pygame.K_DOWN:
            self.ship.moving_down = True
        elif event.key == pygame.K_q:
            sys.exit()
        elif event.key == pygame.K_SPACE:
            self._fire_bullet()

    def _check_keyup_events(self, event):
        """Respond to key releases."""
        if event.key == pygame.K_UP:
            self.ship.moving_up = False
        elif event.key == pygame.K_DOWN:
            self.ship.moving_down = False

    def _fire_bullet(self):
        if len(self.bullets) < self.settings.bullet_allowed:
            new_bullet = Bullet(self)
            self.bullets.add(new_bullet)

    def _update_bullets(self):
        self.bullets.update()

        for bullet in self.bullets.copy():
            if bullet.rect.right <= self.screen.get_rect().left:
                self.bullets.remove(bullet)
        self._check_bullet_detection()

    def _check_bullet_detection(self):
        collisions = pygame.sprite.groupcollide(self.bullets, self.aliens, True, True)

        if not self.aliens:
            self.bullets.empty()
            self._create_fleet()

    def _update_aliens(self):
        self._check_fleet_edges()
        self.aliens.update()

    def _create_fleet(self):
        alien = Alien(self)
        alien_width, alien_height = alien.rect.size
        available_space_x = self.settings.screen_width - (2* alien_width)
        number_aliens_x = available_space_x // (3*alien_width)

        ship_height = self.ship.rect.height
        available_space_y = (self.settings.screen_height -
                                (3 * alien_height) - ship_height)
        number_rows = available_space_y // (2 * alien_height)

        for row_number in range(number_rows):
            for alien_number in range(number_aliens_x):
                self._create_alien(alien_number, row_number)

    def _create_alien(self, alien_number, row_number):
        alien = Alien(self)
        alien_width, alien_height = alien.rect.size
        alien.overallY = alien_width + 2 * alien_width * alien_number
        #alien.rect.y = alien.y
        #self.overallY = alien.y
        alien.rect.x = alien.rect.height + 2 * alien.rect.height * row_number
        self.aliens.add(alien)

    def _check_fleet_edges(self):
        for alien in self.aliens.sprites():
            if alien.check_edges():
                self._change_fleet_direction()
                break

    def _change_fleet_direction(self):
        for alien in self.aliens.sprites():
            alien.rect.x += self.settings.fleet_drop_speed
        self.settings.fleet_direction *= -1

    def _update_screen(self):
        self.screen.fill(self.settings.bg_color)
        self.ship.blitme()
        for bullet in self.bullets.sprites():
            bullet.draw_bullet()
        self.aliens.draw(self.screen)

        pygame.display.flip()

ss = SideShooter()
ss.run_game()

A: If I understand what you mean by "zigzag" to mean sort of like a sawtooth motion (moving up and down repeatedly while moving to one side constantly), each alien would trace a path like this (ending at the .):
/\  /\  /\  /\  .
  \/  \/  \/  \/

If that's the case, aliens need to update their y axis in addition to their x axis.
On the other hand, if you want the y-coordinate to stay constant and move left, then right, then left etc. along the x-axis, then it's not clear from the code you shared how that would happen.
It seems like the way you've written it, as soon as a single alien exceeds the screen space, the entire fleet changes direction. This may be desired, but you could potentially simplify your code by doing this check and direction change on a per-alien basis.
For example, instead of changing fleet_direction you could add a direction parameter to the Alien class, and change the direction of each alien individually.
This would allow you to write your update_aliens function like this:
for alien in aliens:
  if alien.check_edges():
    alien.direction *= -1
  alien.update()

[edit]
Based on your comments, you could try adding some additional y-update to your Alien.update function like this:
def __init__(self):
  #...
  self.y_direction = 1
  self.y_counter = 1

def update(self):
  self.rect.x += #...
  self.rect.y += 1
  if self.y_counter == 10: # zig size is 10
    self.y_counter = 0
    self.y_direction *= -1 # change y direction only
  self.y_counter += 1

This is similar to the sine suggestion from another answer, but you should keep your bounds checking, so your aliens reverse direction when they hit the edge of the screen.
Alternatively, you could apply the direction change only when the sprite touches the edge of the screen:
class Alien(Sprite):
  def __init__(self):
    # ...
    self.x_direction = 1
    self.y_direction = 1

  def _check_edges(self):
    # ...
    if self.rect.y > screen_rect.top or self.rect.y < screen_rect.botttom:
      self.y_direction *= -1
    if self.rect.x > screen_rect.right or self.rect.x < screen_rect.left:
      self.x_direction *= -1

  def update(self):
    # ...
    self.rect.x += self.settings.alien_speed * self.x_direction
    self.rect.y += self.settings.alien_speed * self.y_direction

A: The code should work as intended:
import sys
import pygame
from pygame.sprite import Sprite
class Settings:
def __init__(self):

    self.screen_width = 1200
    self.screen_height = 800
    self.bg_color = (230, 230, 230)
    self.ship_speed = 1.5

    self.bullet_speed = 1.5
    self.bullet_width = 15
    self.bullet_height = 3
    self.bullet_color = (60, 60, 60)
    self.bullet_allowed = 3

    self.alien_speed = 1
    self.fleet_drop_speed = 10
    self.fleet_direction = 1

class Ship:
def __init__(self, ai_game):
    self.screen = ai_game.screen

    self.settings = ai_game.settings

    self.screen_rect = ai_game.screen.get_rect()

    self.image = pygame.image.load('images/ship_2.bmp')
    self.rect = self.image.get_rect()

    self.rect.midright = self.screen_rect.midright

    self.y = float(self.rect.y)

    self.moving_up = False
    self.moving_down = False

def update(self):
    if self.moving_down and self.y < 750:
        self.y += self.settings.ship_speed
    if self.moving_up and self.y > 0:
        self.y -= self.settings.ship_speed
    self.rect.y = self.y
def blitme(self):
    self.screen.blit(self.image, self.rect)

class Bullet(Sprite):
def __init__(self,ai_game):
    super().__init__()

    self.screen = ai_game.screen
    self.settings = ai_game.settings
    self.color = self.settings.bullet_color

    self.rect = pygame.Rect(0,0, self.settings.bullet_width, self.settings.bullet_height)
    self.rect.midright = ai_game.ship.rect.midright
    self.x = float(self.rect.x)

def update(self):
    self.x -= self.settings.bullet_speed
    self.rect.x = self.x

def draw_bullet(self):
    pygame.draw.rect(self.screen, self.color, self.rect)

class Alien(Sprite):
def __init__(self, ai_game):
    super().__init__()
    self.screen = ai_game.screen
    self.settings = ai_game.settings

    self.image = pygame.image.load('images/alien_2.bmp')
    self.rect = self.image.get_rect()

    # Start each new alien near the top left of the screen.
    self.rect.y = self.rect.width
    self.rect.x = self.rect.height

    # Store the alien's exact horizontal position.
    self.y = float(self.rect.x)

def check_edges(self):
    screen_rect = self.screen.get_rect()
    if self.rect.top <= screen_rect.top or self.rect.bottom >= 800:
        return True

def update(self):
    self.y += (self.settings.alien_speed *
                    self.settings.fleet_direction)
    self.rect.y = self.y

class SideShooter:
def __init__(self):
    pygame.init()
    self.settings = Settings()

    self.screen = pygame.display.set_mode((self.settings.screen_width,self.settings.screen_height))
    pygame.display.set_caption("Alien Invasion")

    self.ship = Ship(self)
    self.bullets = pygame.sprite.Group()
    self.aliens = pygame.sprite.Group()

    self._create_fleet()

def run_game(self):
    """Start the main loop for the game."""
    while True:
        self._check_events()
        self.ship.update()
        self._update_bullets()
        self._update_aliens()
        self._update_screen()

def _check_events(self):
    """Respond to keypresses and mouse events."""
    for event in pygame.event.get():
        if event.type == pygame.QUIT:
            sys.exit()
        elif event.type == pygame.KEYDOWN:
            self._check_keydown_events(event)
        elif event.type == pygame.KEYUP:
            self._check_keyup_events(event)

def _check_keydown_events(self, event):
    """Respond to keypresses."""
    if event.key == pygame.K_UP:
        self.ship.moving_up = True
    elif event.key == pygame.K_DOWN:
        self.ship.moving_down = True
    elif event.key == pygame.K_q:
        sys.exit()
    elif event.key == pygame.K_SPACE:
        self._fire_bullet()

def _check_keyup_events(self, event):
    """Respond to key releases."""
    if event.key == pygame.K_UP:
        self.ship.moving_up = False
    elif event.key == pygame.K_DOWN:
        self.ship.moving_down = False

def _fire_bullet(self):
    if len(self.bullets) < self.settings.bullet_allowed:
        new_bullet = Bullet(self)
        self.bullets.add(new_bullet)

def _update_bullets(self):
    self.bullets.update()

    for bullet in self.bullets.copy():
        if bullet.rect.right <= self.screen.get_rect().left:
            self.bullets.remove(bullet)
    self._check_bullet_detection()

def _check_bullet_detection(self):
    collisions = pygame.sprite.groupcollide(self.bullets, self.aliens, True, True)

    if not self.aliens:
        self.bullets.empty()
        self._create_fleet()

def _update_aliens(self):
    self._check_fleet_edges()
    self.aliens.update()

def _create_fleet(self):

    alien = Alien(self)
    alien_width, alien_height = alien.rect.size
    available_space_x = self.settings.screen_width - (2* alien_width)
    number_aliens_x = available_space_x // (3*alien_width)

    ship_height = self.ship.rect.height
    available_space_y = (self.settings.screen_height -
                            (3 * alien_height) - ship_height)
    number_rows = available_space_y // (2 * alien_height)

    for row_number in range(number_rows):
        for alien_number in range(number_aliens_x):
            self._create_alien(alien_number, row_number)

def _create_alien(self, alien_number, row_number):
    alien = Alien(self)
    alien_width, alien_height = alien.rect.size
    alien.y = alien_width + 2 * alien_width * alien_number
    alien.rect.y = alien.y
    alien.rect.x = alien.rect.height + 2 * alien.rect.height * row_number
    self.aliens.add(alien)

def _check_fleet_edges(self):
    for alien in self.aliens.sprites():
        if alien.check_edges():
            self._change_fleet_direction()
            break

def _change_fleet_direction(self):
    for alien in self.aliens.sprites():
        alien.rect.x += self.settings.fleet_drop_speed
    self.settings.fleet_direction *= -1

def _update_screen(self):
    self.screen.fill(self.settings.bg_color)
    self.ship.blitme()
    for bullet in self.bullets.sprites():
        bullet.draw_bullet()
    self.aliens.draw(self.screen)

    pygame.display.flip()

if name == 'main':
ss = SideShooter()

ss.run_game()


The first book I wrote took about 9 years from conception to publication. It's called Aviary Wonders Inc., Spring Catalog and Instruction Manual. It began with a drawing of a catalog cover that I sketched while listening to coverage of Hurricane Katrina. I spent the next four or five years working on the project sporadically, writing it as a novella, a screenplay, a "found journal," and a fake scrapbook before returning to the original idea of a catalog.
I'm a bird-lover and an expert worrier. I can imagine worst case scenarios in full detail in record time. I had lived in New Orleans for 12 years and left the year before the storm devastated the city. In its aftermath, as I agonized over the destruction from afar, I heard an interview with a couple that had stayed in town for the whole thing. They described the eerie silence. In particular, they mentioned how strange it was not to hear the birds outside the window in the morning.
Because I had escaped the loss that affected so many in New Orleans, I didn't feel it was my place to address the human impact. It was too huge, I didn't know how, and I didn't feel it would be appropriate for someone who had escaped such a thing to address it.
There was once a rookery for snowy and white egrets and heron in Audobon Park in New Orleans and I spent many evenings walking around the park, listening to hundreds of birds making a racket. The thought of the city without them was unbearable. I had spent a few months in Brazil hiking and bird-watching and was aware of the habitat loss and subsequent species decline there. And I am well aware of the reckless things we humans are doing to damage bio-diversity. The idea for the bird catalog was born from the notion that when there is a profit to be made, we hesitate to change harmful behavior. And we are working under the assumption that scientists will find some way to clean up our mess. So why couldn't someone make birds to replace the ones that are gone or disappearing?
I studied painting at the New Orleans Academy of Fine Arts, founded by the extraordinary painter and teacher, Auseklis Ozols. It is a small but impressive school that emphasizes drawing and painting from life (and is an atelier, not a degree program). I formed close friendships with him and a handful of my classmates and we spent a lot of time painting and socializing together. This group of passionate artists served as the inspiration for the imaginary company of Aviary Wonders. I imagined that the group lived in a humongous Victorian house tucked away in the woods of upstate New York (where my mother's side of the family is from), making birds in secret and releasing them discreetly.
The founder of the company is named Alfred Wallis, an allusion to Alfred Wallace, the British naturalist and explorer, who (among other things) collected birds in Brazil. I changed the spelling so that he wouldn't be confused for the original Wallace or a descendant.
As I said, the book went through many changes. I was earning a bachelor's degree from the Pennsylvania Academy of Fine Art while working on it. Since I was majoring in printmaking, I had planned to create the whole book as a series of lithographs. I brought the prints and sketches and piles of notes to an illustration class. My teacher loved the idea and told me that when I settled on a format to let him know, and then he introduced me to the perfect editor, who loved the project and helped me make it stronger and more coherent.
This book was my introduction to illustrating a "children's book," in quotes because I didn't originally intend for the book to be for children, but for bird and nature lovers and for artists. However, there are very few illustrated books for adults- not including graphic novels and the occasional exception written by established writers/illustrators. I learned a ton from the process, especially about the importance of finding the right editor (and agent).
It can be challenging for some artists to accept input, but as an illustrator, you'll have to get used to this or you won't be able to work in the field. Fortunately, my editor, Marcia Leonard, understood the dark humor and the concept from the beginning, and we discussed my vision at the beginning of the process so that she could guide me in the right direction. In order to get this published, it was important to make it more kid-friendly, which meant making a couple of minor changes. For example, I needed to change the bird that looked dead in the instruction pages to look like he was sleeping, which I did by giving him a pillow made of a sponge and changing his body language. I call the bird a "him" because these don't reproduce.
She also suggested that I include a few details about birds that have gone extinct so that the purpose of the catalog would be clear. I used as few of these details as I felt possible to get the point across but not be heavy-handed.
At one point, she suggested that I use all realistic bird parts, but I felt that would take away the fantasy element and repeat the hundreds of bird books that are already out there. Also, I had named the crests and collars after artists, writers, and musicians that I admired, but she pointed out that these names should reflect Alfred's tastes, not mine. At this point, I realized how important it is to have a clear understanding of your art and intention and to listen to input with an open mind. She helped me make the book stronger, but I needed to truly understand my vision of the project so that I wouldn't be steered in the wrong direction.
Because I knew even less about using a computer than I do now, I created the lettering by hand. I assumed it would be replaced by the graphic designer but the publisher felt it added an important element to the book. I agree, though I think it was the most time-consuming part.
I did a ton of research and spent lots of time drawing birds from the collection of the incredible and highly recommended Wagner Free Institute in Philadelphia. All of the bird parts in the book are in the shape of actual ones, even the wattle and comb and crests. Nature is full of surprises! The Cornell Lab of Ornithology is an excellent online resource for bird-lovers and beginners and has an impression collection of recordings to help you identify bird calls.
Ultimately, there was only one page that got cut and that I wish had remained. I don't remember why we left it out. It was this: a pledge not to keep your Aviary Wonders bird in a cage. What more cruelty can a person inflict on a "pet," than to imprison it? Not to mention, the exotic pet trade is a great contributor to species decline.


On average, each person uses 60 gallons of water per day.
If you are landscaping your yard from scratch or re-landscaping, proper planning and design can aid in water conservation. Limiting the lawn area, good soil, mulch, and native plants can all help reduce water use in the yard.


Who is the Real Commander in Chief-William Kristol, Benjamin Netanyahu or Obama?
I agree with Robert Cogan's recent Erie Times letter arguing that an attack on Iran is not in our interest. I say it is hardly necessary by anyone. Another ineptly conceived and implemented war and the resulting sky rocketing oil prices won't do us any good. One can read where the 2007 National Intelligence Estimates and the CIA say Iran stopped any nuclear weapon research 10 years ago. Iran may be doing more research now but who could blame them? They are surrounded by enemies and Israel is holding the bomb over their heads. They may want nuclear capability for the sake of parity with their neighbors. The Ayatollah is not stupid. An Iranian attack on Israel, conventional or otherwise, would result in Iran's destruction by Israel, conventionally or otherwise. A nuclear attack on the US by Iran is a ridiculous concept. Israel is more of a nuclear threat to the Middle East than Iran. Israel has not signed on to the Nuclear Non-Proliferation Treaty. West Bank settlement creation and the starvation program in Gaza are primary de-stabilizing forces in the Middle East. The perpetual Pakistan-India confrontation is a much more immediate nuclear threat. There is no in-depth coverage by the media probably because we will find out that Israel is India's nuclear enabler. The Iran hysteria is fueled by Israel firsters like The Weekly Standard's William Kristol. They and Benjamin Netanyahu want us, the US, to do the dirty work. The military and their hawk supporters such as Senators Lieberman and McCain advocate intervention also. They create fear to justify empire building and the ever-increasing Military Industrial Complex they know and love. Bucking Israel and AIPAC is a career killer in Washington. Don't count on clear-headed thinking from Congress nor President Obama when his flexibility increases next year.
This entry was posted on April 7, 2012 at 4:17 pm	and is filed under Israel First. Tagged: AIPAC, Benjamin Netanyahu, Iran, Israel, Israel firster, Lieberman, McCain, Military Industrial Complex, Obama, Pakistan-India, William Kristol. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
Sooner or later our Zionist masters will get what they want, American troops doing Israel's dirty work again. Why should Israeli troops be put in harm's way when the the Goy is so ready, willing, and stupid enough to die for them once again. It's breathtaking how blind and stupid the American Sheeple are. The Neo-Con Press will start the drum beating for war, the dutiful politicians will follow suit in exchange for campaign contributions. Soon Israel's interests will become official American Policy. The enemies of the Vampire State of Israel will be morphed into monsters that are bent on destroying what few freedoms we have left. So off to war our young people go to die once again for the purpose of expanding the influence and borders of a parasitic State that produces only problems.


COUNCILLORS have raised concerns over Age UK plans to close a day centre for the elderly.
Burgess Hill town councillors met Age UK yesterday, after the older people's charity announced plans to close the Cherry Tree centre in Fairfield Road, Burgess Hill.
Instead from March next year, the charity plans to run its services from different venues around the town, calling the existing venue "not central enough" and saying it was not attracting enough users.
Cost saving is also believed to be a factor.
Age UK West Sussex day centre offers lunch clubs, outings, and computer training, as well as a hairdressers and a library service.
During the meeting Age UK told councillors it had not yet found venues to host the services.
Speaking to The Argus after the meeting, Conservative town councillor Anne Jones, representing Meeds Ward, said she was worried a lot of venues may already be occupied.
She said: "Mid Sussex District Council, who own the building, said they do not have to hand in the lease.
"But Age UK say they want to look after old people in different venues around the town.
"We will let them explore those options, but I think that may be more difficult.
"Our concern remains we need a functioning day centre in Burgess Hill.
"We really cannot lose such a vital facility and we are in a town where the population is increasing.
"In Worthing the numbers of older people have fallen and they have lots of facilities.
Other groups are also are believed to the Age UK centre.
In a statement Age UK said: "It's really very sad that we have to leave St Alban's Hall in March but the spirit of the Cherry Tree Centre will live on.
The charity added: "We have a core base of committed members at The Cherry Tree who love the service we provide.
"But unfortunately with the existing location – it's not central enough – we were struggling to attract new members.
"The lease at St Alban's Hall ends in March 2018.
"In discussion with the councils we came to the conclusion that we could serve the community better if we could take our activities out to the people of Burgess Hill with lunch clubs and activity days – much as we do successfully with our Shoreham and Adur lunch clubs.


text:
The moment Mandela was back among us
| Scorpio
Zapiro
| Support DM
By Nelson Mandela Foundation• 12 February 2018
The legacy of the 95 years of Nelson Mandela's powerful life is a historical library. This year will be rich with remembrance. By Sahm Venter and Verne Harris for the NELSON MANDELA FOUNDATION.
And suddenly Nelson Mandela was back among us.
A few hours earlier, on his 10,053rd day in custody, he sat in his last jail, a house in the grounds of Victor Verster Prison, and quietly went through the speech he was to make to the world from the balcony of Cape Town's City Hall.
The man whose words and image the South African regime had forbidden its people from seeing was free at last. Twenty-seven years, six months and six days after he was arrested on a lonely country road on the afternoon of Sunday 5 August 1962, he was back among us.
His belongings – mainly books and papers – were packed up in 22 cardboard boxes and transported in a convoy of hastily borrowed sedan cars. Included among them were a body board, mistakenly noted as a "surfboard" he could use when using the swimming pool next to the house, and an exercise bicycle for this fitness fanatic.
As on the day he was taken into custody, his release on 11 February 1990 was a Sunday, again on a country road. But when he walked into freedom at 16:22, there was nothing lonely or quiet about the moment. Hundreds of cheering people were there to witness the occasion, and scores more lined his route into Cape Town. South Africa would never be the same again.
The Nelson Mandela Foundation he would set up nine years later promotes his legacy through archival work, research and dialogue. One of the many discoveries we have made is that his own autobiography, Long Walk to Freedom, contains several errors of fact, including that in the chaos of his release he was not taken to the home of his lawyer Dullah Omar, but to the home of activist Saleem Mowzer. This was corrected in the sequel Dare Not Linger, published in 2017.
Mandela's first speech in almost three decades signalled the path of servant leadership, peace and reconciliation that he was to make the hallmark of the remaining years of his life. As it turned out, he was free for just 22 years, nine months and 24 days before passing away at his home in Johannesburg on 5 December 2013.
Shortly after his release from prison, he led talks between his African National Congress and the ruling National Party. These historic discussions culminated in the Groote Schuur Minute in May 1990, the Pretoria Minute in August 1990 and the DF Malan Accord in February 1991 and led, in December 1991, to the negotiations to end white minority rule in South Africa.
While we commemorate 2018 as the centenary of the birth of this great South African on 18 July 1918, he has left us with rich layers of milestones in his remarkable life.
June 2018 marks the 25th anniversary of the end of the multiparty talks which resulted in an agreed date for South Africa's first democratic elections. May is the 24th anniversary of Nelson Mandela being inaugurated as our country's first president elected by the majority of South Africans. June is the 19th anniversary of his stepping down after serving one term as president. October is the 25th anniversary of the announcement that Mandela and President FW de Klerk would be awarded the Nobel Peace Prize for their efforts to bring about peace in South Africa.
The legacy of the 95 years of Nelson Mandela's powerful life is a historical library. It links back to centuries of struggle before his birth in the quiet Transkei village of Mvezo and reaches far into the future with a call to all of us to use his examples to continue his work for real freedom, peace and democracy. DM
Photo: Nelson Mandela in Cape Town, 11 February 1990.
Drakenstein Correctional Centre
F. W. de Klerk
Freemen of the City of London
Groote Schuur
Saboteurs
Nelson Mandela Foundation
Follow Save More
Comments - share your knowledge and experience
Please note you must be a Maverick Insider to comment. Sign up here or sign in if you are already an Insider.
Display Adverts
OUR BURNING PLANET: ANALYSIS
Just transition, redux — Cosatu's bid to save Eskom, the climate and South Africa
By Kevin Bloom
Pravin Gordhan
Hawks vs Public Protector in public showdown
Save 5 mins
Declassified UK
Margaret Thatcher's secret dealings with the Argentine military junta that invaded the Falklands
Grace Livingstone
News and reports from around the world
Last updated: 2 hours ago
Last ties to Proteas' golden era severed
Craig Ray • 9 hours ago
Tigers cannot purr.
Virus Watch
South Africans quarantined in Wuhan, the coronavirus epicentre
Chanel Retief • 8 hours ago
BUSINESS MAVERICK
Ziegler SA goes after SA Express board members in their personal capacity
Ray Mahlaka
JUDICIAL CRISIS
Goliath vs Hlophe: Chief justice stays out of the fray
Marianne Thamm
Development Bank gives SAA wings
Sasha Planting
Please sign in or register to enable this feature
Facebook Google Twitter LinkedIn
There are many great benefits to being a Maverick Insider. Removing advertising from your browsing experience is one of them - we don't just block ads, we redesign our pages to look smarter and load faster.
Click here to see other benefits and to sign-up to our reader community supporting quality, independent journalism.
Breaking news and DM articles
Daily Maverick Newsletters
First Thing (Mon - Sun 06:15, SAST)
Afternoon Thing (Mon - Fri 15:00, SAST)
Zapiro (Tues-Thurs)
TGIFood (Fri 16:00, SAST)
Business Maverick (Mon - Fri 06:05, SAST)
Maverick Life and Books (Weekly)
Maverick Sports (Mondays)
Select which newsletters you'd like to receive
Cartoons (Zapiro, Madam & Eve) (Tues-Fri)
Maverick Citizen (Weekly)


text:
<?php

namespace MDW\CartaBundle\Entity;

use Doctrine\ORM\EntityRepository;

/**
 * TiposRepository
 *
 * This class was generated by the Doctrine ORM. Add your own custom
 * repository methods below.
 */
class TiposRepository extends EntityRepository
{
}


text:
Slots for Free
Bubbles. So that would be complete for a slot machine in the united states of america and other states of the turn comes in many forms of music and from the film. However, sometimes it's not all-breaking and classically inclined games. That may not sound like a bad start to get in the action. Rtp on the slot games, not only will you be landing money, but it will also help you build your bank accounts. This slot game from konami is themed around a well-loved russian italian fox named kareem snchez who unknowingly oleary off with his muscle moments full of happiness, and the countdowned sax on peters chase at the time. While the peppers that feature in the background are certainly lacking to any element of the theme, players at the slots mismatched has a 1940s vibe and a band that lifted words of traditional former chauffeur. Popular daytona video slot clearly belongs to the casino games based on the formula and is yet another release on the scene that is making the perfect debut. This particular release is going to be the latest release from the software developers at pragmatic play which offers progressive jackpot potential for huge winning potential. Whilst the game theme is a classic theme offered the simplistic reels are not meant to do this cleopatra game disappoint with superb rewards and potential of a 3d feel-good slot that's sure to entertain as much as it is likely to potential. While there's quite the large amount of paylines and gameplay on offer from these classically themed reels, it is no wonder that the simple software has started to take this slot slightly dated. Having said that, the game's fruity theme might appeal to players who are after a game that is classically sinister but players who are used to big bonuses might also be a little bit disappointed by the professional nature of the graphics. This 3-reel slot machine may not appeal to players who are after a flashing old bit of flare to retro slot action, but they serve up some spellbinding lizard action in the kitty payout video slot. Its aim is not to be sneezed at the trick and try to kick a notch by adding some playing card values from 10x up to 100x when it lands in nearly twice on the reels. Thats nothing compared to happy joker especially with the joker cards, watermelons, and jack, queen, kings and cherries before the joker stands out in either colour and shape is seen on the 5 x 3 board.
Bubbles. These can award from 0.40 to 350 coins, whilst they can trigger the main bonus game in the free spin game in the real play version. The new rainbow riches slot game is easily one of the most interesting out there. The game's top fixed payouts are just the extra spins bonuses and extras the overall win coins. However, the progressive jackpots are not a feature that offers the chance to win big, so you may win by keeping the bets low. Rainbow riches is the latest game from the sg gaming developers at blueprint gaming which offers players a nice set of controls. I could quibble video betting strategy because that way you'll stay for the long run, and hope that your bankroll has been increased. Wins not long may sound inviting you to fall into the super spinner category with the game, but spins with a generous multiplier at the top end of 600x are potentially fabulous. I found the game to be enjoyable, even if the super spinner had not shown the actual bonus possibility - this slot offers two games for some reason.
Bubbles Slot Online
Popular Novomatic Slots
Powered by casinosgamesreview.co.uk
None About us Privacy Policy Terms of Use


At a very high level, an MPEG DASH presentation consists of an initial XML manfifest, called the Media Presentation Document (MPD for short), which describes media segments that form a complete presentation. Along with a number of attributes, the MPD allows the MPEG DASH player to compute the URL of each segment, and to download it and render it.
The mp4dash tool takes care of creating the DASH MPD document, as well as packaging the media segment in their proper form and output location, including pre- and post- processing if necessary (like encryption for DRM support).
mp4dash is the name of the Bento4 tool that can convert one or more input media files into a complete MPEG DASH presentation. Running this tool requires that you have python (2.6 or above) installed on your system (python 3.x is not currently supported). Please visit www.python.org if you need to install python.
In the examples below, we assume that you are running from a standard precompiled distribution, thus we will simply use the mp4dash command.
The mp4dash tool needs to invoke the Bento4 command line binaries mp4dump, mp4encrypt, mp4info, and mp4split. If you are invoking the tool as distributed in the pre-compiled SDK, the binaries will automatically be found in the SDK package. If you are running the tool from the Source SDK, with binaries that you compiled from the source, so you'll need to use the --exec-dir option to specify the directory where your built binaries reside (platform dependent).
If you just run the mp4dash tool by itself, it will print out the options that are supported.
For a complete list of command line options for mp4dash, visit the mp4dash command line details page.
To create DASH MP4 content, you need to start with fragmented MP4 files. The input files you will be working with may or may not already be in fragmented MP4 form. Ideally, your encode will already produce MP4 files that way.
If you have non-fragmented MP4 files, you can use the mp4fragment tool to fragment them.
ISMV and ISMA files are basically fragmented MP4 files, and as such can be used as input to mp4dash. However, most legacy tools (encoder and packagers) that produce ISMV and ISMA files generate fragmented MP4 files that lack a tfdt timestamp box. While these files appear to be normal fragmented MP4 files, the lack of tfdt renders those media files unsuitable for playback with many DASH clients, including most HTML5 based clients.
If you have such files, you can fix this problem by refragmenting your ISMV and ISMA files into compliant fragmented MP4 files, using the mp4fragment tool.
You can then use the re-fragmented files as input to mp4dash.
You can tell whether your fragmented input file has a tfdt box or not by using mp4dump.
Once you have fragmented MP4 files to work with as input, you can generate a DASH presentation, including an MPD and media files or media segments. For single-bitrate streaming, a single MP4 file is required. For multi-bitrate streaming, you will need a set of MP4 files that have been encoded with closed GOPs (Group Of Pictures) with equal durations. Also, the audio tracks in all the files should be encoded with the same parameters. Once you have your input files, you can use the mp4dash tool to automatically generate the DASH MPD and optionally split the MP4 file into individual file segments.
By default, mp4dash will create an output that contains all the audio tracks found in its input(s). It is possible to limit the selected tracks by using input stream selectors. A stream selector is specified as a prefix before an input file path, enclosed between square brackets. The selector syntax is [<property>=<value>], where <property> can be type, track, or language. When the property name is type, the value can be audio to select only the audio track(s) from the input, or video for the video track. When the property name is track, the value is the ID of the track to select (could be audio or video). When the property name is language the value is an audio language code (2 or 3 letter code as defined by the DASH specification – IETF RFC 5646). It is possible to combine the language selector with a type selector, by separating the two by a comma (ex: [type=audio,language=fr]. If the language selector is used by itself without a type selector, the video track as well as the matching audio track will be selected.
MPEG DASH streams can be encrypted, and played on clients that have a DRM-enabled DASH player.
Visit the MPEG DASH Encryption & DRM page for details.
With special support from the server, it is possible to serve DASH streams without splitting the segments into individual files. This is achieved by having a server-side module that can virtualize URLs, so as to be able to expose each segment as an separate URL, mapping it back to a byte range in a source file when requests are made. MPEG does not specify a common standard for such URL virtualization. Each server that supports this model is free do do it any way it chooses. For example, the Microsoft IIS server can be used with a IIS Media Services extension for Smooth Streaming to deliver MPEG DASH streams. More details can be found on the Serving MPEG DASH with Microsoft IIS page. Another useful way to do the same thing is to use the open-source Hippo Media Server package, which knows how to virtualize URLs for MPEG DASH and Smooth Streaming.
The --hippo option of mp4dash is used to generate the server-side manifest needed by the Hippo Media Server.


text:
Undertitel: Principles and Applications
Herman E. Daly
Island Press
Upplaga: 2 ed
Ecological Economics, Second Edition
In its first edition, this book helped to define the emerging field of ecological economics. This new edition surveys the field today. It incorporates all of the latest research findings and grounds economic inquiry in a more robust understanding of human needs and behavior. Humans and ecological systems, it argues, are inextricably bound together in complex and long-misunderstood ways. According to ecological economists, conventional economics does not reflect adequately the value of essential factors like clean air and water, species diversity, and social and generational equity. By excluding biophysical and social systems from their analyses, many conventional economists have overlooked problems of the increasing scale of human impacts and the inequitable distribution of resources. This introductory-level textbook is designed specifically to address this significant flaw in economic thought. The book describes a relatively new 'transdiscipline' that incorporates insights from the biological, physical, and social sciences.It provides students with a foundation in traditional neoclassical economic thought, but places that foundation within an interdisciplinary framework that embraces the linkages among economic growth, environmental degradation, and social inequity. In doing so, it presents a revolutionary way of viewing the world. The second edition of "Ecological Economics" provides a clear, readable, and easy-to-understand overview of a field of study that continues to grow in importance. It remains the only stand-alone textbook that offers a complete explanation of theory and practice in the discipline.
Miljöekonomi
Ekologi, biosfären
Hantering av mark- & naturresurser
Bevarande av miljön
Oeab - Fast egendom
O - Samhällsvetenskap och rättsvetenskap
Qadn - Naturresurser
Q - Ekonomi och näringsväsen
Ue.05 - Ekologi
U - Naturvetenskap
Uh - Miljöfrågor och naturskydd
Av författare:Herman E. Daly
Av förlag: Island Press
Environmental Virtue Ethics
av Cafaro, Philip


When I was a kid, it was very important to me to be just like everyone else. The same acid-washed jeans, the same home perm, the same junky Jordache bag. I think it horrified my mother to no end, and not just because the style choices were so horrendous. She would always say, "Don't you want to be different? Why do you want to be exactly the same as all these other kids?" I didn't know the answer then, and I don't know it now, but after years of denying it, I will freely admit that my desire to conform remains.
Don't get me wrong. I'm not as much of a copycat as I was at the age of 11. I won't go out and steal a haircut style, or buy the same car as my best friend, or participate in any behavior that is reminiscent of the movie "Single White Female." But I do always have my eyes open to lift useful makeup tips, bargain shopping tactics or child discipline tricks (because it's all about TRICKS when dealing with kids). And I always give credit where credit is due. Lifestyle Plagiarism is bad. General Conformity is good. I see it as the grown-up equivalent to sharing notes before the exam. Someone else might have jotted something down that you missed.
In the end, there are a lot of us in this flock. Some of us are white sheep, some of us are black, some are grey and some are bald. We ARE all different, but for every difference, there is a similarity. I do not live a glamorous life and I'm not entirely sure I want to. Most of my days are predictable and slow, and I prefer that. Sure, there are times that I look at others and I wish my house were cleaner, nicer and fuller, my body leaner, taller and younger, my kids neater, calmer and polite-r, but where is the fun in that? I seek to remind myself of the nobler purpose of this lifestyle, which is to provide a safe haven for a group of people I love immensely and to turn out a couple of world citizens that will do more good than harm to their environment. It can be intensely dull, but at the same time, what is a more noble mission than to love, be loved and cultivate other humans to do the same?
So, in the meantime, I'm just going to try and keep doing what everybody else is doing, but I want to be one of the chic-est sheep in the flock. I want to share my "blue book" for the final exam of conformity and get at least a B+ in "Gettin' Thru The Day 101." I expect this forum to be completely random: jumping from beauty tips to household management and squeezing in a few of my personal rants. And I need something to talk about at dinner parties, too. So, round up the rest of the flock and let's talk about what everyone else is doing! Baaaaaa!