text:
Q: Why does glm::mat3 and glm::value_ptr creates a black hole through time and universe and is destroying any possible logic in my mind? I was creating a beautiful graphic engine with the all so famous OpenGL framework but then an unexpected problem came to me (like every problems do).
I had to create a function that modifies a specific value in a glm::mat3. to do so I created a simple function that return me a simple reference to a specific float in a glm::mat3 but nothing seems to work for I don't know which reason.
Here is my function:
float& mat3ValueAt(glm::mat3& m, int l, int c) {
    // l is the line index and c is the column index...
    return glm::value_ptr(m)[3 * l + c];
}

To see if it worked, I had to use a function that was able to display my matrix:
std::ostream& operator<<(std::ostream& stream, glm::mat3 m) {
    for (int i = 0; i < 9; i++) {
        stream << GLS::mat3ValueAt(m, i / 3, i % 3) << ((i + 1) % 3 ? ' ' : '\n');
    }
    return stream;
}

All of this DIDN'T work... but that's ok... it must be my bad... so I reduced my not-working code that seems good to the smallest code in which I could find an anomalie...
And here is what I ended up being totally mad about and it turned me insane:
int main() {
    glm::mat3 m;
    std::cout << "display uninitialised value..." << std::endl;
    std::cout << *(glm::value_ptr(m) + 5) << std::endl; // should display an uninitialised value
    *(glm::value_ptr(m) + 5) = 42;
    std::cout << "display the initialised value" << std::endl;
    std::cout << *(glm::value_ptr(m) + 5) << std::endl; // should display 42
}

and the result of this small code is...
display uninitialised value...
42
display the initialised value
42

So the fact that my two previous functions aren't working is ok, maybe I just don't know how value_ptr works... but I'm pretty sure of one thing...
A value CAN'T have the value that we're gonna assign it BEFORE it was assigned to it!
And it doesn't matter the value I put instead of 42, it will always be assign before I assign it!
How is this possible?

A: This:

glm::mat3 m;

Creates an uninitialized object; the contents of this object have indeterminate values. Any attempt to read the value of an object with indeterminate values leads to undefined behavior.
Because of that, the compiler is free to re-order your code to look like this:
int main() {
    glm::mat3 m;
    *(glm::value_ptr(m) + 5) = 42;
    std::cout << "display uninitialised value..." << std::endl;
    std::cout << *(glm::value_ptr(m) + 5) << std::endl; // should display an uninitialised value
    std::cout << "display the initialised value" << std::endl;
    std::cout << *(glm::value_ptr(m) + 5) << std::endl; // should display 42
}

This is perfectly valid because if you tried to read from the value before initializing it, you're in undefined behavior land, and having that value already be initialized is no more correct than any other undefined behavior.

redpajama_set_name: RedPajamaStackExchange


Warren professor of American history James T. Kloppenberg, a specialist in the intellectual history of the United States and Europe and now chair of the history department, observed the 2008 presidential election from afar: he was teaching at the University of Cambridge. As he lectured on the U.S. political tradition and studied Barack Obama's writings, he began to see three strong, but unexamined, themes. The first is Obama's sophisticated understanding of America's history and its continuing democratic experiment. The second is the idea of pragmatism--America's principal contribution to Western philosophy--which was first elaborated by William James and John Dewey, themselves advocates of deliberative democracy. The third is the shaping force on Obama's writings of the intellectual currents that swept through academia during his years as a student and professor.
Excerpted from James Kloppenberg's new book, Reading Obama, to be published this month by Princeton University Press. Copyright © 2010 Princeton University Press. Reprinted by permission.
Barack Obama is a mystery. To critics on the left he seems a tragic failure, a man with so much potential who has not fulfilled the promise of change that partisans predicted for his presidency. To the right he is a frightening success, a man who has transformed the federal government and ruined the economy, a man whose presidency threatens the foundations of the American social order. Obama antagonizes the right for some of the same reasons he fails to satisfy the left. He stands for principles that have attracted American progressives for a century: individual autonomy and greater equality, the gradual expansion of the principle of one person, one vote, from the political to the social and economic spheres. But other features of Obama's sensibility distinguish him from many politically engaged Americans, progressives as well as conservatives.
Obama is drawn toward the ideas of anti-foundationalism, historicism, and philosophical pragmatism. As an anti-foundationalist, he questions the existence of universal truths. As a historicist, he doubts that any ideas transcend the particularity of time and culture. Finally, as a philosophical pragmatist he insists that all propositions, positions, and policies must be subjected to continuing critical scrutiny. Whereas many activists on both the left and the right proclaim their incommensurable principles with the fervor of true believers, Obama sees things differently. He believes that anti-foundationalism, historicism, and philosophical pragmatism are consistent with the principles of civic republicanism and deliberative democracy on which America was built and for which it should stand. In his speech marking the end of U.S. military engagement in Iraq, on August 31, 2010, Obama declared, "The greatness of our democracy is grounded in our ability to move beyond our differences, and to learn from our experience as we confront the many challenges ahead." That single sentence encapsulates Obama's commitments to deliberative democracy and pragmatism, the signature features of the approach to American history and politics he adopts in his writings and his speeches. Where did it come from?
Obama was educated in two of America's leading colleges, Occidental and Columbia. He earned his law degree at Harvard Law School, then taught law for more than a decade at another top-flight institution, the University of Chicago Law School. In his books Obama never explicitly addresses his education or his teaching, but his writing clearly reflects his experience as a student and as a professor in turbulent times. His books manifest his serious engagement with the life of the mind. Obama's worldview emerged not only from his family, his friends, and his colleagues in the sharp-elbowed worlds of community organizing and electoral politics, decisive as those surely were. His sensibility was also shaped by the debates that rocked the campuses where he studied and taught, debates about ideas as well as politics. Much as he might need to mask it on the campaign trail, where he demonstrates his impressive skill as a politician, his books make clear that Barack Obama is also very much an intellectual.
Of Obama's two principal books, many people prefer Dreams from My Father, a meditation on his personal identity and the problems of race and cultural diversity in America. To understand Obama's ideas about American culture and politics, however, his personal story must be placed in the framework provided by The Audacity of Hope, a book in which one can identify the echoes of earlier and more recent voices in the traditions of American political thought. Particularly important are his discussions of the Constitution, antebellum American democracy, Lincoln and the Civil War, and the reform movements of the Progressive, New Deal, and civil rights eras. From his well-informed and sophisticated analysis of those issues emerges a particular conception of democracy.
Perhaps not surprisingly for someone who studied and taught constitutional law, Obama writes incisively about the United States Constitution. Near the end of Dreams from My Father, he describes the law as the record of "a long-running conversation, a nation arguing with its conscience." In The Audacity of Hope Obama's argument is less lyrical but even more provocative. Against those conservatives who invoked the idea of the founders' so-called original intent, a set of determinate meanings that are said to limit what legislatures and judges can legitimately do, Obama points out--accurately--that the Constitution resulted from a series of compromises made necessary by the depth of disagreement at the Constitutional Convention and during the process of ratification. Moreover, Obama correctly observes that the decision to leave the document open to amendment testified to the framers' realization that the nation's Constitution would have to change with American culture, albeit slowly, in order to survive.
The failure to provide a mechanism for such alterations, the framers understood, had doomed earlier republics to failure--as we can see now that it doomed later republics, such as the first several republics proclaimed in France--when they proved incapable of adapting to changed circumstances. Obama quotes a crucial passage from James Madison concerning the value and the necessity of open-mindedness in democracy. Reflecting on the process of reaching provisional agreement at the Constitutional Convention, Madison wrote, "no man felt himself obliged to retain his opinions any longer than he was satisfied of their propriety and truth." Everyone remained "open to the force of argument." That passage expresses Obama's understanding of democracy as deliberation.
Madison himself, although often credited with having framed the Constitution, did not get the Constitution he wanted. His own position on crucial issues such as the Senate and the authority of the executive changed not only during the convention itself but also during the debates over ratification, particularly when he became convinced by his friend Thomas Jefferson that the Anti-Federalists were right about the strategic necessity, and perhaps even the desirability, of a Bill of Rights. The Audacity of Hope contains no footnotes, and Obama rarely mentions the scholars whose work has shaped his ideas. It seems clear from his discussion of Madison and the Constitution, however, that he rejects claims about original intent and also sees beyond the 1950s-era obsession with Madison's so-called realist pluralism: the view that Madison wisely abandoned aspirations to political ideals and settled instead for an institutional structure that would merely facilitate and accommodate the clash of competing interests. That interpretation served to justify the political moderation of the post–World War II era. Although that view still appeals to many scholars, including those on the right who praise Madison's prudence and those on the left who accuse him of selling out democratic ideals, it has become increasingly difficult to sustain. Recent historians of Madison and the Constitution, such as Jack Rakove and Lance Banning, legal scholars such as Harvard's Frank Michelman and Laurence Tribe, Yale's Akhil Amar and Obama's longtime Chicago colleague Cass Sunstein, and Supreme Court Justices such as Stephen Breyer, have all demonstrated why the ideal and the practice of democratic deliberation proved at least as important for the acceptance and durability of the Constitution as did the checks and balances built into the new nation's institutional architecture.
The older, conspiratorial view of the Constitution as the product of scheming elites out to dupe the unsuspecting and virtuous masses, an interpretation that originated with Charles Beard a century ago, still makes compelling drama; it persists among many historians committed to the idea that the deck was stacked against "the people" by "the interests" from the beginning. But the record of the debates in the Constitutional Convention and afterwards is much more complex. Neither the neo-Beardian conspiracy theory nor the sepia-tinted portraits of the founders trotted out by conservatives eager to preserve the status quo captures the dynamic process of writing and ratifying the Constitution.
Madison himself went into the Constitutional Convention self-consciously committed to constructing a democracy, and he came away from the ratification process convinced that the result, despite his misgivings about it, was the best that could be attained through a democratic process. In his first speech to the Constitutional Convention, Madison argued that a federal government, because it would "expand the sphere" of representatives' horizons beyond their local preoccupations to the needs of the entire nation, "was the only defense against the inconveniences of democracy consistent with the democratic form of government." Notice Madison's use of the terms "democracy" and "democratic" in that sentence. The familiar notion that Madison envisioned a republic rather than a democracy is widespread, but it is false. He did envision a representative democracy rather than a direct democracy, and the elaborate checks and balances of the federal framework appealed to him in part for that reason. But his preference for representative democracy hardly makes him an antidemocrat. Other contemporaries who shared that preference included Jefferson and Thomas Paine, two thinkers often contrasted to Madison but with whom he had much more in common from the 1770s through the 1820s than is usually recognized.
Madison aligned himself with those who opposed the idea that delegates, either to the Constitutional Convention or later to the United States Congress, should be bound by instructions from their constituents. His position derived from his faith in a particular form of representative democracy, not his distrust of its potential. He believed that the process of deliberation, if it remained open-ended, could produce results different from, and superior to, any of the ideas that representatives brought with them to an assembly. As his own letters after the convention confirm, Madison had experienced in Philadelphia the creative potential of deliberation, a potential short-circuited by demands that representatives must follow precisely the preexisting preferences of those who sent them. It is true that many Anti-Federalists cherished a different conception of democracy from that embraced by Madison, Jefferson, and Paine. Many Anti-Federalists distrusted the idea of delegating authority to those they elected to serve in a distant assembly. But their vision of democracy is as difficult to translate into a national framework as their critics at the time contended, and the preference for a federalist form of government did not necessarily make its champions opponents of ordinary citizens. Some Federalists, notably Alexander Hamilton, did distrust the people and did seek to limit their influence. Madison's commitment to the Constitution, by contrast, sprang from his deep desire to see democracy survive.
In his description of the Constitution and the way it was constructed, Obama shows his familiarity with one of the most important developments in American scholarship since the 1970s, during the years since Gordon Wood and other historians sparked the revival of civic republican ideas and legal scholars such as Michelman and Sunstein brought it to law schools. Not only constitutional lawyers but also political theorists are now rediscovering what Madison, Jefferson, and Paine already knew: representative democracy is not a bastardized or second-best version but instead a distinctive variant of democracy that values persuasion over the rigid, unyielding defense of preferences or interests. Representative democracy is designed to substitute the dynamic process of making reasoned arguments for the simple tallying of votes dictated by constituents' preferences. In Obama's words, not only did the size of the new nation mean that "an Athenian model of democracy was out of the question" and that "the direct democracy of the New England town meeting" was "unmanageable." It was not just practicality that dictated representation.
The process of deliberation, particularly when it brought together people with diverse backgrounds, convictions, and aspirations, made possible a metamorphosis unavailable through any other form of decision making. People who saw the world through very different lenses could help each other see more clearly. Just as Madison defended the value of delegates' willingness to change their minds and yield to the force of the better argument, so Obama explicitly echoes the arguments of Madison--and, strikingly, of Hamilton in Federalist number 70--concerning the importance of encouraging the "jarring of parties" because such differences of opinion could "promote deliberation and circumspection." He points out that scholars now agree that the Constitution was "cobbled together" from heated debates and emerged "not as the result of principle but as the result of power and passion." The ideas of Madison were never identical to those of Hamilton. No unitary meaning or intent can be found. Instead the Constitution shows traces of competing arguments drawn from sources including the Bible, the English common law, Scottish philosophy, civic republican traditions, and the Enlightenment idea of natural rights.
Obama the law professor concedes that such a conception of the founding appeals to him because it encourages us to emphasize the contingency of the original document and to appreciate the contingencies that lie beneath our own invocations of high principle. His constitutionalism fits neatly into the historicist framework that was displacing older verities in the academic communities of Los Angeles, New York, Cambridge, and Chicago during the 1980s and 1990s. Such historicism, he writes, might free us to "assert our own values unencumbered by fidelity to the stodgy traditions of a distant past." In other words, it might tempt us to proclaim that constitutional interpretation is a question of Clifford Geertz's shifting conventions or Thomas Kuhn's shifting paradigms. But Obama admits that such freedom makes him uneasy. He describes it as "the freedom of the relativist, the rule breaker," or "the apostate," and he concedes that "such apostasy leaves me unsatisfied." Facing that conundrum, where can a conscientious scholar of constitutional law such as Obama turn?
He can, and he does, turn to philosophical pragmatism and to American history. What we need, he suggests, is a "shift in metaphors," a willingness to see "our democracy not as a house to be built, but as a conversation to be had." Madison did not give us a "fixed blueprint." Instead he provided a framework that cannot resolve all our differences but offers only "a way by which we argue about our future." The institutional machinery of the Constitution was intended, Obama argues, not to solve our problems once and for all but "to force us into a conversation." The Constitution gave birth to "a 'deliberative democracy' in which all citizens are required to engage in a process of testing their ideas against an external reality, persuading others of their point of view, and building shifting alliances of consent." It would be hard to find in William James or John Dewey a clearer statement of the conceptual and historical connections between philosophical pragmatism and deliberative democracy in the American political tradition.
Balancing the historicism of cutting-edge constitutional scholarship against his lingering desire for something more substantial than quicksand, Obama makes use of the American tradition of philosophical pragmatism: we should debate our differences, and test provisional interpretations of principle, not by measuring proposals against unchanging dogmas but through trial and error, by trying to solve problems creatively and then democratically deliberating, yet again, on the consequences of our experiments. "We hang on to our values, even if they seem at times tarnished and worn," even if we realize that "we have betrayed them more often than we remember." Our democratic values, deliberation and truth testing, constitute the American people as a nation developing over time. Our commitments to freedom and equality are "our inheritance, what makes us who we are as a people." As individuals and as a nation, we are constituted by the values we cherish, the principles we seek to realize, and the democratic process whereby we attempt to reach those goals.
But we must not pretend that the meaning of those shared principles has ever been anything but contested. As the pragmatists James and Dewey insisted repeatedly, and as more recent philosophical pragmatists have confirmed, democratic principles should not be confused with unchanging dogmas. They must remain subject to criticism and revision. In Obama's words, "our values must be tested against fact and experience." Freedom and equality had one set of meanings in the agrarian settlements of the seventeenth century, another set in the eighteenth and nineteenth centuries, and they are destined to have new meanings for every generation. That is the challenge of democracy, and that is the reason why the philosophy of pragmatism is uniquely suited to democratic decision making. When our understandings no longer conform to the facts of lived experience, as has been the case over and over in American history, it is time for critical inquiry and substantive change. Ritual invocations of earlier nostrums, as if such formulas could help solve problems earlier generations could not have imagined, deflect attention from the hard work of democracy.
The need for such hard work derives, at least in part, from the deeply flawed institutional structures put in place by the Constitution. Although subject to amendment, the Constitution nevertheless erected formidable barriers in the way of those who would alter the framework of American governance. Of all the flaws, the most serious was the founders' failure to address the outrageous practice of slavery. In Obama's words, the generation of John Adams, Jefferson, and Madison bequeathed to their successors "a form of government unique in its genius--yet blind to the whip and the chain." A second antidemocratic feature of the "great compromise" between the North and the slave-holding South was the provision for electing two senators from each state. That arrangement has given those chosen to represent small, sparsely populated states--then Rhode Island and Delaware, now Vermont and Wyoming--equal power with the most populous. In 1790 Virginia had 10 times the population of Rhode Island; California now has more than 70 times the population of Wyoming. Madison--himself a Virginian--opposed this feature of the Constitution because of its antidemocratic quality, as does Obama. From the beginning, the Senate has tended to resist change more vigorously than has the more representative House.
The way in which the structure of the Constitution has facilitated some forms of change and blocked others remains as clear as ever. As president,Obama has demonstrated already the depth--and the perils--of his commitment to philosophical pragmatism and deliberative democracy, particularly in his handling of the protracted debate over healthcare. His flexibility and his willingness to compromise infuriated some of his supporters on the left, and the refusal of his intransigent Republican opponents caused many observers to mock the president's repeated appeals to negotiation, bipartisanship, and creative compromise. As savvy pundits left and right pointed out repeatedly, it takes two to compromise, and efforts to negotiate are futile when the other side shows no interest. But Obama's steadfast insistence that he was open to suggestions, that he was willing to meet with his adversaries and consider their ideas, and his repeated invitations to Republicans to propose alternatives served a purpose that few commentators seemed to notice as the debate wore on. He was displaying, over and over, with a patience that outraged his allies and bewildered his foes, an iron fortitude that his critics mistook for weakness. In The Audacity of Hope and in many of his speeches since he wrote that book, Obama has acknowledged that Americans are deeply divided on the issue of healthcare. Even those who agreed that our system does not work disagreed bitterly about how to fix it. Obama pointed out that calls for a single-payer plan, a comprehensive, government-run program patterned on national healthcare systems firmly entrenched elsewhere, diverged too dramatically from the traditions and practices to which Americans are accustomed. Americans happy with their doctors and their insurance plans, he promised repeatedly, should be able to keep them. In The Audacity of Hope he proposed trying out multiple options, notably what he called "insurance pools," taking advantage of the nation's federal structure to conduct a controlled experiment in the states. After evaluating the results, the nation could opt for the most successful solution available.
That proposal, advanced several years before Obama was elected president, suggests one way to frame the outcome of the lengthy negotiations in 2009–2010 that culminated in the passage of healthcare reform legislation. Thanks to Republican Mitt Romney, then governor of Massachusetts, the Commonwealth had been conducting for several years an experiment in state-mandated health insurance, with encouraging results. Obama was careful not to replicate his predecessor Bill Clinton's mistake of declaring too early--and too dogmatically--what must be done to solve the problem. He let the debate proceed, at times it seemed interminably, while his supporters shrieked and his foes gloated. The plan Congress eventually adopted in March 2010--the plan Obama worked tirelessly in the final months to enact--more closely resembles the Massachusetts model than any of the other options under consideration. If that model did not suit Republicans in the House or Senate, not long ago it appealed to one of the most prominent Republican candidates for his party's presidential nomination in 2008.
When paroxysms of anger, even threats of violence, followed the passage of healthcare reform, many Americans expressed surprise. But given the intensity of public disagreement on the issue, that response might have been expected. It also suggested the reasons for, and perhaps even confirmed the wisdom of, Obama's strategy: wait patiently until the deliberative process had run its course and the House and Senate had hammered out their misshapen, unlovely bills. In his State of the Union Address, he pointedly chided Republicans for failing to offer their own ideas and invited their proposals. He later convened a much ballyhooed day-long summit to give Republicans a chance to explain their objections and present alternatives. When those overtures were greeted with even more strident refusals, it became apparent that Obama's sustained efforts to encourage, and to engage in, deliberation as a way to identify a common good had been categorically rejected. At that point he threw himself into the battle.
Like Social Security in 1935 and voting rights, Medicare, and Medicaid in 1965, the healthcare reform measure of 2010 is a product of the sausage factory that we call representative democracy. It will need to be revised as its flaws become clear. It might also be the best bill Obama could have gotten through Congress. As a student of American history, Obama knows that the election of 2008, although historic because it put him in the White House and gave his party a majority in the House and the Senate, was hardly a landslide. The political scientist William Galston, a veteran of Clinton's White House, has pointed out that Obama's own electoral majority of 7 percent was only 1 percent greater than Clinton's in 1992, and Obama was running at the time of the worst economic calamity since the Great Depression. Democrats held 60 seats in the Senate. By contrast, when Franklin D. Roosevelt began his second term, Democrats held 79 seats in the Senate, the Republicans only 16. When Lyndon Johnson pushed the Voting Rights Act through Congress, Democrats held 68 seats in the Senate and a 295–140 majority in the House. Moreover, in the 1930s and 1960s both parties were far less ideologically homogeneous than they are now: more than half the Republicans in the House and more than 40 percent in the Senate voted for Medicare.
People who used to complain about the lack of coherent ideology in American party politics have gotten their wish. More than three-quarters of Americans who identify themselves as Republicans now accept the label conservative. Democrats are less unified: 40 percent identify themselves as liberals, another 40 percent as moderates, and 20 percent as conservatives. Comparing the current political situation with those of the mid-1930s and the mid-1960s makes clear, as does the difficulty Democratic congressional leaders faced in rounding up the votes to pass the final version of the bill, that Democrats were hardly in a position to dictate the terms of debate. As has happened repeatedly in American history, even a measure that incorporated many concessions to its opponents barely squeaked into law. It seems unlikely that Republicans will be able to fulfill their promise of repealing a package almost certain to win adherents as quickly as Social Security and Medicare did. Even so, as Obama noted in The Audacity of Hope, in a democracy "no law is ever final, no battle truly finished," which is why philosophical pragmatism and deliberative democracy go hand in hand. Principled partisans of pragmatism and democracy are committed to debate, experimentation, and the critical reassessment of results.
For that reason no straight lines run from philosophical pragmatism or deliberative democracy to Obama's positions, strategies, or policies--or any others. One of the characteristic features of pragmatism, in fact, has been the incessant disagreements among its adherents. Every major debate in American politics in the last century has seen self-proclaimed heirs of James or Dewey lining up on opposite sides, usually on multiple sides. Getting pragmatism right does not dictate a certain political position, although the connection between philosophical pragmatism and an experimental, democratic approach to politics is hard to deny. But the forms experimentation and democracy should take are not only appropriate subjects for debate. Wrangling over such questions is what a commitment to pragmatism and democracy means. Obama has demonstrated such a commitment himself, and spirited debates about all aspects of his presidency, from its overall thrust to its tactical maneuvers, are not only bound to continue whatever he does, they are fully consistent with the conception of democracy he has outlined and embraced.


text:
Home » Gadgets and Appliances » Love at First Sight
Diary entry
A few months from now...
Love is never planned, they say, it just happens. It's a powerful emotion and just sweeps you off your feet. Anirudh too fell in love for the first time at an unexpected moment. A couple of days back, while he was at a retail store, accompanying his friend, he saw someone peeping at him. As he went closer, Anirudh couldn't take his eyes off her, he hadn't seen anyone as beautiful as her ever before, he was truly mesmerized. He passed a smile and she too blushed back at him. It was love at first sight. The more Anirudh kept looking at her, the more he was finding her irresistible. He couldn't help picking her up from the shelf. And as he held her in his hands, he felt a strange emotion take over him, something that he hadn't felt before. He had fallen in love, for the first time. Asus Zenfone 2 had won his heart, then and there!
(Image Source and Copyrights: Asus India )
Until now Anirudh didn't have a smartphone, he never felt the need to have one, for he thought his old cell phone was doing just as good, in terms of making and receiving calls. Moreover he didn't want to invest a lot of money in buying a smartphone. Well, he hadn't met anyone (any smartphone) good enough to fall in love with, until then, but it has now all changed with the arrival of Asus Zenfone 2 into his life. With each passing day, he is getting to know her better, and so also is gradually being introduced to the features of the smartphone world. Thus he has started loving his phone even more. Now when someone's needs and requirements are understood and fulfilled, how could he not be in love with his smartphone? Thus the fairy tale love-story of Anirudh and his Asus Zenfone 2 continues.
Love is definitely magical and sometimes wins you over just by its overpowering charm but one also needs good reasons to remain in love. This smartphone Asus Zenfone 2 with its rich features, is definitely a perfect partner to remain in love with forever. With its ultra-thin ergonomic arc design, a brushed-metal finish and concentric-circle detailing and an incredibly-thin 3.9 mm thickness, it definitely holds your attention, anyone would be bowled over by its bold and elegant features. It also has a 5.5-inch screen that enables a stunning 403ppi pixel density and 1920 x 1080 Full HD IPS Display, and so it results in a vivid display - bigger, brighter and beautiful. The viewing experience couldn't have been any better.
Powered by 2.3GHz 64-bit Intel Atom Z3580 processor and a 4GB RAM, which also results in 60ms touch responsiveness, ZenFone 2 provides Anirudh with a gaming experience that is almost seven times (7X) faster than any other smartphone. Thus not only does he enjoy a butter smooth web surfing experience but his phone also enables a never-lagging video playback or while multi-tasking.
Zenfone 2 has also got a 13MP PixelMaster rear camera and a 5MP front camera and so also f/2.0-aperture lens that enables Anirudh to capture stunning, high-resolution photos and the best thing of all, with zero shutter lag. Also ZenFone 2's Real Tone flash ensures vivid skin tones and accurate colors everytime a photo is snapped.
Asus Zenfone 2 is also blessed with the exclusive ASUS BoostMaster technology which enables a much faster charging up of the phone's battery. Thus one wouldn't have to wait for long while his phone was put on to charge, like it happens with the other phones. In the Asus Zenfone 2, the battery hardly takes about 39 minutes to get charged to almost 60%!
Another splendid feature of ZenFone 2 is its dual-SIM dual active technology that ensures that Anirudh never misses a call. Even if he were on a call on one SIM and just then, someone was trying to contact Anirudh, he could still take the second call by switching seamlessly! Isn't that exciting?
Thus Anirudh has now found his perfect partner to share all his secrets, his contacts, his bank details, even his written content like blog posts and poems. From playing games to accessing social networks, from smsing to emailing, Anirudh now trusts his Asus Zenfone 2 as his reliable partner. Not only can he capture thousands of photos that look very lively, he can now also record his favourite life moments with his new smartphone. What more would anyone want from a smartphone?
I have written the above post for the "Redefine your smart phone experience!" organised by ASUS India. One may also visit ASUS India website to know more about ASUS ZenFone 2 smartphone.

redpajama_set_name: RedPajamaCommonCrawl


Our sales team provides partnership to customers throughout the Americas, Asia-Pacific, Europe and everywhere in between.
The Apparel Sales Team will collaborate with you to recommend the most appropriate fasteners and attaching machines for your specific application needs on various types of apparel including Fashion Garments, Uniforms, Medical Garments and Other Types of Clothing.
Click here to Request a Quote or click the button below to find a Sales Rep.
The Industrial Sales Team will collaborate with you to recommend the most appropriate fasteners and attaching machines for your specific application and distribution needs for various types of products including Boat Covers, Luggage, Tents and Awnings and Military Equipment.


text:
package com.crackingbits.bummer.adapter;

import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.crackingbits.bummer.R;
import com.crackingbits.bummer.model.Ticket;

import java.util.ArrayList;

/**
 * Created by klimoma on 03.08.2016.
 */
public class FreshdeskAdapter extends ArrayAdapter<Ticket> {

private LayoutInflater inflater;

public FreshdeskAdapter(Context context, ArrayList<Ticket> tickets) {
        super(context, 0);
        addAll(tickets);
        inflater = LayoutInflater.from(context);
}

@Override
public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
                convertView = LayoutInflater.from(getContext()).inflate(R.layout.fresdesk_item, parent, false);

        }
        Ticket ticket = getItem(position);

        TextView nameTextView = (TextView) convertView.findViewById(R.id.nameTextView);
        TextView subjectTextView = (TextView) convertView.findViewById(R.id.subjectTextView);
        TextView idTextView = (TextView) convertView.findViewById(R.id.idTextView);
        LinearLayout baseLinearLayout = (LinearLayout) convertView.findViewById(R.id.baseLinearLayout);

        idTextView.setText("#" + ticket.id);
        nameTextView.setText(ticket.nameFrom);
        subjectTextView.setText(ticket.subject);

        if(ticket.overdue){
                baseLinearLayout.setBackgroundColor(ContextCompat.getColor(getContext(),R.color.red));
        }else {
                baseLinearLayout.setBackgroundColor(ContextCompat.getColor(getContext(),R.color.transparent));
        }

        return convertView;
}
        public void refresh(ArrayList<Ticket> tickets){
                clear();
                addAll(tickets);
                notifyDataSetChanged();
        }

}

redpajama_set_name: RedPajamaGithub