A walking tour of JavaBean

Software components are to software what integrated circuits (ICs) are to electronics: “black boxes” that encapsulate functionality and provide services based on a specification. Software reusability has long been a holy grail of software engineering and a major goal of object-oriented programming. Software components are designed to be reusable, even interchangeable.
JavaBeans are reusable software components for Java that can be manipulated visually in a builder tool.Practically, they are classes written in the Java programming language conforming to a particular convention. They are used to encapsulate many objects into a single object (the bean), so that the bean can be passed around rather than the individual objects.

Java Bean

A Java Bean is a java class that should follow following conventions:

  • It should have a no-arg constructor.
  • It should be Serializable.
  • It should provide methods to set and get the values of the properties, known as getter and setter methods.

Serialization

In computer science, in the context of data storage, serialization is the process of translating data structures or object state into a format that can be stored (for example, in a file or memory buffer) or transmitted (for example, across a network connection link) and reconstructed later (possibly in a different computer environment)

Serializable Objects

To serialize an object means to convert its state to a byte stream so that the byte stream can be reverted back into a copy of the object. A Java object is serializable if its class or any of its superclasses implements either the java.io.Serializable interface or its subinterface, java.io.Externalizable. Deserialization is the process of converting the serialized form of an object back into a copy of the object.

Why use Java Bean?

According to Java white paper, it is a reusable software component. A bean encapsulates many objects into one object, so we can access this object from multiple places. Moreover, it provides the easy maintenance.

JavaBeans Properties

A JavaBean property is a named attribute that can be accessed by the user of the object. The attribute can be of any Java data type, including the classes that you define.

A JavaBean property may be read, write, read only, or write only. JavaBean properties are accessed through two methods in the JavaBean’s implementation class −

S.No. Method & Description
1
getPropertyName()
For example, if property name is firstName, your method name would be getFirstName() to read that property. This method is called accessor.
2
setPropertyName()
For example, if property name is firstName, your method name would be setFirstName() to write that property. This method is called mutator.
A read-only attribute will have only a getPropertyName() method, and a write-only attribute will have only a setPropertyName() method.

JavaBeans Example

Consider a student class with few properties −

package com.SuvenConsultants;

public class StudentsBean implements java.io.Serializable {
private String firstName = null;
private String lastName = null;
private int age = 0;

public StudentsBean() {
}
public String getFirstName(){
return firstName;
}
public String getLastName(){
return lastName;
}
public int getAge(){
return age;
}
public void setFirstName(String firstName){
this.firstName = firstName;
}
public void setLastName(String lastName){
this.lastName = lastName;
}
public void setAge(Integer age){
this.age = age;
}
}
How to Access Java Bean Class

package com.SuvenConsultants;
public class Suven{
public static void main(
String args[]){

StudentsBean sc=new StudentsBean ();//object is created

sc.seFirsttName("Rocky");//setting value to the object
sc.seLasttName("Jagtiani");
System.out.println(e.
getFirstName());

}}
The useBean action declares a JavaBean for use in a JSP. Once declared, the bean becomes a scripting variable that can be accessed by both scripting elements and other custom tags used in the JSP. The full syntax for the useBean tag is as follows:

<jsp:useBean id = "bean's name" scope = "bean's scope" typeSpec/>


Here values for the scope attribute can be a page, request, session or application based on your requirement. The value of the id attribute may be any value as a long as it is a unique name among other useBean declarations in the same JSP.

Following example shows how to use the useBean action −

<html>
<head>
<title>useBean Example</title>
</head>

<body>
<jsp:useBean id = "date" class = "java.util.Date" />
<p>The date/time is <%= date %>
</body>
</html>

You will receive the following result − −

The date/time is Thu Sep 30 11:18:11 GST 2017 

Accessing JavaBeans Properties

Along with action, you can use the action to access the get methods and the action to access the set methods. Here is the full syntax −

<jsp:useBean id = "id" class = "bean's class" scope = "bean's scope">
<jsp:setProperty name = "bean's id" property = "property name"
value = "value"/>
<jsp:getProperty name = "bean's id" property = "property name"/>
...........
</jsp:useBean>

The name attribute references the id of a JavaBean previously introduced to the JSP by the useBean action. The property attribute is the name of the get or the set methods that should be invoked.
Following example shows how to access the data using the above syntax −

<html>
<head>
<title>get and set properties Example</title>
</head>

<body>
<jsp:useBean id = "students" class = "com.SuvenConsultants.StudentsBean">
<jsp:setProperty name = "students" property = "firstName" value = "Rocky"/>
<jsp:setProperty name = "students" property = "lastName" value = "Jagtiani"/>
<jsp:setProperty name = "students" property = "age" value = "39"/>
</jsp:useBean>

<p>Student First Name:
<jsp:getProperty name = "students" property = "firstName"/>
</p>

<p>Student Last Name:
<jsp:getProperty name = "students" property = "lastName"/>
</p>

<p>Student Age:
<jsp:getProperty name = "students" property = "age"/>
</p>

</body>
</html>

The following result will be displayed −

Student First Name: Rocky

Student Last Name: Jagtiani

Student Age: 39

Benefits of JavaBeans:

  • A Bean obtains all the benefits of Java’s “write-once, run-anywhere” paradigm. 
  •  The properties, events, and methods of a Bean that are exposed to an application builder tool can be controlled. 
  • A Bean may be designed to operate correctly in different locales, which makes it useful in global markets.
  •  Auxiliary software can be provided to help a person configure a Bean. This software is only needed when the design-time parameters for that component are being set. It does not need to be included in the run-time environment.
  •  The configuration settings of a Bean can be saved in persistent storage and restored at a later time. 
  • A Bean may register to receive events from other objects and can generate events that are sent to other objects.

Want To Learn Java?

Where to buy the best phones of 2017

We’ve now crowned the winner of our best Android phone of 2017 award, and you can view all the results at the previous link. After testing the handsets in various categories, the best phone honor went to the Huawei Mate 10 Pro, while you guys voted for the Samsung Galaxy Note 8 as your favorite of the past 12 months. 

If you aren’t the proud owner of one of these handsets yet, there’s just enough time to pick one up before the end of the holiday season. We’ve rounded up the best deals we can currently find on the phones from our list and laid it all out for you below. Devices are listed in alphabetical order based on manufacturer, with links to where you can each handset underneath. Enjoy. 

BlackBerry KEYone Black Edition

Given that it’s a limited edition device, that isn’t officially sold in the US, the BlackBerry KEYone isn’t easy to get hold of at a low-cost price. It did get a reduction in Canada when it was first released, a 24-hour flash sale offering $100 CAD savings, but you’ll be lucky to find it for much less than $700 now. That’s the current asking price on Amazon, though top-rated eBay seller never-msrp has it at even cheaper. 

never-msrp is usually an eBayer to be cautious of because it sells many international unlocked models that come without a US warranty. As that’s the same circumstances as on Amazon, though — just at a much better price — it’s worth taking a look at. 

Buy Now: Blackberry Keyone 64 GB – $545.99
Buy Now: BlackBerry Keyone black edition 64 GB – $699

Google Pixel 2 XL

The Google Pixel 2 XL arrived with its fair share of problems, but a few OTAs later and it’s back in action as one of the finest phones available right now. Currently, it’s on sale at the official Google Store with savings of around $75 until December 31 — and it looks like that is the only place you’ll get such a price.

What’s more, you can make use of Google’s trade-in program to give up your current device for an even better deal; check out the two storage variants at the Google Store via the buttons below. 

Buy now: Google Pixel 2 XL 64 GB – $774
Buy Now: Google Pixel 2 XL 128 GB – $874

Huawei Mate 10 Pro

The Huawei Mate 10 Pro is our phone of the year, but it’s another handset that you can’t officially get in the US. That’s set to change early next year, with more information to be unveiled at CES 2018, but in the meantime, your best bet will be to get it through Amazon. You’d be taking your chances with third-party sellers on international devices without warranty, but if you’re okay with that, the Mocha Brown variant at $844.99 is the best deal you’re likely to get right now.

Buy Now: Huawei Mate 10 Pro 128 GB – $844.99

LG V30

The LG V20 saw plenty of deals in its time, so you’d expect the same to happen in time with the latest LG flagship, the V30. Though it was the subject of a flash sale but a week ago, it’s back at $799 or more at most retailers now or more, and with most of the major carriers. We’ll keep our eyes peeled on this one, but until another deal pops up you can check out the cloud silver variant on AT&T at the button below.

Buy Now: LG V30 64 GB – $799

Lenovo Moto Z2 Force

No other Moto Z2 Force deal comes close to what T-Mobile is offering, serving up the recent Lenovo flagship for $435 (the handset is still upwards of $600 in many corners of the internet). If that doesn’t float your boat. you can get it for $11.00 per month on a Sprint Flex 18-month contract, down from $33 per month, which ain’t bad savings either. 

Buy Now: Moto Z2 Force 64 GB – $435
Buy Now: Lenovo Moto Z2 Force 64 GB – $11 per month

Nokia 8

The Nokia 8 is another smartphone which isn’t officially supported in the US, but you can pick it up warranty-less and for GSM networks (like AT&T and T-Mobile) at Amazon for $480. It’s available in all four color variants at, though Tempered Blue is the least expensive, and Amazon undercuts the prices of a number of other resellers who are charging a bomb for it.

Buy Now: Nokia 8 64 GB – $479.43

OnePlus 5T

OnePlus tends to discount its accessories rather than its hardware, which is why it avoided the Black Friday shenanigans last month. Thus, the best offer for the OnePlus 5T is still directly from OnePlus — coming in at $499 and $559 for the 64 GB and 128 GB models respectively.

That being said, if you’re a student, OnePlus does provide 10% discount on any order, including those on the OnePlus 5T: full details here.

Buy Now: OnePlus 5T 64 GB – $499
Buy Now: OnePlus 5T 128 GB – $559

Razer Phone

The Razer Phone landed this year and the company hit the ground running. While its camera is substandard, its display, audio and performance capabilities are well above average, and it doesn’t look half bad, either. 

It’s a brand new phone and will cost you $699 from the official Razer store, however, as we noted yesterday, you can get it with a Leviathan Mini Bluetooth speaker worth $180 if you order by the end of today (December 19): just use the promo code PHLVLUP at the checkout when you’re ordering the phone.

Buy Now: Razer Phone 64 GB – $699

Samsung Galaxy Note 8

The Samsung Galaxy Note 8 was the fan favorite handset of 2017, and it was a runner-up in our own tests. It’s been seen for around $949 since launch and still costs that in most places. You can pick it for a fair discount eBay right now without warranty, but considering the last Note’s troubles, I’d hesitate to recommend it without some kind of protection.

You can get the Note 8 for up to $400 off with Samsung’s official trade-in offer (which you can find via Samsung.com at the first link below) while Amazon has it available for a slightly lower price at $919 (Midnight Black color only).

Buy Now: Samsung Galaxy Note 8 64 GB – $950
Buy Now: Samsung Galaxy Note 8 64 GB – $919.42

Sony Xperia XZ1

There were probably fewer words written about the Xperia XZ1 online than there should have been. It might not have had the trendy bezel-less design of other flagships, but it’s still an excellent phone. Most places are holding firm with a $599 price tag at the moment, but this is already $100 less than what the XZ1 was introduced for; check it out on Amazon underneath.

Buy Now: Sony Xperia XZ1 64 GB – $597.90

Have you seen any better deals than what’s on our list? Let us know what they are in the comments.

‘All Eyes on U.S.’ as Honduran Election Panel Declares Incumbent President Hernández Election Winner

The commission made the announcement while opposition candidate Salvador Nasralla was traveling to the United States to present evidence of election fraud.

In Honduras, the government-controlled electoral commission on Sunday declared U.S.-backed incumbent President Juan Orlando Hernández as the official winner of the contested November 26 presidential election. The commission made the announcement while opposition candidate Salvador Nasralla was on a plane traveling to the United States to present evidence of election fraud. The opposition party has called for nationwide protests on Monday, while the Organization of American States has called for a new election. We speak with award-winning independent journalist Allan Nairn, and Rodolfo Pastor, the spokesperson for the Alliance Against the Dictatorship. We also speak with Dana Frank, professor of history at the University of California, Santa Cruz.

Transcript

This is a rush transcript. Copy may not be in its final form.

AMY GOODMAN: We begin today’s show with the escalating political crisis in Honduras. On Sunday night, the government-controlled electoral commission declared the U.S.-backed incumbent President Juan Orlando Hernández as the official winner of the contested November 26 presidential election. The commission made the announcement while opposition candidate Salvador Nasralla was on a plane traveling to the United States to present evidence of election fraud to the OASand State Department. The opposition party is now calling for nationwide protests, and the Organization of American States has called for a new election. This is Jorge “Tuto” Quiroga, head of the electoral observer mission of the OAS.

JORGE ”TUTO” QUIROGA: [translated] The electoral observer mission considered that it has observed a process of low electoral quality, and therefore cannot settle the doubts over what has been announced today. The mission regrets, once again, the incidents of violence that have occurred in the elections, in different phases of the electoral process, and calls once again for all actors to stay calm and act responsibly.

AMY GOODMAN: Protests erupted after the November 26 election, when the government-controlled electoral commission stopped tallying votes once the count showed opposition candidate Nasralla ahead. After a few days, the electoral commission then claimed Hernández was ahead. Human rights groups say as many as 22 people have been killed and more than 1,200 detained in the nationwide protests since.

Well, for more, we’re joined in Tegucigalpa by award-winning independent journalist Allan Nairn, as well as by Rodolfo Pastor, the spokesperson for the Alliance Against the Dictatorship, the opposition party represented by Salvador Nasralla. And in Washington, D.C., Dana Frank is with us, professor of history at University of California, Santa Cruz.

Let’s begin with Rodolfo Pastor in Tegucigalpa. Rodolfo Pastor, you’re spokesperson for the opposition party that is led by Salvador Nasralla, who was in a plane, headed to Washington, when the government-controlled electoral commission announced that the incumbent President Hernández has won. What is your response? And what’s happening in the streets right now?

RODOLFO PASTOR: Well, what’s happened since last night—it’s early morning here in Honduras—is, obviously, the announcement by the tribunal, a very unilateral announcement. Only the president of the tribunal was on camera, which is very, very atypical, since it’s a collegiate body and there is three magistrates for the tribunal, and yet it was the president of the tribunal, who is more directly linked to Juan Orlando Hernández, who was to make an announcement, which was also atypical since it was not an official announcement. It was basically him communicating the final results of the count, and yet it was not the tribunal coming out and saying Juan Orlando Hernández had been elected president of Honduras.

What happened since then is, of course, the alliance has rejected this declaration. We do not consider the tribunal, by now, to be a legitimate institution here in Honduras. It has been that way for a while. We have questioned the credibility of the tribunal, the capacity of the tribunal to provide credible results, since before the elections. And, of course, by now, more than three weeks since the elections, we are very concerned that the tribunal has played a very, very important role in manipulating the results. And this is something that the OAS has also come out and spoken about in its report. The alliance has rejected the results and has called for the population to stay on the streets, to keep mobilizing, since this is our way of putting pressure on the regime so that they can actually rectify.

Since the announcement by the tribunal and then the statements made by the OAScalling for a new election, what we’ve heard here in Honduras is, basically, Juan Orlando Hernández moving forward, saying, “Well, I am now the winner.” All the front pages this morning on all the major newspapers call him the new president of Honduras for the next four years. They barely mention the fact that the OAS came out with a very, very strong statement questioning the tribunal, questioning the process and calling for new elections.

AMY GOODMAN: Allan Nairn, you’ve been covering the events in Tegucigalpa through this election. Can you talk about Nasralla , where he was when this announcement was made? You saw him getting on the plane in Tegucigalpa?

ALLAN NAIRN: Yeah, I spoke to him as he was boarding. And he didn’t—he clearly didn’t expect this. He was on the way to Washington to plead his case. One thing that shocked many people here was that President Hernández made this announcement not only while Nasralla was on the plane, but one day after Hernández’s own sister was killed in a helicopter crash. But he seized the moment to spring his proclamation of victory.

The declaration by the secretary-general of the OAS, Luis Almagro, was remarkable, because the OAS is historically a policy tool of the United States, and he is clearly bucking the will of the United States, which has been backing Hernández throughout this process. Hernández is close to General Kelly in the White House. I think this took some courage on the secretary-general’s part, because during the recent weeks I’ve been talking to some former Latin American heads of state who have been—who have made it clear that the OAS has been hesitant about going against the U.S. on this.

But now the secretary-general has issued a very strong statement, making it clear that the computers—the computer system of the electoral commission was penetrated. It was an invitation to fraud. And the OAS report didn’t even address what seems to be the dominant emerging evidence, which is that much of the fraud was done by simple ballot box stuffing on the local level by the ruling party. And as I previously mentioned on an earlier show, on the 30th of November one of the technicians inside the electoral system sent out a private message, in which he stated, ”El fraude ya se hizo,” “The fraud has now been done.”

This OAS stance by the secretary-general put some pressure on the Honduran government, which has bitterly attacked him now, saying he’s inciting violence. But, more importantly, it may make it difficult for the White House, which will have a hard time explaining, in any rational way, why it would now back Hernández as the OAS is calling for new elections.

AMY GOODMAN: And can you talk about the role of Heidi Fulton, the chargé d’affaires, who, as in many countries around the world, President Trump has not appointed ambassadors, and so she plays that role? The significance of Nasralla being on a plane to the U.S., what he was planning to do at the State Department and the OAS? And her role in Honduras right now, as she is deeply involved with speaking with both sides?

ALLAN NAIRN: Well, just a few days earlier, she had appeared alongside the head of the electoral tribunal, a de facto endorsement to the partial, not clean recount they were doing. And she was widely denounced for that. It’s clear that behind the scenes she’s been working on behalf of Hernández.

And the U.S. has not denounced the killings by the security forces. Last night, I went out on the streets as people were taking to the streets, burning tires. And the dominant force I ran into were the military police, which is the most repressive and notorious element of the armed forces. They’re the ones most closely and personally linked to President Hernández. They were carrying live ammunition. They told me they had orders to open fire on demonstrators if they gave them any trouble. And although the Pentagon has been claiming in recent years that the U.S. has not been training the military police, a number of those I ran into said they had gotten their training from Fort Benning.

It’s partially necessary for them to use this extremely repressive force now, because two weeks ago the police rebelled and said they would no longer carry out repression. And other elements of the army I’ve been talking to have been saying—you know, rank-and-file troops have been saying that they are reluctant also. I’ve never actually seen, in any other country, a security force that was less ideologically strong and less committed to their own leadership. When you ask them who their families voted for back in the countryside where they come from, very few of them say Hernández. Most of them say their families voted for Nasralla, at least among those I’ve talked to. And they seem—many of them seem to identify more as poor working people, where they come from, as opposed to being members of the institution. And I think the Hernández government and also [inaudible] have to see this. And if the popular resistance is large and persistent enough, this government may have some difficulty holding on, even with U.S. backing.

AMY GOODMAN: And, Dana Frank, a professor at University California, Santa Cruz, you’ve been closely following everything here. You say this election is being stolen.

DANA FRANK: Oh, well, I think we have to say there’s certainly evidence of fraud and a great concern about who controlled those tally sheets, who controlled the computers. I certainly would support what the OAS is saying, which is, we don’t have evidence of a clear election here that could be certified. And there’s a long history of electoral fraud in Honduras going into this. Let’s remember that. And Juan Orlando himself has a long history of subverting the rule of law, overthrowing the Supreme Court. Let’s remember, his election itself is illegal. It’s a criminal act in violation of the constitution, which says you should be—it’s an immediate criminal act to even advocate re-election. So, going into that, let’s remember that.

So, I think that we have to listen to what the opposition is saying, listen to what the OAS is saying, and say we need—they need a new election. There’s way too much water under the bridge in terms of that electoral commission. And it’s the foxes are guarding the chicken coop here and the chicken—the votes from the chickens. And so, I think we really have to listen to what the opposition was saying. And remember that the Honduran people have very few ways of expressing themselves at this point. People say, “Well, why are they going into the streets?” It’s not like they can petition Congress. Juan Orlando Hernández controls all the reins of power—the Supreme Court, the attorney general, the military, most of the police. We don’t really know, as Mr. Nairn was saying, what the position of the military and the police are going to be. This one unit, 400 of the COBRAS, did rebel.

So, you know, I think, just supporting what he was saying, we have to pay attention to what the United States is going to do here. They have such a long history of giving a green light to Juan Orlando’s criminal re-election, of being silent about the repression since the elections, and, outrageously, certifying, two days after the election, as it was already clear that there were major problems with the election—certifying the human rights conditions on aid to Honduras had been met. I mean, that was astonishing. And also on December 10th, which is International Human Rights Day, Heidi Fulton, the acting ambassador, chose to use that to praise the Juan Orlando Hernández’s government for its advances on human rights. So, they’re sending clear signals about who they care about and support, and who they don’t care about and support, and this lack of respect for basic human rights in Honduras. So, all eyes are on the United States right now. Will it respect the OAS? And, you know, there were some suggestions that it was—that the OAS was going to certify this election. And when it hasn’t, I think, what is the United States going to do? The EU has actually come out, last night, supporting the electoral commission, very embarrassingly, and pretty much repeating exactly what the Honduran government said. And the EU has a long history, like the United States, of supporting Juan Orlando’s government.

You know, the other place to look here is the U.S. Congress, which there have been very, very strong voices about the appearance of major fraud. There have been very strong voices condemning the repression, and especially Congresswoman Schakowsky, Congressmember Keith Ellison. There are already 68 members of Congress that have said cut police and military aid. Going into the elections, you know, Senator Leahy, Senator Reed, Senator Merkley and many others in the Senate have expressed concern about potential fraud. They’ve expressed concern about the state security forces. So, we also really want to pay attention to this congressional voice pushing back against the State Department. Remember that Congress controls the purse strings, and U.S. money is funding these state security forces. U.S. money is, you know, of the State Department—it’s the U.S. State Department that has been continuingly celebrating Juan Orlando’s dictatorship as if he was, as John Kelly put it, a great guy and a good friend. I mean, Kelly said that as recently as May, and that’s Trump’s chief of staff.

AMY GOODMAN: Rodolfo Pastor, in Tegucigalpa, you are the opposition spokesperson, the Alliance Against the Dictatorship. Can you explain what Nasralla is doing in Washington and what you’re calling for to happen now in the streets? And explain how broad your coalition is.

RODOLFO PASTOR: Well, the coalition is very broad. What evidently happened here is we realized—different political parties and social movements, we realized that we were dealing with a dictatorship, that this was no longer a normal political process where we were just competing for political power through elections. This man who has come to power during the last eight years, as a result of the 2009 coup, when he became president of Congress first and started packing the courts and different state institutions, has garnered, has concentrated so much power under his executive office that we are no longer dealing with a normal president here in Honduras. And so, we started coming together, throughout the last four years, when he, as president, has been increasingly abusive, authoritarian and repressive.

And we realized that the only way to confront this guy on an election, that he pretty much controls, was by coming together and building this broad coalition, which brings very odd partners to the party. It’s—well, of course, I am a member of LIBRE, and this is a party that was born from the resistance to the coup back in 2009, and it’s a left-of-center party, basically. And the coalition also brings together PINU, which is a small social democrat party, that has been in Congress for a long time but has not played a major role in Honduran politics, and, of course, PAC, led by Mr. Nasralla, which was also a party that is born from the coup, but as a right-of-center party based on an anti-corruption narrative. It’s a party that, by the way, months before the coalition officially came together as the alliance, was dismantled by the tribunal, led by Mr. Matamoros and under Juan Orlando’s direct instruction.

So, we come together, and we start getting social movements from around Honduras coming to us and also saying, “Hey, listen, we want to be part of this, and we need to organize against this, because we know. We know we are going into an electoral process that we have stated, both nationally and internationally, did not meet any basic conditions for it to be free or fair.” And we went into this game knowing that they control the field, that we were clearly against—going against the odds here. But we also knew that the rejection of the Honduran population, as a whole, against—of Juan Orlando, against Juan Orlando, is huge, is huge. And there was absolutely no way that if these elections were in any way clean or transparent, that Juan Orlando was going to be the winner. And that’s currently the position.

And it’s also—it might seem contradictory, but we are not exactly celebrating the fact that the OAS has come out and asked for a new process to be organized, because we won these past elections. We clearly did so, even against a massive fraud and the control that Juan Orlando has of the institutions that organize the elections. The Honduran people came out massively and voted against Juan Orlando and for the alliance. And this is something that we want to make very clear. We need to respect this. We need to respect the fact that the popular will was very clearly expressed, and that since the elections, and since it became so evident that there had been fraud going on before, during and after the elections, there has been significant repression by state police and army forces. And as a result, we have victims of this repression. We have 22 people who have been killed, many others who have been injured.

And as both Dana and the journalist pointed out, you know, this is a critical moment for us, and we are not willing to just accept that Juan Orlando should, by some miracle, agree that we are to hold new elections—in which, of course, he would lose, if they were organized by an objective, impartial tribunal. So, we are very concerned with, number one, the reaction that Juan Orlando might have against what happened last night—of course, he seems to be plowing forward and, you know, basically ignoring what the OAS has said—and, number two, yes, what will the U.S. say about this. Now, Mr. Nasralla is visiting Washington in order to meet with Secretary-General Almagro. He is also to meet with officials at the State Department and—

AMY GOODMAN: Secretary-general of the OAS.

RODOLFO PASTOR: That’s right. That’s right. And what we are—this happened before the announcement was made. We did expect the announcement to be made. We expected it to be made today, Monday, and not Sunday night. And yet it did not come as a surprise to us. And we have been getting ready for this announcement to be made by the tribunal. And we do consider that the OAS report does give—it gives us a certain boost. And I speak on behalf of the Honduran population that has been out in the streets for three weeks now, because we understand that there is a voice of hope out there and that the international community is still paying attention to us.

We were obviously very upset with the position that the European Union representative here came out and stated last night, like Professor Frank stated. And yet, this is not—we must make it clear, this is not the official position of the electoral observation mission that they have here. And I understand that, right now, as we speak, we have Marisa Matias, the president of the commission, speaking from Brussels about this. And I think that they will come out strongly stating that the electoral process was plagued by fraud.

AMY GOODMAN: Well, we’re going to continue to cover this again tomorrow on Democracy Now! as events unfold, with the opposition leader, who many believe won the election, the Electoral College—the electoral commission shutting down the vote for a period, when it was announced Salvador Nasralla was 5 percentage points ahead. He is in Washington now. Rodolfo Pastor, spokesperson for the opposition party, Alliance Against the Dictatorship; Allan Nairn, in the streets of Tegucigalpa, independent journalist; and Dana Frank, professor at University of California, Santa Cruz, thanks so much for being with us.

When we come back, did Republican lawmakers include a last-minute provision in the tax plan to personally enrich Tennessee Senator Corker in order to secure his support for the tax bill? Stay with us.

 

Related Stories

  • Jesus Christ’s Hometown of Nazareth Just Canceled Christmas Because of Trump
  • Nazareth, City Where Christians Believe Jesus Was Raised, Just Canceled Christmas Because of Trump
  • Nazareth, City Where Christians Believe Jesus Was Raised, Just Cancelled Christmas Because of Trump

RonyaSoft Poster Printer

Just some unsolicited free advertising for a software I bought this weekend: Ronyasoft’s Poster Printer costs $19.95 for a home license. It is a software that takes an image and prints it at any size you want over multiple pages of paper. You can crop the image to print just the part you want. And if you print over multiple pages, you can add helpful guides on how to glue the whole thing together to give a good-looking poster. The software is quite user-friendly and it was easy enough to figure out all the options. And I’m quite happy with the results.

Obviously I am using the software to print out battlemaps for my Dungeons & Dragons campaign. Specifically this weekend I am printing the battlemaps for Madness at Gardmore Abbey. I still had the images from the Cartographer’s Guild from the last time I played. But at the time I thought I’d never play that adventure again, and threw away the printouts, so I had to print them again.

If you followed my posts about battlemaps you might notice that this is somewhere a step back in quality. For my last 4E campaign I didn’t print the poster maps myself, but sent them out to a poster printing website. Great quality, no need to glue pages together, and better water-resistance of the final product makes those poster maps really nice. However they cost between $10 and $20 per map, depending on size. And for Gardmore Abbey I need 24 maps. That’s a bit too expensive for my taste.

In a way there is a difference in the economics of this between 4th edition Dungeons & Dragons and 5th edition Dungeons & Dragons. My recent experience with playing 4E adventures in 5E shows that 5E is about three times faster than 4E. Madness at Gardmore Abbey in 4E took my group 18 sessions to play through over a whole year. In 5E I can probably do it in 6 sessions or so. So with a lot less time spent on any single battlemap, I am less willing to spend too much money on one. However I do plan to play the Zeitgeist campaign, which is the only one that I have a complete set of poster maps for, in 5th edition somewhere next year. I’m just waiting for the official conversion.

Which phone manufacturer had the best year in 2017? [Poll of the Week]

Last week’s poll summary: Out of almost 23,800 total votes, 25.1% of our readers said the Galaxy Note 8 is the best Android smartphone of 2017. 18.9% voted for the OnePlus 5T, 18.2% voted Pixel 2 XL, and 11.3% said the Huawei Mate 10 Pro is the top device of the year.

2017 brought us some of the best smartphones we’ve ever seen. It was also the year that we saw many Android OEMs come into their own.

Samsung had a particularly tough year, as it not only had to recover from the Galaxy Note 7 recall, it also had to win the trust back of consumers. Samsung worked hard to bring trust back to its brand, which resulted in the Galaxy S8 and Note 8— two of the best Android smartphones ever made.

OnePlus has also stepped things up this year, particularly with the launch of the OnePlus 5T. The OnePlus 5 felt a little stuck in the past, but the 5T brought an improved camera experience and a fantastic 18:9 OLED display. OnePlus continues to make improvements every year. It’s crazy to think this is the same company that had so many weird missteps a few years back.

See also

Huawei made some huge strides in 2017 with the launch of the Mate 10 Pro. Not only did that phone win our Best of Android 2017 competition, it feels like Huawei is becoming more original than ever before. Some might complain of Huawei’s software being too aggressive in some areas, but the improvements on the design/build front cannot be overstated.

I’d also like to mention HMD Global, the proud owners of the Nokia brand name. The Nokia 8, the company’s 2017 flagship, holds its own against the other competitors on the market. Android Authority actually named HMD Global as the best smartphone brand of 2017.

In your opinion, which smartphone manufacturer had the best year? Cast your vote in the poll below, and speak up in the comments if there’s anything you’d like to add.

Note: There is a poll embedded within this post, please visit the site to participate in this post’s poll.

Rage of Demons: Session 2

In the previous session the group escaped from a prison of the drow in the Underdark. Now they were free, but more or less lost in an unfamiliar environment, with neither food nor drink, and limited equipment. And the drows were pursuing them. So apart from a few combat encounters this session was mostly about how to survive and travel in the Underdark.

A tabletop role-playing game always plays on two levels at once: The story level where the warrior chops off the head of the orc, and the game level, where a player rolls some dice. The art of Dungeon-mastering is to balance these two levels and to connect them. By treating travel and survival in the Underdark as a series of dice rolls, with modifiers based on player decisions, the players gain agency over the story. And unexpected dice rolls can add surprise to the story. The Out of the Abyss book, chapter 2, has some very good suggestions on how to handle travel and survival. I just needed to combine that with existing rules in the Player’s Handbook and Dungeon Master’s Guide to a “loop” of rolls to do every day: A roll for navigation in order to avoid becoming lost, a random encounter roll for during the day, another random encounter roll for camp at night, and a roll for foraging.

The trick to make all of that a bit more interesting is the drow pursuit: Players can choose to travel slow, normal speed, or fast. Traveling fast makes them gain more distance from the pursuers, but prevents them from foraging, and increases the difficulty of navigation and perceiving enemies. Traveling slower increases the risk from the pursuit, but makes everything else easier. In this session we played through that loop for 7 game days, which with several days traveled at high speed meant the group went from the drow outpost Velkynvelve to the kuo-toa village of Sloobludop.

To give the group some means of orientation I used the previous encounter of the cleric with Juiblex to give him a level 1 madness which made his face wounds burn whenever he looked in the north-western direction from Velkynvelve (towards Blingdenstone to be exact, for reasons that will become obvious much later). That gave him advantage on navigation rolls, and the group used a second character to help with navigation when they were traveling at fast speed, so they never got lost. After the first day the cleric also switched spells to have Create Water, which solved their thirst problem.

As encounters we first had one attack at night by goblins, which weren’t too hard to beat and provided the ranger of the group with a short bow and arrows. It also turned out that the players weren’t the squeamish kind, and they filleted the goblins, cooked them over magical fire, cast Purify Food & Drink on the meat and ate it. Later in the session they encountered a bunch of gnolls, which are larger than goblins, and thus ended up with more than enough food for their journey (although I ruled that meat wouldn’t keep longer than 2 days, because otherwise the whole foraging thing would become useless).

Then they came to the Silken Paths, an area of spider webs crossing a large chasm, connecting stalagmites and stalactites. Two non-aggressive goblins had created a business guiding people across, and the group agreed to pay them for passage. On the web they found a large chest, which of course turned out to be a mimic (that still works with new players). Then they were attacked by darkmantles, which after killing them they used to make waterskins out of. In fact this group is the first one I see in 5th edition which makes use of crafting skills from their background. Once over the chasm, the group decreased their pursuit level by burning the webs they had crossed, although of course they couldn’t burn the whole giant web.

The gnolls they met in an encounter which was supposed to have them come upon a hunt, with the gnolls chasing a pair of hook horrors. But the group just cast a fog spell to hide from the monsters and then traveled on. Then they came upon the second half of the hunters, and killed them. The group decided to rest there, but of course the first group of hunters came back before they were rested and they had to fight gnolls again.

At the end of the session the group arrived near Sloobludop, and gained level 4 from the xp for survival and the various encounters. Just like in other campaign books of Wizards of the Coast, level increase is at least twice as fast as what you’d get if you just gave out xp for monsters. I decided that was okay, as nobody wants to be low level for too long. I might have to slow that down a bit if I feel that the group is becoming too powerful for a dark themed adventure.

Test Your SQL Basics – Part_3

Manipulating Data Questions

1. What all operations can MERGE statement perform in SQL?

  1. INSERT
  2. DELETE
  3. GROUP BY
  4. None of the above

2.Which of following commands is a DDL (Data Definition Language) command but is often considered along with DML commands?
  1. DELETE
  2. INSERT
  3. TRUNCATE
  4. None of the above

3. What among the following is a TRUNCATE statement equivalent to? (Choose the most suitable answer)
  1. To a DELETE statement
  2. To an UPDATE statement
  3. A DELETE statement without a WHERE clause
  4. None of the above

4.Which of the following situations indicate that a DML operation has taken place?
  1. When new rows are added to a table
  2. When two queries are combined
  3. When a table is truncated
  4. None of the above

5.What is true about the keyword VALUES in INSERT statements?
  1. VALUES can add multiple rows at a time during the INSERT
  2. VALUES can add only 100 rows at a time during the INSERT
  3. VALUES is mandatory to be used if we use the keyword INSERT
  4. VALUES add only one row at a time

6. Which of the following commands is used to save the changed data in a table permanently?
  1. ROLLBACK
  2. COMMIT
  3. INSERT
  4. UPDATE

7. Which of the following commands / statements would end a transaction?
  1. COMMIT
  2. SELECT
  3. SAVEPOINT
  4. CREATE

8.What happens when a transaction is committed?
  1. The changes made during the transaction are saved for a particular user session
  2. The changes made during the transaction are discarded
  3. If the transaction is a DDL, the commit doesn’t work
  4. None of the above

9. Which of the following reasons will the best one on the usage of string?
  1. Using sub-queries
  2. Syntax errors
  3. Access permissions
  4. Constraint violations

Answer
1-(A,B),   2-C,   3-C,   4-A,  5-D,   6-D,   7-(A,D),   8-D,   9-(C,B,D)

function mco() { var x = document.getElementById(‘myDIV’); if (x.style.display === ‘block’) { x.style.display = ‘none’; } else { x.style.display = ‘block’; } }


Using DDL Statements Questions

1.DDL statements are used for which of the following Oracle database objects?
  1. Tables
  2. Sub-queries
  3. Rows
  4. Columns

2.What is the basic unit of storage in Oracle Database that contains data?
  1. View
  2. Column
  3. Query
  4. Table

3.Which of the following database objects improves the performance of some queries?
  1. Table
  2. Synonym
  3. View
  4. Index

4. When a table can be created?
  1. When the database is not being used by any user
  2. When the database is newly created
  3. It can be created any time, even when a user is using the database
  4. None of the above

5. What is true about a table?
  1. It is not mandatory to specify the size of a table
  2. The size of each table is the same
  3. A table can be modified online
  4. None of the above

6. A table named 123_A is created for storing the number of employees in an organization. What is wrong in the name of the table?
  1. The name of a table cannot start with a digit
  2. Nothing is wrong in this name.
  3. You cannot use an underscore while naming a table
  4. None of the above

7. What among the following are the pre-requisites for creating a table?
  1. CREATE TABLE privilege
  2. Storage space
  3. Data in the table
  4. None of the above

8. What is the syntax for creating a table?
  1. CREATE TABLE [schema.] table (column datatype [DEFAULT expr] [,..] );
  2. CREATE TABLE INTO [schema.] table (column datatype [DEFAULT expr] [,..] );
  3. CREATE TABLE VALUES [schema.] table (column datatype [DEFAULT expr] [,..] );
  4. None of the above

9. What is true about a namespace?
  1. It is a group of object types
  2. Within a namespace, all the object names should be uniquely identified by schema and name
  3. The same type of objects in different namespaces can share the same name
  4. All of the above

10. Which of the following object types share the same namespace?
  1. Synonyms
  2. Table
  3. Views
  4. All of the above

11. Which of the following are the data types for date and time data?
  1. TIMESTAMP
  2. INTERVAL DAY TO SECOND
  3. TIMESTAMP WITH LOCAL TIMEZONE
  4. All of the above

12. Which of the following data types are for large objects?
  1. CLOB
  2. BLOB
  3. RAW
  4. All of the above

13. What will happen if the inserted value is of a smaller length as defined for a VARCHAR2 data type column?
  1. It will throw an ORA error
  2. It will get inserted successfully and the value will take up as much space as it needs.
  3. It will get inserted and the remaining space will be padded with spaces
  4. None of the above

14. What happens when a table which is marked Read Only is attempted for drop?
  1. It will throw an error
  2. It will no longer remain Read Only but cannot be dropped either
  3. It will be dropped without errors
  4. It will remain un-touched

15. Which of the following data types cannot be used with a GROUP BY and an ORDER BY clause?
  1. CLOB
  2. VARCHAR2
  3. CHAR
  4. LONG

16. How many LONG columns can a table contain?
  1. None
  2. Maximum 2
  3. Minimum 2
  4. Only one

Answer
1-A,   2-D,   3-D,   4-C,  5-(A,C),   6-A,   7-(A,B),   8-A,   9-D,  10-D,   11-D,  12-(A,B),  13-B,  14-C,  15-D,  16-D

function mct() { var x = document.getElementById(‘myDIV2’); if (x.style.display === ‘block’) { x.style.display = ‘none’; } else { x.style.display = ‘block’; } }


Creating Other Schema Objects Questions

1. What among the following is true about synonyms?
  1. PUBLIC and PRIVATE synonyms can have the same name for the same table
  2. DROP SYNONYM will remove a synonym
  3. DROP PUBLIC SYNONYM can be executed only by a SYSDBA
  4. None of the above

2. What is true about creating a view? (Choose the most appropriate answer)
  1. A view can only be created from a table
  2. A view can only be created from one table
  3. A view can be created from one or many tables or views
  4. None of the above

3. Which of the following privileges are required to create views in one’s own schema?
  1. CREATE TABLE system privilege
  2. CREATE VIEW system privilege
  3. ALTER VIEW system privilege
  4. CREATE ANY VIEW system privilege

4.How is a view stored in the data dictionary?
  1. As a WHERE clause
  2. As a CREATE statement
  3. As an UPDATE statement
  4. As a SELECT statement

5.Which of the following can contain single-row functions?
  1. Inline Views
  2. Simple Views
  3. Complex Views
  4. Composite Views

6.When can the rows from a view be removed?
  1. Deletion of rows through a view is not possible
  2. It should be a simple view
  3. It should be a complex view
  4. None of the above

7.When can the data in a view not be modified?
  1. When there are group expressions
  2. When there is a GROUP BY clause
  3. When ROWNUM is used in the view query
  4. All of the above

8.What is true about the WITH CHECK CONSTRAINT?
  1. INSERTs or UPDATEs performed through the view cannot create rows that the view cannot select
  2. Only INSERTs performed through the view cannot create rows that the view cannot select
  3. Only UPDATEs performed through the view cannot create rows that the view cannot select
  4. None of the above

9.How can you prevent DML operations on a View?
  1. By defining a WITH CHECK OPTION constraint
  2. By defining a WITH READ ONLY option
  3. Neither of A nor B
  4. None of the above

10.What is true about the above statement?
  1. The view will not be created
  2. INSERT operation on this view an will throw an ORA error
  3. On UPDATING the rows for all the employees in department 100, an ORA error will be thrown
  4. None of the above

11.How many rows can be deleted from the view as shown above?
  1. All rows of the view
  2. All the rows of only the department 100
  3. No rows
  4. None of the above

12.What is true about sequences?
  1. It generates integers
  2. It is a shareable object
  3. Can be used to create a PRIMARY KEY value
  4. All of the above

13.What can be the last value generated by this sequence?
  1. 0
  2. 100
  3. 101
  4. 9999

14.What is true about NEXTVAL pseudo column?
  1. It re-generates the CURRVAL of a sequence
  2. It returns the next available sequence value
  3. It can return duplicate values
  4. It generates the same values for different users

15.What is true about CURRVAL pseudo column?
  1. CURRVAL can be used before NEXTVAL with respect to a sequence
  2. CURRVAL gives the current value of a sequence
  3. CURRVAL can give duplicate values
  4. None of the above

16.Which of the following is used by an index to locate the data quickly?
  1. ROWNUM
  2. ROWID
  3. Sequence
  4. None of the above

17.What happens when there is no index on a column of a table?
  1. The data is located quickly
  2. There is a full table scan
  3. The table cannot be created
  4. The table cannot be altered

Answer
1-(A,B),   2-C,   3-B,   4-D,  5-(A,B),   6-B,   7-D,   8-A,   9-B,  10-(B,C),   11-C,  12-D,  13-D,  14-B,  15-B, 16-B, 17-B

function mctt() { var x = document.getElementById(‘myDIV3’); if (x.style.display === ‘block’) { x.style.display = ‘none’; } else { x.style.display = ‘block’; } }


Want to Learn Database Programming?