text:
Machiavelli's Discourses on Livy: On Republics
klarmanite October 25, 2015 November 14, 2015 Machiavelli
Please note that for the purposes of this analysis, I use the Harvey C. Mansfield and Nathan Tarcov translation of Machiavelli's Discourses on Livy.
Machiavelli's Discourses on Livy is often juxtaposed with his Prince as more indicative of his republican political ideology. It is certainly more apparent in his Discourses, although not absent, but veiled in his Prince due to political reasons. Nevertheless, in his Discourses, Machiavelli frequently describes Romans, amongst other ancient peoples, as a superior model of republicanism, one worthy of contemporary emulation. Yet in doing so, he had to overcome the biases and pretensions of his aristocratic contemporaries, who favored more aristocratic models of republicanism more prevalent in their times. Thus, Machiavelli put himself to the task to convince them otherwise, using his method of critical history as well as a healthy dose of rhetoric. I argue that Machiavelli's account and analysis can be applied to the modern malignity of our times, that of moat 'investing.' Like Machiavelli, I will present the case that such a mode is defunct and stems from multiple misunderstandings. Instead, I argue, one should return to the example virtuous ancients, that of the principles of prudence of Ben Graham.
Machiavelli asserts that it is the nature of men to be hostile towards new modes and orders, that is, not against incremental progress or innovation, but to the kinds of paradigm shifts in their modes of thinking that further and alter history, because men are envious, incredulous, and inexorable in their habits.
"the envious nature of men has always made it no less dangerous to find new modes and orders than to seek unknown waters and lands, because men are more ready to blame than praise the actions of others" (Book I:Preface).
On this account, Machiavelli chides his contemporaries for admiring ancient things, even imitating them in superfluous matters such as sculpting, but shunning imitating them in the most important matters, that of statecraft. The virtue of the ancients – their strength and spirit – made them most vulnerable, enabling the Greeks and the Romans to acquire the largest empires the world had ever seen up until those times. Yet, the 'enlightened' contemporaries of Renaissance Italy, believing themselves to be above and beyond the modes and orders of the ancients, are actually lacking in all virtue.
"Considering thus how much honor is awarded to antiquity, and how many times – letting pass infinite examples – a fragment of an ancient statue has been bought at a high price because someone wants to have it near oneself, to honor his house with it… and seeing, on the other hand, that the most virtuous works of histories show us, which have been done by the ancient kingdoms and republics, by kings, captains, citizens, legislators, and others who have labored for their fatherland, are rather admired than imitated – indeed they are so much shunned by everyone in every least thing that no sign of that ancient virtue remains with us" (Book I:Preface).
All too similarly, many 'investors' today admire Ben Graham and others, even paying thousands of dollars for original versions of his works, yet they scoff at the mention of imitating his prudent investment method. They deem it to be too antiquated, draconian, and unsophisticated. Instead, with their presumptuous 'understanding' of moats and models, they have completely missed Graham's point, and thus they retain none of his virtue and prudence. His 'net-nets' were not an end, but a means. It was an acknowledgment of the uncertainty of future, that there is no certainty no matter how complex the mathematics, that it is the more prudent route to seek value over 'quality.' How much more virtue and prudence existed then that has all but disappeared since the great corruptor of Omaha.
In beginning his Discourses, Machiavelli sought to debunk the pretensions that inhibited his contemporaries from considering imitation of the ancients. In particular, Machiavelli was highly preferential to Roman republicanism, a mode of government that had all but disappeared from the world in his time. What had persisted, instead, were the highly oligarchic 'republics' of Venice and, to a slightly lesser extent, that of Machiavelli's own Florence.
"For those who have prudently constituted a republic, among the most necessary things ordered by them has been to constitute a guard for freedom, and according as this is well places, that free way of life last more or less. Because in every republic there are great and popular men, it has been doubted in which hands it is better to place the said guard with. With the Lacedemonians, and in our times with the Venetians, it has been put in the hands of the nobles; but with the Romans it was put in the hands of the plebs" (Book I.5).
Machiavelli, a man of undistinguished birth, in writing to his haughty aristocratic counterparts, defended the Roman model of republicanism over the oligarchic 'republics' of Venice and Sparta that were favored by his aristocratic contemporaries. On one hand, his audience admired the free way of life enjoyed under the Roman republic. But on the other hand, his aristocratic contemporaries opposed imitation of Roman republicanism because they feared the idea of having to share government with the lower class – the people – as was the practice in that republic.
These elites (wrongfully) viewed the people as rapacious and ambitious, such that they would take freedom from the nobility. The tumults that are described in the records of Livy between the plebs and the nobles was particularly frightening to their interests. Machiavelli sought to counter this mode of thinking, instead showing that the tumults in Rome were necessary and indeed responsible for the free way of life in Rome. More importantly, the division between aristocracy and the people is a natural one found in all cities, Machiavelli asserts, and that conflict between these factions is a most natural and inevitable phenomena. Contrary to his contemporaries who seek stability and security, Machiavelli realized that conflict was necessary and sufficient to for longevity and prosperity for it is out of such conflict that resolutions arise. As Machiavelli writes:
"I say that to me it appears that those who damn the tumults between the nobles and the plebs blame those things that were the first cause of keeping Rome free, and that they consider the noises and the cries that would arise in such tumults more than the good effects that the engendered. They do not consider that in every republic are two diverse humors, that of the people and that of the great, and that all the laws that are made in favor of freedom arise from their disunion, as can easily be seen to have occurred in Rome" (Book I.4).
Contrary to the imagination of his contemporaries, Machiavelli points out that their fear of populist avarice against the nobles is misplaced as so few extraordinary events happened over the more than three hundred years that the republic existed from the Tarquins to the Gracchi. Instead, in the more oppressive oligarchies of Sparta, many such extraordinary events occurred where the suppressed resentment of the lower classes surged, resulting in the massacres of the nobility under Cleomenes and Nabis. Machiavelli continues:
"Neither can these tumults, therefore, be judged harmful nor a republic divided that in so much time sent no more than eight or ten citizens into exile because of its differences, and killed very few of them, and condemned not many more to fines of money. Nor can one in any mode, with reason, call a republic disordered where there are so many examples of virtue; for good examples arise for, good education, good education from good laws, and good laws from those tumults that many inconsiderately damn. For whoever examines their end well will find that they engendered not any exile or violence unfavorable to the common good but laws and orders in benefit of public freedom" (Book I.4).
Moreover, it could not be the case that Rome was poorly ordered because of its tumults as there were so many examples of Roman virtue, both in civic and military life, as virtue is the result of good education and laws, which in turn is the result of good orders of government. Contrast the laundry list of Roman exemplars to that of Sparta, who were lacking altogether in virtuous examples in civic life. Therefore, it is better to be a Rome than a Sparta, on Machiavelli's account, for there is less hidden danger and greater virtue.
There are many modes of interpretation for investors two. One such interpretation, the most apparent one, is Machiavelli's reminder not to be adverse to natural volatility; for it is out of such conditions that corrective forces are most efficient. Volatility is not risk, but the suppression of volatility creates risk because the natural and inevitable forces of conflict and correction build up then burst all at once. Instead, were smaller tumultuous periods allowed to take their corrective courses at de minimus harm, then the larger tidal forces can be temporized. Indeed, prudence consists in choosing the lesser of two evils.
In another interpretation, one ought to realize the importance not to disassociate cause from effect, and not to confuse the means for the end, as Machiavelli points out. Moat investors confuse such means for end; they misunderstand that moats are only a part of the formulation of an enterprise's intrinsic value, it is not the margin of safety itself. Nor are moats the cause of the margin of safety, for that cause is the discrepancy between the intrinsic value and the price. Moat 'investors' are akin to Machiavelli's aristocratic contemporaries, for they have a misplaced sense of fear arising from the deterioration of business quality, probably stemming from one to two severe and extraordinary examples. But if they examined the histories carefully, they would realize that Graham's modes and orders leads to the fewest losses and the greater gains, just as the tumults of Roman republicanism led to few such deaths and exile. This is because when there is a large discrepancy between price and value, ergo the margin of safety, the risk is low and the reward is high. For many things can go wrong before permanent capital loss is incurred, and only a few things need to go your way for substantial capital gain.
The tumultuous part that makes our pathologically weak, contemporary moat 'investors' is that such Graham opportunities are not clean, orderly, spotless, nor regular, especially when compared to the seeming goodness, the supposed durability, the succinct certainty of 'moaty' businesses. But the prudence of Graham was in realizing that nothing is certain nor durable. Indeed, like the Roman tumults, goodness does not come from order but disorder, for entropy devolves order to disorder while necessity urges disorder to order. Therefore, like the Roman tumults, it is the disorder and conflict that ensured the protection and preservation of the free way of life, just as these modes produce the most superior risk-adjusted returns for prudent investors. Indeed, on this account one can see the soundness of the modes and orders of Ben Graham by the countless examples of investors who have been able to achieve superior risk-adjusted returns by imitating his prudence. On the other hand, one need not strain and toil to see how few examples there are of those who have achieved superior risk-adjusted returns by imitating the orders of 'quality' over value, which stands in testament to its misguided and defunct doctrine.
Concluding that the Roman mode of government is better for promoting and protecting a free way of life, Machiavelli adds the coda that the tumults should not be curbed, but formalized. With official channels to follow, the tumults rarely resorted to extraordinary modes, Moreover, such channels allow for many smaller tumults to occur, thereby sapping the potential of larger, more unshackled tumults of occurring. Contrary to the (aristocratic) historians, such as Livy and Tully, Machiavelli believed that the desires of the peoples was more decent than that of the nobles, as the former wished only not to be oppressed while the latter wished only to oppress. Thus, in placing the protection of liberty with the people, because of the decency of their ends, would be more prone for its preservation and less liable to turn to tyranny.
"I say that every city ought to have its modes with which the people can vent its ambition, and especially those cities that wish to avail themselves of the people in important things… The desires of free people are rarely pernicious to freedom because they arise either from being oppressed or from suspicion that they may be oppressed. If these opinions are false, there is for them the remedy of assemblies… though peoples, as Tully says, are ignorant, they are capable of truth and easily yield when the truth is told them by a man worthy of faith" (Book I.4).
"Without doubt, if one considers the end of the nobles and of the ignobles, one will see great desire to dominate in the former, and in the latter only desire not to be dominated; and in consequence, a greater will to live free… So when those who are popular are posted as the guard of freedom, it is reasonable that they have more care for it" (Book I.5).
Parallel to Machiavelli's (satirical ascribed) great versus ignoble distinction, one sees that speculators, GARP and 'moat' investors (not that there is a fundamental distinction between these latter two) are akin to the nobles in being driven by their appetite for growth (i.e. speculative 'upside'), while prudent investors in the Graham tradition are akin to the people in their desire not to lose money. Therefore, it is consequence that when entrusted with capital, the prudent investors are a better guard of capital as they are less reckless and have more care for it.
Machiavelli asserts that one cannot even imitate a Venice or a Sparta without certain precautions that, in order to make it resistant to the pent up resentment stemming from the oppression of the people, hinder and weaken the state. Appealing to history, Machiavelli cites that Sparta and Venice were only able to sustain their states as oligarchies because they prevented immigration, for any increase in the ratio of the people to the aristocrats threatened their ability to oppress the masses. As Machiavelli states:
"If someone wished, therefore, to order a republic anew, he would have to examine whether he wished it to expand like Rome in dominion and in power or truly to remain within narrow limits. In the first case it is necessary to order it like Rome and make a place for tumults and universal dissensions, as best one can; for without a great number of men, and well armed, a republic can never grow, or, if it grows, maintain itself. In the second case, you can order it like Sparta and Venice, but because expansion is poison for such republics, he who orders them should, in all the modes he can, prohibit them from acquiring, because such acquisitions, founded on a weak republic, are its ruin altogether. So it happened to Sparta and Venice" (Book I.6).
In consequence, because of their severely limited populations, these states could never expand beyond their polities, and if they did, they quickly were ruined, as happened historically to Sparta and Venice. On the other hand, the Romans made their people numerous and armed them so as to be able to make and maintain a great empire. Thus, Machiavelli concludes that not only does Roman republicanism best promote longevity and prosperity, it also enables you to acquire and maintain an empire.
All too similarly, the moat 'investing' style, as a weak doctrine, is of less utility to its practitioners due to its handicapping nature. Contrary to the conventional assertion that knowledge of and the ability to identify moats stems from some abstract conception of competitive strategy, it is actually the case that such knowledge and ability stems from expertise in industries. While the abstract knowledge of competitive strategy is of undoubted use, it cannot, by itself, identify moats; that is, it cannot move from generality to particularity (i.e., generality assists the intuition with regard to particulars, but it does not provide knowledge of particulars themselves). Therefore, in order to be a successful moat 'investor' one can only be like John Malone, that is, one is confined by their industry expertise – their circle of competence – as such knowledge and experience allows them to identify moats. Therefore, moat 'investors' are like Sparta and Venice, for they can sustain themselves within their narrow confines, but it they wish to expand into new areas, they find themselves quickly ruined. They may be able to generate above average returns within these narrow conditions, but because of their limited opportunity set and the cyclically of opportunities within industries, they are too handicapped to generate superior risk-adjusted returns.
On the other hand, the prudent investors of the Graham tradition are like that of the Romans, for they are unrestrained. The ability to apply the principles of prudence is unconstrained by industry or asset type. Indeed, the modes and orders of such a type produce so many more virtuous individuals that it enables them to acquire and expand with greater ease because these modes that are successful in one polity and easily imitated in acquiring and maintaining another. Thus, greatness in the form of superior risk-adjusted returns resides in the virtue and prudence of the Graham tradition.
Acquisition, History, Interpretation, Margin of Safety, Moats, Prudence, Virtue
← Machiavelli's The Prince: On History and Fame
Machiavelli's Discourses on Livy: On Reordering →


The House of Science Tauranga Robotics has been established to cater for students that do not have the opportunity to participate in VEX at their school but have an interest in competitive robotics. The team has been extremely successful at regional, national and even world championship events.
$50 - $300 p/a, depending on parent/caregiver availability to volunteer, plus one off joining fee of $50 which includes a team shirt. Each robot is worth several thousand dollars and competitions are costly. Hence there are significant expectations around fundraising.
VEX Robotics is a leading provider of educational and competitive robotics products to schools, universities and robotics teams around the world. The company's three product lines, VEX IQ, the VEX Robotics Design System and VEXpro, are backed by 250 man years of experience supporting educational robotics programs and designed to be affordable, accessible and scalable. The company also partners with the non-profit Robotics Education & Competition Foundation to support the world's largest and fastest growing competitive robotics program for elementary schools, middle schools, high schools and colleges around the world. The VEX IQ Challenge, the VEX Robotics Competition, and VEX U were designed to give a diverse group of students the chance to celebrate their accomplishments and share their passion for robotics with each other. In 2013-2014, over 10,000 teams from 33 countries took part.


 Feeling into and understanding what our body needs nutritionally, physically, and mentally. That means we will be dancing, doing Essentrics, cooking, eating and understanding our patterns.
I will be speaking at an event, Awake First Steps on Your Path to the Conscious Leader, on the Saturday which is included in your retreat price.
We will also be spending our afternoons and evenings touring London.
Warning: Space is limited as I am selecting only 3 women.
Have you been struggling in life and business? Is self-compassion a foreign concept?
Often when we are dealing with relationship issues, like codependency and narcissism, it can be hard to make heads or tails of life. That's why I have created a system to help you reduce and even reverse the effects of it in our lives so that we can use our emotions as a power source.
Know what it feels like to be in your body, heart and mind again in a safe container outside of your comfort zone!
I inspire female leaders to use their emotions as a power source so they can make an impact in the world and be fulfilled.
Have you lost your rhythm? Do you find it hard to whisper sweet nothings to yourself?
Are you a woman who is making a serious impact in the world however, your health or emotional state is suffering?
Would you like to learn harmony, or balance as you call it, in life and work?
We are truly divine! Somewhere we stopped believing it or buried it.
During our time together, we will use the Body Soul Shift process to rejuvenate it. Have you ever embodied self-compassion, self-forgiveness and self-belief? Imagine what that would feel like. Now imagine what that could do for you...the way you talk to yourself, the actions you take and choices you make.
We lean on our masculine to push through and get it done. However, it's the feminine that empowers, strengthens and offers wisdom. Allow her a presence in your life.
Join me to step into 3 essential secrets to rejuvenate the feminine leader!
We will start with feeling into our bodies for where we can be kinder to it and remember to listen rather than numb it. This is a dance piece on feeling and releasing old stuff. Then giving ourselves permission to connect with our emotions as a power source and not a weight. This is a journaling piece.
Finally, restructuring our inner dialogue to self-talk that honors the power of our existence over the other's opinion. We will make the conscious conversation between your mind and heart.
3 Essential Secrets to Rejuvenate the Feminine Leader - When you stop running from the welling up of your soul and allow her to awaken, you flow into your greatness. Start today in recognizing and holding space for the qualities you are now.
Creating Confidence and Clarity - The language that emerges from your heart when you embody self-compassion, self-forgiveness and clarity so that you can harmonize your life with boundaries that honor you.
The Power of Saying Yes - Sharing all about making a commitment to success, saying yes to opportunities presented and allowing the doors of abundance to flow.
We must allow the yes to flow through our lives, lips and experiences. We are designed for bliss and greatness. Keep your doors open!
Unity: A talk about embracing our humanness and how our difference is a gift and natural alliance - She shares her multicultural dynamic as an analogy to how we are all better because of our differences.
Great news, the ME First Legacy event is here. 20+ expert Muslim women share with you how you can put your legacy first!
When we choose to recreate your story with Sweet Talk ™, we have already decided that you're going to be fulfilled. We've decided that we are going to shift our emotional chemistry. You have a desire to heal, to be connected, effortlessly nurture your soul and radiate love from deep within.
You're going to become a woman with the power to fully connect with your true self, moment to moment, create powerful choices in your body and heart. You're not just going to set firm boundaries, you're going to maintain a healthy barrier, and hone emotional connection built on self-trust, self-compassion and energize with quality time.
I created the Body Soul Shift tribe, using frequent challenges I see clients experiencing. From owning their emotional story, being firm in valuing the power of their existence, to allow in only what honors them and how to create a sustainable system of self-nurturing.
Finally, being able to create a flexible template, which enables them to adjust during a difficult situations, confrontations, toxic relationships and stressful times.
I use the words Body Soul Shift for good reason. I wanted to take my unique message and self-nurturing style to the world, to connect on 1:1 and mentor people internationally. I wanted to build a lifestyle that enabled me to create opportunities to play in amazing places, to meet inspiring people with an abundance mindset, to share ideas, to constantly challenge myself and I wanted to take luck out of the equation.
To do that – I needed to have a Body Soul Shift.
Once a week I share learnings and advice relevant to scalable self-nurturing and being fulfilled. It's who you need to be to invite that in.
Exclusive deals on Retreats around the world.
A private FB Group to share Tools and Systems that are aligned to expanding your growth.
Access to International opportunities, including Speaking, Podcasts and Web Events.
Women who want absolute clarity in their life, being able to speak powerfully in the moment and express the value they possess.
Women who want to step into their future self right now and speed up the process.
Anyone desiring to have clarity on the biology of emotions, thoughts and formulate a consistent way to invoke it in the moment. Sweet Talk ™ is a gamechanger!
Anyone desiring a permanent shift.
Introduction to My Emotions 101 – This will completely change the way you approach relationships, communication, video content, marketing and communicating what you offer.
Create more flow in your life to shift into your ultimate purpose.
Radiate your true self – Know exactly how to communicate this to enforce firm boundaries that honor you.
Being able to consciously choose stories to enforce desired emotions in any given moment.
My Soul and Shift – Bring the future 'you' into the now using tools created to accelerate growth.
How to strategically build an emotional intelligence and awareness.
Sixteen years ago, I set out to heal myself from postpartum depression. Now my mission is to guide soul conscious women to their Body Soul Shift to use their emotions as a power source and not a weight. Begin your healing today.
Would you like more information on what I do?
Go to my programs website and click below join my newsletter.
Cordelia is an inspiring speaker. I spend a lot of life supporting leaders and speakers and it was a joy to hear Cordelia share her heart and mission. I am excited about hearing her a lot in the coming year!
Cordelia was one of the most powerful speakers at She-EO by Ganiyah in Baltimore last July. She was gentle yet firm, she was wise yet humble, she was powerful, resourceful and unbelievably open in a way that made the audience feel so liberated. I will certainly be honored to work with her again and again.


Photography is a passion. Its passionate. And it takes passion to see the trueness in the things and people around us. This is what im trying to capture. Whether its just a simple object, an unseen detail, or the sadness or joy on someone's face, its a precious moment in time captured for eternity.
I took this hobby up with no expectations, no definite goals, and no preconceptions. It has not disappointed. Its become all-consuming, pervading all aspects of my life, even some i didnt realise i had.
On my flickr page, and in my photographs, i try and tell a story, my story, someone else's story, the story of a location or object....i think everything has a story, and even though photo is just a moment, it conveys much more.
My inspiration? My Angie. The source of everything thats good for me, my inspiration, my ambition, my drive all emanate from her.
"I've known Darren since grade 7 and we've shared a lot of the same interests over the years as we grew up. Which is why it isn't surprising to see him get into photography.
What shouldn't surprise me is how fanatical Darren has pursued this new hobby. In just a few short months he's gone from not knowing his aperture from his hot shoe, to someone I go to now for advice on lighting and flash photography."


text:
Q: java : multiple rectangles at once hi i'm new here and i'm not good at explaining questions but i have been searching for this on the web for ages. here is my question: i want to draw a rectangle at the mouse x and y. I want there to be lots of rectangles so if i was to click at the 50 ,50 coordinate on the JFrame it would draw a rectangle and then if i clicked somewhere else it would draw another rectangle there, but not delete the other one so i could have clicked 5 time (<--example) then i would have five rectangles all at once. Please help me and make it as simple as possible. Thank you in advance please help me.
my code:
public class Game extends Canvas implements Runnable {
    private static final long serialVersionUID = 1L;

    public boolean running = false;
    public static final String title = "tilebased game!";

    private Thread thread;
    public int height = 600;
    public int width = 800;
    private Dimension d = new Dimension(width, height);
    public static Rectangle block;
    public static Rectangle[] blocks = new Rectangle[2];
    public static int blocknum = 0;
    public static int xCreate;
    public static int yCreate;
    public static int xcoord;
    public static int ycoord;

    public Game() {
        setPreferredSize(d);
        setMinimumSize(d);
        setMaximumSize(d);
        addMouseListener(new tile());
        addMouseMotionListener(new tile());

    }

    public void start() {

        running = true;
        new Thread(this).start();

    }

    public void stop() {

        running = false;

    }

    public static void main(String[] args) {
        Game g = new Game();
        JFrame f = new JFrame();
        f.add(g);
        f.pack();
        f.setTitle(title);
        f.setResizable(false);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setLocationRelativeTo(null);
        f.setVisible(true);
        g.start();

    }

    public void run() {
        while(running){
            tick();
            render();
        }

        try{
            Thread.sleep(5);
        }catch(Exception e){

        }
    }

    public void render() {
        BufferStrategy bs = getBufferStrategy();
        if (bs == null) {
            createBufferStrategy(2);
            return;
        }
        Graphics g = bs.getDrawGraphics();

        tile.render(g);

        g.dispose();
        bs.show();
    }

    public  void tick() {

    }

}

and the other class implementing MouseListener and MouseMotionListener:
public class listener implements MouseListener, MouseMotionListener {

    public static Game game;
    public Image img;

    @Override
    public void mouseDragged(MouseEvent arg0) {

    }

    @Override
    public void mouseMoved(MouseEvent e) {
        Game.xcoord = e.getX();
        Game.ycoord = e.getY();
    }

    @Override
    public void mouseClicked(MouseEvent e) {

    }

    @Override
    public void mouseEntered(MouseEvent arg0) {

    }

    @Override
    public void mouseExited(MouseEvent arg0) {

    }

    @Override
    public void mousePressed(MouseEvent e) {
        if (e.getButton() == MouseEvent.BUTTON1) {

        }

    }

    @Override
    public void mouseReleased(MouseEvent e) {
        if (e.getButton() == MouseEvent.BUTTON1) {

        }
    }

}

this is an add on to my question.  what would be compatable with my code. (i'm still only learning java by the way and i'm only 13 and not very smart.) the rectangles are supposed to have a fixed height and width aswell so when you click on a specific area it will draw a 10 x 10 rectangle and it will remember all the other rectangles already drawn like in your example please help me again thank you

A: There are two ways to do this, either remember each rectangle in a list and render them all (in proper order, oldest first in case they overlap), or create a BufferedImage to remember everything you have drawn so far.

A: See Custom Painting Approaches for working examples of the two common ways to do this:

*

*painting objects from an ArrayList

*painting on a BufferedImage

A: If I understand your question correctly, it sounds like you would like to avoid redrawing the screen when a new object is added. There is a demo found at the Oracle website here which shows how to draw an object when you click.
http://docs.oracle.com/javase/tutorial/uiswing/examples/painting/SwingPaintDemo4Project/src/painting/SwingPaintDemo4.java
If you want to maintain the objects (ie. don't erase the previous one), comment out the line
repaint(CURR_X,CURR_Y,CURR_W+OFFSET,CURR_H+OFFSET);

redpajama_set_name: RedPajamaStackExchange


text:
Paula Grey Martin
By Debbie Gamble | November 16, 2021 | 0
August 14, 1933 – November 14, 2021
Paula Grey Martin age 88 of Pine Hill, AL passed away November 14, 2021 at Sonrise Specialty Care Assisted Living.
She was born August 14, 1933 in Arlington, AL to Gracie Lee and Thelma Twilley. She was a retired florist and a member of County Line Baptist Church.
She is survived by her son, Rod Martin (Dot) of Monroeville, AL; daughter, Judy Felts (Jimmy) of Camden, AL; son-in-law, Ralph Autery of Pine Hill, AL; six grandchildren, Jody Autery (Beth), Lindsay Hollinger (Fleetwood), Scott Martin, Deidre Booker (George Robert), Lucas Felts (Paige), and Chase Felts (Madeleine); and nine great grandchildren.
She was preceded in death by her husband, Cecil Martin; daughter, Jean Autery; and her parents, Gracie Lee and Thelma Twilley.
Graveside funeral services were held at County Line Baptist Church Cemetery on Tuesday, November 16, 2021 at 11:00 am with Rev. Tripp Skipper officiating.
Active pallbearers were Scott Martin, Lucas Felts, Chase Felts, Fleetwood Hollinger, Wood Hollinger, Jody Autery, and Beau Autery.
Memorials may be made to: Sonrise Specialty Care Assisted Living, 1607 Highway 43 South, Demopolis, AL 36732.
Arrangements by O'Bryant Chapel Funeral Home.

redpajama_set_name: RedPajamaCommonCrawl


a0sexydean Valisia livejasmin. loralarson. Giggles86. NoLimits4Friends.
EmmaReyRoseKaelynBestGuy4SexVeniceShadow .GODdessOfWisDOMKittyCherRyuPinkwetCREAMYneslie .KittyCherVERONIKACammyHardKonnonGiggles86 .loralarsonLadyRoseLaryDIRTYSUBNOLIMITSYurany4u .JeisyCampbellMartaAndMaksDessertSharonBlackBigTony .BlackBigTonymichaelukHardKonnonmetilona .AneteAngelwittorCandiceParadiseRoseKaelyn .9sweetycum4youTWOTS4ULoraHallCindySuperBaby .LaurynCrowAdventurousBoysAarenFateoliblondgood .AmazingxCatNatyFireAbbyFoxyDessertSharon .NatyFireDIRTYSUBNOLIMITSmichaelukoliblondgood .
2AmoreAmandaAneteAngeljhoanadaimonAneteAngel .nicolemadelinex2AmoreAmandaOllayliElviraCunt .NatyFireVERONIKACammyAneteAngelHannahAllen .Yurany4uBestGuy4SexBrieBellaRedCreativeGirl .HardKonnonIsabelleKingAliceMilerloralarson .CandiceParadiseLeroyJohnson111montsefererroJerrylin .wetCREAMYneslieDavid69showCindySuperBabyJhonnXstone .loralarsonLeroyJohnson111HotSexyLoveXDavid69show .BriannaHotXXRobinTestPacc1JhonnXstonemushroomgay .babyNinaxxxCataleyyaaKlavdeeyaoliblondgood .CataleyyaaKamilaBerrySyenaDollDIRTYSUBNOLIMITS .


Wash and clean the mutton pieces.2) Marinate the mutton with coriander, chilli flakes, turmeric, ginger-garlic paste (2 tsp), meat masala, pepper, vinegar and required salt.
Keep aside for ½ and hour.4) Cook the mutton in a pressure cooker with little water and make it dry.5) In a kadai, heat 2 tbsp oil. Add the freshly crushed garam masala, shallots, green chillies and curry leaves.
Add the mutton pieces and fry well. Do not add water.7) Saute the mutton in low flame.
Serve hot with rice / chappathi.


Numerous Fire girls soccer players have received all-conference, all-section, and All-State awards. Alumni continue to play in D1 programs such as Northern Illinois University and Bucknell University During his time in Dallas he served as a varsity assistant and junior varsity soccer coach, and a mentor to high school student athletes from all walks of life.
Belleville West Sr. Garrett Bass turns into the box with O'Fallon's Jr Jaden Kauer defending during the 3A Regional semifinal October 17, 2017 The Illinois High School Soccer Coaches Association () have released the 2017 Boys Illinois All-State High School Soccer Selections. Included as well are the All-Sectional recognition.
Congratulations to all! All-State Player School Position Grade College Garrett Bass Belleville West Forward 2018 Jon Kuebler Columbia Goalkeeper 2018 Sam Spivey Columbia Midfielder 2018 Zach Timmerman Edwardsville Defender 2018 Sam Schiller Mascoutah Midfielder 2018 Jaeden Smith Quincy Forward 2018 Macker Little Quincy Notre Dame Forward 2018 Sam Spivey returns to this All-State list this year while Jon Kuebler and Zach Timmerman move up from .
All-Sectional Player School Position Grade College Dillon Birdsong Althoff Defender 2018 Jimmy Monken Althoff Midfielder 2018 Colin Lombardi Alton Defender 2018 Chris Hartrich Alton Marquette Midfielder 2019 Devin Chambers Belleville East Midfielder 2018 Eli McClinton Belleville East Midfielder 2018 Xavier Brown Belleville West Forward 2018 Drew Wesselmann Breese Central Midfielder 2018 Tyler Hitpas Breese Mater Dei Defender 2018 Zach Cawvey Collinsville Defender 2019 Jake Bridge Columbia Midfielder 2018 Riley Hubler Columbia Forward 2019 Alec Mills Edwardsville Forward 2018 Eli Skubish Father McGivney Forward 2018 Noah Williams Freeburg Midfielder 2019 Aaron Grohmann Gibault Defender 2018 Karson Huels Gibault Midfielder 2019 Evan Herman Highland Midfielder 2018 Malik Wilkes Mascoutah Forward 2018 Jake Koenig O'Fallon Township Midfielder 2018 Nate Martin O'Fallon Township Midfielder 2018 Justin Kohler Waterloo Midfielder 2018 Trent Calvert Wesclin Forward 2018 Devin Chambers, Evan Herman, Karson Huels, Jake Koenig, Nate Martin and Jimmy Monken all earn return recognition this season.
This article was co-authored by our trained team of editors and researchers who validated it for accuracy and comprehensiveness. Together, they cited information from , which can be found at the bottom of the page. carefully monitors the work from our editorial staff to ensure that each article meets our high standards.
wikiHow marks an article as reader approved once it receives enough positive feedback. This article has over 43,626 views and 81% of readers who voted found it helpful, earning it our reader approved status.
• If you want to watch a professional game, the Major Soccer League Website has a schedule of all upcoming games. The National Women's Soccer League, which features 10 teams, also posts its schedules online. • You can check out local high school or college teams if there is not a professional team in your area. • Ask your friends who play if you could cheer them on at their next game.
Understand the rules. You will need to learn the basics of the game before you can play. Several Websites offer good introductions to the sport of soccer. • At its most basic, soccer features 11 players on each team (10 in the field and 1 goalie). • The rectangular playing field features goals at each end. • This article, , has a great explanation of soccer rules and skills.
• U.S. Youth Soccer is another good resource, with a useful introduction to the positions and general aspects of the game. Attend a soccer camp. Several schools and community recreation departments offer soccer camps throughout the year. At a camp, you will learn basic dribbling and kicking skills, as well as strategies to excel at the game. • Ask friends for recommendations on camps to attend. They will be able to tell you if they found the drills and exercises to be helpful.
• Find a friend to join you at camp. You'll probably have a better time at camp if you attend with someone you already know. • Several National Women's Soccer League teams sponsor camps in their areas. If there are no professional women's teams in your area, several other Websites have search tools for finding camps or clinics near you.
Pick a position. Once you've learned the basics of the game, you'll need to decide which type of position to pursue. • Are you good with your hands? Maybe you're destined to be a goalie. • If you want to impact the game by scoring, try out for a striker position. Strikers are also known as attackers or forwards. • Midfielders assist strikers and also offer help on defense. They tend to cover a lot of ground during the game, so this may be a good fit for you if you have a lot of endurance.
• Defenders are the last stop before the opponents reach the goalie. Defenders have to be brave, aggressive, and tireless. Buy your equipment. While there isn't an enormous amount of equipment necessary for playing soccer, you will need some essential items when you join a team. • Soccer cleats are similar to baseball or softball cleats.
The cleats on soccer shoes are rubber, however, instead of metal. Soccer cleats are available at sporting goods stores, discount stores, and specialty shops. • Shin guards do exactly as they are named; they protect your lower legs from accidentally getting kicked by other players. • Soccer socks are athletic socks that are long enough to cover your shin guards. • Soccer balls range in size from size 3 (for children younger than 8) to size 4 (for players ages 8–12), to size 5.
Size 5 is the standard size used by professionals, as well as those players older than 12. • Buy a few high-quality sports bras to offer support while you run and play soccer.
To get a proper fit, you should take the time to try on several before you buy. • Uniforms are typically provided by the team you join, either for free or for a nominal cost. • A water bottle is necessary to help you keep properly hydrated during practices and games. Start to condition.
Although dribbling and kicking are important soccer skills, you will also have to be in good shape to be an effective team player. Before practice starts, it is a good idea to try to improve your physical fitness. • Running is a good way to train to be a great soccer player. You can work on longer endurance runs (like a mile or two) or concentrate on sprints.
Both are useful skills to have during games when you're trying to beat an opponent to the ball. • You can also try to improve your core strength by doing crunches or other abdominal exercises. A strong set of stomach muscles will help you maintain your balance during games and will help strengthen your shot.
• Stretching and flexibility are important for almost all sports, and soccer is no exception. Being flexible will help you avoid injuries and can help your muscles react more quickly during the games. Stretching out your major leg muscles, like your quads, calves, and hamstrings, will make you a better player.
Practice kicking and dribbling. Proper ball handling through kicking and dribbling is at the core of all good soccer players. Continually practicing these will make you a better player and more valuable to your team. • Dribbling is running with the ball while kicking it. There are many online videos that demonstrate how to do this. Watch a few to help improve your technique. You can also read , which has some more great tips.
• You can practice kicking in a large yard or park. Most soccer experts recommend kicking the ball with the top part of your foot, or where your shoelaces are. • Having a strong skill base for kicking and dribbling is important and useful as girls' bodies experience physical changes as they grow and mature.
Even though you may be getting taller or your muscle composition changes, having those basic skills and continuing to practice them will help you remain a great player during those changes. Challenge yourself by finding good opponents. When practicing outside of team time, it is helpful to seek out players who are more experienced or stronger than you. As you play against them, you will improve your skills.
• Your team may be all girls, and it could help to compete against boys sometime. They may be bigger or stronger than you, so it may be more of a challenge to play against them. Find a team. Soccer is one of the most popular youth sports in the country, and nearly half of the players are girls. With that many girls playing the game, there are likely several options in your community when you are looking for a team to join. • If your school has a team, find out when signups or tryouts typically take place.
Meet with the coach to see what type of conditioning or practice you should do before the next season starts. • Many local communities or recreation centers host soccer teams. Check your city's Website to find the information about the recreation department, which may sponsor soccer teams in your area. • Ask your gym teacher to help you find a team in the area.
• U.S. Youth Soccer has an interactive search on their Website to help you find soccer programs in your area. • Talk with friends who are already on a team. They can give you contact information for the coach or sponsoring organization. Keep improving. Once you have played soccer for a few seasons and improved your skill level, you may want to shoot for the next level of competition.
• Try out for varsity. As the primary soccer team for your school, the varsity team will feature the best players. Talk with some members of the team and ask questions like, "What should I improve if I want to play varsity next year?" or "How did you train for varsity tryouts?" • Consider playing collegiate soccer. Nearly every major university and college has a soccer team, and some offer scholarships to players.
Investigate whether the colleges you're interested in have teams, and contact the coach. There are some good references online regarding which schools offer women's soccer scholarships, and how many are available. • Join a club or amateur league team. Club teams are highly competitive, so they offer a good way to strengthen your skills further. The Women's Premier Soccer League is an independent league with more than 100 teams throughout the United States.
Learn about playing professionally. Playing soccer professionally involves talent, drive, and determination. It is also helpful if you have lots of experience on the field. • In addition to playing soccer for your high school or college, you will most likely need to play on a club-level or semi-professional team before trying out for a professional team.
• The U.S. National Women's Soccer League features 10 teams with between 21 and 29 players on each. • Some talented female players are choosing to play professionally in European leagues since the National Women's Soccer League only has 10 teams. Considering overseas teams can increase your odds of playing professionally.
Watch out for concussions. Soccer is the primary cause of concussions among female athletes. • A 2011 study by the American Journal of Sports Medicine found that in similar sports, girls were twice as likely to suffer concussions as boys.
• Remember that heading the ball is prohibited for players younger than 10, according to the U.S. Soccer Federation. • If you are between the ages of 11 and 13, you should only be heading the ball at practices. Avoid ACL injuries. Young female players are more prone to tearing their anterior cruciate ligament (ACL) than male players. You can help prevent these injuries by building some special steps into your conditioning. • Strengthen your hamstrings, gluteal muscles, and hip rotators by adding squats and lunges into your training regimen.
• Adding agility training, so that you can run, stop, and change direction quickly can also help. Tutorials for agility exercises, such as the ladder drill, are widely available online.
Hydrate and fuel yourself with healthy foods. What you put in your body can have a big impact on your success on the soccer field. • It is important to drink water before, during, and after soccer practice or games.
The American College of Sports Medicine (ACSM) recommends drinking 16–20 ounces before playing soccer and 4–8 ounces every 15–20 minutes during the game or practice. • Eat a healthy, balanced diet full of fruits, vegetables, lean protein and whole grains to give your body the nutrients it needs to help you succeed on the soccer field.
• Healthy carbohydrates such as those found in whole wheat bread, granola bars, and trail mix are crucial for giving your body the energy it needs during games and practices. • Female athletes are more likely than male athletes to develop an eating disorder. Be sure to fuel yourself properly and consult a dietician if you aren't sure of your nutritional needs.
Community Answer • Watch Bend It Like Beckham for a great tale about girls and soccer. While "some" people might say soccer is only for boys, they're stuck in the past and haven't a clue that it doesn't take being a male to know how to kick a ball well. Find people who don't say such things, there are plenty of them out there too.
Community Answer • You need to stand up for yourself! You know you are better than them! Tell the principal, school counselor, teacher, or a parent. If you tell on them don't think of yourself as a tattle-tale, think of yourself as doing something you deserve because you are way better than they will ever be.
Football players do EXTREMELY well on the dating front. In fact, not a single football player at our school is still single, a continuation throughout the history of our school. That's a ratio that outperforms the soccer team (That's right Ryan), volleyball team, tennis team, and cross country team BY A WIDE MARGIN. Nobody else even comes close to this level of perfection. This may in fact to do with the fact that our football team is undefeated.
What high school sport puts athletes most at risk for concussion? Learn more about girls' soccer and concussions in this HowStuffWorks article Two high-school soccer players collide in a play for control of the ball. Jim Davis/The Boston Globe/Getty Images. When you think of a teenager getting a sports concussion, who is it that you think of, sitting on the doctor's table in the Emergency Room, getting a flashlight shone in each eye? Is it an ice skater? A football player? A gymnast? A cross-country runner? Odds are, you probably thought of a big dude in shoulder pads and a helmet — football players are notorious for getting head injuries, right?


Project Manager: Our front line managers, are the face of Vanguard to the customer and work closely with the utility/city on each project.
Meter Technician: The meter technician is the heart and soul of Vanguard. Meter Techs are paid well for their skill and professionalism.
GPS Technician: Vanguard is on the forefront of cutting edge GPS/GIS data collection and mapping.
Vanguard Utility Service offers a very competitive wage and benefits package.
Vanguard employees are some of the most skilled, highest paid and most respected in the industry.
Excellence is our goal and training is the key.
Click Here To Apply Today On Indeed.


A bomb attack in the Syrian city of Raqqa killed at least eight people on Tuesday, including four fighters of the US-backed Syrian Democratic Forces, a security source in northern Syria said .
Daesh's Amaq news agency said the group's militants entrapped Kurdish security forces by detonating a sound explosive device on a main street and after people congregated they detonated a car that was parked near by.
The SDF has warned that Daesh militants would intensify their insurgent activities after being defeated in their last remaining enclave in Syria last month. The SDF ended IS control of Raqqa in October 2017 after months of fighting.


text:
package com.asher_stern.crf.postagging.postaggers.majority;

import java.io.File;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import org.apache.log4j.Logger;

import com.asher_stern.crf.postagging.postaggers.PosTagger;
import com.asher_stern.crf.postagging.postaggers.PosTaggerTrainer;
import com.asher_stern.crf.utilities.CrfException;
import com.asher_stern.crf.utilities.TaggedToken;

/**
 * Trains a {@link MajorityPosTagger} from a given corpus.
 * For each token the trainer counts how many times each tag was assigned to that token in the corpus.
 * Then, for each token, the tag that was the most frequent for that token is considered as the tag to be used in
 * annotating a test example.
 *
 * @author Asher Stern
 * Date: Nov 4, 2014
 *
 */
public class MajorityPosTaggerTrainer implements PosTaggerTrainer<Iterable<List<TaggedToken<String, String>>>>
{

	@Override
	public void train(Iterable<List<TaggedToken<String, String>>> corpus)
	{
		processCorpus(corpus);

		majorityForToken = calculateMajorityForTokens();
		majorGeneralTag = getMajority(majorityMapGeneralTag);

		posTagger = new MajorityPosTagger(majorityForToken, majorGeneralTag);
	}

	@Override
	public PosTagger getTrainedPosTagger()
	{
		if (null==posTagger) {throw new CrfException("Not yet trained.");}
		return posTagger;
	}

	@Override
	public void save(File modelDirectory)
	{
		throw new CrfException("Not implemented");

	}

	private void addToMaps(String token, String tag)
	{
		if (!(majorityMapPerToken.containsKey(token)))
		{
			majorityMapPerToken.put(token, new LinkedHashMap<String, Integer>());
		}
		Map<String, Integer> tokenMap = majorityMapPerToken.get(token);
		if (tokenMap.containsKey(tag))
		{
			int count = tokenMap.get(tag);
			++count;
			tokenMap.put(tag,count);
		}
		else
		{
			tokenMap.put(tag, 1);
		}

		int generalCount = 0;
		if (majorityMapGeneralTag.containsKey(tag))
		{
			generalCount = majorityMapGeneralTag.get(tag);
		}
		majorityMapGeneralTag.put(tag, generalCount+1);
	}

	private void processSentence(List<? extends TaggedToken<String, String>> sentence)
	{
		for (TaggedToken<String, String> token : sentence)
		{
			addToMaps(token.getToken(),token.getTag());
		}
	}

	private void processCorpus(Iterable<List<TaggedToken<String, String>>> corpus)
	{
		majorityMapPerToken = new LinkedHashMap<String, Map<String,Integer>>();
		majorityMapGeneralTag = new LinkedHashMap<String, Integer>();
		Iterator<List<TaggedToken<String, String>>> reader = corpus.iterator();

		int index = 0;
		while(reader.hasNext())
		{
			++index;
			List<? extends TaggedToken<String, String>> sentence = reader.next();
			processSentence(sentence);
			if (logger.isDebugEnabled()) {if (0==(index%10000)){logger.debug("Already processed: "+index+" sentences.");} }
		}
	}

	private String getMajority(Map<String, Integer> map)
	{
		String ret = null;
		int max = 0;
		for (String str : map.keySet())
		{
			int count = map.get(str);
			if (count > max)
			{
				ret = str;
				max = count;
			}
		}
		return ret;
	}

	private Map<String, String> calculateMajorityForTokens()
	{
		Map<String, String> ret = new LinkedHashMap<String, String>();
		for (String token : majorityMapPerToken.keySet())
		{
			String majorTag = getMajority(majorityMapPerToken.get(token));
			ret.put(token, majorTag);
		}
		return ret;
	}

	private Map<String ,Map<String, Integer>> majorityMapPerToken;
	private Map<String, Integer> majorityMapGeneralTag;

	private Map<String, String> majorityForToken = null;
	private String majorGeneralTag = null;
	private MajorityPosTagger posTagger = null;

	private static final Logger logger = Logger.getLogger(MajorityPosTaggerTrainer.class);
}

redpajama_set_name: RedPajamaGithub


text:
Kauste is a village in Hiiumaa Parish, Hiiu County in northwestern Estonia.

The village is first mentioned in 1565 (Kowstha). Historically, the village was part of Kõrgessaare Manor ().

1977–1997 the village was part of Malvaste village.

References

Villages in Hiiu County

redpajama_set_name: RedPajamaWikipedia


Armen and his father own and operate Soapy Suds Car Wash and were looking to expands their business by offering other profitable automotive services. After doing some research and reviewing some testimonials he found on Rightlook, Armen decided to take Rightlook's Windshield Repair Training course.
Armen talks about what it was like working with the instructor the entire day, from practice windshield to an actual windshield on a vehicle. Check out how confident Armen is at the end of training and how soon he thinks he can offer Windshield Repair as a service.
Expand your automotive appearance business like Armen. Learn more about Windshield Repair and other training courses at http://www.rightlook.com/.
We also work directly with your insurance company. Our office staff will handle all of the insurance paperwork, letting you focus on more important things.


text:
Flush With Donations, ACLU Teams up With Y Combinator
By Casey C. Sullivan, Esq. on February 02, 2017 2:56 PM
'We'll see you in court' the American Civil Liberties Union declared shortly after Trump's election in November. Then, with last Friday's executive order halting the resettlement of refugees and banning immigrants from seven majority-Muslim nations, the battle really began. All the while, the donations were rolling in -- so quickly that the ACLU's website crashed. The group received roughly 120,000 donations in the first five days after the election. On the weekend of Trump's immigration ban, that number almost tripled. The group took in $24 million from over 350,000 donations -- six times what it usually raises online in a full year. That's enough cash to fund a whole army of public interest lawyers.
Now, following the unprecedented explosion in donations, the ACLU is teaming up with an unexpected partner, Y Combinator, the Silicon Valley startup accelerator.
Why Y Combinator?
Y Combinator is famous for providing seed money, advice, and training to startups that go on to become major companies, having invested more than $65 billion in almost 1,000 companies. Some of those are now household names, like Dropbox, Airbnb, and Reddit.
But the ACLU is no startup. Founded in 1920, it's one of the nation's largest public interest groups, with approximately 200 staff attorneys, 2,000 volunteer attorneys, and an annual budget of over $130 million. So what can it get from Y Combinator?
Deeper connections to the tech world and advice on how to invest its new cash and spur greater growth, for one. Y Combinator "could give the nonprofit guidance on how to use the cash to attract talent, make investments in technological infrastructure and market itself to grow its donor base and influence," Techcrunch speculates. As a nonprofit, the ACLU will get some funding from Y Combinator, but the organization will not take an equity stake in the company, Techcrunch reports.
The Tech Industry and Civil Liberties
The partnership between the ACLU and the tech world isn't entirely unexpected. The tech industry has been particularly critical of Trump both during his campaign and after his election. Trump's immigration executive order strikes at an industry that not only relies on high-talent immigration to fill positions, but which is also made up of many immigrant founders.
When protesters took to San Francisco International Airport after the executive order was signed, for example, Google co-founder Sergey Brin rushed to join them. "I'm here because I'm a refugee," said Brin, whose parents moved to America to escape antisemitism in Russia.
Google cofounder Sergey Brin at SFO protest: "I'm here because I'm a refugee." (Photo from Matt Kang/Forbes) pic.twitter.com/GwhsSwDPLT
-- Ryan Mac (@RMac18) January 29, 2017
Indeed, some of the ACLU's new cash is courtesy of tech CEOs. As the ACLU was filing suit to halt detentions and deportations under the new executive order, many tech leaders were pledging to match donations made to the group. Those matching included Nest founder Tony Fadell, Slack CEO Stewart Butterfield, Facebook's Andrew Bosworth, many of whom had been inspired to act in their personal capacities by Y Combinator's president, Sam Altman.
25 YC founders offered to go help at the ACLU in the first 30 mins since I sent the email. our community.
-- Sam Altman (@sama) January 31, 2017
Still, it's not all Trump angst and ACLU donations among tech companies. Peter Theil is one of Trump's main supporters in the technology industry -- and a partner at Y Combinator.
Twitter Employees Are Donating $1.59 Million to the ACLU (CNET)
Where Does Gorsuch Stand on Tech and the Law? (FindLaw's Technologist)
Protection of Climate Change Data (FindLaw's Technologist)
What Lawyers Should Know About Net Neutrality (FindLaw's Technologist)


text:
Q: Best way to Insert JSON data into MYSQL I have a JSON data in a text file which contains pair of latitude and longitude,Now I want to store this data into MYSQL DB,How to go about & what's the best approach please suggest.
Here is My JSON data
[{"latlon":{"lng":77.75124312,"lat":12.97123123},"type":"s"},
 {"latlon":{"lon":77.73004942455374,"lat":12.98227579706589},"type":"s"},
 {"latlon":{"lon":77.67374449291539,"lat":12.995490063545521},"type":"v"},
 {"latlon":{"lon":77.6097147993144,"lat":12.970900929013666},"type":"s"},
 {"latlon":{"lon":77.53933363476645,"lat":12.948316929346504},"type":"s"},
 {"latlon":{"lng":77.48213123,"lat":12.91213213},"type":"s"}
 .
 .
 .
 .
]
The String may go up to 50 points

A: Some comments have suggested leaving it in JSON format and storing it in a text column.
I'd suggest that if you have control over your schema, you should store it in two NUMERIC fields - one for latitude, and one for longitude. Fundamentally, that's the data you have. The fact that you've received it using JSON as a container format is irrelevant to the data itself.
If you store it as a latitude and a longitude, it's simpler to query over it, and you can still recreate the JSON later if you want to... but if you end up wanting to fetch it not as JSON, you'll be in a much better position to do so. It also means you're not tying yourself to JSON against future changes.
Personally I think it's always a good idea to mentally separate the intrinsic nature of the data from the way that you happen to receive it. Store the data in whatever format is idiomatic for that storage - so if you're storing a number, use one of the numeric data types. If you're storing a date and time, use datetime, etc. That way you don't end up with an extra layer between you and the data itself every time you want to access it.
This approach also means you're much more likely to spot bad data early on - if you just store the JSON directly without parsing it first, you could later find that the latitude or longitude isn't a valid number. Heck, the fact that your sample data sometimes has lon and sometimes has lng suggests you should do some data cleanup anyway.

A: Basically, if that's a data that matters to your software (if there will be queries involving those data), you should considere parsing the JSON.
If not : store it as it is !

A: From Mysql 5.7.10 and higher JSON support is native so you can have a JSON data type

Document Validation - Only valid JSON documents can be stored in a
JSON column, so you get automatic validation of your data.
Efficient Access - More importantly, when you store a JSON document in a JSON column, it is not stored as a plain text value. Instead, it is stored
in an optimized binary format that allows for quicker access to object
members and array elements.
Performance - Improve your query
performance by creating indexes on values within the JSON columns.
This can be achieved with "functional indexes" on virtual columns.
Convenience - The additional inline syntax for JSON columns makes it
very natural to integrate Document queries within your SQL. For
example (features.feature is a JSON column): SELECT feature->"$.properties.STREET" AS property_street FROM features WHERE id = 121254;

A: If you are using Java for application you can do something like this.
Convert JSONObject into String and save as TEXT/ VARCHAR. While retrieving the same column convert the String into JSONObject.
For example
Write into DB
String stringToBeInserted = jsonObject.toString();
//and insert this string into DB

Read from DB
String json = Read_column_value_logic_here
JSONObject jsonObject = new JSONObject(json);

Ref: how to store JSON object in SQLite database


text:
import DirtySubmitForm from '~/dirty_submit/dirty_submit_form';
import setTimeoutPromiseHelper from '../helpers/set_timeout_promise_helper';

export function setInput(element, value) {
  element.value = value;

  element.dispatchEvent(
    new Event('input', {
      bubbles: true,
      cancelable: true,
    }),
  );

  return setTimeoutPromiseHelper(DirtySubmitForm.THROTTLE_DURATION);
}

export function createForm() {
  const form = document.createElement('form');
  form.innerHTML = `
    <input type="text" value="original" class="js-input" name="input" />
    <button type="submit" class="js-dirty-submit"></button>
  `;
  const input = form.querySelector('.js-input');
  const submit = form.querySelector('.js-dirty-submit');

  return {
    form,
    input,
    submit,
  };
}


The products contained in this site are provided "as is" and "with all faults" with no warranty on the merchantability for a specific use or representation of accuracy. Specifically, no warranty or merchantability for a particular purpose or any other warranty is made or to be implied with respect to these products. The company does not assume any legal liability for the products provided in this site or otherwise directly or indirectly obtained from this site. The information, materials and services contained in this site, including without limitation to graphics, text and links are provided on an "as is" basis with no warranty or merchantability for a specifc use or representation of accuracy. Although this material has been prepared with the intent to provide reliable information, no warranty (express or implied) is made as to its accuracy or completeness. Neither is any liability assumed for loss or damage resulting from reliance on this material. In no event will this company be liable for any damages, direct or indirect, consequential or compensatory, arising out of the use of this material.
The product images on this website are for reference purposes only. Although the pictures are aimed to be accurate representation of the actual product, due to errors in photography and custom color settings on individual monitors, the pictures may be slight variant of the actual products. No returns will be accepted for merchandise that is not exactly as the reference picture.
All fashion watches and accessories found on this website are in NO WAY affliated to, representing, associated, or sponsered by any registered name brands or their copyrighted products. Although our designer products are comparable in style and quality, it is NOT the authentic or genuine brand name it is compared to. We do not represent our products to be authentic, original, or genuine to any registered designer brand labels or their copyrighted products, nor do we represent that they are exact copies or replicas; therefore, they do not violate any copyright laws. We only state that our products are inpired by designs of these name brand companies.
This company assumes no legal liability for the products provided in this site, purchased from this site or otherwise directly or indirectly obtained from this site. In no event shall the company be liable for any direct, indirect, incidental, punitive, consequential or any other damages whatsoever, whether in action or under contract, tort or otherwise. Specifically, in no event shall the company be liable for any patent infringement, copyright infringement or trademark infringement related to the possession, resale or use of products provided in this site, purchased from this site or otherwise directly or indirectly obtained from this site. Under no circumstance, including, but not limited to, negligence, shall the company be liable for any damages that result from the use of, or inability to use, the information, materials or products contained in or purchased from this site.
Reproduction, modification or distribution of products provided in or purchased from this site is strictly prohibited. All service marks, trademarks and trade names are proprietary to this company or other owners. In no event shall this company be liable for any trademark infringement, copyright infringement or patent infringement related to the possession, resale or use of products purchased from this site.
We ship all over the United States domestically, as well as internationally to many other countries. Items can be shipped via UPS ground or second day air. In most cases, we try and ship the order the same day it is received. Orders shipped to Georgia and surrounding states are usually delivered in 1-2 business days. Orders outside of Georgia can take up to 3-7 business days. Please note that UPS does not ship on weekends.
Returns and exchanges are only accepted for wrongly shipped merchandise or manufacturing defects. There will be no refund/exchange for used or worn items. Return/exchanges claims must be submitted within seven days of the merchandise received date and must be accompanied by original receipt. Merchandise that is damaged during shipping must be claimed by UPS. A return authorization form must be filled out and an RA # must be given before any returned merchandise can be accepted. Failure to completely fill out the Return Authorization Form or follow the instructions on the Return Authorization Form may result in a delay/refusal of return/exchange. Merchandise that is shipped back without an RA # will not be accepted. Shipping and handling charges are not refundable for any reason. All merchandise that is shipped back must be packed and insured properly to avoid loss or damage during shipping.


text:
import {BaseElement} from './base-element';
import {BaseTemplate, registerExtendedTemplate} from './service/template-impl';
import {
  addDocFactoryToExtension,
  addElementToExtension,
  addShadowRootFactoryToExtension,
  installBuiltinElements,
  installExtensionsInShadowDoc,
  installExtensionsService,
  registerExtension,
} from './service/extensions-impl';
import {ampdocServiceFor} from './ampdoc';
import {cssText} from '../build/css';
import {dev, user, initLogConstructor} from './log';
import {fromClassForDoc, getService, getServiceForDoc} from './service';
import {childElementsByTag} from './dom';
import {
  createShadowRoot,
  importShadowBody,
  installStylesForShadowRoot,
} from './shadow-embed';
import {getMode} from './mode';
import {installActionServiceForDoc} from './service/action-impl';
import {installGlobalSubmitListener} from './document-submit';
import {extensionsFor} from './extensions';
import {installHistoryServiceForDoc} from './service/history-impl';
import {installPlatformService} from './service/platform-impl';
import {installResourcesServiceForDoc} from './service/resources-impl';
import {
  installShadowDoc,
  shadowDocHasBody,
  shadowDocReady,
} from './service/ampdoc-impl';
import {installStandardActionsForDoc} from './service/standard-actions-impl';
import {installStorageService} from './service/storage-impl';
import {installStyles} from './style-installer';
import {installTimerService} from './service/timer-impl';
import {installTemplatesService} from './service/template-impl';
import {installUrlReplacementsServiceForDoc,} from
    './service/url-replacements-impl';
import {installVideoManagerForDoc} from './service/video-manager-impl';
import {installViewerService} from './service/viewer-impl';
import {installViewportServiceForDoc} from './service/viewport-impl';
import {installVsyncService} from './service/vsync-impl';
import {installXhrService} from './service/xhr-impl';
import {isExperimentOn, toggleExperiment} from './experiments';
import {platformFor} from './platform';
import {registerElement} from './custom-element';
import {registerExtendedElement} from './extended-element';
import {resourcesForDoc} from './resources';
import {setStyle} from './style';
import {viewerFor} from './viewer';
import {viewportForDoc} from './viewport';
import {waitForBody} from './dom';
import * as config from './config';

initLogConstructor();

/** @const @private {string} */
const TAG = 'runtime';

/** @type {!Object} */
const elementsForTesting = {};

/**
 * Install runtime-level services.
 * @param {!Window} global Global scope to adopt.
 */
export function installRuntimeServices(global) {
  // TODO(dvoytenko, #3742): Split into runtime and ampdoc services.
  installPlatformService(global);
  installTimerService(global);
  installViewerService(global);
  installStorageService(global);
  installVsyncService(global);
  installXhrService(global);
  installTemplatesService(global);
  if (isExperimentOn(global, 'form-submit')) {
    installGlobalSubmitListener(global);
  }
}

/**
 * Install ampdoc-level services.
 * @param {!./service/ampdoc-impl.AmpDoc} ampdoc
 */
export function installAmpdocServices(ampdoc) {
  // TODO(dvoytenko, #3742): Split into runtime and ampdoc services.
  installViewportServiceForDoc(ampdoc);
  installHistoryServiceForDoc(ampdoc);
  installResourcesServiceForDoc(ampdoc);
  installUrlReplacementsServiceForDoc(ampdoc);
  installActionServiceForDoc(ampdoc);
  installStandardActionsForDoc(ampdoc);
  installVideoManagerForDoc(ampdoc);
}

/**
 * Install builtins.
 * @param {!Window} global Global scope to adopt.
 */
export function installBuiltins(global) {
  installBuiltinElements(global);
}

/**
 * Applies the runtime to a given global scope for a single-doc mode.
 * Multi frame support is currently incomplete.
 * @param {!Window} global Global scope to adopt.
 * @param {!{
 *     registerElement: function(
 *         !Window,
 *         !./service/extensions-impl.Extensions,
 *         string, !Function, (string|undefined)),
 *     registerServiceForDoc: function(
 *         !Window,
 *         !./service/extensions-impl.Extensions,
 *         string,
 *         (function(new:Object, !./service/ampdoc-impl.AmpDoc)|undefined),
 *         (function(!./service/ampdoc-impl.AmpDoc):!Object|undefined)),
 *   }} opts
 * @param {function(!Window, !./service/extensions-impl.Extensions)} callback
 */
function adoptShared(global, opts, callback) {

  // Tests can adopt the same window twice. sigh.
  if (global.AMP_TAG) {
    return;
  }
  global.AMP_TAG = true;
  // If there is already a global AMP object we assume it is an array
  // of functions
  const preregisteredExtensions = global.AMP || [];

  const extensions = installExtensionsService(global);
  installRuntimeServices(global);

  global.AMP = {
    win: global,
  };

  /** @const */
  global.AMP.config = config;

  /** @const */
  global.AMP.BaseElement = BaseElement;

  /** @const */
  global.AMP.BaseTemplate = BaseTemplate;

  /**
   * Registers an extended element and installs its styles.
   * @const
   */
  global.AMP.registerElement = opts.registerElement.bind(null,
      global, extensions);

  /**
   * Registers an extended template.
   * @param {string} name
   * @param {!Function} implementationClass
   */
  global.AMP.registerTemplate = function(name, implementationClass) {
    registerExtendedTemplate(global, name, implementationClass);
  };

  /**
   * Registers an ampdoc service.
   * @const
   */
  global.AMP.registerServiceForDoc = opts.registerServiceForDoc.bind(null,
      global, extensions);

  // Experiments.
  /** @const */
  global.AMP.isExperimentOn = isExperimentOn.bind(null, global);
  /** @const */
  global.AMP.toggleExperiment = toggleExperiment.bind(null, global);

  /**
   * Sets the function to forward tick events to.
   * @param {function(string,?string=,number=)} fn
   * @param {function()=} opt_flush
   * @deprecated
   * @export
   */
  global.AMP.setTickFunction = (fn, opt_flush) => {};

  // Run specific setup for a single-doc or shadow-doc mode.
  callback(global, extensions);

  /**
   * @param {function(!Object)|{n:string, f:function(!Object)}} fnOrStruct
   */
  function installExtension(fnOrStruct) {
    if (typeof fnOrStruct == 'function') {
      fnOrStruct(global.AMP);
    } else {
      registerExtension(extensions, fnOrStruct.n, fnOrStruct.f, global.AMP);
    }
  }

  /**
   * Certain extensions can be auto-loaded by runtime based on experiments or
   * other configurations.
   */
  function installAutoLoadExtensions() {
    if (!getMode().test && isExperimentOn(global, 'amp-lightbox-viewer-auto')) {
      extensionsFor(global).loadExtension('amp-lightbox-viewer');
    }
  }

  /**
   * Registers a new custom element.
   * @param {function(!Object)|{n:string, f:function(!Object)}} fnOrStruct
   */
  global.AMP.push = function(fnOrStruct) {
    // Extensions are only processed once HEAD is complete.
    waitForBody(global.document, () => {
      installExtension(fnOrStruct);
    });
  };

  // Execute asynchronously scheduled elements.
  // Extensions are only processed once HEAD is complete.
  waitForBody(global.document, () => {
    for (let i = 0; i < preregisteredExtensions.length; i++) {
      const fnOrStruct = preregisteredExtensions[i];
      try {
        installExtension(fnOrStruct);
      } catch (e) {
        // Throw errors outside of loop in its own micro task to
        // avoid on error stopping other extensions from loading.
        dev().error(TAG, 'Extension failed: ', e, fnOrStruct.n);
      }
    }

    installAutoLoadExtensions();

    // Make sure we empty the array of preregistered extensions.
    // Technically this is only needed for testing, as everything should
    // go out of scope here, but just making sure.
    preregisteredExtensions.length = 0;
  });

  // For iOS we need to set `cursor:pointer` to ensure that click events are
  // delivered.
  if (platformFor(global).isIos()) {
    setStyle(global.document.documentElement, 'cursor', 'pointer');
  }
}

/**
 * Applies the runtime to a given global scope for a single-doc mode.
 * Multi frame support is currently incomplete.
 * @param {!Window} global Global scope to adopt.
 */
export function adopt(global) {
  adoptShared(global, {
    registerElement: prepareAndRegisterElement,
    registerServiceForDoc: prepareAndRegisterServiceForDoc,
  }, global => {
    const viewer = viewerFor(global);

    /** @const */
    global.AMP.viewer = viewer;

    if (getMode().development) {
      /** @const */
      global.AMP.toggleRuntime = viewer.toggleRuntime.bind(viewer);
      /** @const */
      global.AMP.resources = resourcesForDoc(global.document);
    }

    const viewport = viewportForDoc(global.document);

    /** @const */
    global.AMP.viewport = {};
    global.AMP.viewport.getScrollLeft = viewport.getScrollLeft.bind(viewport);
    global.AMP.viewport.getScrollWidth = viewport.getScrollWidth.bind(viewport);
    global.AMP.viewport.getWidth = viewport.getWidth.bind(viewport);
  });
}

/**
 * Applies the runtime to a given global scope for shadow mode.
 * @param {!Window} global Global scope to adopt.
 */
export function adoptShadowMode(global) {
  adoptShared(global, {
    registerElement: prepareAndRegisterElementShadowMode,
    registerServiceForDoc: prepareAndRegisterServiceForDocShadowMode,
  }, (global, extensions) => {
    /**
     * Registers a shadow root document.
     * @param {!Element} hostElement
     * @param {!Document} doc
     * @param {string} url
     */
    global.AMP.attachShadowDoc = prepareAndAttachShadowDoc.bind(null,
        global, extensions);
  });
}

/**
 * Registers an extended element and installs its styles in a single-doc mode.
 * @param {!Window} global
 * @param {!./service/extensions-impl.Extensions} extensions
 * @param {string} name
 * @param {!Function} implementationClass
 * @param {string=} opt_css
 */
function prepareAndRegisterElement(global, extensions,
    name, implementationClass, opt_css) {
  addElementToExtension(extensions, name, implementationClass, opt_css);
  if (opt_css) {
    installStyles(global.document, opt_css, () => {
      registerElementClass(global, name, implementationClass, opt_css);
    }, false, name);
  } else {
    registerElementClass(global, name, implementationClass, opt_css);
  }
}

/**
 * Registers an extended element and installs its styles in a shodow-doc mode.
 * @param {!Window} global
 * @param {!./service/extensions-impl.Extensions} extensions
 * @param {string} name
 * @param {!Function} implementationClass
 * @param {string=} opt_css
 */
function prepareAndRegisterElementShadowMode(global, extensions,
    name, implementationClass, opt_css) {
  addElementToExtension(extensions, name, implementationClass, opt_css);
  registerElementClass(global, name, implementationClass, opt_css);
  if (opt_css) {
    addShadowRootFactoryToExtension(extensions, shadowRoot => {
      installStylesForShadowRoot(shadowRoot, dev().assertString(opt_css),
          /* isRuntimeCss */ false, name);
    });
  }
}

/**
 * Registration steps for an extension element in both single- and shadow-doc
 * modes.
 * @param {!Window} global
 * @param {string} name
 * @param {!Function} implementationClass
 * @param {string=} opt_css
 */
function registerElementClass(global, name, implementationClass, opt_css) {
  registerExtendedElement(global, name, implementationClass);
  if (getMode().test) {
    elementsForTesting[name] = {
      name,
      implementationClass,
      css: opt_css,
    };
  }
  // Resolve this extension's Service Promise.
  getService(global, name, emptyService);
}

/**
 * Registers an ampdoc service in a single-doc mode.
 * @param {!Window} global
 * @param {!./service/extensions-impl.Extensions} extensions
 * @param {string} name
 * @param {function(new:Object, !./service/ampdoc-impl.AmpDoc)=} opt_ctor
 * @param {function(!./service/ampdoc-impl.AmpDoc):!Object=} opt_factory
 */
function prepareAndRegisterServiceForDoc(global, extensions,
    name, opt_ctor, opt_factory) {
  const ampdocService = ampdocServiceFor(global);
  const ampdoc = ampdocService.getAmpDoc();
  registerServiceForDoc(ampdoc, name, opt_ctor, opt_factory);
}

/**
 * Registers an ampdoc service in a shadow-doc mode.
 * @param {!Window} global
 * @param {!./service/extensions-impl.Extensions} extensions
 * @param {string} name
 * @param {function(new:Object, !./service/ampdoc-impl.AmpDoc)=} opt_ctor
 * @param {function(!./service/ampdoc-impl.AmpDoc):!Object=} opt_factory
 */
function prepareAndRegisterServiceForDocShadowMode(global, extensions,
    name, opt_ctor, opt_factory) {
  addDocFactoryToExtension(extensions, ampdoc => {
    registerServiceForDoc(ampdoc, name, opt_ctor, opt_factory);
  }, name);
}

/**
 * Registration steps for an ampdoc service in both single- and shadow-doc
 * modes.
 * @param {!./service/ampdoc-impl.AmpDoc} ampdoc
 * @param {string} name
 * @param {function(new:Object, !./service/ampdoc-impl.AmpDoc)=} opt_ctor
 * @param {function(!./service/ampdoc-impl.AmpDoc):!Object=} opt_factory
 */
function registerServiceForDoc(ampdoc, name, opt_ctor, opt_factory) {
  dev().assert((opt_ctor || opt_factory) && (!opt_ctor || !opt_factory),
      'Only one: a class or a factory must be specified');
  if (opt_ctor) {
    fromClassForDoc(ampdoc, name, opt_ctor);
  } else {
    getServiceForDoc(ampdoc, name, opt_factory);
  }
}

/**
 * Attaches the shadow doc and configures ampdoc for it.
 * @param {!Window} global
 * @param {!./service/extensions-impl.Extensions} extensions
 * @param {!Element} hostElement
 * @param {!Document} doc
 * @param {string} url
 */
function prepareAndAttachShadowDoc(global, extensions, hostElement, doc, url) {
  dev().fine(TAG, 'Attach shadow doc:', doc);
  const ampdocService = ampdocServiceFor(global);

  hostElement.style.visibility = 'hidden';
  const shadowRoot = createShadowRoot(hostElement);

  shadowRoot.AMP = {};
  shadowRoot.AMP.url = url;

  const ampdoc = installShadowDoc(ampdocService, url, shadowRoot);
  dev().fine(TAG, 'Attach to shadow root:', shadowRoot, ampdoc);

  // Install runtime CSS.
  installStylesForShadowRoot(shadowRoot, cssText, /* opt_isRuntimeCss */ true);

  // Instal doc services.
  installAmpdocServices(ampdoc);

  // Install extensions.
  const extensionIds = mergeShadowHead(global, extensions, shadowRoot, doc);

  // Apply all doc extensions.
  installExtensionsInShadowDoc(extensions, ampdoc, extensionIds);

  // Append body.
  if (doc.body) {
    const body = importShadowBody(shadowRoot, doc.body);
    body.classList.add('amp-shadow');
    shadowRoot.appendChild(body);
    shadowDocHasBody(ampdoc, body);
  }

  // Document is ready.
  shadowDocReady(ampdoc);

  // TODO(dvoytenko): find a better and more stable way to make content visible.
  // E.g. integrate with dynamic classes. In shadow case specifically, we have
  // to wait for stubbing to complete, which may take awhile due to importNode.
  global.setTimeout(function() {
    hostElement.style.visibility = 'visible';
  }, 50);

  dev().fine(TAG, 'Shadow root initialization is done:', shadowRoot, ampdoc);
  return shadowRoot.AMP;
}

/**
 * Processes the contents of the shadow document's head.
 * @param {!Window} global
 * @param {!./service/extensions-impl.Extensions} extensions
 * @param {!ShadowRoot} shadowRoot
 * @param {!Document} doc
 * @return {!Array<string>}
 */
function mergeShadowHead(global, extensions, shadowRoot, doc) {
  const extensionIds = [];
  if (doc.head) {
    const parentLinks = {};
    childElementsByTag(dev().assertElement(global.document.head), 'link')
        .forEach(link => {
          const href = link.getAttribute('href');
          if (href) {
            parentLinks[href] = true;
          }
        });

    for (let n = doc.head.firstElementChild; n; n = n.nextElementSibling) {
      const tagName = n.tagName;
      const name = n.getAttribute('name');
      const rel = n.getAttribute('rel');
      if (n.tagName == 'TITLE') {
        shadowRoot.AMP.title = n.textContent;
        dev().fine(TAG, '- set title: ', shadowRoot.AMP.title);
      } else if (tagName == 'META' && n.hasAttribute('charset')) {
        // Ignore.
      } else if (tagName == 'META' && name == 'viewport') {
        // Ignore.
      } else if (tagName == 'META') {
        // TODO(dvoytenko): copy other meta tags.
        dev().warn(TAG, 'meta ignored: ', n);
      } else if (tagName == 'LINK' && rel == 'canonical') {
        shadowRoot.AMP.canonicalUrl = n.getAttribute('href');
        dev().fine(TAG, '- set canonical: ', shadowRoot.AMP.canonicalUrl);
      } else if (tagName == 'LINK' && rel == 'stylesheet') {
        // This must be a font definition: no other stylesheets are allowed.
        const href = n.getAttribute('href');
        if (parentLinks[href]) {
          dev().fine(TAG, '- stylesheet already included: ', href);
        } else {
          parentLinks[href] = true;
          const el = global.document.createElement('link');
          el.setAttribute('rel', 'stylesheet');
          el.setAttribute('type', 'text/css');
          el.setAttribute('href', href);
          global.document.head.appendChild(el);
          dev().fine(TAG, '- import font to parent: ', href, el);
        }
      } else if (n.tagName == 'STYLE') {
        if (n.hasAttribute('amp-boilerplate')) {
          // Ignore.
          dev().fine(TAG, '- ignore boilerplate style: ', n);
        } else {
          installStylesForShadowRoot(shadowRoot, n.textContent,
              /* isRuntimeCss */ false, 'amp-custom');
          dev().fine(TAG, '- import style: ', n);
        }
      } else if (n.tagName == 'SCRIPT' && n.hasAttribute('src')) {
        dev().fine(TAG, '- src script: ', n);
        const src = n.getAttribute('src');
        const isRuntime = src.indexOf('/amp.js') != -1 ||
            src.indexOf('/v0.js') != -1;
        const customElement = n.getAttribute('custom-element');
        const customTemplate = n.getAttribute('custom-template');
        if (isRuntime) {
          dev().fine(TAG, '- ignore runtime script: ', src);
        } else if (customElement || customTemplate) {
          // This is an extension.
          extensions.loadExtension(customElement || customTemplate);
          dev().fine(
              TAG, '- load extension: ', customElement || customTemplate);
          if (customElement) {
            extensionIds.push(customElement);
          }
        } else if (!n.hasAttribute('data-amp-report-test')) {
          user().error(TAG, '- unknown script: ', n, src);
        }
      } else if (n.tagName == 'SCRIPT') {
        // Non-src version of script.
        const type = n.getAttribute('type') || 'application/javascript';
        if (type.indexOf('javascript') == -1) {
          shadowRoot.appendChild(global.document.importNode(n, true));
          dev().fine(TAG, '- non-src script: ', n);
        } else {
          user().error(TAG, '- unallowed inline javascript: ', n);
        }
      } else if (n.tagName == 'NOSCRIPT') {
        // Ignore.
      } else {
        user().error(TAG, '- UNKNOWN head element:', n);
      }
    }
  }
  return extensionIds;
}

/**
 * @return {!Object}
 */
function emptyService() {
  // All services need to resolve to an object.
  return {};
}

/**
 * Registers all extended elements as normal elements in the given
 * window.
 * Make sure to call `adopt(window)` in your unit test as well and
 * then call this on the generated iframe.
 * @param {!Window} win
 */
export function registerForUnitTest(win) {
  for (const key in elementsForTesting) {
    const element = elementsForTesting[key];
    if (element.css) {
      installStyles(win.document, element.css, () => {
        registerElement(win, element.name, element.implementationClass);
      }, false, element.name);
    } else {
      registerElement(win, element.name, element.implementationClass);
    }
  }
}


Feed your competitive side with some family-friendly trivia at The Boarding House from 7 pm - 9 pm. From pop culture to ancient history, be sure to brush up on your facts and bring your A-game! DJ Trivia from Greenville, SC will be on-site to host! Complimentary hor d'oeuvres will be provided. There is no cost, however, reservations are requested.


text:
Agence-France Presse
Singer Akon's Senegalese city unstarted, locals left in dark
The project's first stone, laid a year ago, stands alone in a grassy field (AFP/JOHN WESSELS)
Akon announced the project in September 2020 to great fanfare and international media attention (AFP/Seyllou)
Mbodiene is a sleepy hamlet around 100 kilometres south of the capital Dakar (AFP/JOHN WESSELS)
Akon said the new city would be built using renewable materials of African origin to the extent possible (AFP/Fadel SENNA)
Senegal (AFP/Tupac POINTU)
Emmet Livingstone
2 September 2021, 5:53 am ·4-min read
A year after singer Akon laid the first stone of the $6 billion futuristic city he vowed to build for his native Senegal, the site remains grassland.
The stone itself sits at the bottom of a dirt track in a field; a small placard advertising the megaproject has fallen off it.
Construction of "Akon City," a project due to feature ultramodern twisting skyscrapers, was already meant to have begun near the Atlantic Ocean village of Mbodiene.
But building work is yet to start, prompting residents who were hoping for jobs to wonder about its future.
"They laid the foundation stone with a lot of speeches and promises," said Jules Thiamane, a 35-year-old local who works in the tourism industry.
"Compared to everything that was announced, I don't think we have seen much yet."
Akon -- a Senegalese-American singer-songwriter best known for his R&B hits such as "Smack That" -- launched his eponymous city in September 2020, to great fanfare and international media attention.
The city's otherworldly design is partly inspired by Wakanda, he said at the time, referring to the fictional African city of the "Black Panther" Marvel movie and comic series.
Akon City's planners also say it will be a "beacon of innovation and human development" that will boost industry in the West African state of Senegal.
A stadium, casino, luxury high-rise apartment complexes, and an education district that will "accommodate the most prestigious universities in the world" are also part of the plans.
- Sleepy hamlet -
The glittering vision is a far cry from the existing sleepy hamlet of Mbodiene, about 100 kilometres (60 miles) south of the capital, where pigs roll in the muck and donkeys amble along the road.
Locals interviewed by AFP said they knew little about Akon City, nor why construction had been delayed.
The ceremonial stone was laid on August 31 2020 and construction was scheduled to begin early this year.
A hospital, school, shopping mall, homes, police station, waste centre and solar power plant are supposed to be completed in 2023 -- and the whole city by 2030.
Speaking on an untarmacked road as horned cattle grazed behind him, 25-year-old student Ahmeth Deme wondered whether the project had been cancelled.
Badara Diakhate, the deputy mayor of the local commune, said he was unaware of the exact reason for the delay but that "people want things to get going."
He welcomed investment in the village and said that delays were common, especially given the pandemic.
- Disillusioned -
At $6 billion, the planned cost of Akon City is huge -- it is not much smaller than Senegal's overall 2020 budget of about $7.5 billion.
The pomp and size the project elicited scepticism in Senegal at first, where developers and politicians often tout the merits of pet building works.
About 40 percent of Senegal's 16 million people live below the poverty line, according to a World Bank metric.
A lack of clarity regarding Akon City's funding also raised questions.
Paul Martin, from the US-based firm KE International which won the Akon City construction contract, said that Kenyan entrepreneur Julius Mwale is the lead investor.
He added that he could not disclose information on other investors for confidentiality reasons, but said more than $4 billion in funding had been raised.
Construction of Akon City will start in October, Martin said, after a similar Mwale-funded city is completed in Kenya.
"The first 12 months incorporated planning, approvals, procurement and recruitment of sub-contractors," Martin said by email, referring to Akon City.
But tourism worker Thiamane said that he'd grown disillusioned, pointing to earlier failed development projects in Mbodiene.
"What is shared in the village at the moment is the beginning of disappointment," he said.
Akon's team, and the Senegalese state tourism agency SAPCO, which is managing the project on the government's behalf, did not respond to repeated solicitations by AFP for comment.
- 'Still have hope' -
Most Mbodiene residents cited the potential benefits of Akon City and said it could bring jobs.
"This is big for us," said Philomene Bamimba, who heads a local women's association.
David Seck Sene, president of the village youth association, admitted there was confusion around the delays but said: "I still have hope. I don't see how a project like this could stop tomorrow."
He, like other residents, is pushing for education and training so that villagers are not sidelined to labourers' roles in Akon City.
KE International's Paul Martin said the aim is to empower locals to fill high-skilled jobs, adding that training would start when construction does.
No one in Mbodiene interviewed by AFP was aware of these plans, however.
eml/pvh-gd/ri
'Never seen that': Australian Open rocked by 'heartbreaking' scenes


Welcome to a great, new year! Your bright and beautiful children are already deep into multiplication, factoring and recognizing prime numbers and squares in math, and sequencing, decoding idioms, subjects and predicates in language arts. A spelling list has been set and we've even had our first walk in the rain. Core groups at Ripley Elementary have 90 -100 minutes per day language arts and math.
Enrichment groups at other schools will meet twice weekly for forty-five minutes in a combination of pull-out and push in services - sometimes students will come out of class to see me, and sometimes, I may go into their classes with Science Olympiad or other activities.
All students are expected to complete monthly, on level or above book reports, due the last class of each month, to support class themes. See the HOMEWORK Tab for our first assignment - "You've Got to Read This - a poster advertising the best book of the Summer. All students are also asked to take part in at least one creative writing or essay contest per month, from a selection of opportunities. Another competition opportunity, the World Math and Science online Games, will be in October.
Across the county, schools are preparing to host Jack Hanna, to study animals and habitat. As part of our character education and Wild, Wonderful themes, we will be forming Green Teams to study and address environmental concerns relevant to our area. By August 31st, we should know if we have been awarded a $1,000 grant for materials.
So we are off and running, already wowed by the possibilities of this great, new year. Please feel free to contact me with questions and concerns, particularly to let me know if your child is distressed or overwhelmed by an assignment. My aim is to stretch learners painlessly.
Thank you for sharing these astonishing children.


You've heard about sending a canary into a coal mine to see if it's safe for people to enter? Well, it looks like investors have sent a Caterpillar into the dark, scary coal mine that is the global economy. And it's still breathing.
Caterpillar is the top performing stock in the Dow this year, up 16%.
That is potentially a good sign for the rest of the market since Caterpillar (CAT) is extremely cyclical and also has significant exposure to what's going on with oil and other commodities -- not to mention China.
Other construction and mining equipment stocks have rebounded sharply as well.
Shares of Japanese construction equipment giant Komatsu (KMTUY) have gained nearly 15% year-to-date. Joy Global (JOY) is up more than 40% this year -- and has doubled from the lows it hit in January.
So will Caterpillar satisfy the bulls when it reports its first quarter earnings on April 22?
Wall Street is cautiously optimistic. The first quarter numbers are likely to be lousy. Analysts are forecasting a 26% decline in sales and more than 60% plunge in profits. But the worst may soon be over.
Analysts have actually raised their earnings forecasts for the second quarter and full year over the past few months.
Scott Colyer, CEO of Advisors Asset Managment Inc., said investors had gotten too bearish about China's economic outlook. That hurt stocks like Caterpillar and other big multinational industrials.
Colyer thinks investors underestimated China's willingness to do whatever it takes (paging Mario Draghi!) from an economic hard landing.
"China is doing what it should be doing to spur economic growth with rate cuts and stimulus. It just takes time to turn it around," Colyer said.
He added that the recent rebound in commodities should be good news for Caterpillar and other companies with ties to energy and basic materials.
"Commodities had been in the dog house for awhile," Colyer said. "But this looks like the last part of an ugly bear market for commodities. Every dog has its day."
It looks like every CAT has its day too.