text:
Q: Android room Database deletion not working I am working with a Room DB for recycler view. And there is a delete icon on each row to delete that item. I want to delete same item from the Room db also. I have done below code but it's only reflecting in the list and after refresh that again load the deleted data from db.
Adapter class with delete listener:
btn_delete.setOnClickListener(new View.OnClickListener() {
    @Override
    public void onClick(View v) {
        deletePosition=getAdapterPosition();
        DeleteTask deleteTask = new DeleteTask();
        deleteTask.execute();
        alertDialog.dismiss();
    }
});

public class DeleteTask extends AsyncTask<Void, Void, Void> {
    @Override
    protected Void doInBackground(Void... integers) {
        DatabaseClient.getInstance(activity)
        .getAppDatabase()
        .DraftDataDao()
        .deleteById(deletePosition);
        return null;
    }

    @Override
    protected void onPostExecute(Void aVoid) {
        super.onPostExecute(aVoid);
        inProgressModelList.remove(deletePosition);
        notifyItemRemoved(deletePosition);
        notifyItemRangeChanged(deletePosition, inProgressModelList.size());
        globalData.setInprogress_count(inProgressModelList.size());
    }
}

Database Dao
@Query("DELETE FROM MovieData WHERE Id = :id")
public abstract void deleteById(int id);

Please help me on this.

A: Position in the list will not equate to the correct id.
Position is 0 based, the first id assigned will be 1 unless you are specifically setting the first id assigned to 0 (unlikely) BUT progressively the correlation between position and id will get more and more convoluted.
If you click on the first item in the list, there will be nothing deleted if there is no row with an id set to 0.
Other rows will be out by 1 IF no rows have been deleted. If you then click to delete the 2nd item in the list, the position will be 1 and lets say the row with an id of 1 existed and was deleted then now the lowest id is 2. So now clicking the first or second item in the list will not result in a deletion. If the 3rd item is clicked and a deletion is made then now the lowest id is 3 ....
In short you need to get the actual id of the MovieData object that is at the position.

A: Firstly, AsyncTask is now an obsolete class, I would recommend you look towards coroutines or rxjava.
Secondly, your adapter starts counting elements from 0. And in the database, if you have selected autoincrement of the primary key, report from 1. Perhaps because of this there is a problem

redpajama_set_name: RedPajamaStackExchange


IKRR S19 is a functional raincoat for men.
This green camo coat features a detachable hood, roomy patch pockets at front and dark army green metallic snap buttons at front placket and pockets. There's also an inside drawsting to adjust the waist and hook loop tape to protect your face from heavy rain and strong wind.
The welded seams guarantee the water resistance function and teh neat fashion. Dark army green metallic snap buttons at front placket and pockets matches to the PU fabric and present a manly appearance.


text:
Fed Up Tesla Owner Blows Up His Model S
Dec. 20, 2021 7:45 PM ET by Michael Butler Video / 46 Comments
With an Elon Musk doll inside.
It is hard to believe that customers around the world are still experiencing quality issues with their Tesla vehicles after years of complaining and promises from Tesla to resolve such issues. In September, the J.D. Power Initial Quality Study (IQS) indicated that Tesla was well below average in this sphere, and a few weeks ago we covered a story comparing a 2021 Model 3 to a 2022 car, and the difference in build quality was shocking (the newer car was worse off). Tesla is also facing serious recalls across the globe, and in a further hit to its brand image, a man from Finland has just blown up his Model S with a doll of Elon Musk sitting inside.
Pommijätkät/YouTube
Tesla owner Tuomas Katainen decided to record himself blowing up his Tesla Model S, and while the internet always loves an entertaining explosion, Katainen's goal was to protest his disgust with the quality of his car and the poor service provided by Tesla. According to the video, Katainen started experiencing a lot of issues with the car, and in the end, he was forced to tow the car to his nearest Tesla dealership, with the car flashing a number of error codes on the dashboard. After waiting a month for feedback, Tesla told Katainen that it would have to replace the battery pack at a cost of €20,000 ($22,480). Katainen's eight-year-old Model S was long since out of warranty, which means the cost would fall squarely on him.
Instead of going ahead with the repairs, Katainen decided to take the only other logical route: to blow the Tesla up with 60 pounds of dynamite. As a token of disgust towards Tesla CEO Elon Musk, a doll of his likeness was placed in the car before the fireworks got underway. The explosion is highly effective, and very little of the Tesla Model S remains. Tesla repair costs remain stubbornly high, and with the brand's closed ecosystem, it is difficult for third-party companies to deliver more cost-effective repairs. Until these issues are remedies, we can see many more Musk dolls being blown to smithereens.
Show Comments (46)
Tags: #Tesla News #Electric Vehicles #Video

redpajama_set_name: RedPajamaCommonCrawl


text:
Bruno Buendia and the Memory of the 50's Generation
by Alexandra Pereira
Print - Comment - Send to a Friend - More from this Author
Peru's 1950's generation was a generation of ácratas, cursed vanguardists, a generation which actually "generated" something significant, more than a group of individuals with about the same age and mere reserved ambitions. Many members of this highly innovative generation of artists were coming from the provinces of the country, and they were somehow excluded in the boom-populated Lima because that's where they really got excluded (suburbs, fringes of the big city...), even more than in the provinces. Some of them travelled abroad for a while.
At the same time they refused – very reasonably, for someone who was born in the same cradle as some of the most amazing, complex and humanly developed ancient civilizations – to see Europe as the spiritual center of the world, they would denounce the political, religious and militarist abuse of power and human rights in their own country. Most of these artists ended up dead at some point, either killed, addicted (to alcohol, drugs) or suicidal, due to social and political pressures.
In spite of their original and critical works, this important intellectual movement which arose in the 50's is not enough researched nor praised yet, as modern day Peru lives difficult times and academic-related, Spanish-inheritance fundamentalist scholars connected with the power and corruption structures dominate the country's scenery.
In this scenery, Bruno Buendía, a 47-year old Peruvian writer, the son of another writer/painter/actor who was an important figure in the 1950's (Felipe Buendía), struggles in his own lonely fight. He tries to surpass all sorts of adversities in order to buy his father house in Lima and keep alive the memory of a whole generation of vanguardist artists (including his father) who were continuously cursed and put apart by consecutive Peruvian governments and the official establishment.
In Peru, drug businesses rule most private and non-private companies, unemployment level is great, corruption levels are huge, illiteracy is very high. There is famine right now (since the race for dollars made its invasion, due to influence of neighbour Chávez, and food got incredibly expensive for the common people). Bruno Buendía lives "well" compared with most Peruvians but can only eat two small "meals" a day, breakfast and lunch (which is not a good deal, because he has epilepsy, thus should eat very well always), and the money he gets with his books (which he distributes himself, around the country, and explore the richness of the ancient mythology, cross it with psychology, quechua, cryptology and a deep knowledge of contemporary literature tendencies) is never enough, nowadays, for daily expenses, the payment of taxes and to buy the house or keep memories alive. He has to buy medication and the food and basics are too expensive, although he's forced to work in other jobs as well… when they happen to exist.
Internet or mobile phone prices are not something reachable for a common Peruvian person. A refrigerator or a gas bottle for the cooker are luxuries in Peru. A lunch or dinner, in Peru, costs 1 euro. Half the population is under the poverty line. Epilepsy medication costs 30 to 40 euros in Peru… Most Peruvian families have to live with 63 euros per month. 90% of tourists go to Peru to consume or buy drugs, any money they leave they do it in Macchu Picchu or Lima and somehow does not reach common people. A lunch or dinner in Peru costs 1 euro. Save a beer per day and help to feed many people.
If you want to help Bruno Buendía in his endeavour to fairly keep alive the memory of an important and neglected part of Peruvian art and culture, please contact:
Bruno Buendía Sialer
Jiron Angaraes 855 - 204 Lima 1
Or send an e-mail to: trilce77@yahoo.com
Peru Poverty Ovi_magazine Ovi-lehti
Get it off your chest
Emanuel Paparella 2007-10-28 17:59:40
Some musings on the above vital issue of distributive justice: John Paul said on World Food Day in October 2003 that to be an authentic Christian one must be a champion of social justice and human rights, and challenge the "war of the powerful against the weak" within an economic system that leaves so many starving while others live in opulence. He pointedly asked: "How can we keep silent when confronted by the enduring drama of hunger and extreme poverty, in an age where humanity, more than ever, has the capacity for a just sharing of resources?"
One wonders if this is a voice shouting in the wasteland of contemporary Western culture? Be that as it may, the social justice issues will not go away, if for no other reason than within a few decades 80 per cent of Catholics will live in developing countries. Global poverty and hunger are undoubtedly the most immediate issues, followed closely by the new arms race and the threatening collapse of environmental sustainability. I am afraid that if we refuse to give some attention to the voice of the wise among us, eventually we within Western civilization, all our push button technocratic tools will not save us and we will reap the inevitable whirlwind.
Alexandra Pereira 2007-10-28 19:58:45
I think catholics and non-catholics, they all can make a difference. I'm an atheist myself.
...And I should remember how harmful the corrupt power structures of catholic church have been in Peru, for example.
That is: at the same time as the Pope would say that, there were entire generations of boys harassed or raped by catholic priests in high schools or colleges in Peru (and not only there...), the more fragile and poorer boys on top. Just to give an example (won't mention drug traffic nor political relations nor anything).
When the Church keeps silent on issues of distributive social jusice she is accused of siding with the rich and powerful and failing in her moral duty. When she speak out against injustice she is told to shut up, because only the sinless can condemn injustice and uphold the law. Which way do we want it? Chesterton made a profound observation on this phenomenon: when an individual or an institution gets it from the right and from the left, form the top and from the bottom, it may well mean that it is in the right place; "in medio stat virtus" said the ancient Greeks and Romans and harmony and balance and an appreciation of the ambiguous in life is necessary for an unbiased fair view. Indeed sometimes irony and even satire is needed but it ought not to be confused with shallow caricatures and slander which usually leads to a superficial view of institutions, especially those which have been around for millenia. I dare say that the atheist Santayana who was a satirist of many institutions including that of history making would agree.
P.S. Bishop Fulton Sheen used to say that if we were to wait for the utopia of the perfect sinless Church to consider entering it, most of us would not be worthy to enter it. It is indeed a pilgrim Church of sinners not of Supermen and it is misguided to confuse the cross with the sword as I have attempted to suggest in my last contribution which also was mostly ignored. Actually the film The Mission speaks about that even more eloquently that I could ever do. I highly reccomend it.
Jack 2007-10-28 22:38:25
Whether Christian or not, the most helpless and hungry do not care. Only that you care. I fully endorse Feed The Children which distributes food to the most needy of children, nearest of all food agencies that I know of, with well over 90% used to go toward food. Mr. Jones is a feeder of the hungry first, a Christian second.
...My point was just that it shouldn't be converted into just a catholic duty, as it's everyone responsibility, and non-catholics shouldn´t feel less responsible. The Pope did good in saying that. Personally, I prefer other examples as Geldof, the Dalai Lama or even Madonna - but that's just a matter of personal taste.
In De Chardin's The Divine Milieu one finds as clear a statement as one can that to love and build the earth, and work for justice is not a duty of Catholics but of Man, even unbelieving Man. I think the Pope would be in full agreement with that


So when Joe and I signed the lease on the ranch in October...a mad dash was made to get the house remodeled and livable. I blogged about the shape it was in which was not good. So with a ton of help we whipped through it and did as much work as we could as fast as we could. So once we moved in, my living room and bedroom just wasn't clicking with me. Yes me....Joe would have lived in the smoke filled walls probably. I am usually pretty good at paint colors but unfortunately I think I missed on the overall color. It ended up being more yellowy than desired. So back to the bedroom. I decided to mix my leftover paint (yes add paint mixer to my list) Got a color I loved so went with it....aww let me just tell you that oh so Yellowy color is the problem. Our bedroom is small along with our house so designing and furniture is quite tough. Our bedroom is probably 11x12 so tiny. Joe and I finally got our first real big bed. Seriously we laughed going to bed last night...we are actually grown ups now. I felt like we graduated from the twin bed. So going on 6 years of marriage its our little present....that and no more sore backs :) I am still waiting on my dresser which comes next week, and final touches like artwork etc....that will come. I really wanted a grown up bedroom when you walked in you just wanted to jump in bed and lay down, a cozy place to relax...yes even with two toddlers. So mission almost accomplished, very happy with the results so far. So more finishing touches, and a grown up bedroom to come!!


text:
Broadcom deal to buy Symantec is back on
By Sead Fadilpašić 2019-08-08T11:00:08Z
Acquisition could be public very soon.
(Image credit: Broadcom)
Takeover negotiations between Broadcom and Symantec could be back on.
According to Reuters, which cited"people familiar with the matter", negotiations are almost over and the deal could be reached as soon as today. We will know for certain once Symantec announces its earnings later today. Both companies are currently tight-lipped on the matter, while the Wall Street Journal claims the deal could be worth as much as $10 billion.
The news made Symantec's stock rise 14 per cent in extended trading. Broadcom didn't do as good, with shares falling 1 per cent.
Last month, Symantec decided not to pursue the acquisition deal with Broadcom any further, as the two companies couldn't see eye to eye regarding the price. At the time, Broadcom was interested in buying the American security company with an offer of $28.25 per share in cash, to ink the deal.
The media were reporting that Symantec was looking for "more than $28 per share" at the time.
The cybersecurity company is allegedly "struggling with sever competition from nimbler rivals", as Reuters puts it. It has also seen a couple of its highest executives leaving this year, as well as an accounting irregularity investigation by US authorities.


This may prove to be a difficult book to review, given my personal involvement in the Vietnam War, but here goes.
I have long been in the camp of the revisionists and this book does an excellent job of explaining the rationale behind this view.
The book begins with an examination of the central characters leading up to 1954 and ends in the summer of 1965 when President Lyndon Johnson made the decision to commit major American forces to the war. The preface itself does a very fine job of summarizing the content of the book and its major conclusions…the details are in the balance of the 418 or so pages.
1954 – The French surrender at Dien Bien Phu and later sign a peace agreement with the North. The country is partitioned.
It is often said that Eisenhower was opposed to any involvement by the US into Vietnam, that he was content to let the French fall in Vietnam and that he thought the intervention in Southeast Asia was a bad idea. I've been a student of Dwight Eisenhower for a very long time and have known that these statements were baloney….the book does a fair job of relating the facts from the record.
Lets start with the French…when the French were up to their neck in Dien Bien Phu, the US had bombers on the line, ready to drop atomic weapons on North Vietnam and China. Ike had opposed the use of nuclear weapons against the civilians in Japan…only because the targets were civilian. He thought the targets were poorly chosen and should have been military targets. In the same vein, he was prepared to come to the aid of the French…..but there was a condition….Ike was strenuously opposed to the continuation of French Colonialism in Southeast Asia and made that clear. He was convinced that unless the French agreed to grant freedom to their colonies, they and their empire were doomed as was any effort to prop them up. So, he conditioned his support on the demand that the French agree to let the South Vietnamese be free of colonialism. Well, the French refused, they lost the war and they eventually had to give up their empire in Southeast Asia. As for those bombers – I have a personal friend who was there.
All of this was known to the Soviets and Chinese. The Chinese had direct experience dealing with Eisenhower during the Korean War. When Ike became president, he made it clear that under his Presidency, there would be no safe havens for our enemies and that unless there was immediate and positive movement toward a peaceful settlement in Korea, he was prepared to use nuclear weapons to end the stalemate and deny the enemy his sanctuaries in China……the Chinese and North Koreans came to the table quickly and the war ended. You did not mess with the American General named Eisenhower. The military leaders of the Soviets, on the other hand, had worked directly with Eisenhower during the Second Work War and many of them had grown to have a serious respect for the General and his abilities. They knew some things from first hand experience: Eisenhower meant what he said, had no patience with fools and made no threat he was not ready to carry thru. He was an excellent poker player but with a winning hand, he would go the limit.
All of this forms a backdrop to the changes that took place when Kennedy took over. In fairness to John Kennedy, following Eisenhower was a tough act. Ike had credibility in military matters like no American President of this century. Kennedy was an unknown who very quickly made a couple mistakes that brought his strength of will into question. To begin with, he wimped out during the botched invasion of Cuba, the "Bay of Pigs". It was clear, very soon, that he had made promises that he backed out on and that soldiers died as a consequence. Then he ventured into a "summit" meeting with Nikita Khrushchev in Vienna. He was totally outclassed. As the author states, ""With his strength of personality and his conversational skills, Kennedy intended to sway Khrushchev in the same way he had swayed so many American politicians and campaign contributors, while at the same time showing Khrushchev that he could not be pushed around….The meeting, however, did not at all unfold as Kennedy had desired. It would be Khrushchev who would manipulate his adversary. Kennedy was right about one thing, that from the start Khrushchev considered him weak and susceptible to bullying. After Kennedy's debacle at the bay of Pigs, two Russian historians revealed in 1996, Khrushchev had scoffed at Kennedy's weakness, chuckling that Eisenhower would not have allowed such an enterprise to fail.
As an aside – I've had something of a soft spot in my heart for Nikita Khrushchev for a long time. Well, since reading his autobiography which he managed to write and smuggle out of Russia after he was deposed. Remember that he was the first Russian leader ever allowed to live after falling from grace. His courage in dealing with Stalinism and shutting down the Gulags was exceptional. He was a rough and plain man but I admired his courage. I read both volumns of his memoirs and still have the copies.
The events emboldened the Soviets and Chinese to press forward with the armed actions in South Vietnam and would eventually lead to the Cuban Missile Crisis and the closest we ever came to nuclear war. The biggest mistake that Kennedy made was to appoint Henry Cabot Lodge as ambassador to Vietnam, a decision that those within the Kennedy administration have admitted was made based solely on purely political considerations. Kennedy was haunted by the fear of "losing Vietnam" in the same way that Truman had been been condemned for "losing China". Lodge was a somewhat liberal Republican who had been Richard Nixon's running mate in the 1960 election. Kennedy reasoned that if he put Lodge in Vietnam as ambassador and things went badly, he would have some cover in the events with Lodge there. It also kept Lodge from causing too much trouble and voicing too much criticism…or so the reasoning went. Kennedy had suffered thru the Bay of Pigs and the disastrous summit in Vienna and he knew that he could not afford any more problems with foreign policy, especially as the Republicans and Eisenhower were getting pretty nervous over his performance.
One additional cause for nervousness was Kennedy's handling of the Communist involvement in Laos. Eisenhower had made it clear that he thought Laos was critical to the success of the South Vietnamese. In 1960, the South Vietnamese had been successful in destroying the first "Ho Chi Minh Trail", the path thru which the North sent its supplies and soldiers into the South. This first trail was located entirely within South Vietnam. The response of the North was to shift the trail westward, into Laos. As the author states: "When the North Vietnamese failed to withdraw their forces in 1962 as stipulated in the agreement (agreed to between Kennedy and Khrushchev in Vienna), Kennedy refrained from sending American forces into Laos to stop the continuing infiltration. It was a disasterous concession to the enemy, a concession that would haunt South Vietnam and the United States for the remaining fourteen years of the war." This highlights again the differences in the quality of leadership and decision making between Eisenhower and Kennedy….Ike had threatened China with atomic weapons over the sanctuaries in China during the Korean war…..and they knew he meant it. They also knew that Kennedy did not have the….whatever….to deal effectively with Laos.
Lodge, however, became something of a loose cannon. In particular, he took the position that the Vietnamese, and Diem, needed to move their country sharply toward democracy in order to be successful. The news media at the time was filled with complaints by Buddhist monks that they were being discriminated against by the Catholic Diem and that there was not enough freedom in Vietnam. The American newsmen on the scene also bought into this idea. Diem, however, did not accept the idea that he could move his country quickly from a rural peasant society to a working democracy. He also knew something that the others refused to accept and which has been proven accurate – the Buddhists were allied with and funded by the Communists and sought his downfall. Between Lodge and the personnel he brought into the country and the news media, a strong steady drumbeat of criticism flowed against Diem. Lodge had political ambitions and enjoyed the media attention and actively solicited their advise. Advise that is, from civilians with no foreign policy or strategic background or experience. In time, Lodge and his media allies began to plot to get Diem removed from power with the aid of the CIA. Unfortunately, they never bothered to figure out who might take over in his place and what a change in leadership might bring. Nor did they consider how this would impact the war.
To make matters worse, Lodge deliberately misled the State Department and Kennedy as to his actions and intentions. In a series of moves calculated to confuse and mislead, he managed to get a coup engineered. By the time Kennedy realized what was happening, while there was time to stop the coup, he chose to let it happen. He was afraid of the political fallout of directly opposing Lodge. In fact, he should have fired Lodge for insubordination but he lacked the balls to do so. So, Diem was overthrown and murdered. In his place was a big fat zero….empty space.
Diem had moved Vietnam from a floundering nation under serious Communist threat to a nation that was more than holding its own against its enemies. He had built up a strong and dependable military and had the Communists on the run in the vast majority of the country. Is this speculation? Not hardly, the facts are all there to see in the records of the Vietnamese Communist Party which have been made available for study after the normalization of relations with the US. The coup that toppled Diem was seen as the best thing that happened to the Communists in many years…they could hardly believe their good fortune.
Diem was the only man that Ho Chi Minh ever feared.
Shortly after the coup, Kennedy is murdered and Lyndon Johnson becomes president. Johnson was later quoted as stating that the coup was the worst decision ever made.
What followed next set the stage for the rest of the war. South Vietnam had the enemy on the run and was growing stronger by the day until Diem was killed. The aftermath yielded no national leader of any significance, reputation or strength. The core and morale of Diem's military was diminished by the removal of his supporters as coup led to coup and counter-coup and a regular rotation of weak leaders. The military began to unravel and the Communists were able to recover their strength. Events continued to spiral downward for the next 2 years. Finally, the US realized that the nation was about to be lost. When the Tonkin Gulf incident occurred, Johnson had the rationale required to introduce American ground forces to stem the tide.
What was most interesting about the version of events put forth in this book is that it draws very heavily on records from Vietnam that became available only recently. They are not the political records of the time but the military evaluations and reports from the Communist army in the field and the political leaders in Hanoi. They made it quite clear that, had Diem not been removed, that the Chinese and Soviets were poised to pull the plug on their support as they were not willing to continue funding and supporting an effort that was failing. The author concludes that the failure is to be laid at the doorstep of the media who pressured Lodge and the CIA to engineer the coup and on John Kennedy who allowed it to happen.
Having finished this review, I was left with a distinctive feeling of sadness. It took some conversation with a friend and adviser to get to the bottom of this but it really comes down to a very sad feeling that all of this could have been avoided. The mistakes that were made were made by persons with a lack of courage. Perhaps that is a bit harsh, but at the very least, the decisions made by John Kennedy and later Lyndon Johnson were from a place of weakness. There are some similarities to current events, but I plan on dealing with this in a separate page.


Do you have a first date or just want to refresh your relationships? The ideal decision will be romantic dinner for two in private atmosphere at home. You do not need a special reason or special occasion for such an evening it's just your phantasy. This book will help you in creating your ideal dinner. Nothing should draw away your attention from each other. Simple recipes, no agglomeration of dishes or complicated recipes. There is no pattern for such an evening. Every time it is a unique event in the life of a pair, renovation of feelings, an explosion of emotions.
Just imagine low music, candles, a pair of elegant top-quality appetizers, a glass of wine and a big interest to the partner. In this particular way, the food just heat the imagination, intrigue with flavor and gives pleasure. This book will help you to create the unique collection of dishes, which couldn't leave your partner untouched.


The Scientific Electronic Library Online - SciELO is an electronic library masking a selected assortment of Brazilian scientific journals. The objective of the location is to implement an digital virtual library, providing full entry to a set of serial titles, a collection of issues from particular person serial titles, in addition to to the total text of articles. Add to that, Brazil's biodiversity: legendary in scope, its various ecosystems boast the best collection of plant and animal species found anywhere on earth.
Introduction to Brazilian Law Kluwer Law Worldwide. The largest transaction with involvement of Brazilian companies has been: Cia. Brazil's Dance with the Devil: The World Cup, The Olympics, and the Battle for Democracy Haymarket Books 2014. 17 The executive and legislative are organized independently in all three spheres of presidency , whereas the judiciary is organized solely at the federal and state and Federal District spheres.
Brazil's most famous celebration, Carnaval, storms through the nation's cities and cities with hip-shaking samba and frevo, dazzling costumes and events that last till solar up, but Brazilians hardly restrict their revelry to a Kléber Leite few weeks of the 12 months. Although outlined by law, Brazilian regions are useful primarily for statistical functions, and also to define the distribution of federal funds in development tasks.